Overlap Studies

Moving Average (Configurable Type) (MA)

Moving average

Deep Dive

Everything You Need to Know

Under the Hood

How It Works

MA is a universal moving average function that can calculate different MA types through the ma_type parameter: 0=SMA, 1=EMA, 2=WMA, 3=DEMA, 4=TEMA, 5=TRIMA, 6=KAMA, 7=MAMA, 8=T3. This versatile function allows traders to switch between moving average types without changing code, making it ideal for optimization and backtesting. The time_period parameter (default 30) controls the lookback length. MA provides a single interface for accessing all major moving average variants.

In Practice

How Traders Use It

Cryptocurrency traders use MA for flexible moving average calculations and strategy optimization. The ma_type parameter makes it easy to test different moving averages without code changes - crucial for backtesting and finding optimal MA types for specific markets. MA is particularly valuable in algorithmic trading systems where MA type is a parameter to optimize. It works well in crossover strategies (fast MA crossing slow MA), trend following systems, or combined with oscillators for signal confirmation. The universal interface makes MA ideal for programmable trading platforms.

Highlights

MA at a Glance

Universal MA function supporting 9 different types
ma_type parameter: 0=SMA, 1=EMA, 2=WMA, 3=DEMA, 4=TEMA, etc.
Single interface for all major moving average variants
Ideal for backtesting and optimization workflows
Default 30-period with SMA (ma_type=0)
Eliminates need for separate MA function calls
Essential for algorithmic and systematic trading
Best for programmable strategies with MA type parameters
Simplifies moving average strategy development

Get Started

Automate MA with cryptorobot.ai

Build automated strategies using Moving Average (Configurable Type) and hundreds of other indicators. Connect to your favourite exchange and let the bot execute trades 24/7 — no code required.