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提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。