Don't open new trade after TP hit
-
Hello, I created an rsi ea that opens buy trades when the rsi exceeds 60 and sell trades when the rsi falls below 40. I've set a take-profit but no stop-loss. When the rsi falls below 40, the buy trade will be closed. When the rsi rises above 60, the sell trade will be closed. So the problem is, when the TP is reached, it opens another trade in the same direction. For example, if it opens a buy trade, when the TP is reached, it opens another buy trade in the same direction. I only want it once. If the TP is reached, I don't want to open another trade in the same direction. Please provide a solution.
https://fxdreema.com/shared/lOOdQ1xB

-
@sheeraz On the on trade tab, trade closed by TP (purple block) set flag, on tick tab check flag before buy/sell, reset flag when you want new trade.
-
After this, what to do? I don't know what a flag is. I'm new here. Can you make it for me please?
-
@sheeraz The flag is on the left in green, use set flag (bool/true/false), set to false under the purple block, on tick check bool flag before buy sell, reset back to true once per (daily) bar, or whenever you want trade to restart.
-
@jstap Is this correct? https://fxdreema.com/shared/iTBFNRHBc


-
@sheeraz The flag looks wright but you cannot share between buys and sells, you also need something to reset back to true.
-
@jstap How to reset back to true?
-
@jstap I hope you will help. I don't want to waste this EA.
-
@sheeraz A condition block, or a once per bar block with a flag block underneeth.
-
@jstap I am totally confused about where to add "once per bar block". I don't think I will be able to fix this. Can you please make this EA and provide me with the link? You can make it in seconds. Even though I am ready to pay you, I don't want to waste this EA.
-
@sheeraz https://fxdreema.com/shared/NHt7mvG9b you'll see haw to reset flag in here.
-
@jstap Is this correct? https://fxdreema.com/shared/JHZndBYmd


-
@sheeraz Looks good except check flag needs to be set to true:

-
@jstap Do you mean that the "check flag" of both blocks must be true?
Please check this out now: https://fxdreema.com/shared/OjNRGrJNd
-
@sheeraz Yes so when TP hit trading stops until the flag is reset.
-
@jstap Thank you so much. I will get back to you if I find any problems with this EA after subscribing to FXDREEMA. Right now I am in free mode and it is not downloading.
-
@sheeraz I hope it what you looking for
https://fxdreema.com/shared/niXNoQtKd -
@abbas25 No mate because this is not using the on trade tab for when TP is hit, check pose 2 above to see how is done.
-
@jstap yes you right but as he want with his strategy
-
@abbas25 He already had an EA doing this but if TP hit it place another trade, I showed how to stop trade once TP hit.
