check profit
-
hello everybody
i am working in ea that open trade then close it and open another trade
i want to close all trades and stop the loop when profit or loss reach specific amount of money
how can do that ?
i try check profit average and it doesnt workingany suggestion?
-
@osamaababneh You need to add a 'For each trade' block on top of both.
-
@l-andorrà

like that? -
@l-andorrà thanks its working
but when i but the profit in money 10$ it stop way more than 10$ like 80$ or 50$
why? -
@osamaababneh Can you please share your whole project? Obivously there is something hindering that part of the EA.
-
-
You selected profit as pips, not as money.
-
@l-andorrà sorry i was test if check unrealized work well or not
i was talking about check average its not working well and I choose the profit as money
https://fxdreema.com/shared/AJiS9PJAc -
@osamaababneh Does it mean you confim the profit feature works correctly?
-
@l-andorrà

an example -
@l-andorrà the check profit unrealized yes work correctly
-
@l-andorrà ok i figured out how it work
it works as every trade in the loop should get an example 10$ rather than the sum of all trades equal 10$
is there anyway to be the sum of all trades ? -
@osamaababneh In that case you will need a variable in whch you should add all open trades profits. That variable can then be compared to the total sum you are looking for.
Something like this: