Hi Dhruvesh
Try this. Note that it does not have the logic to
plot on weekly charts, just EOD and intraday. The "G" variable that I normally
use for detecting the chart periodicy has been removed as there was a problem
with intraday charts. Fixing a problem for a feature that probably
wouldn't be used anyway seems a little pointless.
{Weekly Pivot Points Dhruvesh} {©
2005 Roy Larsen, www.metastocktips.co.nz}
{for use on EOD or intraday charts} Q:=Input("Weekly Pivot Points,
0=Static 1=Dynamic 2=Test",0,2,0); {0=Display, update at
last bar of day} {1=Display, update on each new bar}
{2=Backtest, update on first bar of new
day} M:=DayOfWeek()<ValueWhen(2,1,DayOfWeek()); F:=PeakBars(1,Zig(DayOfWeek(),1,$),1)=0; A:=LastValue(Cum(1)-1)=Cum(1); B:=ValueWhen(2,1,A); 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(Q=2 OR
Cum(J)<=1,M*2,J); Hw:=HighestSince(1,M,H); Hw:=ValueWhen(1,J,If(J=1,Hw,ValueWhen(2,1,Hw))); Lw:=LowestSince(1,M,L); Lw:=ValueWhen(1,J,If(J=1,Lw,ValueWhen(2,1,Lw))); K:=ValueWhen(1,J,If(J=1,C,ValueWhen(2,1,C))); Hw:=ValueWhen(1,Hw>0,Hw);
{weekly high} Lw:=ValueWhen(1,Lw>0,Lw); {weekly
low} K:=ValueWhen(1,K>0,K); {weekly close} PP:=(Hw+Lw+K)/3; {pivot
point} R1:=PP*2-Lw; S1:=PP*2-Hw; R2:=PP+Hw-Lw; S2:=PP-R1+S1; PP; R1;
R2; S1; S2;
Kind regards
----- Original Message -----
Sent: Saturday, July 30, 2005 11:18 PM
Subject: [EquisMetaStock Group] WEEKLY CLOSE ON INTRADAY
CHARTS
HELLO ROY,
I AM USING METASTOCK 9, I HAVE BEEN USING
DAILY CLOSE ON INTRADAY CHARTS
I AM INTERESTED IN PLOTTING WEEKLY CLOSE
ON MY INTRADAY CHARTS, PLEASE HELP IN FRAMING WEEKLY CLOSE ON INTRADAY
CHARTS.
THANKS IN
ADVANCE
DHRUVESH
YAHOO! GROUPS LINKS
|