Loading…

Underwater Equity Curve

An underwater equity curve is a standard way to look at a trading result: instead of plotting the balance itself, it plots the percentage distance below the running peak, so flat stretches at zero are visible time spent at a new high, and every dip shows both how deep it went and how long it took to recover. This indicator applies that same idea to plain price. On every bar it tracks the running peak of price (Close by default, optionally High) from the start of the chart's loaded history, and plots the current bar's percentage distance below that peak as a filled band in a subwindow. The band is always at or below zero; it only touches zero exactly when the current bar itself is making a fresh high. This is deliberately a PRICE-based curve, not a real trading account's equity curve - it has no notion of position size, entries, exits, commission or an EA's actual realised P/L. It answers "if I had simply held this instrument since the chart began, how far underwater would I be right now", which is the closest a chart-only indicator can honestly get without reading real account history. Notes and limitations - This is a synthetic, price-only curve, not a real account's equity curve. It cannot reflect position sizing, leverage, costs or an actual trading strategy's entries and exits. - The running peak is measured from the start of the chart's currently loaded history, so scrolling back to load more bars can change where the peak (and therefore the drawdown readings) starts from. - Recomputes the whole loaded history on every tick, walking oldest to newest, because each bar's peak genuinely depends on every peak before it - a partial recalculation from a stale peak would be wrong the moment history is extended or the chart is rescrolled.

Indicator · MT5 · v1.0 · Free

About Underwater Equity Curve

Underwater Equity Curve is an indicator for MetaTrader 5. It has 1 setting, such as Use high for peak. MQL source code included.

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

Settings

SettingDefaultWhat it does
Use high for peakfalseTrack the running peak off High[] instead of Close[] (steeper, more conservative peaks)

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: MT5 Indicator · MQL5 Source Code

MetaTrader 4 & 5 indicators · PolyMaria