Watch how to download trading robots for free
Find us on Telegram!
Join our fan page
Interesting script?
So post a link to it -
let others appraise it
You liked the script? Try it in the MetaTrader 5 terminal
Indicators

MovingAverages.mqh Part I by Wiliam210 - indicator for MetaTrader 5

Views:
2242
Rating:
(6)
Published:
2024.06.10 10:14
Need a robot or indicator based on this code? Order it on Freelance Go to Freelance

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 indicator codes in CodeBase or the Marketplace, free or purchasable, by searching for "William210".


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:

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.


Why this 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.


These codes use the native library that Metaquotes makes available to us in MovingAverages.mqh, i.e.

SimpleMA(), ExponentialMA(), SmoothedMA(), LinearWeightedMA


I'll do the others, SimpleMAOnBuffer(), ExponentialMAOnBuffer(), LinearWeightedMAOnBuffer() and SmoothedMAOnBuffer(), another day


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()
I offer many multi-timeframe smoothing options in the marketplace.

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

Volume-weighted averages, VWMA, VEMA

RSI, with or not irsi()

Stochastic using  istochastic()


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

MovingAverages.mqh Part I by Wiliam210


Beginner Programming: Moving Average Crossover with and without Martingale functionality Beginner Programming: Moving Average Crossover with and without Martingale functionality

Moving averages are useless. In fact, some argue that the best way to lose money for a beginner are MA-Price crossover strategies. But is it possible to make it work?

Lesson 9 Buy sell stop Order Lesson 9 Buy sell stop Order

This is a lesson on buying or selling with pending orders stop

Screenshots with keyboard key press Screenshots with keyboard key press

Capture widescreen screenshots by pressing the 's' hotkey on the keyboard

Easy to use Hedging Class for MQL5 by Peter Mueller Easy to use Hedging Class for MQL5 by Peter Mueller

This EA is a demonstration of how you can implement your own Hedging strategy with the help of the include file.