PureBytes Links
Trading Reference Links
|
Richard
----- Original Message -----
From: Richard Alford
To: amibroker@xxxxxxxxxxxxxxx
Sent: Tuesday, July 02, 2002 8:42 AM
Subject: Tomasz - Psuedo Code for RWI - Random Walk Index (and or RWIhi/lo etc.)
Thanks Stephane, I think the concept is becoming clear, it is the implementation that is confusing me at the present. The simplest description I have located is
ATR = Average Trading Range
RWI high = (HI - LO[n]) / ATR * n sqrt(n)
RWI low = (HI[n] - LO) / ATR * n sqrt(n)
There are several implementation choices - which ATR do you use, today's, last n days, max of last n days, etc. It appears that the common MetaStock may use n*max(TR(n)), n = 1
however, the AB code has two parameters,
SYNTAX rwi( minperiods, maxperiods )
RETURNS ARRAY
FUNCTION Calculates the Random Walk Index indicator as a difference between Random Walk Index from Highs (RWIHI() function) and Random Walk Index from Lows (RWILO() function.
EXAMPLE rwi( 9, 40 );
and I am not certain what the min/max periods refer to. They may be the range over which the statistics are generated, although that still hold some ambiguity in my mind?
May have to wait for clarification from TJ. I have attached some test AFL indicator code for those interested.
Thanks,
Richard
----- Original Message -----
From: nenapacwanfr
To: amibroker@xxxxxxxxxxxxxxx
Sent: Tuesday, July 02, 2002 12:22 AM
Subject: [amibroker] Re: RWI - Random Walk Index
Richard,
I have a description in a book ( at the period when I have tried
technifilter)
if we use the average true range over 4 days to quantify what a
normal step size would be, then we would expect random movement to
be within 2 times the av true range, which is the square root of
four times the step size.
if the traveled distance is more than this number, then the price
has moved more than we would expect from random movement.
therefore the movement is probably not random.
it is how works RWI comparing actual price displacement to expected
displacement for random moves.
I can copy more if you want ( short term formula; long term formula)
stephane
> Ran across the AB functions RWI(min,max) etc. and I have been
unable to
> locate a mathematical description or motivation (or intelligible
code).
>
> Apparently, RWI was presented by Michael Poulos in the Jan 92,
TASC: Random
> Walk was defined in Technical Analysis Of Stocks and Commodities
by Michael
> Poulos (see TASC, January 1992 and September 1992). Random Walk
calculates
> how much price should move over a given period if its movement
were purely
> random. When price moves past this level, it can be assumed to be
trending
> in that direction and the system will issue a signal. The maximum
look-back
> period for Random Walk is optimizable in this system. An excellent
system.
>
> Sounds interesting, however, I cannot ferret out the significance
of the
> min/max parameters. BTW I can locate several metastock listings,
and an
> easy language listing - neither help me much.
>
>
> Can anyone suggest a reference?
>
> Cheers,
>
> Richard
Yahoo! Groups Sponsor
ADVERTISEMENT
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
------=_NextPart_001_0042_01C221A4.8FC17A50
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2716.2200" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Sorry, message was sent without AFL test code - it
is now attached,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Richard</FONT></DIV>
<DIV style="FONT: 10pt arial">----- Original Message -----
<DIV style="BACKGROUND: #e4e4e4; font-color: black"><B>From:</B> <A
title=richard.alford@xxxx href="mailto:richard.alford@xxxx">Richard
Alford</A> </DIV>
<DIV><B>To:</B> <A title=amibroker@xxxxxxxxxxxxxxx
href="mailto:amibroker@xxxxxxxxxxxxxxx">amibroker@xxxxxxxxxxxxxxx</A> </DIV>
<DIV><B>Sent:</B> Tuesday, July 02, 2002 8:42 AM</DIV>
<DIV><B>Subject:</B> Tomasz - Psuedo Code for RWI - Random Walk Index (and or
RWIhi/lo etc.)</DIV></DIV>
<DIV><BR></DIV>
<DIV><FONT face=Arial size=2>Thanks Stephane, I think the concept is
becoming clear, it is the implementation that is confusing me at the
present. The simplest description I have located is</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT size=4>ATR = Average Trading Range<BR>RWI high = (HI - LO[n]) / ATR *
n sqrt(n)<BR>RWI low = (HI[n] - LO) / ATR * n sqrt(n)</FONT></DIV>
<DIV><FONT size=4></FONT> </DIV>
<DIV><FONT face=Arial size=2>There are several implementation choices -which
ATR do you use, today's, last n days, max of last n days, etc. It appears
that the common MetaStock may use n*max(TR(n)), n = 1</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>however, the AB code has two
parameters,</FONT></DIV><FONT face=Arial size=2>
<DIV>
<TABLE width="90%" bgColor=#c0c0c0 border=0>
<TBODY>
<TR>
<TD width="20%">SYNTAX </TD>
<TD width="80%">rwi( <I>minperiods</I>, <I>maxperiods</I> )</TD></TR>
<TR>
<TD>RETURNS</TD>
<TD>ARRAY</TD></TR>
<TR>
<TD vAlign=top>FUNCTION </TD>
<TD width="80%">Calculates the Random Walk Index indicator as a difference
between Random Walk Index from Highs (RWIHI() function) and Random Walk
Index from Lows (RWILO() function.</TD></TR>
<TR>
<TD vAlign=top>EXAMPLE</TD>
<TD vAlign=top>rwi( 9, 40 );</TD></TR></TBODY></TABLE></DIV>
<DIV> </DIV>
<DIV>and I am not certain what the min/max periods refer to. They maybe
the range over which the statistics are generated, although that still holdsome
ambiguity in my mind?</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>May have to wait for clarification from TJ. I have attached some test AFL
indicator code for those interested.</DIV>
<DIV> </DIV>
<DIV>Thanks,</DIV>
<DIV> </DIV>
<DIV>Richard</DIV></FONT>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=nenapacwanfr@xxxx
href="mailto:nenapacwanfr@xxxx">nenapacwanfr</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=amibroker@xxxxxxxxxx
href="mailto:amibroker@xxxxxxxxxxxxxxx">amibroker@xxxxxxxxxxxxxxx</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, July 02, 2002 12:22
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [amibroker] Re: RWI - Random
Walk Index</DIV>
<DIV><BR></DIV><TT>Richard,<BR>I have a description in a book ( at the period
when I have tried <BR>technifilter)<BR><BR>if we use the average true range
over 4 days to quantify what a <BR>normal step size would be, then we would
expect random movement to <BR>be within 2 times the av true range, which is
the square root of <BR>four times the step size.<BR>if the traveled distance
is more than this number, then the price <BR>has moved more than we would
expect from random movement.<BR>therefore the movement is probably not
random.<BR>it is how works RWI comparing actual price displacement to expected
<BR>displacement for random moves.<BR><BR><BR>I can copy more if you want(
short term formula; long term formula)<BR>stephane<BR><BR><BR><BR><BR>> Ran
across the AB functions RWI(min,max) etc. and I have been <BR>unable
to<BR>> locate a mathematical description or motivation (or intelligible
<BR>code).<BR>> <BR>> Apparently, RWI was presented by Michael Poulos in
the Jan 92, <BR>TASC: Random<BR>> Walk was defined in Technical Analysis Of
Stocks and Commodities <BR>by Michael<BR>> Poulos (see TASC, January 1992
and September 1992). Random Walk <BR>calculates<BR>> how much price should
move over a given period if its movement <BR>were purely<BR>> random. When
price moves past this level, it can be assumed to be <BR>trending<BR>>in
that direction and the system will issue a signal. The maximum
<BR>look-back<BR>> period for Random Walk is optimizable in this system. An
excellent <BR>system.<BR>> <BR>> Sounds interesting, however, I cannot
ferret out the significance <BR>of the<BR>> min/max parameters. BTW I
can locate several metastock listings, <BR>and an<BR>> easy language
listing - neither help me much.<BR>> <BR>> <BR>> Can anyone suggest a
reference?<BR>> <BR>> Cheers,<BR>> <BR>> Richard<BR><BR></TT><BR><BR><TT>Your
use of Yahoo! Groups is subject to the <A
href="http://docs.yahoo.com/info/terms/">Yahoo! Terms of Service</A>.</TT>
<BR></BLOCKQUOTE></BODY></HTML>
------=_NextPart_001_0042_01C221A4.8FC17A50--
Attachment:
Attachment:
Description: "Description: Binary data"
|