Hi Antisyzygy,
I've been trying to get the following issue addressed in NT forum but no luck.
I have looked at their reference code and all the docs.
I appreciate if you could shed some light.
Unexpected behavior of OnOrderUpdate() calls with Intrabar data
Although I am using Intrabar data (1Min), the OnOrderUpdate() was always called on the main time frame (60Min)
Here are the specifics:
Instrument: ES ##-##
Main Time Frame = 60 Min
Secondary Time Frame = 1 Min
Bar in question was on 11/16/2012 at 11:30 AM
The Buy order was filled at 1350.75 at time 11:30AM
The Profit target was filled at 1354.75 at time 11:30AM
Looking at the 1Min Chart, I see that the 1354.75 level was not touched until 12:16PM
So, it looks like the OnOrderUpdate() is called only on the 60Min time frame. I expect
OnOrderUpdate() to be called around time 12:16PM based on the 1Min data.
I printed 'Time[0]' at the beginning of OnOrderUpdate(). Here are the fills of the Buy and the Profit Target:
OnOrderUpdate Time: 11/16/2012 11:30:00 AM
IOrder Order='NT-00081/Sim101' Name='Buy' State=Filled Instrument='ES ##-##' Action=Buy Limit price=0
Stop price=0 Quantity=1 Strategy='RKMTest' Type=Market Tif=Gtc
Oco='' Filled=1 Fill price\
=1350.75 Token='27ebb46b1e1f48589cfab756b19f1d66' Gtd='12/1/2099 12:00:00 AM'
OnOrderUpdate Time: 11/16/2012 11:30:00 AM
IOrder Order='NT-00083/Sim101' Name='Profit target' State=Filled Instrument='ES ##-##' Action=Sell Limit price=1354.75 Stop price=0 Quantity=1 Strategy='RKMTest' Type=Limit Tif=Gtc Oco='NT-00\
050-4323' Filled=1 Fill price=1354.75 Token='8ce78dd643fc489093af083bda429056' Gtd='12/1/2099 12:00:00 AM'
The Code for the strategy is attached.