Loading…

Drawup Drawdown Profile

A plain volatility figure treats up moves and down moves as interchangeable, but a trader holding a position experiences them very differently. This indicator computes two separate rolling figures for each window: the largest peak-to-trough decline (max drawdown) and the largest trough-to-peak rise (max run-up), each read directly off closing price. Both figures are found the standard way, walking the window oldest to newest while tracking a running peak (for drawdown) and a running trough (for drawup), and keeping the single worst decline from that running peak / best rise from that running trough seen anywhere inside the window - not just the difference between the window's first and last bar, which would miss a decline or rise that started and fully finished somewhere in the middle of the window. Each figure is expressed as a percentage of the price level the excursion actually started from (the peak for a drawdown, the trough for a run-up), matching how the size of a decline or rise is normally read. Notes and limitations Both figures are computed from CLOSE prices only, not intrabar high/low, so a large intrabar wick that closes back near where it started will not show up as a run-up or drawdown here - use alongside a wick-aware tool if intrabar excursions matter for the use case. This is a descriptive profiling tool, not a forecast: a window that shows a small max drawdown says nothing about the next window's drawdown. Each plotted bar's window is recomputed from scratch on every new closed bar within InpMaxPlotBars, so the visible history can shift slightly as new bars extend the range - expected, not a bug.

Indicator · MT5 · v1.0 · Free

About Drawup Drawdown Profile

Drawup Drawdown Profile is an indicator for MetaTrader 5. It has 2 settings, such as Window bars and Max plot bars. MQL source code included.

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

Settings

SettingDefaultWhat it does
Window bars100Trailing bars per rolling window (10-500)
Max plot bars500History bars kept recomputed (performance cap)

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: Trailing Stop & Break-even · MT5 Indicator · MQL5 Source Code

MetaTrader 4 & 5 indicators · PolyMaria