trendAngle

Draws a line between two points and shows the angle of that line relative to the chart. Traders often use this to measure the steepness of price trends (for example, “Is this move at a 30° angle or more?”).

Syntax

trendAngle(fromPoint, toPoint, styles?)

Parameters

  • fromPoint: The starting point of the line (newPoint(time, price)).

  • toPoint: The ending point of the line (newPoint(time, price)).

  • styles (optional) Style options for the angle line:

    • linecolor: line color (e.g. color.blue)

    • linewidth: thickness

    • linestyle: solid/dashed/dotted

    • textcolor: the color of the angle text

⚠️ Note: Unlike trendLine or extendedLine, this one doesn’t use a separate text label — the angle itself is automatically shown.

Return Value

  • string — The id of the angle drawing.

Example

Result

Tips

  • Use trendAngle to compare how steep current moves are versus past moves.

  • A gentle angle often means consolidation; a steep angle often means acceleration.

Warning

Good Practice

Last updated