The users manual says
DataSeries fastMA = SMA.Series(Close, 20);
After adding a Strap and applying it to the code, you need to modify the line above with the Strap variable, parameterN, where N is the parameter number in the list.
DataSeries fastMA = SMA.Series(Close, parameterN.ValueInt);
ParameterN I understand. I don't know what ".ValueInt" is.
Size:
Color:
A StrategyParameter is a class variable that has a number of properties like Name, Start, Step, ... and Value or ValueInt. If the parameter is used as an integer, then you should access its value with the ValueInt property. If the parameter uses non-integer step values, then use the .Value property.
Size:
Color:
Note that if you use the Optimizer to insert Straps into existing code, you need to save, close, and re-open the strategy after doing so. There's a bug there that needs to be worked eventually.
Also, you can replace "paramenterN" with any other meaningful (and valid) variable name.
Size:
Color:
Sorry, that doesn't help. I still don't know what I'm supposed to type in where it says ".ValueInt"
Size:
Color:
You need not to type something instead of ValueInt - that's a property.
Size:
Color:
I get an error "string does not contain a definition for 'ValueInt'"
Size:
Color:
The code contains a syntax error: you're trying to define a StrategyParameter as a string. Post a snippet of code sufficient to isolate the issue.
Size:
Color:
CODE:
Please log in to see this code.
Near the bottom is "Parameter 1".ValueInt
Size:
Color:
Please use the
CODE tags when posting code. This turns the unpretty mess into nicely formatted, legible code. Just hit the
CODE button and paste the code in between. I've applied the formatting (see above).
QUOTE:
Near the bottom is "Parameter 1".ValueInt
Should be
strategyParameter1.ValueInt.
Size:
Color:
Got it. Thanks a bunch.
Size:
Color: