SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Tue Nov 21, 2017 11:20 am

All times are UTC + 3 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: OnorderFilled event
PostPosted: Sun Aug 05, 2012 1:55 pm 
Offline

Joined: Wed Aug 08, 2007 6:32 pm
Posts: 200
When an OnOrderFilled event occurs how can find out:
1. Whether this is the conclusion of 1 or more partial fills or not?
2. If 1 is true, what the total cumulative value of the previous partial fills is?


Top
 Profile  
 
 Post subject: Re: OnorderFilled event
PostPosted: Mon Aug 06, 2012 11:27 am 
Offline

Joined: Mon Oct 04, 2010 5:13 pm
Posts: 352
OnOrderFilled is fired when the whole order required amount is filled. Otherwise you get 1 or more consecutive OnOrderPartiallyFilled. The OnOrderFilled is fired always at the end if the order amount is fully filled, otherwise you are left with one or more PartiallyFilled events only.


Top
 Profile  
 
 Post subject: Re: OnorderFilled event
PostPosted: Mon Aug 06, 2012 1:10 pm 
Offline

Joined: Wed Aug 08, 2007 6:32 pm
Posts: 200
That does not really answer my question? I understand the difference between OnOrderFilled and OnPartiallyFilled but what i want to know is how you can check IF the OnOrderFilled event is the conclusion of partial fills or not and how much was partially filled before.


Top
 Profile  
 
 Post subject: Re: OnorderFilled event
PostPosted: Mon Aug 06, 2012 2:31 pm 
Offline

Joined: Mon Oct 04, 2010 5:13 pm
Posts: 352
At the risk of not answering your question again :) - If you get the OnOrderFilled it means your entire amount is filled - you don't need to check as OQ does this for you. If the order is never fully filled (run away) - you will never get OnOrderFilled. In the Order class you can check the following fields to understand the status of your order:

Code:
order.CumQty;
order.LastQty;


Generally speaking - handling of order execution (full handling) is not a simple problem and we spent quite a lot of time to do that correctly.

Ed


Top
 Profile  
 
 Post subject: Re: OnorderFilled event
PostPosted: Mon Aug 06, 2012 5:17 pm 
Offline

Joined: Wed Aug 08, 2007 6:32 pm
Posts: 200
Are you implying that order.LastQty is the previous cumulative quantity as opposed to order.CumQty which is the current cumulative quantity, or is this just the simple "order.Qty" of the previous fill?

I would be grateful if SmartQuant or anyone else could clarify this for me?


Top
 Profile  
 
 Post subject: Re: OnorderFilled event
PostPosted: Thu Aug 16, 2012 3:10 pm 
Offline

Joined: Sun Oct 30, 2011 12:12 am
Posts: 220
Tip: go to www.google.com, type without quotes: "site:smartquant.com lastqty".
You can then find this post with a very clear example: viewtopic.php?t=7268


Top
 Profile  
 
 Post subject: Re: OnorderFilled event
PostPosted: Fri Aug 17, 2012 11:52 am 
Offline

Joined: Wed Aug 08, 2007 6:32 pm
Posts: 200
Thanks again that clarifies everything/


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC + 3 hours


Who is online

Users browsing this forum: No registered users and 2 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:  
cron
Powered by phpBB® Forum Software © phpBB Group