- OrderSend() BUG
- How to stop a secuence in a EA
- How to check open in the market orders only
Correct. There's an issue with your check for orders logic.
I have a problem understanding the journal though...
the left journal is for the mt4 client that opened only 1 trade on the same instructions from EA
the right journal opened 2 trades on those instructions
but what confuses me, is shouldn't the right side journal have 2 sell orders? it only shows one... the top messages in the journal are the most recent messages. There is nothing above them and below that you can see that I've only just opened the mt4 clients, these are the first trades of the session
could someone explain why this happens? so I can better troubleshoot my EA
MT4 build:
2019.03.12 01:19:13.507 IC Markets MT4 build 1170 started (International Capital Markets Pty Ltd.)
Here is another example, this time of just one MT4 client running that creates 2 trades
the left side is the journal, the right side is my expert output..
I have only one OrderSend call in my EA.. I put a PrintFormat() statement just before calling it. As you can see, OrderSend was only called once, yet 2 orders appear.
It does not always happen, sometimes only 1 order appears. If I run 3 MT4 terminals with my EA (they will all open trades at the same time), then maybe 1 or 2 of the terminals will have this duplicate trade occurrence.
so I'm not entirely sure what I'm doing wrong since OrderSend was only called once.
could this be a "feature" of this particular broker's demo accounts? I tested it just now with multiple demo terminals of another broker and I'm not encountering this problem there

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use