I made simple filter, but tester doesn't work and I don't know why (4 versions). There are not any errors. Assumptation is if the day before closed higher than SMA (daily close) go long on the TF 5M.
Thank you.
Code below:
protected override void Initialize()
{
Add("$EURUSD",PeriodType.Minute,5);
Add("$EURUSD",PeriodType.Day,1);
CalculateOnBarClose = true;
}
protected override void OnBarUpdate()
{
int ABC=1234;
if (GetCurrentAsk()>1234)
// nor if (GetCurrentAsk()>1234 && Closes[2][1] > SMA(BarsArray[2],21)[1])
// nor if (Closes[1][1]>1234 && Closes[2][1] > SMA(BarsArray[2],21)[1])
// nor if (CurrentDayOHL().CurrentHigh[1]>1234)
{
EnterLong();
}
}
Comment