hello friends
i have a question about pending order:
i have 2 pending orders buy and sell once one of them hit i what to close the other .
i am just a newbe mql programer and its beyond my ability right now.
To be no longer a "newbie" you have to try, and practice, and fail, and try again and learn.
Create a loop and loop through the open orders, when you have just one pending order, determine this by checking OrderType(), you can OrderDelete() the remaining pending order.
To be no longer a "newbie" you have to try, and practice, and fail, and try again and learn.
Create a loop and loop through the open orders, when you have just one pending order, determine this by checking OrderType(), you can OrderDelete() the remaining pending order.
thanks a lot RaptorUK
i will try to work on your description .
thanks
WHooDoo22
thanks a lot ,
i just write :
if()
OrderCloseBy(order_id,opposite_id);(white out specific id number ??)
return (0);
thanks
WHooDoo22
thanks a lot ,
i just write :
if()
OrderCloseBy(order_id,opposite_id);(white out specific id number ??)
return (0);
WHooDoo22
thanks a lot ,
i just write :
if()
OrderCloseBy(order_id,opposite_id);(white out specific id number ??)
return (0);
thanks
When posting code:
Please use this to post code . . . it makes it easier to read.
WHooDoo22
thanks a lot ,
i just write :
if()
OrderCloseBy(order_id,opposite_id);(white out specific id number ??)
return (0);
thanks
Actually I am not sure it would work in the case of pending orders BUT ;) it should because pending orders should be considered open orders, their just not sent yet. Give it a shot pro ;)
Also, your MetaEditor dictionary comes in handy sometimes. It'l treat ya' right. Hahaha! ;)
Thank you
Actually I am not sure it would work in the case of pending orders BUT ;) it should because pending orders should be considered open orders, their just not sent yet. Give it a shot pro ;)
Also, your MetaEditor dictionary comes in handy sometimes. It'l treat ya' right. Hahaha! ;)
Thank you
i will, thank you (-;
You don't close pending orders, they aren't "open" . . . you Delete them.
Simon,
I just placed a pending order in the market and noticed what you meant by NOT "open". The only options allowed by my MT4 terminal is to modify or delete the pending order. The option to close the order is not available (because it is not "open", its "pending"). Ah-ha! ;) Hahaha!
Hold on... Here comes the OrderDelete() function :)
er007,
Apologies for suggesting OrderCloseBy() function. I believe a more sensible ;) solution is to use a cycle to locate the position of the pending order to close, select the order's ticket number AND ;) then use the OrderDelete() function to close the desired pending order. Whew, wipin' sweat off my brow for that one. ;)
Thank you
Simon,
I just placed a pending order in the market and noticed what you meant by NOT "open". The only options allowed by my MT4 terminal is to modify or delete the pending order. The option to close the order is not available (because it is not "open", its "pending"). Ah-ha! ;) Hahaha!
Hold on... Here comes the OrderDelete() function :)
er007,
Apologies for suggesting OrderCloseBy() function. I believe a more sensible ;) solution is to use a cycle to locate the position of the pending order to close, select the order's ticket number AND ;) then use the OrderDelete() function to close the desired pending order. Whew, wipin' sweat off my brow for that one. ;)
Thank you
hi WhooDoo its ok ,thank you for your help. :-)
have a nice weekend .
er007,
I don't even keep up with days of the week, holidays, anything. I just code and slave away ;) Hahaha!
Glad to be of service.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
hello friends
i have a question about pending order:
i have 2 pending orders buy and sell once one of them hit i what to close the other .
i am just a newbe mql programer and its beyond my ability right now.
any direction friends????
many thanks.