My strategy uses Tick Replay and Calculates OnPriceChange and uses two Data Series. The primary Data Series changes between a High Time Series or a High Tick Series based on what indicators I use and the Secondary Series is always 1 Tick for intra-bar fills and events. I will give a simple example of how my strategy operates:
--------------------------------------------------------------------------------------
private double Benchmark;
private double StartTime = 93000 (HHMMSS)
if (State == State.Defaults)
{
Calculate = Calculate.OnPriceChange;
Slippage = 0;
OrderFillResoultion = Standard;
}
else if (State == State.Configure)
{
//Primary Data Series is 30 Min
AddDataSeries(Data.BarsPeriodType.Tick, 1);
}
OnBarUpdate()
{
if (BarsInProgress == 0)
{
if ((ToTime(Time[0]) == StartTime))
{
Benchmark = Open[0]; //Algo captures the open price of 9:30 Bar as key value to base its trading, other logic is added to have this value calculated only once for the rest of the trading day
}
//Secondary Series (1 Tick) is used for intra bar trading
If (GetCurrentBid(1) && Ask(1) >= (Benchmark + (4 * TickSize)))
{
EnterLong(1, xxx, xxx, ...);
}
if (Position.MarketPosition == MarketPosition.Long)
{
if (GetCurrentBid(1) && Ask(1) <= Benchmark)
{
ExitLong(1, xxx, xxx, ...)
}
}
}
}
--------------------------------------------------------------------------------------
This setup has shown great results in backtests when primary BIP is the 30min; however out of curiosity I changed the Primary Series to the 1 Tick, still keeping The secondary 1tick for entries and exits, to see if results would be the same. My "StartTime" value was changed to 90000 (9:00AM) so that it returns the same "Benchmark" as it would when returning the Open[0] of the 9:30AM Bar with the 30 Minute Series. The "Benchmarks" return exactly the same but it turns out that the trading is definitely not the same as I see worse results. I believe the version using the 1tick as the primary BIP is the most accurate since I can actually see how the trading is happening tick by tick.
My main question is this: Based on the example above, How would one go about returning the same trading results using Higher Time/Tick Series as I do when performing all logic solely on a 1 Tick Data Series?
I read that the higher time series should always be set to the primary BIP, so I would like to use the higher time frame just to get the benchmark value, and then preform all other logic on the 1 tick but I haven't figured out how to write this in my code.
Since testing using primary BIP of 1 Tick has given the most accurate results and the tick data used should be the same all the way around either using 30mins or 1tick, I want to produce the exact same results when using a Higher Time/Tick Series as the primary for backtesting as it makes a more pragmatic approach when using indicators and studying results over longer testing periods.

Comment