Just trying out the strategy tester with something simple.
//@version=2 strategy("SMA Strategy", overlay=true) SMALength = input(10) price=close SMA=sma(price, SMALength) if (crossover(SMA, price)) strategy.entry("SimpleMovAvgLE", strategy.long, comment="SimpleMovAvgLE") if (crossunder(SMA, price)) strategy.entry("SimpleMovAvgSE", strategy.short, comment="SimpleMovAvgSE") //plot(strategy.equity, title="equity", color=red, linewidth=2, style=areabr)