2 Draw.Line and 2 PlotStyle.Triangle.
But when I see the historical one, I only appear in the last 2 lines. And the previous lines are erased.
The PlotStyle.Triangle. , they are not deleted.
How can I make it so that I can see the lines without being deleted?
Thanks.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if (State == State.SetDefaults) {
AddPlot(new Stroke(Brushes.OrangeRed, 6), PlotStyle.TriangleDown, "down");
AddPlot(new Stroke(Brushes.Blue, 6), PlotStyle.TriangleUp, "up");
}
protected override void OnBarUpdate()
{
if (CurrentBar <2)
return;
if ((Close[1] > Open[1])&&(Close[0] < Open[0]))
{
Sells[0] = Close[0]-(distindi*TickSize);
Draw.Line(this, "tag1", false, 0, High[0]-(Canttics*TickSize), -2, High[0]-(Canttics*TickSize), Brushes.OrangeRed, DashStyleHelper.Solid, 2);
}
else if ((Close[1] < Open[1])&&(Close[0] > Open[0]))
{
Buys[0] = Close[0]+(distindi*TickSize);
Draw.Line(this, "tag2", false, 0, Low[0]+(Canttics*TickSize), -2, Low[0]+(Canttics*TickSize), Brushes.OrangeRed, DashStyleHelper.Solid, 2);
}
}
[Browsable(false)]
[XmlIgnore]
public Series<double> Sells
{
get { return Values[1]; }
}
[Browsable(false)]
[XmlIgnore]
public Series<double> Buys
{
get { return Values[0]; }
}
Comment