Você está perdendo oportunidades de negociação:
- Aplicativos de negociação gratuitos
- 8 000+ sinais para cópia
- Notícias econômicas para análise dos mercados financeiros
Registro
Login
Você concorda com a política do site e com os termos de uso
Se você não tem uma conta, por favor registre-se
Dear all,
I'm developing EAs by processing OnTradeTransaction events. Everything ran fine until tomorrow when an opened position was stopped after price reaching SL. Through my logs I verified my EA received an TRADE_TRANSACTION_DEAL_ADD event twice. To clarify (and facilitate my debuging processing), I simultaneouly ran a simple EA in a different timeframe (in parallel with the EAs I developed) that captured all events happening in MT5 (it is attached in this topic).
The events captured by this simple EA are here:
...
QQ 0 13:27:32.068 test_tradetransaction (XAUUSD,H1) type = ORDER_ADD order=#501163722 symbol=XAUUSD order_type=ORDER_TYPE_BUY order_state=ORDER_STATE_STARTED price=4853.550000 price_sl=0.000000 price_tp=0.000000 volume=0.010000 position=#501089347 position_by=#0
ON 0 13:27:32.082 test_tradetransaction (XAUUSD,H1) type = ORDER_DELETE order=#501163722 symbol=XAUUSD order_type=ORDER_TYPE_BUY order_state=ORDER_STATE_FILLED price=4853.550000 price_sl=0.000000 price_tp=0.000000 volume=0.000000 position=#501089347 position_by=#0
DP 0 13:27:32.084 test_tradetransaction (XAUUSD,H1) type = HISTORY_ADD order=#501163722 symbol=XAUUSD order_type=ORDER_TYPE_BUY order_state=ORDER_STATE_FILLED price=4853.550000 price_sl=0.000000 price_tp=0.000000 volume=0.000000 position=#501089347
QE 0 13:27:32.094 test_tradetransaction (XAUUSD,H1) type = DEAL_ADD, deal=#326549189 order=#501163722 symbol=XAUUSD deal_type=DEAL_TYPE_BUY price=4853.790000 price_sl=4853.550000 price_tp=0.000000 volume=0.010000 position=#501089347 position_by=#0 entry=DEAL_ENTRY_OUT
KS 0 13:27:32.094 test_tradetransaction (XAUUSD,H1) type = DEAL_ADD, deal=#326549189 order=#501163722 symbol=XAUUSD deal_type=DEAL_TYPE_BUY price=4853.790000 price_sl=4853.550000 price_tp=0.000000 volume=0.010000 position=#501089347 position_by=#0 entry=DEAL_ENTRY_OUT
...
These results were extracted from a MT5 client provided by Five Percent Online Ltd (www.the5ers.com) - I suppressed other log messages to emphasize the problem. It is important to mencioned that I ran the same environment (EAs, Indicators, scripts) in other MT5 clients (the one you download from official MT5 website, the one provided by FTMO Global Markets Ltd (www.ftmo.com), in parallel way (same time, same machine, different accounts) and I did not observed such behavior.
My question is: is it possible to have duplicated events coming from the server? In what circunstance this happens? Do I need to check additional information from this deals to differentiated them?
I could expect missing events in high load environments due to the size of the MT5 client event queue, but duplicated messages?
Thanks in advance.
Marcelo