PureBytes Links
Trading Reference Links
|
FINAL FIXED VERSION
With the help of Jose fixed the zero error. You have two ways of
looking at the LIM line. the original or the midpoint of the hurst.
Thanks. Jose. Here is the fixed version with no zero erros.
K. Shin
==========================================
{Hurst Formula (V2.1)}
prd1:=Input("Periods",60,9999,60);
Bars:=LastValue(Min(prd1,LastValue(Cum(1))));
FR1:=Log(Sum(Abs(C-Ref(C,-1)),Bars));
FR2:=Log(Sum(If((Cum(1)/2-Int(Cum(1)/2))=0,Abs(C-Ref(C,-
2)),0),Bars));
FR3:=Log(Sum(If((Cum(1)/3-Int(Cum(1)/3))=0,Abs(C-Ref(C,-
3)),0),Bars));
FR4:=Log(Sum(If((Cum(1)/4-Int(Cum(1)/4))=0,Abs(C-Ref(C,-
4)),0),Bars));
FR5:=Log(Sum(If((Cum(1)/5-Int(Cum(1)/5))=0,Abs(C-Ref(C,-
5)),0),Bars));
FR6:=Log(Sum(If((Cum(1)/6-Int(Cum(1)/6))=0,Abs(C-Ref(C,-
6)),0),Bars));
FR10:=Log(Sum(If((Cum(1)/10-Int(Cum(1)/10))=0,Abs(C-Ref(C,-
10)),0),Bars));
FR20:=Log(Sum(If((Cum(1)/20-Int(Cum(1)/20))=0,Abs(C-Ref(C,-
20)),0),Bars));
FR30:=Log(Sum(If((Cum(1)/30-Int(Cum(1)/30))=0,Abs(C-Ref(C,-
30)),0),Bars));
FR40:=Log(Sum(If((Cum(1)/40-Int(Cum(1)/40))=0,Abs(C-Ref(C,-
40)),0),Bars));
FR50:=Log(Sum(If((Cum(1)/50-Int(Cum(1)/50))=0,Abs(C-Ref(C,-
50)),0),Bars));
FR60:=Log(Sum(If((Cum(1)/60-Int(Cum(1)/60))=0,Abs(C-Ref(C,-
60)),0),Bars));
SOMXY:=FR2*Log(2)+FR3*Log(3)+FR4*Log(4)+FR5*Log(5)+FR6*Log(6)
+FR10*Log(10)+FR20*Log(20)+FR30*Log(30) +FR40*Log(40)+FR50*Log(50)
+FR60*Log(60);
SOMX:=Log(2)+Log(3)+Log(4)+Log(5)+Log(6)+Log(10)+Log(20)+Log(30)+Log
(40)+Log(50)+Log(60);
SOMY:=FR1+FR2+FR3+FR4+FR5+FR6+FR10+FR20+FR30+FR40+FR50+FR60;
SOMX2:=(Power(Log(2),2))+(Power(Log(3),2))+(Power(Log(4),2))+(Power
(Log(5),2))+(Power(Log(6),2))+(Power(Log(10),2))+(Power(Log(20),2))+
(Power(Log(30),2))+(Power(Log(40),2))+(Power(Log(50),2))+(Power(Log
(60),2));
HURST:=1+((12*SOMXY-SOMX*SOMY)/Max(12*SOMX2-Power(SOMX,2),.00001));
LIM:=LastValue(Cum(HURST)/Max(Cum(1)-Bars-60,.00001));
{HURST1:=1+((12*SOMXY-SOMX*SOMY)/(12*SOMX2-Power(SOMX,2)));}
{LIM1:=LastValue(Cum(HURST)/(Cum(1)-Bars-60));}
{LIM2:=Mid(HURST,Bars) ;}
HURST;
LIM;
.5;
{END}
=================================================
K. SHIN
--- In equismetastock@xxxxxxxxxxxxxxx, "Ron Berlin" <rsb_44@xxxx>
wrote:
> Try removing the one of the 2 . before the 5 it should be .5
not ..5
> Whatthat bit of code does is create a horizontal line at .5
Recall that .5
> is a meaningfdul number for the Hurst indicator.
>
>
>
> <br><br><br>>From: "John Corrion"
> corrion@xxxx<br>>Reply-To:
> equismetastock@xxxxxxxxxxxxxxx<br>>To:
> equismetastock@xxxxxxxxxxxxxxx<br>>Subject: Re: [EquisMetaStock
> Group] Hurst Constant<br>>Date: Thu, 14 Jul 2005 22:07:01 -0400
(Eastern
> Standard Time)<br>><br>>MS 7.2 does not like this at the
end,
> specifically the ..5; what do I need<br>>to do or what does
this part of
> the formula
> do?
<br>><br>>Thanks,<br>><br>>John<br>><br>>LIM;<br>&g
t;..5;<br>>{End}<br>><br>><br>>-------Original
> Message-------<br>><br>>From:
> equismetastock@xxxxxxxxxxxxxxx<br>>Date: 07/14/05
21:40:44<br>>To:
> equismetastock@xxxxxxxxxxxxxxx<br>>Subject: Re: [EquisMetaStock
Group]
> Hurst Constant<br>><br>>Try this updated
>
formula.<br>>KS<br>>============================<br>><br>>
;{Hurst
> Constant}<br>><br>>prd1:=Input
("Periods",60,9999,60);<br>>Bars:=LastValue(Min
(prd1,LastValue(Cum(1))));<br>>FR1:=Log(Sum(Abs(C-Ref(C,-
1)),Bars));<br>>FR2:=Log(Sum(If((Cum(1)/2-Int(Cum(1)/2))=0,Abs(C-
Ref(C,-<br>>2)),0),Bars));<br>>FR3:=Log(Sum(If((Cum(1)/3-Int
(Cum(1)/3))=0,Abs(C-Ref(C,-<br>>3)),0),Bars));<br>>FR4:=Log(Sum
(If((Cum(1)/4-Int(Cum(1)/4))=0,Abs(C-Ref(C,-
<br>>4)),0),Bars));<br>>FR5:=Log(Sum(If((Cum(1)/5-Int(Cum
(1)/5))=0,Abs(C-Ref(C,-<br>>5)),0),Bars));<br>>FR6:=Log(Sum(If
((Cum(1)/6-Int(Cum(1)/6))=0,Abs(C-Ref(C,-
<br>>6)),0),Bars));<br>>FR10:=Log(Sum(If((Cum(1)/10-Int(Cum
(1)/10))=0,Abs(C-Ref(C,-<br>>10)),0),Bars));<br>>FR20:=Log(Sum
(If((Cum(1)/20-Int(Cum(1)/20))=0,Abs(C-Ref(C,-
<br>>20)),0),Bars));<br>>FR30:=Log(Sum(If((Cum(1)/30-Int(Cum
(1)/30))=0,Abs(C-Ref(C,-<br>>30)),0),Bars));<br>>FR40:=Log(Sum
(If((Cum(1)/
> 40-Int(Cum(1)/40))=0,Abs(C-Ref(C,-
<br>>40)),0),Bars));<br>>FR50:=Log(Sum(If((Cum(1)/50-Int(Cum
(1)/50))=0,Abs(C-Ref(C,-<br>>50)),0),Bars));<br>>FR60:=Log(Sum
(If((Cum(1)/60-Int(Cum(1)/60))=0,Abs(C-Ref(C,-
<br>>60)),0),Bars));<br>>SOMXY:=FR2*Log(2)+FR3*Log(3)+FR4*Log
(4)+FR5*Log(5)+FR6*Log(6)<br>>+FR10*Log(10)+FR20*Log(20)+FR30*Log
(30)
> +FR40*Log(40)+FR50*Log(50)<br>>+FR60*Log(60);<br>>SOMX:=Log
(2)+Log(3)+Log(4)+Log(5)+Log(6)+Log(10)+Log(20)+Log(30)+Log<br>>
(40)+Log(50)+Log
(60);<br>>SOMY:=FR1+FR2+FR3+FR4+FR5+FR6+FR10+FR20+FR30+FR40+FR50+F
R60;<br>>SOMX2:=(Power(Log(2),2))+(Power(Log(3),2))+(Power(Log
(4),2))+(Power<br>>(Log(5),2))+(Power(Log(6),2))+(Power(Log
(10),2))+(Power(Log(20),2))+<br>>(Power(Log(30),2))+(Power(Log
(40),2))+(Power(Log(50),2))+(Power(Log<br>>
(60),2));<br>>HURST:=1+((12*SOMXY-SOMX*SOMY)/(12*SOMX2-Power
(SOMX,2)));<br>>LIM:=LastValue(Cum(HURST)/(Cum(1)-Bars-
60));<br>>HURST;<br>>LIM;<br>>..5;<br>>{End}
<br>><br>>====================<br>>KS<br>><br>><br>>
;<br>><br>>---
> In equismetastock@xxxxxxxxxxxxxxx, PGREC@xxxx wrote:<br>>
><br>>
> > In a message dated 7/14/2005 12:19:19 P.M. Eastern Standard
> Time,<br>> > formulaprimer@xxxx writes:<br>> ><br>>
> Try
> this updated formula.<br>> > KS<br>> ><br>>
><br>>
> ><br>> > Hi,<br>> ><br>> > When applying the
formula I
> always get a division by zero error,<br>>but the<br>> >
indicator
> does plot.<br>> ><br>> >
>
Peter<br>><br>><br>><br>><br>><br>><br>><br>>
YAHOO!
> GROUPS LINKS<br>><br>> Visit your group
"equismetastock" on
> the web.<br>><br>> To unsubscribe from this group, send an
email
> to:<br>> equismetastock-
unsubscribe@xxxxxxxxxxxxxxx<br>><br>>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service.<br>><br>><br>><br>><br>><br>><br>
------------------------ Yahoo! Groups Sponsor --------------------~-->
Try Online Currency Trading with GFT. Free 50K Demo. Trade
24 Hours. Commission-Free.
http://us.click.yahoo.com/DldnlA/9M2KAA/U1CZAA/BefplB/TM
--------------------------------------------------------------------~->
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:
http://docs.yahoo.com/info/terms/
|