Hi,
I have encountered an interesting issue - my live account with a particular broker has 1:30 leverage (and that's also what ACCOUNT_LEVERAGE property says), but for some instrument types (cryptocurrency-based CFDs, e.g. BTCUSD) the leverage is reduced to 1:2 instead of 1:30.
Nevertheless, when I am using OrderCalcMargin function to calculate the margin for 1 lot of BTCUSD, it provides a margin value as if BTCUSD had 1:30 leverage as all other instruments - which is obviously wrong, as it has 1:2.
Any ideas how to handle it, except hardcoding an equation for margin calculation instead of using OrderCalcMargin function?
You do have to hard code it, unless newer version of MT5 has leverage at symbol properties level, not sure since i am still on 2085.
Maybe this https://www.mql5.com/en/forum/271388 thread will help somewhat.
- www.mql5.com
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
I have encountered an interesting issue - my live account with a particular broker has 1:30 leverage (and that's also what ACCOUNT_LEVERAGE property says), but for some instrument types (cryptocurrency-based CFDs, e.g. BTCUSD) the leverage is reduced to 1:2 instead of 1:30.
Nevertheless, when I am using OrderCalcMargin function to calculate the margin for 1 lot of BTCUSD, it provides a margin value as if BTCUSD had 1:30 leverage as all other instruments - which is obviously wrong, as it has 1:2.
Any ideas how to handle it, except hardcoding an equation for margin calculation instead of using OrderCalcMargin function?