Fractals question

 

Hi all! I have been running tests with fractals indicator. I have been able to use the following combinations for ordersignals...

None of the combinations below support an effective signal for what I intend to do. My intentions are to use the fractals indicator at shift 0. Not 2 or 3. I believe that the fractal indicator is drawn on shift 1, so there must be a way to begin an order signal at shift 0 after the fractal upper OR lower is drawn at shift 1.

Does anyone know a way to use the fractals indicator for signals at shift 0 right after the fractals upper/lower is drawn at shift 1?

EXAMPLE: if fractal()blahdie,blahdie,blah **SHIFT1** UPPER is drawn, at shift 0 SEND A BUY/SELL order.

Thank you! :)

if(iFractals(NULL, 0, MODE_UPPER, 2)>Close[0]){ // send an order; :)
if(iFractals(NULL, 0, MODE_LOWER, 3)>Close[0]){ // send an order; :)

if(iFractals(NULL, 0, MODE_UPPER, 2)>(iFractals(NULL, 0, MODE_UPPER, 1))){ // send an order; :)
if(iFractals(NULL, 0, MODE_LOWER, 2)>(iFractals(NULL, 0, MODE_LOWER, 1))){ // send an order; :)





 

https://www.mql5.com/en/code/7982

To determine a fractal the code uses

      bFound=false;
      dCurrent=High[i];
      if(dCurrent>High[i+1] && dCurrent>High[i+2] && dCurrent>High[i-1] && dCurrent>High[i-2])
        {
         bFound=true;
         ExtUpFractalsBuffer[i]=dCurrent;
a minimum of five bars
 
Thanks much Ickyrus :)
Reason: