SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Mon Nov 23, 2020 8:00 pm

All times are UTC + 3 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Fri Aug 20, 2010 12:19 am 
Offline

Joined: Fri Aug 20, 2010 12:12 am
Posts: 5
Hi,

Do anyone know how to get the name of the current active instrument in a strategy through programming?

by active i mean, the instrument the strategy is currently running on.

i need to know the instrument name each time a indicator's Calculate() function is called or at the end of the strategy.

I want to be able to look at the indicator's final output (latest value) and decide if to choose that instrument or not.

Thanks you your time.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 20, 2010 11:35 am 
Offline

Joined: Tue Aug 05, 2003 3:43 pm
Posts: 6817
Strategy.Instrument ?

Regards,
Anton


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 21, 2010 7:32 pm 
Offline

Joined: Fri Aug 20, 2010 12:12 am
Posts: 5
actually it was Bars.Name. i just passed that as a parameter to the custom UserIndicator and it works. I needed the name of the current instrument that calculation was being processed on.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 25, 2010 10:21 pm 
Offline

Joined: Wed Mar 10, 2010 1:42 am
Posts: 63
this.Instrument.Symbol is the current one


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