When creating, modifying and moving a trend line, two anchor points will be selected: high / low, open / close, median or weighted from the candlestick prices.
For high / low, open / close, if the anchor point is above the candlestick, the upper price will be taken, below the candlestick - the lower one. If the point is inside the candlestick, then if the first point is higher than the second, then the first one goes up, the second goes down. Conversely, if the second is higher than the first.
For the median or weighted, the position of the point above the candles, below the candles, or inside the candlestick does not matter.
There is a setting for displaying the slope angles of the line.

