It's not working.
Why does this only plot one line and not 3 nearly parallel ones? Actually, it seems to print all 3 lines right on top of each other...
protected override void Initialize()
{
Add(new Plot(Color.FromKnownColor(KnownColor.DarkGreen), PlotStyle.Line, "WaveHi"));
Add(new Plot(Color.FromKnownColor(KnownColor.DimGray), PlotStyle.Line, "WaveMid"));
Add(new Plot(Color.FromKnownColor(KnownColor.DarkRed), PlotStyle.Line, "WaveLow"));
PriceTypeSupported = true;
Overlay = true;
}
protected override void OnBarUpdate()
{
WaveHi.Set(CurrentBar == 0 ? High[0] : High[0] * (2.0 / (1 + wavePeriod)) + (1 - (2.0 / (1 + wavePeriod))) * Value[1]);
WaveMid.Set(CurrentBar == 0 ? Close[0] : Close[0] * (2.0 / (1 + wavePeriod)) + (1 - (2.0 / (1 + wavePeriod))) * Value[1]);
WaveLow.Set(CurrentBar == 0 ? Low[0] : Low[0] * (2.0 / (1 + wavePeriod)) + (1 - (2.0 / (1 + wavePeriod))) * Value[1]);
}
Comment