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
1
alert "Daily risk guard"2
check: every 1m3
repeat: every time4
cooldown: 4h5
6
when history.today.pnl < -(2% of account.balance) or account.margin_level < 150%:7
notify "Daily P&L {history.today.pnl:$0.00}, margin level {account.margin_level:0}%"What this script says
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}%".