daily profit target help
-
@l-andorrà hey am looking to get asssisstance i want to have a daily profit target per day example if ea makes 5usd overall profit calculating both open and closed trades ea should stop trading for that day and resume next day,, example i assume i have dailly target of 5 usd trade 1 closed with 2 usd and trade 2 closed with 3 usd the toatal profit is 5usd close ea resume next day thats what i want please assist
-
@kenya254254 Have a look in the bottom right.
-
@jstap Made a change so it resets hours to 0 once per day.
-
@jstap okay thank you very much can you make an example with this particualr mt5 https://fxdreema.com/shared/5j9icZPTb
-
@kenya254254 Have added a few comments so you can see what's happening:
-
@jstap hey thanks very much for your assistance but i think we still not there yet
it did not work as expected here is the thing
assume daily target is 10usd but within that day you have 1 trade closed @ 2 usd profit another trade close with 4 usd profit another trade close with 2 usd profit i need it to calculate the overall profit for that specic day if the totall profit for the closed and open is 10 disable ea for that day -
@kenya254254 That should be how it works, but works out a daily percent of the account balance, the same principle will work for a fixed amount, just put a constant in cell rather than the current variable. The logic is if profit between all open and closed trades = daily amount, close trades and stop for the day. Let me know if is not doing as wanted.
-
@jstap thanks but i have tested on tester its not working check it below in full
https://fxdreema.com/shared/2x9ywTr2b thanks -
@kenya254254 Not sure why but that setup works on mt4 but not mt5, THIS is working.
-
@jstap if you help me solve this i will donate something to you for helping
-
@kenya254254 Have already done it in the last post?
-
@jstap its not working for my mt5 i need in mt5 to work
-
@kenya254254 I an not sure why this doesn't work, https://fxdreema.com/shared/8EVePrfnd, once per day it resets the hours but not the bool trade, this prevents other trades opening. Maybe someone else can see why it's not working, if you send this to the admin they may be able to fix the problem.
-
@jstap Block number 31 should be executes before any other one at the beginning of each day. Otherwise the variable will not be correctly initiated.
-
@kenya254254 @l-andorrà I have just changed these block numbers to 1 & 2 and all is working as required.

-
@jstap can you send me please
-
@jstap not opening any trade
-
@l-andorrà hey this is not working not counting the history trades as it should i want it to disable once profit target for the day is reached counting the history trades as well
-
@jstap hey send me working link please
-
@kenya254254 https://fxdreema.com/shared/CLfwZDRKd, this is checking history and current trades.