# hft.md/indicators: every trading indicator, ready for an AI > 236 trading indicators with their standard settings, a one-line definition, the usual rule and when each one misleads. Names, settings and definitions come from the open-source TA-Lib library 0.8.4; the plain-English lines are from hft.md. Checked 6 December 2026. Page: https://hft.md/indicators/ ## How to use this file When a person asks for an indicator report, follow the three steps in the example prompt below: get real prices (with code first, then by reading the price page with a web tool, and only then by asking for a file), calculate with code (never from memory), and return the report in the fixed order A to F. Never invent a price. Never place an order. ## Example prompt (RSI on NVDA, daily) Give me an indicator report on Nvidia (NVDA) (US stocks & ETFs), using daily candles. Write in simple English that a beginner can follow. STEP 1. GET REAL PRICES Work down this list. Do not stop to ask me anything until you reach the last step. A. With code: download at least 300 daily candles (open, high, low, close, volume) for NVDA. Source: Yahoo Finance (in Python, the yfinance package). B. If your code cannot reach that source or cannot install the package, do not ask me to change a setting. Open the first of these pages that loads with your web browsing tool and read the price table: https://finance.yahoo.com/quote/NVDA/history/?period1=START&period2=END https://stockanalysis.com/stocks/nvda/history/ Rows are newest first: date, open, high, low, close, adjusted close, volume. Skip dividend and split rows. Copy every price row into your code as data. C. If that fails too, search the web for another daily price table for NVDA and read it. D. Only when all of these have failed: tell me in one line what was blocked and ask me to upload a CSV of prices. - Never invent, estimate or remember a price. - The newest candle must be from the latest trading day. If it is older, that source is stale: try the next one. - With fewer than 100 candles, carry on and say the readings are approximate. STEP 2. CALCULATE WITH CODE, NOT IN YOUR HEAD - If you can install Python packages, run: pip install -U TA-Lib (the current version installs without compiling). Then use the calls below. They give the standard result. - If the install fails, or your TA-Lib is old and lacks a function, do not stop: write the calculation yourself from the definition given. 1. RSI Call: talib.RSI(close, timeperiod=14) Definition: Wilder's Relative Strength Index, a momentum oscillator bounded 0-100 from the ratio of average gains to average losses over the period. Usual reading: Below 30 = oversold. Above 70 = overbought. It misleads when: In a strong trend it stays overbought or oversold for a long time. Ignore the first 50 values: it needs warm-up. STEP 3. THE REPORT, IN THIS ORDER A. Snapshot: asset, symbol, source, timeframe, number of candles, date and time of the last candle, last close. B. Readings: the latest value and what it means in one plain sentence. C. Signal: Bullish, Bearish or Neutral, by its usual reading above. D. Chart: price with the indicator drawn on it or under it. Save it as an image if you can. E. What could make this wrong: two or three points for this asset right now. F. A one-line summary a beginner can understand. RULES - This is for study. It is not financial advice. - Do not place orders or connect to a broker. - If any step fails, say so plainly instead of guessing. In the Yahoo Finance link, START and END are Unix times in seconds: END is now, START is 370 days earlier (1,830 days for weekly candles, with &frequency=1wk added). For crypto the page is https://data-api.binance.vision/api/v3/klines?symbol=BTCUSDT&interval=1d&limit=300 (intervals 15m, 1h, 4h, 1d, 1w). ## Where real prices come from - US stocks & ETFs: Yahoo Finance (in Python, the yfinance package). - Crypto: an exchange's public candles (in Python, the ccxt package: try Binance, then Kraken or Coinbase if it is blocked). Backup: Yahoo Finance (BTC-USD style tickers). - Forex & gold: Yahoo Finance, with EURUSD=X style tickers and GC=F for gold (in Python, the yfinance package). - Futures & commodities: Yahoo Finance continuous contracts, with ES=F, CL=F and GC=F style tickers (in Python, the yfinance package). - Other markets: Yahoo Finance for stocks, indexes, currencies and futures (in Python, the yfinance package; many exchanges use a ticker suffix there, such as .L for London, .T for Tokyo or .HK for Hong Kong). For a coin, an exchange's public candles (the ccxt package). Name the source in the report. ## The indicators ### Quant: What do the statistics say? - Autocorrelation of returns: Does today's return predict tomorrow's? Definition: Correlation between one-bar returns and the same returns shifted by one bar (lag 1), over a rolling 60-bar window. Usual reading: Positive = momentum. Negative = snap-back. Misleads when: It changes with market mood, and small values are usually noise. Needs: closing prices. - Half-life of mean reversion: How fast a price or spread returns to its average. Definition: Regress the change of the series on its previous level over the window: delta_y(t) = a + lambda * y(t-1). Half-life = -ln(2) / lambda, valid only when lambda is negative; otherwise report "not mean-reverting". Usual reading: Set the holding period near the half-life. Misleads when: It is meaningless if the series is trending. Needs: closing prices. - Hurst exponent: Does the series trend or snap back? Below 0.5 = snaps back, about 0.5 = random, above 0.5 = trends. Definition: Estimate H by rescaled-range (R/S) analysis on log returns over at least 100 bars: for several window sizes n compute the average R/S, then H is the slope of log(R/S) against log(n). State the window sizes used. Usual reading: Pick trend tools or snap-back tools by the reading. Misleads when: Short or noisy samples give unstable values. Needs: closing prices. - Kalman filter trend: An adaptive trend line that updates its estimate with every new price. Definition: One-dimensional Kalman filter on the close. Each bar: P = P + Q; K = P / (P + R); x = x + K * (close - x); P = (1 - K) * P. Start x at the first close and P at 1. Use R = variance of the last 20 closes and Q = R / 1000, and state the settings used. Usual reading: Trade the slope of the filtered line. Misleads when: Bad noise settings make it too slow or too jumpy. Needs: closing prices. - Rolling beta (BETA): How much the asset moves when the market moves. Call: talib.BETA(asset_close, index_close, timeperiod=5) Definition: The slope of a least-squares linear regression of one series' percentage returns (y, from the second series) against another's (x, from the first series) over a rolling window. Measures how much a security moves relative to a market index. Beta = 1 moves with the index; < 1 less volatile, > 1 more volatile. Usual reading: Hedge beta times your position with the index. Misleads when: Beta changes when correlations change. Needs: two price series. - Rolling Sharpe ratio (SHARPE): Return per unit of risk, measured live. Call: talib.SHARPE(close, timeperiod=20, riskfreerate=0, annualization=252) Definition: The rolling Sharpe ratio: the mean return in excess of a risk-free rate, divided by the standard deviation of that excess return, over a trailing window. Usual reading: A falling Sharpe = the edge is fading, so cut size. Misleads when: Short windows are noisy. Needs: closing prices. - Z-score: How many standard deviations price is from its average. Definition: z = (close - SMA(close, 20)) / standard deviation(close, 20). Usual reading: Beyond +2 or -2: fade it in ranges, ride it in trends. Misleads when: A change of market mood moves the average itself. Needs: closing prices. - Average deviation (AVGDEV): The average distance of prices from their own average. Call: talib.AVGDEV(close, timeperiod=14) Definition: Rolling average absolute deviation of a series from its own simple moving average over the last N periods. Measures dispersion around the window mean. Usual reading: Like standard deviation, but less sensitive to spikes. Misleads when: No direction. Needs: closing prices. - Percent rank (PERCENTRANK): Where today's value ranks against the recent past, 0 to 100. Call: talib.PERCENTRANK(close, timeperiod=100) Definition: Where the current value sits inside the distribution of the values that came before it, as a percentage. Usual reading: Above 90 or below 10 = an unusual reading. Misleads when: It depends heavily on the window you choose. Needs: closing prices. - Rolling correlation (CORREL): How closely two assets move together, from -1 to +1. Call: talib.CORREL(asset_close, index_close, timeperiod=30) Definition: Pearson's correlation coefficient (r) between two input series over a rolling window of N bars. Usual reading: Low or negative correlation = real diversification. Misleads when: Correlations jump toward 1 in a crisis. Needs: two price series. - Rolling kurtosis (KURTOSIS): How often extreme moves happen compared with normal. Call: talib.KURTOSIS(close, timeperiod=30) Definition: An estimate, from the trailing window, of the excess kurtosis of the distribution its values come from: the fourth standardised moment minus 3, so a normal distribution reads 0. Usual reading: High = fat tails, so size smaller. Misleads when: One outlier dominates it. Needs: closing prices. - Rolling median and percentile (MEDIAN): The middle (or any percentile) of the last N values. It ignores outliers. Call: talib.MEDIAN(close, timeperiod=30) Definition: The middle order statistic of the trailing window: the central value when N is odd, the mean of the two central values when it is even. Usual reading: Use it as a sturdier average or band. Misleads when: Slow to react. Needs: closing prices. Variants: Percentile (nearest rank) = talib.PERCENTILE(close, timeperiod=100, percentile=50) - Rolling skew (SKEW): Whether the big moves have been mostly up or mostly down. Call: talib.SKEW(close, timeperiod=30) Definition: An estimate, from the trailing window, of the skewness of the distribution its values come from: the third standardised moment. Usual reading: Negative skew = sudden drops are the danger. Misleads when: It needs a long window. Needs: closing prices. - Rolling Sortino ratio (SORTINO): Like Sharpe, but only downside swings count as risk. Call: talib.SORTINO(close, timeperiod=20, mar=0, annualization=252) Definition: The rolling Sortino ratio: the mean return in excess of a minimum acceptable return (MAR), divided by the downside deviation, over a trailing window, scaled to a year. It is the Sharpe ratio with upside volatility taken out of the denominator: only returns below the MAR count as risk. Usual reading: Higher = better return for the downside taken. Misleads when: Short windows are noisy. Needs: closing prices. ### Trend: Is there a trend, and how strong? - MACD: The gap between a fast and a slow average, plus a signal line. It shows if momentum is building or fading. Call: talib.MACD(close, fastperiod=12, slowperiod=26, signalperiod=9) Definition: The difference between a fast and a slow EMA of the input, plus an EMA-smoothed signal line and their histogram. Usual reading: MACD crossing above its signal line = bullish. A cross above zero confirms it. Misleads when: It is late at turning points and messy in flat markets. Needs: closing prices. Variants: MACD with controllable MA type = talib.MACDEXT(close, fastperiod=12, fastmatype=0, slowperiod=26, slowmatype=0, signalperiod=9, signalmatype=0); Moving Average Convergence/Divergence Fix 12/26 = talib.MACDFIX(close, signalperiod=9) - SuperTrend (SUPERTREND): One line that trails price by a multiple of its typical move and flips when price closes through it. Call: talib.SUPERTREND(high, low, close, timeperiod=10, multiplier=3) Definition: An ATR-scaled trailing band that follows price on one side at a time and flips to the other side when the close breaks through it. Usual reading: Close above the line = uptrend. Close below = downtrend. Misleads when: Choppy markets produce many false flips. Needs: full candles. - ADX (trend strength): How strong the trend is, from 0 to 100. It does not say which way. Call: talib.ADX(high, low, close, timeperiod=14) Definition: Wilder's Average Directional Movement Index, a smoothed measure of trend strength derived from the directional indicators (+DI/-DI). Usual reading: Above 25 = trending. Below 20 = no trend. Misleads when: It rises late and says nothing about direction. Needs: full candles. Variants: Average Directional Movement Index Rating = talib.ADXR(high, low, close, timeperiod=14) - Ichimoku cloud (ICHIMOKU): Four lines that show trend, support and momentum in one picture. Call: talib.ICHIMOKU(high, low, tenkanperiod=9, kijunperiod=26, senkoubperiod=52) Definition: Ichimoku Kinko Hyo, "one glance equilibrium chart": four lines built from highs and lows alone. Usual reading: Price above the cloud with the fast line above the slow line = bullish. Misleads when: Ranges and very short timeframes give messy signals. Needs: full candles. - Parabolic SAR: Dots that trail price and speed up as the trend runs. A ready-made trailing stop. Call: talib.SAR(high, low, acceleration=0.02, maximum=0.2) Definition: Wilder's Parabolic SAR (Stop And Reverse): a trailing stop/reverse level that accelerates toward price via an acceleration factor. Usual reading: Price crossing the dots = the trend has flipped. Misleads when: In sideways markets it flips constantly. Needs: full candles. Variants: Parabolic SAR - Extended = talib.SAREXT(high, low, startvalue=0, offsetonreverse=0, accelerationinitlong=0.02, accelerationlong=0.02, accelerationmaxlong=0.2, accelerationinitshort=0.02, accelerationshort=0.02, accelerationmaxshort=0.2) - Aroon (AROON): How recently the highest high and lowest low were made, as two 0 to 100 lines. Call: talib.AROON(high, low, timeperiod=14) Definition: Aroon reports how recently the highest high and lowest low occurred within a rolling window of length N, as two 0-100 oscillators. Usual reading: Aroon Up above 70 with Aroon Down below 30 = uptrend. Misleads when: In sideways markets the two lines keep crossing. Needs: full candles. Variants: Aroon Oscillator = talib.AROONOSC(high, low, timeperiod=14) - Choppiness index (CHOP): Is the market trending or chopping sideways? 0 to 100. Call: talib.CHOP(high, low, close, timeperiod=14) Definition: A trend-versus-consolidation gauge, the true range travelled over a window against the height of the box its bars span. Usual reading: Above 61.8 = choppy. Below 38.2 = trending. Misleads when: It does not tell you the direction. Needs: full candles. Variants: Choppiness Index (True Range Box) = talib.CHOPTR(high, low, close, timeperiod=14) - Directional lines (+DI and -DI) (PLUS_DI): Two lines that show whether up-moves or down-moves are winning. Call: talib.PLUS_DI(high, low, close, timeperiod=14) Definition: The Wilder-smoothed positive directional movement expressed as a percentage of the true range. Usual reading: +DI above -DI = buyers in control. The reverse = sellers in control. Misleads when: The lines cross often in ranges. Needs: full candles. Variants: Minus Directional Indicator = talib.MINUS_DI(high, low, close, timeperiod=14); Directional Movement Index = talib.DX(high, low, close, timeperiod=14); Plus Directional Movement = talib.PLUS_DM(high, low, timeperiod=14); Minus Directional Movement = talib.MINUS_DM(high, low, timeperiod=14) - Efficiency ratio (Kaufman) (ER): How straight the move was: 1 = a straight line, 0 = pure noise. Call: talib.ER(close, timeperiod=10) Definition: Kaufman Efficiency Ratio (also searched as "KER"): Perry Kaufman's noise measure from *Smarter Trading* (1995) — the net directional movement over the period divided by the total path travelled to get there. 1.0 is a perfectly efficient (straight-line) move; values near 0 are churn. Usual reading: High = use trend tools. Low = use range tools. Misleads when: Gaps distort it. Needs: closing prices. - Linear regression (line, slope, forecast) (LINEARREG): The best-fit straight line through recent prices: its level, its slope and its next-bar forecast. Call: talib.LINEARREG(close, timeperiod=14) Definition: Least-squares straight-line fit over the last N bars, reported as the fitted line value at the window endpoint (b + m*N-1). Usual reading: Slope above zero and rising = uptrend. Misleads when: Spikes and gaps bend the line. Needs: closing prices. Variants: Linear Regression Slope = talib.LINEARREG_SLOPE(close, timeperiod=14); Linear Regression Angle = talib.LINEARREG_ANGLE(close, timeperiod=14); Linear Regression Intercept = talib.LINEARREG_INTERCEPT(close, timeperiod=14); Time Series Forecast = talib.TSF(close, timeperiod=14) - Vortex (VORTEX): Two lines comparing upward and downward movement. Call: talib.VORTEX(high, low, close, timeperiod=14) Definition: Etienne Botes and Douglas Siepman's two-line trend indicator (Technical Analysis of Stocks & Commodities 28:1, January 2010). Usual reading: VI+ crossing above VI- = uptrend starting. Misleads when: Ranges cause repeated crosses. Needs: full candles. - Correlation trend indicator (CTI): How closely recent prices follow a straight rising line, from -1 to +1. Call: talib.CTI(close, timeperiod=20) Definition: John F. Ehlers' Correlation Trend Indicator: the Pearson correlation of the last N closes against a straight line of positive slope. Usual reading: Near +1 = clean uptrend. Near -1 = clean downtrend. Misleads when: Short windows flip quickly. Needs: closing prices. - Gator oscillator (GATOR): Bars showing how far apart the Alligator lines are. Call: talib.GATOR(high, low, jawperiod=13, jawshift=8, teethperiod=8, teethshift=5, lipsperiod=5, lipsshift=3) Definition: Bill Williams' Gator Oscillator: how far apart the three Alligator lines are, as two histograms. Usual reading: Growing bars = trend waking up. Shrinking bars = trend tiring. Misleads when: Same delay as the Alligator. Needs: full candles. - MACD-V (MACDV): MACD divided by the market's typical move, so readings can be compared across assets. Call: talib.MACDV(high, low, close, fastperiod=12, slowperiod=26, signalperiod=9) Definition: MACD-V, Alex Spiroglou's volatility-normalised MACD: the spread of a fast and a slow EMA of the close over the Average True Range, times 100. Usual reading: Above +50 = strong up momentum, below -50 = strong down. Beyond +150 or -150 = stretched. Misleads when: Same delay as MACD. Needs: full candles. - Trend or cycle mode (Hilbert) (HT_TRENDMODE): A switch: 1 when the market is trending, 0 when it is swinging in a range. Call: talib.HT_TRENDMODE(close) Definition: Hilbert Transform classifier that labels each bar 1 (trending — favor trend-following) or 0 (cycling — favor mean-reversion). Usual reading: 1 = use trend tools. 0 = use range tools. Misleads when: It switches late. Needs: closing prices. Needs the TA-Lib library. - Vertical horizontal filter (VHF): Trend versus range: the distance covered against the path travelled. Call: talib.VHF(close, timeperiod=28) Definition: Adam White's trend-versus-range filter, the range a window covered divided by the path it actually travelled. Bounded in [0,1]. Usual reading: Rising = trend strengthening. Falling = range. Misleads when: No direction, and it is late. Needs: closing prices. - Williams Alligator (ALLIGATOR): Three smoothed averages called jaw, teeth and lips. When they spread apart, a trend is running. Call: talib.ALLIGATOR(high, low, jawperiod=13, jawshift=8, teethperiod=8, teethshift=5, lipsperiod=5, lipsshift=3) Definition: Bill Williams' Alligator (Trading Chaos, 1995): three smoothed moving averages of the median price. Usual reading: Lines fanned out in order = trend. Lines tangled = stay out. Misleads when: It is slow, so much of the move is gone by the time it signals. Needs: full candles. ### Moving averages: Which way is it heading? - Simple moving average (SMA): The plain average of the last N closes. It smooths the noise so you can see the direction. Call: talib.SMA(close, timeperiod=30) Definition: The unweighted arithmetic mean of the last N input values. Used to smooth a series. Usual reading: Price above the line = uptrend. A 50-bar line crossing above a 200-bar line = trend turning up. Misleads when: In sideways markets price crosses it again and again (whipsaws). Needs: closing prices. - Exponential moving average (EMA): An average that gives recent prices more weight, so it turns sooner than the simple one. Call: talib.EMA(close, timeperiod=30) Definition: Exponential moving average that weights recent prices more heavily via a recursive smoothing factor. Usual reading: A fast EMA crossing above a slow EMA (9 over 21, for example) = momentum turning up. Misleads when: In choppy markets it flips even more often than the simple average. Needs: closing prices. - Double EMA (DEMA): An EMA with part of its delay removed, so it follows price more closely. Call: talib.DEMA(close, timeperiod=30) Definition: An EMA combined with an EMA-of-EMA to reduce lag versus a plain EMA. Overlap Studies overlay on price. Usual reading: Price or a faster line crossing it = change of direction. Misleads when: It overreacts in ranges. Needs: closing prices. - Hull moving average (HMA): A fast, smooth average with very little delay. Call: talib.HMA(close, timeperiod=20) Definition: Hull Moving Average, published by Alan Hull in 2005: a moving average built to track price with far less lag than an SMA, WMA or EMA of the same length while staying smooth. Usual reading: Slope turning up = lean long. Slope turning down = lean short. Misleads when: It overshoots in noisy markets. Needs: closing prices. - Kaufman adaptive average (KAMA): An average that speeds up in clean trends and goes almost flat in noise. Call: talib.KAMA(close, timeperiod=30) Definition: An EMA whose smoothing factor adapts each bar to an efficiency ratio (directional move vs. total volatility). Usual reading: Trade in the direction KAMA is moving. Flat KAMA = stay out. Misleads when: Sudden reversals catch it late. Needs: closing prices. - Triple EMA (TEMA): An EMA with even more delay removed than DEMA. Very quick to turn. Call: talib.TEMA(close, timeperiod=30) Definition: A smoothed price overlay built from three successively-applied EMAs to reduce lag versus a plain EMA. Usual reading: Same reading as DEMA, only faster. Misleads when: Very twitchy when the market is noisy. Needs: closing prices. - Volume-weighted moving average (VWMA): The average price of the last N bars, where heavy-volume bars count more. Call: talib.VWMA(close, volume, timeperiod=30) Definition: The mean price over a trailing window of N bars, each bar weighted by its own volume. Usual reading: VWMA above the simple average = volume is backing the move. Misleads when: Thin or unreliable volume makes it meaningless. Needs: candles with volume. - Weighted moving average (WMA): An average where the newest price counts most and the oldest counts least. Call: talib.WMA(close, timeperiod=30) Definition: Linearly weighted moving average: each of the last N prices is weighted by its position, oldest getting weight 1 and newest weight N. Usual reading: Read it like the simple average; it just reacts faster. Misleads when: Sideways ranges give false crosses. Needs: closing prices. - Arnaud Legoux average (ALMA): A smooth average with bell-shaped weights shifted toward the recent bars. Call: talib.ALMA(close, timeperiod=9, sigma=6, offset=0.85) Definition: The last N inputs weighted by a Gaussian whose peak sits a fraction offset of the way from the oldest to the newest bar. Usual reading: Slope and crosses, as with any average. Misleads when: Its settings change its behaviour a lot, so compare like with like. Needs: closing prices. - Ehlers SuperSmoother (SSF): A filter that removes very short-term noise with less delay than an EMA. Call: talib.SSF(close, timeperiod=10) Definition: John Ehlers' SuperSmoother: a two-pole low-pass smoother with a zero at Nyquist, which he recommends for use instead of an EMA and builds most of his later indicators on. Read it as a smoothed price line with less lag than an EMA of comparable smoothness. Usual reading: Use it as a cleaner version of price to feed other indicators. Misleads when: It is a filter, not a signal by itself. Needs: closing prices. - Fractal adaptive average (FRAMA): An average that speeds up when price moves cleanly and slows when price is jagged. Call: talib.FRAMA(high, low, timeperiod=16) Definition: Fractal Adaptive Moving Average (John Ehlers): an EMA whose smoothing factor adapts each bar to the fractal dimension of the window, estimated from the high-low ranges of the window and of its two halves. Usual reading: Trade in its direction. A flat line = no trend. Misleads when: Fast changes of market mood confuse it. Needs: full candles. - Instantaneous trendline (Hilbert) (HT_TRENDLINE): A trend line whose length adapts to the market's current rhythm. Call: talib.HT_TRENDLINE(close) Definition: Ehlers' Hilbert Transform Instantaneous Trendline: a smoothed, low-lag overlay whose averaging window adapts to the dominant cycle period measured via Hilbert-transform quadrature (I/Q) analysis of price. Usual reading: Price above the line = up phase. Misleads when: Weak when the market has no clear rhythm. Needs: closing prices. Needs the TA-Lib library. - McGinley Dynamic (MCGD): An average that adjusts its own speed to how fast the market is moving. Call: talib.MCGD(close, timeperiod=14) Definition: McGinley Dynamic (John R. McGinley, Jr.): a moving average whose speed adjusts to the market. Usual reading: Price above = uptrend, below = downtrend. Misleads when: Like every average, it is no help in a tight range. Needs: closing prices. - MESA adaptive average (MAMA and FAMA): Two adaptive lines, fast MAMA and slow FAMA, that follow the market's own rhythm. Call: talib.MAMA(close, fastlimit=0.5, slowlimit=0.05) Definition: An adaptive EMA whose smoothing factor is driven by the dominant-cycle phase rate measured with a Hilbert transform. Usual reading: MAMA crossing above FAMA = uptrend starting. Misleads when: Weak when the market has no clear rhythm. Needs: closing prices. Needs the TA-Lib library. - Moving average, any type (MA): One call that produces any of the standard averages (simple, exponential, weighted and more). Call: talib.MA(close, timeperiod=30, matype=0) Definition: Generic moving-average dispatcher that forwards the job to the MA implementation selected by the chosen average type. Usual reading: Same reading as the average you choose. Misleads when: Same weaknesses as the average you choose. Needs: closing prices. Variants: Moving average with variable period = talib.MAVP(close, periods, minperiod=2, maxperiod=30, matype=0) - T3 moving average: A very smooth, low-delay average built from six EMAs. Call: talib.T3(close, timeperiod=5, vfactor=0.7) Definition: Tillson's T3: a low-lag moving average built from six chained EMAs, combined via volume-factor-weighted coefficients. Usual reading: Slope and price crosses, as with any average. Misleads when: Its smoothness hides sharp reversals for a few bars. Needs: closing prices. - Triangular moving average (TRIMA): A double-smoothed average that weights the middle of the window most. Very smooth and slow. Call: talib.TRIMA(close, timeperiod=30) Definition: A double-smoothed moving average that weights prices toward the middle of the window most heavily. Usual reading: Use it to see the broad direction, not for timing. Misleads when: It reacts late to turns. Needs: closing prices. - VIDYA (variable dynamic average): An EMA that speeds up when momentum is strong and slows when it is weak. Call: talib.VIDYA(close, timeperiod=12, cmoperiod=9) Definition: Variable Index Dynamic Average (Tushar Chande): an EMA whose smoothing factor is scaled every bar by the absolute value of the Chande Momentum Oscillator. Usual reading: The direction of the line = the direction of the trend. Misleads when: It stalls in quiet markets and is late on the first move out. Needs: closing prices. - Wilder's smoothed average (RMA): The slow, steady average used inside RSI and ATR. Call: talib.RMA(close, timeperiod=30) Definition: An exponential average whose smoothing factor is the reciprocal of the period rather than the 2/(n+1) of a classic EMA, seeded with a simple average of the first window. J. Welles Wilder Jr. Usual reading: Use it as a slow trend line. Misleads when: It is slow, so turns show up late. Needs: closing prices. - Zero-lag EMA (ZLEMA): An EMA fed with a price that is pushed forward to cancel its own delay. Call: talib.ZLEMA(close, timeperiod=30) Definition: An EMA applied not to price but to a de-lagged series that extrapolates price forward by the EMA's own lag, cancelling that lag to first order. Usual reading: Read it like an EMA that turns earlier. Misleads when: It overshoots after sharp spikes. Needs: closing prices. ### Momentum: How fast is it moving, and is it stretched? - RSI: How fast price has been rising versus falling, on a 0 to 100 scale. Call: talib.RSI(close, timeperiod=14) Definition: Wilder's Relative Strength Index, a momentum oscillator bounded 0-100 from the ratio of average gains to average losses over the period. Usual reading: Below 30 = oversold. Above 70 = overbought. Misleads when: In a strong trend it stays overbought or oversold for a long time. Needs: closing prices. - Stochastic (STOCH): Where the close sits inside the recent high-low range, 0 to 100. Call: talib.STOCH(high, low, close, fastk_period=5, slowk_period=3, slowk_matype=0, slowd_period=3, slowd_matype=0) Definition: Slow Stochastic oscillator: locates the close within the high-low range over a lookback period, then double-smooths it. Usual reading: %K crossing above %D below 20 = buy signal. Crossing down above 80 = sell signal. Misleads when: Trends pin it at one end. Needs: full candles. Variants: Stochastic Fast = talib.STOCHF(high, low, close, fastk_period=5, fastd_period=3, fastd_matype=0) - Awesome oscillator (AO): Short-term versus long-term momentum of the bar's midpoint. Call: talib.AO(high, low, fastperiod=5, slowperiod=34) Definition: Bill Williams' Awesome Oscillator (*New Trading Dimensions*, 1998): market momentum read as the spread between a short and a long simple moving average of the median price. Usual reading: Crossing above zero = bullish. Misleads when: Ranges cause repeated zero crosses. Needs: full candles. - CCI: How far price is from its average, measured in its usual deviation. Call: talib.CCI(high, low, close, timeperiod=14) Definition: Measures the current typical price relative to its simple moving average, scaled by mean absolute deviation. Usual reading: Above +100 = strong up. Below -100 = strong down. Misleads when: Quiet markets give tiny, meaningless swings. Needs: full candles. - Momentum (MOM): Price now minus price N bars ago. Call: talib.MOM(close, timeperiod=10) Definition: Current price minus the price N bars ago. The absolute (unnormalized) rate of change. Usual reading: Above zero = upward momentum. Misleads when: It cannot be compared between assets with different prices. Needs: closing prices. - Rate of change (ROC): The percent change over N bars. Call: talib.ROC(close, timeperiod=10) Definition: Rate-of-change momentum oscillator: the percent change of price versus the price N bars earlier. Usual reading: Crossing above zero = momentum turning up. Rank assets by ROC to find the strongest. Misleads when: Ranges whip it around zero. Needs: closing prices. Variants: Rate of change Percentage: (price-prevPrice)/prevPrice = talib.ROCP(close, timeperiod=10); Rate of change ratio: (price/prevPrice) = talib.ROCR(close, timeperiod=10); Rate of change ratio 100 scale: (price/prevPrice)*100 = talib.ROCR100(close, timeperiod=10) - Squeeze momentum (TTM squeeze) (SQZMOM): Flags when volatility is squeezed tight, and which way momentum points for the release. Call: talib.SQZMOM(high, low, close, bbperiod=20, nbdev=2, kcperiod=20, factorwide=2, factornormal=1.5, factornarrow=1) Definition: John Carter's TTM Squeeze, in the form LazyBear published on TradingView in 2014. Usual reading: Squeeze ending with rising momentum = bullish breakout. Misleads when: Not every squeeze leads to a big move. Needs: full candles. - Stochastic RSI (STOCHRSI): Stochastic applied to RSI. Very fast and jumpy. Call: talib.STOCHRSI(close, timeperiod=14, fastk_period=5, fastd_period=3, fastd_matype=0) Definition: Applies the Fast Stochastic (STOCHF) oscillator to an RSI series instead of price, measuring where RSI sits within its recent min/max range. Usual reading: Below 20 = oversold. Above 80 = overbought. Misleads when: It is noisy and gives signals all the time. Needs: closing prices. - True strength index (TSI): Double-smoothed momentum. Less noisy than RSI. Call: talib.TSI(close, firstperiod=25, secondperiod=13) Definition: William Blau's double-smoothed momentum oscillator. Usual reading: A cross of its signal line or of the zero line. Misleads when: Fast reversals arrive late. Needs: closing prices. - Ultimate oscillator (ULTOSC): Buying pressure measured over three time windows at once, 0 to 100. Call: talib.ULTOSC(high, low, close, timeperiod1=7, timeperiod2=14, timeperiod3=28) Definition: Momentum indicator combining buying-pressure/true-range ratios over three time periods into one 0-100 weighted average. Usual reading: A bullish divergence below 30 = buy setup. Misleads when: Strong trends keep it extreme. Needs: full candles. - Williams %R (WILLR): Stochastic turned upside down: it runs from 0 to -100. Call: talib.WILLR(high, low, close, timeperiod=14) Definition: Williams' %R momentum oscillator over a rolling period, bounded in [-100, 0]. Usual reading: Below -80 = oversold. Above -20 = overbought. Misleads when: Trends keep it pinned at one end. Needs: full candles. - Accelerator oscillator (AC): Whether momentum itself is speeding up or slowing down. Call: talib.AC(high, low, fastperiod=5, slowperiod=34, signalperiod=5) Definition: Bill Williams' Accelerator/Decelerator Oscillator (New Trading Dimensions, 1998): the rate at which market momentum is itself speeding up or slowing down. Usual reading: Turning up before price does = early warning of a rise. Misleads when: Very early also means often wrong. Needs: full candles. - Balance of power (BOP): Who won each bar: where the close sits versus the open, scaled by the bar's range. Call: talib.BOP(open, high, low, close) Definition: Balance Of Power compares where the close sits relative to the open, normalized by the bar's high-low range. A per-bar oscillator with no smoothing. Usual reading: Above zero = buyers stronger. Misleads when: One bar at a time is noisy, so smooth it. Needs: full candles. - Center of gravity (CG): A fast oscillator that finds the balance point of recent prices. Call: talib.CG(close, timeperiod=10) Definition: John Ehlers' Center of Gravity oscillator: the balance point of the last N values, each weighted by its value and placed at its position counting back from the current bar, which is position 1, negated so that it rises with price. It is smooth and has essentially no lag. Usual reading: A cross of its trigger line marks a turn. Misleads when: Very twitchy. Needs: closing prices. - Chande momentum oscillator (CMO): Up-moves minus down-moves as a share of all movement, -100 to +100. Call: talib.CMO(close, timeperiod=14) Definition: Bounded momentum measure from Wilder-smoothed average up-moves and down-moves. Usual reading: Above +50 = overbought. Below -50 = oversold. Misleads when: Trends hold it at the extremes. Needs: closing prices. Variants: Chande Momentum Oscillator (Unsmoothed) = talib.CMOU(close, timeperiod=14) - Connors RSI (CRSI): The average of three short-term readings: RSI, the length of the current streak, and how unusual today's move is. Call: talib.CRSI(close, timeperiod=3, streakperiod=2, rankperiod=100) Definition: Connors RSI: a 0 to 100 oscillator, the plain average of three short-term momentum readings on that same scale. Usual reading: Below 10 = very oversold. Above 90 = very overbought. Misleads when: Built for short-term bounces in stocks; weak in strong trends. Needs: closing prices. - Coppock curve (COPPOCK): A long-term momentum line designed for monthly charts. Call: talib.COPPOCK(close, wmaperiod=10, roc1period=11, roc2period=14) Definition: Edwin S. "Sedge" Coppock's long-term momentum oscillator (*Barron's*, originally published as the "Trendex Model"), computed as a weighted moving average of the **sum** of two rates of change. Usual reading: Turning up from below zero = long-term buy signal. Misleads when: Built for bottoms; poor at calling tops. Needs: closing prices. - Derivative oscillator (DOSC): A double-smoothed RSI minus its own average. Call: talib.DOSC(close, timeperiod=14, firstperiod=5, secondperiod=3, signalperiod=9) Definition: Wilder's RSI, smoothed by two exponential averages in series, with a simple average of that smoothed line subtracted from it. Usual reading: Crossing above zero = momentum turning up. Misleads when: Late. Needs: closing prices. - Detrended price oscillator (DPO): Price with the trend removed, to show the cycles underneath. Call: talib.DPO(close, timeperiod=20) Definition: The price a half-cycle back, less the moving average that spans the cycle. Usual reading: Peaks and troughs mark the rhythm of the cycle. Misleads when: It is shifted back in time, so it is not a live timing tool. Needs: closing prices. - Elder ray (bull and bear power) (ERI): How far the bar's high and low reach above or below an average. Call: talib.ERI(high, low, close, timeperiod=13) Definition: Alexander Elder's Bull Power / Bear Power pair from *Trading for a Living* (1993) — how far the bar's high and low sit from an EMA of the close. Usual reading: Bull power above zero and rising = buyers strong. Misleads when: Use it with the trend, never alone. Needs: full candles. - Fisher transform (FISHER): Reshapes where price sits in its range so that turning points stand out sharply. Call: talib.FISHER(high, low, timeperiod=10) Definition: Ehlers' Fisher Transform: an oscillator that reshapes the midpoint's position in its rolling channel into a near-normal distribution. Usual reading: The line crossing its trigger at an extreme = reversal signal. Misleads when: It jumps around in quiet markets. Needs: full candles. - Forecast oscillator (FOSC): How far the close is, in percent, from where a trend line forecast it would be. Call: talib.FOSC(close, timeperiod=5) Definition: The percentage by which the close deviates from the Time Series Forecast that was made one bar earlier for the current bar. Usual reading: Above zero = price is beating the forecast. Misleads when: Noisy from bar to bar. Needs: closing prices. - Internal bar strength (IBS): Where the close sits inside its own bar: 0 = at the low, 1 = at the high. Call: talib.IBS(high, low, close) Definition: Where the close sits inside its own bar's range. Usual reading: Below 0.2 = weak close (bounce candidate). Above 0.8 = strong close. Misleads when: One bar is noisy; it works mainly on stock indexes. Needs: full candles. - Intraday momentum index (IMI): RSI built from each bar's open-to-close move. Call: talib.IMI(open, close, timeperiod=14) Definition: An RSI-like 0-100 oscillator built from the open-to-close body of each bar. Usual reading: Above 70 = overbought. Below 30 = oversold. Misleads when: It ignores overnight gaps. Needs: full candles. - KDJ: Stochastic with a third, exaggerated line called J. Popular on Asian platforms. Call: talib.KDJ(high, low, close, fastk_period=9, slowk_period=3, slowk_matype=13, slowd_period=3, slowd_matype=13) Definition: The stochastic oscillator as it is drawn on Chinese-market platforms: the Slow-%K and Slow-%D lines plus a third line J that amplifies the gap between them. Usual reading: J above 100 = overbought. J below 0 = oversold. Misleads when: J overshoots constantly in trends. Needs: full candles. - Know Sure Thing (KST): Four rates of change, smoothed and added together. Call: talib.KST(close, roc1period=10, roc2period=15, roc3period=20, roc4period=30, sma1period=10, sma2period=10, sma3period=10, sma4period=15, signalperiod=9) Definition: Martin J. Pring's momentum oscillator, a weighted sum of four smoothed rates of change with a moving-average signal line. Usual reading: Crossing above its signal line = bullish. Misleads when: Slow. Needs: closing prices. Variants: Know Sure Thing with controllable MA type = talib.KSTEXT(close, roc1period=10, roc2period=15, roc3period=20, roc4period=30, ma1period=10, ma2period=10, ma3period=10, ma4period=15, signalperiod=9, rocmatype=0, signalmatype=0) - Percentage price oscillator (PPO): MACD expressed in percent, so different assets can be compared. Call: talib.PPO(close, fastperiod=12, slowperiod=26, matype=1) Definition: The difference between a fast and slow moving average expressed as a percentage of the slow MA. Usual reading: Above zero = up momentum. Signal-line crosses as with MACD. Misleads when: Late, like MACD. Needs: closing prices. Variants: Absolute Price Oscillator = talib.APO(close, fastperiod=12, slowperiod=26, matype=1) - Premier stochastic (PSO): A smoothed stochastic squashed into -1 to +1. Call: talib.PSO(high, low, close, fastk_period=8, emaperiod=5) Definition: A short-period Fast %K, recentred on zero and rescaled, double-smoothed and then squashed into the range -1 to +1. Usual reading: Beyond +0.9 or -0.9 are the extremes. Misleads when: Slow to leave an extreme. Needs: full candles. - Psychological line (PSY): The percentage of recent bars that closed higher than the bar before. Call: talib.PSY(close, timeperiod=12) Definition: Psychological Line (PSY) measures the percentage of bars in a trailing window that closed strictly higher than the previous bar. Usual reading: Above 75 = too optimistic. Below 25 = too pessimistic. Misleads when: It ignores how big the moves were. Needs: closing prices. - Qstick (QSTICK): The average candle body (close minus open). Call: talib.QSTICK(open, close, timeperiod=10) Definition: Tushar Chande and Stanley Kroll's Qstick (The New Technical Trader, 1994): a simple moving average of the candle body, close minus open. Usual reading: Above zero = buyers are winning inside the bars. Misleads when: Gaps between bars are ignored. Needs: full candles. - Schaff trend cycle (STC): MACD run through a stochastic twice. Fast, 0 to 100. Call: talib.STC(close, fastperiod=23, slowperiod=50, cycleperiod=10) Definition: Schaff Trend Cycle (Doug Schaff): a MACD line passed twice through a stochastic, each pass smoothed by half. Usual reading: Rising through 25 = bullish. Falling through 75 = bearish. Misleads when: It sticks at 0 or 100 in trends. Needs: closing prices. - Stochastic momentum index (SMI): Where the close sits versus the middle of the recent range, double-smoothed. -100 to +100. Call: talib.SMI(high, low, close, timeperiod=13, fastperiod=2, slowperiod=25, signalperiod=9) Definition: Where the close sits relative to the midpoint of the recent high/low range, double-smoothed. Usual reading: Above +40 = overbought. Below -40 = oversold. Also watch signal-line crosses. Misleads when: Trends keep it extreme. Needs: full candles. - Swing index (Wilder) (SI): Rates each bar's real strength against the bar before. The running total traces the true swings. Call: talib.SI(open, high, low, close, limitmove=3) Definition: Wilder's Swing Index: one number rating each bar against the bar before it, from both bars' open and close and the current bar's high and low, signed by the direction of the swing. Usual reading: A break in the running line confirms a price breakout. Misleads when: It needs a limit-move setting and was made for futures. Needs: full candles. Variants: Wilder Accumulative Swing Index = talib.ASI(open, high, low, close, limitmove=3) - TRIX: Rate of change of a triple-smoothed average. It filters out small moves. Call: talib.TRIX(close, timeperiod=30) Definition: 1-day Rate-Of-Change of a triple-smoothed EMA of the input. Momentum oscillator that filters out price moves shorter than the chosen period. Usual reading: Crossing above zero = bullish. Misleads when: Slow. Needs: closing prices. - WaveTrend (WAVETREND): How far price is from its average, scaled by its usual distance. Call: talib.WAVETREND(high, low, close, channelperiod=10, averageperiod=21, signalperiod=4) Definition: How far the typical price sits from its own exponential average, divided by an exponential average of that distance and by Lambert's CCI constant, then smoothed. Usual reading: A cross of its two lines beyond +60 or -60 = reversal signal. Misleads when: Many small crosses in the middle zone mean nothing. Needs: full candles. - Williams accumulation/distribution (WAD): A running line showing whether buyers or sellers are quietly winning, from price alone. Call: talib.WAD(high, low, close) Definition: A cumulative line meant to expose whether a security is quietly under accumulation (informed buying) or distribution (informed selling) beneath the surface of price. Usual reading: Line rising while price is flat = accumulation. Misleads when: Divergences can last a long time. Needs: full candles. ### Volatility: How big are the moves? - Bollinger Bands (BBANDS): A band around the average that widens and narrows with volatility. Call: talib.BBANDS(close, timeperiod=20, nbdevup=2, nbdevdn=2, matype=0) Definition: A moving-average middle band with upper and lower bands offset by a multiple of the standard deviation. Usual reading: In ranges, fade the bands. In trends, ride price walking along the band. Misleads when: Fading the band in a strong trend loses money. Needs: closing prices. - ATR (average true range): The average size of a bar, gaps included. No direction. Call: talib.ATR(high, low, close, timeperiod=14) Definition: Wilder-smoothed average of the True Range over a period, measuring price volatility regardless of direction. Usual reading: Place stops 2 to 3 ATR away. Position size = money at risk divided by ATR. Misleads when: It cannot tell you the direction. Needs: full candles. Variants: Normalized Average True Range = talib.NATR(high, low, close, timeperiod=14); True Range = talib.TRANGE(high, low, close) - Donchian channels (DONCHIAN): The highest high and lowest low of the last N bars. Call: talib.DONCHIAN(high, low, timeperiod=20) Definition: Three overlap lines built from rolling price extrema. Usual reading: Buy a 20-day high breakout (the Turtle rule). Misleads when: Ranges produce false breakouts. Needs: full candles. - %B (PERCENTB): Where price sits inside the Bollinger Bands: 0 = lower band, 1 = upper band. Call: talib.PERCENTB(close, timeperiod=20, nbdevup=2, nbdevdn=2, matype=0) Definition: Where the input sits relative to its Bollinger Bands, 0 at the lower band and 1 at the upper band. Usual reading: Above 1 = outside the upper band. Below 0 = outside the lower band. Misleads when: Trends keep it above 1 or below 0. Needs: closing prices. - Bollinger bandwidth (BBW): How tight the bands are. Call: talib.BBW(close, timeperiod=20, nbdevup=2, nbdevdn=2, matype=0) Definition: The distance between the upper and lower Bollinger Bands as a percentage of the middle band. Usual reading: Lowest in months = a squeeze. A breakout often follows. Misleads when: It does not say which way. Needs: closing prices. - Historical volatility: How much the price has really been swinging, as a yearly percent. Definition: Standard deviation of log returns ln(close(t) / close(t-1)) over 20 bars, multiplied by the square root of 252 (365 for crypto), in percent. Usual reading: Scale position size so that risk stays constant. Misleads when: It cannot predict shocks. Needs: closing prices. - Keltner channels (KC): A smoother band built from ATR around an EMA. Call: talib.KC(high, low, close, timeperiod=20, atrperiod=10, nbdev=2) Definition: Three overlap lines around price. Usual reading: Close outside = breakout. Bollinger Bands inside Keltner = squeeze. Misleads when: Ranges produce false breakouts. Needs: full candles. - Acceleration bands (ACCBANDS): Bands around price that widen with the size of the bars. Call: talib.ACCBANDS(high, low, close, timeperiod=20) Definition: Three overlap lines around price. Usual reading: A close outside the band = strong push. Misleads when: Late in quiet markets. Needs: full candles. - Average daily range (ADR): The average high-minus-low of recent bars. Call: talib.ADR(high, low, timeperiod=14) Definition: The arithmetic mean of the last N bar ranges, high minus low. Usual reading: If today has already moved one ADR, the easy part may be done. Misleads when: It ignores gaps. Needs: full candles. - Chaikin volatility (CVI): How fast the high-low range is widening or narrowing. Call: talib.CVI(high, low, timeperiod=10, rocperiod=10) Definition: Marc Chaikin's reading of how fast a market's daily trading range is widening or narrowing. Usual reading: A sharp rise = panic or breakout. A slow fall = calm. Misleads when: No direction. Needs: full candles. - Chande Kroll stop (CKSP): Two ATR-based stop lines, one for longs and one for shorts. Call: talib.CKSP(high, low, close, timeperiod=10, multiplier=1, stopperiod=9) Definition: Chande and Kroll's two-line volatility stop. Usual reading: Price above both = uptrend. Price below both = downtrend. Misleads when: Between the lines there is no signal. Needs: full candles. - Chandelier exit (CE): A trailing stop hung a multiple of ATR below the recent high, or above the recent low. Call: talib.CE(high, low, close, timeperiod=22, multiplier=3) Definition: Le Beau's Chandelier Exit, a two-line volatility stop. Usual reading: A close beyond the stop line = exit. Misleads when: Tight settings stop you out in normal noise. Needs: full candles. - Mass index (MASSI): Spots likely reversals from the trading range widening and then narrowing. Call: talib.MASSI(high, low, fastperiod=9, slowperiod=25) Definition: Donald Dorsey's non-directional measure of how the trading range itself is expanding or contracting. Usual reading: A rise above 27 followed by a fall below 26.5 = "reversal bulge". Misleads when: It says a turn is likely, not which way. Needs: full candles. - Moving average envelope (MAENV): An average with one line a fixed percent above and one a fixed percent below. Call: talib.MAENV(close, timeperiod=20, percentup=10, percentdn=10, matype=0) Definition: A moving average with one band a fixed percentage above it and one a fixed percentage below. Usual reading: A touch of an outer line = stretched. Misleads when: A fixed percent ignores changing volatility. Needs: closing prices. - Relative volatility index (RVI): RSI built on volatility: is volatility rising on up days or on down days? Call: talib.RVI(close, timeperiod=14, stddevperiod=10) Definition: Donald Dorsey's volatility oscillator, built exactly like RSI except that the quantity routed to the up and down buckets is the rolling standard deviation of price rather than the size of the move. Usual reading: Above 50 = volatility favours the upside. Misleads when: A confirming tool only. Needs: closing prices. Variants: Relative Volatility Index, refined high/low form = talib.RVIR(high, low, timeperiod=14, stddevperiod=10) - Rogers-Satchell volatility (ROGERSSATCHELL): A volatility estimate that uses the open, high, low and close of each bar. Call: talib.ROGERSSATCHELL(open, high, low, close, timeperiod=10, annualization=252) Definition: A range-based estimator that reads one bar's open, high, low and close as a single unbiased estimate of that bar's variance, then reports the root of the mean over the last n bars, scaled to periods per year. Usual reading: Use it like standard deviation, with less noise. Misleads when: It ignores overnight gaps. Needs: full candles. - Standard deviation and variance (STDDEV): How spread out prices are around their average. Call: talib.STDDEV(close, timeperiod=5, nbdev=1) Definition: Rolling standard deviation of a series over a window, scaled by a deviations multiplier. Delegates to VAR, then takes the square root. Usual reading: Rising = bigger swings. Use it to scale risk. Misleads when: No direction. Needs: closing prices. Variants: Variance = talib.VAR(close, timeperiod=5, nbdev=1) - Ulcer index (ULCER): How deep and how long the recent drawdowns were. Call: talib.ULCER(close, timeperiod=14) Definition: Peter Martin's Ulcer Index: the root mean square of the percent drawdowns from the highest earlier value in each N-bar window. Usual reading: Lower = a smoother ride. Compare assets by it. Misleads when: It only looks backward. Needs: closing prices. Variants: Ulcer Index, rolling high = talib.ULCER_ROLL(close, timeperiod=14) ### Volume: Is real money behind the move? - VWAP: The average price paid, weighted by volume. Big institutions measure themselves against it. Call: talib.VWAP(high, low, close, volume) Definition: The average price paid per unit of volume traded, accumulated from the first bar of the range onward. Usual reading: Price above VWAP = buyers in control. Misleads when: It is a within-day tool. The library starts it at the first candle it is given, so feed it one session or say where it is anchored. Needs: candles with volume. - On-balance volume (OBV): A running total: volume is added on up days and subtracted on down days. Call: talib.OBV(close, volume) Definition: A running cumulative total of volume, added on up-price bars and subtracted on down-price bars. Relates volume flow to price direction. Usual reading: OBV moving against price = warning. Misleads when: Bad volume data (forex, some crypto venues) makes it useless. Needs: candles with volume. - Money flow index (MFI): RSI that also counts volume. Call: talib.MFI(high, low, close, volume, timeperiod=14) Definition: A volume-weighted momentum oscillator (0-100) comparing positive vs negative money flow over a period. Usual reading: Below 20 = oversold. Above 80 = overbought. Misleads when: Trends keep it extreme, and it needs honest volume data. Needs: candles with volume. - Accumulation/distribution line (AD): Volume weighted by where each bar closes inside its range. Call: talib.AD(high, low, close, volume) Definition: Chaikin Accumulation/Distribution Line, a cumulative volume-flow indicator. Usual reading: Line rising while price is flat = quiet buying. Misleads when: Gaps are ignored. Needs: candles with volume. - Chaikin money flow (CMF): Average buying versus selling pressure over N bars. Call: talib.CMF(high, low, close, volume, timeperiod=20) Definition: Over a trailing window of N bars, the sum of each bar's money flow volume divided by the sum of its volume. Usual reading: Above zero = buying pressure. Misleads when: Low-volume periods mislead. Needs: candles with volume. - Ease of movement (EMV): How easily price moves for each unit of volume. Call: talib.EMV(high, low, volume, timeperiod=14, volumedivisor=10000) Definition: Ease of Movement: the bar-to-bar move of the high-low midpoint divided by a box ratio of volume to range, averaged over a trailing window. Usual reading: Above zero = price rises with little effort. Misleads when: Thin markets exaggerate it. Needs: candles with volume. - Force index (EFI): Price change multiplied by volume. Call: talib.EFI(close, volume, timeperiod=13) Definition: Alexander Elder's Force Index (Trading for a Living, 1993): volume-weighted momentum. Usual reading: Above zero = bulls in control. Misleads when: Low volume makes it jumpy. Needs: candles with volume. - Relative volume (RVOL): Today's volume compared with normal. Call: talib.RVOL(volume, timeperiod=20) Definition: Today's volume as a ratio to the average volume of the bars that came before it. Usual reading: Above 2 = something is happening. Misleads when: Holidays and half-days distort it. Needs: candles with volume. - Chaikin oscillator (ADOSC): Momentum of the accumulation/distribution line. Call: talib.ADOSC(high, low, close, volume, fastperiod=3, slowperiod=10) Definition: The difference between a fast and a slow EMA of the Accumulation/Distribution line. Usual reading: Crossing above zero = buying pressure growing. Misleads when: Noisy. Needs: candles with volume. - Klinger oscillator (KVO): Long-term money flow compared with short-term money flow. Call: talib.KVO(high, low, close, volume, fastperiod=34, slowperiod=55, signalperiod=13) Definition: Each bar's volume is signed by the direction of its high-low-close sum and weighted by where the bar's own range sits inside the cumulative range of the current trend run, then the resulting volume force is smoothed twice and differenced. Usual reading: Crossing above its signal line = bullish. Misleads when: Frequent false crosses. Needs: candles with volume. - Market facilitation index (MARKETFI): How far price moved for each unit of volume. Call: talib.MARKETFI(high, low, volume) Definition: Bill Williams' Market Facilitation Index (*Trading Chaos*, 1995): the price range a bar travelled per unit of volume traded — how much movement the market "facilitated" per tick. Usual reading: Index rising with rising volume = a real move. Misleads when: It needs volume you can trust. Needs: candles with volume. - Negative and positive volume index (NVI): Tracks price changes only on quieter days (NVI) or on busier days (PVI). Call: talib.NVI(close, volume) Definition: A running cumulative index that changes only on days when volume falls versus the prior day, compounding that day's percentage price change. Usual reading: NVI above its one-year average = a bull market is more likely. Misleads when: Very slow. Needs: candles with volume. Variants: Positive Volume Index = talib.PVI(close, volume) - Percentage volume oscillator (PVO): MACD applied to volume. Call: talib.PVO(volume, fastperiod=12, slowperiod=26, matype=1) Definition: A variation of the Percentage Price Oscillator (PPO, created by Gerald Appel) applied to the volume series instead of price. Usual reading: Above zero = volume is expanding. Misleads when: It says nothing about price direction. Needs: candles with volume. - Price volume trend (PVT): A running total of volume scaled by each bar's percent price change. Call: talib.PVT(close, volume) Definition: A running cumulative total of each bar's volume weighted by that bar's fractional price change. Usual reading: Rising together with price = healthy trend. Misleads when: Bad volume data. Needs: candles with volume. ### Levels: Where might price react? - Pivot points (classic): Support and resistance levels worked out from the previous day's range. Definition: From the previous day's high H, low L and close C: P = (H + L + C) / 3; R1 = 2P - L; S1 = 2P - H; R2 = P + (H - L); S2 = P - (H - L). Usual reading: Fade R1 and S1 in ranges. Expect breaks on trend days. Misleads when: Trend days run through every level. Needs: full candles. - Fibonacci retracement: Reference levels for how far a pullback might go. Definition: Find the last major swing high and swing low and say which bars you chose. For an upswing, level = High - r * (High - Low) for r = 0.236, 0.382, 0.5, 0.618, 0.786; mirror it for a downswing. Usual reading: Look for reactions between 0.382 and 0.618. Misleads when: The swing you choose is a matter of opinion, so it cannot be backtested fairly. Needs: full candles. - Heikin-Ashi candles (HA): Smoothed candles that make trend runs easy to see. Call: talib.HA(open, high, low, close) Definition: An OHLC-to-OHLC transform that replaces each bar with a smoothed synthetic candle. Usual reading: Stay in while the candles keep the same colour. Misleads when: The prices shown are not real traded prices, so never backtest fills on them. Needs: full candles. - Previous day high, low and close: The three levels every day trader watches. Definition: Take the previous session's high, low and close, and report where the current price is relative to each. Usual reading: Break and hold = continuation. Rejection = fade. Misleads when: Overnight gaps jump straight over them. Needs: full candles. - Williams fractals (FRACTAL): Marks a high with two lower highs on each side, and the same for lows. Call: talib.FRACTAL(high, low, leftbars=2, rightbars=2) Definition: A causal swing-pivot detector. Usual reading: A break of the last fractal = signal. Good for placing stops. Misleads when: It is confirmed two bars late. Needs: full candles. - ZigZag (ZIGZAG): Connects only the swings bigger than a set percent, hiding the small moves. Call: talib.ZIGZAG(high, low, sensitivity=5, mintrendlength=1) Definition: The percent-filter swing line. Usual reading: Higher highs and higher lows = uptrend. Misleads when: The last leg redraws, so never use it for signals or backtests. Needs: full candles. - Central pivot range (CPR): Three levels worked out from the previous bar's high, low and close. Call: talib.CPR(high, low, close) Definition: A central pivot and two lines straddling it, computed from the previous bar's high, low and close and held for the current bar. Usual reading: Price above the range = bullish bias for the day. A narrow range = a big move is more likely. Misleads when: Trend days run straight through the levels. Needs: full candles. - Midpoint of the range (MIDPOINT): Halfway between the highest and lowest value of the last N bars. Call: talib.MIDPOINT(close, timeperiod=14) Definition: Midpoint over a period: the average of the highest and lowest input values within the lookback window. Usual reading: Price above the midpoint = in the upper half of its range. Misleads when: It goes flat in tight ranges. Needs: closing prices. Variants: Midpoint Price over period = talib.MIDPRICE(high, low, timeperiod=14) - Typical price (one number per bar) (TYPPRICE): Turns each bar into one representative price: typical, median, average or weighted close. Call: talib.TYPPRICE(high, low, close) Definition: The average of the high, low, and close of each bar. A single representative price per period. Usual reading: Feed it into other indicators in place of the close. Misleads when: It is a building block, not a signal. Needs: full candles. Variants: Average Price = talib.AVGPRICE(open, high, low, close); Median Price = talib.MEDPRICE(high, low); Weighted Close Price = talib.WCLPRICE(high, low, close) ### Candle patterns: What are the candles saying? - Scan all 61 candle patterns: Checks the latest candles against every pattern the library knows and lists the ones that appeared. Call: for name in talib.get_function_groups()['Pattern Recognition']: getattr(talib, name)(open, high, low, close) Definition: Loop over every function in talib.get_function_groups()['Pattern Recognition'] with open, high, low, close. Report each non-zero value in the last 5 candles: +100 = bullish, -100 = bearish. Usual reading: Give more weight to patterns that agree with the trend and appear at a known level. Misleads when: Several patterns firing together still count as one clue, not several. Needs: full candles. Needs the TA-Lib library. - Abandoned Baby pattern (CDLABANDONEDBABY): A doji that gaps away from the candles on both sides, like an island. Call: talib.CDLABANDONEDBABY(open, high, low, close, penetration=0.3) Definition: A three-candle reversal pattern: a long body, then a gapped-away doji, then a body of opposite color that gaps back the other way and closes deep into the first body. Bullish (bottom) or bearish (top) reversal signal. Usual reading: It can point either way: the library marks it +100 when bullish and -100 when bearish. Wait for the next candle to confirm. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Advance Block pattern (CDLADVANCEBLOCK): Three up candles with shrinking bodies and longer upper wicks. Buyers are tiring. Call: talib.CDLADVANCEBLOCK(open, high, low, close) Definition: Three-candle bearish reversal pattern: three white candles with consecutively higher closes whose advance weakens (progressively smaller bodies and/or lengthening upper shadows). Signals that an uptrend's advance is being blocked. Usual reading: Bearish when it appears after a rise. Wait for the next candle to close lower. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Belt-hold pattern (CDLBELTHOLD): A long candle that opens at its extreme, with no wick on the opening side, against the recent move. Call: talib.CDLBELTHOLD(open, high, low, close) Definition: Single-candle pattern with a long real body that opens at (or near) its extreme. Usual reading: It can point either way: the library marks it +100 when bullish and -100 when bearish. Wait for the next candle to confirm. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Breakaway pattern (CDLBREAKAWAY): A gap in the trend's direction, three more small candles, then a long candle back into the gap. Call: talib.CDLBREAKAWAY(open, high, low, close) Definition: A five-candle reversal pattern: a long first candle, a same-colored second candle that gaps away from it by its real body, two more candles extending the move, and an opposite-colored fifth candle that closes back inside the gap. Usual reading: It can point either way: the library marks it +100 when bullish and -100 when bearish. Wait for the next candle to confirm. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Closing Marubozu pattern (CDLCLOSINGMARUBOZU): A long candle with no wick on the closing side: it closed at its extreme. Call: talib.CDLCLOSINGMARUBOZU(open, high, low, close) Definition: Single-candle pattern: a long real body whose closing end has no or very short shadow, so the close sits at the candle's extreme. Usual reading: It can point either way: the library marks it +100 when bullish and -100 when bearish. Wait for the next candle to confirm. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Concealing Baby Swallow (CDLCONCEALBABYSWALL): Four down candles where the last one swallows the third. A rare bottom signal. Call: talib.CDLCONCEALBABYSWALL(open, high, low, close) Definition: A four-candle pattern: two black marubozus, then a black candle that gaps down but pokes its upper shadow into the prior body, then a larger black candle fully engulfing the third. A hit signals a bullish reversal. Usual reading: Bullish when it appears after a fall. Wait for the next candle to close higher. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Counterattack pattern (CDLCOUNTERATTACK): Two opposite long candles that close at the same price. Call: talib.CDLCOUNTERATTACK(open, high, low, close) Definition: A two-candle pattern of two long, opposite-colored real bodies whose closing prices are (nearly) equal. Usual reading: It can point either way: the library marks it +100 when bullish and -100 when bearish. Wait for the next candle to confirm. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Dark Cloud Cover pattern (CDLDARKCLOUDCOVER): After a strong up candle, a down candle opens higher and closes deep into the first candle's body. Call: talib.CDLDARKCLOUDCOVER(open, high, low, close, penetration=0.5) Definition: A two-candle bearish reversal pattern: a long white candle followed by a black candle that opens above the prior high and closes deep into the prior white body past a penetration threshold. Signals a potential top. A hit (-100) is a bearish reversal signal, most meaningful after an uptrend. Usual reading: Bearish when it appears after a rise. Wait for the next candle to close lower. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Doji pattern (CDLDOJI): The open and close are almost equal. Buyers and sellers are balanced. Call: talib.CDLDOJI(open, high, low, close) Definition: Single-candle Doji recognizer: fires when the real body (|close-open|) is at or below the BodyDoji threshold. Usual reading: Indecision. It matters most after a long run, where it can warn of a turn. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Doji Star pattern (CDLDOJISTAR): A doji that gaps away from a long candle. The trend is hesitating. Call: talib.CDLDOJISTAR(open, high, low, close) Definition: A two-candle reversal pattern: a long real body followed by a doji whose real body gaps away from it (up after a white body, down after a black body). Usual reading: It can point either way: the library marks it +100 when bullish and -100 when bearish. Wait for the next candle to confirm. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Dragonfly Doji pattern (CDLDRAGONFLYDOJI): A doji with a long lower wick and no upper wick. Sellers pushed down and failed. Call: talib.CDLDRAGONFLYDOJI(open, high, low, close) Definition: Single-candle pattern: a doji (open and close nearly equal) sitting at the top of the range, with no meaningful upper shadow and a long lower shadow. Usual reading: Indecision. It matters most after a long run, where it can warn of a turn. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Engulfing Pattern (CDLENGULFING): A candle whose body completely covers the previous candle's body, in the opposite direction. Call: talib.CDLENGULFING(open, high, low, close) Definition: A two-candle reversal pattern where the second candle's real body engulfs the first candle's opposite-colored real body. Usual reading: It can point either way: the library marks it +100 when bullish and -100 when bearish. Wait for the next candle to confirm. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Evening Doji Star pattern (CDLEVENINGDOJISTAR): An up candle, a doji gapping higher, then a down candle closing deep into the first. Call: talib.CDLEVENINGDOJISTAR(open, high, low, close, penetration=0.3) Definition: A three-candle bearish reversal pattern: a long white candle, a doji that gaps up (the star), then a black candle closing well down into the first candle's body. A stricter Evening Star whose middle candle must be a doji. Hit (-100) signals a bearish top reversal. Usual reading: Bearish when it appears after a rise. Wait for the next candle to close lower. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Evening Star pattern (CDLEVENINGSTAR): An up candle, a small candle gapping higher, then a down candle closing deep into the first. Call: talib.CDLEVENINGSTAR(open, high, low, close, penetration=0.3) Definition: A three-candle bearish reversal pattern: a long white candle, a short-bodied star gapping up, then a black candle closing well down into the first candle's body. A hit signals a bearish reversal (most significant in an uptrend). Usual reading: Bearish when it appears after a rise. Wait for the next candle to close lower. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Gravestone Doji pattern (CDLGRAVESTONEDOJI): A doji with a long upper wick and no lower wick. Buyers pushed up and failed. Call: talib.CDLGRAVESTONEDOJI(open, high, low, close) Definition: Single-candle doji whose open and close sit at the low of the day, leaving a long upper shadow and no lower shadow. Usual reading: Indecision. It matters most after a long run, where it can warn of a turn. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Hammer pattern (CDLHAMMER): A small body at the top with a long lower wick, after a fall. Call: talib.CDLHAMMER(open, high, low, close) Definition: Single-candle pattern: a small real body at the top of the range with a long lower shadow and little or no upper shadow, sitting at or near the prior candle's low. A hit flags a potential bullish reversal. Usual reading: Bullish when it appears after a fall. Wait for the next candle to close higher. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Hanging Man pattern (CDLHANGINGMAN): The same shape as a hammer, but after a rise. Call: talib.CDLHANGINGMAN(open, high, low, close) Definition: Single candle with a small real body, a long lower shadow, and little/no upper shadow, sitting at or near the highs of the prior candle. Usual reading: Bearish when it appears after a rise. Wait for the next candle to close lower. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Harami Cross Pattern (CDLHARAMICROSS): A doji sitting inside the previous big candle's body. Call: talib.CDLHARAMICROSS(open, high, low, close) Definition: A two-candle reversal pattern: a long real body followed by a doji whose real body is contained within the first candle's real body (the doji variant of the Harami). Bullish after a black first candle, bearish after a white first candle. Usual reading: It can point either way: the library marks it +100 when bullish and -100 when bearish. Wait for the next candle to confirm. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Harami Pattern (CDLHARAMI): A small candle sitting inside the previous big candle's body. Call: talib.CDLHARAMI(open, high, low, close) Definition: Two-candle pattern: a long real body followed by a short real body contained within the first candle's real body. Usual reading: It can point either way: the library marks it +100 when bullish and -100 when bearish. Wait for the next candle to confirm. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - High-Wave Candle pattern (CDLHIGHWAVE): A small body with very long wicks on both sides. Real confusion. Call: talib.CDLHIGHWAVE(open, high, low, close) Definition: Single-candle pattern: a short real body with both a very long upper and a very long lower shadow. Usual reading: Indecision. It matters most after a long run, where it can warn of a turn. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Hikkake Pattern (CDLHIKKAKE): An inside bar, a false breakout one way, then a move the other way. Call: talib.CDLHIKKAKE(open, high, low, close) Definition: A 3-bar pattern: an inside bar followed by a false breakout, optionally later confirmed by a follow-through bar. Usual reading: It can point either way: the library marks it +100 when bullish and -100 when bearish. Wait for the next candle to confirm. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Homing Pigeon pattern (CDLHOMINGPIGEON): Two down candles where the second sits inside the first. Selling is slowing. Call: talib.CDLHOMINGPIGEON(open, high, low, close) Definition: Two-candle pattern: a long black candle followed by a small black candle whose real body sits inside the prior body. Usual reading: Bullish when it appears after a fall. Wait for the next candle to close higher. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Identical Three Crows pattern (CDLIDENTICAL3CROWS): Three down candles, each opening at the previous close. Call: talib.CDLIDENTICAL3CROWS(open, high, low, close) Definition: A three-candle bearish reversal pattern: three consecutive declining black candles, each with a very short (or no) lower shadow, where each candle after the first opens at or very near the prior candle's close. A hit signals a bearish reversal (pattern is always bearish). Usual reading: Bearish when it appears after a rise. Wait for the next candle to close lower. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - In-Neck Pattern (CDLINNECK): In a downtrend: a down candle, then a small up candle that closes just inside the first body. The fall tends to continue. Call: talib.CDLINNECK(open, high, low, close) Definition: A two-candle in-neck pattern: a long black candle followed by a white candle that opens below the prior low and closes just barely into the prior body (near the prior close). It is a bearish continuation signal. A hit signals bearish continuation (the down move is expected to resume). Usual reading: A continuation sign: the existing trend tends to carry on. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Inverted Hammer pattern (CDLINVERTEDHAMMER): A small body at the bottom with a long upper wick, after a fall. Call: talib.CDLINVERTEDHAMMER(open, high, low, close) Definition: Single-candle pattern: a small real body with a long upper shadow and little-to-no lower shadow that gaps down from the prior candle. Usual reading: Bullish when it appears after a fall. Wait for the next candle to close higher. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Kicking - bull/bear determined by the longer marubozu (CDLKICKINGBYLENGTH): Kicking, where the longer of the two candles decides the direction. Call: talib.CDLKICKINGBYLENGTH(open, high, low, close) Definition: A two-candle pattern of two opposite-color marubozu (long body, very short shadows on both ends) separated by a gap. Usual reading: It can point either way: the library marks it +100 when bullish and -100 when bearish. Wait for the next candle to confirm. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Kicking pattern (CDLKICKING): Two wickless candles in opposite directions with a gap between them. Call: talib.CDLKICKING(open, high, low, close) Definition: Two-candle pattern of two opposite-color marubozu (long bodies with very short shadows) separated by a price gap. Usual reading: It can point either way: the library marks it +100 when bullish and -100 when bearish. Wait for the next candle to confirm. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Ladder Bottom pattern (CDLLADDERBOTTOM): Three down candles, a fourth with an upper wick, then an up candle gapping higher. Call: talib.CDLLADDERBOTTOM(open, high, low, close) Definition: Five-candle bullish reversal pattern: three consecutively lower black candles, a fourth black candle with a non-very-short upper shadow, then a white candle that opens above the prior open and closes above the prior high. A hit is a bullish reversal signal, most meaningful after a downtrend. Usual reading: Bullish when it appears after a fall. Wait for the next candle to close higher. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Long Legged Doji pattern (CDLLONGLEGGEDDOJI): A doji with long wicks on both sides. Call: talib.CDLLONGLEGGEDDOJI(open, high, low, close) Definition: Single-candle doji (open ~ close) with at least one long shadow. Signals market indecision, not a directional bias. Usual reading: Indecision. It matters most after a long run, where it can warn of a turn. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Long Line Candle pattern (CDLLONGLINE): A candle with a long body and short wicks. Strong conviction. Call: talib.CDLLONGLINE(open, high, low, close) Definition: A single-candle pattern: a long real body with short upper and short lower shadow. Usual reading: It can point either way: the library marks it +100 when bullish and -100 when bearish. Wait for the next candle to confirm. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Marubozu pattern (CDLMARUBOZU): A long candle with no wicks at all. Call: talib.CDLMARUBOZU(open, high, low, close) Definition: Single candle with a long real body and no/very-short upper and lower shadows, so open and close sit at the range extremes. Usual reading: It can point either way: the library marks it +100 when bullish and -100 when bearish. Wait for the next candle to confirm. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Mat Hold pattern (CDLMATHOLD): A long up candle, three small pullback candles that hold above it, then another up candle. The rise tends to continue. Call: talib.CDLMATHOLD(open, high, low, close, penetration=0.5) Definition: A five-candle bullish continuation pattern: a long white candle, an upside real-body-gapped small black candle, two more small falling candles that hold within the first body, and a final white candle closing above the reaction days' highs. Signals continuation of the prior uptrend. Usual reading: Bullish when it appears after a fall. Wait for the next candle to close higher. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Matching Low pattern (CDLMATCHINGLOW): Two down candles closing at the same price. A floor may be forming. Call: talib.CDLMATCHINGLOW(open, high, low, close) Definition: A two-candle pattern of two consecutive black (bearish) candles with equal closes (within a tolerance). Treated as a bullish reversal signal. Usual reading: Bullish when it appears after a fall. Wait for the next candle to close higher. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Modified Hikkake Pattern (CDLHIKKAKEMOD): A stricter hikkake that needs an extra setup bar first. Call: talib.CDLHIKKAKEMOD(open, high, low, close) Definition: A four-candle pattern: two successively narrower inside bars, then a breakout bar, with the second candle closing near one extreme of its range. Usual reading: It can point either way: the library marks it +100 when bullish and -100 when bearish. Wait for the next candle to confirm. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Morning Doji Star pattern (CDLMORNINGDOJISTAR): A down candle, a doji gapping lower, then an up candle closing deep into the first. Call: talib.CDLMORNINGDOJISTAR(open, high, low, close, penetration=0.3) Definition: A three-candle bullish reversal pattern: a long black candle, then a doji that gaps down, then a white candle closing well up into the first candle's body. Usual reading: Bullish when it appears after a fall. Wait for the next candle to close higher. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Morning Star pattern (CDLMORNINGSTAR): A down candle, a small candle gapping lower, then an up candle closing deep into the first. Call: talib.CDLMORNINGSTAR(open, high, low, close, penetration=0.3) Definition: A three-candle bottom-reversal pattern: a long black candle, a small-bodied star gapping down, then a white candle closing well up into the first candle's body. Bullish reversal signal. A hit signals a bullish reversal (most meaningful after a downtrend, which the code does not check). Usual reading: Bullish when it appears after a fall. Wait for the next candle to close higher. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - On-Neck Pattern (CDLONNECK): In a downtrend: a down candle, then a small up candle that closes at the first candle's low. The fall tends to continue. Call: talib.CDLONNECK(open, high, low, close) Definition: A two-candle on-neck pattern: a long black candle followed by a white candle that opens below the prior candle's low and closes right at that low. Usual reading: A continuation sign: the existing trend tends to carry on. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Piercing Pattern (CDLPIERCING): After a strong down candle, an up candle opens lower and closes above the middle of the first. Call: talib.CDLPIERCING(open, high, low, close) Definition: Two-candle pattern: a long black candle followed by a long white candle that opens below the prior low and closes back above the midpoint of the prior black body. Bullish reversal signal. A hit (+100) is a bullish reversal signal. Usual reading: Bullish when it appears after a fall. Wait for the next candle to close higher. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Rickshaw Man pattern (CDLRICKSHAWMAN): A long-legged doji with the body right in the middle. Call: talib.CDLRICKSHAWMAN(open, high, low, close) Definition: Single-candle doji with two long shadows whose body sits near the midpoint of the high-low range. Usual reading: Indecision. It matters most after a long run, where it can warn of a turn. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Rising/Falling Three Methods (CDLRISEFALL3METHODS): A long candle, three small candles against it that stay inside its range, then another long candle in the first direction. Call: talib.CDLRISEFALL3METHODS(open, high, low, close) Definition: A five-candle continuation pattern: a long candle, three small counter-color candles that stay partly within the first candle's high-low range, then a long same-color candle that resumes the trend. Bullish (rising) or bearish (falling) continuation signal. Usual reading: It can point either way: the library marks it +100 when bullish and -100 when bearish. Wait for the next candle to confirm. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Separating Lines pattern (CDLSEPARATINGLINES): Two opposite candles that open at the same price; the second follows the trend. Call: talib.CDLSEPARATINGLINES(open, high, low, close) Definition: A two-candle continuation pattern: the second candle opposes the first in color, opens at the same price as the first, and is a long-bodied belt hold. Usual reading: It can point either way: the library marks it +100 when bullish and -100 when bearish. Wait for the next candle to confirm. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Shooting Star pattern (CDLSHOOTINGSTAR): A small body at the bottom with a long upper wick, after a rise. Call: talib.CDLSHOOTINGSTAR(open, high, low, close) Definition: Single-candle pattern: a small real body with a long upper shadow and little-to-no lower shadow that gaps up from the prior candle's real body. Usual reading: Bearish when it appears after a rise. Wait for the next candle to close lower. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Short Line Candle pattern (CDLSHORTLINE): A candle with a short body and short wicks. Little conviction. Call: talib.CDLSHORTLINE(open, high, low, close) Definition: Single-candle pattern: a short real body with short upper and lower shadows (a small-range candle). Usual reading: It can point either way: the library marks it +100 when bullish and -100 when bearish. Wait for the next candle to confirm. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Spinning Top pattern (CDLSPINNINGTOP): A small body with wicks longer than the body on both sides. Call: talib.CDLSPINNINGTOP(open, high, low, close) Definition: Single-candle pattern: a small real body with both an upper and a lower shadow longer than the body. Usual reading: Indecision. It matters most after a long run, where it can warn of a turn. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Stalled Pattern (CDLSTALLEDPATTERN): Two long up candles, then a small one near the top. The rise is stalling. Call: talib.CDLSTALLEDPATTERN(open, high, low, close) Definition: A three-candle pattern of three white candles with consecutively higher closes where the third loses momentum (a small body riding on the shoulder of the second's long body). It is a bearish reversal signal of a stalling advance. A hit (-100) is bearish: the uptrend is stalling and may reverse. Usual reading: Bearish when it appears after a rise. Wait for the next candle to close lower. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Stick Sandwich pattern (CDLSTICKSANDWICH): A down candle, an up candle, then a down candle; both down candles close at the same price. Call: talib.CDLSTICKSANDWICH(open, high, low, close) Definition: A three-candle bullish reversal pattern: two black candles (1st and 3rd) sandwiching a white candle, where the 3rd black candle closes at the same level as the 1st (the "bread"). A hit signals a bullish reversal (significant in a downtrend, which the function does not verify). Usual reading: Bullish when it appears after a fall. Wait for the next candle to close higher. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Takuri (Dragonfly Doji with very long lower shadow) (CDLTAKURI): A dragonfly doji with a very long lower wick. Call: talib.CDLTAKURI(open, high, low, close) Definition: Single-candle pattern: a doji whose open and close sit at the high (no/very short upper shadow) with a very long lower shadow, i.e. a dragonfly doji with an exceptionally long lower shadow. Usual reading: Bullish when it appears after a fall. Wait for the next candle to close higher. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Tasuki Gap pattern (CDLTASUKIGAP): A gap in the trend's direction, then a candle that moves into the gap without closing it. Call: talib.CDLTASUKIGAP(open, high, low, close) Definition: A three-candle pattern: a real-body-gapping candle followed by an opposite-color candle that opens inside its body and closes back into the gap without filling it. An upside gap is a bullish continuation signal; a downside gap is a bearish continuation signal. Usual reading: It can point either way: the library marks it +100 when bullish and -100 when bearish. Wait for the next candle to confirm. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Three Advancing White Soldiers (CDL3WHITESOLDIERS): Three long up candles in a row, each closing near its high. Call: talib.CDL3WHITESOLDIERS(open, high, low, close) Definition: A three-candle pattern of consecutive white candles with progressively higher closes, each opening within/near the prior body and each with a very short upper shadow. A hit is a bullish reversal signal, most meaningful in a downtrend, which the code does not verify. Usual reading: Bullish when it appears after a fall. Wait for the next candle to close higher. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Three Black Crows pattern (CDL3BLACKCROWS): Three long down candles in a row, each closing near its low. Call: talib.CDL3BLACKCROWS(open, high, low, close) Definition: A four-bar pattern: a white candle followed by three consecutive black (down) candles with successively lower closes, each opening inside the prior black's real body. It is a bearish reversal signal. A hit (-100) signals a bearish reversal. Usual reading: Bearish when it appears after a rise. Wait for the next candle to close lower. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Three Inside Up/Down pattern (CDL3INSIDE): A small candle inside the previous big one, then a third candle that confirms the turn. Call: talib.CDL3INSIDE(open, high, low, close) Definition: A three-candle reversal pattern: a long real body, then a short real body totally engulfed by it (a harami), then a third candle of opposite color to the first that closes past the first candle's open. Usual reading: It can point either way: the library marks it +100 when bullish and -100 when bearish. Wait for the next candle to confirm. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Three Outside Up/Down pattern (CDL3OUTSIDE): An engulfing pair, then a third candle that continues in the new direction. Call: talib.CDL3OUTSIDE(open, high, low, close) Definition: A three-candle pattern: an engulfing pair (candle 2's body fully engulfs candle 1's body) followed by a third candle that confirms in the engulfing direction. Signals a bullish reversal (Three Outside Up) or bearish reversal (Three Outside Down). Usual reading: It can point either way: the library marks it +100 when bullish and -100 when bearish. Wait for the next candle to confirm. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Three Stars In The South (CDL3STARSINSOUTH): Three down candles, each smaller than the last, with rising lows. Selling is drying up. Call: talib.CDL3STARSINSOUTH(open, high, low, close) Definition: A three-candle bullish reversal pattern of three consecutive black candles that progressively shrink and stabilize: a long black candle with a long lower shadow, a smaller black candle probing lower, then a small black marubozu contained within the second candle's range. Usual reading: Bullish when it appears after a fall. Wait for the next candle to close higher. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Three-Line Strike pattern (CDL3LINESTRIKE): Three candles in one direction, then one big candle the other way that wipes out all three. Call: talib.CDL3LINESTRIKE(open, high, low, close) Definition: A four-candle pattern: three same-color candles with consecutively higher (or lower) closes, each opening within or near the prior real body, then a fourth opposite-color candle that opens beyond the third close and closes past the first candle's open. Usual reading: It can point either way: the library marks it +100 when bullish and -100 when bearish. Wait for the next candle to confirm. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Thrusting Pattern (CDLTHRUSTING): In a downtrend: a down candle, then an up candle that closes below the middle of the first. The fall tends to continue. Call: talib.CDLTHRUSTING(open, high, low, close) Definition: A two-candle pattern: a long black candle followed by a white candle that opens below the prior low and closes back into the prior body but below its midpoint. It is a bearish continuation signal. A hit is bearish: the failed white push back into the black body signals continuation of the down move. Usual reading: A continuation sign: the existing trend tends to carry on. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Tristar Pattern (CDLTRISTAR): Three dojis in a row, the middle one gapping away. Call: talib.CDLTRISTAR(open, high, low, close) Definition: A three-candle pattern of three consecutive doji where the middle doji is a star (its body gaps away from the first). Bullish or bearish reversal signal. Usual reading: It can point either way: the library marks it +100 when bullish and -100 when bearish. Wait for the next candle to confirm. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Two Crows pattern (CDL2CROWS): After a rise: a strong up candle, a down candle that gaps higher, then a bigger down candle that closes back inside the first. Call: talib.CDL2CROWS(open, high, low, close) Definition: Three-candle bearish reversal pattern: a long white candle, then a black candle gapping up, then a black candle that opens inside the second body and closes down inside the first white body. A hit (-100) signals a bearish reversal; significant in an uptrend, which this function does not verify. Usual reading: Bearish when it appears after a rise. Wait for the next candle to close lower. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Unique 3 River pattern (CDLUNIQUE3RIVER): A long down candle, a hammer-like candle making a new low, then a small up candle. Call: talib.CDLUNIQUE3RIVER(open, high, low, close) Definition: A three-candle bullish reversal pattern: a long black candle, then a black harami candle that makes a lower low, then a small white candle. Usual reading: Bullish when it appears after a fall. Wait for the next candle to close higher. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Up/Down-gap side-by-side white lines (CDLGAPSIDESIDEWHITE): A gap, then two similar up candles side by side. The gap's direction tends to continue. Call: talib.CDLGAPSIDESIDEWHITE(open, high, low, close) Definition: A three-candle pattern: a first candle followed by two white candles of similar body size that both gap the same direction (up or down) from the first candle's real body and open at about the same level. Usual reading: A continuation sign: the existing trend tends to carry on. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Upside Gap Two Crows pattern (CDLUPSIDEGAP2CROWS): An up candle, then two down candles that gap up; the second covers the first but stays above the gap. Call: talib.CDLUPSIDEGAP2CROWS(open, high, low, close) Definition: A three-candle bearish reversal pattern: a long white candle, then a small black candle gapping up (a gap between the real bodies), then a black candle that engulfs the second candle's real body but still closes above the first candle's close. Signals a bearish reversal. Usual reading: Bearish when it appears after a rise. Wait for the next candle to close lower. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. - Upside/Downside Gap Three Methods (CDLXSIDEGAP3METHODS): Two candles in the trend's direction with a gap between them, then one that closes the gap. Call: talib.CDLXSIDEGAP3METHODS(open, high, low, close) Definition: A three-candle continuation pattern: two same-color candles separated by a real-body gap, followed by an opposite-color candle that fills into the gap. Usual reading: It can point either way: the library marks it +100 when bullish and -100 when bearish. Wait for the next candle to confirm. Misleads when: Candle patterns alone are right only a little more often than chance. Use them with the trend, a level or volume. Needs: full candles. Needs the TA-Lib library. ### Cycles: Does it have a rhythm? - Dominant cycle (Hilbert transform) (HT_DCPERIOD): Estimates the length and phase of the market's current rhythm. Call: talib.HT_DCPERIOD(close) Definition: Hilbert Transform estimate of the dominant cycle period (in bars) of the price series. Outputs the smoothed instantaneous cycle period. Usual reading: Set other indicators' periods to about half the cycle length. Misleads when: Markets often have no clean cycle at all. Needs: closing prices. Needs the TA-Lib library. Variants: Hilbert Transform - Dominant Cycle Phase = talib.HT_DCPHASE(close); Hilbert Transform - Phasor Components = talib.HT_PHASOR(close); Hilbert Transform - SineWave = talib.HT_SINE(close) - Ehlers filters (Swiss Army Knife) (SWAK_BP): A family of filters that keep only the fast part, the slow part, or one band of a price series. Call: talib.SWAK_BP(close, timeperiod=20, delta=0.1) Definition: The band-pass row of John Ehlers' Swiss Army Knife filter: a cycle extractor that keeps a band of periods around a chosen centre and removes everything on both sides of it. Usual reading: Use the band-pass to see cycles and the low-pass to smooth. Misleads when: They are tools for building indicators, not signals. Needs: closing prices. Needs the TA-Lib library. Variants: Swiss Army Knife - High-Pass Filter = talib.SWAK_HP(close, timeperiod=20); Swiss Army Knife - Two-Pole High-Pass Filter = talib.SWAK_2PHP(close, timeperiod=20); Swiss Army Knife - Butterworth Filter = talib.SWAK_BUTTER(close, timeperiod=20); Swiss Army Knife - Gaussian Filter = talib.SWAK_GAUSS(close, timeperiod=20) ### Market breadth: Is the whole market moving, or just a few stocks? - Advance-decline line: Are most stocks taking part in the move, or only a few? Definition: Running total of (number of advancing stocks - number of declining stocks) each day for the chosen market. Usual reading: Index rising while the line falls = a narrow, weak rally. Misleads when: It describes the whole market, not one stock. Needs: whole-market data. - McClellan oscillator: Momentum of market breadth. Definition: EMA(19) of daily (advancers - decliners) minus EMA(39) of the same series. Usual reading: Crossing above zero = breadth improving. Beyond +100 or -100 = extreme. Misleads when: Not for short timeframes. Needs: whole-market data. - Percent of stocks above their 200-day average: How healthy the broad market is. Definition: Share of the index's member stocks whose close is above their own 200-day simple moving average. Usual reading: Below 20% = washout. Above 80% = stretched. Misleads when: Poor for exact timing. Needs: whole-market data. - Put/call ratio: Crowd fear versus greed in the options market. Definition: Total put volume divided by total call volume for the chosen market (equity or index options). Usual reading: Extremes are contrarian signals. Misleads when: On normal days it says little. Needs: whole-market data. Educational material, not investment advice. TA-Lib is BSD-licensed: https://github.com/TA-Lib/ta-lib