I have the following codes compiled ok but the plots are not showing on the chart. Please help.
Thanks in advance.
T2010a
protected override void Initialize()
{
Add(new Plot(new Pen(Color.RoyalBlue, 2), PlotStyle.Bar, "UpVolume"));
Add(new Plot(new Pen(Color.Red, 2), PlotStyle.Bar, "DownVolume"));
Add(new Line(Color.DarkGray, 0, "Zero line"));
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
if (Volume[0] > Volume[1])
{
Values[0].Set(Volume[0]);
Values[1].Reset();
}
else if (Volume[0] < Volume[1])
{
Values[1].Set(Volume[0]);
Values[0].Reset();
}
else
{
Values[1].Reset();
Values[0].Reset();
}
}


Comment