This is my code:
protected override void Initialize()
{
Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Plot0"));
CalculateOnBarClose = true;
Overlay = true;
PriceTypeSupported = false;
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
if (CurrentBar < 1)
return;
if (CrossAbove(MAEnvelope(0.5,25).LowerBand, EMA(145), 1))
DrawDot(CurrentBar.ToString(), true, 0, Low[0] - TickSize, Color.Red);
}
But it does not work. Am I referencing the MAEnvelope lowerband correctly?
Comment