SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Wed Nov 21, 2018 3:24 am

All times are UTC + 3 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Tue Jul 31, 2012 3:08 pm 
Offline

Joined: Wed Aug 08, 2007 6:32 pm
Posts: 221
How do you call the current position (quantity and price) from within oq?
Is this position solution based or strategy based?and can it be affected by any other strategies that involve the same instrument?


Top
 Profile  
 
PostPosted: Tue Jul 31, 2012 9:42 pm 
Offline

Joined: Tue Aug 05, 2003 3:43 pm
Posts: 6808
In your strategy you can write

if (HasPosition)
Console.WriteLine("Current position qty = " + Position.Qty);

Basically Strategy.Position is the property that provides access to your current position in Strategy.Instrument


Top
 Profile  
 
PostPosted: Wed Aug 01, 2012 10:26 am 
Offline

Joined: Wed Aug 08, 2007 6:32 pm
Posts: 221
great thanks for that


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