Registered User Joined: 5/7/2011 Posts: 13
|
Hello,
Can you please help me with the realcode for calculating the price% from a specific date until close of today? For example, I want a watchlist column showing the %price increase from low of 11/16/2012 to high of today.
Thanks
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Please try the the following RealCode Indicator:
'|******************************************************************
'|*** StockFinder RealCode Indicator - Version 5.0 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Indicator:Price Percent Change from Date
'|******************************************************************
'# Cumulative
'# Basis = UserInput.Date = "11/16/2012"
Static Ref As Single
If isFirstBar Then
Ref = IndexForDate(Basis)
End If
Plot = 100 * (Price.High / Price.Bar.LowValue(Ref) - 1)
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
Registered User Joined: 5/7/2011 Posts: 13
|
Thanks Bruce
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|