I have very simple multi time frame strategy.I use SMA cross over in 10 min. chart, but
also I need daily MACD as a filter. My problem is when I do optimization for exapmle
for 6 month period and it starts 1.1.2009 to 6.30.2009. In the optimization results I never get the results for the first month. It always starts trading in this case from 2.1.2009. What am I missing in order that my strategy trades from the begining of the optimization period. My startegy is bellow:
protected override void Initialize()
{
SetStopLoss("LONG", CalculationMode.Ticks, Stop, false);
Add(PeriodType.Day , 1); //BarsArray[1]
Add(MACD(12, 26, 9));
CalculateOnBarClose = true;
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
// Condition set 1
if (CrossAbove(SMA(Slow), SMA(Fast), 1)
&& MACD(BarsArray[1], 12, 26, 9).Diff[1] > 0)
{
EnterLong(DefaultQuantity, "LONG");
}
// Condition set 2
if (RSI(14, 3).Avg[0] > RsiValue)
{
ExitLong("PROFIT", "LONG");
}
}
Thanks
Comment