![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Can you make short sell orders manually through GUI? I suspect that short-selling may be disabled for that symbol.
Please check the symbol specifications dialog:
I am not using fancy symbols. For the test I used EURUSD. All types of orders are allowed for that.
You can calculate the margin required using a custom function:
To calculate margin for the affected symbol:
You can calculate the margin required using a custom function:
To calculate margin for the affected symbol:
Thanks man. But i'd prefer to negotiate the bugfix than to workaround core components. Functions affected by this bug are cascading and ruining a lot of things including test results calculations, balance calculations, etc etc.
This bug reappeared in the latest update I got (MT5, version 5.00 build 4270, 5 Apr 2024). I get reqMargin=0.
the output, before and after calling OrderCalcMargin, is (ordType is a ENUM_ORDER_TYPE variable):
ordType = 1, g_symbolName = GBPUSD, short_lot = 6.63, atprice = 1.24438, reqMargin = 0.0
ordType = 1, g_symbolName = GBPUSD, short_lot = 6.63, atprice = 1.24438, reqMargin = 0.0
and the boolean marginCheck is true.