Latest News

February 4: Follow new BandBreak5 system HERE!!!

Follow my S&P500 and FOREX EUR/USD weekly forecast.

My BBS Trading expert was presented at the 2011 Trading Forum in Denver. More information?

Trade with my DSTfx01 forex robot, (or BandBreak5) watch the VIDEO.

View an excerpt of my last 1st, 2nd and 3rd article about the put/call ratio published in S&C magazine.

MetaStock formulas.

MetaTrader formulas.

Best offer "Capturing Profit with Technical Analysis"!

WINNER "Favorite Article" in the S&C Readers' Choice Award 2010 and 2011. Thank You!

AXIOM business books awards, bronze medal for my book! Thank You!

My YouTube videos

Sylvain Vervoort

SEARCH Stocata
Book Store

Ttitle, author, item# or ISBN

Capturing Profit with Technical Analysis

WINNER 2010 and 2011 favorite article Readers' Choice Award.

readers choice awards

AXIOM Business Books Awards, bronze medal.

AXIOM award

 

   special offers

  Facebook fan page

 

 


 

MetaTrader Formulas

HOME   Back to MetaTrader Formulas Overview

SVE_TEMA_haC TEMA Average on the heikin ashi price

Tema, Triple Exponential Moving Average was first introduced in Stocks & Commodities magazine February 1994 by Patrick Mulloy. Price is passed multiple times through the same filter and than combined.  

TEMA = 3*EMA – 3*EMA(EMA) + EMA(EMA(EMA))

If you are looking for a better smoothing, but still with little lag using longer time periods, then the TEMA average on the heikin ashi price is for you. The blue curve in the chart is a 50-period TEMA average on the heikin ashi price, using 1 hour bars. You must include the "SVE_haC" function to calculate this indicator.

 

tema average on heikin ashi prices chart

 

Special offer: "Capturing Profit with technical Analysis"

 

For MetaTrader4 you can use the following custom formula (SVE_TEMA_haC.mq4):

//+------------------------------------------------------------------+
//| SVE_TEMA_haC.mq4                                                 |
//| Copyright © 2010, Sylvain Vervoort                               |
//| http://stocata.org/                                              |
//+------------------------------------------------------------------+
//+------------------------------------------------------------------+
//| A TEMA average indicator on the heikin ashi average closing price|
//| You must have the indicator SVE_haC already installed            |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2010, Sylvain Vervoort"
#property link "http://stocata.org/"
#property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1 Blue
#property indicator_width1 1
//---- input parameters
extern int EMA_period=20;
//---- buffers
double TemaBuffer[];
double Ema1[];
double Ema2[];
double Ema3[];
double TEMA1[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
IndicatorBuffers(5);
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,TemaBuffer);
SetIndexBuffer(1,Ema1);
SetIndexBuffer(2,Ema2);
SetIndexBuffer(3,Ema3);
SetIndexBuffer(4,TEMA1);
IndicatorShortName("TEMA_haC("+EMA_period+")");

return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator de-initialization function                      |
//+------------------------------------------------------------------+
int deinit()
{
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
{
int i,limit,counted_bars=IndicatorCounted();
//----
if (counted_bars==0)
{
limit=Bars-1;
}
if (counted_bars>0)
{
limit=Bars-counted_bars-1;
}
for (i=limit;i>=0;i--) TEMA1[i]=iCustom(NULL,0,"SVE_haC",0,i);

for (i=limit;i>=0;i--) Ema1[i]=iMAOnArray(TEMA1,0,EMA_period,0,MODE_EMA,i);
for (i=limit;i>=0;i--) Ema2[i]=iMAOnArray(Ema1,0,EMA_period,0,MODE_EMA,i);
for (i=limit;i>=0;i--) Ema3[i]=iMAOnArray(Ema2,0,EMA_period,0,MODE_EMA,i);
for (i=limit;i>=0;i--) TemaBuffer[i]=3*Ema1[i]-3*Ema2[i]+Ema3[i];
//----
return(0);
}
//+-------------------------------------------------------------------------+

If you create this indicator in MetaTrader, make sure you give it the name "SVE_TEMA_haC", because we will call this function by this name from other indicators that we will present further on. Please make sure you have already the indicator "SVE_haC" installed. Otherwise this indicator will not work.

Search the Internet
 

Very cheap books

 

HOME   Back to MetaTrader Formulas Overview


 
Find a Stock ticker symbol, enter the ticker and find a chart, news, fundamentals and historical quotes here.

 

Enter Ticker Symbol:



 

 

 
Copyright © 2007 Stocata.org, All rights reserved.