Rank: Member
Groups: Registered, Registered Users, Subscribers Joined: 11/5/2005(UTC) Posts: 22
|
Hi forum..
I wonder if someone could help me out to modify this Stochastic Adaptive formula with out Prev function and maybe use Patrick Dll..
Prds := 40;
LenMin := 7;
LenMax := 28;
v1 := Stdev(CLOSE, Prds);
v2 := HHV(v1, Prds);
v3 := LLV(v1, Prds);
v4 := If((v2-v3)>0,(v1-v3)/(v2-v3),0);
currlen := Int(LenMin + (LenMax - Lenmin)*(1-v4)) ;
Stoch(LastValue(currlen+PREV-PREV), 3)
Thanks mike :)
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 1/19/2005(UTC) Posts: 1,065 Location: Koh Pha-Ngan, Earth
Was thanked: 2 time(s) in 2 post(s)
|
Forum Dll version:
[code:1:c1a105596a]
Prds:=40;
LenMin:=7;
LenMax:=28;
v1:=Stdev(C,Prds);
v2:=HHV(v1,Prds);
v3:=LLV(v1,Prds);
v4:=If((v2-v3)>0,(v1-v3)/(v2-v3),0);
currlen:=Int(LenMin+(LenMax-Lenmin)*(1-v4));
Hi:=ExtFml("Forum.HHV",H,currlen);
Lo:=ExtFml("Forum.LLV",L,currlen);
Sum(C-Hi,3)/Max(Sum(Hi-Lo,3),.00001)*100+100
[/code:1:c1a105596a]
ASI dll version:
[code:1:c1a105596a]
Prds:=40;
LenMin:=7;
LenMax:=28;
v1:=Stdev(C,Prds);
v2:=HHV(v1,Prds);
v3:=LLV(v1,Prds);
v4:=If((v2-v3)>0,(v1-v3)/(v2-v3),0);
currlen:=Int(LenMin+(LenMax-Lenmin)*(1-v4));
Mov(ExtFml("ASI.Stoch",currlen),3,S)
[/code:1:c1a105596a]
Slight differences between all three formulae possibly come about from rounding errors, specially from the error-prone LastValue(currlen+PREV-PREV).
jose '-)
|
|
|
|
Rank: Member
Groups: Registered, Registered Users, Subscribers Joined: 11/5/2005(UTC) Posts: 22
|
Super thanks Jose...
In the same time you solve the old problem for me, Division by zero...
Thanks =D>
Mike
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.