I am struggling to find the error in my code. The BuyLong condition is satisfied on bar 36 but for some reason the markers are inaccurate(showing buy at bar 27). The buy price is correct however. Any ideas why this could be happening?
if(barmove<=IntInput1 && barmove>=IntInput2)
{
int cur=newbar.curbar; (This shows as 36 in my class)
int checkbar=CurrentBar; (Current bar shows 36)
double checkclose=Closes[1][0]; (Close price is 4620.75)
EnterLong(BarsInProgress,Convert.ToInt32(DefaultQu antity), "");
}
But somehow ,the position of the marker is off and shows buy at bar 27 @ closing price of 4621.50. The text position is inaccurate as well showing buy @4260.75. lease see attached image above.
I'd appreciate your input. Thanks
P.S- I just figured it out. It has to do with the ticks skipping a few price levels . Every tick does not move in 0.25 increments. It can jump from 0.25- 1.25 which was causing the issue. Thanks anyway

Comment