Forex
Google

Go Back   Forex Trading > Metatrader Training > Metatrader 4 mql 4 - Development course > Questions
Forex Forum Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Register in Forex TSD!
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time).
Click here to register and get more information

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-24-2005, 08:27 PM
TheExponential TheExponential is offline
Junior Member
 
Join Date: Nov 2005
Posts: 17
TheExponential is on a distinguished road
Pending orders

Hi Gurus,

If I put in a OP_BUYSTOP order, how can I tell if it has been filled or still pending. I need to know the status of my order.

I have a conditional statement that would act differently depending whether it has been filled or still pending.

I tried looking at the OrderProfit(), but it basically indicates 0.000000 if has not been filled. However, I can't rely on this because if it was filled and there was no profit then it will also show 0.000000

Is there an indicator that will tell me whether an order is still pending or has been filled?

thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 11-24-2005, 10:02 PM
fxid10t's Avatar
fxid10t fxid10t is offline
Member
 
Join Date: Sep 2005
Location: MidAtlantic USA
Posts: 72
fxid10t is on a distinguished road
for(int i=0;i<OrdersTotal();i++)
Orderselect(i,select_by_pos);
if(Ordertype()==OP_BUYSTOP) {Comment("Buystop order unexecuted.");}
if(Ordertype()==Op_sellstop) {Comment("Sellstop order unexecuted."); }

perhaps...
__________________
"You should not have a favourite weapon. To become over-familiar with one weapon is as much a fault as not knowing it sufficiently well. You should not copy others, but use weapons which you can handle properly. It is bad for commanders and troopers to have likes and dislikes. These are things you must learn thoroughly." Miyamoto Musashi
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 11-24-2005, 10:48 PM
TheExponential TheExponential is offline
Junior Member
 
Join Date: Nov 2005
Posts: 17
TheExponential is on a distinguished road
Are you saying that when OP_BUYSTOP becomes "filled", the type of order changes from OP_BUYSTOP to OP_BUY?

and it will remain as OP_BUYSTOP for as long as it is not yet filled?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 11-24-2005, 11:44 PM
fxid10t's Avatar
fxid10t fxid10t is offline
Member
 
Join Date: Sep 2005
Location: MidAtlantic USA
Posts: 72
fxid10t is on a distinguished road
Quote:
Are you saying that when OP_BUYSTOP becomes "filled", the type of order changes from OP_BUYSTOP to OP_BUY?
yes, that is correct.
__________________
"You should not have a favourite weapon. To become over-familiar with one weapon is as much a fault as not knowing it sufficiently well. You should not copy others, but use weapons which you can handle properly. It is bad for commanders and troopers to have likes and dislikes. These are things you must learn thoroughly." Miyamoto Musashi
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 11-25-2005, 12:36 AM
TheExponential TheExponential is offline
Junior Member
 
Join Date: Nov 2005
Posts: 17
TheExponential is on a distinguished road
Thank you very much!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
MT4 pending orders fx_geezer Metatrader 4 5 06-15-2007 09:36 PM
modify orders and close pending orders bkgridley Questions 8 05-23-2007 09:49 PM
Closing Pending Orders bkgridley Expert Advisors - Metatrader 4 1 05-11-2007 05:47 AM
Quickest way of Place pending Orders..... babarmughal Expert Advisors - Metatrader 4 8 09-01-2006 11:41 AM
how to delete a pending orders Altern8 Metatrader 4 1 01-02-2006 02:10 PM


All times are GMT. The time now is 11:11 AM.