Registered User Joined: 4/10/2007 Posts: 38
|
PPG - Price Percent Gain between dates
XRAY vision into actual price movement using this realcode indicator to rank order
performance. Ignorance isn't bliss.
(1) Use the Green "+" symbol in the chart window to "create a new realcode indicator"
and name it "PPG"
(2) Copy and paste in the code below. Delete the other header text.
Click Apply, Save, and OK.
(2) Use the indicator to create one or more watchlist columns of "values."
You do this by dragging the indicator over to your column area, use "values"
then you can delete the part below the chart box.
Your column will display PPG as a positive or negative gain/loss to 2 decimal places.
It doesn't plot, so it is useless in the chart area. And it won't work without the "Plot=Change" realcode line, so don't try removing that. I already did.
(3) Use column to click-rank-order & measure the actual relative price movement of stocks, ETF's, or mutual funds you are interested in, or have available to you in your plans, between desired SPY pivot points or other calendar points of interest.
The net SF5 result is very similiar to using the "C" function ... Custom Date Sort... in Telechart
and then creating a "sort value" column to rank selected securities.
To the advanced user-analyst this is all child's play, but to the new market participant
it may be salvation.
http://www.worden.com/legacy/TeleChartHelp/Content/Sorting/Custom_Date_Sort.htm
Many active manager pro's work the relative performance of their stock, mutual fund or ETF
portfolios against a market index benchmark like the SP500.
We will use the granddaddy ETF ... SPY as a "proxy" for that.
(1) Select fund style or family if you have SF5 with Mutual Funds... which I recommend.
(2) Click your PPG column once or twice to rank the funds or stocks in descending order of performance.
Now type in SPY or other desired index ETF in the chart window to place that benchmark at
the top of the watchlist screen.
Walla: You are seeing the best in breed item-in-watchlist percent gain performance with the SPY
or other appropriate benchmark ... over same time period. This does not take into account Sharpe ratio's
and other portfolio risk metrics, just raw percent gain performance.
Mutual Fund Managers ? They can run, but they cannot hide, from realtime numerical analysis.
Think Fantasy Football.
Example:
GE 12/03/2010 ........$16.78
GE 12/31/2009 ....... $15.13
16.78 / 15.13 = 1.1091
PPG = 10.91%
PPG realcode indicator
column's output = 10.91
Credit for the coding goes to Bruce Loebrich & the wonderful support team at Worden.
I had to tweak a parenthese or two to get it to output the number I wanted, but the
real code authorship is theirs, upon a previous request I submitted to them.
Semper Fidelis.
Monte
'|******************************************************************
'|*** StockFinder RealCode Indicator
'|*** Indicator: PPG - Price Percent Gain between Dates
'|******************************************************************
'# Cumulative
'# StartDate = UserInput.Date = "12/31/2009"
'# EndDate = UserInput.Date = "12/03/2010"
Static Ref(1) As Integer
Static Change As Single
If isFirstBar Then
Ref(0) = Math.Min(IndexForDate(StartDate), IndexForDate(EndDate))
Ref(1) = Math.Max(IndexForDate(StartDate), IndexForDate(EndDate))
Change = (Price.Bar.Value(Ref(1)) / Price.Bar.Value(Ref(0)) - 1)*100
End If
Plot = Change
|