Please help how to add the pending order immediately at the same price of previous open trade every time that when the opposite trade get stop loss.
-


I set the ea buy with stop loss is 5pips and in the same time set the sell stop with stop loss is 5pips then the price go down and touch my sell stop and touch my Stop loss 5pips of buy trade, so right now Its only have sell trade because buy trade was got a stop loss, so I want right now to create or add the buy stop at the same price of previous open buy trade over near my sell trade every time that the opposite order get stop loss, and also if it is opposite direction situation so it should make it same as like this step, if it is sell and pending order buy was touch and my sell trade get stop loss, so it must be create or add the sell stop below near my buy trade every time that the opposite order get stop loss. please help me thank you.
-
@zarbitz You need to add a shared project so what is inside the blocks can be checked, for a start though you will need to use groups so the pending's have a different number to the instant, then the pending becomes a trade it uses the group number to adjust, the on trade allows greater control on created trades.
-

@jstap thank you so much try to help me, here is the link of my project https://fxdreema.com/shared/hLKkUYZI
I use the group of number but I don't know why its still always to much of pending order when the price go, when it get a stop loss I just want to recovery an order by create or add the pending order at the same price of previous open price near my on trade order every time that the opposite order get stop loss, Please help me, thank you -
@zarbitz Go to project options and normalise the block id's to correct the crazy numbers, if you want to add trade once one closes remove the pending trees from on tick and add what's in the picture to the on trade tab, as is as soon as a trade has been created a pending is created at the open price of a previous closed trade, this is then the start of a loop so likely keeps placing at the open of all previous trades, see if this works, let me know if not:


-
@jstap how would you get the last pending order closed price to open again another pending order with the same price?
-
for each closed trade-close price will give you the price. On trade tab trade closed connected to buy/sell will create a instant order.
-
@jstap Sorry, I'm not getting how to get the price of the entry of the pending order closed (when it had to entry first) and the new price for a new pending order (with the same price as the last)
-

@jstap Hello I put pending order into on trade, but my pending order open price level is not pending in the current open price, it pending at so far away from current open price, please help me how to put the pending order at the current open price when the price go far away from the current open price, thank you
-
When a pending order opens it becomes a trade, the pink in loop needs to be used under a for each block.
-
@jstap thank you so much, its already work.