Hi, can someone tell me how to get Margin Required in MQL5. I ve try SymbolInfoDouble(Symbol(), SYMBOL_MARGIN_INITIAL) but I get 0.0
- the size of text object label
- Insert variable in technical indicator
- How can I get the marginrequired in mt5
belido:
Hi, can someone tell me how to get Margin Required in MQL5. I ve try SymbolInfoDouble(Symbol(), SYMBOL_MARGIN_INITIAL) but I get 0.0
Hi, can someone tell me how to get Margin Required in MQL5. I ve try SymbolInfoDouble(Symbol(), SYMBOL_MARGIN_INITIAL) but I get 0.0
Did you check error number ? GetLastError().
Which symbol is it ?
angevoyageur:
Sorry friend, I missed this topic. I am looking for equivalent of MarketInfo(symbol(),MARGIN_REQUIRED) in MQL5. I know it can be calculated but if it is already there it is better. The aforemention function I have tried it with no error and for all symbol. Perhaps I use wrong function? Thanks.
Did you check error number ? GetLastError().
Which symbol is it ?
belido:
Sorry friend, I missed this topic. I am looking for equivalent of MarketInfo(symbol(),MARGIN_REQUIRED) in MQL5. I know it can be calculated but if it is already there it is better. The aforemention function I have tried it with no error and for all symbol. Perhaps I use wrong function? Thanks.
Sorry friend, I missed this topic. I am looking for equivalent of MarketInfo(symbol(),MARGIN_REQUIRED) in MQL5. I know it can be calculated but if it is already there it is better. The aforemention function I have tried it with no error and for all symbol. Perhaps I use wrong function? Thanks.
I don't know why these values return 0.0.
Anyway you can probably get what you need with :
MqlTick tick; double margin; if(!SymbolInfoTick(Symbol(),tick) || !OrderCalcMargin(ORDER_TYPE_BUY,Symbol(),1.0,tick.ask,margin)) return; printf("Margin =%f,margin);
angevoyageur:
Ok, will try it. Thanks.
I don't know why these values return 0.0.
Anyway you can probably get what you need with :
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