Registered User Joined: 4/10/2007 Posts: 38
|
Price Percent Gain from a User Specified Date
Calculates price percent gain from
a specified calendar date.
(1) Use "+" to create a new real code indicator
(2) Copy & Paste in the text below
(3) Click Apply, Save, OK
(4) I named it PPG-FD Price Percent Gain - From Date
(5) Drag chart indicator over as a column, or columns
then "unlink" it
(6) Consider deleting the plot, or just enjoy seeing it rise
from your accurate tactical entry.
The columns will remain intact, and the date editing feature (to adjust the
date from which you are measuring) will appear inside the column edit
as soon as you "unlink" it.
'|******************************************************************
'|*** StockFinder RealCode Indicator - Version 5.0
'|*** Copy and paste this header and code into StockFinder
'|*** Indicator:PPG-FD Price Percent Gain From Date
'|******************************************************************
'# BasisDate = UserInput.Date = "12/31/2009"
Static BasisPrice As Single
If isFirstBar Then
BasisPrice = Single.NaN
End If
If Price.DateValue = EndOfDay(BasisDate) Then
BasisPrice = Price.Last
End If
Plot = 100 * (Price.Last / BasisPrice - 1)
|