Library / SDK
joshyattridge/smart-money-concepts avatar
joshyattridge/smart-money-concepts

smart-money-concepts: ICT-based indicators for algorithmic trading in Python

Discover our Python package designed for algorithmic trading. It brings ICT's smart money concepts to Python, offering a range of indicators for your algorithmic trading strategies.

2,067 stars872 forksPythonMIT

At a glance

What is it?
smartmoneyconcepts is a Python library that implements Inner Circle Trader concepts as indicator functions for OHLC DataFrame input. Eight functions cover Fair Value Gap, Swing Highs and Lows, Order Blocks, Liquidity, Sessions, Break of Structure, Change of Character and Retracements.
Who is it for?
smartmoneyconcepts suits Python developers who already have OHLC data in a pandas DataFrame with lowercase columns and want to compute ICT-based indicators. It is not the right fit if you need a backtesting engine, live data connectors, or position sizing: the package returns DataFrames only.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Activity is slowing. The repository last received commits 6 months ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 11, 2026, and from our analysis. They are not legal advice.

Editorial analysis

Installing smartmoneyconcepts and what the pip package delivers

smartmoneyconcepts is available on PyPI. Install it with:

bash
pip install smartmoneyconcepts

Once installed, every indicator function is reached through a single import:

python
from smartmoneyconcepts import smc

setup.py declares three dependencies: pandas>=2.0.2, numpy>=1.24.3, and numba>=0.58.1. All three must be satisfied before the package works. setup.py also lists the package as compatible with Unix, macOS and Windows.

A credit message prints on the first import. To suppress it, set an environment variable before importing:

bash
export SMC_CREDIT=0

The README does not document what the credit message says, whether it repeats on subsequent imports in the same process, or whether the flag persists across Python sessions.

OHLC DataFrame column names must be lowercase before any function call

Every function in the smc interface takes an ohlc DataFrame as its first argument, and the README specifies the column naming convention: all four names must be lowercase. The required names are "open", "high", "low", and "close". Functions that compute on volume require an additional "volume" column, also in lowercase.

The README does not describe what happens when column names differ in case. Many financial data APIs return uppercase column names, and a DataFrame with "Open" instead of "open" will fail when passed to smc functions. No normalization utility appears in the README or in the repository's top-level layout, so that step belongs in your own preprocessing code.

Functions that require volume are those whose README description shows ohlcv in the parameter type rather than ohlc alone. smc.ob is one such function, where the volume column feeds into its OBVolume calculation.

Fair Value Gap: the three-candle condition and the join_consecutive flag

A Fair Value Gap in smartmoneyconcepts follows a specific three-candle definition. A bullish FVG occurs when the previous high is lower than the next low, given the current candle is bullish. A bearish FVG is the mirror: the previous low is higher than the next high, given the current candle is bearish.

python
smc.fvg(ohlc, join_consecutive=False)

The function returns four columns: FVG (1 for bullish, -1 for bearish), Top, Bottom, and MitigatedIndex. MitigatedIndex holds the index of the candle that filled the gap. Once MitigatedIndex is set for a given row, that gap is historical rather than open.

Setting join_consecutive=True merges any consecutive FVGs into a single row, using the highest top and the lowest bottom across the group. The README does not describe how many consecutive FVGs can appear in one merged row or whether there is an upper limit to the merged range.

swing_highs_lows is a prerequisite that feeds four other indicator functions

A swing high in smartmoneyconcepts is the candle whose high is the highest among swing_length candles before and after it. A swing low is the equivalent for the current low.

python
smc.swing_highs_lows(ohlc, swing_length = 50)

The function returns HighLow (1 for swing high, -1 for swing low) and Level (the price at that point). The default swing_length of 50 means each detected swing requires 50 candles of context on both sides. On a short dataset, candles near the start or end of the series will have no swing assignment.

Four other functions take the swing_highs_lows output as a required argument: smc.bos_choch, smc.ob, smc.liquidity, and smc.retracements. That dependency is not highlighted in the README introduction: it appears only in each function's parameter list. Calling any of those four without first running swing_highs_lows will produce a type error.

Order Blocks: OBVolume sums three candles, and Percentage measures their balance

Order block detection requires swing_highs_lows as a prerequisite:

python
smc.ob(ohlc, swing_highs_lows, close_mitigation = False)

The function returns five columns. OB is 1 for bullish, -1 for bearish. Top and Bottom define the order block's price range. OBVolume is computed as the order block candle's volume added to the two candles immediately before it. The README gives this formula as "volume + 2 last volumes amounts."

Percentage is a strength metric: min(highVolume, lowVolume) / max(highVolume, lowVolume). A value close to 1.0 means volume was distributed evenly across the three candles; a lower value indicates one candle dominated. The README does not define a threshold for what qualifies as a strong order block.

close_mitigation controls when the block is marked as mitigated. When False, mitigation triggers when price reaches the high or low of the block. When True, only a candle close beyond that level counts.

Sessions map candles to eight named trading windows or a custom time range

Session detection maps OHLC candles to named trading windows:

python
smc.sessions(ohlc, session, start_time, end_time, time_zone = "UTC")

Eight session names are built in: Sydney, Tokyo, London, New York, Asian kill zone, London open kill zone, New York kill zone, and london close kill zone. The README preserves the exact capitalisation, with london close kill zone appearing in lowercase. For any of the eight built-in names, start_time and end_time are not required. The Custom session name requires both, in "HH:MM" format.

time_zone accepts strings in the format "UTC+0" or "GMT+0". The function returns three columns: Active (1 if the candle is inside the session, 0 if not), High (the session's running high), and Low (the session's running low).

The README does not document how the function handles candles that span a session boundary, or what happens when a time zone offset moves a session window across midnight.

VERSION 0.0.27 in setup.py sits above the most recent GitHub tag of 0.0.26

setup.py at the repository root sets VERSION to "0.0.27". The most recent GitHub tag is 0.0.26, from 2025-03-03. The version string in the source has been incremented above the published tag, which means 0.0.27 is present in the codebase but was not published as a tag at that date.

A second detail in setup.py is the classifiers list. One entry reads "Development Status :: 1 - Planning", the first item in PyPI's development status taxonomy. setup.py also lists "Intended Audience :: Developers" and three operating system classifiers: Unix, MacOS X and Windows. The development status entry has not been changed from its initial value, despite the package having a history of tagged versions going back to at least 0.0.24.

The repository's most recent commit was on 2026-04-03. The package is distributed under MIT, and the author field in setup.py reads "Joshua Attridge".

No execution layer: what the package omits and where TA-Lib differs in scope

smartmoneyconcepts handles indicator computation only. It takes DataFrames, runs the calculations, and returns DataFrames. The package contains no order execution interface, backtesting engine, or position sizing functions. A developer who needs any of those must add a separate component alongside smartmoneyconcepts.

For projects that need classical technical analysis indicators rather than ICT-specific structures, TA-Lib is an established alternative. It provides calculations for RSI, MACD and Bollinger Bands from the same OHLC input format. The difference in scope is direct: TA-Lib does not include Order Blocks, Fair Value Gaps, Kill Zone sessions or Break of Structure, and smart-money-concepts does not include classical oscillators or moving averages.

A pipeline that requires both sets of signals must use both libraries and combine their outputs itself.

Editorial conclusion

smartmoneyconcepts suits Python developers who already have OHLC data in a pandas DataFrame with lowercase columns and want to compute ICT-based indicators. It is not the right fit if you need a backtesting engine, live data connectors, or position sizing: the package returns DataFrames only. Before adding it, verify that numba>=0.58.1 is compatible with your other dependencies; pandas and numpy also have minimum version constraints. The Development Status :: 1 - Planning classifier in setup.py has not been updated from its initial value.

Frequently asked questions

What is smart-money-concepts?

smartmoneyconcepts is a Python library that implements Inner Circle Trader (ICT) indicators for algorithmic trading, including Fair Value Gap, Order Blocks, Swing Highs and Lows, Break of Structure, Change of Character, Liquidity, Sessions and Retracements. It is available on PyPI.

How do I install smart-money-concepts?

Run pip install smartmoneyconcepts from the command line. The package requires pandas>=2.0.2, numpy>=1.24.3, and numba>=0.58.1 as listed in setup.py.

What data format does smart-money-concepts require?

The smc functions expect a pandas DataFrame with lowercase column names. The required column names are "open", "high", "low", and "close". Functions that use volume also require a "volume" column in lowercase.

Does smart-money-concepts include a backtesting engine?

No. The package computes indicators and returns DataFrames. The README and the repository layout include no order execution, simulation, or position sizing functionality.

How do I suppress the credit message in smart-money-concepts?

Set the environment variable SMC_CREDIT=0 before importing the package. The README states this hides the credit message when you first import the library.

Official sources

  1. joshyattridge/smart-money-concepts on GitHub
  2. License: MIT
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/joshyattridge-smart-money-concepts.svg)](https://hysenlabs.com/projects/joshyattridge-smart-money-concepts)