OPEN-SOURCE SCRIPT

X Trade Plan

62
lets you define up to 10 fully manual price levels and ranges—each with its own toggle, two prices (for a band/box), an optional note, and a color. The tool draws lines that start at the first bar of a chosen anchor timeframe (e.g., Daily) and extend to the right, mirroring the “fresh start-of-session” look. If two prices are entered, the area between them is shaded using the same color at 60% transparency, so the line and box fill are visually consistent.

Key Features

10 explicit categories (Cat 1 … Cat 10)
Each category includes:

Enable/disable toggle

Price 1 (line) and Price 2 (optional, defines box top/bottom)

Note (optional): label shows note only; hidden automatically if blank

Color: used for the line, box border, and box fill (with 60% transparency)

Anchor-aware drawing
Lines and boxes begin at the new bar of your selected Anchor Timeframe (e.g., D/W/H4), producing clean, session-style extensions.

Clean visuals

Line width is standardized at 1 for a crisp, unobtrusive look

Labels are aligned to the right of current bars and inherit user label styling options (size, text color, background)

No historical dependence
The indicator does not compute or display historical pivots, opens, or derived levels. Everything is user-defined.

Inputs (Per Category)

Cat N (toggle): Show/hide the category

Price 1: Primary level; a horizontal line is drawn when set

Price 2 (optional): When set with Price 1, a box is drawn between the two values

Note (optional): Free-text label; shown only if non-empty

Color: Applies to line, box border, and box fill (fill uses 60% transparency)

Global Inputs

Anchor Timeframe: Timeframe whose new bar defines the start (anchor) of all lines/boxes

Extend Right (bars): Number of bars to extend into the future

Labels (on/off) and label style options (size, text color, background)

How It Works

On the first bar and on each new bar of the anchor timeframe, the indicator captures the current bar index as the anchor for each category.

For each enabled category:

If Price 1 is set, the script draws a horizontal line from the anchor to extend_len bars into the future.

If Price 2 is also set, a box spanning Price 1 ↔ Price 2 is drawn from the anchor to the same future point.

If a Note is provided, a right-side label is rendered at the level (or box midpoint). If the note is empty, no label is shown.

Visual objects are refreshed every bar to ensure alignment with current settings.

Common Use Cases

Scenario planning & playbooks: Define “watch zones” (e.g., Look Above & Fail) and keep them consistent across sessions.

Manual S/R & liquidity areas: Mark hand-picked levels/ranges you care about, without auto-calculated clutter.

Session-like anchoring: Start-of-day/week anchoring to mimic institutional levels that reset each period.

Trade management: Color-coded bands for entries, invalidation, and targets with clear notes

כתב ויתור

המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.