Vanez:
S2 =P*(R2-S1)
Perhaps this pivot should be something like S2= (P-R1)+S1 instead.
Vanez:
Love always,
Vanez
Unfortunately Love doesn't pay the bills. :?
But since we've been asked to be nice to Newbies...
MetaStock -> Tools -> Indicator Builder -> New ->
Copy and paste indicator formula.
Code:
{ Monthly pivots v2.0 }
{ ©Copyright 2002~2005 Jose Silva
For personal use only.
http://www.metastocktools.com }
{ Message }
message:=Input("plot on Weekly/Daily/Intraday charts",0,0,0);
{ Month's start }
mthStart:=Month()<>Ref(Month(),-1);
{ Previous Month's High }
Hi:=HighestSince(1,mthStart,H);
mHi:=ValueWhen(1,mthStart,Ref(Hi,-1));
mHi:=ValueWhen(1,mHi>0,mHi);
{ Previous Month's Low }
Lo:=LowestSince(1,mthStart,L);
mLo:=ValueWhen(1,mthStart,Ref(Lo,-1));
mLo:=ValueWhen(1,mLo>0,mLo);
{ Previous Month's Close }
mCl:=ValueWhen(1,mthStart,Ref(C,-1));
mCl:=ValueWhen(1,mCl>0,mCl);
{ Pivot }
pivot:=(mHi+mLo+mCl)/3;
{ Support & Resistance }
R1:=2*pivot-mLo;
S1:=2*pivot-mHi;
R2:=(pivot-S1)+R1;
S2:=(pivot-R1)+S1;
R3:=2*pivot+(mHi-2*mLo);
S3:=2*pivot-(2*mHi-mLo);
{ Plot pivots on chart }
R3;R2;R1;
pivot;
S1;S2;S3
jose '-)
MetaStockTools.com
.
MetaStockTools.com