Create a pending every new trade at fixed distance
-
Hi guys, I tried everything but I can't do it.
I have two trades open buy and sell, with 2 pending orders for each one with 1 pip distance.
I want that every pending triggered (so each new trade) he creates a new pending with 1 pip distance.I tried for each trade, once per trade/order, also inside "on trade" But he updates pending only for buy or only for Sell
-
1 pip? both sides will get triggered every time due to spread alone.
-
@tipsywisdom I have 0 spread with a lot of symbols, however no matter the distance, I wanted to make the system work
-
if you dont share what you currently have, its hard to see the issue...
-
-

Please also note allowable slippage that the EA you are creating allows for. 4 pips.
-
@tipsywisdom What value do you suggest, 2?
-
for slippage, i dont know. No broker is going to let you trade that cheap though and get away with it. Unfortuntaely as well, thats something youll never know how it affects the robot until you start trading it on demo. With that low of pips, you probably also have to worry about your latency, VPS would be suggested.
-
pending test 2
you would have to loop for the last open order, grab the price add and/or subtract 1 point and place the pending orders based on this calculation.
-
@meshii As others have said, you may find that your broker wont allow a pending placed at such a small distance, check your journal for info on this, on the on trade tab you have purple blacks that act only on specific trade information, you also have a trail pending block so if you have to place a further distance away you can at least trail behind price.
-
@tipsywisdom said in Create a pending every new trade at fixed distance:
for slippage, i dont know. No broker is going to let you trade that cheap though and get away with it. Unfortuntaely as well, thats something youll never know how it affects the robot until you start trading it on demo. With that low of pips, you probably also have to worry about your latency, VPS would be suggested.
If I understand correctly what you wrote, the ea doesn't close the operations with 1 pip, the operations will be open all at the same time, however it will go on a vps near the broker, so no issues about latency.
@jstap said in Create a pending every new trade at fixed distance:
@meshii As others have said, you may find that your broker wont allow a pending placed at such a small distance, check your journal for info on this, on the on trade tab you have purple blacks that act only on specific trade information, you also have a trail pending block so if you have to place a further distance away you can at least trail behind price.
I have no problem about small distance, I have just a maximum number of pending.
@bk7 said in Create a pending every new trade at fixed distance:
pending test 2
you would have to loop for the last open order, grab the price add and/or subtract 1 point and place the pending orders based on this calculation.
I'll try to work in this
-
@TipsyWisdom meant that brokers dont like to get that much orders within short period of time, so they slow your order execution by some seconds which gives you slippages on open and close (or lets say the brokers lp).
the solution should work, just check that the min distance of pending orders isnt bigger, otherwise you can open market orders if the price is matched...