Calculating the Margin Level inside MQ4 Script

838 views
Skip to first unread message

SVP

unread,
Mar 31, 2009, 2:02:06 AM3/31/09
to RGMorrisNet Ultimate MT4 Client
Implement the following code:

double margin_level = (AccountEquity() / AccountMargin()) * 100.0;

This is the same value on the Metatrader terminal, Trade tab given in
percent.

When this Margin Level nears 100%, you risk a margin call and account
depletion.
Reply all
Reply to author
Forward
0 new messages