Here is an example of that MA cross code.
//@version=5
indicator(title="MA Cross", overlay=true, timeframe="", timeframe_gaps=true)
shortlen = input.int(9, "Short MA Length", minval=1)
longlen = input.int(21, "Long MA Length", minval=1)
short = ta.sma(close, shortlen)
long = ta.sma(close, longlen)
plot(short, color = #FF6D00)
plot(long, color = #43A047)
plot(ta.cross(short, long) ? short : na, color=#2962FF, style = plot.style_cross, linewidth = 4)
There is a slight difference when comparing binance and coinbase to their code.
(because the volume and price are slightly different)
Can I get a RBI on Coinbase based on a cross ma confirmed on Binance?
