SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Mon Jul 23, 2018 1:09 am

All times are UTC + 3 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Delay in event trigger
PostPosted: Fri Jul 11, 2014 3:47 pm 
Offline

Joined: Sun Sep 01, 2013 9:31 pm
Posts: 22
Hello,

I am using OQ version 3.12.0. My OQ is not raising the events like e.g. OnOrderReplace, OnOrderCancel immediately after its call, it goes through the statements i.e. order.Replace, order.Cancle and after executing few more statements it triggers the event. Sometime this delay in event trigger is so big that execution moves to next bar which upsets my entire strategy behavior.
Also OQ is not cancelling OCO orders when one for the order from group gets filled instead it is fills the other orders also. When I ran same strategy on OQ on another machine it runs perfect.

Here are few lines from my logs:

Here SL and TP order belongs to same OCO group but you can see both got filled
<OnOrderReplaced>. Sell 71 TP Type 1 Updated.Price = 1965.25 | Quantity = 2 |Side = Buy
<OnOrderReplaced>.Sell 71 SL order 1 Updated.Price = 0 | Quantity = 2 |Side = Buy
<OnPositionClosed>. Position Closed
<OnOrderFilled>. Sell 71 TP Type 1 filled.Order ID = 71 | Order Price = 1965.25
<OnPositionOpened>. Position Changed = | Quantity = 2 | Side = Long
<OnOrderFilled>.Sell 71 SL order 1 filled.Order ID = 71 | Order Price = 1967.25

These logs are from OQ on another machine and you can see SL order got cancelled just after the TP got filled.

<OnOrderReplaced>. Sell 71 TP Type 1 Updated.Price = 1965.25 | Quantity = 2 |Side = Buy
<OnOrderReplaced>.Sell 71 SL order 1 Updated.Price = 0 | Quantity = 2 |Side = Buy
<UpdateSLOrder>. Order Updated. Order = Sell 71 SL order 1 | Order Qty = 2 | Side = Buy | Price = 0
<OnPositionClosed>. Position Closed
<OnOrderFilled>. Sell 71 TP Type 1 filled.Order ID = 71 | Order Price = 1965.25
<OnOrderCancelled>.Sell 71 SL order 1 Cancelled

Please suggest any idea/solution to fix this issue.

Thanks,
Wajeeha


Top
 Profile  
 
PostPosted: Sat Jul 12, 2014 7:38 pm 
Offline
Site Admin

Joined: Thu Jul 17, 2003 10:39 am
Posts: 1478
Hi,

OnOrderReplace, OnOrderCancel and other 'execution' callbacks are invoked when OQ receives appropriate event from the broker side.
What broker (plugin) do you use?

_________________
SmartQuant Development Team


Top
 Profile  
 
PostPosted: Sun Jul 13, 2014 7:54 pm 
Offline

Joined: Sun Sep 01, 2013 9:31 pm
Posts: 22
I am facing this issue in simulation mode.

Thanks.


Top
 Profile  
 
PostPosted: Wed Jul 16, 2014 8:08 am 
Offline

Joined: Sun Sep 01, 2013 9:31 pm
Posts: 22
Hello Support,

I didn't get any reply. Please share your suggestion/ideas to fix or reason behind this issue.

Thanks,


Top
 Profile  
 
PostPosted: Wed Jul 16, 2014 11:50 am 
Offline
Site Admin

Joined: Thu Jul 17, 2003 10:39 am
Posts: 1478
There should be some difference between data or configurations of two PCs.
Unfortunately, I cannot see it.
How can I reproduce 'wrong' behaviour on my side?

_________________
SmartQuant Development Team


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

All times are UTC + 3 hours


Who is online

Users browsing this forum: No registered users and 1 guest


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