Quantitative Qualitative Estimation (QQE)

Calculate the Quantitative Qualitative Estimation (QQE): a smoothed Relative Strength Index with a trailing stop line a multiple of its own average move away, whose crossings show the turns of a trend.

The Quantitative Qualitative Estimation smooths the Relative Strength Index with an exponential average (the fast line) and trails it with a stop line (the QQE, the slow line), placed a multiple of the RSI’s own average move away, in the way an Average True Range stop trails the price. The stop only moves towards the RSI while the RSI moves away from it and jumps to the other side when the RSI crosses it, so the RSI crossing the QQE line marks a change of trend. The QQE is a community indicator of the MetaTrader platform without a published primary source.

The formula is as follows:

\[\text{RSI Moving Average} = \operatorname{EMA}(\operatorname{RSI}(\text{Close},\; \text{window}),\; \text{smooth\_window})\] \[\text{Average Move} = \operatorname{EMA}(\operatorname{EMA}(\left|\text{RSI Moving Average}(t) - \text{RSI Moving Average}(t - 1)\right|,\; 2 \cdot \text{window} - 1),\; 2 \cdot \text{window} - 1)\] \[\text{Distance} = \text{multiplier} \cdot \text{Average Move}\] \[\operatorname{QQE}(t) = \max(\operatorname{QQE}(t - 1),\; \text{RSI Moving Average}(t) - \operatorname{Distance}(t)) \;\text{while the RSI Moving Average stays above QQE}\] \[\operatorname{QQE}(t) = \min(\operatorname{QQE}(t - 1),\; \text{RSI Moving Average}(t) + \operatorname{Distance}(t)) \;\text{while it stays below QQE}\] \[\operatorname{QQE}(t) = \text{RSI Moving Average}(t) - / + \operatorname{Distance}(t) \;\text{on the period it crosses QQE}\]

The EMA over 2 * window - 1 periods has the smoothing constant 1 / window of Wilder’s average. The common parameters are 14, 5 and 4.236.

Also known as: QQE, QQE fast and slow line.

Example · AAPL, MSFT · 2024 to 2025

Install the Finance Toolkit with pip install financetoolkit -U, then call get_quantitative_qualitative_estimation:

from financetoolkit import Toolkit

toolkit = Toolkit(
    tickers=["AAPL", "MSFT"],
    api_key="FINANCIAL_MODELING_PREP_KEY",
    start_date="2024-01-01",
    end_date="2025-12-31",
)

toolkit.technicals.get_quantitative_qualitative_estimation().xs("AAPL", level=1, axis="columns")

Or, with the Finance Toolkit MCP set up, ask an AI assistant such as Claude or ChatGPT:

What did the Quantitative Qualitative Estimation (QQE) of Apple show in 2025?

Which returns:

Parameters

get_quantitative_qualitative_estimation accepts the following parameters.

ParameterTypeDescriptionExample
periodstrThe time period to consider for historical data. Options are: “intraday” (intraday prices), “daily” (daily prices), “weekly” (weekly prices), “monthly” (monthly prices), “quarterly” (quarterly prices), “yearly” (yearly prices). Defaults to “daily”."weekly"
close_columnstrThe column name for closing prices in the historical data. Defaults to “Adj Close”."Close"
windowintThe number of periods of the RSI. Defaults to 14.20
smooth_windowintThe number of periods of the EMA of the RSI. Defaults to 5.5
multiplierfloatThe multiple of the average move of the RSI Moving Average that sets the distance of the QQE line. Defaults to 4.236.2.0
roundingint | NoneThe number of decimals to round the results to. Defaults to None, which uses the rounding of the Toolkit (4 unless set otherwise).2
growthboolWhether to calculate the growth of the QQE and RSI Moving Average. Defaults to False.True
lagint | list[int]The lag to use for the growth calculation. Defaults to 1.4
standardizeboolWhether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False.True
show_columnsstr | list[str] | NoneThe columns to keep, a name or a list of names, matched on every column level, or the rows when no column has those names (such as the line items of a financial statement). Names that do not exist are logged, and when none exist the result is returned in full. Defaults to None, which keeps every column.None, which keeps every column

References

  • Library Referenced against pandas-ta-classic’s qqe
Share