Pending Order EA

 

HI Guys,

Can anyone help me making an EA of pending Orders........

I have found this guys idea on another fourm which is exactly like mine...

If market price equals = X or Current Price

then place buy stop order at market price Y

and...place sell stop order at market price Z

Optional: If one order is opened then second order is cancelled.

I'm hoping to use this EA with my hand drawn Fib Ratios, so orders can be placed while I'm asleep

Thanks

Babar

 

anyone got any clue how can I make this EA ????????????

thanks in advance

Babar

 

Hi Guys,

Can you please help me making this EA

The strategy is

Exmple

Current market price = x

Place pending BUY order on x + 100 Pips

Place pending SELL order on x - 100 Pips

If BUY order executes then cancel SELL pending order and Vice Versa

Stop Loss = 50

Take Profit = 50

Trailing Stop = 50

I will really appreciate your help in this matter

Thanks in Advance

Babar

 

Do you already have an EA started?

Let me see if I understand your goal. You want to be able to plug in a price. If the market moves to that price then you want to place a stop order to be triggered if the price moves back to a certain price?

 
HoggZilla:
Do you already have an EA started? Let me see if I understand your goal. You want to be able to plug in a price. If the market moves to that price then you want to place a stop order to be triggered if the price moves back to a certain price?

HI Hoggzilla,

thanks for your reply....well i want to put a pending BUY and SELL order 100 pips away FROM THE CURRENT market price......and if the BUY order it excuted the SELL pending order has to be cancelled......thats it really.......

Thanks

Babar

 
firedave:
Hi Babar, try this EA. It's only set two pending order once and if one order filled it deletes the other order (OCO). You could set the EntryLevel if you don't want to use the current price, or set it to 0 (zero) to use the current price (bid). If the order price is too close to current price (less than 10 pips) this EA will reject it. Hope this help

Dave you are the man.......!!!!!!!!

thanks dude.......i will try this and will let u know.

once again thanks

Babar.

 

Hi Dave,

Ihave tried this EA....it works fine...but it places order on every tick...is it possible that it places Pending Order on the current price and thats it...do not place further orders...cuz it places orders on every tick....and i will have 100s of orders within few minutes......

Thanks

Babar

 

Hi Babar, try this EA. It's only set two pending order once and if one order filled it deletes the other order (OCO). You could set the EntryLevel if you don't want to use the current price, or set it to 0 (zero) to use the current price (bid). If the order price is too close to current price (less than 10 pips) this EA will reject it. Hope this help

Files:
 
babarmughal:
Hi Dave,

Ihave tried this EA....it works fine...but it places order on every tick...is it possible that it places Pending Order on the current price and thats it...do not place further orders...cuz it places orders on every tick....and i will have 100s of orders within few minutes......

Thanks

Babar

Okay, my mistake. Revised the EA, see my previous post. Hope this help

 
firedave:
Okay, my mistake. Revised the EA, see my previous post. Hope this help

HI Dave,

I have noticed one thing that this EA doesn't delete the pending order if one of the pending order is open (if BUY is open the it doesn't delete the Sell pending order) and 2nd that the trailing stop doesnt work...can you please fix this...

Thanks

Babar

 

Can You Add Time Settings, Please??

firedave:
Hi Babar, try this EA. It's only set two pending order once and if one order filled it deletes the other order (OCO). You could set the EntryLevel if you don't want to use the current price, or set it to 0 (zero) to use the current price (bid). If the order price is too close to current price (less than 10 pips) this EA will reject it. Hope this help

Hello FireDave,

I've been playing with the PendingOrder EA and have been trying to add some Time Constraints into the code. I haven't been successful yet. Anyway, was wondering if you, or any other programmer in the forum, could possibly assist me. What I want to do is add a time value setting into the EA so that it will only open pending orders at a specific time of day. For example, set the EA so that it will only execute pending orders at 6:00 GMT.

The other function I have been trying to figure out is how to add a time value setting into the code so that the open trades initiated by a pending order will automatically close at a specified time, say 18:00 GMT, if it is still open.

I hope I descibed this clearly enough for you.

Thanks

Reason: