How to use ParameterSetRange?

 

What is the correct way to use the ParameterGetRange function?

I know that it only works in the OnTesterInit function.

Here is the code I am using, eg.:

void OnTesterInit()
{
ParameterSetRange("VariableName", true, 1.0, 1.0, 1.0, 2.0);
}

VariableName is an input double datatype. Compiles fine.

When I run an optimization it does nothing if the relevant variable is not manually ticked in the optimization inputs list.

If the relevant variable is ticked, then it just runs the manual or default settings in the optimization inputs list rather than the settings specified by the ParameterGetFunction.

Does this function actually work? I can find no information on it other that what I have already posted ...

 
hatlle:

What is the correct way to use the ParameterGetRange function?

I know that it only works in the OnTesterInit function.

Here is the code I am using, eg.:

VariableName is an input double datatype. Compiles fine.

When I run an optimization it does nothing if the relevant variable is not manually ticked in the optimization inputs list.

If the relevant variable is ticked, then it just runs the manual or default settings in the optimization inputs list rather than the settings specified by the ParameterGetFunction.

Does this function actually work? I can find no information on it other that what I have already posted ...

Did you carefully read the documentation and code example for ParameterGetRange there ?, That how the "... correct way to use the ParameterGetRange".

The first parameter for ParameterGetRange is constant string as input parameter, while the rest of parameters are for output, not for the input. 

Maybe what you're looking for is ParameterSetRange

 

 
Maybe what you're looking for is ParameterSetRange.

Oops! Sorry. Yes you are correct! I always meant ParameterSetRange. (Hence the use of ParameterSetRange in my code). I just  copied the wrong web link into my question, and then mistakenly copied that into the title question. I wondered why I was getting no replies.

I had spotted that there were both Get and Set versions of the function. It is the Set version that I am trying to use, and that is the one I have been experimenting with. I still have no idea what the trick is for getting it to work though.

(I can't seem to edit the question or my first post).




 
Now that you have replied in here, are you sure your code in first comment still does not works ?
 
I still can't get it working. I replied and posted my code in the other thread.
Reason: