Getting indicators based on smart money concepts or ICT
Project description
Smart Money Concepts (smc) BETA
The Smart Money Concepts Python Indicator is a sophisticated financial tool developed for traders and investors to gain insights into market sentiment, trends, and potential reversals. This indicator is built using Python, a versatile programming language known for its data analysis and visualization capabilities.
Installation
pip install smartmoneyconcepts
Usage
from smartmoneyconcepts import smc
Prepare data to use with smc:
smc expects properly formated ohlc DataFrame, with column names in lowercase: ["open", "high", "low", "close"] and ["volume"] for indicators that expect ohlcv input.
Indicators
Fair Value Gap (FVG)
smc.fvg(ohlc)
A fair value gap is when the previous high is lower than the next low if the current candle is bullish. Or when the previous low is higher than the next high if the current candle is bearish.
returns: FVG = 1 if bullish fair value gap, -1 if bearish fair value gap Top = the top of the fair value gap Bottom = the bottom of the fair value gap MitigatedIndex = the index of the candle that mitigated the fair value gap
Swing Highs and Lows
smc.swing_highs_lows(ohlc, swing_length = 50)
A swing high is when the current high is the highest high out of the swing_length amount of candles before and after. A swing low is when the current low is the lowest low out of the swing_length amount of candles before and after.
parameters: swing_length: int - the amount of candles to look back and forward to determine the swing high or low
returns: HighLow = 1 if swing high, -1 if swing low Level = the level of the swing high or low
Break of Structure (BOS) & Change of Character (CHoCH)
smc.bos_choch(ohlc, swing_highs_lows, close_break = True)
These are both indications of market structure changing
parameters: swing_highs_lows: DataFrame - provide the dataframe from the swing_highs_lows function close_break: bool - if True then the break of structure will be mitigated based on the close of the candle otherwise it will be the high/low.
returns: BOS = 1 if bullish break of structure, -1 if bearish break of structure CHOCH = 1 if bullish change of character, -1 if bearish change of character Level = the level of the break of structure or change of character BrokenIndex = the index of the candle that broke the level
Order Blocks (OB)
smc.ob(ohlc, swing_highs_lows, close_mitigation = False)
This method detects order blocks when there is a high amount of market orders exist on a price range.
parameters: swing_highs_lows: DataFrame - provide the dataframe from the swing_highs_lows function close_mitigation: bool - if True then the order block will be mitigated based on the close of the candle otherwise it will be the high/low.
returns: OB = 1 if bullish order block, -1 if bearish order block Top = top of the order block Bottom = bottom of the order block OBVolume = volume + 2 last volumes amounts Percentage = strength of order block (min(highVolume, lowVolume)/max(highVolume,lowVolume))
Liquidity
smc.liquidity(ohlc, swing_highs_lows, range_percent = 0.01)
Liquidity is when there are multiply highs within a small range of each other. or multiply lows within a small range of each other.
parameters: swing_highs_lows: DataFrame - provide the dataframe from the swing_highs_lows function range_percent: float - the percentage of the range to determine liquidity
returns: Liquidity = 1 if bullish liquidity, -1 if bearish liquidity Level = the level of the liquidity End = the index of the last liquidity level Swept = the index of the candle that swept the liquidity
Contributing
This project is still in BETA so please feel free to contribute to the project. By creating your own indicators or improving the existing ones.
- Fork it (https://github.com/joshyattridge/smartmoneyconcepts/fork).
- Study how it's implemented.
- Create your feature branch (git checkout -b my-new-feature).
- Commit your changes (git commit -am 'Add some feature').
- Push to the branch (git push origin my-new-feature).
- Create a new Pull Request.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for smartmoneyconcepts-0.0.15.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e85ddb64d9b7df73a16e036cfa0aae89ae6d6b9451b107bd402e559a62bac58 |
|
MD5 | 6d9cd3ef491f1d51a93f663e55c42b7b |
|
BLAKE2b-256 | 2a5cd38e3c0a82b998d1218679ad57f7bb828a265cabca4927528bea026d7b47 |
Hashes for smartmoneyconcepts-0.0.15-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2713976baf1100cea837b710c0617296827ce3e33cc0edf8237a573a0240154e |
|
MD5 | 1e481735f3a113355d656dc1d94c5275 |
|
BLAKE2b-256 | 8349feac07efea72bee67dfbac40e2bf4f08b8a75aee08cd2ea3b56e4cabd76f |