I have a strategy that has 3 timeframes (i.e. AddDataSeries) and has trade logic on the Shortest and Medium timeframes. All Bars Objects are on the same instrument.
for instance:
BaseChart--> Shortest Timeframe: 500 Tick .. BarsArray[0]
AddDataSeries --> Medium Timeframe: 2500 Tick .. BarsArray[1]
AddDataSeries --> Longer Timeframe: 25000 Tick .. BarsArray[2]
I am using OnExecutionUpdate() to monitor the trades and place ExitLongStopMarket and ExitShortStopMarket orders. The first iteration sends orders to the BarsArray the order was generated. Therefore, I would look at the BarsInProgress variable when inside of OnExecutionUpdate() to determine where to get the Stop price from. This worked correctly.
Now when backtesting my fill resolution was poor. So I added another 1 Tick DataSeries, BarsArray[3]. Then inside of OnBarsUpdate() I would simply return when BarsInProgress == 3 as in
//Do Not process the Granular Resolution BarsArray used to submit Orders if (BarsInProgress == 3) return;
The problem is that when I am in the OnExecutionUpdate() the BarsInProgress always is always 0 (BarsInProgress == 0). Why is it not == 3 ??
Second Question:
When Strategy is trading live is it correct that there is no benefit to sending Orders to a 1 Tick Bars Object and therefore should not be in a live Strategy ?
Third Question:
When using the Market Replay connection is there any order Fill improvement in accuracy when using the 1 Tick Bars Object?
Fourth Question:
Does the order that each BarsArray get loaded affect the Fill Resolution? For instance, I have the BarsArray[0] (ex: 500 Tick) sending Orders to BarsArray[3] (1 Tick) and BarsArray[1] (2500 Tick) sending Orders to BarsArray[3] (1 Tick) and the BarsArray[2] (25000 Tick) is just used for Filtering Indicators.
Thanks,
ATC
Comment