Expert Advisors: MQL5 Wizard - Trade Signals Based on Morning/Evening Stars + RSI - page 2

 

bool CCandlePattern::CheckPatternPiercingLine()
  {
//--- Piercing Line
   if((Close(1)-Open(1)>AvgBody(1)) && // long white
      (Open(2)-Close(2)>AvgBody(1)) && // long black
      (Close(2)>Close(1))           && // close inside previous body <<< should be "(Close(1)>Close(2)", i think>>>

      (Close(1)<Open(2))            && 
      (MidOpenClose(2)<CloseAvg(2)) && // downtrend
      (Open(1)<Low(2)))                // close inside previous body
      return(true);
//---
   return(false);
  }

 
This EA  close itself order?
 

there are logical errors in the CheckPatternMorningDoji() and CheckPatternEveningDoji() methods in the lines:

(AvgBody(2)<AvgBody(1)*0.1) && // body of the second doji candle (less than a tenth of the average body size)

и

(AvgBody(2)<AvgBody(1)*0.1) && // body of the second doji candle (less than a tenth of the average candle body size)

respectively.

Should be:

(MathAbs(Close(2)-Open(2))<AvgBody(1)*0.1) && // the body of the second doji candle (less than a tenth of the average body size)

и

(MathAbs(Close(2)-Open(2))<AvgBody(1)*0.1) && // body of the second doji candlestick (less than a tenth of the average candlestick body)

the same error has also appeared in "Class for working with candlestick patterns" https://www.mql5.com/en/code/291.

Мастер MQL5 - Класс для работы со свечными паттернами
Мастер MQL5 - Класс для работы со свечными паттернами
  • votes: 38
  • 2011.02.14
  • MetaQuotes Software Corp.
  • www.mql5.com
Класс CCandlePattern можно использовать при создании модулей торговых сигналов со свечными моделями для Мастера MQL5.
 

This isnt working on my computer how do i go about it? I try to compile and find 38 errors