i need a little help with this Indicator:
protected override void Initialize()
{
Add(new Plot(new Pen(Color.DarkGreen, 5), PlotStyle.Bar, "UpVol"));
Add(new Plot(new Pen(Color.Red, 5), PlotStyle.Bar, "DnVol"));
Add(new Plot(new Pen(Color.Black,1), PlotStyle.Bar, "Lower"));
Add(new Plot(new Pen(Color.Yellow,3), PlotStyle.Bar, "Greater"));
CalculateOnBarClose = true;
Overlay = false;
PriceTypeSupported = false;
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
// Use this method for calculating your indicator values. Assign a value to each
// plot below by replacing 'Close[0]' with your own formula.
if(Close[0] > Open[0])
UpVol.Set(Volume[0]);
else
DnVol.Set(Volume[0]);
HighVolume = MAX(Volume, Period)[1];
if(Volume[0] > HighVolume)
Lower.Set(Volume[0]);
else
Greater.Set(Volume[0]);
}
Please help.

Well, that's the original ONE-COLOR line. I want this line with 3 colors: falling, flat and rising... I just use Adx as Dataseries. For ploting, I use ADXup, ADXdown and ADXmed. I can compile my code without error. But the indicator doesn't plot and leave a message in the Log.
Comment