Simple candle stick pattern EA issue
hi Tnil i got the same error did you find the way fixing this no pointer issue?
thanks
Your code m_candle.InitIndicators();Requires a CIndicators to work. bool CCandlePattern::InitIndicators(CIndicators *indicators)
-
if(m_candle.CheckCandlestickPattern(CANDLE_PATTERN_BULLISH_ENGULFING) == true)
You should be able to read your code out loud and have it make sense. You would never write if( (2+2 == 4) == true) would you? if(2+2 == 4) is sufficient. So don't write if(bool == true), just use if(bool) or if(!bool). Code becomes self documenting when you use meaningful variable names, like bool isLongEnabled where as Long_Entry sounds like a trigger price or a ticket number and “if long entry” is an incomplete sentence.
I'm working on developing a pattern based entry using this class: https://www.mql5.com/en/code/291
The code for my EA is simple:
However the result I get in the strategy tester is: invalid pointer access in 'CandlePatterns.mqh' (62,64)
I'm sure I'm missing something here but I cant figure out what, I'm studying up on C++ but my background in coding comes from Basic >.<
Any bit of help is greatly appreciated.