if anybody still interested, i thik i solved my
problem.
i noticed that the gap between r3 and r2 is the
same as r1 and pp (and vice versa for supports)
so i simply added that gap to r2 to find
r3..
heres the code:
TF:=Input("1=hour 2=day 3=week 4=month 5=year
",1,5,2); NW:=If(TF=1,ROC(Minute(),1,$)<0,If(TF=2,ROC(Hour(),1,$)<0,
If(TF=3,ROC(DayOfWeek(),1,$)<0,If(TF=4,ROC(DayOfMonth(),1,$)<0,ROC(Month(),1,$)<0)))); A1:=Cum(1); A2:=LastValue(A1-BarsSince(NW>0)); WH:=ValueWhen(1,Nw,Ref(HighestSince(1,Nw,H),-1)); WL:=ValueWhen(1,Nw,Ref(LowestSince(1,Nw,L),-1)); WCL:=ValueWhen(1,Nw,Ref(C,-1)); BP:=LastValue((WH+WL+WCL)/3); R#2:=
If(A1<A2,BarsSince(A1>=A2),LastValue(((WH+WL+WCL)/3) -
(2*((WH+WL+WCL)/3)-WH) +(2*((WH+WL+WCL)/3)-WL))); R#1:=
If(A1<A2,BarsSince(A1>=A2),LastValue(2*((WH+WL+WCL)/3)-WL));
PP:=If(A1<A2,BarsSince(A1>=A2),LastValue((WH+WL+WCL)/3)); S#1:=
If(A1<A2,BarsSince(A1>=A2),LastValue(2*((WH+WL+WCL)/3)-WH)); S#2:=
If(A1<A2,BarsSince(A1>=A2),LastValue(((WH+WL+WCL)/3)-(((2*((WH+WL+WCL)/3)
- WL)-(2*((WH+WL+WCL)/3)-WH))))); R#3:=R#2+(R#1-PP); S#3:= S#2-(PP-S#1)
; R#3; R#2; R#1; PP; S#1; S#2; S#3 ;
kurekci
----- Original Message -----
Sent: Monday, January 17, 2005 8:36
AM
Subject: [EquisMetaStock Group] pivot
points
hi,
i have this code for pivots -in black-. i tried
to add third pivot by following the same procedure -the lines in red are my
trial- but it didnt work.
anyone with idea is welcome...
TF:=Input("1=hour 2=day 3=week 4=month 5=year ",1,5,4);
NW:=If(TF=1,ROC(Minute(),1,$)<0,If(TF=2,ROC(Hour(),1,$)<0,
If(TF=3,ROC(DayOfWeek(),1,$)<0,If(TF=4,ROC(DayOfMonth(),1,$)<0,ROC(Month(),1,$)<0))));
A1:=Cum(1);
A2:=LastValue(A1-BarsSince(NW>0));
WH:=ValueWhen(1,Nw,Ref(HighestSince(1,Nw,H),-1));
WL:=ValueWhen(1,Nw,Ref(LowestSince(1,Nw,L),-1));
WCL:=ValueWhen(1,Nw,Ref(C,-1));
BP:=LastValue((WH+WL+WCL)/3);
R#3:= If(A1<A2,BarsSince(A1>=A2),LastValue
(WH+(2*((WH+WL+WCL)/3) – WL)));
R#2:= If(A1<A2,BarsSince(A1>=A2),LastValue(((WH+WL+WCL)/3) -
(2*((WH+WL+WCL)/3)-WH) +(2*((WH+WL+WCL)/3)-WL)));
R#1:=
If(A1<A2,BarsSince(A1>=A2),LastValue(2*((WH+WL+WCL)/3)-WL));
PP:=If(A1<A2,BarsSince(A1>=A2),LastValue((WH+WL+WCL)/3));
S#1:=
If(A1<A2,BarsSince(A1>=A2),LastValue(2*((WH+WL+WCL)/3)-WH));
S#2:=
If(A1<A2,BarsSince(A1>=A2),LastValue(((WH+WL+WCL)/3)-(((2*((WH+WL+WCL)/3)
- WL)-(2*((WH+WL+WCL)/3)-WH)))));
S#3:=
If(A1<A2,BarsSince(A1>=A2),LastValue(WL-(2*(WH-(WH+WL+WCL)/3)));
R#3;
R#2;
R#1;
PP;
S#1;
S#2; S#3;
No virus found in this incoming message. Checked by AVG
Anti-Virus. Version: 7.0.300 / Virus Database: 265.6.13 - Release Date:
1/16/2005
Yahoo! Groups Links
|