Gratis-Indikator für TradingView

Prop Drawdown Guard: deine Verlustgrenze direkt im Chart

Der Indikator zeigt, bei welchem Kurs deine offene Position die Max-Loss-Grenze deiner Prop-Firm reißt, wie viel Puffer in Dollar und Punkten bleibt, und warnt dich rechtzeitig. Für EOD-, Intraday-Trailing- und statische Drawdowns.

Was der Indikator kann

So richtest du ihn ein

  1. In TradingView unten den Pine Editor öffnen, den Code unten einfügen und Zum Chart hinzufügen klicken.
  2. In den Einstellungen Startkapital, Max. Drawdown und Drawdown-Art deiner Firma eintragen (Werte findest du im Vergleich).
  3. Jeden Tag den aktuellen Kontostand und den bisher höchsten Kontostand aus deinem Prop-Dashboard übernehmen. TradingView kann dein Prop-Konto nicht auslesen.
  4. Wenn du eine Position eröffnest: Richtung, Kontrakte und Einstiegspreis eintragen.

Der Indikator ist eine Rechenhilfe, kein Risikomanagement-System. Maßgeblich sind immer die Werte im Dashboard deiner Prop-Firm. Regeln unterscheiden sich je Firma.

Der Code (Pine Script v6, kostenlos)

//@version=6
// Prop Drawdown Guard
// Shows where your prop firm's max loss limit sits on the chart for your open position,
// how much buffer you have left in $ and points, and warns before you reach it.
// TradingView cannot read your prop account, so you enter balance and high-water mark yourself.
// Always check the numbers against your firm's dashboard; rules differ between firms.
indicator("Prop Drawdown Guard", shorttitle = "DD Guard", overlay = true)

// ---------- Inputs ----------
grpA       = "Account (update daily from your dashboard)"
startBal   = input.float(25000.0, "Starting balance ($)", minval = 0.0, group = grpA)
maxDD      = input.float(1000.0, "Max drawdown ($)", minval = 0.0, group = grpA)
ddType     = input.string("EOD", "Drawdown type", options = ["EOD", "Intraday trailing", "Static"], group = grpA)
lockIn     = input.float(0.0, "Limit stops rising at ($, 0 = starting balance)", minval = 0.0, group = grpA,
                 tooltip = "Most firms stop trailing once the limit reaches the starting balance. Some lock slightly above it, check your firm's rules.")
balIn      = input.float(0.0, "Current closed balance ($, 0 = starting balance)", minval = 0.0, group = grpA)
hwIn       = input.float(0.0, "Highest balance so far ($, 0 = current balance)", minval = 0.0, group = grpA,
                 tooltip = "EOD: highest end-of-day balance. Intraday trailing: highest balance including open profits.")
dll        = input.float(0.0, "Daily loss limit ($, 0 = off)", minval = 0.0, group = grpA)
realToday  = input.float(0.0, "Realized P&L today ($)", group = grpA, tooltip = "Only used for the daily loss limit.")

grpP       = "Open position"
side       = input.string("Flat", "Position", options = ["Flat", "Long", "Short"], group = grpP)
qty        = input.int(1, "Contracts", minval = 1, group = grpP)
entry      = input.float(0.0, "Entry price", minval = 0.0, group = grpP)
entryTime  = input.time(timestamp("2026-01-01T00:00:00"), "Entry time (for intraday trailing)", group = grpP)
pvIn       = input.float(0.0, "$ per point per contract (0 = auto)", minval = 0.0, group = grpP,
                 tooltip = "NQ 20, MNQ 2, ES 50, MES 5. Enter it manually on CFDs or continuous contracts if the auto value looks wrong.")

grpW       = "Warning"
warnBuf    = input.float(250.0, "Warn when buffer is below ($)", minval = 0.0, group = grpW)
showTable  = input.bool(true, "Show info table", group = grpW)

// ---------- Calculation ----------
// 0 means "not entered yet", so changing only the starting balance gives consistent values.
balance   = balIn > 0 ? balIn : startBal
highWater = math.max(hwIn > 0 ? hwIn : balance, balance)
lockAt    = lockIn > 0 ? lockIn : startBal
pv     = pvIn > 0 ? pvIn : syminfo.pointvalue
dir    = side == "Long" ? 1 : side == "Short" ? -1 : 0
hasPos = dir != 0 and entry > 0
perPt  = qty * pv

// Best open profit since entry; intraday trailing limits follow it.
var float peakOpen = 0.0
if hasPos and time >= entryTime
    best = dir == 1 ? high : low
    peakOpen := math.max(peakOpen, dir * (best - entry) * perPt)

openPL    = hasPos ? dir * (close - entry) * perPt : 0.0
hw        = ddType == "Intraday trailing" ? math.max(highWater, balance + peakOpen) : highWater
floorLvl  = startBal - maxDD
limitLvl  = ddType == "Static" ? floorLvl : math.max(floorLvl, math.min(hw - maxDD, lockAt))
buffer    = balance + openPL - limitLvl
breachPx  = hasPos ? entry + dir * (limitLvl - balance) / perPt : na
dllLeft   = dll > 0 ? dll + realToday : na
dllPx     = hasPos and dll > 0 ? entry - dir * dllLeft / perPt : na
bufPts    = buffer / (hasPos ? perPt : pv)

status    = buffer <= 0 ? "LIMIT HIT" : buffer < warnBuf ? "WARNING" : "OK"
statusCol = buffer <= 0 ? color.red : buffer < warnBuf ? color.orange : color.green

// ---------- Drawing ----------
// Plots instead of line objects: they draw reliably on every bar and also show how a trailing limit moved.
showLines = hasPos and time >= entryTime
plot(showLines ? breachPx : na, "Max loss limit", color.red, 2, plot.style_linebr)
plot(showLines and dll > 0 ? dllPx : na, "Daily loss limit", color.orange, 1, plot.style_linebr)

var label tLimit = na
var label tDll   = na
if barstate.islast
    label.delete(tLimit)
    label.delete(tDll)
    if hasPos
        tLimit := label.new(bar_index + 3, breachPx, "Max loss limit " + str.tostring(breachPx, format.mintick), style = label.style_label_left, color = color.red, textcolor = color.white, size = size.small)
    if hasPos and dll > 0
        tDll := label.new(bar_index + 3, dllPx, "Daily loss limit " + str.tostring(dllPx, format.mintick), style = label.style_label_left, color = color.orange, textcolor = color.white, size = size.small)

var table info = table.new(position.top_right, 2, 5, bgcolor = color.new(color.black, 20), border_width = 1, border_color = color.new(color.gray, 60))
if barstate.islast and showTable
    table.cell(info, 0, 0, "Limit (account)", text_color = color.silver, text_size = size.small)
    table.cell(info, 1, 0, str.tostring(limitLvl, "#,##0.00") + " $", text_color = color.white, text_size = size.small)
    table.cell(info, 0, 1, "Buffer", text_color = color.silver, text_size = size.small)
    table.cell(info, 1, 1, str.tostring(buffer, "#,##0.00") + " $", text_color = color.white, text_size = size.small)
    table.cell(info, 0, 2, hasPos ? "Buffer in points" : "Points for 1 contract", text_color = color.silver, text_size = size.small)
    table.cell(info, 1, 2, str.tostring(bufPts, "#,##0.00"), text_color = color.white, text_size = size.small)
    table.cell(info, 0, 3, "Type", text_color = color.silver, text_size = size.small)
    table.cell(info, 1, 3, ddType, text_color = color.white, text_size = size.small)
    table.cell(info, 0, 4, "Status", text_color = color.silver, text_size = size.small)
    table.cell(info, 1, 4, status, text_color = color.white, bgcolor = statusCol, text_size = size.small)

// ---------- Alerts ----------
alertcondition(buffer < warnBuf, "Buffer low", "Prop Drawdown Guard: buffer to max loss limit is below your warning level")
if barstate.isrealtime and buffer < warnBuf
    alert("Prop Drawdown Guard: buffer " + str.tostring(buffer, "#,##0") + " $ (" + syminfo.ticker + ")", alert.freq_once_per_bar)

Du willst deine eigene Strategie mit Prop-Regeln automatisieren?

Tagesverlustgrenze, maximale Trades pro Tag, Handelszeiten und Webhook-Alerts für Tools wie TradersPost oder PickMyTrade: Das baue ich dir als Auftrag. Mehr dazu.