I would like that my strategy open a position like this:
protected override void Initialize()
{
Add(PeriodType.Tick, 1);
CalculateOnBarClose = false;
}
protected override void OnBarUpdate()
{
if (BarsInProgress == 0)
{
if (Close[1]>Open[1] && Open [0]>=Close[1])
EnterShort(1,"");
}
if (BarsInProgress == 1)
{
return;
But it doesn't open the position untili the following bar. What I want is that if the open of the current Bar is higher than the Close of the previous bar, it immediately opens a position, but it waits till the following bar.
What should I do?
Thanks
Sincerely
Comment