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提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。