Indicator · Pine Script v6 · Own pane

I_ma

by GammaExpansion

This indicator calculates and plots a wide selection of moving averages across multiple lookback lengths, including simple, exponential, running, weighted, volume-weighted, Hull, Arnaud Legoux, and linear regression curves.

View on GitHub

GitHub stars1on the repository
Pine versionv6current
Lines of code37
Settings1inputs
LicenceMIT
Last update5 days ago23 Oct 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

Source Code

37 lines of Pine Script v6 from packages/golden/fixtures/indicator/v6/I_ma/source.pine, published under MIT. Keep the author's credit and licence lines when you reuse it.

source.pine
//@version=6
indicator("I_ma")
src = input.source(hl2, "src")
plot(bar_index, "bar_index")
plot(ta.sma(close, 9), "sma9")
plot(ta.sma(close, 21), "sma21")
plot(ta.sma(close, 1), "sma1")
plot(ta.sma(close, 200), "sma200")
plot(ta.ema(close, 9), "ema9")
plot(ta.ema(close, 21), "ema21")
plot(ta.ema(close, 1), "ema1")
plot(ta.ema(close, 200), "ema200")
plot(ta.rma(close, 9), "rma9")
plot(ta.rma(close, 21), "rma21")
plot(ta.wma(close, 9), "wma9")
plot(ta.wma(close, 21), "wma21")
plot(ta.vwma(close, 9), "vwma9")
plot(ta.vwma(close, 21), "vwma21")
plot(ta.vwma(hlc3, 9), "vwma9_hlc3")
plot(ta.swma(close), "swma")
plot(ta.hma(close, 9), "hma9")
plot(ta.hma(close, 21), "hma21")
plot(ta.alma(close, 9, 0.85, 6), "alma9")
plot(ta.alma(close, 21, 0.85, 6), "alma21")
plot(ta.alma(close, 21, 0.85, 6, true), "alma21_floor")
plot(ta.linreg(close, 9, 0), "linreg9")
plot(ta.linreg(close, 21, 0), "linreg21")
plot(ta.linreg(close, 21, 1), "linreg21_off1")
plot(ta.ema(src, 21), "ema21_src")
plot(ta.sma(src, 21), "sma21_src")
plot(ta.ema(hl2, 21), "ema21_hl2")
plot(ta.ema(close[1], 9), "ema9_close1")
plot(ta.sma(volume, 9), "sma9_volume")
plot(ta.ema(ta.ema(close, 9), 9), "ema9_of_ema9")
plot(ta.sma(ta.sma(close, 9), 9), "sma9_of_sma9")
plot(ta.rma(ta.rma(close, 9), 9), "rma9_of_rma9")
plot(ta.wma(ta.ema(close, 9), 9), "wma9_of_ema9")

Overview

I_ma also computes chained and volume-based moving averages, alongside the current bar index. An input parameter allows the user to select an alternative price source for dedicated calculations. The script renders all output series in a separate indicator pane rather than overlaying the price chart, functioning without directional trade signals or alerts.

Details

Published by

GammaExpansion on GitHub

Type

Indicator, Pine Script v6

Draws

Separate pane below the chart

Category

Moving averages, Trend

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
srcsourcehl2src
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

Beep Boop

by magic8bot
409 stars

This indicator calculates a modified MACD oscillator and signal line alongside a trend EMA filter, plotting the output as a stylized column histogram in a separate pane. Instead of plotting true MACD distance, it quantifies positive and negative histogram mome

Indicator v4 Oscillators & momentumTrend
Updated 3 years ago · MIT GitHub repository of Beep Boop
218 stars

Multi-Timeframe Analysis Suite calculates trend direction and momentum conditions across five user-selected timeframes using moving averages, RSI, and Stochastic oscillators. It evaluates moving average slope and oscillator levels to compute trend alignment, m

Indicator v6 Screeners & dashboardsTrend
Updated 3 months ago · None stated GitHub repository of Multi-Timeframe Analysis Suite

KamaFama

by Mastaaa1987
141 stars

KamaFama is an indicator that translates a Freqtrade trading strategy into Pine Script for visualization. It combines Kaufman Adaptive Moving Average (KAMA), MAMA/FAMA calculations derived via Hilbert Transform, Williams %R, and correlation trend filters to ev

Indicator v6 Moving averagesOscillators & momentum
Updated 6 weeks ago · MIT GitHub repository of KamaFama

MultiIndicator

by capissimo
114 stars

MultiIndicator combines multiple technical indicators into a single separate pane to save chart space. It calculates and displays market regime detection based on ordinary least squares regression, a Holt exponential smoothing crossover, normalized RSI, ADX, a

Indicator v4 Oscillators & momentumTrend
Updated 1 year ago · None stated GitHub repository of MultiIndicator
99 stars

Calculates the Archer Moving Averages Trends (AMAT) indicator by comparing fast and slow Exponential Moving Averages (EMAs) alongside their slope directions. A bullish trend (+1) is identified when the fast EMA exceeds the slow EMA with both rising, while a be

Indicator v6 TrendMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Archer Moving Averages Trends (AMAT)

Colored fill

by be-thomas
65 stars

This indicator plots two simple moving averages of close, one over five bars and one over twenty bars, in a separate pane. It shades the area between the two plots green when the shorter average is above the longer average and red when it is below. There are n

Indicator v4 Moving averagesTrend
Updated 4 days ago · GPL-3.0 GitHub repository of Colored fill

More indicators

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers