Skip to content

Q & A 25 | High pivot order next bar question

Q&A 25 looks at the behavior of an order to buy next bar at market after a high pivot.

In the first case ‘Intrabar order generation’ is set to FALSE. In this case the order is issued on the last bar of the formation to enter next BAR.

In the second case, ‘Intrabar order generation’ is set to TRUE. In this case, provided the high of the third bar in the formation being formed is less than the high of the middle bar, the order is issued next TICK (rather than bar). The problem with this is that the bar is still being formed, and, by the the end of the bar, its high may be higher than the high of the middle bar, hence invalidating the pattern.

Once ClearPrintLog;If LastBarOnChart and H[1] > H[0] and H[1] > H[2] then Buy Next Bar at Market;
// i.e. the high of the middle bar is higher than the highs of the bars on either sidePrint( D, T, ” H[1] “, H[1]:5:5, ” H[2] “, H[2]:5:5, ” H[0] “, H[0]:5:5, ” H “,H:5:5, ” H[1] > H[0] and H[1] > H[2] “, H[1] > H[0] and H[1] > H[2] );