SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Sun Oct 02, 2022 1:10 pm

All times are UTC + 3 hours

Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Wed Oct 24, 2018 9:33 am 

Joined: Tue May 15, 2018 1:33 am
Posts: 12
My Requirement is : After sent the Order, and if the OrderStatus is "PartiallyFilled", then Right Click the Order in the OrderManager Window and choose the menu of "Cancel" to cancel the Order.

The ExecutionProvider need the 'ProviderOrderId' to cancel the Order. So I try the two ways as below with some problems:

1. After sent the SellOrder to the ExecutionProvider, the ExecutionProvider will create ProviderOrderId and other execution report( eg. Price,OrderStatus) sent to MyStrategy by EmitExecutionReport. I can see the Order's Avg.Price and Status Changed as expected. But the ProviderOrderId is allways empty and can not be updated. So the later CancelCommand can not be executed correctly because the command need ProviderOrderId.

2. Load the Order's ProviderOrderId by " OrderManager.Get(ExecutionCommand.OrderId).ProviderOrderId" in the ExecutionProvider after receive the CancelCommand, It's ok without reboot the OpenQuant. But if the OpenQuant reboot then the " OrderManager.Get(ExecutionCommand.OrderId).ProviderOrderId" will return the empty. I have allready set Strategy's Persistence to Full option like "this.StrategyManager.Persistence = StrategyPersistence.Full". So the expected result is the " OrderManager.Get(ExecutionCommand.OrderId).ProviderOrderId" will allway return the no-empty value after reboot OpenQuant. But why return empty value after reboot?

PostPosted: Mon Oct 29, 2018 11:56 am 

Joined: Wed May 05, 2010 9:49 pm
Posts: 583
ProviderOdrderId commonly filled by ExecutionProvider.
I tested it with IB and it works properly - I can see ProviderOrderId in properties of order.
Perhaps something is wrong with your provider, can you specify if is provider from OQ2014 package or is it your own?

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 3 hours

Who is online

Users browsing this forum: No registered users and 0 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group