Trading Systems and Money Management : A Guide to Trading and Profiting in Any Market

(やまだぃちぅ) #1
but because the results from the two latest versions of the system are somewhat
contradictory, we will do the rest of the testing on both versions (with and without
the stops).
As was the case for the long side, the final step will be to try to equalize the
lookback periods for the entry and exit formations, which now are set to two and
four days, respectively. Testing these variables, both with and without the stops,
continued to produce contradictory results. Keeping the stops produced the best
results with both variables set to two days, but without the stops, the best results
came from scratching both variables completely. When the results are contradic-
tory like this, the rule is that we should strive towards using as few variables as
possible. Therefore, I will scratch both the stops and the trailing-strength test on
the short side as well.
As was the case for the long side, despite the rather high likelihood for this
version of the system to move into negative territory, this is the version I will take
with me to Part 3, where we will try to use it as a trend filter for other systems. To
be sure, at this point the next step could have been to look closer into the results
produced by various combinations of the two variables RelStrengthLookback and
ShortStDevs, which now are set to 21 days and three standard deviations, respec-
tively. The same techniques used to find the best and most reliable stops and exit
levels (which we explore later), also can be used to fine-tune and optimize the
entry variables for robustness and likelihood for future success. I won’t do this
here, but you are free to do so if you wish. Figure 11.1 shows a few long trades in
the Russell 2000 index.

TradeStation Code


This code is for the index version of the system discussed above. For the stocks
version, more stocks (nine) have been used to calculate the total relative strength
for the market to be traded (variable TotRelStrength). To add markets to the cal-
culations, first add the necessary variables (RelStrength.1n, AvgRelStrength.1n,
and PercRelStrength.1n), then add the necessary calculations in accordance with
the logic in the code. For example, the variable AvgRelStrength.1n would be cal-
culated as Average(RelStrength.1n, RelStrengthLookback), the variable
PercRelStrength.1n would be calculated as RelStrength.1n / AvgRelStrength.1n,
and the TotRelStrength variable as PercRelStrength.12 * PercRelStrength.13 * ...
* PercRelStrength.1N.
Variables:
{These variables can also be used as inputs for optimization purposes.}
AllowLong(True), AllowShort(True), LongRelStrengthLB(100),
ShortRelStrengthLB(21), LongStDevs(0), ShortStDevs(3),
{Leave these variables alone.}

CHAPTER 11 Relative Strength Bands 133

Free download pdf