
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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);
}
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.
This isnt working on my computer how do i go about it? I try to compile and find 38 errors