//@version=4
study(title="EMA & MA Crossover with Cloud", shorttitle="EMA & MA Cloud", overlay=true)
// Input lengths for MA and EMA
LengthMA = input(10, minval=1, title="SMA Length")
LengthEMA = input(10, minval=1, title="EMA Length")
// Calculate SMA and EMA
xMA = sma(close, LengthMA)
xEMA = ema(xMA, LengthEMA)
// Determine position based on...