What ValueInt is?
Author: barry svehla
Creation Date: 11/3/2009 12:31 PM
profile picture

barry svehla

#1
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.
profile picture

Cone

#2
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.
profile picture

Cone

#3
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.
profile picture

barry svehla

#4
Sorry, that doesn't help. I still don't know what I'm supposed to type in where it says ".ValueInt"
profile picture

Eugene

#5
You need not to type something instead of ValueInt - that's a property.
profile picture

barry svehla

#6
I get an error "string does not contain a definition for 'ValueInt'"
profile picture

Eugene

#7
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.
profile picture

barry svehla

#8
CODE:
Please log in to see this code.

Near the bottom is "Parameter 1".ValueInt
profile picture

Eugene

#9
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.
profile picture

barry svehla

#10
Got it. Thanks a bunch.
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).