Download MetaTrader 5

How to use ParameterSetRange?

To add comments, please log in or register
hatlle
68
hatlle 2013.02.01 19:22 

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 ...

phi nuts
2184
phi nuts 2013.02.02 10:48  
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

 

hatlle
68
hatlle 2013.02.02 17:46  
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).




phi nuts
2184
phi nuts 2013.02.12 00:12  
Now that you have replied in here, are you sure your code in first comment still does not works ?
hatlle
68
hatlle 2013.02.12 01:10  
I still can't get it working. I replied and posted my code in the other thread.
To add comments, please log in or register