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

Typical price & Heikin ashi TEMA average crossings

Heikin ashi, Japanese for “average bar,” is a technique used to better visualize price trends by recalculating the standard candlesticks. This technique was introduced by Dan Valcu in 2004. The average heikin ashi closing I calculate dividing the sum of the re-calculated heikin ashi values for open, high, low and close by 4. You can use a heikin ashi TEMA average smoothed value with a zero-laging technique, crossing with a TEMA zero-lagging average closing price, to create fast reliable crossings.

 

These are the formulas:

SVE_HA_Tema_ZL

// SVE_haC_Tema_ZL.mq4
// Copyright © 2010, Sylvain Vervoort - http://stocata.org/
// A zero-lagging TEMA average indicator on the average heikin ashi price
// You need also the "SVE_haC" function
// and the "SVE_TEMA_haC" function that are called by this function
// Note that you need about 5 times the choosen TEMA average before getting a usefull signal!!!

#property copyright "Copyright © 2010, Sylvain Vervoort"
#property link      "http://stocata.org/"
#property indicator_chart_window
#property indicator_buffers 1
extern int TEMA_period=30;
double TEMA1[];
double Diff[];
double Ema1[];
double Ema2[];
double Ema3[];
double ZlCl[];
// initialization function
int init()
  {
   IndicatorBuffers(6);
   SetIndexStyle(0,DRAW_LINE);
   SetIndexBuffer(0,ZlCl);
   SetIndexBuffer(1,Ema1);
   SetIndexBuffer(2,Ema2);
   SetIndexBuffer(3,Ema3);
   SetIndexBuffer(4,TEMA1);
   SetIndexBuffer(5,Diff);
   IndicatorShortName("haC_TEMA_ZL("+TEMA_period+")");
   return(0);
  }
// Custom indicator SVE_haC_Tema_ZL function
int start()
  {
  int i,limit,limit2,limit3,counted_bars=IndicatorCounted();
   if (counted_bars==0)
      {
      limit=Bars-1;
      limit2=limit-TEMA_period;
      limit3=limit2-TEMA_period;
      }
   if (counted_bars>0)
      {
      limit=Bars-counted_bars-1;
      limit2=limit;
      limit3=limit2;
      }
   for (i=limit;i>=0;i--) TEMA1[i]=iCustom(NULL,0,"SVE_TEMA_haC",TEMA_period,0,i);
   for (i=limit;i>=0;i--) Ema1[i]=iMAOnArray(TEMA1,0,TEMA_period,0,MODE_EMA,i);
   for (i=limit;i>=0;i--) Ema2[i]=iMAOnArray(Ema1,0,TEMA_period,0,MODE_EMA,i);
   for (i=limit;i>=0;i--) Ema3[i]=iMAOnArray(Ema2,0,TEMA_period,0,MODE_EMA,i);
   for (i=limit;i>=0;i--) Diff[i]=TEMA1[i]-(3*Ema1[i]-3*Ema2[i]+Ema3[i]);
   for (i=limit;i>=0;i--) ZlCl[i]=TEMA1[i]+Diff[i];
   return(0);
  }
//-----------END of Function SVE_haC_Tema_ZL-------------------------------------

Special offer: "Capturing Profit with technical Analysis"

SVE_Typ_TEMA_ZL

For MetaTrader4 you can use the following formula (SVE_Typ_TEMA_ZL):
// SVE_Typ_TEMA_ZL.mq4
// a zero-lagging TEMA average indicator on the typical price.
// You need to have the function "SVE_TEMA_Typ" available! ----

#property copyright "Copyright © 2010, Sylvain Vervoort"
#property link      "http://stocata.org/"
#property indicator_chart_window
#property indicator_buffers 1
extern int TEMA_period=30;
double TEMA1[];
double Diff[];
double Ema1[];
double Ema2[];
double Ema3[];
double ZlCl[];
// Custom indicator initialization function
int init()
  {
   IndicatorBuffers(6);
   SetIndexStyle(0,DRAW_LINE);
   SetIndexBuffer(0,ZlCl);
   SetIndexBuffer(1,Ema1);
   SetIndexBuffer(2,Ema2);
   SetIndexBuffer(3,Ema3);
   SetIndexBuffer(4,TEMA1);
   SetIndexBuffer(5,Diff);
   IndicatorShortName("Typ_TEMA_ZL("+TEMA_period+")");
   return(0);
  }
// Typical TEMA zero-lagging price calculation
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_TEMA_Typ",TEMA_period,0,i);
   for (i=limit;i>=0;i--) Ema1[i]=iMAOnArray(TEMA1,0,TEMA_period,0,MODE_EMA,i);
   for (i=limit;i>=0;i--) Ema2[i]=iMAOnArray(Ema1,0,TEMA_period,0,MODE_EMA,i);
   for (i=limit;i>=0;i--) Ema3[i]=iMAOnArray(Ema2,0,TEMA_period,0,MODE_EMA,i);
   for (i=limit;i>=0;i--) Diff[i]=TEMA1[i]-(3*Ema1[i]-3*Ema2[i]+Ema3[i]);
   for (i=limit;i>=0;i--) ZlCl[i]=TEMA1[i]+Diff[i];
   return(0);
  }
//------END of Function SVE_Typ_TEMA --------------------------------------

 

fast crossings with heikin ashi tema

Here you can see recent fast profitable crossings between a 55-days zero-lagging TEMA average on the typical price and a 55-days zero-lagging TEMA average on the heikin ashi closing price on the S&P500 index. Red: SVE_HA_TEMA_ZL, Blue: SVE_Typ_TEMA_ZL.

 

 

Search the Internet


Very cheap books

 

HOME   Back to MetaStock 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.