Trend Lines v2
Published on MillionChart by PriceMaster.
This script draws automatic trend lines from pivot points and shows which ones are still valid or have been broken.
How it works:
- On each bar it finds the last 10 higher and lower pivot points.
- For each pivot point it searches for a possible trend line, starting from the most recent pivot.
- It checks whether the line can be drawn and whether it has been broken. Broken lines can optionally be shown as dotted.
- Once it finds a continuous trend line it stops searching further, which keeps the script fast enough to run within time limits.
- The process repeats for each pivot point.
Options:
- Trend lines can be solid or dashed.
- You can hide broken trend lines if the chart looks crowded.
- If no trend line appears, adjust the pivot point period.
Tips:
- After adding the tool you may need to zoom in and out once to see all the lines.