Skip to content
StatePath
Tool Atlasobject.trend_line

Tool

Trend Line Object

object.trend_line

OutputSink

Inputs

point_aBundle (untagged)

First anchor Point.

point_bBundle (untagged)

Second anchor Point.

Outputs

Bundle (untagged)

A chart-object sink — it draws on the terminal chart and outputs nothing. Nothing can be wired from it.

Trend Line Object connects two anchor points with a trend, cycle, or arrowed line — or draws a fixed-angle line from one anchor.

Trend Line Object overview diagram

How it works

Wire two Point streams into 'point_a' and 'point_b' (trend_by_angle needs only 'point_a' plus the angle knob). The line redraws as the anchors confirm. On MetaTrader 4 the arrowed line renders as a trend line plus an arrow head, and only the right ray exists — a requested left ray is dropped with a one-time journal note.

Modes

Mode options

Trend Linetrend

A straight line between the two anchors, with optional rays.

Trend Line diagram
Trend by Angletrend_by_angle

A line from the first anchor at a fixed angle in degrees.

Trend by Angle diagram
Cycle Linescycles

Repeating vertical lines spaced by the two anchors' interval.

Cycle Lines diagram
Arrowed Linearrowed_line

A line with an arrow head at the second anchor (MetaTrader 4 composes it from a trend line plus an arrow).

Arrowed Line diagram

Placement options

Stampedstamped

One object per confirmed anchor, oldest removed beyond the cap.

Stamped diagram
Singlesingle

One object that follows the latest confirmed anchor.

Single diagram

Line style options

Solidsolid

An unbroken line.

Solid diagram
Dasheddash

A dashed line. Width above 1 forces solid — a platform rule.

Dashed diagram
Dotteddot

A dotted line. Width above 1 forces solid — a platform rule.

Dotted diagram
Dash-dotdashdot

Alternating dashes and dots. Width above 1 forces solid.

Dash-dot diagram
Dash-dot-dotdashdotdot

A dash followed by two dots. Width above 1 forces solid.

Dash-dot-dot diagram

Configuration

modeenum

Line family: trend (2 anchors + rays), trend_by_angle (1 anchor + angle), cycles (2 anchors, repeating verticals), arrowed_line (2 anchors with an arrow head at the end).

Choices:trendtrend_by_anglecyclesarrowed_line
placementenum

How the object tracks the anchor stream: 'stamped' leaves one object per triggering bar (capped by max_objects); 'single' keeps one object moved in place.

Choices:stampedsingle
max_objectsscalar

Stamped-placement cap: the oldest object is removed once more than this many are on the chart (FIFO).

colorscalar

Object color (#rrggbb).

widthscalar

Line / border / glyph width in pixels.

line_styleenum

Line pattern for line-drawing styles. The platforms force solid when width is above 1.

Choices:soliddashdotdashdotdashdotdot
ray_leftscalar

Extend the line left beyond the first anchor (MetaTrader 4 has no left ray — dropped there with a one-time journal note).

ray_rightscalar

Extend the line right beyond the second anchor.

anglescalar

Line angle in degrees for trend_by_angle.

Connects to

Reads from

See also