Calculation drawdown of balance and equity in mql5
-
Hi, I need a block or a formula to calculate the balance and equity drawdown as a percentage or as a real number. in mql4 there was the trade statistics function that allowed to do it, but in mql5 this function was removed. Do you have any idea how you can do even in mql5, I need to close the open positions based on the drawdown. thank you....
-
I know how to do it on mql4, but on mql5, sorry. Maybe roar or miro can help?
-
With mql4 I also know how to do it through trade statistics, but it only works on equity and doesn't work with balance. So I need to do it in mql5 where maybe the bug on drawdown balance has been fixed. Anyway thanks anyway, for your kindness.
-
@pontedruse
How do you define the drawdown in this case? The % fall from record high balance? -
@roar said in Calculation drawdown of balance and equity in mql5:
How do you define the drawdown in this case? The % fall from record high balance?
Yes, I'll give you an example, I start with a capital of 3000 usd, then the balance reaches 20,000 usd and then drops to 16,000 usd.And then I would like that after a 20% drawdown that is 16,000 usd all open positions close
-
@pontedruse said in Calculation drawdown of balance and equity in mql5:
@roar said in Calculation drawdown of balance and equity in mql5:
How do you define the drawdown in this case? The % fall from record high balance?
Yes, I'll give you an example, I start with a capital of 3000 usd, then the balance reaches 20,000 usd and then drops to 16,000 usd.And then I would like that after a 20% drawdown that is 16,000 usd all open positions close
-
@pontedruse
Ok, I don't know if there is some simple way to do this, but you could just keep track of your highest balance, and then compare that variable to your current balance -
@pontedruse From what I understand, this is about equity vs balance. This was my very first question on FxDreema. It is for stop loss case, but I guess it could be for bucket of trades also. Here is the post.
https://fxdreema.com/forum/topic/6480/stop-losable-positions-at-1-of-equity -
By the way I wrote to the author in email. I will post a screenshot of it here, just in case:

https://fxdreema.com/shared/3j3nzX6Hb
https://fxdreema.com/shared/EfT7mIZqe -
@fxdreema said in Calculation drawdown of balance and equity in mql5:
By the way I wrote to the author in email. I will post a screenshot of it here, just in case:
Thanks @Fxdreema !! it worked well
