Is there an indicator or an EA for leverage/ margin reach warning in MT4

hi there,

is there an indicator or EA in MT4 which warns me if i am reaching my margin.

for ex : my account is $500 and leverage is 1:200

have 6-8 positions of various lot.

is there a way to know i am reaching my margin

i lost 2 of my positions as i reached below the 100% margin which i have to maintain.