Technical Indicators¶
This document describes the technical indicators and candlestick patterns supported by the Redhound technical analyst.
Core Indicators (pandas-ta)¶
The technical analyst uses the pandas-ta library to calculate standard technical indicators.
Trend Indicators¶
- SMA (Simple Moving Average): Tracks average price over a specific period (default: 50, 200).
- EMA (Exponential Moving Average): Tracks average price with more weight on recent data (default: 10, 20, 50).
- MACD (Moving Average Convergence Divergence): Momentum indicator showing the relationship between two moving averages.
Momentum Indicators¶
- RSI (Relative Strength Index): Measures the speed and change of price movements (0-100).
- Stochastic Oscillator: Compares a closing price to a range of its prices over a period.
- Williams %R: Momentum indicator that measures overbought and oversold levels.
Volatility Indicators¶
- Bollinger Bands: Measures market volatility using standard deviations.
- ATR (Average True Range): Measures market volatility based on the range of price movement.
Volume Indicators¶
- VWMA (Volume Weighted Moving Average): Moving average that weights prices by volume.
- Volume SMA: Simple moving average of trading volume.
Candlestick Pattern Recognition (TA-Lib)¶
Redhound supports automated candlestick pattern detection using the industry-standard TA-Lib library.
Supported Patterns¶
By default, Redhound scans for the following patterns:
| Pattern Code | Human Name | Signal Type | Interpretation |
|---|---|---|---|
CDLDOJI |
Doji | Indecision | Suggests market uncertainty or potential reversal. |
CDLHAMMER |
Hammer | Bullish Reversal | Bullish signal at the bottom of a trend. |
CDLENGULFING |
Engulfing | Reversal | Powerful signal where one candle completely covers the previous one. |
CDLHARAMI |
Harami | Reversal | Suggests a pause or change in the current trend. |
CDLMORNINGSTAR |
Morning Star | Bullish Reversal | Three-candle bullish reversal pattern. |
CDLEVENINGSTAR |
Evening Star | Bearish Reversal | Three-candle bearish reversal pattern. |
CDLSHOOTINGSTAR |
Shooting Star | Bearish Reversal | Bearish signal often found at trend peaks. |
CDLTHREEWHITESOLDIERS |
Three White Soldiers | Bullish Continuation | Strong bullish momentum signal. |
CDLTHREEBLACKCROWS |
Three Black Crows | Bearish Continuation | Strong bearish momentum signal. |
CDLSPINNINGTOP |
Spinning Top | Indecision | Small real body suggests indecision. |
CDLHANGINGMAN |
Hanging Man | Bearish Reversal | Potential bearish reversal at a peak. |
CDLINVERTEDHAMMER |
Inverted Hammer | Bullish Reversal | Potential bullish reversal at a bottom. |
Configuration¶
You can customize which patterns are detected and the sensitivity of the detection in your .env file:
# Enable/Disable patterns
REDHOUND_TA_PATTERNS_ENABLED=true
# Custom pattern list
REDHOUND_TA_PATTERNS_LIST=CDLDOJI,CDLHAMMER,CDLENGULFING
# Minimum pattern strength (-100 to 100)
# 100 = definitely bullish, -100 = definitely bearish
REDHOUND_TA_PATTERN_MIN_STRENGTH=0
# Reporting lookback (days)
REDHOUND_TA_PATTERN_LOOKBACK=5
# Enable pattern result caching for performance
REDHOUND_TA_PATTERNS_CACHE=true
Important: NaN Handling¶
TA-Lib propagates NaN (Not-a-Number) values differently than pandas. If your OHLC data contains any NaN values, TA-Lib will propagate them through the entire output array:
# Example of TA-Lib's NaN propagation behavior
>>> import numpy as np
>>> import talib
>>> c = np.array([1.0, 2.0, 3.0, np.nan, 4.0, 5.0, 6.0])
>>> talib.SMA(c, 3)
array([nan, nan, 2., nan, nan, nan, nan]) # NaN propagates to end
Redhound automatically handles this by: 1. Detecting NaN values in OHLC data before pattern detection 2. Removing rows with NaN values 3. Ensuring sufficient clean data remains (minimum 10 rows) 4. Providing clear error messages if data quality is insufficient
Pattern Strength Values:
- +100: Strong bullish pattern
- -100: Strong bearish pattern
- 0: No pattern detected
Version Compatibility¶
Redhound requires TA-Lib 0.6.4 or higher. The system will automatically check your TA-Lib version on startup and warn if you're using an older version.
To check your TA-Lib version:
For more details on configuration, see the Configuration Reference.