Loading…

Annualised Realised Volatility Line

Raw price volatility numbers are not comparable across timeframes or instruments: a standard deviation of 0.0004 means something totally different on a 1-minute EURUSD chart than on a daily Gold chart. Annualising fixes this by scaling every window's volatility up to "what this would be if it ran at this rate for a full year," which is exactly the convention professional volatility quoting already uses (implied vol figures on options are always annualised for the same reason). The calculation takes the sample standard deviation of log returns over the lookback window, then multiplies by the square root of how many such windows fit in a year, using the current chart's own period. FX and most other MetaTrader-tradeable instruments trade close to continuously, so this uses a 365-day, 24-hour convention (minutes per year divided by the chart's period in minutes) rather than the 252-trading-day convention used for equities. The two conventions disagree by a factor of roughly the square root of 365/252 - about 1.2x - so a reading from this indicator is not directly comparable to a vol figure quoted elsewhere using the 252-day equity convention without adjusting for that. Notes and limitations - Needs at least InpPeriod + 1 bars of history before it plots. - Uses the 365-day continuous-market annualisation convention, not the 252-trading-day equity convention - see above. Comparing this reading directly against an equity-style implied or realised vol figure needs a manual adjustment. - On higher timeframes (daily and above) the weekend gap between Friday's close and Monday's open is treated as one ordinary bar's return, which can inflate that single bar's contribution to the window compared with a true continuous-time measure. This is a known artefact of bar-based FX data, not corrected here. - Changing symbol or timeframe changes both the window's real-world length and the annualisation factor at once; two readings are only directly comparable if the chart period matches.

Indicator · MT5 · v1.0 · Free

About Annualised Realised Volatility Line

Annualised Realised Volatility Line is an indicator for MetaTrader 5. It has 1 setting, such as Period. MQL source code included.

Files in the download: AnnualisedRealisedVol.ex5, AnnualisedRealisedVol.mq5, AnnualisedRealisedVol.txt.

Settings

SettingDefaultWhat it does
Period20Rolling window in bars used for the standard deviation

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Indicators.
  3. Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
  4. Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the indicator from the Navigator onto a chart and adjust the settings.

Download the PDF guide

Tags: Gold (XAUUSD) · EURUSD · MT5 Indicator · MQL5 Source Code

MetaTrader 4 & 5 indicators · PolyMaria