Buy/sell stop
-
I am trying to make EA which can place buy/sell stop around CMP at certain distance, once that position is triggered EA will place another stop orders at same distance after checking any position/order doesn’t exist in that range. Any help will be appreciated. Thanks in advance.
-
What dos CMP mean?
-
Current market price
-
For eg
Lets say
Gold cmp is 2600
Buystop 2605 tp 2610
Sellstop 2595 tp 2590
Now if 2605 is executed new buystop at 2610 tp 2615
Sellstop at 2600 tp 2595
Now it comes back to 2600
Sell trade is executed but no action taken as as there is open position at 2605 and sellstop at 2595 -
In other words how distance can be calculated in price to place new buystop or sell stop,
If price is 2700 how can I check distance and place new sell stop at 2695.
I am not able to measure that distance in check distance block.
Again thank you in advance. -
@Ruchit1341 You can try this general idea:

Please notice that this is the 'on trade' tab, not the 'on tick' one. Every time a pending order is triggered, you can program the next one. In my example, the purple block is selecting buys only. You need to create another block tree for sells.
-
Thank you for your reply, I will try this and let you know result.
-
Hello again,
Sir in this I can only set setop orders when price is going up,
I want set where pendingorder at certain distance even when price is going down.So from 2700 to 2650
At every $5 distance EA will place pending orders at 2695, 2690, 2685.. 2655 -
Then you need a second structure exactly like that one but typing '-5' instead of '5'.