SYMBOL_MARGIN_INITIAL = 0.0

 

Hello MetaQuotes,

I have checked SYMBOL_MARGIN_INITIAL value on several symbols and every time it returns 0.0. And if, like documentation states, 

"SYMBOL_MARGIN_INITIAL Initial margin means the amount in the margin currency required for opening a position with the volume of one lot. It is used for checking a client's assets when he or she enters the market. "

then it seems like a bug - margin of a position on a leveraged symbol cannot be equal to 0... unless this property is only for futures and margin for any type of instrument (forex, CFD, futures) should be calculated only using OrderCalcMargin()

 
Enigma71fx:

Hello MetaQuotes,

I have checked SYMBOL_MARGIN_INITIAL value on several symbols and every time it returns 0.0. And if, like documentation states, 

"SYMBOL_MARGIN_INITIAL Initial margin means the amount in the margin currency required for opening a position with the volume of one lot. It is used for checking a client's assets when he or she enters the market. "

then it seems like a bug - margin of a position on a leveraged symbol cannot be equal to 0... unless this property is only for futures and margin for any type of instrument (forex, CFD, futures) should be calculated only using OrderCalcMargin()

Hi Enigma71fx,

If you get the answer, GOOD, I've been waiting since July 2nd https://www.mql5.com/en/forum/7035#comment_218234 last comment - older build.

 

How do I write a script of lots in the EA to comply with the rules of the ATC 2012?
How do I write a script of lots in the EA to comply with the rules of the ATC 2012?
  • www.mql5.com
But in this case you can not place a Buy Limit pending order (since the total volume in one direction will exceed the limit) or place a sell limit order above 15 lots.
 
Enigma71fx:

Hello MetaQuotes,

I have checked SYMBOL_MARGIN_INITIAL value on several symbols and every time it returns 0.0. And if, like documentation states, 

"SYMBOL_MARGIN_INITIAL Initial margin means the amount in the margin currency required for opening a position with the volume of one lot. It is used for checking a client's assets when he or she enters the market. "

This feature is intended for Stock symbols not for forex.
 
Rosh:
This feature is intended for Stock symbols not for forex.
Thanks for clarification.
 

Dear Rosh,

1. MQ have to clarify more then, which one for forex, stock, future, options, and which one for etc etc etc market. Why don't MQ make that SYMBOL_MARGIN_INITIAL for all market ? Isn't that the meaning of MarketInfo ?.

2. So what is the function to get "the cost to open 1 lot position in forex" ? Quiet funny coz most of us are come from MT4 which very well known in forex world, and now there's (yet) no way to tell how much the cost to open 1 lot position in forex.


 
onewithzachy:

Dear Rosh,

1. MQ have to clarify more then, which one for forex, stock, future, options, and which one for etc etc etc market. Why don't MQ make that SYMBOL_MARGIN_INITIAL for all market ? Isn't that the meaning of MarketInfo ?.

2. So what is the function to get "the cost to open 1 lot position in forex" ? Quiet funny coz most of us are come from MT4 which very well known in forex world, and now there's (yet) no way to tell how much the cost to open 1 lot position in forex.


Ad.2. https://www.mql5.com/en/docs/trading/ordercalcmargin/ Just use it with proper parameter values.
Documentation on MQL5: Trade Functions / OrderCalcMargin
Documentation on MQL5: Trade Functions / OrderCalcMargin
  • www.mql5.com
Trade Functions / OrderCalcMargin - Documentation on MQL5
Reason: