Relevant code:
// In class
private int TrendMAPeriod = 89;
// In OnStateChange() State == State.SetDefaults
IsOverlay = true;
DrawOnPricePanel = true;
DisplayInDataBox = false;
AddPlot(new Stroke(Brushes.MediumBlue, 1), PlotStyle.Line, "Trend MA");
// In OnBarUpdate
TrendMA[0] = EMA(TrendMAPeriod)[0];
// In properties
[Browsable(false)]
[XmlIgnore()]
public Series<double> TrendMA
{
get { return Values[0]; }
}
Comment