OPEN-SOURCE SCRIPT

自定义均线(多色 & 分级线宽)

149
Title: Multi-Color Moving Average Suite (MA5…MA4320) — Pine v6

Summary (1–2 lines):
An overlay indicator that plots a full ladder of SMA lines from MA5 up to MA4320. Each MA has a unique color, and line width scales with period (short = thin, mid = medium, long = thick) to make trend structure easy to read at a glance.

What it does
• Plots 16 simple moving averages: 5, 10, 20, 30, 60, 120, 160, 240, 480, 720, 960, 1440, 1750, 2880, 4320.
• Distinct colors for every MA to avoid confusion when lines cluster.
• Period-based thickness:
• Short-term (<60) = thin,
• Mid-term (60–160) = medium,
• Long-term (≥240) = thick (capped; no unlimited growth).
• Designed for quick trend reading across intraday to multi-year cycles (especially useful for 24/7 markets like crypto).

How to use
1. Add the indicator to any chart (works on all symbols/timeframes).
2. Use the thin/medium/thick visual hierarchy to identify short-/mid-/long-term bias and crossovers.
3. On very low timeframes, consider hiding some ultra-long MAs if your chart has insufficient history.

Notes
• Built with Pine Script v6; uses ta.sma(close, length) only (no repainting).
• Very long MAs (e.g., 2880/4320) require enough bars; they will display na until sufficient history loads.
• No inputs/alerts by default—kept intentionally simple for clarity. (Easy to extend with toggles, custom colors, EMA/WMA options, alerts, etc.)

Credits
Author: TraderFinsher (customized multi-MA visualization with color and thickness hierarchy).



标题: 多色均线系统(MA5…MA4320)— Pine v6

摘要(1–2 句):
这是一个叠加在价格上的 SMA 均线组,从 MA5 到 MA4320。为每条均线设置了 独立颜色,并按 周期长度分级线宽(短=细、中=中等、长=较粗),让趋势结构一眼可读。

功能说明
• 绘制 16 条简单移动平均线:5、10、20、30、60、120、160、240、480、720、960、1440、1750、2880、4320。
• 全部不同颜色,避免密集时混淆。
• 线宽随周期分级:
• 短期(<60)= 细,
• 中期(60–160)= 中等,
• 长期(≥240)= 粗(封顶,不再无限加粗)。
• 适合从日内到多年周期的 趋势快速判读(对加密等 24/7 市场尤为友好)。

使用建议
1. 将指标添加到任意品种/周期。
2. 结合细/中/粗的视觉层级,判断短/中/长趋势与均线交叉。
3. 在较低周期下,如果历史数据不足,可隐藏部分超长均线。

注意事项
• 使用 Pine v6,仅调用 ta.sma(close, length),不重绘。
• 超长均线需要足够历史数据,未满足前会显示 na。
• 默认不含参数和告警,追求简洁清晰(后续可扩展开关、自定义颜色/线宽、EMA/WMA 选项与告警等)。

致谢
作者:TraderFinsher(基于颜色与线宽层级的多均线可视化)。

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.