[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Metastockusers] Re: Help with code pls?



PureBytes Links

Trading Reference Links

I, really, need to thank you all, guys.
Henry, once more you amaze me with your MS coding expertise!!! You can do
things that seem impossible to be realized in MS formula language.

THANK YOU VERY MUCH!!
P.

PS As there is a variation of the PPs, using the open price as well, I took
the liberty to add it, in Henry's formula, and I post it here, as someone
might prefer it, that way. All the credits, though, should go to Henry. I,
just, added the open, as I was feeling extremely grateful (and stupid for
trying for two weeks with NO RESULTS:-)
Here it is:
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));
WO:=ValueWhen(1,Nw,Ref(O,-1));
BP:=LastValue((WH+WL+WCL+WO)/4);
R#2:= If(A1<A2,BarsSince(A1>=A2),LastValue(((WH+WL+WCL+WO)/4) - (2*
((WH+WL+WCL+WO)/4)-WH) +(2*((WH+WL+WCL+WO)/4)-WL)));
R#1:= If(A1<A2,BarsSince(A1>=A2),LastValue(2*((WH+WL+WCL+WO)/4)-WL));
PP:=If(A1<A2,BarsSince(A1>=A2),LastValue((WH+WL+WCL+WO)/4));
S#1:= If(A1<A2,BarsSince(A1>=A2),LastValue(2*((WH+WL+WCL+WO)/4)-WH));
S#2:= If(A1<A2,BarsSince(A1>=A2),LastValue(((WH+WL+WCL+WO)/4)-(((2*
((WH+WL+WCL+WO)/4) - WL)-(2*((WH+WL+WCL+WO)/4)-WH)))));
R#2;
R#1;
PP;
S#1;
S#2;


-----Original Message-----
From: Henry Z Kaczmarczyk <henry1224@xxxxxxxxx> [mailto:henry1224@xxxxxxxxx]
Sent: Saturday, January 25, 2003 3:30 AM
To: Metastockusers@xxxxxxxxxxxxxxx
Subject: [Metastockusers] Re: Help with code pls?


This is the formula for Pivot points that only plots the last value


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#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#2;
R#1;
PP;
S#1;
S#2;

--- In Metastockusers@xxxxxxxxxxxxxxx, "Lionel Issen" <lissen@xxxx>
wrote:
> So would I.  Post it here.
>
> Lionel
>
>
>
> -----Original Message-----
> From: Petros Lazos [mailto:peter_laso@x...]
> Sent: Friday, January 24, 2003 12:57 PM
> To: Metastockusers@xxxxxxxxxxxxxxx
> Subject: [Metastockusers] Help with code pls?
>
>
> I'm trying, for some time now, to create a custom indicator that
would
> plot
> the daily Pivot Point,S1,S2S3,R1,R2,R3 on an intraday chart. Daily
PP
> etc
> are based on previous day's H L C & O.
> If any of  the members have an idea or has the code, I'd be truly
> obliged
> for the help.
> TiA
> P.
>
> PS Henry, I've tried using your code for Jackson Zones, published
in
> Stockcentral but I couldn't make it work. Any ideas?
>
>
>
> Yahoo! Groups Sponsor
>
> ADVERTISEMENT
>
>
<http://rd.yahoo.com/M=243376.2803712.4220031.1927555/D=egroupweb/S=1
705
>
001779:HM/A=1414910/R=0/*http://ad.doubleclick.net/jump/N879.ameritra
de.
> yahoo/B1054521.29;sz=300x250;adc=zhs;ord=1043434635719764?>
>
> <http://us.adserver.yahoo.com/l?
M=243376.2803712.4220031.1927555/D=egrou
> pmail/S=:HM/A=1414910/rand=181123034>
>
> To unsubscribe from this group, send an email to:
> Metastockusers-unsubscribe@xxxxxxxxxxx
>
>
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
> <http://docs.yahoo.com/info/terms/> .


To unsubscribe from this group, send an email to:
Metastockusers-unsubscribe@xxxxxxxxxxx



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/



To unsubscribe from this group, send an email to:
Metastockusers-unsubscribe@xxxxxxxxxxx

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/