SmartQuant Discussion
http://www.smartquant.com/forums/

How to Sync Fills in Live Trading?
http://www.smartquant.com/forums/viewtopic.php?f=59&t=9874
Page 1 of 1

Author:  PBJ [ Thu Jan 12, 2012 8:21 pm ]
Post subject:  How to Sync Fills in Live Trading?

Hi,

What happens exactly if a fill is sent by a broker while OQ is disconnected from the execution provider?

For example:
1- OQ sends a limit order which is not immediately filled
2- 1 mn later, the execution provider unexpectedly disconnects (OnDisconnected event called because Internet is down for example)
3- the market moves and the order is filled (while OQ is disconnected)
4- OQ automatically reconnects (OnConnect event called, internet is back up).

In this specific case, OQ is not stopped/restarted so it has all order IDs, etc...

In my case, the execution provider is either IB or Integral.
Do they send fill reports when OQ automatically reconnects?

Thanks!

Author:  Dr. Anton Fokin [ Thu Jan 12, 2012 8:43 pm ]
Post subject:  Re: How to Sync Fills in Live Trading?

Yes for Integral FIX and no for IB.

Author:  PBJ [ Sat Jan 14, 2012 2:30 pm ]
Post subject:  Re: How to Sync Fills in Live Trading?

Thanks.

Can I expect the same behaviour if OQ has Persistent option ON, it is restarted after disconnection and the strategy is run again?

Regards,
PBJ

Author:  Dr. Anton Fokin [ Mon Jan 16, 2012 11:08 am ]
Post subject:  Re: How to Sync Fills in Live Trading?

Hi,

existing (in OQ) orders and fills get stored in OQ database (and loaded next time on startup) if you enable persistent option. It has nothing to do with fills existing on a broker server (and missing in OQ) in case OQ gets disconnected from a broker.

FIX protocol / FIX engines normally send missing fills after reconnect. Behavior of API based plugins depends on the broker API implementation.

Regards,
Anton

Author:  PBJ [ Wed Jan 18, 2012 1:27 am ]
Post subject:  Re: How to Sync Fills in Live Trading?

Thanks.

So if persistent mode is ON all orders and their IDs are saved.
So I guess when I reconnect to a FIX based broker and receive fills that happened when the session was down, OQ will change the status of these orders (that were persisted and restored at start) to reflect that, right? Does OnOrderFilled get called then?

Page 1 of 1 All times are UTC + 3 hours
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/