How only with mouse to plot a line like trendline - to make in the AFL?

To be able to:

  1. click the left mouse button on the chart and hold the left mouse button and draw a line
  2. grab the ends and stretch
  3. grab and move

@kealogin it's all described in the User Guide


I know that.
The question was how to do the same, but with the AFL?
I need to program, build and use other forms of trend (exponential, logarithmic and others) just like this linear trend.