OPEN-SOURCE SCRIPT
Waves of Wealth Pair Trading Ratio

This versatile indicator dynamically plots the ratio between two user-selected instruments, helping traders visualize relative performance and detect potential mean-reversion or trend continuation opportunities.
Features include:
User inputs for selecting any two instrument symbols for comparison.
Adjustable moving average period to track the average ratio over time.
Customizable standard deviation multiplier to define statistical bands for overbought and oversold conditions.
Visual display of the ratio line alongside upper and lower bands for clear trading signals.
Ideal for pair traders and market analysts seeking a flexible tool to monitor inter-asset relationships and exploit deviations from historical norms.
Simply set your preferred symbols and parameters to tailor the indicator to your trading style and assets of interest.
How to Use the Custom Pair Trading Ratio Indicator
Select symbols: Use the indicator inputs to set any two instruments you want to compare—stocks, commodities, ETFs, or indices. No coding needed, just type or select from the dropdown.
Adjust parameters: Customize the moving average length to suit your trading timeframe and style. The standard deviation multiplier lets you control sensitivity—higher values mean wider bands, capturing only larger deviations.
Interpret the chart:
The ratio line shows relative strength between the two instruments.
The middle line represents the average ratio (mean).
The upper and lower bands indicate statistical extremes where price action is usually overextended.
Trading signals:
Look to enter pair trades when the ratio moves outside the bands—expecting a return to the mean.
Use the bands and mean to set stop-loss and profit targets.
Combine with other analysis or fundamental insight for best results.
Features include:
User inputs for selecting any two instrument symbols for comparison.
Adjustable moving average period to track the average ratio over time.
Customizable standard deviation multiplier to define statistical bands for overbought and oversold conditions.
Visual display of the ratio line alongside upper and lower bands for clear trading signals.
Ideal for pair traders and market analysts seeking a flexible tool to monitor inter-asset relationships and exploit deviations from historical norms.
Simply set your preferred symbols and parameters to tailor the indicator to your trading style and assets of interest.
How to Use the Custom Pair Trading Ratio Indicator
Select symbols: Use the indicator inputs to set any two instruments you want to compare—stocks, commodities, ETFs, or indices. No coding needed, just type or select from the dropdown.
Adjust parameters: Customize the moving average length to suit your trading timeframe and style. The standard deviation multiplier lets you control sensitivity—higher values mean wider bands, capturing only larger deviations.
Interpret the chart:
The ratio line shows relative strength between the two instruments.
The middle line represents the average ratio (mean).
The upper and lower bands indicate statistical extremes where price action is usually overextended.
Trading signals:
Look to enter pair trades when the ratio moves outside the bands—expecting a return to the mean.
Use the bands and mean to set stop-loss and profit targets.
Combine with other analysis or fundamental insight for best results.
オープンソーススクリプト
TradingViewの精神に則り、この作者はスクリプトのソースコードを公開しているので、その内容を理解し検証することができます。作者に感謝です!無料でお使いいただけますが、このコードを投稿に再利用する際にはハウスルールに従うものとします。
Dev Advisory
免責事項
これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、この作者はスクリプトのソースコードを公開しているので、その内容を理解し検証することができます。作者に感謝です!無料でお使いいただけますが、このコードを投稿に再利用する際にはハウスルールに従うものとします。
Dev Advisory
免責事項
これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。