How to get the "Percentage of Margin" programmatically - page 5

 
Renat Akhtyamov:
equals 100, as leverage is taken into account

In the screenshot at the beginning of the thread the "margin percentage" is 1. Metaquotes have the same (1 on gold). Is it always the same for everyone?
 
K-2SO:

In the screenshot at the beginning of the thread the "margin percentage" is 1. Metaquotes have the same (1 on gold). Is it always the same for everyone?

You want to calculate the margin for an open order, don't you?

And in the screenshot the calculated margin from the deposit for the minimum order.

 
Renat Akhtyamov:

You want to calculate the margin for an open order, don't you?

And the calculated deposit margin for a minimum order is shown on the screenshot.

If we are talking about the screenshot in the first post of this thread (specification window for a symbol), then I seem to have misunderstood the meaning behind the concept of "margin percentage" (

Is margin percentage a deposit in the deposit currency for a minimum order?

 
K-2SO:

If we are talking about the screenshot in the first post of this thread (specification window for the instrument), then I seem to have misunderstood the meaning behind the concept of "margin percentage" at all (

Is a margin percentage a deposit of an amount in the deposit currency for a minimum order?

That is my immediate answer. Not a fact of course.
 
K-2SO:

In the screenshot at the beginning of the thread, the "margin percentage" is 1. Methaquotes have the same (1 on gold). Is it always the same for everyone?

No. Not always and not for everyone.


 
Renat Akhtyamov:
that's the answer I'm looking for. Not a fact of course.
Not in the currency of the deposit, but in the currency of the margin. It is indicated on the same screenshot.
 

Anyway, it didn't work through the "back door" either. What I did... I ran through SymbolInfoDouble all constants that are part of numeric series ENUM_SYMBOL_INFO_DOUBLE (from 0 to 69), but are missing (could be missing) in its description. Got the following result.

ERROR[4051]: функция SymbolInfoDouble(SYMBOL_UNCNOWN_0); Неверный идентификатор свойства символа
ERROR[4051]: функция SymbolInfoDouble(SYMBOL_UNCNOWN_10); Неверный идентификатор свойства символа
ERROR[4051]: функция SymbolInfoDouble(SYMBOL_UNCNOWN_11); Неверный идентификатор свойства символа
ERROR[4051]: функция SymbolInfoDouble(SYMBOL_UNCNOWN_12); Неверный идентификатор свойства символа
ERROR[4051]: функция SymbolInfoDouble(SYMBOL_UNCNOWN_13); Неверный идентификатор свойства символа
ERROR[4051]: функция SymbolInfoDouble(SYMBOL_UNCNOWN_14); Неверный идентификатор свойства символа
ERROR[4051]: функция SymbolInfoDouble(SYMBOL_UNCNOWN_15); Неверный идентификатор свойства символа
ERROR[4051]: функция SymbolInfoDouble(SYMBOL_UNCNOWN_17); Неверный идентификатор свойства символа
ERROR[4051]: функция SymbolInfoDouble(SYMBOL_UNCNOWN_18); Неверный идентификатор свойства символа
ERROR[4051]: функция SymbolInfoDouble(SYMBOL_UNCNOWN_19); Неверный идентификатор свойства символа
ERROR[4051]: функция SymbolInfoDouble(SYMBOL_UNCNOWN_20); Неверный идентификатор свойства символа
ERROR[4051]: функция SymbolInfoDouble(SYMBOL_UNCNOWN_21); Неверный идентификатор свойства символа
ERROR[4051]: функция SymbolInfoDouble(SYMBOL_UNCNOWN_22); Неверный идентификатор свойства символа
ERROR[4051]: функция SymbolInfoDouble(SYMBOL_UNCNOWN_23); Неверный идентификатор свойства символа
ERROR[4051]: функция SymbolInfoDouble(SYMBOL_UNCNOWN_24); Неверный идентификатор свойства символа
ERROR[4051]: функция SymbolInfoDouble(SYMBOL_UNCNOWN_25); Неверный идентификатор свойства символа
ERROR[4051]: функция SymbolInfoDouble(SYMBOL_UNCNOWN_29); Неверный идентификатор свойства символа
ERROR[4051]: функция SymbolInfoDouble(SYMBOL_UNCNOWN_30); Неверный идентификатор свойства символа
ERROR[4051]: функция SymbolInfoDouble(SYMBOL_UNCNOWN_31); Неверный идентификатор свойства символа
ERROR[4051]: функция SymbolInfoDouble(SYMBOL_UNCNOWN_32); Неверный идентификатор свойства символа
ERROR[4051]: функция SymbolInfoDouble(SYMBOL_UNCNOWN_33); Неверный идентификатор свойства символа
ERROR[4051]: функция SymbolInfoDouble(SYMBOL_UNCNOWN_37); Неверный идентификатор свойства символа
ERROR[4051]: функция SymbolInfoDouble(SYMBOL_UNCNOWN_40); Неверный идентификатор свойства символа
ERROR[4051]: функция SymbolInfoDouble(SYMBOL_UNCNOWN_41); Неверный идентификатор свойства символа
ERROR[4051]: функция SymbolInfoDouble(SYMBOL_UNCNOWN_49); Неверный идентификатор свойства символа
ERROR[4051]: функция SymbolInfoDouble(SYMBOL_UNCNOWN_50); Неверный идентификатор свойства символа
ERROR[4051]: функция SymbolInfoDouble(SYMBOL_UNCNOWN_51); Неверный идентификатор свойства символа
ERROR[4051]: функция SymbolInfoDouble(SYMBOL_UNCNOWN_52); Неверный идентификатор свойства символа
ERROR[4051]: функция SymbolInfoDouble(SYMBOL_UNCNOWN_56); Неверный идентификатор свойства символа
ERROR[4051]: функция SymbolInfoDouble(SYMBOL_UNCNOWN_60); Неверный идентификатор свойства символа
ERROR[4051]: функция SymbolInfoDouble(SYMBOL_UNCNOWN_62); Неверный идентификатор свойства символа

So there are no hidden (or undocumented) constants in this function.

 
Alexey Viktorov:

No. Not always and not everyone.



Can you suggest a broker, please? For my tests...
 
ir0407:
Not in the deposit currency, but in the margin currency. It is indicated on the same screenshot.

Is the margin percentage thecalculated margin on the deposit for the minimum order (in the margin currency?) )

 
K-2SO:

Is the margin percentage thecalculated margin on the deposit for the minimum order (in the margin currency?) )

The margin percentage is not the calculated deposit. It is just one of the components used to calculate the margin. And the result of this calculation (using the formulas in the table) is returned in the margin currency, which then (if it differs from the deposit currency) has to be converted into the deposit currency.
Reason: