Analysis bench - optimize parameters (advanced) |
It is often useful trying different combinations of parameter settings when finding out what works and what doesn´t for a certain trading strategy. You may want to find a range of values for a parameter that produce good results. We assume you have a project up and running, and want to include a parameter to be optimized. The simulator can handle several parameters simultaneously. The example below shows how this can be done.
As an example we have used the trigger script sl) OMX Raptor Long: and added the code marked in red: {Raptor long } { 120911 } {optimize parametrar} {$opt(värde1,5,12,1)} this defines the "värde2" variable to be tested with values 5 to 12 in steps of 1 värde1:=7 this sets the default value to be used when the script runs live { definiera variabler } mval:=mov(mfi(3),3,e) mmv:=hhv(aref(mval,1),3) close:=cmpref(c,0,a) mc1:=mov(close,12,e) mc2:=mov(close,26,e) mcd1:=sub(mc1,mc2) mctrig:=mov(mcd1,värde1,e) mcd_signal:=gt(mcd1,mctrig) Once the script is saved you can click Refresh updated from system and click the Optimize parameters button: A dialog for editing the parameters is opened: Select the row you want to edit, and click Edit to show the parameter values in the shown area. You can now change the values to alter the From - To - Step values as desired. Click Save to save. You can also decide what step algorithm should be used if you are optimizing several parameters, for example if you want to step them individually or in Groups. Markera den rad du vill redigera och klicka på Redigera så visas värdena i fälten Från - Till - Steg. You can also decide what step algorithm to use, for example if you are optimizing several parameters and want to step them individually or in groups: |
Analysis bench - run batch job an evaulate results (advanced) |
The project is run in the same manner as any other project. While running the two progress bars indicate the simulation to the left and the entire optimization to the right: As the job is finished you can select each run in the toolbar: Using the arrow buttons enables you to browse through the list of results to quickly get a view of what values stand out as useful etc. If you have opened a chart from the Analyzer, this will also be updated accordingly. |
Analysis bench - finish optimization (advanced) |
When you have found your favorite parameter settings that you want to use for live trading you can turn off optimization mode. This is done by entering the dialog below and clicking the button shown, then OK to exit. Run one simulation again to verify the result, and now your model is ready to trade live. |