I would like to create some strategy based on Moving Average, However when I converted base MA indicator to strategy, overlay not working and MA is ploting on another plot area. Any idea ?
//@version=4
strategy(title="MAStrategy", shorttitle="MyMA Strategy_0.01", format=format.price, initial_capital=1000, overlay=true)
lenShort = input(9, minval=1, title="LengthShort")
srcShort = input(close, title="SourceShort")
offsetShort = input(title="OffsetShort", type=input.integer, defval=0, minval=-500, maxval=500)
outShort = sma(srcShort, lenShort)
plot(outShort, color=color.green, title="MA_Short", offset=offsetShort)
