Hi Senthil
There is a problem with your adaptation of my Weekly Pivot Point SMA to a daily version for use on intraday charts. I suspect that the problem is in the frame timing module. Never mind because here’s a version that should work properly (it does work for me on a test chart).
The commented last line of code can be enabled and used to check against the result from the nominal output (previous active line). This is done by switching your chart from Intraday to Daily and noting that one plot covers the other (both should have the same value or be so close that it doesn’t matter). As a further check I suggest that you read off the last 5 to 10 indicator values when the chart is set to Daily, then switch to Intraday and verify that the same 5 to 10 last values are observed.
Roy
MetaStock Tips & Tools
{Daily Pivot Point SMA 2008}
{This indicator uses the Equis Forum DLL}
{Roy Larsen, 2004-2008}
{User settings}
N:=Input("Daily Pivot Point SMA, Periods",1,99,3);
Q:=Input("Mode, 0=Static 1=Dynamic 2=Delayed",0,2,1);
{0, update at last bar of current frame}
{1, update on each new bar}
{2, update on first bar of new frame}
{Daily frame timing}
{* Day counter from metastock@wabbit.com.au}
M:=Month();A:=Int((14-M)/12);D:=DayOfMonth();
Y:=Year()+4800-A;B:=M+(12*A)-3;
M:=D+Int((2+153*B)/5)+(365*Y)+Int(Y/4)-Int(Y/100)+Int(Y/400)-32045;
{*}
I:=M-ValueWhen(2,1,M);
B:=I=1 AND Max(Hour(),Minute())=0;
G:=LastValue(Highest(Sum(I>0,5))=5);
I:=I AND B=0 OR ValueWhen(2,1,B); M:=G+I;
F:=G+(M=0)*ExtFml("Forum.Sum",Ref(I,1),1);
A:=LastValue(Cum(1)-1)=Cum(1);
B:=Alert(A,2)*(A=0);
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));
{Calculate daily HLC prices and pivot point}
Hd:=HighestSince(1,M,H);
Hd:=ValueWhen(1,J,If(J=1,Hd,ValueWhen(2-G,1,Hd)));
Ld:=LowestSince(1,M,L);
Ld:=ValueWhen(1,J,If(J=1,Ld,ValueWhen(2-G,1,Ld)));
K:=ValueWhen(1,J,If(J=1,C,ValueWhen(2-G,1,C)));
Hd:=ValueWhen(1,Hd>0,Hd);
Ld:=ValueWhen(1,Ld>0,Ld);
PP:=(K+Hd+Ld)/3;
{Calculate and plot SMA of daily pivot point}
J:=J>0; X:=Cum(J*PP);
(X-ValueWhen(N+1,J,X))/N;
{Daily chart pivot point SMA check}
{Mov(Typical(),N,S);}