Ema Cross, nothing is happening
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.
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) {
You forgot to initialize the handles:
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.