Auto Trendline Exploration coding help

I have Auto Trend Line AFL and want to add Scan / Exploration features on it.
Bcoz lack of AFL Coding Knowledge, Need some help with you to AFL (Scan/Explore) Modification.

I always obliged to you…
Thank and Regards