Using and modifying the VolumeUpDown indicator....
The indicator is in a new Panel...Panel 2
I want to write text above each volume bar and eventually under certain conditions...
My code is this....
protectedoverridevoid Initialize()
{
Add(new Plot(new Pen(Color.Lime, 2), PlotStyle.Bar, "UpVolume"));
Add(new Plot(new Pen(Color.Red, 2), PlotStyle.Bar, "DownVolume"));
Add(new Line(Color.DarkGray, 0, "Zero line"));
}
protectedoverridevoid OnBarUpdate()
{
if (Close[0] >= Open[0])
{
Values[0].Set(Volume[0]);
Values[1].Reset();
cntrGreen=cntrGreen + 1; //Declared variable earlier
cntrRed=0;
// Draw number above Volume bar.
DrawText("Volume" + CurrentBar,false,cntrGreen.ToString(),0,Volumebar?,0,Color.Blue,new Font("Arial",7,FontStyle.Regular),
StringAlignment.Center,Color.Empty,Color.Blue,5);
}
else
{
Values[1].Set(Volume[0]);
Values[0].Reset();
cntrRed=cntrRed + 1;
cntrGreen=0;
}
I'm not sure how to access the Panel2 to write the text above the completed volume bar?
Help would be appreciated
Thanks
Bruce
Comment