Gain including commission and swap does not seem to work well.
-
Hello friends I want to create a rule for my EA to check if the sum of the value of all orders including commission and Swap rates are positive above 2 $ it immediately closes all orders that are open and give me a profit of 2 $
Can you please check if this is right the way I did it.
I put it on the ontick tab because I realized that the ontrade tab doesn't work.
But even in the ontick tab the way I did it, I realized that in some moments of backtesting he doesn't always close the orders in the positive, it's as if he hadn't been calculating correctly at some point.
I was wondering if anyone has any example of how I could do this using other blocks to have proof that it really is working or not, I wanted to save the sum of all commission, swap and profit values in separate variables and add them up to find out if it really is a problem in this block calculation. -
@fabiobioware It always works for me. Are you sure other parts of teh EA aren't hindering this one?
-
@l-andorrà https://fxdreema.com/shared/OyxArLenb
Hello friend, see the project as an example that I created, it is very simple and this rule does not work.
I configured to open a purchase if the RSI is below 30 and a sale if the RSI is above 70.Then I did not define TP and SL and configured other blocks to check if the sum of profit + swap + commission is greater than 2 $ that all trades are closed immediately.
So the EA should only close all trades when this profit is achieved, it works until a certain moment, but suddenly it just stops working and starts closing trades in the negative with losses, which was not supposed to happen because the rule is close "only if the sum of all orders + swap + commission was positive at 2 $. -
@fabiobioware The logic is correct. This means the problem is with your EA or, more likely, with fxDreema code for MT5. I strongly recommend you to contact the admin letting him know. Please open a new thread in the 'bugs' forum with this issue. I know he reads it.
-
@l-andorrà I put a post on bugs to report, thanks my friend for the help.
-
@fabiobioware You're welcome.