There is no coding error but it doesn't execute.
protected override void Initialize()
{
CalculateOnBarClose = true;
Add(PeriodType.Minute, 240);
}
protected override void OnBarUpdate()
{
if (BarsInProgress == 1)
{
if (
Close[0] > EMA(Close, 14)[0] // CONDITIONS IN LARGER TIME FRAME LIKE 240-MINUTE
)
{
if (BarsInProgress == 0)
{
if (CrossAbove(Close, EMA(Close, 14), 1)) // CONDITIONS IN SMALLER TIME FRAME LIKE 60-MINUTE
{
EnterLong(1, "");
}
}
}
}
}
Comment