Nicolas

Quadruple Exponential Moving Average indicator

Category: Indicators By: Nicolas Created: January 23, 2017, 2:07 PM
January 23, 2017, 2:07 PM
Indicators
4 Comments
Quadruple Exponential Moving Average indicator

the Quadruple Exponential Moving Average is calculated with a set of different EMA of EMA.

I introduced in the code the possibility to change the moving average type for the indicator calculation (from 0 to 6):

0 = SMA

1 = EMA

2 = WMA

3 = Wilder

4 = Triangular

5 = End point

6 = Time series

Of course you can also modify the calculation period in the indicator parameter.

QEMA=5*MA1-10*MA2+10*MA3-5*MA4+MA5, where
MA1=Moving Average(Price),
MA2=Moving Average(MA1),
MA3=Moving Average(MA2),
MA4=Moving Average(MA3),
MA5=Moving Average(MA4).

Code adapted from TS2 platform.

 

//PRC_QEMA | indicator
//23.01.2017
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge

//--- parameters
// period = 14
// method = MOVING AVERAGE TYPE
// ---

Price=customclose

MA1=Average[period,method](Price)
MA2=Average[period,method](MA1)
MA3=Average[period,method](MA2)
MA4=Average[period,method](MA3)
MA5=Average[period,method](MA4)
QEMA=5*MA1-10*MA2+10*MA3-5*MA4+MA5

RETURN QEMA as "Quadruple Exponential Moving Average indicator"

 

Download
Filename: PRC_QEMA.itf
Downloads: 243
Nicolas
Nicolas Legend
I created ProRealCode because I believe in the power of shared knowledge. I spend my time coding new tools and helping members solve complex problems. If you are stuck on a code or need a fresh perspective on a strategy, I am always willing to help. Welcome to the community!
Author’s Profile

Comments

Salocin
9 years ago
#

Hello Nicolas, my french is not that well. It occurs an error which can not be solved by copy the code is that correct? Or can I replace "Moving Average Type" and the copied code works for further development? Regards Nicolas

Nicolas
9 years ago
#

Just download the ITF file and import it into your platform, follow these easy steps: https://www.prorealcode.com/import-export-prorealtime-code-platform/

piarou
9 years ago
#

Objet : PRC_QEMA | indicator

Bonjour,

Bizarrement :

• les deux paramètres sont en remarque donc logiquement  inactifs et généèrent une erreur de syntaxe et deux variables (period et methose) non définies

• 

MOVING AVERAGE TYPE génère une erreur dans PRT (V10.3)
D'une manière générale beaucoup de ces codes proposés sont inutilisables tels qu'il ont présentés car entachés d'erreurs.
Avant de les placer sur un site quelqu'un pourrait-il préalablement les déboguer totalement, ce qui rendrait service à de nombreux utilisateurs de PRT.

Cordialement,
piarou
//PRC_QEMA | indicator
//23.01.2017
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge

//--- parameters
// period = 14
// method = MOVING AVERAGE TYPE
// ---

Price=customclose

MA1=Average[period,method](Price)
MA2=Average[period,method](MA1)
MA3=Average[period,method](MA2)
MA4=Average[period,method](MA3)
MA5=Average[period,method](MA4)
QEMA=5*MA1-10*MA2+10*MA3-5*MA4+MA5

RETURN QEMA as "Quadruple Exponential Moving Average indicator"
//--- parameters
// period = 14
// method = MOVING AVERAGE TYPE
// ---

Nicolas
9 years ago
#

En effet, c'est le cas si on copie/colle le code. Ces 2 variables sont inscrites en externes dans le code ITF de l'indicateur à importer pour en facilité son utilisation, le code ci-dessous en étant l'exacte copie.

ProRealCode ProRealCode
Loading...