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

 

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

 

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?

 
Are you saying that when OP_BUYSTOP becomes "filled", the type of order changes from OP_BUYSTOP to OP_BUY?

yes, that is correct.

 

Thank you very much!

Reason: