Indicators

Moving Average Indicators

Adaptive Moving Average (AMA)

// Meaning

A smart average that speeds up on straight roads and slows in bumps; it adapts smoothing using the Efficiency Ratio: ER = |C−C_N| / Σ|ΔC| to vary the EMA factor α. ER sits in [0,1]: higher ER → faster response, lower ER → heavier smoothing. Useful to keep lag low in trends and avoid overreacting in chop (you can bound α with fast/slow limits).

// Usage Notes

A higher adaptivity makes it react fast (more signals, more whipsaws). Use as a trend line or in crossovers.

// Examples

Buy AMA(20) crosses above AMA(50) · Sell AMA(20) crosses below AMA(50).

// How it operates

Close vs AMA(N) or AMA(short) vs AMA(long); is above/below (filter), crosses (trigger).

Double Exponential Moving Average (DEMA)

// Meaning

A quicker EMA that cuts lag by canceling delay: DEMA = 2·EMA(N) − EMA(EMA(N)). Reacts early to turns but is more sensitive to noise; lengthen N or confirm with a slower baseline to reduce whipsaws.

// Usage Notes

Great for earlier signals, but can whipsaw in ranges. Shorter lengths = faster, noisier.

// Examples

Buy DEMA(20) crosses above DEMA(50) · Sell DEMA(20) crosses below DEMA(50).

// How it operates

Price/DEMA cross, or DEMA(short) vs DEMA(long).

Exponential Moving Average (EMA)

// Meaning

An average that weights recent prices more; recursive smoothing with α = 2/(N+1) gives quicker reaction than SMA. Great as a regime line (e.g., EMA(200)) or for fast/slow cross pairs.

// Usage Notes

Short EMAs react quickly (more noise), long EMAs smooth more (slower to flip).

// Examples

Buy EMA(12) crosses above EMA(26) · Sell EMA(12) crosses below EMA(26).

// How it operates

EMA(12) vs EMA(26); Close vs EMA(50/200).

Hull Moving Average (HMA)

// Meaning

Fast and smooth. Turns early with low wiggle: HMA(N)=WMA(2·WMA(N/2)−WMA(N), √N). Combines WMAs to reduce lag while keeping a smooth curve; good for quick trend shifts.

// Usage Notes

Excellent responsiveness; can still whipsaw in sideways markets.

// Examples

Buy Close crosses above HMA(55) · Sell Close crosses below HMA(55).

// How it operates

Close vs HMA; crosses/filters.

Linear Regression (LR)

// Meaning

A straight best-fit line through recent prices (OLS over N bars); the slope indicates drift (up/down), while the line itself acts like a dynamic mean. You can threshold slope magnitude to avoid tiny, noisy tilts.

// Usage Notes

Longer windows show big trends but miss quick turns; shorter windows react fast but add noise.

// Examples

Buy Close crosses above LinReg(100) · Sell Close crosses below LinReg(100).

// How it operates

Close vs LR(N); optional slope > 0 as filter.

Wilder’s Moving Average (RMA)

// Meaning

A calm, steady average that avoids flip-flops; EMA variant with α=1/N (Wilder smoothing, used in RSI). Changes slower than EMA, making it a stable baseline for oscillators and trailing filters.

// Usage Notes

Good as a baseline/trend filter; slower to change state.

// Examples

Buy RMA(20) crosses above RMA(50) · Sell RMA(20) crosses below RMA(50).

// How it operates

Price/RMA; RMA(short) vs RMA(long).