OPEN-SOURCE SCRIPT

Moving Average Index

737
Moving Average Index is an overlay indicator that manages up to ten moving averages at once and highlights their relationship to each other, rather than just displaying them side by side. It's built for anyone who wants to track several moving averages at the same time without the chart turning into a tangle of lines — for example to compare short- and long-term trends, or to keep multiple timeframes in view at once, and see at a glance how these averages relate to one another.

Each moving average can independently be calculated as SMA, EMA, WMA, VWMA, HMA, or RMA — standard formulas from TradingView's own library, with no custom modification.

**Moving Average** (present ten times, MA 1–MA 10, each instance identically structured)

- Length: number of bars the average is calculated over.
- Type: calculation method: SMA, EMA, WMA, VWMA, HMA, or RMA.
- Source: the price or value the calculation is based on (e.g. close).
- Timeframe: a separate timeframe for this average; left empty, it uses the chart's timeframe. On a higher timeframe, the value updates within that timeframe's still-forming bar and can shift slightly until that bar closes.
- Line style: Line, Stepline, or Circles.
- Line width: thickness of the plotted line.
- Color: color of the line.

ảnh chụp nhanh

**Fill** (present three times, Fill 1–Fill 3, each instance identically structured)

- Connect: the two moving averages the area is drawn between.
- Bull / Bear: two colors: one for when the first selected average is above the second, the other for the opposite case.

ảnh chụp nhanh

Each enabled moving average is plotted as its own line, in the chosen style, width, and color. Up to three areas can also be shown between any two of these averages: their color switches automatically whenever the order of the two connected averages changes — one color while the first one is above, the other once it drops below. Once such an area is active, the indicator hides the two lines it connects; only the colored area remains visible, making trend changes stand out more clearly than with two crossing lines.

ảnh chụp nhanh
ảnh chụp nhanh

This indicator is intended solely for market analysis and does not constitute investment advice or a guarantee of success. Use it at your own discretion and risk; past results are not indicative of future performance.

Thông báo miễn trừ trách nhiệm

Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.