Margin and exposure

Margin and exposure is an alert that checks every 5 minutes and fires only once.

account and history

margin-and-exposure.abx
1alert "Margin and exposure"
2check: every 5m
3repeat: once
4expires: 30d
5
6when account.free_margin < 20% of account.equity or positions.len >= 8:
7notify "Free margin {account.free_margin:$0} with {positions.len} open positions"
What this script says

Margin and exposure is an alert that checks every 5 minutes and fires only once.

When free margin is below 20% of equity or the number of open positions is at or above 8, it sends the notification "Free margin {account.free_margin:$0} with {positions.len} open positions".

Try this in the Terminal. AlgoBars is free: $0 a month, no card needed.

Create my free account