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.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.