MetaStock™ Zone Forum & FAQ Artykuły Linki Elliott Waves EasyLanguage™ Zone

A B C D E F G H I J K L M N O P R S T U V W Y Z #

Pivots - Monthly by Jose Silva

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
From: belice2003 <no_reply [at] yahoogroups [dot] com>
To: equismetastock [at] yahoogroups [dot] com <equismetastock [at] yahoogroups [dot] com>
Date: Monday, June 5, 2006, 5:42:24 AM
Subject: [EquisMetaStock Group] Pivot Point formula help
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

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.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
From: Jose Silva <josesilva22 [at] yahoo [dot] com>
To: equismetastock [at] yahoogroups [dot] com <equismetastock [at] yahoogroups [dot] com>
Date: Monday, June 5, 2006, 8:10:34 AM
Subject: [EquisMetaStock Group] Re: Pivot Point formula help
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Firstly, note that there is no need to nest a ZigZag() function inside the PeakBars() function for the (pioneered by MetaStockTools [dot] 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

{ 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



 

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

Source / From: TOP
equismetastock [at] yahoogroups [dot] com  

Equis and MetaStock® and MetaStock Professional® are registered trademarks of Equis International. Achelis Binary Wave®, The DownLoader®,
Expert Advisor®, OptionScope®, Quotecenter® and Smart Charts® are trademarks of Equis International, a Thomson Reuters company.

TradeStation® Pro, TradeStation® 2000i, OptionStation®, SuperCharts®, PowerEditor® and EasyLanguage®
are registered trademarks of TradeStation Technologies, Inc. Other names and marks referred to are the property of their respective owners.

All information provided on this website is for educational purposes only. Trading involves risk, including possible loss of principal and other losses.

Ten i inne materiały na tej stronie zostały zamieszczone zostały jedynie w celach edukacyjnych, nie ponoszę żadnej odpowiedzialno¶ci za ich stosowanie.

Gra na giełdzie i rynkach walutowych (FOREX) niesie ze sob± ryzyko poważnych strat finansowych!