OPEN-SOURCE SCRIPT
Trend and Trendline Detector

Trend and Trendline Detector
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.
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.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.