kkidyba :
Hi, I am just trying to made Expert Advisor based on " MACD Sample" from mql5 examples. It is kind of ema cross, but with low price ema and high price ema, I made it in different way, but without possibility of changing inputs. After changes high ema and low ema aren't apperating on chart and Expert Advisor isn't making any transactions during test. Could you tell me what is wrong with this code? Code in appendix.
<*ex*.* file deleted>
You must attach an open source - * .mq5 file.
Vladimir Karputov:
Ok, sorry I don't know why it just deleted itself.
You must attach an open source - * .mq5 file.
You forgot to initialize the handles:
//+------------------------------------------------------------------+ //| Constructor | //+------------------------------------------------------------------+ CSampleExpert::CSampleExpert(void) : m_adjusted_point(0), m_handle_macd(INVALID_HANDLE), m_handle_ema(INVALID_HANDLE), m_handle_high(INVALID_HANDLE), m_handle_low(INVALID_HANDLE), m_macd_current(0), m_macd_previous(0), m_signal_current(0), m_signal_previous(0), m_ema_current(0), m_ema_previous(0), m_low_current(0), m_low_previous(0), m_high_current(0), m_high_previous(0), m_macd_open_level(0), m_macd_close_level(0), m_stop_loss(0) {
Vladimir Karputov:
ooooo my god thany you so much bosss
You forgot to initialize the handles:
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
Hi, I am just trying to made Expert Advisor based on "MACD Sample" from mql5 examples. It is kind of ema cross, but with low price ema and high price ema, I made it in different way, but without possibility of changing inputs. After changes high ema and low ema aren't apperating on chart and Expert Advisor isn't making any transactions during test. Could you tell me what is wrong with this code? Code in appendix.