Reply

Modifying Pending Order, Delay after X pip, & Delay after Y second

7 replies

alirazzak

Subscriber, bbp_participant, community, 33 replies.

Visit profile

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

File: PAP.mq4

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

7 years ago #139547

Hello,

 

I will check your project and let you know

0

alirazzak

Subscriber, bbp_participant, community, 33 replies.

Visit profile

7 years ago #139549

glad to hear from you

Thanks Tomas

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

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 ..

0

alirazzak

Subscriber, bbp_participant, community, 33 replies.

Visit profile

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.

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

7 years ago #139616

Ok, thanks for the message. I will try to modify that then and let you know

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

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 …

File: PAP.mq4

0

alirazzak

Subscriber, bbp_participant, community, 33 replies.

Visit profile

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 ?

 

 

  

0

Viewing 7 replies - 1 through 7 (of 7 total)