Calculating the Margin call as a Bar

 
Good day all,
I'm trying to figure out a way to get a value for where the Margin call would happen. I can calculate the margin level light this:
 Margin_level = ((AccountEquity()/AccountMargin())*100);

but I want to know if there is an easy way to find out, if the trades in a buy drop till the margin level is less then 20%. what would the graph price be, that the margin level would take place.
Thanks
 
To answer my own question, for those you might be interested, because I found this useful for testing purposes. This is what I came up with, it's pretty close to right, as in it might me like 2-3 pips off.
Margin_Call_Area = Ask-(((AccountEquity()/AccountMargin())*100)*Point);
Welp, Enjoy.
 
May be you need margin level?
Margin_Level = AccountMargin()/AccountEquity()*100;

For solely long position

Margin_Level_Price = AccountMargin()/(AccountBalance()+(OrderOpenPrice()-Bid)*OrderLots()/Point*MarketInfo(Symbol(),MODE_TICKVALUE))*100;
 
Or more exactly

Price=OrderOpenPrice()-(AccountMargin()*100/AccountStopoutLevel()-AccountBalance())*Point/MarketInfo(Symbol(),MODE_TICKVALUE)/OrderLots();
Reason: