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.
Script protégé
Ce script est publié en source fermée. Toutefois, vous pouvez l'utiliser librement et sans aucune restriction - en savoir plus ici.
Clause de non-responsabilité
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script protégé
Ce script est publié en source fermée. Toutefois, vous pouvez l'utiliser librement et sans aucune restriction - en savoir plus ici.
Clause de non-responsabilité
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.