The great and terrible MT4 forever (or how to strategise a transition) - page 6
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
Well, if it's not an exam, it's a litmus test. Pay attention to the position property POSITION_IDENTIFIER
...and you won't have to do useless loops. A closed Hadge account position always has two trades... under index 0 opening and under index 1 closing, unless you did a partial close.
Well, this is the price for the speed of MT5 - all trade orders are asynchronous, i.e. MQL5 does not wait for the server's answer, but continues its work
in MT4 all trade orders received a synchronous response from the server
you need to ask what to do and not why
- either process the order closure on the next tick (either in the loop, or pause... or here it depends on the TS)
- or processOnTradeTransaction
...About Hedge-positions is it accurate that there can only be two trades? Can't the DC close partially or in parts as in netting, depending on the execution policy?
HistoryDealsTotal() always works and is always faster than cycling through the history of all orders and trades.
HistoryDealsTotal() always works and is always faster than cycling through the history of all orders and trades.
To switch to MT5 you have to buy it
Then the question is why when you have already bought MT4 ?
So there is only one way - cheaper upgrade or free.
And then the trader will be confronted with the fact that there is only MT5 and that's it.
Forum on trading, automated trading systems and trading strategies testing
Features of mql5 language, tips and tricks
fxsaber, 2018.02.15 11:48
I suggest trying to write a script in MQL5 with this kind of trading logic (MQL4-style just for quick sense display)
It's not easy at all.
And there are much more subtle situations... If a broker provides an MT4/5, all other things being equal, the choice is always clear.
That's what I do, I control the position IDs and then sample them. I just haven't seen information that a position in a hedge always has only two trades unless partial closing is used.
Do you want a manual for every little thing?
I haven't seen any working MT5 solutions for the following
And there are situations that are much more subtle... if a broker provides MT4/5 all other things being equal, the choice is always clear.
Do you want a manual for every little thing?
Getting either a partial profit or a full profit when counting on information about a full one after all is no small thing for me. You can lose a lot of money by going through the experience route.
So the more detailed the help, the better.
And you will never meet it for the simple reason that a partial close, or a counter position close goes on a position ticket, and opening a position does not return a ticket. And anyway... why such a perversion?
of code readability. In MQL4 it's immediately clear what's going on.