Download MetaTrader 5
To add comments, please log in or register
Launch your trading signal. Make profit from paid subscription!
Gerardo Bustos
746
Gerardo Bustos 2015.04.05 04:02 

Hello forum, good day.

I need help from more experienced MQL programmers to detect a Bullish/Bearish engulfing and would like to know about your opinions and what would be the best way to do it. I´m using the following code to try and detect a Bullish engulfing:

 

// Bullish engulfing
   (Close[1] > Open[1])
&& (Close[1] > Close[2] && Close[1] > Open[2])
&& (Open[1] < Open[2] && Open[1] < Close[2])
&& (lowest_low_1 < lowest_low_2 && highest_high_1 > highest_high_2)


I´m also trying to know if the previous bar closes in the top/bottom 25% of the bar behind the previous one, this is what I´m using:

 

// Top 25%
Close[1] >= ( ( High[2] + Low[2] ) / 4 ) * 3

// Bottom 25%
Close[1] <= ( High[2] + Low[2] ) / 4


Your help will be much appreciated. 

 

Best regards and thank you in advance,

codeMolecules 

/
To add comments, please log in or register