Technical Indicators
Comprehensive reference for all technical indicators used in the strategy library. Each indicator includes calculation methods, interpretation, and typical parameter values.
Moving Averages
Simple Moving Average (SMA)
Formula: SMA = (P₁ + P₂ + ... + Pₙ) / n
Description: Arithmetic mean of prices over n periods. Equal weight to all prices.
Common Periods: 20, 50, 100, 200 days
Use Cases: Trend identification, support/resistance levels
Exponential Moving Average (EMA)
Formula: EMA = Price × (2/(n+1)) + EMA_prev × (1 - 2/(n+1))
Description: Weighted average giving more importance to recent prices.
Common Periods: 12, 26, 50, 200 days
Advantages: More responsive to recent price changes than SMA
Weighted Moving Average (WMA)
Formula: WMA = (P₁×n + P₂×(n-1) + ... + Pₙ×1) / (n×(n+1)/2)
Description: Linear weighting with most recent price having highest weight.
Use Cases: When recent price action is more important
Momentum Indicators
Relative Strength Index (RSI)
Formula: RSI = 100 - (100 / (1 + RS)), where RS = Avg Gain / Avg Loss
Range: 0 to 100
Standard Period: 14 days
Interpretation:
- RSI > 70: Overbought condition
- RSI < 30: Oversold condition
- RSI = 50: Neutral
Divergence: Price makes new high/low but RSI doesn't = potential reversal
MACD (Moving Average Convergence Divergence)
Components:
- MACD Line = EMA(12) - EMA(26)
- Signal Line = EMA(9) of MACD Line
- Histogram = MACD Line - Signal Line
Signals:
- Bullish: MACD crosses above Signal
- Bearish: MACD crosses below Signal
- Histogram expanding = strengthening trend
Stochastic Oscillator
Formula:
- %K = 100 × (Close - Low₁₄) / (High₁₄ - Low₁₄)
- %D = SMA(3) of %K
Range: 0 to 100
Interpretation:
- > 80: Overbought
- < 20: Oversold
- %K crosses %D = signal
Volatility Indicators
Bollinger Bands
Components:
- Middle Band = SMA(20)
- Upper Band = SMA(20) + 2 × StdDev
- Lower Band = SMA(20) - 2 × StdDev
Interpretation:
- Price at upper band = overbought
- Price at lower band = oversold
- Band squeeze = low volatility, potential breakout
- Band expansion = high volatility
Average True Range (ATR)
Formula: ATR = EMA(14) of True Range
True Range: Max of:
- High - Low
- |High - Previous Close|
- |Low - Previous Close|
Use Cases:
- Position sizing
- Stop loss placement
- Volatility measurement
Trend Indicators
Average Directional Index (ADX)
Components:
- +DI: Positive Directional Indicator
- -DI: Negative Directional Indicator
- ADX: Average of DX over 14 periods
Interpretation:
- ADX < 20: Weak trend
- ADX 20-25: Emerging trend
- ADX 25-50: Strong trend
- ADX > 50: Very strong trend
Direction: +DI > -DI = uptrend, -DI > +DI = downtrend
Parabolic SAR
Description: Stop and Reverse indicator showing potential reversal points
Visual: Dots above/below price
Interpretation:
- Dots below price = uptrend
- Dots above price = downtrend
- Dot flip = potential reversal
Parameters: Acceleration Factor (0.02), Maximum (0.20)
Volume Indicators
On-Balance Volume (OBV)
Formula:
- If Close > Previous Close: OBV = OBV_prev + Volume
- If Close < Previous Close: OBV = OBV_prev - Volume
- If Close = Previous Close: OBV = OBV_prev
Interpretation: Rising OBV = buying pressure, Falling OBV = selling pressure
Money Flow Index (MFI)
Description: Volume-weighted RSI
Range: 0 to 100
Interpretation:
- MFI > 80: Overbought
- MFI < 20: Oversold
- Divergence signals potential reversal