there is an issue with executing orders on daily bars.
I am using daily bars which are build from minute bars. The setting is 1440 minutes for the daily bar. Break at EOD is also set to true.
If you run the attached strategy you will see an message like this in the NS Output:
16.12.2019 23:00:00 Strategy 'StartOfDayTradingTest/251632721': Entered internal SubmitOrderManaged() method at 16.12.2019 23:00:00: BarsInProgress=0 Action=Buy OrderType=Market Quantity=1 LimitPrice=0 StopPrice=0 SignalName='L' FromEntrySignal=''
16.12.2019 23:00:00 Strategy 'StartOfDayTradingTest/251632721': Cancelled order due to end of session handling: BarsInProgress=0, orderId='NT-00245-304' account='Sim101' name='L' orderState=Working instrument='ES 03-22' orderAction=Buy orderType='Market' limitPrice=0 stopPrice=0 quantity=1 tif=Gtc oco='' filled=0 averageFillPrice=0 onBehalfOf='' id=-1 time='2019-12-16 23:00:00' gtd='2099-12-01' statementDate='2021-12-22'
That means that the order got cancelled before it was executed on the "internal market". I think there is no reason why it is not executed. The EOD should come AFTER the execution signal at the beginning of the bar.
If you add the 1 minute data series and use the code in the comments, it will work perfectly. Although the signal is generated 1 minute after opening.
My suggestion is to modify the back test logic and let the signal at the beginning of the day be executed.
Thanks,
Klaus
Comment