
This strategy is a trend-following system that combines multiple technical indicators, primarily based on Supertrend indicator for trend direction determination, integrated with ADX (Average Directional Index) for trend strength confirmation and RSI (Relative Strength Index) for volatility range assessment to optimize entry timing. The strategy adopts a long-only mode, utilizing multiple indicator cross-validation to enhance trading accuracy and reliability.
The core logic of the strategy is based on three key components: 1. Supertrend indicator for determining the main trend direction, with a downward shift indicating an uptrend formation; 2. ADX indicator for measuring trend strength, with values above 14 indicating sufficient trend momentum; 3. RSI indicator for assessing price volatility range, entering between 30-60 to avoid excessive chasing.
Entry conditions must simultaneously satisfy: - Supertrend direction downward (supertrendDirection == -1) - ADX value above threshold 14 (adx > adxThreshold) - RSI within specified range (rsi < 40 or rsi > 60)
Exit conditions: Position closure is executed when Supertrend direction turns upward (supertrendDirection == 1).
This strategy constructs a relatively comprehensive trend-following trading system through the combined application of multiple technical indicators. The core advantage lies in enhancing trading signal reliability through cross-validation of different indicators, while simultaneously facing challenges of signal lag and parameter optimization. Through the proposed optimization directions, the strategy has the potential to further improve its adaptability and stability while maintaining existing advantages. Overall, this is a strategy with a solid basic framework that, through continuous optimization and improvement, has the potential to develop into a more comprehensive and robust trading system.
/*backtest
start: 2025-02-13 00:00:00
end: 2025-02-20 00:00:00
period: 5m
basePeriod: 5m
exchanges: [{"eid":"Binance","currency":"ETH_USDT"}]
*/
//@version=6
strategy("Supertrend + ADX Strategy", overlay=true)
// Parameter für ADX und Supertrend
diLength = input.int(14, title="DI Length")
adxSmoothing = input.int(14, title="ADX Smoothing")
adxThreshold = input.float(14)
supertrendFactor = input.float(3.0, title="Supertrend Factor")
supertrendPeriod = input.int(14, title="Supertrend Period")
// Berechnung von +DI, -DI und ADX
[diplus, diminus, adx] = ta.dmi(diLength, adxSmoothing)
// RSI-Berechnung
rsiLength = input.int(14, title="RSI Length")
rsi = ta.rsi(close, rsiLength)
// Supertrend-Berechnung
[supertrendValue, supertrendDirection] = ta.supertrend(supertrendFactor, supertrendPeriod)
// Long-Einstiegsbedingung
longCondition = supertrendDirection == -1 and adx > adxThreshold and (rsi < 40 or rsi > 60)
// Long-Ausstiegsbedingung (wenn Supertrend grün wird)
exitCondition = supertrendDirection == 1
// Visualisierung der Einstiegssignale (Pfeile)
plotshape(series=longCondition, location=location.belowbar, color=color.green, style=shape.triangleup, title="Buy Signal")
plotshape(series=exitCondition, location=location.abovebar, color=color.red, style=shape.triangledown, title="Sell Signal")
// Supertrend-Plot im Chart
plot(supertrendValue, color=supertrendDirection == -1 ? color.yellow : color.red, linewidth=2, title="Supertrend Line")
// Alerts für Einstieg/Ausstieg
alertcondition(longCondition, title="Long Signal", message="Supertrend + ADX: Long Entry")
alertcondition(exitCondition, title="Exit Signal", message="Supertrend turned Green: Exit")
// Strategieausführung
if longCondition and supertrendDirection == -1
strategy.entry("Long", strategy.long)
if exitCondition
strategy.close("Long")