I'm searching a routine to make it in a Ea, to display the "Margin Level %" in window/Chart .

The paperroutine:

Margin Level % = AccountEqiuty / Margin

Can everyone help me?
My own works are all not to compile or without funktion.http://www.tradingsystemforex.com/im...milies/mad.png