Hi all,
I have the following dataseries:
CODE:
Please log in to see this code.
How do I access the individual symbols in the series in code?
Thanks in advance
Size:
Color:
This syntax would be invalid in WealthScript. It's likely that you're using WealthScript Translator output (unsupported). In this case, I would strongly caution against touching it for the purpose of mixing it with native WealthScript code.
In a pure WealthScript Strategy, however, your code would then become something like this:
CODE:
Please log in to see this code.
Further reading:
WealthScript Guide: DataSeries > Accessing Secondary Symbols
Size:
Color:
Thanks for your quick response Eugene.
I still don't know how to access the individual symbols inside the dataseries "dsSP100".
For example there are 100 individual symbols AA, AAPL, ABT, ... Is there a syntax to specify them or do I need to write a seperate dataseries for each one?
Size:
Color:
No you don't need to create a separate DataSeries but let's start by answering what are you trying to accomplish in general. This is not clear to me.
Size:
Color:
I am trying to write a strategy that will take the S&P 100 and calculate how many advancing issues there are in 15-Minute time scale in reference to the closing price of the previous day.
Here is my code so far (I know it's not right yet):
CODE:
Please log in to see this code.
Size:
Color:
CODE:
Please log in to see this code.
Size:
Color:
Thanks Eugene very much for the code.
I am not sure it is doing what I want though or maybe I don't understand it.
Is it using the S&P 100? -Because I don't see it referenced anywhere in the code. Also the "Advancing Issues" -Shouldn't it be from 0 to 100?
Size:
Color:
Obviously, a Bars object or a DataSeries represents just this single symbol. Having just a single symbol for the 15-min S&P-100 is not enough for your task. That's why it makes zero sense to reference it or anything else, just give it a thought.
(And that's why your question was vague initially. Now I answer: you can't access individual symbols in a DataSeries if by that you mean getting access to index components where the DataSeries is associated with some index.)
The code is to be run on a DataSet that consists of the S&P 100 symbols.
Not sure about the last remark i.e. from 0 to 100 - actually, from 0 to the number of symbols having their closing price of the current intraday bar above the previous day's closing price.
Size:
Color:
Hi Eugene and all,
I need some help with some bug in my strategy. I keep getting an "index out of range" exception when I run it on a time period longer than 8 weeks.
Heres the code:
CODE:
Please log in to see this code.
Any help would be gratefully appreciated.
Size:
Color:
If you're asking for my help, then I suggest looking at my code above (see reply from 12/4/2010 11:19 AM).
Size:
Color: