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"
Watch it run · EURUSD · 1h bars

Sample data. Not a result. The real AlgoBarsX engine ran this exact script on made-up bars, and this replays what it drew and did. It shows no profit or loss, and it says nothing about how the script would do in a real market.

Replay of this script on 150 sample bars: 0 alerts sent.

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