Moving Average of custom indicator

 

So, i've coded many EAs, but i'm a bit new on indicators.

I made a Donchian Channels indicator for MT5, but i want to make an EMA of the BASE line and i can't find how, i already checked the Custom Moving Average indicator source without luck.

So any help would be great, thanks :)


In short: how to make an EMA of a custom value/source instead of price source.

 
Jose Ma Gassin Perez Traverso: So, i've coded many EAs, but i'm a bit new on indicators. I made a Donchian Channels indicator for MT5, but i want to make an EMA of the BASE line and i can't find how, i already checked the Custom Moving Average indicator source without luck. So any help would be great, thanks :) In short: how to make an EMA of a custom value/source instead of price source.

There are many example indicators in the CodeBase, many of which incorporate moving averages. Study them and apply the code to your own requirements.

Here are some examples of my own which incorporate EMA's.

Code Base

Exponential Commodity Channel Index

Fernando Carreiro, 2023.04.16 04:58

Commodity Channel Index using exponential moving averages.

Code Base

Wilder's Average True Range (ATR)

Fernando Carreiro, 2023.01.22 13:25

An implementation of the original Average True Range indicator by John Welles Wilder Jr. as described in his book—New Concepts in Technical Trading Systems [1978].

Code Base

Wilder's Relative Strength Index

Fernando Carreiro, 2023.01.22 18:12

An implementation of the Relative Strength Index indicator by John Welles Wilder Jr. as described in his book—New Concepts in Technical Trading Systems [1978].

Code Base

Exponential Range Average & Deviation Offset

Fernando Carreiro, 2022.06.25 16:02

An exponential moving average of the true range and the offset of its average deviation

Code Base

Time Segmented Volume (TSV)

Fernando Carreiro, 2023.01.01 16:40

Based on the original “Time Segmented Volume (TSV)” developed by Worden Brothers, Inc.

Code Base

Dōteki Heikin Ashi (Dynamic Average Foot/Bar)

Fernando Carreiro, 2018.10.15 17:33

A dynamic version of the standard Heikin Ashi indicator (code compatible with both MQL4 or MQL5).
 
The following paper is also of great value for implementing EMAs — Incremental calculation of weighted mean and variance (Tony Finch) [2009, Cambridge University]
 
Fernando Carreiro #:
The following paper is also of great value for implementing EMAs — Incremental calculation of weighted mean and variance (Tony Finch) [2009, Cambridge University]

Thanks sir, always a pleasure :)

Reason: