Buongiorno a tutti,
volevo richiedere la conversione in oggetto, di questo indicatore, che mi sembra interessante pur nella
sua semplicità.
Ringrazio sempre per il cortese e prezioso supporto.
https://www.tradingview.com/script/egfSfN1y-TonyUX-EMA-Scalper-Buy-Sell/
———————————————————————
TonyUX EMA Scalper – Buy / Sell
study(title=”Tony’s EMA Scalper – Buy / Sell”, shorttitle=”TUX EMA Scalper”, overlay=true)
len = input(20, minval=1, title=”Length”)
src = input(close, title=”Source”)
out = ema(src, len)
plot(out, title=”EMA”, color=blue)
last8h = highest(close, 8)
lastl8 = lowest(close, 8)
plot(last8h, color=red, linewidth=2)
plot(lastl8, color=green, linewidth=2)
bearish = cross(close,out) == 1 and close[1] > close
bullish = cross(close,out) == 1 and close[1] < close
plotshape(bearish, color=red, style=shape.arrowdown, text=”Sell”, location=location.abovebar)
plotshape(bullish, color=green, style=shape.arrowup, text=”Buy”, location=location.belowbar)
out = average[20,1]
last8h = highest[8]
lastl8 = lowest[8]
bearish = close crosses under out and close[1] > close
bullish = close crosses over out and close[1] < close
if bullish then
DRAWARROWUP(barindex, low)coloured(51,102,51)
endif
if bearish then
DRAWARROWDOWN(barindex,high)coloured(204,0,0)
endif
return
Fifi743,
gentilissimo grazie.
Posso chiederti anche come inserire le bande (green line e red line ) simili a un canale di Donchian , all’interno delle quali nell’indicatore le candele oscillano?
dovrebbe trattarsi delle seguenti stringhe:
plot(last8h, color=red, linewidth=2)
plot(lastl8, color=green, linewidth=2)
Grazie ancora