SCT.FileString. The file export takes place in the command FileAppend. The
name of the file is specified by the variable SCT.FileString, created in step 4.
- The code for the stop type 1 (the percentage stop) will test the following four
exit techniques: the stop loss, the profit target, the trailing stop, and the time-
based stop. In the first round of testing, we will leave out the trailing stop. In
the second run of testing, we will leave out the stop loss, letting the trailing
stop function as a stop loss as well. - The code for the stop type 2 (the true-range stop) will test the following four
exit techniques: the stop loss, the profit target, the trailing stop, and the time-
based stop. In the first round of testing, we will leave out the trailing stop. In
the second run of testing, we will leave out the stop loss, letting the trailing
stop function as a stop loss as well. When testing using the stop loss, the true
ranges used will be fixed at the day for the entry. When testing with the trail-
ing stop, the true ranges will be recalculated for each bar. In both cases, the
lookback period for the average true ranges is set to equal the maximum
allowed trade length as defined by the variable MaxBarsVar.
HYBRID SYSTEM NO. 1
In the case of the Hybrid system, it turned out that the true range-based stops pro-
duced the best results. Remember, we tested two different concepts of each stop
and exit methodology, and two different methods of each concept.
Stop-loss Version
For the true range concept, method one consisted of a stop loss (varying between
0.2 and 2 average true ranges, in steps of 0.2), a profit target (varying between 0.5
and 5 average true ranges, in steps of 0.5), and a maximum trade length (varying
between 1 and 10 bars, in steps of 1).
The best way to sift through all the surface charts produced by the code, is to
start by looking at the standard deviations of the returns, which should be as low
as possible. This will give us a first clue on how to interpret the rest of the data.
Figures 20.1 to 20.3 show the standard deviations of the returns for various com-
binations of the input variables. In Figure 20.1, for example, the input variables are
the profit target on the x-axis and the stop loss on the y-axis.
To keep the standard deviations as low as possible, Figures 20.1 to 20.3 indi-
cate that we should strive to come up with a combination of the three input vari-
ables that place us as far down and as far to the left as possible in all the other
charts. This means that the values for all input variables should be as low as pos-
sible. (This will hold true for all other systems as well.)
Figure 20.4 shows the average profit per trade in relation to the profit target and
the stop loss. As you can see, a profit target between 1 and 1.5 average true ranges
226 PART 3 Stops, Filters, and Exits