rrsch: I've looked for any documentation on what's under the hood of this function with no luck so far.
You will find it here ... https://www.mql5.com/en/docs/constants/environment_state/marketinfoconstants#enum_symbol_calc_mode
Both the OrderCalcMargin and OrderCalcProfit functions will calculate differently depending on the ENUM_SYMBOL_CALC_MODE

Documentation on MQL5: Constants, Enumerations and Structures / Environment State / Symbol Properties
- www.mql5.com
Symbol Properties - Environment State - Constants, Enumerations and Structures - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
Fernando Carreiro #:
You will find it here ... https://www.mql5.com/en/docs/constants/environment_state/marketinfoconstants#enum_symbol_calc_mode
Both the OrderCalcMargin and OrderCalcProfit functions will calculate differently depending on the ENUM_SYMBOL_CALC_MODE
Wonderful, thanks. I'll look into that.

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
I've looked for any documentation on what's under the hood of this function with no luck so far.
I'm trying to calculate required margin for upcoming positions, and OrderCalcMargin() gives me a different value than the standard calcuation that I'm digging up everwhere else on the web.
I'm currently trying to sort it out where
is returning a quite different value than
I want to plug this formula into a spreadsheet to figure out some numbers but I don't know which version to trust, and if version A happens to be correct I don't know what the underlying calculations are anyways.
Any help appreciated. Thanks!