Modify AFL Trendline Code

Job ID: 39545093

Budget: ₹750 – ₹1,250 INR

I need help modifying my AFL code for trendlines. Currently, trendlines are generated based on the last two HHV(C, nbar) points and extended. I want a new trendline to start only after the previous one has ended, not overlapping.

Requirements:
- The criterion for a trendline to end is a specific number of bars (10 bars).
- There should be a gap of a few bars before the new trendline starts.

Ideal Skills and Experience:
- Proficiency in AFL (Amibroker Formula Language)
- Experience with trendline programming
- Ability to implement custom conditions based on user requirements
Related categories: Freelancer API Pine Script