My Code snippets:
public class MyCustomStrategy : Strategy
...
private EMA myEMA;
//
protected override void OnStateChange()
...
if (State == State.Configure)
{
AddDataSeries(Data.BarsPeriodType.Minute, 1);
}
...
if (State == State.SetDefaults)
...
if (State == State.Historical)
{
myEMA = EMA(8); // 8 EMA?
}
//
protected override void OnBarUpdate()
...
if ( Close[0] < myEMA[0] ) // <---- this is my issue. Want to see if the current "Close" closed below the 8 minute EMA.
...

Comment