PROTECTED SOURCE SCRIPT
更新済

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.
リリースノート
Change Z to 2.0/0.5

免責事項

これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。