OPEN-SOURCE SCRIPT
R-Level Targets

R-Level Targets — Drag-to-Set Entry, Stop & R-Multiple Targets
Draws entry, stop, and R-multiple target lines from two price levels you set by dragging lines directly on the chart — no settings dialog required, though typing exact values into settings works too. Direction (Long/Short) is inferred automatically from whether the stop is above or below entry.
How it works
Inputs
Notes / limitations
Disclaimer
This script is a visual planning aid and does not constitute financial advice. It does not place trades or connect to any brokerage account.
Draws entry, stop, and R-multiple target lines from two price levels you set by dragging lines directly on the chart — no settings dialog required, though typing exact values into settings works too. Direction (Long/Short) is inferred automatically from whether the stop is above or below entry.
How it works
- Add the indicator, then drag the Entry and Stop lines to your levels (or type them into the settings).
- Risk = distance from entry to stop. Each R level is drawn at a multiple of that risk, projected in the direction implied by your stop placement.
- The stop-to-entry range is shaded as a loss zone; each R interval above/below entry is shaded a progressively deeper profit zone, echoing TradingView's built-in Long/Short Position tool.
- Lines run from today's session open to a label column on the right — they don't stretch back across every session loaded on the chart.
- A small "Current R" value is available in the Data Window (hover the chart) so you can track live unrealized R without cluttering the chart itself.
Inputs
- Position — Entry price, Stop price, label offset (bars), and a snap increment so a hand-dragged line lands on a real tradeable price instead of a stray decimal.
- R Levels — a free-form comma-separated list (e.g. 1, 1.5, 2), any order, up to 10 levels, plus a "Target R" value that gets highlighted separately from the rest.
- Display — toggle tick count and $ risk-per-contract on the Stop label.
- Colors — every line and fill color is configurable.
Notes / limitations
- This is a manual planning tool, not an auto-trader: Pine Script has no access to your broker's live fills or position events, even through TradingView's Trading Panel, so nothing here executes or tracks real trades — it's a visual guide you set yourself.
- Custom scripts can't add themselves to TradingView's drawing-tools sidebar, so input.price() (a draggable line in settings) is used as the closest equivalent to a drawing tool.
- Defaults on add (23500 / 23475) are just a starting point sized for NQ/MNQ — update the levels for your instrument, or drag/type them each trade.
Disclaimer
This script is a visual planning aid and does not constitute financial advice. It does not place trades or connect to any brokerage account.
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。