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