The documentation is no help. From what I can tell researching it, Exchange Mode is a netting mode. Can anyone confirm or deny this for sure?
Honestly, I dont think margin mode and hedging/netting are related in that sense, it actually only defines the type of margin calculation thats being applied.
hedging/netting is a position management aspect, does one order close part of the volume of another or add to it. - Then profit calculations, whats the "opening price" of the netting position. - These are aspects of position volume management, they are not related to margin calculations. - Though, margin calculations are related to the underlying type of account, so you can have different margin calculation types, depending on the account type(hedging/netting).
Docs state this:
ACCOUNT_MARGIN_MODE_EXCHANGE | Used for the exchange markets. Margin is calculated based on the discounts specified in symbol settings. Discounts are set by the broker, but not less than the values set by the exchange. |
And refer to this page:
https://www.mql5.com/en/docs/constants/environment_state/marketinfoconstants
![Documentation on MQL5: Constants, Enumerations and Structures / Environment State / Symbol Properties Documentation on MQL5: Constants, Enumerations and Structures / Environment State / Symbol Properties](https://c.mql5.com/36/82/documentation-on-mql5-constants.png)
- www.mql5.com
Honestly, I dont think margin mode and hedging/netting are related in that sense, it actually only defines the type of margin calculation thats being applied.
hedging/netting is a position management aspect, does one order close part of the volume of another or add to it. - Then profit calculations, whats the "opening price" of the netting position. - These are aspects of position volume management, they are not related to margin calculations. - Though, margin calculations are related to the underlying type of account, so you can have different margin calculation types, depending on the account type(hedging/netting).
Docs state this:
ACCOUNT_MARGIN_MODE_EXCHANGE | Used for the exchange markets. Margin is calculated based on the discounts specified in symbol settings. Discounts are set by the broker, but not less than the values set by the exchange. |
And refer to this page:
https://www.mql5.com/en/docs/constants/environment_state/marketinfoconstants
Well, for AccountInfoInteger() we've got these 3 enums for the property ENUM_ACCOUNT_MARGIN_MODE:
ACCOUNT_MARGIN_MODE_RETAIL_NETTING | Used for the OTC markets to interpret positions in the "netting" mode (only one position can exist for one symbol). The margin is calculated based on the symbol type (SYMBOL_TRADE_CALC_MODE). |
ACCOUNT_MARGIN_MODE_EXCHANGE | Used for the exchange markets. Margin is calculated based on the discounts specified in symbol settings. Discounts are set by the broker, but not less than the values set by the exchange. |
ACCOUNT_MARGIN_MODE_RETAIL_HEDGING | Used for the exchange markets where individual positions are possible (hedging, multiple positions can exist for one symbol). The margin is calculated based on the symbol type (SYMBOL_TRADE_CALC_MODE) taking into account the hedged margin (SYMBOL_MARGIN_HEDGED). |
The first (value 0) and last (value 2) indicate netting or hedging mode with the broker. What the 2nd enum indicates is unclear, in regards to hedging or netting.
![Documentation on MQL5: Constants, Enumerations and Structures / Environment State / Symbol Properties Documentation on MQL5: Constants, Enumerations and Structures / Environment State / Symbol Properties](https://c.mql5.com/36/82/documentation-on-mql5-constants__1.png)
- www.mql5.com
The documentation is no help. From what I can tell researching it, Exchange Mode is a netting mode. Can anyone confirm or deny this for sure?
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use