I have a query, I have an indicator that is working.
And mark the points in the table.
What I need is that when you start the next bar, also place the point at the same price level.
Since "Sells[-1]" can not be placed.
I do not know how to do it.
Thanks.
protected override void OnBarUpdate()
{
if (CurrentBar <3)
return;
{
if ((Close[1] > Open[1])&&(Close[0] < Open[0]))
{
Sells[0] = Close[0]-(2*TickSize);
}
else if ((Close[1] < Open[1])&&(Close[0] > Open[0]))
{
Buys[0] = Close[0]+(2*TickSize);
}
}
}
Comment