Typical Price

Haiyue
11min

I. What is Typical Price

Typical Price (TP) is the arithmetic mean of the high, low, and close prices of each bar. It is one of the most important price transforms in technical analysis and serves as the core input for numerous classic indicators.

Historical Background

The concept of Typical Price can be traced back to the formative period of technical analysis in the mid-20th century. Its widespread adoption was driven by Donald Lambert’s invention of the Commodity Channel Index (CCI) in 1980, which explicitly uses Typical Price as its calculation basis. Subsequently, Gene Quong and Avrum Soudack also chose Typical Price as the core price input when they created the Money Flow Index (MFI) in 1989.

Propelled by these classic indicators, Typical Price became the standard representation of the “three-price average” in technical analysis, and virtually every technical analysis software platform includes it as a built-in price type.

Indicator Classification

  • Type: Overlay indicator, plotted directly on the price chart
  • Category: Other Overlay / Price Transform
  • Default Parameters: No parameters; calculated independently for each bar
  • Data Requirements: Requires High, Low, and Close data
Why is the Close Price Included?

Compared to Median Price, which uses only High and Low, Typical Price additionally incorporates the close price. The close represents the final consensus of a trading period, so Typical Price preserves price range information while also accounting for the importance of “final pricing.”


II. Mathematical Principles and Calculation

Core Formula

Typical Price is the arithmetic mean of three prices:

TPt=Ht+Lt+Ct3TP_t = \frac{H_t + L_t + C_t}{3}

Where:

  • HtH_t is the high price of bar tt
  • LtL_t is the low price of bar tt
  • CtC_t is the close price of bar tt

Step-by-Step Calculation

  1. Obtain three prices: Read the bar’s High, Low, and Close.
  2. Sum: Add the three values Ht+Lt+CtH_t + L_t + C_t.
  3. Divide by 3: Obtain the typical price.
  4. Calculate independently per bar: No dependency on any historical data.

Weight Analysis

In Typical Price, each of the three prices accounts for 1333.3%\frac{1}{3} \approx 33.3\% of the weight. Since Close typically falls between High and Low, Typical Price can be understood as:

TPt=Ht+Lt2×23+Ct×13=MPt×23+Ct×13TP_t = \frac{H_t + L_t}{2} \times \frac{2}{3} + C_t \times \frac{1}{3} = MP_t \times \frac{2}{3} + C_t \times \frac{1}{3}

That is, Typical Price is the weighted average of Median Price (weight 2/3) and Close (weight 1/3).

Deviation from Median Price

TPtMPt=CtMPt3=CtHt+Lt23TP_t - MP_t = \frac{C_t - MP_t}{3} = \frac{C_t - \frac{H_t + L_t}{2}}{3}

  • When Ct>MPtC_t > MP_t (close in the upper half of the bar range): TPt>MPtTP_t > MP_t, typical price is above median price
  • When Ct<MPtC_t < MP_t (close in the lower half of the bar range): TPt<MPtTP_t < MP_t, typical price is below median price
  • The deviation magnitude is 13\frac{1}{3} of the distance the close deviates from the midpoint
Understanding TP’s Bias Direction

Typical Price always shifts toward the close price. If a bar has a very long upper shadow (close is near the bottom), TP will be lower than MP because the close’s “pull” biases TP downward. This is precisely the additional information TP conveys compared to MP — the directional tendency of the close.


III. Python Implementation

import numpy as np
import pandas as pd

def typical_price(high: pd.Series, low: pd.Series,
                  close: pd.Series) -> pd.Series:
    """
    Calculate Typical Price

    Parameters
    ----------
    high : pd.Series
        High price series
    low : pd.Series
        Low price series
    close : pd.Series
        Close price series

    Returns
    -------
    pd.Series
        Typical price series
    """
    result = (high + low + close) / 3.0
    result.name = "TypicalPrice"
    return result


def typical_price_numpy(high: np.ndarray, low: np.ndarray,
                        close: np.ndarray) -> np.ndarray:
    """
    Calculate Typical Price using numpy
    """
    return (high + low + close) / 3.0


# ========== Usage Example ==========
if __name__ == "__main__":
    np.random.seed(42)
    dates = pd.date_range("2024-01-01", periods=120, freq="D")
    price = 100 + np.cumsum(np.random.randn(120) * 0.5)

    df = pd.DataFrame({
        "date": dates,
        "open":  price + np.random.randn(120) * 0.2,
        "high":  price + np.abs(np.random.randn(120) * 0.8),
        "low":   price - np.abs(np.random.randn(120) * 0.8),
        "close": price + np.random.randn(120) * 0.15,
        "volume": np.random.randint(1000, 10000, size=120),
    })
    df.set_index("date", inplace=True)

    # Calculate Typical Price
    df["tp"] = typical_price(df["high"], df["low"], df["close"])

    # Also calculate Median Price for comparison
    df["mp"] = (df["high"] + df["low"]) / 2

    # Deviation analysis between TP and MP
    df["tp_mp_diff"] = df["tp"] - df["mp"]

    print("=== Typical Price vs Median Price Comparison ===")
    print(df[["high", "low", "close", "tp", "mp", "tp_mp_diff"]].tail(10))

    # Use TP to calculate CCI (simplified version)
    period = 20
    df["tp_sma"] = df["tp"].rolling(window=period).mean()
    df["tp_mad"] = df["tp"].rolling(window=period).apply(
        lambda x: np.mean(np.abs(x - x.mean())), raw=True
    )
    df["CCI"] = (df["tp"] - df["tp_sma"]) / (0.015 * df["tp_mad"])

    print("\n=== CCI(20) Based on Typical Price ===")
    print(df[["close", "tp", "CCI"]].tail(15))

    # Use TP to calculate MFI (simplified version)
    df["mf"] = df["tp"] * df["volume"]  # Money Flow
    df["mf_positive"] = np.where(df["tp"] > df["tp"].shift(1), df["mf"], 0)
    df["mf_negative"] = np.where(df["tp"] < df["tp"].shift(1), df["mf"], 0)

    mfr = (df["mf_positive"].rolling(14).sum()
           / df["mf_negative"].rolling(14).sum().replace(0, np.nan))
    df["MFI"] = 100 - 100 / (1 + mfr)

    print("\n=== MFI(14) Based on Typical Price ===")
    print(df[["close", "tp", "volume", "MFI"]].tail(10))

IV. Problems the Indicator Solves

1. Standard Input for Core Indicators

Typical Price is the “official” input source for many classic indicators:

IndicatorHow TP is Used
CCI (Commodity Channel Index)CCI=TPSMA(TP)0.015×MAD(TP)CCI = \frac{TP - SMA(TP)}{0.015 \times MAD(TP)}
MFI (Money Flow Index)MF=TP×VolumeMF = TP \times Volume; positive/negative flow determined by TP change direction
VWAPVWAP=TP×VVVWAP = \frac{\sum TP \times V}{\sum V}
Pivot PointsPivot=H+L+C3=TPPivot = \frac{H + L + C}{3} = TP

2. Provides a Balanced Price Representation

Typical Price achieves a good balance across three dimensions:

  • Price range: Reflects intraday volatility range through High and Low
  • Market consensus: Reflects the final pricing through Close
  • Balanced weighting: Each factor accounts for 1/3, without overemphasizing any single element

3. Support/Resistance Calculation (Pivot Points)

The classic Pivot Points system directly uses Typical Price as the pivot:

Pivot=TP=Hprev+Lprev+Cprev3Pivot = TP = \frac{H_{prev} + L_{prev} + C_{prev}}{3} R1=2×PivotLprevR_1 = 2 \times Pivot - L_{prev} S1=2×PivotHprevS_1 = 2 \times Pivot - H_{prev}

4. Money Flow Analysis

In money flow indicators such as MFI, the per-bar change direction of TP is used to determine capital inflow/outflow:

  • TPt>TPt1TP_t > TP_{t-1} indicates positive money flow (buyer-dominated)
  • TPt<TPt1TP_t < TP_{t-1} indicates negative money flow (seller-dominated)
Note

The difference between Typical Price and Close is usually small during stable trends. The difference becomes more pronounced in ranging markets, where bar shadows cause noticeable deviations between TP and Close. If your strategy primarily operates in trending conditions, substituting TP for Close may not yield significant improvement.


V. Advantages, Disadvantages, and Use Cases

Advantages

AdvantageDescription
Multi-dimensional informationSimultaneously reflects the price range (H, L) and final consensus (C)
Industry standardThe standard input for CCI, MFI, VWAP, Pivot Points, and more
Simple computationRequires only one addition and one division, no parameters
More stable than CloseLess affected by extreme closing prices than pure Close

Disadvantages

DisadvantageDescription
No open price informationLacks Open data compared to Average Price
Equal weight assumptionH, L, C are each weighted at 1/3, though Close may be more important
No independent signalsDoes not generate any buy/sell signals on its own
Long shadow sensitivityExtreme High or Low values will skew TP

Use Cases

  • CCI/MFI indicator calculation: These indicators explicitly require Typical Price as input
  • Pivot Points systems: The foundation for day traders calculating support/resistance levels
  • VWAP calculation: An institutional-grade price benchmark
  • Custom indicator development: When a more balanced price input than Close is needed

Comparison with Other Price Types

ComparisonTypical PriceAverage PriceMedian PriceWeighted Close
Formula(H+L+C)/3(O+H+L+C)/4(H+L)/2(H+L+2C)/4
Close weight33.3%25%0%50%
Includes OpenNoYesNoNo
Classic usageCCI, MFI, VWAPHeikin-Ashi CloseChannel midlineClose substitute
Practical Tips
  1. When using CCI or MFI, ensure you use Typical Price as the input — this is the standard definition for these indicators, and using other price sources will alter their statistical properties.
  2. When developing custom oscillators, try Typical Price as the input first; it often outperforms Close in terms of balance and stability.
  3. For intraday trading, using the previous day’s Typical Price to calculate Pivot Points is one of the most classic methods.
  4. If you need to further increase the weight of the close price, consider using Weighted Close = (H+L+2C)/4(H+L+2C)/4.