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
It would be better to write a separate function for waiting, so that the standard trading class could be used as well.
Forum on trading, automated trading systems and strategy testing
Features of mql5 language, subtleties and tricks
fxsaber, 2017.02.25 16:02
If you want to make all OrderSend synchronized with the trading environment and avoid the pitfalls, it is sufficient to make this source code as an mqh-file and do the corresponding #include in your programs.
Things are much easier. Before sending the order, I memorized the length of the history, and after sending it, I waited for the history length to increase. A timeout should be entered, so that suddenly it would not be stuck forever.
There is a timeout. In your version, unfortunately, there may be problems if several OrderSends work together (from different Expert Advisors).
Would ORDER_MAGIC help in this situation? Just to check the history of your EA?
Wouldn't ORDER_MAGIC help in this situation? Just to check the history of my Expert Advisor?
Forum on trading, automated trading systems and trading strategies testing
Features of mql5 language, tips and tricks
fxsaber, 2017.02.25 17:29
Also, not only history is not synchronized, but also SL/TP of open positions/orders, etc.
For marques, the history can only increase by an order at first, and then a moment later by a trade.
In addition, ORDER_MAGIC is already a history request. In other words, you can't just wait for the history to increase, as was suggested earlier.
I don't quite understand why we have to think up any methods when only one of them can work (as a wait), based on the logic of waiting.
For every TRADE_ACTION you have to wait for something specific. That's just the specific one to wait for. There is no sense in waiting for something else. There is no second solution at all.
There may be a problem with it.
Besides, ORDER_MAGIC is already a history request. In other words, you can't just wait for history to increase, as was suggested earlier.
It's not clear why we have to think up all sorts of ways, when only one of them can work (as a wait), based on the logic of what you have to wait for.
For every TRADE_ACTION you have to wait for something specific. That's just the specific one to wait for. There is no sense in waiting for something else. There is no second solution at all.
Waiting for the story to increase, taking into account the magician.
What if the modify?
Why should I wait after it?
in addition to the fact that SL/TP are not immediately updated, as with position modification.
ZZY It is possible to find out nuances only in case of stress-tests of many trading servers. Without it, the real trade is a trick.
It's always possible to run into something