closing trades when the indicator gives the opposite signal before the take profit or stop loss has been hit.
-
Hi, i'm wondering if someone could help me. How can you close a trade if the indicator gives the opposite signal before the tp or sl is hit. For example if there is an ongoing buy trade but the indicator gives a signal to sell before I have hit my take profit or stop loss. And how can I record when this happens?
-
I would just like to clarify, I'm wondering how I would be able to note this type of trade closure down as something separate to the trades that have hit the take profit or stop loss. So if the trade hits stop loss = loss, take profit = win, closure before sl or tp = false result. I want to know how to save how many wins/loss/false results I got. Thanks.
-
@lubolover You can create a boolean variable and connect it below this block on the 'on Trade' tab:

-
@l-andorrà oh wow, thanks! You seem to know just about everything.
-
@l-andorrà

Would I have to make the variables like this above?
or
just type in what I want it to be like this below?

-
-
@l-andorrà Thanks again!
So my variables should be like this?:

And should the on trade section look like this:?

with the rules for the variables in the trade closed block? -
@lubolover Not exactly. Can you please share your project? That will be easier to review.
-
@l-andorrà Yes of course, here it is. https://fxdreema.com/shared/NisrnBo0d
btw I am very grateful that you're helping me. Thank you. -
@lubolover I see that will be much easier that I thought.
- Remove all blocks from the 'On trade' tab. They are not necessary.
- Move both 'close trades' blocks from its current position to that below of 'buy/sell now'.
- The one below 'buy now' should be specified for sells only and the opposite for the one below 'sell now'.
-
@l-andorrà Okay, thank you! So will that allow it to note down how many "wins" "losses" and no of trades that closed before sl/tp I get?
-
@lubolover No. You will need a whole new structure for that.

