MQL4 - automated forex trading   /  

Forum

Does OrderType() keep returning pending[buy|sell] or start returning OP_[BUY|SELL] after pending order goes to market order status ? as seen in Terminal >Trade tab

Back to topics list To post a new topic, please log in or register

avatar
396
ukt 2007.08.02 16:12 
When a Pending order type P is issued you can see that the order listed on Terminal > Trade tab has pending order type P listed.
I have noticed that when the Pending order is activated and becomes market order that the order type listed is buy or sell.

My question is this:
If OrderType() returns type P when the order is still Pending ie, not activated/gone to market order, what does OrderType() return when Pending order type goes to market ?

I would expect that type P would still be returned but...

Also, if order type P remains when order goes to market, I'm assuming only way to know that order is actually market order is to check OrderProfit() != 0.0, which one could then see as an order state change of TYPE_PENDING --> TYPE_ACTIVE_PENDING (if using some #define's etc.)


Basically, Terminal > Trade tab may well show the transition from pending --> market order
BUT
does OrderType() do the same and return OP_BUY or OP_SELL or keep returning order type used in OrderSend() eg: OP_BUYSTOP ???

Thanks In Advance ;-)
article

Interview with Sergey Kovalyov

Sergey Kovalyov about trading, Expert Advisors, Automated Trading Championship and about his book.


avatar
396
ukt 2008.04.19 18:26 

well... guess finally answered my own question... :o))

How do I find out if a pending order has progressed to become a open order


Back to topics list  

To add comments, please log in or register