Skip to main content

Pulse Mean Accelerator (PMA)

Warmup Window

Minimum bars needed: max(ma_length, accel_lookback) bars (default params: 32 bars (ma_length=20, accel_lookback=32))

Both the base moving average (ma_length) and the acceleration lookback need to fill before the first PMA value is valid. After warmup, the indicator updates in real-time.

After the warmup window is filled, this indicator produces a new value on every incoming bar in real-time.

Lagging Indicator

The PMA line and trend signals lag behind price reversals.

EventLagDetail
MA base line reacts to price reversalma_length / 2 barsRMA has effective lag ≈ ma_length/2
PMA line changes directionma_length / 2 to accel_lookback / 2 barsAcceleration lookback modulates the offset, adding a variable lag component
Trend flips bullish ↔ bearishma_length / 2 to accel_lookback / 2 barsTrend derived from PMA slope vs MA

Formula for custom params: lag ≈ ma_length / 2 (+ accel influence)

The Pulse Mean Accelerator is a trend-following overlay indicator translated from the Pine Script® by MisinkoMaster. It adds a volatility- and momentum-scaled acceleration offset to a base moving average. The acceleration accumulates over a configurable lookback: bars where source momentum exceeds MA momentum push the PMA further from the MA, while bars where the MA leads source momentum pull it back. Multiple MA types (RMA, SMA, EMA, WMA, DEMA, TEMA, HMA), volatility measures (ATR, Standard Deviation, MAD), and smoothing modes are supported.

Parameters:

ParameterTypeDefaultDescription
source_columnstr"Close"Source price column
ma_typestr"RMA"MA type: RMA, SMA, EMA, WMA, DEMA, TEMA, HMA
ma_lengthint20Lookback for the base moving average
accel_lookbackint32Bars over which acceleration is accumulated
max_accelfloat0.2Maximum absolute acceleration factor
volatility_typestr"Standard Deviation"Volatility: ATR, Standard Deviation, MAD
smooth_typestr"Double Moving Average"Smoothing: NONE, Exponential, Extra Moving Average, Double Moving Average
use_confirmationboolTrueRequire combined PMA+MA momentum to confirm trend flips

Output columns: pma, pma_ma, pma_trend, pma_long, pma_short, pma_acceleration

import pandas as pd
from pyindicators import (
pulse_mean_accelerator,
pulse_mean_accelerator_signal,
get_pulse_mean_accelerator_stats,
)

# --- With pandas ---
df = pd.read_csv("data.csv")
df = pulse_mean_accelerator(
df,
ma_type="RMA",
ma_length=20,
accel_lookback=32,
max_accel=0.2,
volatility_type="Standard Deviation",
smooth_type="Double Moving Average",
use_confirmation=True,
)
df = pulse_mean_accelerator_signal(df)
stats = get_pulse_mean_accelerator_stats(df)
print(stats)
df[["Close", "pma", "pma_ma", "pma_trend", "pma_long", "pma_short"]].tail(10)

PULSE_MEAN_ACCELERATOR

Chart Parameters

The image above uses the following parameters:

ParameterValue
ma_typeRMA
ma_length20
accel_lookback32
max_accel0.2
volatility_typeStandard Deviation
smooth_typeDouble Moving Average
use_confirmationTrue