Can anyone help me figure out why this is plotting one line? I'm trying to plot three -- one on the highs, one on the open, one on the low.
As is, the indicator traces one line.
Thanks.
----------------------------------------------------------------------
#region Variables
// Wizard generated variables
// User defined variables (add any user defined variables below)
#endregion
///<summary>
/// This method is used to configure the indicator and is called once before any bar data is loaded.
///</summary>
protectedoverridevoid Initialize()
{
Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "High"));
PriceType = PriceType.High; //Indicator will use high prices for calculations
Add(new Plot(Color.FromKnownColor(KnownColor.Green), PlotStyle.Line, "Open"));
PriceType = PriceType.Open; //Indicator will use open prices for calculations
Add(new Plot(Color.FromKnownColor(KnownColor.DarkViolet), PlotStyle.Line, "Low"));
PriceType = PriceType.Low; //Indicator will use low prices for calculations
CalculateOnBarClose = true;
Overlay = true;
}
///<summary>
/// Called on each bar update event (incoming tick)
///</summary>
protectedoverridevoid OnBarUpdate()
{
// Use this method for calculating your indicator values. Assign a value to each
// plot below by replacing 'Close[0]' with your own formula.
High.Set(EMA(High, 34)[0]);
Open.Set(EMA(Open, 34)[0]);
Low.Set(EMA(Low, 34)[0]);
}
#region Properties
[Browsable(false)] // this line prevents the data series from being displayed in the indicator properties dialog, do not remove
[XmlIgnore()] // this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove
public DataSeries High
{
get { return Values[0]; }
}
[Browsable(false)] // this line prevents the data series from being displayed in the indicator properties dialog, do not remove
[XmlIgnore()] // this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove
public DataSeries Open
{
get { return Values[1]; }
}
[Browsable(false)] // this line prevents the data series from being displayed in the indicator properties dialog, do not remove
[XmlIgnore()] // this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove
public DataSeries Low
{
get { return Values[2]; }
}
#endregion
Comment