Putting It All Together
Now that we’ve completed the parallel function
and given a few examples of its operation on selected system inputs, lets put
the indicator portion of the puzzle together in a form which will allow more
thorough system testing.
The code below allows 3 inputs for
all three critical variables of the system – delay, target and stop. The inputs
allow the user to select a starting value for each variable from which the
system analysis will begin. An incremental value can also be entered for each
variable allowing the indicator to calculate 8 simulations for each variable.
By observing the individual plots for delay,
target and stop the user now has a fairly good idea of which settings are going
to be best for the optimal performance of the system, but up to now has not
been able to observe the multiple system analysis across all inputs. With this
next step, the user can enter a range of settings for each variable according
to the observations from the previous indicator plots and then observe
indicator readings representative of the total system using a varied range of
variable inputs.
Input:
Delay_Start(45),Delay_Inc(5),Tgt_Start(5),Tgt_Inc(1),Stp_Start(4), Stop_Inc(1);
Vars:
Pts(0), TTlPts(0);
Arrays: Â BSys[8](0), BSysT[8](0);
BSys[1] =
OMW_BO(Delay_Start + (Delay_Inc*0),Tgt_Start + (Tgt_Inc*0),Stp_Start +
(Stop_Inc*0));
BSys[2] =
OMW_BO(Delay_Start + (Delay_Inc*1),Tgt_Start + (Tgt_Inc*1),Stp_Start +
(Stop_Inc*1));
BSys[3] =
OMW_BO(Delay_Start + (Delay_Inc*2),Tgt_Start + (Tgt_Inc*2),Stp_Start +
(Stop_Inc*2));
BSys[4] =
OMW_BO(Delay_Start + (Delay_Inc*3),Tgt_Start + (Tgt_Inc*3),Stp_Start +
(Stop_Inc*3));
BSys[5] =
OMW_BO(Delay_Start + (Delay_Inc*4),Tgt_Start + (Tgt_Inc*4),Stp_Start +
(Stop_Inc*4));
BSys[6] =
OMW_BO(Delay_Start + (Delay_Inc*5),Tgt_Start + (Tgt_Inc*5),Stp_Start +
(Stop_Inc*5));
BSys[7] =
OMW_BO(Delay_Start + (Delay_Inc*6),Tgt_Start + (Tgt_Inc*6),Stp_Start +
(Stop_Inc*6));
BSys[8] =
OMW_BO(Delay_Start + (Delay_Inc*7),Tgt_Start + (Tgt_Inc*7),Stp_Start +
(Stop_Inc*7));
If BSys[1] <> Bsys[1][1] then BSysT[1] =
BSyst[1] + BSys[1];
If BSys[2] <> Bsys[2][1] then BSysT[2] =
BSyst[2] + BSys[2];
If BSys[3] <> Bsys[3][1] then BSysT[3] =
BSyst[3] + BSys[3];
If BSys[4] <> Bsys[4][1] then BSysT[4] =
BSyst[4] + BSys[4];
If BSys[5] <> Bsys[5][1] then BSysT[5] =
BSyst[5] + BSys[5];
If BSys[6] <> Bsys[6][1] then BSysT[6] =
BSyst[6] + BSys[6];
If BSys[7] <> Bsys[7][1] then BSysT[7] =
BSyst[7] + BSys[7];
If BSys[8] <> Bsys[8][1] then BSysT[8] =
BSyst[8] + BSys[8];
Plot1(BSysT[1]*250,"Best1");
Plot2(BSysT[2]*250,"Best2");
Plot3(BSysT[3]*250,"Best3");
Plot4(BSysT[4]*250,"Best4");
{end;}

The chart above identifies the results of
simulated testing across all three system variables, each with its own starting
value and incremental values.

The box
at right lists the results of each of our 8 system simulations as of the date
at the top of the window. Each is color coded to one of the plots in the
above chart.
By being
aware of the inputs for the indicator, one can graphically determine which
settings were optimal for the system at any one given time through the course
of the chart.
For
instance, on the date shown, 2-25-99, the magenta simulation, reflecting
system settings of 75, 11 and 10 for
delay, target and stop respectively, is showing the best overall net profit
for the system with a net of $29,450 for the period beginning 1-5-99.
It is
also obvious from the results presented that the system we have developed
here meets our criteria of a robust system as the results of a wide array of
variable settings produce a smooth progression of values. Note that there are
no settings which greatly outdistance any of the others, assuring us that the
system results are not the result of one system setting catching a huge trade
which accounts for the majority of the profits for the system.
Category: Methods of technical analysis
|