Walk Forward Analyzer for MetaTrader 4 Version 1.2
Table of Contents Walk Forward Analyzer for MetaTrader 4 Quick Start Guide Requirements Preparation Settings Walk Forward Walk Forward Analysis Report Quick Optimize
What is Walk Forward Analysis? An Exa!le of a Walk Forward Analysis "ow #oes the Walk Forward Analyzer for MetaTrader Work?
#etailed $nstructions %re!arin& MetaTrader History Data Optimization Settings File Walk Forward Analysis 'esuin& Testin& Quick (!tiize )reatin& a *an&ua&e File
Trou+leshootin& Error Messa&es !o "alid Results in Optimization Report #ould !ot Open$#reate File Optimization Report !ot Found %n&alid 'esting Report Data Testin& Ti!s Su!!ort 1
Quick Start Guide Requirements
Microsoft ,-ET .ersion 4 (the full version, not the Client Profile) is required for the Walk Forward Analyer to run. !ost "o#$uters should already have this installed. %f the Walk Forward Analyer does not install or run, download and install .&' .
Windows /ista 0 1 2sers3 *ou #ust disa+le ser A""ount Control to allow !etarader to write lo- files and re$orts to its ho#e dire"tory. /therwise, the Walk Forward Analyer will not work "orre"tly. 0earn how to disa+le AC on Vista Windows .
Preparation
%n !etaraders Strategy 'ester , load your e3$ert advisor fro# the ()pert Ad&isor dro$4 down list. Press the ()pert Properties +utton to o$en the e3$ert advisor settin-s.
Put a "he"k#ark ne3t to ea"h settin- you wish to o$ti#ie, and fill out the Start , Step and Stop fields. 0i#it your o$ti#iation to no #ore than 5 or settin-s at a ti#e.
Press the Sa&e +utton at the +otto# of the ()pert Properties window, and save your settin-s as a .set file to the \tester dire"tory.
%f desired, set the o$tions under the 'esting and Optimization ta+s as well, in"ludin- the startin- +alan"e, $ositions, and any o$ti#iation $referen"es.
!ake sure you have suffi"ient history data for the sy#+ol and $eriod that youre testin- on in !etaraders History #enter . 2
▪
6ownload !1 data for the sy#+ol(s) youd like to test on fro# htt$788www.fore3tester."o#8data8datasour"es.ht#l
▪
/$en !etaraders History #enter ('ools #enu * History #enter , or $ress F2). 9ele"t the sy#+ol and the !1 $eriod fro# the list on the left hand side.
▪
Press the %mport +utton to +rin- u$ the %#$ort dialo-. se the +rowse +utton to sele"t the history data file you downloaded a+ove. Press O, to i#$ort the history data. (his #ay take several #inutes, and !etarader #ay +e non4res$onsive. :ust wait for it to finish.)
▪
se the period_converter s"ri$t in !etarader to "onvert the !1 data to hi-her "hart $eriods. 6ra- and dro$ the s"ri$t onto an !1 "hart, and enter the nu#+er of #inutes to "onvert to in the ()tPeriod-ultiplier settin-. he e3a#$le +elow will "onvert the !1 data to ;1 data. o "onvert !1 data to ;, use 2<, for 61 use 1<, and so on.
5
Settins
/n first laun"h of the Walk Forward Analyer, the Settings window will a$$ear. Press the Add +utton to set the $ath of your !etarader installation folder. %f you have #ulti$le "o$ies of !etarader installed, you "an add ea"h one to the 'esting Directories list.
he -eta'rader . /i&e Directory field is where your live tradin- "o$y of !etarader is lo"ated. his settin- is o$tional, and is only used for the =ui"k /$ti#ie feature.
%f your +roker adds a suffi3 to the sy#+ol na#e (su"h as >'?96f3>, where >f3> is the suffi3), $ut a "he"k #ark in Add Su00i) to Sym1ol auto complete, and fill out the suffi3 in the +o3 +elow. ?estart the $ro-ra# for the "han-e to take effe"t.
@y default, the software will auto#ati"ally adust the /$ti#iation and estin- $eriods so that the estin- $eriod is a$$ro3i#ately 2B of the /$ti#iation $eriod len-th. *ou "an edit the $er"enta-e, or un"he"k Auto suggest Optimization and 'esting period lengt2s to disa+le.
%f youre usin- a non4'n-lish lan-ua-e version of !etarader, sele"t your lan-ua-e fro# the /anguage dro$4down +o3. %f your lan-ua-e is not $resent, $lease see Creatin- a 0an-ua-e File.
Walk Forward
o $erfor# a walk forward analysis, #ake sure the Walk Forward ta+ is sele"ted.
9ele"t your !etarader installation folder fro# the dro$4down +o3. *ou "an laun"h #ulti$le "o$ies of the Walk Forward Analyer and $erfor# testin- on #ulti$le ter#inals at on"e, u$ to the nu#+er of !etarader installations in the dro$4down +o3.
%f you have @irts i"k 6ata 9uite installed, and you wish to use FD ti"k data files for EE #odelin- quality, "he"k 3se +irt4s 'ick Data Suite /oader . he file tds.exe #ust +e $resent in the sele"ted !etarader install folder. !ake sure you sele"t >'very ti"k> in the 'esting -odel dro$4down +o3.
Press the Select +utton ne3t to the ()pert Ad&isor field to +rowse for the e3$ert advisor that you wish to test. he e3$ert advisor #ust +e in the \experts folder of your !etarader installation dire"tory.
Press the Select +utton ne3t to the Optimization Settings File field to sele"t the .set file that "ontains your o$ti#iation settin-s. his file #ust +e $re$ared in !etaraders 9trate-y ester +eforehand. he .set file #ust +e lo"ated in the \tester folder.
%n the Sym1ol field, ty$e the na#e of the sy#+ol that you wish to $erfor# a walk forward analysis on. A list of su--estions will a$$ear as you ty$e.
9ele"t the testin- $eriod fro# the Period dro$4down list. B
9ele"t >/$en $ri"es only> (fastest), >'very ti"k (slow)> (slowest), or >Control $oints> fro# the 'esting -odel dro$4down +o3.
%n the Sort +y dro$4down +o3, sele"t >@alan"e> to sort o$ti#iation results +y #a3i#u# $rofit. 9ele"t >Profit Fa"tor> to sort o$ti#iation results +y #a3i#u# $rofit fa"tor, or sele"t >6rawdown> to sort +y lowest relative drawdown $er"enta-e.
'nter the len-th of the o$ti#iation $eriod in days in the Optimization field.
he testin- $eriod in the 'esting field will +e auto#ati"ally su--ested for you when you sele"t this field, +ased on the value entered in the Optimization field. he reverse is also true. !ake sure the testin- $eriod is lon- enou-h to $rodu"e at least 2B45< trades on avera-e.
'nter the nu#+er of o$ti#iation8testin- rounds in the Passes field. Perfor# as #any rounds of testin- as you feel is ne"essary. !ake sure you have the "o#$lete sy#+ol history in !etarader for the date ran-e dis$layed to the ri-ht in the %n0ormation +o3.
9ele"t the testin- end date in the 'esting (nd Date field. he default value is todays date.
%f %nteracti&e Optimization Result Selection is "he"ked, a window with the results of the last o$ti#iation will a$$ear +efore ea"h test. *oull #anually sele"t the result you wish to test with. %f this settin- is not sele"ted, the $ro-ra# will auto#ati"ally sele"t the to$ result, de$endin- on the Sort Results +y settin-.
%f Sa&e Settings 0or !e)t 'ime is "he"ked, the walk forward analysis settin-s youve ust entered will +e saved for the ne3t $ro-ra# run.
Press the Start Walk Forward Analysis +utton. he infor#ation +o3 to the ri-ht will infor# you of the $ro-ress. At the end of the walk forward analysis, a re$ort will a$$ear in a +rowser window.
Walk Forward Analysis Report A re$ort will +e "reated and dis$layed after ea"h walk forward analysis. he re$ort dis$lays the walk forward analysis settin-s, the results of ea"h o$ti#iation and testin- $ass, and the total $rofit and walk forward effi"ien"y.
he Settings se"tion su##aries the walk forward analysis settin-s.
he Results se"tion shows the to$ (or sele"ted) result for e a"h o$ti#iation $ass, and the results of the testin- usin- those settin-s. 0inks to the re$ort files and the settin-s file for ea"h testin- $ass are also in"luded. ▪
Dates G he start and end date of the testin- or o$ti#iation $eriod.
▪
'rades G he nu#+er of trades $la"ed.
▪
'otal Pro0it G he total $rofit or loss.
▪
Pro0it Factor G he ratio of $rofit to loss.
▪
Drawdown G he relative drawdown in $er"ent.
▪
/ink G View the re$ort or settin-s file.
▪
Settings G he settin-s that were used for the o$ti#iation and testin-.
he Pro0it se"tion shows the total $rofit for the o$ti#iation and testin- rounds, as well as the avera-e daily $rofit, and the walk forward effi"ien"y. ▪
'otal Optimized Pro0it G he total "o#+ined $rofit of all of the o$ti#iation $asses.
▪
'otal Walk Forward Pro0it G he total "o#+ined $rofit of all of the testin- $asses.
▪
A&g5 Daily Optimized Pro0it G he avera-e daily $rofit of the o$ti#iation $asses.
▪
A&g5 Daily Walk Forward Pro0it G he avera-e daily $rofit of the testin- $asses.
▪
Walk Forward (00iciency Ratio G he ratio of the avera-e daily walk forward $rofit and the avera-e daily o$ti#ied $rofit. A hi-her value (H <.B<) #eans that the tradinsyste# is ro+ust. A lower or ne-ative value #eans that the tradin- syste# or the o$ti#iation $ara#eters needs work.
he walk forward re$ort is saved to the \tester\walkforward folder. he testin- and o$ti#iation re$orts for ea"h $ass are also lo"ated in this folder, as well as the settin-s files for ea"h testin$ass. se the Sa&e Report Files As +utton to save a "o$y of the "urrent walk forward re$ort and all of the re$ort and settin-s files to another folder.
I
!ui"k #ptimize When live tradin- with your e3$ert advisor, youll need to $eriodi"ally reo$ti#ie your tradinstrate-y over re"ent data. he Quick Optimize ta+ runs an o$ti#iation in the 9trate-y ester, usin- todays date as the end date of the o$ti#iation $eriod. he start date is deter#ined +y the nu#+er of days in the Optimization 6Days7 settin-. /n"e the o$ti#iation is "o#$lete, the $ro-ra# stores a settin-s file with the sele"ted result in the \experts\presets folder of your live !etarader installation. *ou "an then o$en a "hart in !etarader with the e3$ert advisor and settin-s file atta"hed.
he live installation folder is set in the Settings dialo-, under the -enu. %f you did not set a live installation folder, then the -enerated settin-s file will +e saved to your de#o installation folder. he settin-s in the Quick Optimize ta+ are identi"al to those in the Walk Forward ta+. he Suggested 'rade Period listed in the %n0ormation +o3 is a$$ro3i#ately 2B of the o$ti#iation $eriod, and "an +e used as a -uideline as to how lon- to trade with the "urrent settin-s +efore re4 o$ti#iation is ne"essary.
Press the Start Quick Optimization +utton to run the o$ti#iation. After the o$ti#iation is run, a dialo- +o3 will dis$lay the save lo"ation of the -enerated settin-s file.
Press the Open Settings On /i&e #2art +utton to o$en a "hart in your live "o$y of !etarader with the sele"ted e3$ert advisor and the -enerated settin-s file already atta"hed. E
W$at is Walk Forward Analysis% Walk forward analysis is the $ro"ess of o$ti#iin- a tradin- syste# usin- a li#ited set of $ara#eters, and then testin- the +est o$ti#ied $ara#eter set on out4of4sa#$le data. his is si#ilar to how you would use your e3$ert advisor in live tradin-. he $rin"i$les of walk forward analysis were first des"ri+ed in the +ook '2e (&aluation and Optimization o0 'rading Strategies +y ?o+ert Pardo. he walk forward analysis is the qui"kest and #ost relia+le #ethod to evaluate the lon-4ter# $erfor#an"e of a tradin- syste#. o $erfor# a walk forward analysis in !etarader, first o$ti#ie the e3$ert advisor in the 9trate-y ester. hen, "hoose the #ost $rofita+le result in the Optimization Results ta+, and $erfor# a +a"ktest over a ti#e $eriod i##ediately followin- the o$ti#iation $eriod. he start date of the testin- $eriod is the sa#e as the end date of the o$ti#iation $eriod. he len-th of the testin- $eriod should +e a$$ro3i#ately 2B of the o$ti#iation $eriod. he results of the o$ti#iation and testin- are re"orded, and the $ro"ess is re$eated until a satisfa"tory sa#$le sie is a"hieved. %f the e3$ert advisor $erfor#s well in testin-, relative to the o$ti#iation, then one "an "on"lude that the e3$ert advisor will likely +e $rofita+le in live tradin-. %f, on the other hand, the e3$ert advisor $erfor#s $oorly in testin-, then the walk forward $ara#eters will need to +e adusted. %f after #any atte#$ts, the e3$ert advisor still does not $erfor# well in testin-, then it "an +e "on"luded that the tradin- syste# is un$rofita+le. he illustration to the ri-ht de#onstrates the walk forward analysis $ro"edure. An o$ti#iation is $erfor#ed over a lon-er $eriod (the in4sa#$le data), and then the o$ti#ied $ara#eter set is tested over a su+sequent shorter $eriod (the out4of4sa#$le data). he o$ti#iation and testin- $eriods are shifted forward, and the $ro"ess is re$eated until a suita+le sa#$le sie is a"hieved. J9our"eK
1<
An Example of a Walk Forward Analysis 0ets $rovide a real4life e3a#$le7 Were -oin- to do a walk forward analysis on an e3$ert advisor, usin- '?96 !5<. Well o$ti#ie this e3$ert advisor over a $eriod of 12< days. Weve "hosen the 5 or #ost i#$ortant $ara#eters to o$ti#ie, so as not to over4o$ti#ie or >"urve fit> the results. Also, fewer $ara#eters #eans a qui"ker test. Well sele"t the #ost $rofita+le o$ti#iation result, and +a"ktest those $ara#eters over a 5< day $eriod i##ediately followin- the o$ti#iation $eriod. %t is re"o##ended to use a testin- $eriod of a$$ro3i#ately 2B of the len-th of the o$ti#iation $eriod. /n"e weve re"orded our results, well #ove the ne3t o$ti#iation and testin- $eriod forward +y 5< days. After 12 "onse"utive rounds of o$ti#iation and testin-, well have a years worth of walk forward analysis data. We "o#$are the avera-e daily $rofit for the o$ti#iation $eriods to the avera-e daily $rofit for the testin- $eriods. his will -ive us a "al"ulation "alled the walk 0orward e00iciency ratio5 A walk forward effi"ien"y ratio -reater than <.B is "onsidered a very -ood result. his is what we "all a ro1ust tradin- syste#. ;owever, an e3$ert advisor "an +e "onsidered tradea+le as lon- as it is "onsistently $rofita+le over #ulti$le testin- $eriods. %f the walk forward effi"ien"y ratio is ne-ative, then that #eans that the e3$ert advisor did not $erfor# well relative to its o$ti#ied results.
How Does the Walk Forward Analyzer for eta!rader Work" he Walk Forward Analyer for !etarader works +y laun"hin- !etarader with the settin-s s$e"ified in the Walk Forward Analyer $ro-ra#. We do this +y "reatin- an .ini file in the !etarader installation dire"tory with the desired settin-s. First, an o$ti#iation is run with the settin-s s$e"ified in the .ini file. he start and end dates for ea"h o$ti#iation $eriod is deter#ined +y the Optimization, 'esting and 'esting (nd Date settin-s. After the o$ti#iation is finished, an o$ti#iation re$ort is saved to disk. !etarader shuts down, and the Walk Forward Analyer s"ra$es the o$ti#iation re$ort for the results. %f %nteracti&e Optimization Result Selection is ena+led, a window $o$s u$ with the sorted o$ti#iation results. he user "an #anually sort the results +y "olu#n, and sele"t the result theyd like to test with. /therwise, the software "hooses the to$ result (either the result with the hi-hest $rofit, or the hi-hest $rofit fa"tor, de$endin- on the Sort +y settin-). Another .ini file is "reated for the testin-, and !etarader is laun"hed. After the testin- is "o#$leted, a testin- re$ort is saved to disk. !etarader shuts down, and the Walk Forward Analyer s"ra$es the testin- re$ort and stores the results. his $ro"ess re$eats for the nu#+er of ti#es s$e"ified in the Passes settin-. /n"e the walk forward analysis is done, a re$ort is dis$layed in your +rowser window. he walk forward analysis re$ort, as well as the o$ti#iation and testin- re$orts and the testin- settin-s files, are lo"ated in the \tester\walkforward folder in your !etarader installation dire"tory. 11
&etailed 'nstru"tions #reparin$ eta!rader (istory &ata %t is very i#$ortant that you have "o#$lete histori"al data for the sy#+ol and "hart $eriod that you wish to test on. *our +roker will $rovide re"ent data, +ut this #ay not +e suffi"ient for a "o#$rehensive lon-4ter# walk forward analysis. /ne #ethod to retrieve history data is to o$en !etaraders History #enter , sele"t the sy#+ol and $eriod fro# the list on the left side, and $ress the Download +utton to retrieve the history data fro# the !etarader server. ;owever, the !etarader data so#eti#es has lar-e -a$s, and suffers fro# the sa#e histori"al li#itations as +roker data. Another #ethod is to i#$ort !1 data fro# a relia+le sour"e. A -ood sour"e of free !1 data is htt$788www.fore3tester."o#8data8datasour"es.ht#l . se the %mport +utton in the ;istory Center to i#$ort data fro# a file to the sele"ted sy#+ol and $eriod. /n"e you have "o#$lete !1 data for a sy#+ol, use the period_converter s"ri$t that "o#es with !etarader to "onvert the data for hi-her ti#efra#es. 9i#$ly dra- the s"ri$t on the "hart, and enter the nu#+er of #inutes to "onvert to in the ()tPeriod-ultiplier settin-. For e3a#$le, to "onvert !1 data to !1B, atta"h the s"ri$t to an !1 "hart and enter 1B for the ()tPeriod-ultiplier settin-. For an ;1 "hart, enter < in the ()tPeriod-ultiplier settin-. he -enerated data should now a$$ear in the ;istory Center. 6ou+le "he"k +y o$enin- a "hart with the desired sy#+ol and $eriod and s"roll +a"kward. %f you are usin- a se"ond !etarader installation for testin-, youll need to do these ste$s in your se"ond !etarader install as well.
#ptimization Settins File *oull need to $re$are an o$ti#iation settin-s file for the Walk Forward Analyer to use. o do this, o$en !etarader and the Strategy 'ester window. 0oad the e3$ert advisor in the ()pert Ad&isor dro$4down +o3. Press the ()pert Properties +utton to o$en the e3$ert advisor settin-s dialo-. o sele"t the $ara#eters for o$ti#iation, $la"e a "he"k#ark ne3t to the settin-s you wish to o$ti#ie. Adust the Start , Step and Stop settin-s for ea"h $ara#eter. %f youre unfa#iliar with o$ti#iation in !etarader, the 9tart is the startin- value for the ran-e of $ara#eters, the 9to$ is the endin- value, and the 9te$ is the a#ount to in"re#ent the $ara#eter +y. For e3a#$le, a $ara#eter with a 9tart of 1<, a 9te$ of 1<, and a 9to$ of 1<< #eans that the o$ti#ier will start at 1<, and in"re#ent the $ara#eter +y 1<, u$ to a #a3i#u# of 1<<. hus, the ran-e of values is 1<, 2<, 5<... u$ to 1<<. 12
0i#it the nu#+er of $ara#eters for o$ti#iation to as few as $ossi+le, no #ore than 5 or at a ti#e. /$ti#iin- a lar-e nu#+er of $ara#eters will take #u"h lon-er, and is likely to "reate a "ondition known as >"urve fittin->. A "urve fitted result will look e3"ellent in o$ti#iation, +ut will test $oorly durin- the walk forward. se the Sa&e +utton at the +otto# of the '3$ert Pro$erties dialo- to save the "urrent settin-s to a file. he default save lo"ation will +e t he \tester folder. *our o$ti#iation settin-s file #ust +e lo"ated in this folder for the Walk Forward Analyer to work. nder the 'esting ta+ in the '3$ert Pro$erties dialo-, you "an adust the startin- +alan"e and whether to li#it trades to lon- or short only. %-nore the Optimized parameter settin- G the Walk Forward Analyer will sort o$ti#iation results internally. %f you un"he"k 8enetic Algorit2m in the estin- ta+, the o$ti#ier will atte#$t to $erfor# a full +a"ktest for ea"h $ara#eter set to +e o$ti#ied, whi"h "an take #u"h lon-er, +ut will +e #ore a""urate than the qui"ker -eneti" al-orith#. nder the Optimization ta+ in the '3$ert Pro$erties dialo-, you "an o$tionally adust these settin-s to li#it the o$ti#iation results. All of the adust#ents in the estin- and /$ti#iation ta+s are saved in the e3$ert advisors .ini file in the \tester folder, and will +e loaded on ea"h su+sequent test. /ne last thin- to "he"k G Put a "he"k#ark ne3t to the Optimization settin-, and $ress Start to run the 9trate-y ester. 0oad the Optimization Results ta+. n"he"k Skip 3seless Results in the ri-ht4 "li"k #enu. %n the event that an o$ti#iation $rodu"es no $rofita+le results, the o$ti#iation re$ort will +e +lank if this is ena+led. he software will still sele"t the least un$rofita+le result and "ontinue the test.
Walk Forward Analysis o $erfor# a walk forward analysis, #ake sure the Walk Forward ta+ is sele"ted at the to$ of the interfa"e. First, sele"t the !etarader installation folder usin- the dro$4down +o3. *ou "an run #ulti$le instan"es of the Walk Forward Analyer and $erfor# testin- usin- #ulti$le ter#inals at on"e. *oull need a se$arate !etarader installation for ea"h instan"e you $lan on runnin-. For e3a#$le, if youd like to run si3 walk forward tests si#ultaneously, youll need si3 "o$ies of !etarader installed in se$arate folders. %f you have @irts i"k 6ata 9uite installed, you "an use it to laun"h !etarader with su$$ort for FD ti"k data files. his will -ive you EE #odelin- quality when testin- usin- (&ery tick as the testin- #odel. 9u$$ort for the i"k 6ata 9uite is $rovided +y the develo$er. Press the Select +utton ne3t to the ()pert Ad&isor field to sele"t the e3$ert advisor to analye. he e3$ert advisor #ust +e lo"ated in the \experts folder of your !etarader installation dire"tory.
15
he 9ele"t +utton ne3t to the Optimization Settings File field will sele"t the o$ti#iation settin-s file. his file #ust +e lo"ated in the \tester folder, and have a .set e3tension. he settin-s file #ust +e $re$ared +eforehand in !etaraders 9trate-y ester. 9ee the $revious se"tion for details. y$e the na#e of the sy#+ol to $erfor# the analysis on in the Sym1ol field. A list of su--estions will a$$ear as you ty$e. he 2 #ost "o##on fore3 $airs will a$$ear in the su--estion list. %f you have sele"ted Add Su00i) to Sym1ol Autocomplete in the Settings dialo-, the suffi3 you entered will +e auto#ati"ally a$$ended to the su--ested sy#+ol na#es. 9ele"t the "hart $eriod youd like to analye with the Period dro$4down +o3. All of the default "hart $eriods availa+le in the 9trate-y ester are listed here. he 'esting -odel dro$4down +o3 allows you to sele"t +etween >/$en $ri"es only>, >Control $oints> and >'very ti"k> as the testin#odel. >/$en $ri"es only> will +e faster and will $rovide a""urate results if your e3$ert advisor is set to o$en orders only at the "lose of ea"h +ar. >'very ti"k> will atte#$t to re$li"ate intra4+ar tradinresults, +ut it is ne"essary to have "o#$lete !1 or ti"k data for the sy#+ol youre testin- on. /$ti#iin- usin- >'very ti"k> will also take lon-er. he i"k 6ata 9uite will -ive you EE #odelinquality when usin- FD ti"k data files. >Control $oints> is a "o#$ro#ise +etween the two. he Sort +y dro$4down +o3 allows you to "hoose +etween sortin- o$ti#iation results +y #a3i#u# +alan"e, #a3i#u# $rofit fa"tor, or +y lowest relative drawdown $er"enta-e. %n the event that there is #ore than one to$ result, the to$ results will +e su+4sorted +y #a3 $rofit fa"tor or #a3 +alan"e. he o$ti#iation and testin- $eriods are s$e"ified in days. he Optimization value should +e lar-er than your desired testin- $eriod. !ake sure your o$ti#iation $eriod is lar-e enou-h to -et a suita+le nu#+er of results. his will de$end on your tradin- syste# and the "hart $eriod that youre testin- on. When the Optimization field is filled out, a su--ested value of a$$ro3i#ately 2B of the o$ti#iation $eriod is added to the 'esting field. !ake sure that your testin- $eriod is lar-e enou-h to -et a suita+le nu#+er of results. For an intraday tradin- syste#, for e3a#$le, 1< trades is $ro+a+ly too few. ;owever, on a daily "hart, 1< trades #i-ht +e suffi"ient. 9et the Passes field lar-e enou-h to -ive you a de"ent sa#$le sie. ake into "onsideration the a#ount of sy#+ol data you have. For e3a#$le, if your testin- $eriod is < days lon-, and you set Passes to 2B, youll need at least 4B years of "o#$lete sy#+ol data, in"ludin- the initial o$ti#iation $eriod. he 'esting (nd Date is the end date for the last testin- $eriod in your walk forward analysis. @y default, this is set to todays date. nless you do not have "o#$lete sy#+ol data u$ to the "urrent date, it is su--ested that you leave this as is. /therwise, set it to a date that "orres$onds to the end of your "o#$lete sy#+ol data $eriod. %f %nteracti&e Optimization Result Selection is "he"ked, an o$ti#iation results -rid will $o$ u$ after ea"h o$ti#iation. he results "an +e sorted +y "olu#n, and the desired result is sele"ted +y
1
the user. his result will +e used for the su+sequent walk forward testin- $eriod. /therwise, the to$ o$ti#iation result will +e sele"ted instead, +ased on the Sort +y settin-.
%esumin$ !estin$ *ou "an resu#e your #ost re"ent walk forward analysis in the event that your testin- is interru$ted. *ou #ust +e usin- the sa#e settin-s as the $revious test for this to work. o resu#e a $revious test, si#$le $ress the 9tart Walk Forward Analysis +utton. %f the $ro-ra# dete"ts that a $revious test was interru$ted, it will $ro#$t you to resu#e the last test. 9ele"tin9es will resu#e the $revious test, and sele"tin- !o will start a new test.
Quick &ptimize he Quick Optimize ta+ runs an o$ti#iation over re"ent data, and stores a settin-s file with the to$ result in the \experts\presets folder of your live !etarader installation. *ou "an then o$en a "hart in !etarader with the e3$ert advisor and settin-s file atta"hed. his is useful for $eriodi" re4o$ti#iation of your tradin- strate-y. he settin-s are identi"al to those in the Walk Forward ta+. he Suggested 'rade Period is a$$ro3i#ately 2B of the Optimization Period , and "an +e used as a -uideline as to how lon- to trade with the "urrent settin-s +efore re4o$ti#iation is ne"essary. he end date of the o$ti#iation $eriod is todays date. Press the Start Quick Optimization +utton to run the o$ti#iation. After the o$ti#iation is run, a dialo- +o3 will dis$lay the save lo"ation of the -enerated settin-s file. he -enerated settin-s file na#e uses the na#in- s"he#e {ExpertName} {Symbol} {Period} {Date}.set. After the o$ti#iation is "o#$leted, the Open Settings On #2art +utton will +e ena+led. When $ressed, this +utton o$ens a "hart in your live "o$y of !etarader (as sele"ted in the Settings dialo-) with the sele"ted e3$ert advisor and the -enerated settin-s file already atta"hed. %f no live installation folder is set, the de#o installation will +e used instead. %f the "hart does not a$$ear in !etarader, dou+le "he"k that the e3$ert advisor e3ists in the \experts dire"tory of your live !etarader folder, and that the value in the Sym1ol field #at"hes your +rokers na#e for that sy#+ol. &ote that the ()pert Ad&isors +utton on the tool+ar will +e dea"tivated for your $rote"tion. Pre$are your e3$ert advisor for tradin-, "lose any old "harts, and re4ena+le the '3$ert Advisors +utton to "o##en"e live tradin-.
'reatin$ a (an$ua$e File %f youre usin- a non4'n-lish lan-ua-e version of !etarader, the Walk Forward Analyer needs to +e "onfi-ured for your lan-ua-e. %f your lan-ua-e does not a$$ear in the dro$4down #enu under -enu :; Settings, then it will +e ne"essary to $re$are a lan-ua-e file. 1B
First, -enerate a testin- re$ort in !etaraders 9trate-y ester (not an o$ti#iation re$ortL) &e3t, lo"ate the 'otal !et Pro0it , Pro0it Factor , Relati&e Drawdown and 'otal 'rades results. Co$y and $aste the lo"al lan-ua-e strin-s into a te3t file, usin- &ote$ad or another te3t editor. he illustration +elow shows the testin- re$ort in Mer#an. he hi-hli-hted te3t is "o$ied and $asted into a te3t file.
;ere is the final result. his file is saved to the \lan folder in the Walk Forward Analyer installation folder as !erman.lan. %f you do su""essfully "reate a lo"al lan-ua-e file, wed a$$re"iate it if you send it to us. Alternately, you "an send us a "o$y of the testin- re$ort in your lo"al lan-ua-e, and we will "reate a lan-ua-e file for you. he su$$ort e#ail address is advisorNeasye3$ertfore3."o#
1
Troubles$ootin Error essa$es )*o +alid Results in #ptimization Report) his error #eans that the o$ti#iation has finished, +ut there are either no results (the re$ort is e#$ty), or all of the results have ero trades. he #ost "o##on "auses for this are #issinsy#+ol history data, invalid o$ti#iation settin-s, or >9ki$ seless ?esults> is ena+led in !etarader.
/$en !etarader and $ress Start in the 9trate-y ester. he #ost re"ently used settin-s should already +e loaded. Che"k to see that the the ester is a"tually $rodu"ino$ti#iation results. %f not, un"he"k the Optimization +o3 and run a +a"ktest. Che"k the "est!enerator# no $istory data> under the
%f the o$ti#iation is $rodu"in- only ne-ative results (i.e. no $rofita+le result for the "urrent testin- dates), un"he"k >9ki$ seless ?esults> fro# the ri-ht4"li"k #enu under the Optimization Results ta+. his ensures that all of the o$ti#iation results will a$$ear in the o$ti#iation re$ort.
)Could *ot #pen,Create File) he $ro-ra# was una+le to read or write to the !etarader folder or the Walk Forward Analyer $ro-ra# folder. %f you are usin- Windows Vista or Windows and are -ettin- this error, turn off ser A""ount Control so that !etarader and other $ro-ra#s "an write to their $ro-ra# folders. his link shows you how to easily disa+le AC7 htt$788www.howto-eek."o#8howto8windows4 vista8disa+le4user4a""ount4"ontrol4ua"4the4easy4way4on4windows4vista8
)#ptimization Report *ot Found) his #eans that the o$ti#iation re$ort was not written to disk, either +e"ause the o$ti#iation did not "o#$lete, or !etarader was una+le to save the re$ort to the \tester\walkforward folder. Che"k the followin-7
%f you have a Windows '3$lorer window o$en with the \tester\walkforward folder loaded, this "an $revent !etarader fro# writin- to the folder. Close any '3$lorer windows when testin-.
1
Che"k todays testin- lo- in the \tester\los folder for any errors. he lo-s have an .lo e3tension. 9"roll down to the +otto# of the file and see if there are any errors listed for your e3$ert advisor.
%f your e3$ert advisor is li#ited to use on live or de#o a""ounts only, it #ay not work "orre"tly with this software. /ften, the o$ti#iation takes $la"e +efore !etarader "an "onne"t to the server. his #ay result in the 'A thinkin- that it is not lo--ed into a $ro$er a""ount. ▪
%ro&raers3 Che"k the out$ut of the %s"estin&' fun"tion. %f it returns true, then allow the 'A to o$erate nor#ally. he %sDemo&' or %s(ive&' fun"tion #ay return false if ! has not yet "onne"ted to a server.
)'n-alid Testin Report &ata) %f youre usin- a non4'n-lish lan-ua-e version of !etarader, the Walk Forward Analyer needs to +e "onfi-ured for your lan-ua-e. 9ele"t your lan-ua-e fro# the -enu ; Settings dialo-. %f your lan-ua-e is not $resent in the -enu ; Settings ; /anguage dro$4down +o3, you will need to "reate a lan-ua-e file. Please see the se"tion Creatin- a 0an-ua-e File a+ove.
!estin$ !ips Q3 My ex!ert ad.isor is not !rofita+le i,e, low or ne&ati.e walk forward efficiency5,
ry lon-er or shorter o$ti#iation and testin- $eriods.
ry a different "hart $eriod. !ost e3$ert advisors will work +etter on a lon-er $eriod, su"h as ;1 and a+ove.
Adust the o$ti#iation $ara#eters in your testin- file. ry adustin- sto$ losses, for e3a#$le, or try a wider start4sto$ ran-e and a s#aller ste$ value.
!ake sure youre usin- a suffi"ient nu#+er of Passes. A test with B rounds #ay not +e enou-h to -ive a -ood idea of the syste#s lon-4ter# $erfor#an"e. ry for at least 142 years of data at first, and len-then the nu#+er of Passes to verify your initial results.
For +est results, #ake sure that all $ositions are the e3a"t sa#e lot sie, and that you are not usin- a #oney #ana-e#ent syste# that dyna#i"ally "han-es the lot sie. /therwise your o$ti#iation $rofits will +e skewed, and the walk forward effi"ien"y will +e ina""urate.
Q3 The walk forward test takes too lon& any hours or e.en days5,
Adust the Start , Step and Stop $ara#eters in your .set file. Choose a lo-i"al 9tart and 9to$ value, and in"rease the sie of your 9te$ $ara#eter.
1I
Chan-e the estin- !odel to Open prices only . sin- (&ery tick as your testin- #odel takes #u"h lon-er, and +e"ause of the inherent short"o#in-s in !etaraders 9trate-y ester, the results are not -uaranteed to +e a""urate.
Support %f you are havin- an issue with the software, or if you +elieve you have "o#e a"ross a +u-, $lease in"lude the followin- infor#ation when e#ailin- for su$$ort7
he error #essa-e youve re"eived, if any. *ou "an atta"h a s"reenshot, if ne"essary.
he walkforward.lo file fro# the $ro-ra# installation folder. he default installation folder is )#\\Proram *iles\+alk *orward ,naly-er\.
odays lo- fro# !etaraders \tester\los folder.
he "ontents of !etaraders \tester\walkforward folder, if availa+le.
*our o$ti#iation settin-s file fro# !etaraders \tester folder.
he e3$ert advisor youre testin- with (o$tional, +ut re"o##ended).
he su$$ort e#ail address is advisorNeasye3$ertfore3."o#. We also wel"o#e any su--estions re-ardin- i#$rove#ents or enhan"e#ents to this software.
1E