Forex Trading Software





 
Methods of technical analysis

Custom Search



























Initial Use of the Parallel Function

Now that we've programmed our function let's put it to work evaluating our system on a day by day basis.

The first use of the function should be as an indicator which plots multiple versions of the system. Here's the code for an indicator which plots the progressive results of our system using 8 different profit target levels. Obviously, you would need to write two separate indicators with 4 plots each to display all 8 system configurations as only 4 plots per indicator are allowed.

Normally when one plots a function in an indicator you would supply all the function inputs using indicator inputs. However, in this particular instance, we will be entering different values in the indicator programming so that several variations of our system outputs will be displayed. Later I will illustrate a more complex indicator in which all variations of the system can be plotted using multiple inputs.

In this indicator we're using two arrays ("Bsys"   and "BsysT" ) to store the results of   the various system variations as the function generates results for each day on the chart.

Note, in the 8 lines immediately following the array declarations, that we use a separate function call for each system variation and store it in a separate array position. For each function call, the delay and stop inputs remain static, using the input supplied values. In this example I have entered values 5 through 12 for the target input. This has the result of calculating the results of our system for 8 different profit targets each day.

The next 8 lines simply increment the proper array positions in the BsysT array each time the function calculates a new value for each system variation.

Input: DELAY(45),STP(4);

Arrays:     BSys[8](0), BSysT[8](0);

BSys[1] = OMW_BO(DELAY,5,STP);

BSys[2] = OMW_BO(DELAY,6,STP);

BSys[3] = OMW_BO(DELAY,7,STP);

BSys[4] = OMW_BO(DELAY,8,STP);

BSys[5] = OMW_BO(DELAY,9,STP);

BSys[6] = OMW_BO(DELAY,10,STP);

BSys[7] = OMW_BO(DELAY,11,STP);

BSys[8] = OMW_BO(DELAY,12,STP);

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],"BSys1");

Plot2(BSysT[2],"BSys2");

Plot3(BSysT[3],"BSys3");

Plot4(BSysT[4],"BSys4");

Plot1(BSysT[5],"BSys5");

Plot2(BSysT[6],"BSys6");

Plot3(BSysT[7],"BSys7");

Plot4(BSysT[8],"BSys8");

Now we're ready to plot our indicator and view the results. It will be necessary to plot two indicators, as mentioned above. Plot both in the same subgraph, choosing a different color for each plot. It is also necessary to set the scaling of both indicators to the same user - defined parameters to assure all plots can be compared to each other on an equal basis.

 

In the chart above you will see the results of our indicator. On this example the system settings are for a 7 point profit target while using a 4 point stop.

The results for each of our 8 system settings are displayed as a separate tracing in subgraph two of the chart, each with a different color. Remember that we are only varying the system in the indicator by a single parameter, the profit target for the system.

Bsys1 = 5 point objective; Bsys2 = 6 point objective; Bsys3 = 7 point objective; Bsys4 = 8 point objective; (black)   Bsys5 = 9 point objective; Bsys6 = 10 point objective; Bsys7 = 11 point objective; Bsys8 = 12 point objective;

With that in mind, note how the indicator positions change along with the system exits. Also, note that there is considerable difference in performance across all settings of the system as displayed by our indicator. It is of particular interest to note the indicator patterns on days when some system settings would have been profitable and some would have had losses.

For instance, look at the results on 2/16. The system sold the market at 1243.90 on a stop and took profit 7 points lower at 1236.90. Note that the indicator tracings representing profit objectives of 7 points or less also took a profit while those with greater objectives recorded losses when that system setting was stopped out at the 4 point stop loss point.

A similar pattern emerges on 2/19 when two of the simulated systems took losses when the market failed to reach their greater objectives, pulled back and eventually stopped these options out near the end of the day.

Although it is not evident on this small snapshot of the system screen, the most absorbing observation is to watch the different systems gain and lose to each other as the days progress. While it is not always evident what changes are taking place in the market to cause these variations, it becomes readily evident when there is a change in market personality developing. Again, recall that we are only measuring a single variable of system performance, that of our profit target. When other parameters such as time of breakout and the stop loss level are also included the variations of system performance become more dramatic and subsequently more revealing of the response of the system to the underlying market activity.

The next step is to construct similar indicators for the other two parameters, namely the delay input and the stop input. It is then possible to assess each input over 8 different settings dynamically as the chart moves along.

Finally, we'll construct an indicator with user selectable inputs for each parameter so the user can construct up to 4 system following plots based on the results of the observations of the first 3 indicators.



Category: Methods of technical analysis




Copyright © 2007 fxtrading-software.com