What is the item name for display "margin call in%" and "margin stop out in%" in MT4 chart?

 

Hi specialists,

I have a question for display some account informations in MT4. IK found a standard script in my MT5 installation which show me actually account informations in my chart.  The information field for the "margin call in%" and the "margin stop out in %" is very important for me. So I need this information also in my MT4 charts.  I was looking for the same script in MT4 but haven´t found one of them. :-(

 

So I want to develop this script with a friend in MQL4 for my MT4 account informations. We need the information about the item name in the script like the screenshot from MQL5.

 

Files:
 
baerliner:

Hi specialists,

I have a question for display some account informations in MT4. IK found a standard script in my MT5 installation which show me actually account informations in my chart.  The information field for the "margin call in%" and the "margin stop out in %" is very important for me. So I need this information also in my MT4 charts.  I was looking for the same script in MT4 but haven´t found one of them. :-(

 

So I want to develop this script with a friend in MQL4 for my MT4 account informations. We need the information about the item name in the script like the screenshot from MQL5.

Perhaps MarginCall is  AccountFreeMargin()

and MarginStopOut is  AccountStopoutLevel()  ?  you need to check for yourself.

 

Thank you for your fast answer. :-)

Greetings to UK.

 

What is the difference between "AccountFreeMargin" and the item "free Margin in account currency"? I see a item in my mt4 which displayed the actually free margin (meens the free margin in currency). This is not the item I need. I need the item which show me the level in % were my broker send me a margin call via email.

 
baerliner:

What is the difference between "AccountFreeMargin" and the item "free Margin in account currency"? I see a item in my mt4 which displayed the actually free margin (meens the free margin in currency). This is not the item I need. I need the item which show me the level in % were my broker send me a margin call via email.

You can calculate the %age,  can't you ?
 

No I can´t.

I need the value in % to calculate in excel if I can open a new trade or not. So I can see the my actally balance and the actually margin requirement and then I can see that the result is 90 % or what else. If my "margin call in %" by 50% I can open a new trade. If the value by "70%" it`s to low by the margin call level. But how you would calculate the "margin call in %" ? The actually "margin requirement in %" I have in a separate value directly without a calculation.

 
baerliner:

No I can´t.

Doesn't

 ( AccountFreeMargin() / AccountMargin() ) * 100

 give you what you need ?  

or perhaps yo want the %age of Margin used ?

( ( AccountMargin() - AccountFreeMargin() ) / AccountMargin() ) * 100

 I don't code in mql5 so I don't know what MarginCall  returns or means,  the documentation is no help.

 

Hi,

 

I need the "margin call level in %". This means: My broker will send me a margin call per email if my actual used margin level in % is under the "margin call level in %".

Example: 

Balance in EUR: 1000

used margin in EUR: 500

used margin level in %: 200

margin call level in %: 75

stop out level in %: 25

No margin call because "used margin level in %" is over "margin call level in %".

 

New trade (1) with 900 EUR margin:

Balance in EUR: 1000

used margin in EUR: 1400

used margin level in %: 71,4

I will receive a margin call because "used margin level in%" is under "margin call level in %".

 

No new trade but the position goes wrong. I lost a lot of money:

Balance in EUR: 340 

used margin in EUR: 1400

used margin level in %: 24,3

All my open trades will be executed because my "used margin level in %" is under the "margin stop out level".

Hope you can understand what I mean with "margin call level in %" and "margin stop out level in%"

Reason: