How do I close the first deal when the number of deals becomes 2? So that there is no more than one transaction in the same direction in the market
-
Example
A random buy deal was opened and then + ten points, another buy deal was opened.
When the buy total reaches 2, I want to close the previous deal -
@khalids222 You can do this on the 'on trade' tab:

-
@l-andorrà THANK YOU SO MUCH
-
@l-andorrà Unfortunately, it didn't work
-
@khalids222 Is there another way for that?
-
@khalids222 Close order before buy/sell. if none running then there is no trade to close, if one running then it will close as it opens the next.
-
@jstap said in How do I close the first deal when the number of deals becomes 2? So that there is no more than one transaction in the same direction in the market:
Close order before buy/sell. if none running then there is no trade to close, if one running then it will close as it opens the next.
Thank you very much, your ideas are always beautiful, I will try
-
@khalids222 Can you please share the link to your project to check it out?
-
@l-andorrà
I'm so sorry, I didn't notice your question
https://fxdreema.com/shared/4Np6waoLc -
@khalids222 In this case, the close does not work well
-
@khalids222 Your logic is correct. If you want to limit the maximum number of open trades then you should use a blue 'ckeck trades count' block. That will stop opening new trades.