Automate MovingAverages.mqh Part II by Wiliam210 – indicator MetaTrader 5

MovingAverages.mqh Part II by Wiliam210 – indicator MetaTrader 5

Good morning.


If this code malfunctions for whatever reasons, forgetting or MQL5 upgrades, let me know so I can correct it, thank you

You can find all my multi timeFrame indicator codes or not, in CodeBase or on the Marketplace, free or purchasable, by searching for “William210”.


Why this code?

This indicator shows you how to use native functions “OnBuffer()”

SimpleMAOnBuffer(), ExponentialMAOnBuffer(), SmoothedMAOnBuffer(), LinearWeightedMAOnBuffer

which are in the MovingAverages.mqh library in the includes directory


You can find the other native functions in the same library on this other code


I wanted to write simple and easy to use codes.

Whether you’re new to coding, or need basic code to scale quickly,

This should help you, as it helps me with my own codes.


May this code help you

Don’t forget to put a star and ask me as a friend to be the first to be notified when my code is published in codebase or the marketplace

I wrote other simple codes in CodeBase:

I offer many of these indicators in the Marketplace, search for me “William210”

Adaptative moving average using iama()

Adx using iadx()

Alligator using alligator()

ATR using iatr() 

The ATR is very useful for other indicators, such as SuperTrend which I offer in the marketplace

Awesome oscillator without iao()

Bands bollinger using ibands()

Donchian channel

Envelopes using ienvelopes()

Ishimoku using iishimoku()

Keltener channel

MACD using  imacd()

Momentum using iMomentum()

Moving average using ima(), using the native functions SimpleMA(), ExponentialMA(), SmoothedMA(), LinearWeightedMA()
I offer many multi-timeframe smoothing options in the marketplace.

Simple average => EMA, SMA, EMA, SMMA, LWMA

Volume-weighted averages, VWMA, VEMA, EVWMA

RSI, with or not irsi()

Stochastic using  istochastic()


What is SimpleMA, ExponentialMA, SmoothedMA, LinearWeightedMA?

Smoothing refers to the action of making data fluctuations smoother or less volatile.


It is a technique used to eliminate sudden and unpredictable variations in data series, thereby creating a form of security for investors.


This can help identify underlying trends more clearly.

An investment horizon can be associated with each smoothing


SimpleMA:

Alternative:   RSI_With_Step_MA - indicator MetaTrader 5

Simple Moving Average (SMA) is the calculation of the arithmetic average of a defined number of values.


ExponentialMA:

The Exponential Moving Average (EMA) is an indicator that gives more weight to recent values.

It is preferred by traders who look for recent price changes of an asset.


SmoothedMA: 

The Smoothed Moving Average is a moving average that gives equal importance to all price values.

It is generally used to identify long-term trends.


LinearWeightedMA: 

Linear Weighted Moving Average assigns greater weight to recent values ​​by multiplying each price value by a weight that increases linearly.

This allows you to react more quickly to price changes.


If you have code ideas to help or serve as a basis, request it on this thread

Alternative:   WPR - indicator MetaTrader 5


Moving Averages Part II by William210


📈 ROBOTFX MetaTrader Expert Advisors and Indicators to maximize profits and minimize the risks