0

I have a FIX server which supports open/close positions. Now, I want to add support for pending orders.

In the NewOrderSingle message, there is a field OrdType which defines the type of order, Market,Limit,Stop, etc. I used these ones for position orders. Now I need a parameter for pendings..

I considered adding another parameter to the NewOrderSingle message but wonder if there's a better way..?

Zero Piraeus
  • 56,143
  • 27
  • 150
  • 160
xyzt
  • 1,201
  • 4
  • 18
  • 44

1 Answers1

0

I think you are looking at the wrong message type. ExecutionReport has an OrdStatus field that you can set to "pending new".

NewOrderSingle is for a trader to submit an order, and that's all. A trader wouldn't mark his own order as "pending" when he submits it! The server responds to the trader with an ExecutionReport that has the appropriate OrdStatus.

Apologies if I'm telling you things you already know. There's not a lot of context in your question.

Grant Birchmeier
  • 17,809
  • 11
  • 63
  • 98
  • Thanks @Grant. I mean limit orders with the term "pending order". It is a special type of order in the trading platfor mthat we use which is activated when the order's price hits. So, it should be sent using NewOrderSingle. – xyzt Jul 11 '13 at 13:08
  • I don't understand your question then. Isn't OrdType=Limit what you need? Server receives NewOrderSingle/Limit, and acks back a ExecutionReport to the trader. When the limit price is reached, order is filled, and server sends another ExecutionReport back to the trader to notify him of the status change. – Grant Birchmeier Jul 11 '13 at 13:37
  • Sorry, i left out something in my question. Stop and Limit types are used as stoploss and takeprofit indicators in our system. So, in best case, i have to introduce new fields for pending orders.. or do i have another option? – xyzt Jul 11 '13 at 14:07
  • I think you've reached the limits of my help. I'm a better programmer than trader, so I'm not sure. – Grant Birchmeier Jul 11 '13 at 14:16
  • 1
    We need a better definition of what you mean by "pending order". Most people define "pending orders" as limit or stop orders because they don't execute immediately, like a market order. For example, see http://www.investopedia.com/university/how-to-use-meta-trader-4/order-types.asp. I suppose it would also include "if touched" orders as well. – Frank Smith Jul 12 '13 at 10:14