Pine Script (TradingView)
Ceci est un exemple Pine Script TradingView pour cet indicateur. Collez-le dans l'editeur Pine TradingView, ajoutez-le au graphique, puis ajustez les parametres selon votre marche et votre unite de temps.
//@version=6
strategy("ADX — Average Directional Index", overlay=true)
adxLen = input.int(14, "ADX Length")
emaLen = input.int(100, "Trend EMA")
adx = ta.adx(adxLen)
ema = ta.ema(close, emaLen)
longSignal = close > ema and adx > 25
exitSignal = close < ema
if longSignal
strategy.entry("Long", strategy.long)
if exitSignal
strategy.close("Long")
plot(ema, "EMA", color=color.orange)