hi everyone, I searched online and on the forum how to create 2 lines of code to create a DD% filter, in the end, almost discouraged, I decided to create an EA with all the essentials inside to be able to create this filter, I leave you the link to the project
https://fxdreema.com/shared/RPtcSNQ0e
explanation:
the code is really nonsense, just create a conditional block in which the initial balance sheet and equity are examined by executing this formula:
constant DD = 95
if equity <= balance [(*DD %) it must be entered in the appropriate "adjust" space]
example: €93 <= €100 (*95%)
= €93 <= 95
= TRUE
= close trade
what happens is that every 5% of DD the EA will close the orders, this function can be used anywhere, even to create a daily DD, in which other blocks are used to stop the EA
Let me know if I was helpful to you and what you think 

