INVITE-ONLY SCRIPT
MN - Auto Trendline

MN - Auto Trendline
📊 Definition
MN - Auto Trendline is a powerful multi-system technical tool designed to automatically detect and draw trendlines, support & resistance levels, and Fibonacci retracements on any chart and timeframe.
This script intelligently combines both traditional and advanced algorithms to visualize key market structures — helping traders identify breakout zones, reversal points, and trend continuations without manual line drawing.
✨ Key Features
Dual Trendline Systems – Combines both Original (swing-based) and Advanced (multi-pivot optimized) methods.
Automatic Support & Resistance Zones – Detects and marks major swing-based levels dynamically.
Fibonacci Retracement Tool – Auto-plots Fib retracements based on detected swing highs/lows.
Smart Violation Detection – Identifies when a trendline or zone is broken.
Customizable Visuals – Colors, widths, extensions, labels, and alerts are fully adjustable.
Alerts System – Optional notifications when new pivots, supports, or resistances are formed or broken.
🧭 Quick Preset Modes
Preset Description
Both Systems Enables both Original and Advanced trendline systems + S/R detection. (Default)
Original Only Uses the simple pivot-based trendline system.
Advanced Only Uses optimized multi-pivot detection for refined trendlines.
Support/Resistance Only Displays only Support and Resistance zones.
All Off Turns off all systems for a clean chart reset.
⚙️ User Toggles Explained
🎛️ Main Toggles
Original Trendlines – Enables the base trendline system using pivot highs/lows.
Advanced Trendlines – Enables smart multi-pivot trend detection.
Support & Resistance – Enables automatic S/R zone plotting.
📏 Fibonacci Retracements
Enable Fib Retracements – Turns on automatic Fibonacci plotting based on major swing points.
Labels show key retracement percentages (23.6%, 38.2%, 50%, 61.8%, etc.).
🔹 Pivot Points
Pivot Length – Controls how far the script looks for pivot confirmation.
Mark Pivots – Displays small triangles at detected high/low pivots.
Alerts Enabled – Sends alerts for new pivot formation.
📈 Original Trend Lines
Points to Check – Number of pivots to analyze for trendline creation.
Maximum Violation – Number of candle violations allowed before a trendline is marked as invalid.
Excepted Last Bars – Excludes recent bars from validation (useful for live markets).
Show Violated Lines – Optionally display broken trendlines in a faded style.
Line Extension – Extends trendlines (Right, Left, Both, or None).
Show Labels – Adds trendline price labels.
🎯 Advanced Trendlines
Pivot Length – Defines the pivot calculation depth for advanced detection.
Max Pivots to Keep – Limits the number of historical pivots considered.
Show Pivot Points – Optionally visualize each pivot used for advanced line generation.
Line Width / Extension Bars – Adjust trendline style and how far it extends into the future.
🛡️ Support & Resistance
Enabled – Activates support/resistance zones.
Points to Check – Determines how many pivot levels to use.
Maximum Violation Allowed – Number of candles that can break a level before it’s removed.
Excepted Last Bars – Skips very recent data to avoid premature zone formation.
Show Labels – Displays support/resistance labels with price levels.
Alerts Enabled – Sends alerts when price breaks above resistance or below support.
🎨 Visual Style
High Color / Low Color – Custom color scheme for resistances, supports, and trendlines.
Line Width – Controls the overall visual thickness of lines.
📢 Alerts
The script supports multiple alert types:
New Pivot Detected
Trendline Violated
Support Broken
Resistance Broken
💡 Tips
Works best on 15m–1D timeframes for swing and positional trading.
Combine with RSI, volume, or price action for confirmation.
For intraday traders, reduce Pivot Length and Points to Check for faster updates.
📚 Credits
Developed by Muralitharan_n
License: Mozilla Public License 2.0
📊 Definition
MN - Auto Trendline is a powerful multi-system technical tool designed to automatically detect and draw trendlines, support & resistance levels, and Fibonacci retracements on any chart and timeframe.
This script intelligently combines both traditional and advanced algorithms to visualize key market structures — helping traders identify breakout zones, reversal points, and trend continuations without manual line drawing.
✨ Key Features
Dual Trendline Systems – Combines both Original (swing-based) and Advanced (multi-pivot optimized) methods.
Automatic Support & Resistance Zones – Detects and marks major swing-based levels dynamically.
Fibonacci Retracement Tool – Auto-plots Fib retracements based on detected swing highs/lows.
Smart Violation Detection – Identifies when a trendline or zone is broken.
Customizable Visuals – Colors, widths, extensions, labels, and alerts are fully adjustable.
Alerts System – Optional notifications when new pivots, supports, or resistances are formed or broken.
🧭 Quick Preset Modes
Preset Description
Both Systems Enables both Original and Advanced trendline systems + S/R detection. (Default)
Original Only Uses the simple pivot-based trendline system.
Advanced Only Uses optimized multi-pivot detection for refined trendlines.
Support/Resistance Only Displays only Support and Resistance zones.
All Off Turns off all systems for a clean chart reset.
⚙️ User Toggles Explained
🎛️ Main Toggles
Original Trendlines – Enables the base trendline system using pivot highs/lows.
Advanced Trendlines – Enables smart multi-pivot trend detection.
Support & Resistance – Enables automatic S/R zone plotting.
📏 Fibonacci Retracements
Enable Fib Retracements – Turns on automatic Fibonacci plotting based on major swing points.
Labels show key retracement percentages (23.6%, 38.2%, 50%, 61.8%, etc.).
🔹 Pivot Points
Pivot Length – Controls how far the script looks for pivot confirmation.
Mark Pivots – Displays small triangles at detected high/low pivots.
Alerts Enabled – Sends alerts for new pivot formation.
📈 Original Trend Lines
Points to Check – Number of pivots to analyze for trendline creation.
Maximum Violation – Number of candle violations allowed before a trendline is marked as invalid.
Excepted Last Bars – Excludes recent bars from validation (useful for live markets).
Show Violated Lines – Optionally display broken trendlines in a faded style.
Line Extension – Extends trendlines (Right, Left, Both, or None).
Show Labels – Adds trendline price labels.
🎯 Advanced Trendlines
Pivot Length – Defines the pivot calculation depth for advanced detection.
Max Pivots to Keep – Limits the number of historical pivots considered.
Show Pivot Points – Optionally visualize each pivot used for advanced line generation.
Line Width / Extension Bars – Adjust trendline style and how far it extends into the future.
🛡️ Support & Resistance
Enabled – Activates support/resistance zones.
Points to Check – Determines how many pivot levels to use.
Maximum Violation Allowed – Number of candles that can break a level before it’s removed.
Excepted Last Bars – Skips very recent data to avoid premature zone formation.
Show Labels – Displays support/resistance labels with price levels.
Alerts Enabled – Sends alerts when price breaks above resistance or below support.
🎨 Visual Style
High Color / Low Color – Custom color scheme for resistances, supports, and trendlines.
Line Width – Controls the overall visual thickness of lines.
📢 Alerts
The script supports multiple alert types:
New Pivot Detected
Trendline Violated
Support Broken
Resistance Broken
💡 Tips
Works best on 15m–1D timeframes for swing and positional trading.
Combine with RSI, volume, or price action for confirmation.
For intraday traders, reduce Pivot Length and Points to Check for faster updates.
📚 Credits
Developed by Muralitharan_n
License: Mozilla Public License 2.0
仅限邀请脚本
只有经作者批准的用户才能访问此脚本。您需要申请并获得使用权限。该权限通常在付款后授予。如需了解更多详情,请按照以下作者的说明操作,或直接联系Muralitharan_n。
除非您完全信任其作者并了解脚本的工作原理,否則TradingView不建议您付费或使用脚本。您还可以在我们的社区脚本中找到免费的开源替代方案。
作者的说明
telegram me @murlee666
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
仅限邀请脚本
只有经作者批准的用户才能访问此脚本。您需要申请并获得使用权限。该权限通常在付款后授予。如需了解更多详情,请按照以下作者的说明操作,或直接联系Muralitharan_n。
除非您完全信任其作者并了解脚本的工作原理,否則TradingView不建议您付费或使用脚本。您还可以在我们的社区脚本中找到免费的开源替代方案。
作者的说明
telegram me @murlee666
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。