AccountMarginLevel();....?

 
Hi all

I have searched the platform tutorials, but not found some predefind variable that is similar to AccountMarginLevel(), showing the Margin Level percentage.

What other variables/math can I use to simulate/calculate something that may serve as the equivalent of AccountMarginLevel() variable?
Reason: