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

[EquisMetaStock Group] Re: Pivot Point formula help



PureBytes Links

Trading Reference Links

Firstly, note that there is no need to nest a ZigZag() function inside 
the PeakBars() function for the (pioneered by MetaStockTools.com) end-
of-month trick:

monthEnd:=PeakBars(1,DayOfMonth(),1)=0
 OR Cum(1)=LastValue(Cum(1));


Next, your original monthly formula plots incorrect pivot levels on 
the last day of month - it plots next month's pivots in hindsight.

This indicator will plot the correct monthly pivot levels:

================
Pivots - Monthly
================
---8<---------------------------------------

{ Message allows color selection b4 plotting }
message:=Input("Plot on daily charts",0,0,0);

{ Month' start }
m:=Month()<>Ref(Month(),-1);

{ Month's OHLC }
Om:=ValueWhen(2,m,O);
Hm:=ValueWhen(1,m,HighestSince(2,m,H));
Hm:=ValueWhen(1,Hm>0,Hm);
Lm:=ValueWhen(1,m,LowestSince(2,m,L));
Lm:=ValueWhen(1,Lm>0,Lm);
Cm:=ValueWhen(1,m,Ref(C,-1));

{ Pivot levels }
p1:=(Hm+Lm+Cm)/3+Hm-Lm;
p2:=(Hm+Lm+Cm)/3*2-Lm;
p3:=(Hm+Lm+Cm)/3*2-Hm;
p4:=(Hm+Lm+Cm)/3-Hm+Lm;

{ Plot on daily chart }
p1;p2;p3;p4

---8<---------------------------------------


If I understand your question correctly, the above indicator does away 
with the need for referencing the original (erroneous) pivots and 
plotting two indicators.


jose '-)
http://www.metastocktools.com




--- In equismetastock@xxxxxxxxxxxxxxx, belice2003 <no_reply@xxx> 
wrote:
>
> Hi all,
> 
> Please find below the formula for the monthly pivot point plotted on
> daily charts. 
> 
> F:=PeakBars(1,Zig(DayOfMonth(),1,$),1)=0 OR
> Cum(1)=LastValue(Cum(1));
> M:=ValueWhen(2,1,F);
> Hm:=ValueWhen(1,F,HighestSince(1,M,H));
> Lm:=ValueWhen(1,F,LowestSince(1,M,L));
> Cm:=ValueWhen(1,F,C);
> Om:=ValueWhen(1,F,ValueWhen(1,M,O));
> Om:=ValueWhen(1,Om>0,Om);
> Hm:=ValueWhen(1,Hm>0,Hm);
> Lm:=ValueWhen(1,Lm>0,Lm);
> 
> x:=Hm;
> y:=Lm;
> 
> (x+y+Cm)/3+x-y;
> (x+y+Cm)/3*2-y;
> 
> (x+y+Cm)/3*2-x;
> (x+y+Cm)/3-x+y;
> 
> This would then be plotted over the security's prices as an
> indicator, but invisible. I would then plot another indicator over
> the pivot points.  This indicator will do the following and that is
> where I'll need your assistance.  
> 
> It would take the pivot point values from the last trading day of
> the month and plots them on the following month's trading days.
> 
> For example, if the pivot points(remember it's invisible) on a
> particular stock for 31/05/2006(last trading day for May) are 45.00,
> 42.00, 33.00, and 29.00, these same values will be plotted daily for
> the entire June 2006's trading days; thus, forming four horizontal
> parallel lines. And then the four pivot point values(invisible) for
> June 30, 2006(last trading day for the month) will be plotted for
> the entire July 2006's trading days. The cycle will continue for all
> subsequent months. 
> I hope it's not too confusing and thanks in advance for any
> assistance.









------------------------ Yahoo! Groups Sponsor --------------------~--> 
You can search right from your browser? It's easy and it's free.  See how.
http://us.click.yahoo.com/_7bhrC/NGxNAA/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/