Reopen closed order
-
Hello @fxDreema. All right?
Would you like to know how to reopen the last closed position in SL?
Do you have a practical way?
If my trade is stopped, I would like to open a pending order at the same price as the stopped trade.
-
Just switch to on Trade tab, start with Trade Closed block, and continue from there.
-
-
@tcanuto Just to confirm. You want to open a new pending order at the same price a previous traded closed by hitting the SL. Correct. You cannot do that. Pending orders need a minimum distance in pips to be programmed for the platform to accept it and that depends on the broker. What minimum distance would you accept?
-
@l-andorrà I would accept as little as possible, which in my case would be 0.500 points.
-
@tcanuto I still think that's too short. Probably your broker will not allow it. However, this is the way to do it for 0.5 pips. You need to do it on the 'on Trade' tab.

-
@l-andorrà Remembering that I need to reopen the previous buy or sell price that the SL was triggered, not at the current price.
Reopen the same order at the same price as before.
-
@l-andorrà All right? I tried, but it's not working.
-
@tcanuto Ok. What you mean is that, when a buy is closed because its SL was hit, a new buy is to be opened ath the exact same open price and SL as the closed one. Correct?
-
@l-andorrà That's right.
-
@tcanuto Then you need to create two variables to catch the previous open price and stop loss values and do this in the 'on trade' tab.

As I have no idea how your trades are open I assume you already know how to store those values.
-
@l-andorrà Hello. Thanks for the info.
I believe that we are getting close to solving this doubt.
My operations are opened through the Highest Price (Candles Period) and the Lowest Price (Candles Period), within Market Properties.
How do I store this information from the previous trade in a variable?
-
@tcanuto You can do this BEFORE my previous tree structure:

Sorry, I used different variable's names. You should use exactly the same as per my previous post.
-
@l-andorrà Thanks again for the help.
Unfortunately it is still not working.
See if something is wrong: https://fxdreema.com/shared/4o8eAERvb
-
@tcanuto Can you please check those variables are correctly stored by visualizing them this way?:

Just add this block below a 'pass' one on the 'on tick' tab and you will see them on your screen.
-
@l-andorrà Strange... Now it's working... but not yet as I need it. It's not reopening the previous order. It's opening at another price.
-
@tcanuto What values are those? Can you please upload a screenshot?
-
@l-andorrà Yes of course.
I need it to reopen at the previous price, on the blue line, not on the red price.

-
@tcanuto Honestly I cannot find any issue with the logic you use. I find it is correct. The only thing I can suggesto you os contacting the admin and let him know. I see you are working on Mq5. I know mq5's code for fxDreema is not as developed as that for mq4. Maybe that is the reason.
-
@l-andorrà I suppose I may not have understood. I need it to reopen at the price of 5568,000, as shown in the image above.