On both strategies, the primary series = 60 min and secondary = 60 min. Primary and secondary series are the same instrument.
Strategy 1
protected override void OnBarUpdate()
{
if (BarsInProgress != 1)
return;
SetProfitTarget("", CalculationMode.Ticks, 10);
if (Falling(HMA(BarsArray[1],Length)))
{
ExitLong("XL", "EL60");
}
if (Rising(HMA(BarsArray[1],Length)))
{
ExitShort("XS", "ES60");
}
if (Rising(HMA(BarsArray[1],Length)))
{
EnterLong(1, 1, "EL60");
}
if (Falling(HMA(BarsArray[1],Length)))
{
EnterShort(1, 1, "ES60");
}
}
protected override void OnBarUpdate()
{
if (BarsInProgress != 0)
return;
SetProfitTarget("", CalculationMode.Ticks, 10);
if (Falling(HMA(BarsArray[0],Length)))
{
ExitLong("XL", "EL60");
}
if (Rising(HMA(BarsArray[0],Length)))
{
ExitShort("XS", "ES60");
}
if (Rising(HMA(BarsArray[0],Length)))
{
EnterLong(0, 1, "EL60");
}
if (Falling(HMA(BarsArray[0],Length)))
{
EnterShort(0, 1, "ES60");
}
}

Comment