PureBytes Links
Trading Reference Links
|
Hi Vassilis,
Here is the code I have to emulate Alan
Hull’s Range Indicator which is based on ATR Bands wrapped-around a
Linear Regression “Central Cord”. The Linear Regression helps to
remove lag from the central cord and is possibly therefore more ‘in tune’
with the pricing action. The Lower Deviation is used both as a trigger to go Long
and as an initial stop and trailing stop. The other entry rule is that price
must be above the upper RoaR Level and the other sell rule is if the RoaR drops
below the Lower (20) Level. I attach a gif of a simple template to help
visualize the System. You need to reverse the code and create a separate Range
indicator for Short trading since the ATR’s and code construction of the
two Deviations are different. I believe Alan also has a further trending rule
that the 13 week SMA is above the 21 week SMA for valid entry – thus the Expert
Ribbon on the attached gif chart.
Here is the Range indicator code as best I
can discern. I don’t use MetaStock much these days so I can’t
really comment much further (and I am not much of a programmer) but hope this
is of help to you.
CCPer:=Input("Lookback
Periods",2,55,13);
UBFactor:=Input("ATR's for Upper Band
(No Need to Change for Longs)",0.5,4,3);
LBFactor:=Input("ATR's for Lower
Band(Value critical for Longs)",0.5,4,2.5);
CC:= LinearReg(C,CCPer,W,6);
{Central Cord}
UBR:= CC + (ATR(CCPer) * UBFactor);
{Upper Deviation}
LBR:= If(CC > PREV, If(CC - (ATR(CCPer)
* LBFactor) > PREV, CC - (ATR(CCPer) *LBFactor),PREV),CC);
{Lower
Deviation}
CC;
UBR;
LBR;
<span
>Regards,
<span
>
Gordon Sutherland
<span
>-----Original Message-----
From: Vassilis
[mailto:vas_greece@xxxxxxxxx]
Sent: Saturday, 28 August 2004
9:40 p.m.
To: equismetastock@xxxxxxxxxxxxxxx
Subject: Re: [EquisMetaStock
Group] Rate of annual Return (ROAR)
<font size=3
face="Times New Roman">
<font size=2
face="Courier New">Hello Gordon,<font
size=2 face="Courier New">
Thank you for your help.
I kept reading the course and there is also
another indicator
proposed by Alan (the Range Indicator). Could I
have the settings for
this one too?
Regards
Vassilis
Yahoo! Groups Sponsor
ADVERTISEMENT
Yahoo! Groups Links
To visit your group on the web, go to:http://groups.yahoo.com/group/equismetastock/
To unsubscribe from this group, send an email to:equismetastock-unsubscribe@xxxxxxxxxxxxxxx
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Attachment:
AH Range System.gif
Attachment:
Description: "Description: GIF image"
|