Retrieves the support and resistance levels for the specified period and assets.

The Support and Resistance Levels are price levels where the price tends to stop and reverse.

  • Support Levels: These are the valleys where the price tends to stop going down and may start to go up. Think of support levels as “floors” that the price has trouble falling below.
  • Resistance Levels: These are the peaks where the price tends to stop going up and may start to go down. Think of resistance levels as “ceilings” that the price has trouble breaking through.

It does so by:

  • Looking for Peaks and Valleys: The function looks at the stock prices and finds the high points (peaks) and low points (valleys) over time.
  • Grouping Similar Peaks and Valleys: Sometimes, prices will stop at similar points multiple times. The function groups these similar peaks and valleys together to identify key resistance and support levels.

The formula is as follows:

\[\text{Peak} (t) = \text{Close} (t) \text{if Close} (t) > \text{every Close within}\; \text{window} \;\text{periods before and after}\; t (14 \;\text{by default})\] \[\text{Valley} (t) = \text{Close} (t) \text{if Close} (t) < \text{every Close within}\; \text{window} \;\text{periods before and after}\; t\] \[\text{Level} = (\text{Existing Level} + \text{Peak or Valley}) / 2 \;\text{if} | \text{Peak or Valley} - \text{Existing Level} | / | \text{Existing Level} | < \text{Sensitivity} (0.05 \;\text{by default}),\;\; \text{otherwise a new level at the Peak or Valley}\] \[\text{Resistance} (t) = \text{the most recent level from the peaks published up to}\; t,\;\; \text{and Support (t) the same for the valleys},\;\; \text{with each level published window periods after its peak or valley (when it is confirmed)}\]

Where Close is the close_column, the Adj Close by default (the Close for intraday data).

Also known as: support levels, resistance levels, pivot points.

Support/Resistance Levels in Python or via the MCP

Install the Finance Toolkit with:

pip install financetoolkit -U

Then call get_support_resistance_levels as shown below.

from financetoolkit import Toolkit

toolkit = Toolkit(
    tickers=["GCUSD"],
    api_key="FINANCIAL_MODELING_PREP_KEY",
    start_date="2021-01-01",
    end_date="2025-12-31",
)

toolkit.technicals.get_support_resistance_levels().xs("GCUSD", level=1, axis="columns").tail(5)

Or, after setting up the Finance Toolkit MCP, ask:

Which support and resistance levels did gold establish from 26 to 31 December 2025?

Which returns:

Date Resistance Support
2025-12-26 4359.4 3960.5
2025-12-28 4359.4 3960.5
2025-12-29 4359.4 3960.5
2025-12-30 4359.4 3960.5
2025-12-31 4359.4 3960.5

Parameters

get_support_resistance_levels accepts the following parameters.

ParameterTypeDescriptionExample
sensitivityfloatThe sensitivity parameter to determine the significance of the peaks and valleys. A higher sensitivity value will result in fewer support and resistance levels being identified. Defaults to 0.05.0.1
periodstrThe time period to consider for historical data. Can be “intraday”, “daily”, “weekly”, “monthly”, “quarterly” or “yearly”. Defaults to “daily”."weekly"
close_columnstrThe column name for closing prices in the historical data. Defaults to “Adj Close”."Close"
windowintNumber of periods for calculating support and resistance levels. The number of periods (time intervals) over which to calculate the support and resistance levels. Defaults to 14.20
roundingint | NoneThe number of decimals to round the results to. If None, the rounding value specified during the initialization of the Toolkit instance will be used. Defaults to None.2
growthboolWhether to calculate the growth of the levels. 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
Share