| Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
 Registered User Joined: 6/15/2008 Posts: 1,356
|
I know there have been some posts on TEMA in the past, but I can't quite get a realcode for it.
googling it, I found the following definition ;
The TEMA formula
1 Establish a simple (exponential is better though) moving average (EMA1)
2 Calculate a double exponential (EMA2).
3 Calculate a triple exponential (EMA3).
4 TEMA equals: (three times (EMA1 minus EMA2) ) plus EMA3
so if I wanted a 20 period TEMA, how would that be done in realcode?
|
|

 Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The relatively short way using built in functions would be:
'|******************************************************************
'|*** StockFinder RealCode Indicator - Version 5.0 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Indicator:TEMA
'|******************************************************************
'# Period = UserInput.Integer = 20
Plot = (3 * Price.XAVGC(Period)) - _
(3 * Price.ExponentialAverage(Period).XAVGC(Period)) + _
Price.ExponentialAverage(Period).ExponentialAverage(Period).XAVGC(Period)
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
 Registered User Joined: 6/15/2008 Posts: 1,356
|
Forgot to thank you for this Bruce.. ;-)
It's been very helpfull for me.
How would I go about making a MACD histogram out of two TEMA indicators ? I have a 5 and 34.
|
|
 Registered User Joined: 6/15/2008 Posts: 1,356
|
Think I got it;
Drag and drop the Tema5 on top of the Tema34, -plot comparison- , -difference- , then edit it and change plot style from line to bar.
that's it right?
|
|

 Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
That works.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 11/7/2010 Posts: 6
|
what does TEMA stand for?
|
|
 Registered User Joined: 6/15/2008 Posts: 1,356
|
Triple exponential moving average. it minimizes lag to some extend, compared to your regular moving average.
google it, for more info. there was an article in "stocks and commodities" some time back.
|
|
|
Guest-1 |