No Maring Information

 

Hello,

is it normal to get no margin information ?


0=SymbolInfoDouble(symbol,SYMBOL_MARGIN_MAINTENANCE);
0=SymbolInfoDouble(symbol,SYMBOL_MARGIN_INITIAL);
CSymbolInfo si;
si.Name(symbol);
0=si.MarginLong();
0=si.MarginShort();

All zero. I am happy.

 
chinaski:

Hello,

is it normal to get no margin information ?


All zero. I am happy.


Yes. Normal. These properties are designed for stock symbols (for example for futures), not forex.

 

Hello,

when open a position, i have a margin. Why is it no available in mql5 ?

 
chinaski:

Hello,

when open a position, i have a margin. Why is it no available in mql5 ?


"SYMBOL_MARGIN_MAINTENANCE" (property of a symbol) != Free Margin or Margin (trading account property)

 

Ok, it is a property of symbol, not account but it suggests, you can get this information about margin for symbol position, in fact you can't (by using SymbolInfoDouble),

except for stocks. In my case it is not forex, it is CFD. Same problem.


However, OrderCalcMargin does the job.

 
chinaski:

Hello,

is it normal to get no margin information ?


All zero. I am happy.

Depends of the broker. Some brokers are a bit lazy or incompetent or whatever and don't provide all reliable information for all symbols.

Which broker are you using ?

 

Active Trades. I like this broker because he provides many symbols. Just the history is poor what i am not happy about.

Reason: