Errors, bugs, questions - page 3024 1...301730183019302030213022302330243025302630273028302930303031...3193 New comment fxsaber 2021.05.26 15:35 #30231 traveller00:SymbolInfoMarginRate ? And count the margin by hand, something like. Tried it. Doesn't always help. Alexey Viktorov 2021.05.26 15:52 #30232 fxsaber:How do I get the value of this field in MT5 that I can see in MT4? Share the function that always produces the correct margin value. OrderCalcMargin lies, unfortunately. This is not the panacea. Is this field available in mql4? fxsaber 2021.05.26 16:33 #30233 Alexey Viktorov:Is this field available in mql4? Not directly, no. Alexey Viktorov 2021.05.26 16:38 #30234 fxsaber:Not directly, no. Not direct is also a pain in the ass... Why doesn't SymbolInfoMarginRate always help? fxsaber 2021.05.26 16:43 #30235 Alexey Viktorov:Why doesn't SymbolInfoMarginRate always work? This script gives out 1000. void OnStart() { Alert(GetMarginRequired(_Symbol)); // https://www.mql5.com/ru/forum/170952/page9#comment_4134898 } It should give out 2000. fxsaber 2021.05.26 16:58 #30236 There's another trick with margin in MT5. I do not understand why ACCOUNT_MARGIN_LEVEL is so wrongly calculated. fxsaber 2021.05.26 17:11 #30237 How comeACCOUNT_LEVERAGE ended up inENUM_ACCOUNT_INFO_INTEGER and not inENUM_ACCOUNT_INFO_DOUBLE? Alexey Viktorov 2021.05.26 18:48 #30238 fxsaber: How comeACCOUNT_LEVERAGE is inENUM_ACCOUNT_INFO_INTEGER and not inENUM_ACCOUNT_INFO_DOUBLE? It's leverage. The level of margin is something else entirely. I can't tell from memory how it's counted, but it's not the same. I think 999.17 is ACCOUNT_MARGIN_LEVEL Account margin level as a percentage double How do you calculate How to get the A division by zero Alexey Viktorov 2021.05.26 18:56 #30239 fxsaber:This script gives out 1,000. It's supposed to give 2,000. And if you multiply by the initiation margin, from the snapshot in the next post, you get exactly 2000 Andrey Dik 2021.05.26 19:04 #30240 2940 1...301730183019302030213022302330243025302630273028302930303031...3193 New comment
SymbolInfoMarginRate ? And count the margin by hand, something like.
Tried it. Doesn't always help.
How do I get the value of this field in MT5 that I can see in MT4?
Share the function that always produces the correct margin value. OrderCalcMargin lies, unfortunately. This is not the panacea.
Is this field available in mql4?
Is this field available in mql4?
Not directly, no.
Not directly, no.
Not direct is also a pain in the ass...
Why doesn't SymbolInfoMarginRate always help?
Why doesn't SymbolInfoMarginRate always work?
This script gives out 1000.
It should give out 2000.
There's another trick with margin in MT5.
I do not understand why ACCOUNT_MARGIN_LEVEL is so wrongly calculated.
How comeACCOUNT_LEVERAGE is inENUM_ACCOUNT_INFO_INTEGER and not inENUM_ACCOUNT_INFO_DOUBLE?
It's leverage. The level of margin is something else entirely. I can't tell from memory how it's counted, but it's not the same.
I think 999.17 is
ACCOUNT_MARGIN_LEVEL
Account margin level as a percentage
double
This script gives out 1,000.
It's supposed to give 2,000.
And if you multiply by the initiation margin, from the snapshot in the next post, you get exactly 2000
2940