If you want help you should post code that can be compiled and tested.
Hi Alain,
You can reproduce my situation 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 see that the CExpert::CheckTradeState(void) is executed, but TradeEventPositionOpened and similar functions are never executed.
I'm missing something?
Someone?
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'm new in mql5 and I'm trying to following the docs to listen the position opened "event".
The functions like TradeEventPositionOpened() and TradeEventPositionClosed() are never executed.
But the functions like TradeEventOrderTriggered() and TradeEventPositionStopTake() are executed.
For now, I'm overriding the TradeEventOrderTriggered() and checking if there is some position opened.
I'm missing something?
Just for test, I have the follow code:
When I debug, the execution never go to this part of CExpert::CheckTradeState() function: