Estimating margin requirements in MQL5

 

An example from the contract specification of one DC where leverage is a property of the symbol, and even, as the DC writes, its rate.


A question has arisen:

How to evaluate the collateral of a trade in these conditions, more precisely, does OrderCheck() or OrderCalcMargin() take into account the features of leverage specified in the specification, which is "specified approximately".

I have also encountered such trading conditions:

"Yellow" indicates the instruments for which the margin requirements are increased.

...

For 15 minutes before and 5 minutes after the <High> level economic news is published, the margin requirements
for new orders are calculated based on the maximum leverage of 1:200. Upon expiry of the specified period
After the designated period, the margin for these positions will be recalculated based on the account balance and the leverage value set.
From 19:00 GMT+0 Friday to 23:00 GMT+0 Sunday the margin requirements for newly opened positions will be calculated
From 19:00 GMT+0 Friday and 23:00 GMT+0 Sunday the margin requirements for newly opened positions will be calculated with maximum leverage of 1:200".

Increased is for example 0.5% for all allowed leverages instead of 1% for 1:200, 0.2% for 1:1000 and 0.1% for 1:2000.

Again the same question arises. Who is in the know, please advise.

 

No one will answer this question.

I have raised this question many times: how to determine the real leverage (before opening an order) that each symbol has.

Some brokers skilfully change not only the spread but also the real leverage during trading, thus arranging good conditions for Stop Out.

 
Petros Shatakhtsyan:

No one will answer this question.

I have raised this question many times: how to determine the real leverage (before opening an order) that each symbol has.

Some brokers skilfully change not only the spread but also the real leverage during trading, thus arranging good conditions for Stop Out.

But the terminal gives the message "Not enough funds ...", it means that the terminal has the necessary information? Or am I misunderstanding something?
 
The value of the collateral always depends on the asset itself: how liquid it is and how likely it is to fluctuate sharply.
 
Vladimir:
But the terminal gives the message "Not enough funds...", it means that the terminal has the required information? Or am I misunderstanding something?

Without having real leverage of this symbol, it is not possible to determine whether your funds are sufficient or not before opening an order.

You have to ask Service Desk.

 
Petros Shatakhtsyan:

Without having real leverage of this symbol, it is not possible to determine whether your funds are sufficient or not before opening an order.

You have to ask Service Desk.

Ask them where to get real leverage in MQL5, am I reading you right?

 
Vladimir:

Ask them where to get the real leverage in the program in MQL5, am I reading you right?

Better to refer to the documentation

https://www.mql5.com/ru/docs/account

Документация по MQL5: Информация о счете
Документация по MQL5: Информация о счете
  • www.mql5.com
Информация о счете - справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 
https://www.mql5.com/ru/docs/constants/environment_state/accountinformation#enum_account_info_integer
Документация по MQL5: Константы, перечисления и структуры / Состояние окружения / Информация о счете
Документация по MQL5: Константы, перечисления и структуры / Состояние окружения / Информация о счете
  • www.mql5.com
Уровень залоговых средств, при достижении которого происходит принудительное закрытие самой убыточной позиции (Stop Out). В зависимости от установленного Существует несколько видов счетов, которые могут быть открыты на торговом сервере. Для того чтобы узнать тип счета, на котором работает MQL5-программа, предназначено перечисление...
 
Vladimir:

Ask them where to get the real leverage in the program in MQL5, am I understanding you correctly?

Yes, real leverage for the selected symbol , not the one that has an account.

 
Renat Akhtyamov:

It is best to refer to the documentation

https://www.mql5.com/ru/docs/account

ACCOUNT_LEVERAGE

Size of the leverage provided

Addressed. What, you can use AccountInfoInteger() value for ACCOUNT_LEVERAGE for both USDRUB symbol and USDRON symbol from picture in first post? Be more specific, they have different values...

 
Petros Shatakhtsyan:

Yes, the real leverage is for the selected symbol , not the one that has an account.

Also for the current moment (not reduced by 20 minutes during news release, and not before weekend), do I understand you correctly? Do you seriously believe that the rapid distribution of such information is a Service Desk function?

Reason: