Bonjour, merci pour cette réponse. Je ne connais pas ce langage, j’essai juste de modifier ce script de chez tradingview pour qu’il soit fonctionnel sur prorealtime en déchiffrant ligne par ligne… L’IA m’a aidé mais le script ne fonctionne toujours pasVoici le script en question :
//
study(“Waddah Attar Explosion V2 [SHK]”, shorttitle=“WAE [SHK]”)
sensitivity = input(150, title=“Sensitivity”)
fastLength=input(20, title=“FastEMA Length”)
slowLength=input(40, title=“SlowEMA Length”)
channelLength=input(20, title=“BB Channel Length”)
mult=input(2.0, title=“BB Stdev Multiplier”)
DEAD_ZONE = nz(rma(tr(true),100)) * 3.7
calc_macd(source, fastLength, slowLength) =>
fastMA = ema(source, fastLength)
slowMA = ema(source, slowLength)
fastMA – slowMA
calc_BBUpper(source, length, mult) =>
basis = sma(source, length)
dev = mult * stdev(source, length)
basis + dev
calc_BBLower(source, length, mult) =>
basis = sma(source, length)
dev = mult * stdev(source, length)
basis – dev
t1 = (calc_macd(close, fastLength, slowLength) – calc_macd(close[1], fastLength, slowLength))*sensitivity
e1 = (calc_BBUpper(close, channelLength, mult) – calc_BBLower(close, channelLength, mult))
trendUp = (t1 >= 0) ? t1 : 0
trendDown = (t1 < 0) ? (-1*t1) : 0
plot(trendUp, style=columns, linewidth=1, color=(trendUp<trendUp[1])?lime:green, transp=45, title=“UpTrend”)
plot(trendDown, style=columns, linewidth=1, color=(trendDown<trendDown[1])?orange:red, transp=45, title=“DownTrend”)
plot(e1, style=line, linewidth=2, color=#A0522D, title=“ExplosionLine”)
plot(DEAD_ZONE, color=blue, linewidth=1, style=cross, title=“DeadZoneLine”)