Stock Portfolio Organizer

The ultimate porfolio management solution.

Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
For Portfolio Manager Click Here

WiseTrader Toolbox

#1 Selling Amibroker Plugin featuring:

Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Find Out More Here

Bar Stats by Jose Silva for Metastock
kaiji
almost 15 years ago
Metastock

Rating:
5 / 5 (Votes 1)
Tags:

Displays chart data bar statistics, with multiple output choice.

Screenshots

Indicator / Formula

Copy & Paste Friendly
 { Data bar statistics v1.0 }
{ Display in own window, then Zoom & Reset }
{ Irregular yearly data bar count indicates
missing data and/or illiquid chart }
{ (c) Copyright 2005 Jose Silva
For personal use only
http://www.metastocktools.com }

{ User inputs }
display:=Input("Count: [1]Year's bars, [2]Years, [3]Bars",1,3,1);
type:=Input("Stats: [1]Individual years', [2]Avg/Total",1,2,1);

{ First year of loaded chart data }
year1:=ValueWhen(1,Cum(1)=1,Year());
year1flag:=Year()=year1;

{ Yearly bar stats }
yStart:=Year()<>Ref(Year(),-1);
yearStart:=yStart OR Cum(IsDefined(yStart))=1;
yearCount:=Cum(yearStart)-1;
yearBars:=BarsSince(yearStart)+1+year1flag;
YearStats:=If(display=1,yearBars,
If(display=2,yearCount,Cum(1)));

{ Total/Avg bar stats }
barCount:=LastValue(Cum(1));
yearCount:=LastValue(Year())-year1;
yearlyAvgBars:=Int(barCount/yearCount+.5);
TotalStats:=If(display=1,yearlyAvgBars,
If(display=2,yearCount,barCount));

{ Plot in own window below price chart }
If(type=1,YearStats,TotalStats)

0 comments

Leave Comment

Please login here to leave a comment.

Back