Reply

Move Pending Order To

3 replies

odomike

Subscriber, bbp_participant, community, 32 replies.

Visit profile

9 years ago #112101

I have really been struggling to achieve this feat in my EA, but all efforts have been useless because there is no single THEN rule to tell the EA to move an already opened Pending Order to a particular price. Yes, there is a rule to open pending order at a particular price, but not to move it.

 

So, I think that this is an absolutely necessary update to EA Wizard, to allow it to move pending order to a certain price, it could be away from price or closer to price IF a certain rule is satisfied.

 

I suppose that it has to have similar entry like to Move SL To or Move PT To. Allowing us to specify the FIXED PRICE where the order is moved to or use a formula if we want the movement to follow price action.

 

By the way Mark, When is the next update to EA Wizard coming? And can this feature be integrated in it?

 

Thanks and take care.

0

JTamas

Subscriber, bbp_participant, community, 26 replies.

Visit profile

9 years ago #124280

Hi, I could solve such problem.

 

Close position also works for pending orders if you give their magic number. Then you can open it again.

 

Or, if you specify your open price level to something that is continously changing (like ask+conv.torealpips(x) or an MA) and set validity for the order and the replace true, it will close and open automaticaly until filled.

 

hope it helped,

 

cheers

 

Tamas

0

odomike

Subscriber, bbp_participant, community, 32 replies.

Visit profile

9 years ago #124284

I am not sure that I understand what you mean Tamas. What I want to achieve is similar to what Straddle EAs do. They open a pending buy and sell stop orders and then keep moving both pending orders up or down to a certain time then leave it to get filled.

 

Take for instance … The Non Farm Payroll is coming by 1:30pm (GMT+1) and by 1:25pm, the EA opens a pending buy and sell stop orders at a certain distance in pips from the current ASK and BID prices. Then keep moving them up and down, following the direction of the market price while maintaining the same distance from the ASK/BID prices. Then, by 1:29:59’pm, EA stops moving the pending orders and allows the orders to get filled once the NFP release triggers a spike in either direction.

 

Now can you achieve that feat with the EA Wizard? Maybe yes, but I have searched and searched and am yet to find the IF or THEN function that will do this for me. If you can get it done, please tell me how to achieve this.

 

Thanks in advance.

 

Michael.

0

JTamas

Subscriber, bbp_participant, community, 26 replies.

Visit profile

9 years ago #124299

I have a very similar thing exactly for such purpose. I don’t know however if there is any purpose of the previus five minutes where the orders are just moving and not get filled. It has a danger of getting accidentaly filled, for some brokers tend to wilden the spread for moments when liquidity drops or draw spikes that are not representing any real price movements. I experienced such with Oanda for example, where the “straddle like” orders were misteriously canceled or stopped out seemingly randomly on boty sides. (while the same ones were executed well with other brokers)

 

So I think it is better to put the orders exactly at 1:29:30 or so. The other thing that you have to mind is the execution. Many brokers operates poorly on such events, most likely the don’t have that much providers, or do it willingly, but it is not unusual to have your orders filled at the bottom/top of the movement, as an exuse of low liquidity. You only have a good chance with bigger brokers, I do have good experience with Dukas, Forex.com, and Ironfx.

 

Now on the matter:

IF

pending order exist(long magic numer) is not true                  // (same for short)

and time current > get time(h.min.sec)                                  // < – of couse these will be parameters. Its better to have it begin 30 sec. before the release, and of course you have to mind that the broker might display time

                                                                                               //  differently from your timezone. You can skip this if you sit there and just launch the EA right before the news.

 

and orders opened today(both directions) < given number        // this is important because you don't want it to put more stradles after the pos is closed. You can also give an until deadline thats perhaps even better

 

THEN

Enter at stop long

price : ask + convtorealpips(…)                               // pip distance as a parameter

SL, TP, trailing of your choice as variable

peferably some breakeven ops, bars valid limitations

replace existing should be false

 

Enter at stop short

price: bid – convtorealpips(…)

– || –

 

Now if you want that moving pending, you can set bars valid to 1 and it will reopen, or take out the “pending order exist” rule and swich replace existing order into true.. In this case as the ask/bid changes it will place a new order clearing the older. Some brokers though might get pissed on the too many order changes and kicks you out.

 

Hope it helped,

 

Cheers

 

T

0

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