What is the way to avoid this missing part?
I did it this way:
protected override void OnBarUpdate()
{
// Do not calculate if we don't have enough bars
if (CurrentBar < Period) return;
// Calculate ZeroLagHATEMA value
double value = ZeroLagHATEMA(Period) [0];
// Change color when up or down
if (Rising (ZeroLagHATEMA(Period)))
{
UpMove.Set(value);
}
else if (Falling (ZeroLagHATEMA(Period)))
{
DownMove.Set(value);
}
}
Comment