OPEN-SOURCE SCRIPT
Trailing Drawdown Line Futures PropFirms

See the exact price where your trailing drawdown gets hit — before it happens.
Built for futures prop-firm traders (Apex, Topstep, MyFundedFutures, Tradeify, BluSky and similar). Enter your firm's trailing DD size, your buffer at entry and your contract count, then click your entry point on the chart. The indicator draws your liquidation line — the price where the account would breach the trailing max drawdown — and ratchets it the way the firm actually does: it trails the implied equity peak at the FULL drawdown distance, and if you enter below your prior peak the line starts closer but does not move until price beats that peak.
Features
• Works on any futures symbol automatically — the contract's point value is read from the symbol (ES, NQ, MNQ, MES, GC, CL, ZB, …). Non-USD contracts (e.g. FDAX) display in their quote currency.
• Three trailing models: Intraday (trails every new high/low — real-time-trailing firms), Bar close, and End of day (EOD-trailing firms; needs an intraday or 1D chart).
• Live buffer readout — dollars and points left before the line — in a dark info table and an on-chart label.
• Breach is latched: once the line is touched the status stays BREACHED, because a trailing max-DD hit is terminal, not a temporary state. On historical bars the intraday model errs toward flagging (the path inside a bar is unknowable) — confirm on a lower timeframe.
• Lock support: enter the price where your firm freezes the DD (breakeven lock), or let the script derive it from your start balance + equity at entry. Status flips to LOCKED.
• Exit time: set it when you close the trade — the line and buffer freeze, because real DD levels stop moving while you're flat.
• Two alert conditions: buffer below warning level, and line touched.
How to use: add to chart → click your entry point → set contracts, firm DD size and buffer at entry (from your firm dashboard) → pick the trailing model that matches your firm → optionally create the two alerts. Re-anchor for every new trade.
Honest limitations: models ONE fixed-size position on THIS symbol. Scaling in/out or holding other instruments changes your real equity path and is not modeled. Anchor on a low timeframe (1–5 min) for precision. Educational risk-visualization tool — always confirm your firm's exact drawdown rule on their own site.
Built for futures prop-firm traders (Apex, Topstep, MyFundedFutures, Tradeify, BluSky and similar). Enter your firm's trailing DD size, your buffer at entry and your contract count, then click your entry point on the chart. The indicator draws your liquidation line — the price where the account would breach the trailing max drawdown — and ratchets it the way the firm actually does: it trails the implied equity peak at the FULL drawdown distance, and if you enter below your prior peak the line starts closer but does not move until price beats that peak.
Features
• Works on any futures symbol automatically — the contract's point value is read from the symbol (ES, NQ, MNQ, MES, GC, CL, ZB, …). Non-USD contracts (e.g. FDAX) display in their quote currency.
• Three trailing models: Intraday (trails every new high/low — real-time-trailing firms), Bar close, and End of day (EOD-trailing firms; needs an intraday or 1D chart).
• Live buffer readout — dollars and points left before the line — in a dark info table and an on-chart label.
• Breach is latched: once the line is touched the status stays BREACHED, because a trailing max-DD hit is terminal, not a temporary state. On historical bars the intraday model errs toward flagging (the path inside a bar is unknowable) — confirm on a lower timeframe.
• Lock support: enter the price where your firm freezes the DD (breakeven lock), or let the script derive it from your start balance + equity at entry. Status flips to LOCKED.
• Exit time: set it when you close the trade — the line and buffer freeze, because real DD levels stop moving while you're flat.
• Two alert conditions: buffer below warning level, and line touched.
How to use: add to chart → click your entry point → set contracts, firm DD size and buffer at entry (from your firm dashboard) → pick the trailing model that matches your firm → optionally create the two alerts. Re-anchor for every new trade.
Honest limitations: models ONE fixed-size position on THIS symbol. Scaling in/out or holding other instruments changes your real equity path and is not modeled. Anchor on a low timeframe (1–5 min) for precision. Educational risk-visualization tool — always confirm your firm's exact drawdown rule on their own site.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.