How to set buy and sell pending orders every x pips
-
I’m trying to build a robot that puts buy/sell pending orders every X pips and replaces them once take profit is hit. Can someone help me with this? Thank you
-
I can figure out the rest of the code myself just need help figuring out this part of the EA...
-
I’ve tried pending orders in grid block but it stacks a bunch of trades, thinking maybe a loop to refresh the pending orders that reach tp and replace them not stack them?
-
@alexanderjohnson21 use the no pending order nearby block.
-
@hadees thanks for the help! changed that up but is still putting more than one order but way less stacking up.Heres my project https://fxdreema.com/shared/8Pwq6jHae
I mainly want stop orders but its adding limit orders, any way to do this? and i have my closing parameters to close all losing trades once they become greater than 2 percent of my balance but thats not closing right as well, what am i doing wrong guys?
-
Hey man i think you need some kind of condition to place the trades and then that block wont place another within x amount of difference. Within the buy pending order/ sell pending order use the price offset.
-
Take profit is hit? Which take profit? I don't really understand what it needs to be done.
By the way, blocks 18 and 19 are not correct in the project above, they would not do what you imagine, they are not to be used with Bucket blocks.
-
So i was able to figure the way to do it, put a grid indicator and draws lines and ea uses them as reference points... works well now i need to put some type of filter like adx. I made the filters but logic is off because it goes crazy with deleting and adding! @fxdreema would you have any guidance?
https://fxdreema.com/shared/cVNMAThib
The series thats turned off is the adx filter stuff thats not right ... when adx is above 25 ea only has buy/sell stop orders if below 25 ea has buy/sell stop and limits per object (horizontal line).
Anyone else have ideas?
-
How many lines does this indicator create? Because these "For each Object" blocks are supposed to pass for each object that is found, and in them you search for horizontal line. That "Arrow type" that appears is some visual bug, don't look at it
So if you have 20 horizontal lines, expect 40 or more pending orders.