MQL5 - Differences between trade positions in MetaTrader 4 and MetaTrader 5 - page 2

 
jjc:

As far I can see, EAs will have to keep track of their historic filled orders, and calculate their own private positions. It's going to create a distinction (and cause a lot of confusion) between EAs which are and aren't compatible with other EAs trading the same symbol - i.e. EAs which only look at the overall MT4 position rather than calculating their own position. It remains possible to hedge in one sense - having an EA place orders in opposite directions, and keeping track of its own net position - but not in the sense of carrying an unbooked loss.

Now combine this with real life, restarting PC, lost connection, different PC managing the same account and you get a nightmare. While it is all so simple in MT4... IMHO, MT5 is a shoot in the foot.

 
Michal:

Now combine this with real life, restarting PC, lost connection, different PC managing the same account and you get a nightmare.

I agree that EA code will have to become more complicated, but I don't see a reliability issue. An EA should continue to be able to establish its position based on data downloaded from the broker. It's just looks as though the EA will have to do this by scanning the order history, rather than just by looking at the list of open positions. But it's hard to be sure because things like HistoryOrdersTotal() don't seem to work yet.


The big latent problem is that there are likely to be lots of EAs which won't work properly if anything else tries to trade the same currency - i.e. they will be coded to look at the MT4-style current position. If enough such EAs get released, it won't do wonders for the reputation of the MT5 platform, even though it won't actually be Metaquotes's fault.


While it is all so simple in MT4... IMHO, MT5 is a shoot in the foot.

Perhaps unavoidable given (a) the NFA no-hedging rule, and (b) the clear desire of Metaquotes to build something which can trade equities and futures as well as forex. It wouldn't be practical for them to attempt to impose an MT4-style position-based system on equity and futures brokers/exchanges.

 
What about 2 EA on 2 different platform on 2 different accounts ?
 
kissandfly:
What about 2 EA on 2 different platform on 2 different accounts ?

Well, that makes life easier - unless you have an EA which wants to place hedging orders - but how many people does it apply to? Judging by the cost of most commercial EAs (i.e. around $100), their customers don't have much money to invest, and are therefore unlikely to have more than one account. In short: I'd guess that the median number of live accounts which MT4 users have is 1 (excluding, obviously, all the people who don't have any live accounts at all, and are just running stuff in demo or in backtest).

 

I'm writing an MQL5 Virtual Order Manager which converts hedge trading at the terminal to FIFO trades at the broker. It's conceptually quite easy, but the coding is not all that simple. See comments on my blog here http://paulsfxrandomwalk.blogspot.com/2009/11/writing-virtual-order-manager-to-enable.html

Reason: