Discussion of article "MetaTrader 5 features hedging position accounting system" - page 6

 
Vasiliy Sokolov:

Wrong type-receiver, you need to:

Learn programming.

Your build is also outdated. It does not have the requested modifiers yet. You need to update your MetaTrader 5 by connecting to the MetaQuotes-Demo server.

Thank you for the tip about the receiver type, but I had figured it out earlier after Alexey's tip about the build and installing the new one. I have been programming for a long time, successfully, in several languages. Only recently I needed mql5 for a small task. Since I mainly use MetaTrader 4, there was no need for mql5. Thanks anyway.
 

hi,

i prefer original mt5. 

 
Diogo Seca:
There's something I must not be grasping here. I don't see any overall benefit when it comes to hedging this way.
I mean, as I see it, the reason MQL5 never allowed hedging like this in the first place was because hedging a position by opening an opposite position is the same thing as simply closing the first one.

Why would a user prefer the "hedging system" to the "netting system"?

The only reason I could see for this implementation is more compatibility with brokers, somehow. Any insights here?
I'm also waiting for a broker with real accounts for MT5 Hedging...
 
For me it was not obvious how to make a partial closing of a position like OrderClose function in mt4. I guessed that it is necessary to send a market request specifying the position identifier (request.position), the opposite direction of the trade and the number of lots to be closed. Without ordering the identifier, a new deal is opened. Can this point be added to the article.
 
Dmitry Homenkov:
For me it was not obvious how to make a partial closing of a position like OrderClose function in mt4. I guessed that it is necessary to send a market request specifying the position identifier (request.position), the opposite direction of the trade and the number of lots to be closed. Without ordering the identifier, a new deal is opened. You can add this point to the article.

Slawa answered in detail here. Of course, I can't guess it at once.

How to determine SL and TP of closed positions is a mystery.

 

In other words, while the MT5 is advertised to have more features than MT4, it (in fact) restricts the traders' options.

This is how I see it and it wasn't really necesary for the traders as most of them are happy with MT4. It's like others have said, MT4 is for the traders, MT5 is for the brokers :)

 
Andrey Khatimlianskii:

This is a masterpiece!

Is this for the period of editing the history of trades a caveat, or will there never be 100% compliance?

Or is it about something else altogether (counter-closing, broker intervention)?

Chronologically

  1. A pending order worked partially - a position with Position_ID = Order_Ticket was opened.
  2. The position was closed manually.
  3. The rest of the order was executed - a position with Position_ID != Order_Ticket was opened.

What the final ORDER_POSITION_ID will be equal to and how HistorySelectByPosition will work is still a question.

Obviously, one (out of two) opening trade in its DEAL_ORDER order will have DEAL_POSITION_ID != ORDER_POSITION_ID.

So you should not rely on HistorySelectByPosition even on Hedge.

 
fxsaber:

Chronologically

  1. The pending order worked partially - a position with Position_ID = Order_Ticket was opened.
  2. The position was closed manually.
  3. The rest of the order was executed - a position with Position_ID != Order_Ticket was opened.

What the final ORDER_POSITION_ID will be equal to and how HistorySelectByPosition will work is another question.

Obviously, one (out of two) opening trade in its DEAL_ORDER order will have DEAL_POSITION_ID != ORDER_POSITION_ID.

So you should definitely not rely on HistorySelectByPosition even on Hedge.

In my opinion, you are inventing problems out of nowhere. Well, a second position was opened (on a hedge account) on the balance of an order with a different Position_ID. Let's say. What is the problem with that? The positions will really be different. HistorySelectByPosition has nothing to do with it.

If you want to catch all the trades by a specific signal, you can set MagicNumber and unwind the chain yourself. 99.99% of traders will not understand your sadness.

 
Rashid Umarov:

In my opinion, you are inventing problems out of nowhere. Well, a second position was opened (on a hedge account) on the balance of an order with a different Position_ID. Let's say. What is the problem with that? The positions will really be different. HistorySelectByPosition has nothing to do with it.

  1. This is an example of a trading situation that trades clearly by a specific signal, put MagicNumber on them and unwind the chain yourself. 99.99% of traders will not understand your sadness.

    We are talking about analysing the history of even manual trading, we are not talking about writing a TS.

    For example, we want to understand how a trade slipped.
 

I wanted to open a new demo account on MQL5 terminal. (There is already a netting demo account) When opening an account, the button "Use hedging in trading" is not activated.

Question: Can I have both hedge and netting forex accounts on the same terminal? Or should I reinstall the terminal?