I'd like to set a variable(s) (or generate some lists) to be used on other symbols in a dataset when it is the first run. I'd like it not to be computed each time.
I thought this (or something like it would be the way to do it but the variable x only changes for the first symbol and not on the others although I thought it would be global in scope. I recall seeing something like this in the forums before but I was unable to find it in a search.'
Thanks for the help
CODE:
Please log in to see this code.
Size:
Color:
Wealth-Lab calls Execute() for each symbol in the DataSet, so every symbol is a firstRun. I think you would be better off just using
CODE:
Please log in to see this code.
The other option, which I use is
CODE:
Please log in to see this code.
Just make sure you only run this against ONE symbol in the data set, not the entire data set.
In my very limited experience with SetGlobal() and GetGlobal(), the strategy runs slower than if I just redid everything for each symbol
Size:
Color:
Hello Panache
I do only click on one symbol in the dataset as you suggest
In my simplified example, i set the variable x = 3 within "Insert what you want to do on your firstRun"
but then it doesnt take. I will try your example but at first blush I thought I was doing essentially the same
Thank you for the suggestion
Size:
Color:
QUOTE:
In my very limited experience with SetGlobal() and GetGlobal(), the strategy runs slower than if I just redid everything for each symbol
There may be some overhead from casting to/from objects (done by *Global) but it shouldn't be very expensive performance-wise.
Size:
Color: