Daily risk guard
Daily risk guard is an alert that checks every 1 minute, can fire every time its condition is met and waits 4 hours between alerts.
account and history
alert "Daily risk guard"check: every 1mrepeat: every timecooldown: 4hwhen history.today.pnl < -(2% of account.balance) or account.margin_level < 150%:notify "Daily P&L {history.today.pnl:$0.00}, margin level {account.margin_level:0}%"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.
Daily risk guard is an alert that checks every 1 minute, can fire every time its condition is met and waits 4 hours between alerts.
When today's closed profit or loss is below minus 2% of the account balance or the margin level is below 150%, it sends the notification "Daily P&L {history.today.pnl:$0.00}, margin level {account.margin_level:0}%".