Code:
ENUM_ACCOUNT_MARGIN_MODE m_margin_mode=(ENUM_ACCOUNT_MARGIN_MODE)AccountInfoInteger(ACCOUNT_MARGIN_MODE)
ENUM_ACCOUNT_MARGIN_MODE
Identifier |
Description |
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). |

- www.mql5.com
Code:
ENUM_ACCOUNT_MARGIN_MODE
Identifier |
Description |
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). |
OK, but how about: ACCOUNT_MARGIN_MODE_EXCHANGE
Is it hedging? is it netting? is it neither? Can we open oppositing trades on this like in hedge?
I have never come across this one in different accounts and brokers...in what cases we see it?
Thank you in advance for any clarification.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
according to the MQL5 documentation it should be possible to determine whether an account is under the netting or hedging mode the following way:
Unfortunately this only produces a compilation error — any ideas, please?