I'm loading a 1 minute DataSeries to a strategy running on 5 minute chart. I am submitting unmanaged orders to that 1 minute DataSeries within OnExecution when a trade entry execution occurs.
I have been experiencing "stop order has been ignored" problems, and you can see from the debugging info below that while the trade entry fill has occurred at 13:04:00 (it was a working stop entry order), and the order is submitted to the DataSeries 'mbip' which is set to 1 to be the 1 Minute bars, and it shows a timestamp 1 minute earlier at 13:03:00. Then there is an 'ignore' error 4 minutes earlier at 1PM. You can see the stoploss order was placed 2 ticks below the latest known price on the 1 Minute DataSeries, so it should be cool.
EXECUTION: execution='NT-00002-186' instrument='AUDUSD' account='Sim101' exchange=Default price=0.72037 quantity=1 marketPosition=Long orderId='NT-00018-186' time='2018-09-18 13:04:00' sod=False statementDate='0001-01-01'
Fill Long at 0.72037, calculating initial StopLoss 0.71948 and final Profit Target 0.72067, latest minute Close is 0.7195
18/09/2018 1:03:00 PM Strategy 'tzHighLow1/148934005': Entered internal SubmitOrderUnmanaged() method at 18/09/2018 1:03:00 PM: BarsInProgress=1 Action=Sell OrderType=StopLimit Quantity=1 LimitPrice=0.7194'8 StopPrice=0.7194'8 SignalName='LS'
Strategy 'tzHighLow1/148934005': A Sell stop order placed at '18/09/2018 1:00:00 PM' has been ignored since the stop price is greater than or equal to the close price of the current bar. This is an invalid order and subsequent orders may also be ignored. Please fix your strategy.
Is this behaviour from Ninja correct in your opinion?
Thanks,
saltminer
Comment