This is my method of using Daily Drawdown (in percent) which then closes all trades and prevents further trading until the next day. Many users have unknowingly helped me along the way so here is a small gift back to anyone who may find it useful. This really comes in three parts.
1: on Init - Run daily drawdown calculation (used when you apply the EA to a chart, otherwise the calc wont grab)
2: Once per day, run daily drawdown calculation and turn on trading (block 1)
3: On tick - Check equity if equal or below balance calc, close trades and turn off trading (block 1)
There are some extra options in my setup, a counter so you can visualise daily drawdown hits in testing and also terminate terminal (if set to true). You can modify this to work as max profit for the day also.
https://fxdreema.com/shared/fcxGpeNKd



