How to PrintDebug the symbol name?
Author: asurapan
Creation Date: 5/11/2009 2:30 PM
profile picture

asurapan

#1
I am trying to export each ticker in a dataset and its corresponding technical value to the debug window. I can get the technical value printed, but I also want to see the ticker. What do I need to do to get each symbol executed?

CODE:
Please log in to see this code.
profile picture

Cone

#2
The symbol is a property of the Bars object.

CODE:
Please log in to see this code.

Do not copy and use these snippets - they are only examples and are not complete. You need to incorporate them properly into your code.
profile picture

asurapan

#3
i'm still missing something, the symbol is always the first symbol in the dataset, but the values are for each symbol in the dataset.

CODE:
Please log in to see this code.


here is the output on the preloaded Indices dataset:

.DJI 8294.23800000001
.DJI 1723.36801000001
.DJI 5661.9936
.DJI 890.382999999999
.DJI 1438.23
.DJI 414.146999999999
.DJI 566.798999999999
profile picture

Eugene

#4
QUOTE:
the symbol is always the first symbol in the dataset,

That's right, because you programmed it exactly this way:
CODE:
Please log in to see this code.

Since n is a constant (0), you'll get the value for the DataSetSymbol #0 i.e. the very first symbol.
You may want to take a look at the QuickRef entry for DataSetSymbols.
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).