Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 4/25/2012 Posts: 15
|
I am TC2000 Gold member. I do NOT need intraday indicators. In order to use RealCode Indicators, is it enough to upgrade to tc2000 Platinum or do I need to subscribe to StockFinder Platinum in addition to TC2000?
|
|
Administration
Joined: 9/30/2004 Posts: 9,187
|
RealCode is only available in StockFinder. TC2000 has a personal criteria formula language for creating custom indicators but it is somewhat limited (no loops, variables, etc.) What, exactly, are you trying to accomplish? I might be able to suggest an alternative.
|
|
Registered User Joined: 4/25/2012 Posts: 15
|
Thanks for your response. I posted this before (below). If you could suggest an alternative that would not involve StockFinder it would be fantastic.
"I would like to implement the following indicator formula on my tc2000 platform:
Momentum of Comparative Strength (MoCS)
MoCScombines relative strength (RS) and the MACD indicator.
MoCS replaces the closing prices used in the traditional MACD formula with a RS calculation.
The formula for MoCS is:
MoCS = (12-period EMA of (Stock/S&P 500)) - (26-period EMA (Stock/S&P 500))
Where:
-- EMA represents an exponential moving average
-- Stock represents the closing price of the stock or ETF being studied
-- S&P 500 represents the closing price of the S&P 500 index"
The folowing RealCode implementation was suggested:
Please try the following RealCode Indicator:
'|******************************************************************
'|*** StockFinder RealCode Indicator - Version 5.0 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Indicator:Momentum of Comparative Strength
'|******************************************************************
'# Cumulative
'# ShortPeriod = UserInput.Single = 12
'# LongPeriod = UserInput.Single = 26
Static Comparison As PriceScripting
Static EMA(1) As Double
Static termRatio(1) As Double
Static sumWeight(1) As Double
If isFirstBar Then
Comparison = PriceData("SP-500")
EMA(0) = 0
EMA(1) = 0
termRatio(0) = (ShortPeriod - 1) / (ShortPeriod + 1)
termRatio(1) = (LongPeriod - 1) / (LongPeriod + 1)
sumWeight(0) = 1
sumWeight(1) = 1
End If
Dim ratio As Double = Price.Last / Comparison.Last
For i As Integer = 0 To 1
Dim weight As Double = 1 / sumWeight(i)
EMA(i) = EMA(i) * (1 - weight) + weight * ratio
sumWeight(i) = sumWeight(i) * termRatio(i) + 1
Next
Plot = EMA(0) - EMA(1)
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I cannot think of a practical automated method of doing so in either verison of TC2000 as the Personal Criteria Formula Language does not have syntax for referencing other symbols.
Momentum of Comparative Strength Formula
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 4/25/2012 Posts: 15
|
Thanks
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |