SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Sat Nov 25, 2017 8:54 am

All times are UTC + 3 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Wed Oct 10, 2012 6:15 am 
Offline

Joined: Mon Feb 21, 2011 10:46 am
Posts: 48
Hi, when I tried to change Order.Qty in Send() method in my custom execution provider, no errors are reported but I found that Order.Qty value is still the same after the assignment code. Apparently the Order.Qty field is writeable, but I don't know how could I change it?

Thanks!


Top
 Profile  
 
PostPosted: Wed Oct 10, 2012 7:28 am 
Offline

Joined: Tue Aug 05, 2003 3:43 pm
Posts: 6778
Hi,

Order.Qty sets quantity for order replace. Order.Qty (getter) stays the same until order is actually replaced (replace request confirmed by broker).

Order order = BuyLimit(100, 20.15);

WriteLine(order.Qty);

order.Qty = 200;

WriteLine(order.Qty);

order.Replace();

WriteLine(order.Qty);


You should get

100
100
200

Regards,
Anton


Top
 Profile  
 
PostPosted: Wed Oct 10, 2012 8:18 am 
Offline

Joined: Mon Feb 21, 2011 10:46 am
Posts: 48
Cool! Never noticed Order.Replace() method. Thank you very much, Dr.Anton!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 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