I've been working on a fairly complex strategy involving two time frames (5min and 60min). When I back test it I get a certain result. Then I go and add another time frame to the strategy (240min). I do nothing other than add the 3rd time frame in the initialise method ie: I dont use it anywhere in the strategy. I then run the exact same back test and get a different result.
I thought maybe it was something to do with the rest of my code and the complexity of the strategy. So I created a new very simple moving average crossover strategy to test this issue, and the same thing happens. I have pasted the code below:
protected overridevoid Initialize()
{
//Add(PeriodType.Minute, 240);
this.BarsRequired = 48;
CalculateOnBarClose = true;
}
protected overridevoid OnBarUpdate()
{
if (CrossAbove(SMA(5), SMA(20), 1)
EnterLong(1);
if (CrossBelow(SMA(5), SMA(20), 1)
EnterShort(1);
}
What is going on? Is this correct behaviour? It is causing Massive result differences in my real strategy.
thanks.
Comment