I need help Control loss rate
-
I hope that the daily maximum loss of the account balance is 5%. If the loss reaches 5%, no more trading today, and the calculation will continue at 0 o'clock the next day.how do I need to set up an EA?
-
@jxlibin1987 Calculate "AccountBalance()*0.95" each day and compare that to current balance before making trades:
https://fxdreema.com/shared/DEQKwXD6d -
@roar Well, I don't think that will protect the account very much as already opem position may exeed or even blow account that way. I think you need to store once a day the opening balance (or equity) in a variable and then take realized and unrealized profits (or losses) and check if that exeeds 5% of the balance (or equity).
-
@roar Where do you set it, once a day, meaning you can only trade once a day? For example, I traded 4 times today, with a loss of 3% for the first time, a profit of 4% for the second time, a loss of 3% for the third time, and a loss of 3% for the fourth time. Then I need to stop trading at this time, or the first time 3 %, 3% for the second time, and 3% for the third time. At this time, you need to stop trading, and you can trade again at 0 o'clock the next day. What should I do?
-
@jxlibin1987 Does the algorythm have to close trades when the 5% limit is exeeded or not? If you only count the realized losses per day it is easier.
-
@trader-philipps Yes, I think the same. I need to control losses, control profits, and then continue to lose. For example, today I made 3% for the first time and 3% for the second time. The third time I lost 5%, I should stop trading, so I can still make 1% today, and not the fourth time I stop trading and lose 5%
-
@trader-philipps Yes, the first profit is 4%, the second profit is 6%, the third loss is 5%, then it is closed, if the third loss is 3%, the fourth loss is 2%, then it is closed after the fourth, today You can guarantee a profit of 5%, otherwise there will be a 10% profit today, and the final result is a loss of 5%.
-
When you say 'second/third/fourth time', do you mean closed trade today?