I have an EA that checks the pivot points just before entering a trade the EA checks the price is X amount plus twice the spread from the nearest pivot point, this is done on the final (trade candle in the pattern).
I have tried to implement it on the first candle in the pattern which works for long trades but it doesn’t see the lines on a short trade.
For a long trade it is necessary to check the nearest pivot above and for a short trade, the nearest pivot below.
The “if” statement for this is on lines 298 and 326.
Basically I need the E modified to allow the check to be done the first candle