PROTECTED SOURCE SCRIPT
[DEM] Relative Strength Signal (With Backtesting)

[DEM] Relative Strength Signal (With Backtesting) is a momentum indicator that generates trading signals based on when an asset reaches its highest or lowest relative strength compared to the SPY benchmark over a 20-period lookback window. The indicator calculates relative strength by dividing the current asset's price by SPY's price, then triggers buy signals when this ratio hits a 20-period high (indicating maximum outperformance) and sell signals when it reaches a 20-period low (indicating maximum underperformance). To prevent signal clustering and improve practical utility, the indicator includes a built-in filter that requires a minimum number of bars (default 20) to pass between signals of the same type, ensuring adequate spacing for meaningful trade opportunities. The system includes comprehensive backtesting functionality that tracks signal accuracy, average returns, and signal frequency over time, displaying these performance metrics in a detailed statistics table to help traders evaluate the effectiveness of trading on relative strength extremes versus the broader market.
受保護腳本
此腳本以閉源形式發佈。 不過,您可以自由且不受任何限制地使用它 — 在此處了解更多資訊。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
受保護腳本
此腳本以閉源形式發佈。 不過,您可以自由且不受任何限制地使用它 — 在此處了解更多資訊。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。