Hi Adam,
I only use this rule in my test strategy, not the production version.
In case you receive a margin call, it's too late to fund your account anyway.
By using a brokerCommand -> GET_POSITION (see
https://zorro-project.com/manual/en/brokercommand.htm), you can validate which positions are still active.
Yeah, you can add an alert warning. For example when your margin reaches 80% of your available funds:
if(MarginVal / Equity > 0.8)