MetaQuotes:
New article Learn how to design a trading system by ATR has been published:
Author: Mohamed Abdelmaaboud
Very informative and useful article. Thank you for taking the time to write it down.
Just to share, I changed the value a little (array index), at the time of data collection.
Originally:
//get value of current data double ATRValue=NormalizeDouble(PriceArray0[0],5); double PreATRValue=NormalizeDouble(PriceArray1[1],5);
Become:
//get value of current data double ATRValue=NormalizeDouble(PriceArray0[0],5); double PreATRValue=NormalizeDouble(PriceArray1[150],5);
And the result is quite good:
Thank you very much Mohamed
Hi all
Thanks a lot Mohamed. Switching my strategies from mql4 to mql5, your articles and codes help me a lot.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
New article Learn how to design a trading system by ATR has been published:
In this article, we will learn a new technical tool that can be used in trading, as a continuation within the series in which we learn how to design simple trading systems. This time we will work with another popular technical indicator: Average True Range (ATR).
As I mentioned before, the ATR measures the volatility, and we can read that from the ATR window: the lower value of the ATR curve the lower volatility of the instrument, and vice versa the higher value of the ATR curve the higher volatility of the instrument.
The following picture is about how to read that:
As we can see in the chart subwindow, when the ATR records low values, this indicates low volatility, and vice versa, when the ATR indicator records high values, this indicates high volatility.
The ATR indicator is not accurate to generate trading signals as we have seen it from its calculations, while it considers only the magnitude of range but its beauty is that it is one of the best tools that can help in applying a suitable position size, stop loss, and take profit.
Author: Mohamed Abdelmaaboud