Hold Equity Curve

Hold Equity Curve is a free indicator by DinexSpace for MT5 and TradingView. Shows what an amount invested in the symbol on a date you pick would be worth today.

Download .zipDetailed installation guide11.9 KB · 7 files · no sign-up

What Hold Equity Curve does

Hold Equity Curve is a free indicator by DinexSpace for MT5 and TradingView. Shows what an amount invested in the symbol on a date you pick would be worth today.

MT5 version

DinexSpace Hold Equity Curve is an indicator for MetaTrader 5 that shows, in a separate window, what a starting amount would be worth if it had been held in the chart symbol from a chosen start date. An optional fixed amount can be added at the start of every month.

Each purchase is made at the close of the bar where it happens: the starting amount on the first bar at or after the start date, and each monthly addition on the first bar of a new month. A cost in percent is taken from every purchase.

TradingView version

Hold Equity Curve answers a simple question: what would a starting amount be worth today if it had just been held in this symbol since a chosen date? You can also add a fixed amount every month, like a regular savings plan. The pane shows the value of the holding next to the total amount paid in.

When to use it

Use it as a buy-and-hold benchmark for your own strategy.

Features and modes

Hold Equity Curve has 9 documented features, listed below.

MT5 version

Key Features

  1. Value and amount paid in
    • Two lines, value and total paid in, with optional shading between them to show gain or loss.
  2. Results panel
    • Start date, amount paid in, value now, gain or loss in amount and percent, deepest drawdown, yearly growth rate and units held.
  3. Drawdown
    • Fall of the price from its highest point since the start date, in percent, so a monthly addition does not hide a fall.
  4. Yearly growth rate
    • The yearly growth rate is shown only without monthly additions and after at least one year; with additions a single rate would be misleading, so the panel shows "-".

How to Use

  1. Attach the indicator to the symbol you want to study, on D1 or a lower timeframe.
  2. Set the start date, the starting amount and the monthly addition.
  3. Read the panel and the drawdown line.

TradingView version

How it works

  • On the first bar at or after the start date, the starting amount buys the symbol at that bar's close, less the cost per purchase you set.
  • If "Add every month" is above zero, the same amount is added on the first bar of each new month, again at that bar's close.
  • The value line is units held × close; the paid-in line steps up with each contribution. The gap is shaded green above the paid-in line and aqua below it.
  • A table shows the start date, paid in, value now, profit or loss, the deepest drawdown of the value, the yearly growth rate and the units held.
  • Yearly growth is shown only without monthly additions and after at least one year.

Parameters

Hold Equity Curve has 9 inputs in the MT5 version and 9 in the TradingView version; every input and its default is listed below.

MT5 version

  • Start date (default 1 January 2026)
  • Starting amount (default 1000) and monthly addition (default 0)
  • Cost per purchase in percent (default 0.1, up to 5)
  • Colours, shading and panel corner

TradingView version

  • Holding: start date, starting amount, monthly addition, cost per purchase.
  • Display: colours, shading, table and position.
Hold Equity Curve inputs – MT5 version
InputDefaultLabel in MT5
Holding
InpStartD'2026.01.01 00:00'Start date
InpInitial1000Starting amount
InpMonthly0Add on the first bar of every new month
InpFeePct0.1Cost per purchase (%)
Display
InpColValueclrSpringGreenValue colour
InpColPaidclrDarkGrayPaid in colour
InpShadetrueShade profit / loss
InpPaneltruePanel
InpCornerCORNER_LEFT_UPPERPanel corner
Hold Equity Curve inputs – TradingView version
InputDefault
Holding
Start datetimestamp("2024-01-01T00:00:00")
Starting amount1000
Add every month0
Cost per purchase (%)0.1
Display
ValueC_GREEN
Paid inC_GRAY
Shade profit / losstrue
Tabletrue
Table position"Top left"

Signals

Hold Equity Curve does not generate buy or sell signals. It is an analysis tool: you read what it plots and make your own decisions.

Alerts

No. Hold Equity Curve has no built-in alerts.

Buffers for Expert Advisors

Yes. The MT5 version of Hold Equity Curve exposes its plots as indicator buffers that an EA can read with iCustom and CopyBuffer: Value, Paid in, Value, Paid in, Drawdown %.

  1. Buffers for Expert Advisors
    • Buffer 2 is the value, 3 the amount paid in, 4 the drawdown in percent. Buffers 0 and 1 are used for the shading. With iCustom, pass "" for each input group header.

Timeframes and markets

Attach the indicator to the symbol you want to study, on D1 or a lower timeframe.

Limitations

Hold Equity Curve is an analysis tool, not a trading system. Its documented limitations are listed below.

MT5 version

  • It does not open, close or modify any trade; it only reads and displays market data.
  • The value on the forming bar moves with the price; closed bars do not change.
  • The calculation uses the chart price as it is: no contract size, leverage, swap or currency conversion, and fractional units are allowed.
  • Past values describe what happened on this chart's history and say nothing about future prices.
  • Dividends are not included. If the start date is older than the loaded history, the curve starts at the first available bar; if it is after the last bar, the panel says so and nothing is drawn.

A plain reference curve for holding a symbol over time.

TradingView version

  • Purchases use bar closes on the chart's timeframe. Spreads, taxes and funding are not modelled beyond the flat cost.
  • It needs chart history back to the start date. If the history is shorter, the holding starts at the first loaded bar after the start date.
  • Past results do not tell you anything about future results. This is a calculator, not a strategy: it never sells and gives no trade signals.

This script is an analysis aid only. It does not give trade signals or investment advice.

Pine Script code

Paste the whole script into the Pine Editor on TradingView.

hold_equity_curve.pine · 93 lines
//@version=6
// DinexSpace | Hold Equity Curve
// Plots, in a separate pane, what a starting amount (plus optional fixed monthly contributions) would be
// worth if it had simply been held in the chart symbol from a chosen start date, next to the total amount
// paid in. A table shows the value, profit/loss, deepest drawdown of the value and the yearly growth rate.
// It is a holding calculator, not a strategy: it never sells and gives no trade signals.
// Free and open source. License: MIT. (c) 2026 DinexSpace
indicator("DinexSpace | Hold Equity Curve", shorttitle = "DNX Hold Equity", overlay = false, precision = 2)

// ===== Brand colours =====
C_GREEN = #00FF7F   // SpringGreen
C_AQUA  = #00FFFF   // Aqua
C_AMBER = #FFB000
C_GRAY  = #9AA0A6

// ===== Inputs =====
GRP_C    = "Holding"
startT   = input.time(timestamp("2024-01-01T00:00:00"), "Start date", group = GRP_C)
initAmt  = input.float(1000, "Starting amount", minval = 0, step = 100, group = GRP_C)
monthAmt = input.float(0, "Add every month", minval = 0, step = 10, tooltip = "Added on the first bar of each new month after the start, at that bar's close.", group = GRP_C)
feePct   = input.float(0.1, "Cost per purchase (%)", minval = 0, maxval = 5, step = 0.05, group = GRP_C)

GRP_D   = "Display"
colEq   = input.color(C_GREEN, "Value", group = GRP_D)
colIn   = input.color(C_GRAY, "Paid in", group = GRP_D)
showFil = input.bool(true, "Shade profit / loss", group = GRP_D)
showTbl = input.bool(true, "Table", group = GRP_D)
tblPos  = input.string("Top left", "Table position", options = ["Top right", "Top left", "Bottom right", "Bottom left"], group = GRP_D)

// ===== Holding simulation (each purchase at the bar's close) =====
var float units    = 0.0
var float paidIn   = 0.0
var float peak     = na
var float maxDD    = 0.0
var int   firstT   = na
bool started = time >= startT
bool first   = started and na(firstT)
bool newM    = timeframe.change("M")          // called on every bar (not inside the if) to avoid a consistency warning

buy(float amt) =>
    float u = amt * (1 - feePct / 100) / close
    [u, amt]

if first
    firstT := time
    [u, a] = buy(initAmt)
    units  += u
    paidIn += a
else if started and monthAmt > 0 and newM
    [u, a] = buy(monthAmt)
    units  += u
    paidIn += a

float value = started ? units * close : na
if not na(value)
    peak  := na(peak) ? value : math.max(peak, value)
    maxDD := peak > 0 ? math.min(maxDD, (value / peak - 1) * 100) : maxDD

// ===== Plots =====
pV = plot(value, "Value", color = colEq, linewidth = 2)
pI = plot(started ? paidIn : na, "Paid in", color = colIn, style = plot.style_stepline)
fill(pV, pI, color = not showFil or na(value) ? na : value >= paidIn ? color.new(C_GREEN, 85) : color.new(C_AQUA, 85), title = "Profit / loss")

// ===== Table =====
tPos = switch tblPos
    "Top right"    => position.top_right
    "Bottom right" => position.bottom_right
    "Bottom left"  => position.bottom_left
    => position.top_left

var table tbl = table.new(tPos, 2, 8, bgcolor = color.new(color.black, 10), border_color = color.new(color.gray, 70), border_width = 1)

cell(int r, string name, string val, color col) =>
    table.cell(tbl, 0, r, name, text_color = color.gray, text_size = size.small, text_halign = text.align_left)
    table.cell(tbl, 1, r, val, text_color = col, text_size = size.small, text_halign = text.align_right)

if showTbl and barstate.islast
    if na(value)
        cell(0, "Start date", "after last bar", C_AMBER)
    else
        float pl   = value - paidIn
        float plP  = paidIn > 0 ? pl / paidIn * 100 : na
        float yrs  = (time - firstT) / (365.25 * 86400000.0)
        // Yearly growth is shown only without monthly additions (with additions it is not a simple rate).
        float cagr = monthAmt == 0 and yrs >= 1 and initAmt > 0 ? (math.pow(value / initAmt, 1 / yrs) - 1) * 100 : na
        cell(0, "Since", str.format_time(firstT, "yyyy-MM-dd", syminfo.timezone), color.white)
        cell(1, "Paid in", str.tostring(paidIn, "#,##0.00"), color.white)
        cell(2, "Value now", str.tostring(value, "#,##0.00"), colEq)
        cell(3, "Profit / loss", str.tostring(pl, "+#,##0.00;-#,##0.00") + (na(plP) ? "" : "  (" + str.tostring(plP, "+0.0;-0.0") + "%)"), pl >= 0 ? C_GREEN : C_AQUA)
        cell(4, "Deepest drawdown", str.tostring(maxDD, "0.0") + "%", C_AMBER)
        cell(5, "Yearly growth", na(cagr) ? "-" : str.tostring(cagr, "+0.0;-0.0") + "%", color.white)
        cell(6, "Units held", str.tostring(units, "#,##0.0000"), color.white)
    table.cell(tbl, 0, 7, "DinexSpace", text_color = C_GREEN, text_size = size.tiny, text_halign = text.align_left)

Hold Equity Curve FAQ

Hold Equity Curve is free, runs on MT5 and TradingView and does not place trades.

Is Hold Equity Curve free?

Yes. Hold Equity Curve is free to download from this page with no sign-up, and the download includes the full source code.

Which platforms does Hold Equity Curve run on?

Hold Equity Curve is available for MetaTrader 5 (MQL5) and TradingView (Pine Script v6).

Does Hold Equity Curve give buy and sell signals?

Hold Equity Curve does not generate buy or sell signals. It is an analysis tool: you read what it plots and make your own decisions.

Does Hold Equity Curve have alerts?

No. Hold Equity Curve has no built-in alerts.

Can an EA read Hold Equity Curve?

Yes. The MT5 version of Hold Equity Curve exposes its plots as indicator buffers that an EA can read with iCustom and CopyBuffer: Value, Paid in, Value, Paid in, Drawdown %.

Which timeframes does Hold Equity Curve work on?

Attach the indicator to the symbol you want to study, on D1 or a lower timeframe.

Does Hold Equity Curve place trades?

No. It is a read-only indicator: it only reads market data and shows the result on the chart or writes it to a file. The source contains no calls that open, close or modify orders.

How do I install Hold Equity Curve?

Download the .zip and follow the step-by-step installation guide for MT5 and TradingView: https://indicators.dinexspace.com/install-guide/

Measured win rates (backtest)

Filter / stop-trading tool: no arrows yet; new arrow rules approved, in progress.

  • Costs: Real spread of an ECN-type MT5 account, no commission.
  • Data source: MT5 tick data (BNB: Binance spot).

TradingView H4/D1 bars may follow the exchange time zone of the TradingView symbol, not the MT5 server time (UTC) used for the measurement; sessions and the H4 trend may differ on the Pine version. Same signals on TradingView not checked yet.

Past test statistics are not a promise of future results.

More in this category

All Utilities indicators

Account Info Panel

Utilities · Indicator

A compact on-chart panel showing balance, equity, margin and floating P/L. Use it to keep an eye on your account without switching to the Trade tab.

FreeMT5Filter tool

Candle Timer

Utilities · Indicator

Counts down the time left until the current candle closes, with higher timeframes alongside. Use it when you are waiting for a candle close to confirm an entry.

FreeMT5TradingViewMeasured

Economic Calendar Marker

Utilities · Indicator

Marks economic news releases on the chart using MT5's built-in economic calendar. Use it to stay out of trades right before high-impact news.

FreeMT5Filter tool