How to open new order at the same price of the closed trade
-
I try to build a grid EA. I need to find a way to:
A buy trade reach take "profit" and closed.
open a new Buy pending order at the same price (open price) of the closed trade ( which is just closed).I find some ways to do that, however, it miss the open price of closed trade.
Any suggestions ?
-
@migen in "on trade" section

-
@ambrogio You should select the purple option instead of the pink one. You can find it just by selecting the purple 'on trade' option in the display menu.
-
@l-andorrà you are right!
-
@ambrogio No problem.

-
Hi. Could you please explain how to open new order at the same price of the closed trade like you did for the previous user as I tried your method and it failed to work - Thanks.
-
@jacksonuk Are you sure you followed the exact procedure as explained above? It works that way (including my correction, of course).
-
@ambrogio I’m really grateful to you for sharing this slide. I had been stuck on this point for a long time, but you solved my problem in an instant. GOD bless you
-
@alisher2386 you're welcome!
-
Is there a logic diagram? I don't understand
-
Can't you see the images above?
-
@ambrogio i have one more issue hopefully you can help as earlier. i made an EA that automatically closed TPS and generate new orders at same positions , now i want that all of trades should be closed when equity is greater then a certain profit number , problem is that when TPs hit balance increased also that's why equity > balance is not working. kindly guide.
-
@alisher2386 roughly this way:

-
@ambrogio bro .. i have highlighted 2 things
1st that numeric box should be filled with constant or this variable as you mentioned
2nd . what is +500 for
3rd. these blocks should be created on "on Tick" or " on Trade " segment ?
kindly explain this slide in words as well . i shall be grateful
-
Create a variable StarttEquity, once a day (at the beginning) it saves the actual equity. 500 are money, create your constant for it. So with condition Equity>= Start equity + 500 close all trades
-
@ambrogio thanks bro.... these blocks should be created on "on Tick" or " on Trade " segment ?
and if our trade is closed by this equation . we can start our new trade at the same day , because we are using once per day block or we have to change magic number before taking next trade at the same day ?
-
in "on tick"
It depends on what you need.....
What do you need? -
@ambrogio Thanks, bro! You helped me a lot. I am trying as per your guidance. If I have any queries, I will disturb you again. Hope you don’t mind.
-
@alisher2386 dear .. when i have take actions as you said but EA opens pending orders and then close all pending orders

-
please, share the link to your project