Is it possible to create a paramter to a strategy, that displays and passes different strings?
In particular, stock symbols?
I want to compare two stocks, selecting the main symbol from the data set, and the second by parameter.
Currently the second symbol is picked from an array by way of an index selected via a parameter.
That's crude! If it were any cruder, I could sell oil futures.
Does anyone have a better alternative?
Pop-up input box? A way to select the second symbol from the current data set?
Thanks for any input.
Eb
Size:
Color:
You can't put a string on a slider.
Community.Components facilitates an
Input boxYou can also use the number of the DataSetSymbol and add a slider for the numbers (but limiting it to DataSetSymbols.Count. i.e., string sym = DataSetSymbols[n];
Size:
Color:
I want to have a workspace with three charts, each with the same strategy but a different string parameter. Does the input window store the string parameter for each chart?
If not: can you think of a way to deal with this?
Size:
Color:
The "input window" is a simple static string variable. Each strategy instance is independent of the others. Try clarifying your request.
Size:
Color:
Okay, I´d like to have a workspace with three charts.
Each chart has the same strategy applied. There is one string parameter that needs to be different for each chart. Now, I dont want to change that every time I am opening the Workspace. How can I save the workspace so that when I re-open it the charts still have their unique string parameter?
Only workaround that comes to my mind is having one unique strategy for each chart, but I think that his is not so good if there will be more charts than three in the future.
Size:
Color:
Are each of the charts displaying the same symbol? Is there another difference about each chart that you can use to conditionally set the string parameter?
CODE:
Please log in to see this code.
Size:
Color:
Hmm, I think that @Cone´s approach should work.
However, I don´t like hard coded options very much. I think WLD should allow saving parameters to each individual worksspace window.
Take any strategy: one cannot save parameter settings to an individual chart in a workspace.
Size:
Color:
QUOTE:
Take any strategy: one cannot save parameter settings to an individual chart in a workspace.
As long as the charts were using difference symbols, you could use Preferred Values for this. In fact, you could create a string value that corresponded to a parameter value. Then, using Preferred Values, you set up the Strategy just the way you want for each chart. Leave PVs enabled, save the Workspace, and then it should work.
Size:
Color:
Okay, I did not notice that PVs exist. Will have a look at it. Thank you.
Size:
Color: