Help Please ! Simple code for entering position based on pips above below entry.

To add comments, please log in or register
Michael Green
470
Michael Green  

I have developed a 1 hour ea that works fine, however I am looking to add to positions if they are trade positive by x pips over the 5 minute time frame. I am having trouble trying to work out a simple way of configuring this:

double PriceAdjust=(iHigh(NULL,PERIOD_M5,1)+iLow(NULL,PERIOD_M5,1))/2;
      double Pips=(base+pips); 
      //double AcPrice=(High[1]+Low[1])/2;
      double MovementPlus=(pips+5);
      double MovementMinus=(pips-5);
      double HourSignal=(Price>Ema1hr_200 && Cci<100 && Fib5H1>Fib8H1 && Fib8H1>Fib13H1 && SarBackH1>SarH1 && SarH1<Price && MacdAdjustedH1>MacdAdjustedBackH1);
      
      //Did it make an up arrow on candle 1?

      //if(Price>Ema1hr_200 && Cci<100 && Fib5H1>Fib8H1 && Fib8H1>Fib13H1 && SarBackH1>SarH1 && SarH1<Price && MacdAdjustedH1>MacdAdjustedBackH1)
         if(PriceAdjust>=HourSignal+pips+base)

base being a chosen input.

Any ideas would be appreciated thanks...

To add comments, please log in or register