- FrameFirst
- FrameFilter
- FrameNext
- FrameInputs
- FrameAdd
- ParameterGetRange
- ParameterSetRange
ParameterGetRange
Receives data on the values range and the change step for an input variable when optimizing an Expert Advisor in the Strategy Tester. There are 2 variants of the function.
1. Receiving data for the integer type input parameter
bool ParameterGetRange(
|
2. Receiving data for the real type input parameter
bool ParameterGetRange(
|
Parameters
name
[in] input variable ID. These variables are external parameters of an application. Their values can be specified when launching on a chart or during a single test.
enable
[out] Flag that this parameter can be used to enumerate the values during the optimization in the Strategy Tester.
value
[out] Parameter value.
start
[out] Initial parameter value during the optimization.
step
[out] Parameter change step when enumerating its values.
stop
[out] Final parameter value during the optimization.
Return Value
Returns true if successful, otherwise false. For information about the error, use the GetLastError() function.
Note
The function can be called only from OnTesterInit(), OnTesterPass() and OnTesterDeinit() handlers. It has been introduced to receive Expert Advisor input parameters' values and variation ranges during the optimization in the Strategy Tester.
When called in OnTesterInit(), the obtained data can be used to redefine the rules for enumeration of any input variable using ParameterSetRange() function. Therefore, new Start, Stop and Step values can be set and the input parameter can even be completely excluded from optimization regardless of the Strategy Tester settings. This allows you to manage the area of the input parameters during the optimization by excluding some parameters from the optimization depending on the Expert Advisor's key parameters' values.
Example:
#property description "Expert Advisor for ParameterGetRange() function demonstration."
|