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提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。