Hello All, I didn't find this in a search mainly because I probably did not have refined enough keywords... that is if it's there.
I have a script that processes a data set with a number of symbols. For each symbol it calculates a value based on some statistics over the bars of the Symbol. What I don't know how to do is to accumulate, for instance, a sum of those values and print it out (in the Debug Window) after all the symbols have been processed. Since the Execute code runs once for each symbol, I don't see a way to capture persistent data between symbols or to post process it after the last instance of Execute has run to process the last symbol in the set.
any help appreciated.
Size:
Color:
There are different ways, one of them keeping the sum in a
class-level variable or, like code below will illustrate, you could have it done with
DataSetSymbols:
CODE:
Please log in to see this code.
Size:
Color:
That worked. Thanks very much!
Size:
Color:
Glad to help.
Size:
Color:
I'd run that with SetContext( DataSetSymbols[ds], false );
It will run faster because each symbol is not going to be synch'd with the clicked symbol, which is what you actually want - analyze the raw data for each symbol's Bars object.
Size:
Color: