Modifying Pending Order, Delay after X pip, & Delay after Y second
7 replies
alirazzak
7 years ago #115592
Hello
Need help and advise please
Im currently doing my price action EA with this simple strategy :
1. Place PendingOrder both buystop and sellstop at +15 pips and -15 pips from “bid” price.
2. Wait if price move X pips up or X pips down (from bid price above)
3. After rule number 2 above completed ,wait for Y second
4. After rule number 3 completed and then modifying the Pending order both buystop and sellstop at +15 pips and -15 pips from current new “bid” price.
Im using :
X = 3 pips
Y = 30 sec
I try and try in hard way but still struggling.
Im also add this code to the EA
Here all my work :
Thank You
tomas262
7 years ago #139547
alirazzak
7 years ago #139549
tomas262
7 years ago #139589
Hello,
is the strategy working for you or is it working not correctly according to your rules?
I have tested it and it places buy/sell stop orders ..
alirazzak
7 years ago #139592
its not working correctly to my rule
EA place buy stop and sell stop and then always modyfing pending order every tick but only on buy stop ( sell stop cant modified).
rule number 2,3,4 didnt works.
tomas262
7 years ago #139616
Ok, thanks for the message. I will try to modify that then and let you know
tomas262
7 years ago #139660
Hello,
I have modified your EA and now it seems to do the job correctly and moves both orders to new prices
If price moves more than X pips from the original bid then EA waits for Y seconds and adjust pending orders
You will need to solve some situations I think like: what happens when one of those orders becomes filled …
alirazzak
7 years ago #139678
pip counter and waiting time is working now
Thank You very much Tomas..
not bad in backtest delay 10 sec with adding exitbar 1 and trailing stop, and have good potential
So if one of those orders becomes filled and then wait until it closed and then EA restart to rule no. 1
Any idea how to do that ?
Viewing 7 replies - 1 through 7 (of 7 total)