In this article, I will illustrate the creation of an indicator in Easylanguage to measure the volatility to be used as a filter for various systems.

The Welles Wilder Average True Range is the most commonly used indicator for measuring the volatility of an instrument.

In practice, it is a moving average (Average) of the Range of the last “N” periods (by default 14 days).

The range is calculated as the difference between:

The maximum and the minimum of today

Today’s high and yesterday’s closing

Today’s minimum and yesterday’s closing

What you get is a line that goes up when the range of the instrument increases, if we use it in discretionary is a straightforward indicator, but in an automatic system how do we determine if the volatility is high or low?

**HOW TO MEASURE VOLATILITY?**

**HOW TO MEASURE VOLATILITY?**

I used only one standard deviation, leaving the average at 20, you could also add two more bands with the classic two standard deviations to indicate a real excess of volatility. Similarly, depending on the instrument, you could also add two bands of 1.5 standard deviations.

The indicator turns red when volatility rises, green when volatility is normal and yellow when volatility is low.

### CONCLUSIONS

**Creating a function** with the three levels of volatility will be extremely simple to provide an automatic system with precise indications on the volatility.

In the next articles, we will use this indicator to filter some inputs to see how much the performance of a strategy can increase.