Forums › ProRealTime English forum › ProOrder support › Simple code returns error message › Reply To: Simple code returns error message
03/11/2020 at 4:33 PM
#121838
Thank you Roberto…
I have just tried to backtest this simple program but the syntax error now
underlined is the > symbol, third line up (>80) What have I done wrong ?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
DEFPARAM CumulateOrders = False DEFPARAM FlatBefore = 081500 DEFPARAM FlatAfter= 160000 StocK = Stochastic[15,3](close) StocD = Average[3,0](StocK) y = StocK CROSSES UNDER StocD If average [50](close)>average[50](3) then If StocK<20 and y then Buy at market Set stop loss 15 Endif Endif // sell condition If StocK = Stochastic[15,3](close)>80 then Sell at market Endif |