Hi,
is it possible to convert this code from TradinView?
Many thanks in advance!
study(title="Wave A", shorttitle="WAVE-A", precision = 2)
usewa = input(true, title = "Wave A", type=bool)
// WAVE A CALC
// Wave A
fastMA1 = usewa ? ema(close, 8) : na
slowMA1 = usewa ? ema(close, 34) : na
macd1 = usewa ? fastMA1 - slowMA1 : na
signal1 = usewa ? ema(macd1, 34) : na
hist1 = usewa ? macd1 - signal1 : na
fastMA2 = usewa ? ema(close, 8) : na
slowMA2 = usewa ? ema(close, 55) : na
macd2 = usewa ? fastMA2 - slowMA2 : na
signal2 = usewa ? ema(macd2, 55) : na
hist2 = usewa ? macd2 - signal2 : na
// PLOTs
plot(hist2, color=#007e49, transp=0, style=histogram, title="Wave Lenta", linewidth=3)
plot(hist1, color=#f7801f, transp=0, style=histogram, title="Wave Veloce", linewidth=3)
hline(0, color=black, title = "Zero Line", linewidth = 2, linestyle = solid)