Registered User Joined: 12/9/2010 Posts: 3
|
Is it possible to have a the value of an indicator based on a specific symbol?
For example, I want to set up a different MA for each symbol in a watch list
and have that information saved permanently.
Thanks
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
It is possible. For example, the following RealCode Indicator would Plot a 5-Period Simple Moving Average for IBM, a 10-Period Simple Moving Average for AA and would not Plot anything for any other symbols:
'|******************************************************************
'|*** StockFinder RealCode Indicator - Version 5.0 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Indicator:Symbol Demo
'|******************************************************************
If CurrentSymbol = "IBM" Then
Plot = Price.AVGC(5)
Else If CurrentSymbol = "AA" Then
Plot = Price.AVGC(10)
Else
Plot = Single.NaN
End If
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
Registered User Joined: 12/9/2010 Posts: 3
|
Thankyou
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|