Looking for a simpler way to calculate relative DD based on EQUITY PEAKS within an existing EA.
Saw this page https://www.mql5.com/en/articles/1403 but it has many calcs not needed and it seems to only calculate relative dd based on Balance peaks instead of equity peaks.
Any math/coding gurus here who can simplify this... ?
In the end, would like to simply say:
if (RelativeDD > percent) CloseOpenTrades
Again, calculating relative dd based on EQUITY peaks between (while there are) open trades. Big difference.
Had some ideas posted on ff years ago regarding this but most of them were non working solutions. In theory, it should not be so difficult or cpu consuming.
Saw this page https://www.mql5.com/en/articles/1403 but it has many calcs not needed and it seems to only calculate relative dd based on Balance peaks instead of equity peaks.
Any math/coding gurus here who can simplify this... ?
In the end, would like to simply say:
if (RelativeDD > percent) CloseOpenTrades
Again, calculating relative dd based on EQUITY peaks between (while there are) open trades. Big difference.
Had some ideas posted on ff years ago regarding this but most of them were non working solutions. In theory, it should not be so difficult or cpu consuming.