Help with "Check Profit" Please
-
Can someone help me with me settings in the "Check Profit" block. I have it connected to a close trades block, and want all trades to close when a net daily profit of $20 is hit. The block will close trades when the value of open trades is $20, but it doesn't take into account any losing trades that have already been closed. Here are trades from today:

You can see it closed the 3 buy trades when profit was $20, but didn't recognise the 2 losing trades closed earlier in the day. These are how I've set it up:

Thank you . -
Add a shared link to see what you have done
-
What you need is using variables to store the values of those closed trades. Something like this:
-
@jstap here's a link to the project: https://fxdreema.com/shared/2zK8P2FFd
-
@l-andorrà thanks, but doesn't this just look at the current open trades? I'll try it though, so thank you for replying, much appreciated.
-
Try normalising your block IDs as this could be causing problems, possibly the time 00:01:00 is causing problems - set it back to 00:00 and see if this helps, on MT4 this would work,
-
Try set "Time 1 is hours relative to Time 2" to NO
-
@jstap Thanks, I will try changing the time setting. Can you explain what you mean by "normalising" block IDs please?
-
@sktsec Thanks, i'll try that and see if it makes a difference.
-
@sktsec could be wright I didn't notice that, normalise block id's is in options project options, I mean number 1 - 20
-
@Matatika Yes. You can also take closed trades by doing something like this:
https://fxdreema.com/shared/bKbTjhrse
In my example, I'm counting pips, but you can do it with profit.
-
@l-andorrà Thanks for this, I haven't used loops and formulas etc before so will up-skill my knowledge and incorporate into the EA and test. Cheers
-
You're welcome.