fxDreema Problem check profit
-
I am currently working on a script to close all open trades.
I always activate this manually if all my open trades in their total sum have gained 1.5% of my capital. It works quite well, but I wanted to automate this step in an EA. Have been experimenting for over a week and searched the forum to find something suitable, but to no avail.
Have experimented as follows, but after closing the trades often came out a minus. Please be so good and post here a fitting example of what this task exactly fulfilled.example
Trade 1 -12.25
Trade 2 + 5.25
Trade 3 +17.00
...........................
Total 10.00In the following article this example was mentioned
https://fxdreema.com/forum/topic/5726/profit-for-all-trades/3fxDreema ADMINISTRATORS
April 10, 2018, 8:39 pmThere is no option, but the option is in money. As you probably know, you can use native MQL functions in all input fields. So the default value is 0, but you can put something like:
AccountBalance () * 3/100.
AccountBalance () gives you the current Balance, the amount of money you had before opening the trades. Let's say that the balance is 1000, then 1000 * 3/100 equals to 30 (dollars)
How can I implement this, where do I have to write this in, because I tried this but there was always an error
Thanks in advance
sevdarkoSorry googletranslate
-
@sevdarko Hi, this should work:
https://fxdreema.com/shared/BjWe39Kkb
Just check the box next to the money filter so you can input the dollar amount each time, I am guessing that you don't want to have to sit around and monitor the trades after you make them. This should do it?