OPEN-SOURCE SCRIPT

Trendline X-RAY

354
ảnh chụp nhanh

TRENDLINE X-RAY — Multi-Timeframe Wedges & Channels

Most automatic trendline indicators answer a limited question:

“Which two pivots can be connected?”

TRENDLINE X-RAY asks a much more useful question:

"Which multi-timeframe structures are sufficiently well supported to deserve attention?”

Rather than placing arbitrary lines between isolated highs and lows, TRENDLINE X-RAY analyzes wedge and channel geometry across four structural timeframes simultaneously. It evaluates competing structures, scores their quality, and projects the strongest qualifying boundaries onto one chart.

The result is a systematic top-down view of the market’s structural landscape—without repeatedly switching between charts or manually drawing dozens of trendlines.

Why this is more powerful than random trendlines

Almost any two pivots can produce a trendline. That does not make the line meaningful.

A randomly selected trendline may:

  • Depend on one convenient pair of pivots
  • Ignore violations between its anchors
  • Represent only one side of the market
  • Lack balanced support from the opposite boundary
  • Be too narrow, too old, or structurally immature
  • Look convincing only because it was drawn after the move occurred


TRENDLINE X-RAY is designed to reduce that subjectivity.

Instead of treating every possible line equally, its structure engine evaluates complete bilateral formations. Upper and lower boundaries are considered together as a wedge or channel, then measured using several structural criteria:

  • Boundary touches
  • Touch spacing
  • Balance between upper and lower validation
  • Price violations
  • Structural span
  • Width relative to volatility
  • Anchor recency
  • Valid convergence and boundary ordering


The indicator compares eligible structures and displays the strongest qualifying geometry for each active timeframe.

This does not mean every projected boundary will hold. It means the displayed lines have passed a consistent structural evaluation instead of being selected arbitrarily.

Multi-timeframe structure on one chart

Markets rarely respond to only one timeframe.

A 5-minute chart may appear to be approaching resistance while the 1-hour chart is near support. A minor intraday breakout may be heading directly into a major 4-hour boundary. Two different timeframes may also identify nearly the same structural area, creating potential confluence.

TRENDLINE X-RAY makes those relationships visible by projecting four independently calculated timeframe structures onto the active chart.

Each slot has its own:

Timeframe
Color
Line width
Line style
Visibility control
Structure-quality reading


This allows traders to distinguish immediate price structure from the larger geometry surrounding it.

Purpose-built analysis modes

TRENDLINE X-RAY includes several top-down presets:

Swing
  • Weekly
  • Daily
  • 4-hour
  • 1-hour


Intraday
  • 4-hour
  • 1-hour
  • 30-minute
  • 15-minute


Day Trade
  • 1-hour
  • 30-minute
  • 15-minute
  • 5-minute


Scalp
  • 30-minute
  • 15-minute
  • 5-minute
  • 1-minute


Custom

Four independently selectable timeframes

Changing modes automatically updates the structural hierarchy. Individual slots can still be hidden when a cleaner chart is preferred.

The Structure Quality dashboard

The dashboard provides a compact summary of the active analysis:

  • Timeframe
  • Structure Quality
  • Structure Type
  • Selected Mode


Structure Quality measures how well the detected formation satisfies the indicator’s structural criteria. It is based on characteristics such as touch validation, balance, violations, span, width, and recency.

A higher score represents stronger structural validation within the model.

It is important to understand what the score does—and does not—mean:

It measures the quality of the detected geometry. It is not directional, and it is not a predicted win rate.

The dashboard can be positioned in nine locations:

  • Top left, center, or right
  • Middle left, center, or right
  • Bottom left, center, or right


Designed as a companion to Automatic Wedge & Channel Detector

TRENDLINE X-RAY was designed to work alongside my "Automatic Wedge & Channel Detector (AWCD)".

The two indicators serve related but different purposes.

Automatic Wedge & Channel Detector answers:

What is the primary wedge or channel governing the chart I am currently trading?

AWCD is the focused execution-chart tool. It identifies the active formation, highlights its boundaries, and helps distinguish actionable edges from the gray middle of the structure.

TRENDLINE X-RAY answers:

What important structures exist above and around my current chart timeframe?

TRENDLINE X-RAY is the top-down context tool. It projects multiple structural layers onto one chart so traders can see whether an AWCD boundary is isolated, supported by a higher-timeframe structure, or approaching conflicting geometry.

Together, they create a structure-first workflow:

  1. TRENDLINE X-RAY identifies the larger structural landscape.
  2. AWCD defines the active execution structure.
  3. Multi-timeframe confluence highlights potentially important locations.
  4. Price action determines whether the boundary holds, breaks, or accepts beyond it.


For example, a lower AWCD boundary becomes more noteworthy when it overlaps a rising 1-hour or 4-hour TRENDLINE X-RAY boundary. Likewise, an AWCD breakout deserves additional caution when it runs directly into higher-timeframe resistance.

TRENDLINE X-RAY is therefore not intended to replace AWCD. It expands AWCD’s structural context.

Practical applications

TRENDLINE X-RAY can be used to:

  • Conduct top-down analysis without changing charts
  • Identify higher-timeframe support and resistance
  • Find multi-timeframe boundary confluence
  • Recognize when price is trapped between conflicting structures
  • Avoid entries in structurally poor locations
  • Evaluate breakout destination and obstruction risk
  • Compare short-term setups with larger market geometry
  • Add structural context to opening-range breakouts
  • Separate execution structure from higher-timeframe context


The indicator is especially useful when asking:

  • Is price at the edge or in the middle of meaningful structure?
  • Does a lower-timeframe boundary agree with the higher timeframe?
  • Is this breakout moving into open space or another major line?
  • Which structural layer is most likely to matter next?
  • Is the current formation well validated or relatively weak?


Recommended workflow

TRENDLINE X-RAY is best used as a location and context tool—not as a standalone entry generator.

A practical process is:

  1. Select the mode that matches the intended holding period.
  2. Identify the nearest higher-timeframe boundaries.
  3. Look for agreement between multiple structural layers.
  4. Use AWCD to evaluate the active execution structure.
  5. Wait for price to demonstrate rejection, acceptance, breakout, or retest behavior.
  6. Manage risk independently using predefined invalidation levels.


The strongest use case is not simply:

“Price touched a line.”

It is:

“Price reached a systematically validated structural area, multiple timeframes agree, and price action confirmed the reaction.”


Important limitations

TRENDLINE X-RAY is an analytical tool, not a predictive system.

  • Trendlines and structural classifications can change as new pivots form.
  • A high-quality structure can still break.
  • Lower-timeframe formations are generally more sensitive to market noise.
  • Different timeframes may produce conflicting information.
  • Projected lines should not be interpreted as guaranteed reversal levels.
  • Quality scores do not represent probabilities or historical win rates.
  • The indicator does not replace risk management or independent analysis.


All calculations are based on historical price structure. Use the indicator to organize market geometry, identify potentially meaningful locations, and improve contextual awareness—not to assume certainty.

TRENDLINE X-RAY transforms trendline analysis from a collection of arbitrary lines into a structured, multi-timeframe decision framework.

AWCD shows the structure you are trading.
TRENDLINE X-RAY shows the structural world surrounding it.

Thông báo miễn trừ trách nhiệm

Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.