Close position please help!
-
I am using the 'Close position' feature like this: When the account balance exceeds $20, it automatically closes all buy and sell transactions. However, I don't want this. For example, I have three sell positions and three buy positions. I want it to close the sell positions when the total of the sell positions exceeds $20, or similarly, close the buy positions when the total of the buy positions exceeds $20. How can I do this? Thank you in advance for your help

-
Use bucket of trades to get the value of each type, in separate trees check value and close the one type.
-
Could you please send here a sample?
-
Like this: https://fxdreema.com/shared/PTVo0lHZd
-
Can also use Check profit (unrealized) block, set for Buys/Sells.
-
@jstap thank a lot. I need to add all of them to the expert advisor, including the pass part, right? I also wrote the amount of $ 20 under the profit trade section, will it be like this?

-
If you look in your input (on platform, is the constant), you can chance this number, if added to adjust this will be added to the constant, so wants to be empty. As for the pass I would add if it was me, might not be needed but you will have to test to find out.