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

(やまだぃちぅ) #1
AllowLong(True), AllowShort(False), StrengthLookback(20), StrengthModifier(-5),
{Leave these variables alone.}
RelStrength(1), AvgRelStrength(1), LongPercRelStrength(1),
ShortPercRelStrength(1), VolStrength(1), AvgVolStrength(1),
LongPercVolStrength(1), ShortPercVolStrength(1),
LongPercStrength(1), ShortPercStrength(1), EntryStrength(1);
{Code for normalizing the number of contracts traded goes here.}
If BarNumber = 1 Then
EntryStrength = 1 + StrengthModifier * 0.01;
If Close Data2 <> 0 Then
RelStrength = Close / Close Data2
Else
RelStrength = RelStrength[1];
AvgRelStrength = Average(RelStrength, StrengthLookBack);
If AvgRelStrength <> 0 Then
LongPercRelStrength = RelStrength / AvgRelStrength
Else
LongPercRelStrength = LongPercRelStrength[1];
VolStrength = OBV;
AvgVolStrength = Average(VolStrength, StrengthLookBack);
If AvgVolStrength <> 0 Then
LongPercVolStrength = VolStrength / AvgVolStrength
Else
LongPercVolStrength = LongPercVolStrength[1];
LongPercStrength = LongPercRelStrength * LongPercVolStrength;
If LongPercStrength <> 0 Then
ShortPercStrength = 1 / LongPercStrength
Else
ShortPercStrength = ShortPercStrength[1];
If MarketPosition = 0 Then Begin
If AllowLong = True and LongPercStrength crosses above EntryStrength Then
Buy ("L-Oct 00") NumCont Contracts Next Bar at Market;
If AllowShort = True and ShortPercStrength crosses above EntryStrength Then
Sell ("S-Oct 00") NumCont Contracts Next Bar at Market;
End;
If EntryPrice > 0 and ShortPercStrength Crosses above EntryStrength Then
ExitLong ("L-Exit") Next Bar at Market;

CHAPTER 9 RS System No. 1 111

Free download pdf