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
I have a problem using OrderSendAsync()
I have a test EA I made, it is generated from the wizard as a template and these handlers are added (see below)
It works.. what does "it works" mean? It means that the trade is placed, I get a retcode of TRADE_RETCODE_PLACED and then I get messages from OnTradeTransaction() on the Experts tab that culminate in a final one that displays the order #
However, my problem is that I have a much longer EA.. my actual EA that also calls OrderSendAsync() and the trade also is placed.. and the TRADE_RETCODE_PLACED is also received.
and the OnTradeTransaction() is exactly as written below. So the same in both EAs.
BUT... in my "real EA", it never fires. I get no Printed Order messages from OnTradeTransaction().
Just to be clear, the trade appears in the terminal - however - there is no subsequent firing of OnTradeTransaction() - so I'm stuck now, don't know how to proceed.
Can anyone think of anything that might cause this event not to fire?
The EA is still running because it can place trades again afterwards.. but they will also not show OnTradeTransaction() Print messages