My primary bar is 5 minute and my secondary is 1 tick.
As a beginning, I want to enter 1 tick above the high of the previous 5 minute bar and reverse for a short when price is 1 tick below the low of the previous 5 minute bar. Please see the attachment. I had to make a couple of assumptions about what happened first on the bars but hopefully you get the idea.
I thought the following would work but it doesn't. The entry occurs at the close of the 5 minute bar. I thought this would produce an intrabar entry of the 5 minute bar. How do I fix this so I get the intrabar entry I want?
if (Closes[1][0] > High[1])
EnterLong(1,1,"Long");
else if (Closes[1][0] < Low[1])
EnterShort(1,1,"Short");

Comment