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

[Metastockusers] Weekly Pivot on Daily Chart



PureBytes Links

Trading Reference Links

AS I'm a really not good at using Ms language, can anyone help me : 
I want to apply on a daily Chart the lines of the weekly Pivot. I try
to modify a formula given by Roy Larsen for ploting Daily Pivot on
Intraday chart but it doesn't function. Please thank you for your
help.

ALAIN


Here is the formula I try to make : 

{Daily Pivot Points}
{C 2004 Roy Larsen, rlarsen@xxx}
{for use on intraday charts}
A:=Input("Pivot Points - Day of Week Last Bar" ,0,7,5);
B:=Input("Hour of Days Last bar",0,23,17);
Q:=Input("Display Mode, 0=Static 1=Dynamic 2=Test",0,2,2);
{0=Display, update at last bar of week}
{1=Display, update on each new bar}
{2=Backtest, update on first bar of new week}
G:=LastValue(Highest(Sum(DayOfMonth()<>ValueWhen(2
,1,DayOfMonth()),5))=5);
I:= Month()<>ValueWhen(2,1, Month());
M:=G OR I;
F:=G OR (DayOfWeek()=A AND Hour()=B);
A:=LastValue(Cum(1)-1)=Cum(1);
B:=LastValue(Cum(1))=Cum(1);
J:=If(F,1,If(Alert(F,2)=0 AND M,2,0));
J:=If(A+LastValue(J)>2 OR B+(Q=1)=2,1,J);
J:=If(G,1,If(Q=2 OR Cum(J)<=1,M*2,J));
Hw:=HighestSince(1,M,H);
Hw:=ValueWhen(1,J,If(J=1,Hw,ValueWhen(2-G,1,Hw)));
Lw:=LowestSince(1,M,L); Lw:=ValueWhen(1,J,If(J=1,L
w,ValueWhen(2-G,1,Lw)));
K:=ValueWhen(1,J,If(J=1,C,ValueWhen(2-G,1,C)));
Hw:=ValueWhen(1,Hw>0,Hw);
Lw:=ValueWhen(1,Lw>0,Lw);
K:=ValueWhen(1,K>0,K);
M:=(Hw+Lw+K)/3; {mid point}
R2:=M+(Hw-Lw);
R1:=(M*2)-Lw;
S1:=(M*2)-Hw;
S2:=M-(r1-s1);
R1; R2; S1; S2;
ValueWhen(1+G,1,M);




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Has someone you know been affected by illness or disease?
Network for Good is THE place to support health awareness efforts!
http://us.click.yahoo.com/Rcy2bD/UOnJAA/cosFAA/zMEolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/Metastockusers/

<*> To unsubscribe from this group, send an email to:
    Metastockusers-unsubscribe@xxxxxxxxxxxxxxx

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