Bentrix Docs
HomePricingDashboard

Trend line

Lines2 anchorsin every package

The straight segment between two anchors, and nothing outside them.

What is stored is the two instants and the two prices, never the pixels they were clicked at, so the line stays on its bars through a timeframe change or a page of older history. The steepness on screen is not a market quantity: it changes with the zoom and with the price scale, so read the line's level against price rather than its angle.

01The tool, live

Live figureDrag anchor 1 or 2. Scroll to zoom, drag the bars to pan.

Placed and drawn by Bentrix’s own code over the same synthetic bars on every page — an illustration of the tool’s geometry, not a market.

02Its parts, named

12Anchor 2The second turnWhat it drawswhere price has already turnedtwice and how far from thatline price has run since - itAnchor 1The first turn
  1. 1Press on anchor 1
  2. 2Drag: a ghost of the whole tool follows the pointer
  3. 3Release on anchor 2
Placed by Bentrix’s own code on the sample bars. The placement plays once as you reach the figure.

03What you see

A straight segment between two points you choose, ending exactly at them. It is the simplest drawing there is, and most other line tools are a trend line with one thing added.

Drawn through two swing lows in a rise (or two swing highs in a fall). Traders read price returning to the line as a test of the direction the two lows shared, and a close beyond it as that shared direction having been broken. The readout shows the slope as an angle; the angle depends on the chart's scale, so compare slopes on the same chart only.

What it shows

It shows where price has already turned twice and how far from that line price has run since - it says nothing about a third turn.

04Where it comes from

Drawing a line under rising lows or over falling highs goes back to Charles Dow's writing on trends around 1900, and was set out as a method by Robert Edwards and John Magee in 1948. Their rule of thumb is still the common one: two turns draw a line, a third touch gives a reader a reason to take it seriously.

05How it is placed

  1. Open the chart's Tools column and choose Line tools › Trend line.
  2. Press on the first turn, drag to the second turn, and release. A ghost of the whole tool follows the pointer while you drag.
  3. With the magnet on, an anchor dropped near a candle's open, high, low or close snaps to it.

Its anchors

  1. 1The first turn
  2. 2The second turn

Put the first anchor on one turn and the second on a later one.

06The geometry

Each anchor is a moment and a price. The line between them has a slope in price per bar:

m=P2−P1b2−b1,P(b)=P1+m(b−b1)
P1,P2the two anchors' prices
b1,b2the bars they stand on
mthe slope, in price per bar

Because the anchors are stored as moments and prices, the line stays on its bars when you zoom, change the interval or load older history.

07Settings and defaults

Trend lineits properties window
Anchors2Each is a moment and a price, never a pixel: the tool stays on its bars through a zoom, another interval or older history.
Colour, width and line stylethe chart's ink, width 1Width from 1 to 5; Solid, Dash, Dot or Dash-dot.
TextnoneA name written on the tool.
Visibilityevery intervalThe intervals the tool is drawn on.
LockoffA locked tool is not moved by a drag.

08Readings — what traders look for

Touches. Traders count how many times price turned at the line. More touches over a longer span are read as a line more people are watching.

A close beyond it. A candle closing on the far side is read as the trend the line described having changed pace — many wait for the close rather than the wick.

The return. After a break, price often comes back to the line from the other side; whether it turns there again is what readers watch next.

The level, not the angle. What matters is where the line stands against price on a given bar; its steepness on screen changes with the zoom.

09What it does not tell you

!

A line through two turns is arithmetic. It does not say a third turn is coming, and it does not know why price turned at the first two.

10Limits and common misreadings

Wicks or closes. Two people drawing through wicks and through closes get two different lines from the same chart. Pick one and keep to it.

Hindsight. The two turns are only obvious after they have happened; a line drawn today is a hypothesis.

Log or linear. A straight line on a linear price scale is a curve on a logarithmic one, and the other way round.

11On other chart types

A drawing is fixed to moments and prices, so it keeps its place on every chart type. On a chart built by price or by activity — Renko, Range bars, Point & Figure, Kagi, Line break — each anchor stands on the brick, bar or column that holds its moment. No chart type refuses a drawing.

12In Bentrix

  • Where it is: the chart's Tools column › Line tools › Trend line.
  • Its properties: select the tool and open its properties window; the small bar that floats beside a selected tool has its lock.
  • Undo: Ctrl+Z takes back the last drawing step on that chart.
  • In a pane: every tool can also be placed in an indicator's own pane.

13From an agent or a program

An agent or a program places the tool with object_place: the chart, the kind trend_line, and its anchors in placement order, each a moment (t_ms, milliseconds since 1970 on the workbench's feed) and a price. Acting on a chart needs the lab permission, and tools that act are part of Plus.

{
  "name": "object_place",
  "arguments": {
    "chart": "<chart uri>",
    "kind": "trend_line",
    "anchors": [
      {
        "t_ms": 1710151200000,
        "price": 1.085
      },
      {
        "t_ms": 1710172800000,
        "price": 1.0862
      }
    ]
  }
}

object_move moves its anchors, object_change its look, object_find lists a chart's drawings and object_delete removes one. All of them are in the MCP reference, and every SDK language has the same calls.

15Sources

  1. Edwards, Robert D., and John Magee. Technical Analysis of Stock Trends. 1948; 9th ed., CRC Press, 2007.
  2. Murphy, John J. Technical Analysis of the Financial Markets. New York Institute of Finance, 1999.

Bentrix 0.1.382Every number, name and default on these pages is read from the application itself.What is comingWhat changed