I am learning to code in Ninja. I am devising a strategy which enters a trade based on the closing of last candle Close[0]. I am using Managed Approach and code is unlocked and I am editing the strategy. I am using only one primary series on the chart . fyi
I am aware that , in the next candle(current), if the placed order is not filled, order gets cancelled. I would like the order to be valid for next 2 (or 3) candles.
I would like to be able to control how many bars order should stay valid.
I have written the attached code , but its not working . Can someone please point out what mistakes I am doing and possibly assist in correcting the code.
Thanks,
Nag
Comment