PROTECTED SOURCE SCRIPT
Actualizado

Optimus Pair Trader — Long/Short Two Symbols

24
This indicator implements a Pairs Trading Z-Score model to identify mean-reversion opportunities between two correlated assets. It allows you to select a second symbol in the settings, automatically calculates the hedge ratio (β) using rolling correlation, and computes a Z-score spread to visualize divergence and convergence between the pair.

When the Z-score rises above the +threshold, the spread is considered wide — signaling a Short A / Long B setup. When it falls below the −threshold, the spread is narrow — signaling a Long A / Short B setup. When the Z-score returns within the exit band, the trade is closed.

Features include:
• Dynamic hedge ratio (β) calculation
• Z-score chart with entry/exit bands
• One-time entry/exit signal labels per trade
• Synthetic cumulative P&L performance line
• Info table displaying active pair stats
• Built-in alert conditions for Long, Short, and Exit signals

Ideal for studying statistical arbitrage, market-neutral strategies, and algorithmic pair signals across stocks, ETFs, futures, or crypto.
Notas de prensa
Change Z to 2.0/0.5

Exención de responsabilidad

La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.