I am learning to code in NinjaScript by coding simple strategies. I have a strategy that puts a sell limit order if the high of 1 bar ago is higher than the current high, and a buy limit order if low[1] < low[0].
When I create the strategy for buy only and a seperate strat for sell only, it works fine, but when I create a strat that looks for buy and sell opps, it goes wrong. The code is attached along with a picture where you can see that the orders are being filled outside the price range of the bar.
Any help would be much appreciated.
Malcolm
Comment