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)).
⚠️ Note: Unlike trendLine or extendedLine, this one doesn’t use a separate text label — the angle itself is automatically shown.
Return Value
string — The
idof the angle drawing.
Example
Result

Tips
Use
trendAngleto compare how steep current moves are versus past moves.A gentle angle often means consolidation; a steep angle often means acceleration.
Warning
If you give invalid points (like missing
timeorprice), the angle won’t be drawn.Because the angle depends on chart scaling (time vs. price), different zoom levels can make angles look steeper or flatter.
Last updated