Bars.Count after SetContext
Author: soniasrm
Creation Date: 12/13/2011 9:16 AM
profile picture

soniasrm

#1
Hi,

I have been running a code with the format below, and now I need the number of Lastbar (Bars.Count-1). However the output is allways the number of bars of the stock that I click for run the code and not the number of bars for each stock in dataset.

CODE:
Please log in to see this code.


How can I solve this problem?
Thanks a lot
profile picture

Eugene

#2
Pretty simply, by turning series synchronization off:
CODE:
Please log in to see this code.

profile picture

soniasrm

#3
Could you please explain me the difference between SetContext(symbol, false) and SetContext(symbol, true)? Thank you very much
profile picture

Eugene

#4
Look it up the QuickRef.

Also be sure to check out the WealthScript Programming Guide > DataSeries > Accessing Secondary Symbols > Secondary Series Synchronization.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).