Philadelphia PA
Experience: Intermediate
Platform: ts
Trading: es
Posts: 7 since Feb 2011
Thanks Given: 2
Thanks Received: 3
|
On each new bar I check for a condition and if true I start a new line
also on each new bar I extend any previous lines
protected override void OnBarUpdate()
{
if (CurrentBar != previousBar)
{
if (somecondition)
{
DrawLine(tag, true, 0, price, 0, price, Color.Green, DashStyle.Dash, 3);
}
foreach (IDrawObject o in DrawObjects)
{
ILine line = o as ILine;
if (line != null) line.EndBarsAgo = 0;
// if (line != null) line.EndTime = Time[0];
}
.
.
.
previousBar = CurrentBar; // previousBar is an instance class variable
}
}
This works up to a certain point but then after that point the lines stop extending.
Is this a bug in Ninja Trader? Do I need to set line.EndTime = Time[0] instead of or in addition to line.EndBarsAgo = 0?
Thanks
|