OPEN-SOURCE SCRIPT

Trend and Trendline Detector

603
Pine Script®
Trend and Trendline Detector

Pine Script®
Overview

The Trend and Trendline Detector indicator provides both major and minor trend analysis using Simple Moving Averages (SMA) and automatically plots dynamic support and resistance trendlines based on pivot highs and lows.

Pine Script®
Key Features


  • Major Trend Detection: Uses a configurable SMA to determine primary market direction.
  • Minor Trend Visualization: Optional minor SMA with color-coded line segments to mark smaller trend fluctuations.
  • Dynamic Pivot Trendlines: Automatically detects pivot highs/lows and draws major (solid) and minor (dashed) trendlines, with user-controlled extension modes.
  • Customizable Inputs: User can adjust SMA lengths, pivot look back/look forward periods, line extend mode, and toggle features on/off.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.