Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

MetaTrader 5 Indicator | Volatility2

Real author:

Eva Ruft

A simple indicator that calculates only the volatility of a financial asset. Volatility is calculated in points based on the maximum and minimum prices.

The volatility is calculated using a simple MA as the sum of the maximum prices for the averaging period minus the sum of minimal prices for the same period. The resulting value is calculated in points.

Indicator input parameters:

//+-----------------------------------+
//|  INDICATOR INPUT PARAMETERS       |
//+-----------------------------------+
input  ENUM_MA_METHOD   MAType=MODE_SMA;     // Method of averaging
input uint              VolatilityPeriod=5;  // Indicator period
input int               Shift=0;             // Horizontal shift of the indicator in bars

input uint              LevelsTotal=20;      // Number of levels
input uint              StartLevel=100;      // Starting level
input uint              LevelsStep=100;      // Distance between levels
input color             LevelsColor=clrBlue; // Color of the levels

This indicator was first implemented in MQL4 and published in Code Base at mql4.com on 08.04.2008.

MetaTrader Experts, Indicators, Scripts and Libraries

Figure 1. The Volatility2 indicator

1763

Best MetaTrader Indicators + Profitable Expert Advisors