Bullish Engulfing is not nice

 

Hy, 

my engulfings are not correct, here is my function, does anyone know the correct function ..

int isBullish_Engulfing(int shift)
  {
  return (
     Body(shift + 1) < 0.0 &&
     Body(shift) > 0.0 && 
     BodyBottom(shift) < BodyBottom(shift + 1) &&
     BodyTop(shift) > BodyTop(shift + 1) &&       
     LongCandle(shift))
     ;
  } 

int isBearish_Engulfing(int shift)
  {
   return (
Body(shift + 1) > 0.0 &&
Body(shift) < 0.0 &&
BodyBottom(shift) < BodyBottom(shift + 1) &&
BodyTop(shift) > BodyTop(shift + 1) &&
LongCandle(shift))
;
  } 
 
swifty:

Hy, 

my engulfings are not correct, here is my function, does anyone know the correct function ..

Hello swifty,

Please take a look at this example of bullish engulfing: https://www.mql5.com/en/code/307

I hope this helps. 

Regards,
Malacarne 

MQL5 Wizard - Trade Signals Based on Bullish Engulfing/Bearish Engulfing + MFI
MQL5 Wizard - Trade Signals Based on Bullish Engulfing/Bearish Engulfing + MFI
  • votes: 14
  • 2011.03.10
  • MetaQuotes Software Corp.
  • www.mql5.com
Trade signals based on "Bullish Engulfing/Bearish Engulfing" candlestick pattern, confirmed by Market Facilitation Index (MFI) indicator is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.