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

Re: [SPAM] [EquisMetaStock Group] Weekly pivots on daily charts



PureBytes Links

Trading Reference Links

JD

> Hi, all. I want to plot weekly pivot points on daily charts [a pivot high is
> a high surrounded by lower highs on either side and a pivot low is a low
> surrounded by higher lows on either side]. I want to start by plotting 3week
> high/low pivots on daily charts [a 3wk high pivot would be when a stock
> makes a 3week high and the previous as well as next week's highs are lower;
> opposite for a 3week low pivot]. Can anyone help? Thanks in advance.
>
> JD

These formulas would be a good starting place. You can't identify the peaks and troughs as they
happen but you can locate them after the fact and read off the high or low values.  Change anything
after the third 'J' variable to fit your needs. Notice that I'm not saying this already does what
you want, just that the structure is there for you to work with to create what you want.

Roy

  {Weekly Fractal Up}
  {2004 Roy Larsen, rlarsen@xxxxxxxxxxxxxx}
  {for use on daily charts with Jose Silva's "Calendar Week counter"}
F:=Input("End of Week,  5=Friday  6=Saturday  7=Sunday",5,7,5);
Q:=Input("Display Mode,  0=Static  1=Dynamic  2=Test",0,2,0);
  {0=Display, update on Friday when possible}
  {1=Display, update on each new bar}
  {2=Backtest, update on first bar of new week}
G:=LastValue(Highest(Sum(DayOfWeek()=F,5))=5);
I:=Fml("Calendar Week counter");
I:=Abs(I-ValueWhen(2-G,1,I)); M:=G OR I>0;
F:=G OR (DayOfWeek()=F AND I=0);
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));
H0:=HighestSince(1,M,H);
H0:=ValueWhen(1,J,If(J=1,H0,ValueWhen(2-G,1,H0)));
H1:=ValueWhen(2,J,H0);
H2:=ValueWhen(3,J,H0);
H3:=ValueWhen(4,J,H0);
H4:=ValueWhen(5,J,H0);
Single:=H2>H4 AND H2>H3 AND H2>H1;
ValueWhen(1,Single,H2);


  {Weekly Fractal Down}
  {2004 Roy Larsen, rlarsen@xxxxxxxxxxxxxx}
  {for use on daily charts with Jose Silva's "Calendar Week counter"}
F:=Input("End of Week,  5=Friday  6=Saturday  7=Sunday",5,7,5);
Q:=Input("Display Mode,  0=Static  1=Dynamic  2=Test",0,2,2);
  {0=Display, update on Friday when possible}
  {1=Display, update on each new bar}
  {2=Backtest, update on first bar of new week}
G:=LastValue(Highest(Sum(DayOfWeek()=F,5))=5);
I:=Fml("Calendar Week counter");
I:=Abs(I-ValueWhen(2-G,1,I)); M:=G OR I>0;
F:=G OR (DayOfWeek()=F AND I=0);
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));
L0:=LowestSince(1,M,L);
L0:=ValueWhen(1,J,If(J=1,L0,ValueWhen(2-G,1,L0)));
L1:=ValueWhen(2,J,L0);
L2:=ValueWhen(3,J,L0);
L3:=ValueWhen(4,J,L0);
L4:=ValueWhen(5,J,L0);
Single:=L2<L4 AND L2<L3 AND L2<L1;
ValueWhen(1,Single,L2);




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/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/