OrderCalcMargin price parameter - page 2

 
Dr Matthias Hammelsbeck #:

Thanks for your helpful answer. Slowly but surely my understanding is growing...

BTW: the leverage is 1:300, because the margin_rate is 1.5 (not 1.0).

Matthias

Yes so the leverage is actually 1:200 on this symbol. Could be different on others depending of the margin rate.

 

Hi,

hint: just I have found an useful article which may be helpful for answering the question of this thread of the role of the price parameter for margin calculation.

It is old (from year 2010) but nevertheless valid and helpful I think:

https://www.mql5.com/en/articles/113


Sincerely

Matthias

Functions for Money Management in an Expert Advisor
Functions for Money Management in an Expert Advisor
  • www.mql5.com
The development of trading strategies primarily focuses on searching for patterns for entering and exiting the market, as well as maintaining positions. If we are able to formalize some patterns into rules for automated trading, then the trader faces the question of calculating the volume of positions, the size of the margins, as well as maintaining a safe level of mortgage funds for assuring open positions in an automated mode. In this article we will use the MQL5 language to construct simple examples of conducting these calculations.
 
Dr Matthias Hammelsbeck #:

Hi,

hint: just I have found an useful article which may be helpful for answering the question of this thread of the role of the price parameter for margin calculation.

It is old (from year 2010) but nevertheless valid and helpful I think:

https://www.mql5.com/en/articles/113


Sincerely

Matthias

It's obsolete about margin because there is now the function SymbolInfoMarginRate() to get appropriate symbol's setting.