I've searched the forum with no luck for a simple way to cancel an order after several bars have printed.
I'm using a Ninjascript strategy that does NOT call an ATM strat.
I've looked at BarsArray but they all seem to apply to indicators on a multi time frame chart.
Is there any way to do this using a variable and possibly a BarsArray? For instance, if order is placed, set a variable orderplaced = 1 then if 6 bars have printed without the order being filled, reset the variable back to 0 so the order is automatically cancelled on the next bar?
I just need some way to start the bar count when the order is placed.
Thanks,
Joe
Comment