Populating order collection
Atom
02.11.2017


Hi

How do I get Orders collection on connector populated with my open orders after connecting the connector? (i.e. if I have open orders on application startup and want to access them through Orders collection)

Regards

Теги:


Спасибо: Support


Support

Фотография
Дата: 02.11.2017
Ответить


Hello, Johan

The request sends automatically while connected. The trigger IConnector.NewOrder should be fired every time when new row occur in TWS. The same will be for own trades.
Спасибо:

Johan Kirsten

Фотография
Дата: 02.11.2017
Ответить


Hi

Thank you, but what about the case where I:

1) submit order, receiving NewOrder gets fired
2) my app crashes
3) I restart the app

How does Orders collection on connector get populated after restart?

Regards
Спасибо:

Support

Фотография
Дата: 02.11.2017
Ответить


All order's info can be downloaded from 2 sources. 1 - from brokerage connection (in your case TWS). 2 - from local storage. TWS keep filled orders for 1 day so you will get necessary orders after restart automatically.

If you prefer to keep orders history more that 1 day we recommend to use our storage - http://doc.stocksharp.co...fe-a829-fa6c40e5fabd.htm
Спасибо:

Johan Kirsten

Фотография
Дата: 02.11.2017
Ответить


Hi

And what about MyTrades collection? Is it also filled after restart automatically? I.e if I have open trades in TWS and then start S# will MyTrades be filled automatically?

Regards

Спасибо:

Support

Фотография
Дата: 02.11.2017
Ответить


The same with orders - automatically. Connector ask destination source for orders and my trades. If the source (TWS) send it - you will get it in your strategy.
Спасибо:


Добавить файлы через драг-н-дроп, , или вставить из буфера обмена.

loading
clippy