Download MetaTrader 5

TradeEventPositionOpened() is never executed.

To add comments, please log in or register
Freelance service: the safe way to order a trading robot. Try it!
Rodrigo Pandini
539
Rodrigo Pandini 2016.05.07 03:45 

You can reproduce by creating a simple EA (generate) from wizard and define that it will listen for trade events, setting the m_on_trade_process to true.

In OnInit() function, after initialize the expert, place the follow line:

ExtExpert.OnTradeProcess(true);

 After, place a breakpoint in the line 185 on CExpert.mqh 

virtual bool      TradeEventPositionOpened(void)         { return(true); }

You can see that the breakpoint is never reach.

You will also see that the CExpert::CheckTradeState(void) is executed, but TradeEventPositionOpened and similar functions are never executed.

I'm missing something?

To add comments, please log in or register