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.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.