PureBytes Links
Trading Reference Links
|
This is the corrected version(981002) of previous(981001) mail on
the RWI - Random Walk Index system.
With this corrected version the previous mail can be deleted as it
contained a few minor harmless but anoying errors.
An example ("RWI-AKZO.gif") is attached.
Regards,
Ton Maas
Ms-IRB@xxxxxxxxx
================================================================
RWI - Random Walk Index System - E.M. Poulos/T. Maas - for Metastock v6.x
================================================================
Re-written by Ton Maas - 981002 - Ms-IRB@xxxxxxxxx - Amsterdam - The Netherlands.
---------------------------------------------------------------------------------
The original formula of the Random Walk Index, was created by Equis Intl. using
information from the article "Are There Persistent Cycles", by E. Michael Poulos,
in the September 1992 issue of TASC.
----------------------------------------------------------------------------------
This indicator is defined as the ratio of an acutal price move to the expected
random walk. If the move is greater than a random walk, and thus a trend is
present, its index will be larger than "1.0" .
Random Walk
An economic theory that price movements in the commodity futures markets and in
the securities markets are completely random in character (i.e., past prices are
not a reliable indicator of future prices).
Random Walk Index
Description
In an effort to find an indicator that overcomes the effects of a fixed look-back
period and the drawbacks of traditional smoothing methods, Michael Poulos
developed the Random Walk Index. The Random Walk Index is based on the basic
geometric concept that the shortest distance between two points is a straight line.
The further prices stray from a straight line during a move between two points in
time, the less efficient the movement.
Interpretation
Mr. Poulos found significant evidence during his research that the "dividing line"
between short- and long-term time frames for most futures and stocks is right
around eight to 10 days. Therefore, he feels an effective trading system using
the RWI can be devised using two different time frames:
1.a short-term RWI (two to seven periods) for the market's frantic, random side
2.a long-term RWI (eight to 64 periods) for the market's steady, trending side
-Peaks in the short-term RWI of highs tend to coincide with price peaks.
-Peaks in the short-term RWI of lows tend to coincide with price troughs.
-Readings of the long-term RWI of highs above 1.0 provides a good indication of a
sustainable uptrend.
-Readings of the long-term RWI of lows below 1.0 provide a good indication of a
sustainable downtrend.
Indicators
The Random Walk Index is standard build-in in Metastock v6.5. See below for its
Parameters. However custom versions can be build by using the Indicator Builder.
In Metastock v6.5:
NAME Random Walk Index [6.5] High
SYNTAX rwih( PERIODS )
FUNCTION Calculates the predefined Random Walk Index of the highs indicator.
EXAMPLE rwih( 21 )
NAME Random Walk Index [6.5] Low
SYNTAX rwil( PERIODS )
FUNCTION Calculates the predefined Random Walk Index of the lows indicator.
EXAMPLE rwil( 21 )
Parameters v6.5
Standard Time Periods ST = 9
Standard Time Periods LT = 70
Standard Indicator Color = High: Red,Solid and Low: Red,Dotted
Standard Horizontal Line = 1.0, Black/Blue
Note that by DEFAULT the v6.5 build-in is set to 9 for the periods used for both
functions, and when 'dragged' from the Indicator Builder on the chart, both will
be promptly plotted as the one(1) indicator in their inner window.
Formula NAMES are between brackets, but these must NOT be used in their names.
In Metastock v6.x:
NAME:
"Random Walk Index [6.0] High"
Formula:
{This is the ST 9-day version of the RWI. Color High: Red,Solid
and the Low: Red,Dotted. Horizontal line at 1.0(Black/Blue)}
Max( (HIGH -Ref(LOW,-1)) / ( (Ref(Sum(ATR(1),2),-1) / 2)*Sqrt(2) ),
Max( (HIGH -Ref(LOW,-2)) / ( (Ref(Sum(ATR(1),3),-1) / 3)*Sqrt(3) ),
Max( (HIGH -Ref(LOW,-3)) / ( (Ref(Sum(ATR(1),4),-1) / 4)*Sqrt(4) ),
Max( (HIGH -Ref(LOW,-4)) / ( (Ref(Sum(ATR(1),5),-1) / 5)*Sqrt(5) ),
Max( (HIGH -Ref(LOW,-5)) / ( (Ref(Sum(ATR(1),6),-1) / 6)*Sqrt(6) ),
Max( (HIGH -Ref(LOW,-6)) / ( (Ref(Sum(ATR(1),7),-1) / 7)*Sqrt(7) ),
Max( (HIGH -Ref(LOW,-7)) / ( (Ref(Sum(ATR(1),8),-1) / 8)*Sqrt(8) ),
Max( (HIGH -Ref(LOW,-8)) / ( (Ref(Sum(ATR(1),9),-1) / 9)*Sqrt(9) ),
0))))))))
NAME:
"Random Walk Index [6.0] Low"
Formula:
{This is the ST 9-day version of the RWI. For High: Red,Solid
and the Low: Red,Dotted. Horizontal line at 1.0(Black/Blue)}
Max( (Ref(HIGH,-1) -LOW) / ( (Ref(Sum(ATR(1),2),-1) / 2)*Sqrt(2) ),
Max( (Ref(HIGH,-2) -LOW) / ( (Ref(Sum(ATR(1),3),-1) / 3)*Sqrt(3) ),
Max( (Ref(HIGH,-3) -LOW) / ( (Ref(Sum(ATR(1),4),-1) / 4)*Sqrt(4) ),
Max( (Ref(HIGH,-4) -LOW) / ( (Ref(Sum(ATR(1),5),-1) / 5)*Sqrt(5) ),
Max( (Ref(HIGH,-5) -LOW) / ( (Ref(Sum(ATR(1),6),-1) / 6)*Sqrt(6) ),
Max( (Ref(HIGH,-6) -LOW) / ( (Ref(Sum(ATR(1),7),-1) / 7)*Sqrt(7) ),
Max( (Ref(HIGH,-7) -LOW) / ( (Ref(Sum(ATR(1),8),-1) / 8)*Sqrt(8) ),
Max( (Ref(HIGH,-8) -LOW) / ( (Ref(Sum(ATR(1),9),-1) / 9)*Sqrt(9) ),
0))))))))
Note that for both the High+Low as functions or as indicators "friendly"
error messages can be returned, eg regarding the "0" or ZERO division.
This is very common in the program and reflects non-clean data files.
These "friendlies" can be solved by a cleaning up of the securities
history data-file. In the Downloader:
-Search by using the "TOOLS|TEST" function, eg apply ALL filters before
running the "TEST" on the data, for any faulty dates, data, records etc.
-Clear all non-trading days, eg holidays etc.(usualy adressed by a "0"
for that days data)
Additional Indicators:
The "40", as is printed here, are 2 separate indicators, eg 28 High + 40 High
and 28 Low + 40 Low. This, as the Indicator Builder does not permit any
long "lengthy" formulas to be inputted. The proper version, however, does
require for each of the "40"(High or Low) to be only one(1) formula.
This can be done by a manual input, eg "copy+paste" as the first part, as much
of the first lines of the "28"-formula as is possible into the formula-field,
then add more lines to it that is possible to add and then, manualy add the rest of
the lines, by typing the rest of "28" + the "40". Ofcourse the reference(Call) formula
is then NOT to be added.
Do all of this for both of the "RWI 40" indicators(High and Low).
NAME:
"Random Walk Index [6.0] 28 High"
Formula:
Max((HIGH-Ref(LOW,-1))/((Ref(Sum(ATR(1),2),-1)/2)*Sqrt(2)),
Max((HIGH-Ref(LOW,-2))/((Ref(Sum(ATR(1),3),-1)/3)*Sqrt(3)),
Max((HIGH-Ref(LOW,-3))/((Ref(Sum(ATR(1),4),-1)/4)*Sqrt(4)),
Max((HIGH-Ref(LOW,-4))/((Ref(Sum(ATR(1),5),-1)/5)*Sqrt(5)),
Max((HIGH-Ref(LOW,-5))/((Ref(Sum(ATR(1),6),-1)/6)*Sqrt(6)),
Max((HIGH-Ref(LOW,-6))/((Ref(Sum(ATR(1),7),-1)/7)*Sqrt(7)),
Max((HIGH-Ref(LOW,-7))/((Ref(Sum(ATR(1),8),-1)/8)*Sqrt(8)),
Max((HIGH-Ref(LOW,-8))/((Ref(Sum(ATR(1),9),-1)/9)*Sqrt(9)),
Max((HIGH-Ref(LOW,-9))/((Ref(Sum(ATR(1),10),-1)/10)*Sqrt(10)),
Max((HIGH-Ref(LOW,-10))/((Ref(Sum(ATR(1),11),-1)/11)*Sqrt(11)),
Max((HIGH-Ref(LOW,-11))/((Ref(Sum(ATR(1),12),-1)/12)*Sqrt(12)),
Max((HIGH-Ref(LOW,-12))/((Ref(Sum(ATR(1),13),-1)/13)*Sqrt(13)),
Max((HIGH-Ref(LOW,-13))/((Ref(Sum(ATR(1),14),-1)/14)*Sqrt(14)),
Max((HIGH-Ref(LOW,-14))/((Ref(Sum(ATR(1),15),-1)/15)*Sqrt(15)),
Max((HIGH-Ref(LOW,-15))/((Ref(Sum(ATR(1),16),-1)/16)*Sqrt(16)),
Max((HIGH-Ref(LOW,-16))/((Ref(Sum(ATR(1),17),-1)/17)*Sqrt(17)),
Max((HIGH-Ref(LOW,-17))/((Ref(Sum(ATR(1),18),-1)/18)*Sqrt(18)),
Max((HIGH-Ref(LOW,-18))/((Ref(Sum(ATR(1),19),-1)/19)*Sqrt(19)),
Max((HIGH-Ref(LOW,-19))/((Ref(Sum(ATR(1),20),-1)/20)*Sqrt(20)),
Max((HIGH-Ref(LOW,-20))/((Ref(Sum(ATR(1),21),-1)/21)*Sqrt(21)),
Max((HIGH-Ref(LOW,-21))/((Ref(Sum(ATR(1),22),-1)/22)*Sqrt(22)),
Max((HIGH-Ref(LOW,-22))/((Ref(Sum(ATR(1),23),-1)/23)*Sqrt(23)),
Max((HIGH-Ref(LOW,-23))/((Ref(Sum(ATR(1),24),-1)/24)*Sqrt(24)),
Max((HIGH-Ref(LOW,-24))/((Ref(Sum(ATR(1),25),-1)/25)*Sqrt(25)),
Max((HIGH-Ref(LOW,-25))/((Ref(Sum(ATR(1),26),-1)/26)*Sqrt(26)),
Max((HIGH-Ref(LOW,-26))/((Ref(Sum(ATR(1),27),-1)/27)*Sqrt(27)),
Max((HIGH-Ref(LOW,-27))/((Ref(Sum(ATR(1),28),-1)/28)*Sqrt(28)),
0)))))))))))))))))))))))))))
NAME:
"Random Walk Index [6.0] 40 High"
Formula:
{This is the LT 40-day version of the RWI. Color High: Red,Solid
and the Low: Red,Dotted. Horizontal line at 1.0(Black/Blue)}
Fml( "Random Walk Index [6.0] 28 High" ) +
Max((HIGH-Ref(LOW,-28))/((Ref(Sum(ATR(1),29),-1)/29)*Sqrt(29)),
Max((HIGH-Ref(LOW,-29))/((Ref(Sum(ATR(1),30),-1)/30)*Sqrt(30)),
Max((HIGH-Ref(LOW,-30))/((Ref(Sum(ATR(1),31),-1)/31)*Sqrt(31)),
Max((HIGH-Ref(LOW,-31))/((Ref(Sum(ATR(1),32),-1)/32)*Sqrt(32)),
Max((HIGH-Ref(LOW,-32))/((Ref(Sum(ATR(1),33),-1)/33)*Sqrt(33)),
Max((HIGH-Ref(LOW,-33))/((Ref(Sum(ATR(1),34),-1)/34)*Sqrt(34)),
Max((HIGH-Ref(LOW,-34))/((Ref(Sum(ATR(1),35),-1)/35)*Sqrt(35)),
Max((HIGH-Ref(LOW,-35))/((Ref(Sum(ATR(1),36),-1)/36)*Sqrt(36)),
Max((HIGH-Ref(LOW,-36))/((Ref(Sum(ATR(1),37),-1)/37)*Sqrt(37)),
Max((HIGH-Ref(LOW,-37))/((Ref(Sum(ATR(1),38),-1)/38)*Sqrt(38)),
Max((HIGH-Ref(LOW,-38))/((Ref(Sum(ATR(1),39),-1)/39)*Sqrt(39)),
Max((HIGH-Ref(LOW,-39))/((Ref(Sum(ATR(1),40),-1)/40)*Sqrt(40)),
0))))))))))))
NAME:
"Random Walk Index [6.0] 28 Low"
Formula:
Max((Ref(HIGH,-1)-LOW)/((Ref(Sum(ATR(1),2),-1)/2)*Sqrt(2)),
Max((Ref(HIGH,-2)-LOW)/((Ref(Sum(ATR(1),3),-1)/3)*Sqrt(3)),
Max((Ref(HIGH,-3)-LOW)/((Ref(Sum(ATR(1),4),-1)/4)*Sqrt(4)),
Max((Ref(HIGH,-4)-LOW)/((Ref(Sum(ATR(1),5),-1)/5)*Sqrt(5)),
Max((Ref(HIGH,-5)-LOW)/((Ref(Sum(ATR(1),6),-1)/6)*Sqrt(6)),
Max((Ref(HIGH,-6)-LOW)/((Ref(Sum(ATR(1),7),-1)/7)*Sqrt(7)),
Max((Ref(HIGH,-7)-LOW)/((Ref(Sum(ATR(1),8),-1)/8)*Sqrt(8)),
Max((Ref(HIGH,-8)-LOW)/((Ref(Sum(ATR(1),9),-1)/9)*Sqrt(9)),
Max((Ref(HIGH,-9)-LOW)/((Ref(Sum(ATR(1),10),-1)/10)*Sqrt(10)),
Max((Ref(HIGH,-10)-LOW)/((Ref(Sum(ATR(1),11),-1)/11)*Sqrt(11)),
Max((Ref(HIGH,-11)-LOW)/((Ref(Sum(ATR(1),12),-1)/12)*Sqrt(12)),
Max((Ref(HIGH,-12)-LOW)/((Ref(Sum(ATR(1),13),-1)/13)*Sqrt(13)),
Max((Ref(HIGH,-13)-LOW)/((Ref(Sum(ATR(1),14),-1)/14)*Sqrt(14)),
Max((Ref(HIGH,-14)-LOW)/((Ref(Sum(ATR(1),15),-1)/15)*Sqrt(15)),
Max((Ref(HIGH,-15)-LOW)/((Ref(Sum(ATR(1),16),-1)/16)*Sqrt(16)),
Max((Ref(HIGH,-16)-LOW)/((Ref(Sum(ATR(1),17),-1)/17)*Sqrt(17)),
Max((Ref(HIGH,-17)-LOW)/((Ref(Sum(ATR(1),18),-1)/18)*Sqrt(18)),
Max((Ref(HIGH,-18)-LOW)/((Ref(Sum(ATR(1),19),-1)/19)*Sqrt(19)),
Max((Ref(HIGH,-19)-LOW)/((Ref(Sum(ATR(1),20),-1)/20)*Sqrt(20)),
Max((Ref(HIGH,-20)-LOW)/((Ref(Sum(ATR(1),21),-1)/21)*Sqrt(21)),
Max((Ref(HIGH,-21)-LOW)/((Ref(Sum(ATR(1),22),-1)/22)*Sqrt(22)),
Max((Ref(HIGH,-22)-LOW)/((Ref(Sum(ATR(1),23),-1)/23)*Sqrt(23)),
Max((Ref(HIGH,-23)-LOW)/((Ref(Sum(ATR(1),24),-1)/24)*Sqrt(24)),
Max((Ref(HIGH,-24)-LOW)/((Ref(Sum(ATR(1),25),-1)/25)*Sqrt(25)),
Max((Ref(HIGH,-25)-LOW)/((Ref(Sum(ATR(1),26),-1)/26)*Sqrt(26)),
Max((Ref(HIGH,-26)-LOW)/((Ref(Sum(ATR(1),27),-1)/27)*Sqrt(27)),
Max((Ref(HIGH,-27)-LOW)/((Ref(Sum(ATR(1),28),-1)/28)*Sqrt(28)),
0)))))))))))))))))))))))))))
NAME:
"Random Walk Index [6.0] 40 Low"
Formula:
{This is the LT 40-day version of the RWI. Color High: Red,Solid
and the Low: Red,Dotted. Horizontal line at 1.0(Black/Blue)}
Fml( "Random Walk Index [6.0] 28 Low" ) +
Max((Ref(HIGH,-28)-LOW)/((Ref(Sum(ATR(1),29),-1)/29)*Sqrt(29)),
Max((Ref(HIGH,-29)-LOW)/((Ref(Sum(ATR(1),30),-1)/30)*Sqrt(30)),
Max((Ref(HIGH,-30)-LOW)/((Ref(Sum(ATR(1),31),-1)/31)*Sqrt(31)),
Max((Ref(HIGH,-31)-LOW)/((Ref(Sum(ATR(1),32),-1)/32)*Sqrt(32)),
Max((Ref(HIGH,-32)-LOW)/((Ref(Sum(ATR(1),33),-1)/33)*Sqrt(33)),
Max((Ref(HIGH,-33)-LOW)/((Ref(Sum(ATR(1),34),-1)/34)*Sqrt(34)),
Max((Ref(HIGH,-34)-LOW)/((Ref(Sum(ATR(1),35),-1)/35)*Sqrt(35)),
Max((Ref(HIGH,-35)-LOW)/((Ref(Sum(ATR(1),36),-1)/36)*Sqrt(36)),
Max((Ref(HIGH,-36)-LOW)/((Ref(Sum(ATR(1),37),-1)/37)*Sqrt(37)),
Max((Ref(HIGH,-37)-LOW)/((Ref(Sum(ATR(1),38),-1)/38)*Sqrt(38)),
Max((Ref(HIGH,-38)-LOW)/((Ref(Sum(ATR(1),39),-1)/39)*Sqrt(39)),
Max((Ref(HIGH,-39)-LOW)/((Ref(Sum(ATR(1),40),-1)/40)*Sqrt(40)),
0))))))))))))
Note that the "40" indicators(both High+Low) reference(Call) the other
"28" indicators(High+Low) and as such these "28" indicators(both
High+Low) must be present in the Indicator Builder.
NAME:
"Random Walk Index [6.0] Smoothed LT High"
Formula:
{This is the smoothed 50-day version of the RWI, "BullPower".
Color High: Red,Solid and the Low: Red,Dotted.
Horizontal line at 1.0(Black/Blue)}
SUM(
Max( (HIGH -Ref(LOW,-1)) / ( (Ref(Sum(ATR(1),2),-1) / 2)*Sqrt(2) ),
Max( (HIGH -Ref(LOW,-2)) / ( (Ref(Sum(ATR(1),3),-1) / 3)*Sqrt(3) ),
Max( (HIGH -Ref(LOW,-3)) / ( (Ref(Sum(ATR(1),4),-1) / 4)*Sqrt(4) ),
Max( (HIGH -Ref(LOW,-4)) / ( (Ref(Sum(ATR(1),5),-1) / 5)*Sqrt(5) ),
Max( (HIGH -Ref(LOW,-5)) / ( (Ref(Sum(ATR(1),6),-1) / 6)*Sqrt(6) ),
Max( (HIGH -Ref(LOW,-6)) / ( (Ref(Sum(ATR(1),7),-1) / 7)*Sqrt(7) ),
Max( (HIGH -Ref(LOW,-7)) / ( (Ref(Sum(ATR(1),8),-1) / 8)*Sqrt(8) ),
Max( (HIGH -Ref(LOW,-8)) / ( (Ref(Sum(ATR(1),9),-1) / 9)*Sqrt(9) ),
0)))))))),40)/40
NAME:
"Random Walk Index [6.0] Smoothed LT Low"
Formula:
{This is the smoothed 50-day version of the RWI, "BearPower".
Color High: Red,Solid and the Low: Red,Dotted.
Horizontal line at 1.0(Black/Blue)}
SUM(
Max( (Ref(HIGH,-1) -LOW) / ( (Ref(Sum(ATR(1),2),-1) / 2)*Sqrt(2) ),
Max( (Ref(HIGH,-2) -LOW) / ( (Ref(Sum(ATR(1),3),-1) / 3)*Sqrt(3) ),
Max( (Ref(HIGH,-3) -LOW) / ( (Ref(Sum(ATR(1),4),-1) / 4)*Sqrt(4) ),
Max( (Ref(HIGH,-4) -LOW) / ( (Ref(Sum(ATR(1),5),-1) / 5)*Sqrt(5) ),
Max( (Ref(HIGH,-5) -LOW) / ( (Ref(Sum(ATR(1),6),-1) / 6)*Sqrt(6) ),
Max( (Ref(HIGH,-6) -LOW) / ( (Ref(Sum(ATR(1),7),-1) / 7)*Sqrt(7) ),
Max( (Ref(HIGH,-7) -LOW) / ( (Ref(Sum(ATR(1),8),-1) / 8)*Sqrt(8) ),
Max( (Ref(HIGH,-8) -LOW) / ( (Ref(Sum(ATR(1),9),-1) / 9)*Sqrt(9) ),
0)))))))),40)/40
Note that both the BullPower and the BearPower indicators can well
function as single, stand alone indicators.
System
Mr. Poulus feels that an effective trading system could be built that
opens trades (after short-term pull-backs against the direction of the
long-term trend) using the following guidelines:
·Enter long (or close short) when the long-term RWI of the highs is
greater than 1.0, and the short-term RWI of lows peaks above 1.0.
·Enter short (or close long) when the long-term RWI of the lows is
greater than 1.0, and the short-term RWI of highs peaks above 1.0.
Attachment Converted: "c:\eudora\attach\RWI-AKZO.gif"
|