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)
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.
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.
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?
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.
コメント (5)
ログイン または アカウントを作成, コメントを残すにはログインまたは新規登録してください
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.
Hi
Thank you, but what about the case where I:
How does Orders collection on connector get populated after restart?
Regards
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.com/html/7a8a9518-6270-4cfe-a829-fa6c40e5fabd.htm
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
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.