HomeSample Page

Sample Page Title


The operate wfo_setAdvancedOptions accepts an integer worth which is a bitwise set of flags, that may be a particular bit permits particular characteristic. All supported flags are listed within the header file with corresponding values.


#outline WFO_FLAG_AUTO_CLOSE_SPLIT_TRADES 1
#outline WFO_FLAG_MISMATCH_FIX_OFF        2
#outline WFO_FLAG_STOP_ON_RANGE_VIOLATION 4
#outline WFO_FLAG_CHECK_TICK_MODELLING    8

#outline WFO_FLAG_STOP_ON_NONSTD_PARAMS  16
#outline WFO_FLAG_RESUME_OPTIMIZATION    32

A number of options could be enabled by bitwise OR-ing (‘|’) flags or by separate calls to the operate, for instance:

wfo_setAdvancedOptions(WFO_FLAG_MISMATCH_FIX_OFF | WFO_FLAG_STOP_ON_RANGE_VIOLATION);

Please be aware, that a part of the flags impacts code execution within the tester brokers, and different half is meant to be used in code executed within the terminal.

For brokers it’s best to name wfo_setAdvancedOptions in OnInit, for the terminal – name it in OnTesterInit. For generality you possibly can name it in each locations – that is protected, as a result of extreme flags will merely not take impact.

The that means of the flags and corresponding options are described under:

  • WFO_FLAG_AUTO_CLOSE_SPLIT_TRADES – allow computerized shut of positions and pending orders on the boundary between strolling window and ahead check, the identical as wfo_setCloseTradesOnSeparationLine (https://www.mql5.com/en/blogs/put up/677266);
  • WFO_FLAG_MISMATCH_FIX_OFF – disable computerized correction of discrepancies, which can present up in WFO-reports underneath some circumstances; discover extra particulars within the FAQ (https://www.mql5.com/en/blogs/put up/677450), Q.Why do I see discrepancies in some rows of walkforward tables?;
  • WFO_FLAG_STOP_ON_RANGE_VIOLATION – cease present tester move if a commerce(s) is detected earlier than or after strolling window and ahead check; by default this characteristic is off, and EA developer is liable for ensuring within the supply code, that trades are allowed strictly contained in the window and ahead;
  • WFO_FLAG_CHECK_TICK_MODELLING – allow tick modelling detection (empirical, not part of MQL5 API), the result’s proven in WFO-report;
  • WFO_FLAG_STOP_ON_NONSTD_PARAMS – allow strict check-up for correct optimization settings, that’s not less than certainly one of wfo_windowSize, wfo_stepSize, wfo_stepOffset ought to be concerned in optimization, in any other case, WFO shall be disabled; not suitable with 3-rd social gathering software program wrappers of WFO-library, which setup these inputs programmatically;
  • WFO_FLAG_RESUME_OPTIMIZATION – maintain WFO-specific information (csv and gvf information) and append new outcomes into it, assuming continuation of optimization; discover extra particulars in different weblog put up;

All flags are elective.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles