smartmoneyconcepts


Namesmartmoneyconcepts JSON
Version 0.0.18 PyPI version JSON
download
home_pagehttps://github.com/joshyattridge/smartmoneyconcepts
SummaryGetting indicators based on smart money concepts or ICT
upload_time2024-04-21 19:52:47
maintainerNone
docs_urlNone
authorJoshua Attridge
requires_pythonNone
licenseNone
keywords smart money concepts ict indicators trading forex stocks crypto order blocks liquidity
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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 inspired by Inner Circle Trader (ICT) concepts like Order blocks, Liquidity, Fair Value Gap, Swing Highs and Lows, Break of Structure, Change of Character, and more. Please Take a look and contribute to the project.

![alt text](https://github.com/joshyattridge/smart-money-concepts/blob/53dd0b0a5e598d04b0cd3d10af71a0c252ad850d/tests/test_binance.png)

## Installation

```bash
pip install smartmoneyconcepts
```

## Usage

```python
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)

```python
smc.fvg(ohlc, join_consecutive=False)
```

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.

parameters:<br>
join_consecutive: bool - if there are multiple FVG in a row then they will be merged into one using the highest top and the lowest bottom<br>

returns:<br>
FVG = 1 if bullish fair value gap, -1 if bearish fair value gap<br>
Top = the top of the fair value gap<br>
Bottom = the bottom of the fair value gap<br>
MitigatedIndex = the index of the candle that mitigated the fair value gap<br>

### Swing Highs and Lows

```python
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:<br>
swing_length: int - the amount of candles to look back and forward to determine the swing high or low<br>

returns:<br>
HighLow = 1 if swing high, -1 if swing low<br>
Level = the level of the swing high or low<br>

### Break of Structure (BOS) & Change of Character (CHoCH)

```python
smc.bos_choch(ohlc, swing_highs_lows, close_break = True)
```

These are both indications of market structure changing

parameters:<br>
swing_highs_lows: DataFrame - provide the dataframe from the swing_highs_lows function<br>
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.<br>

returns:<br>
BOS = 1 if bullish break of structure, -1 if bearish break of structure<br>
CHOCH = 1 if bullish change of character, -1 if bearish change of character<br>
Level = the level of the break of structure or change of character<br>
BrokenIndex = the index of the candle that broke the level<br>

### Order Blocks (OB)

```python
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:<br>
swing_highs_lows: DataFrame - provide the dataframe from the swing_highs_lows function<br>
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:<br>
OB = 1 if bullish order block, -1 if bearish order block<br>
Top = top of the order block<br>
Bottom = bottom of the order block<br>
OBVolume = volume + 2 last volumes amounts<br>
Percentage = strength of order block (min(highVolume, lowVolume)/max(highVolume,lowVolume))<br>

### Liquidity

```python
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:<br>
swing_highs_lows: DataFrame - provide the dataframe from the swing_highs_lows function<br>
range_percent: float - the percentage of the range to determine liquidity<br>

returns:<br>
Liquidity = 1 if bullish liquidity, -1 if bearish liquidity<br>
Level = the level of the liquidity<br>
End = the index of the last liquidity level<br>
Swept = the index of the candle that swept the liquidity<br>

### Previous High And Low

```python
smc.previous_high_low(ohlc, time_frame = "1D")
```

This method returns the previous high and low of the given time frame.

parameters:<br>
time_frame: str - the time frame to get the previous high and low 15m, 1H, 4H, 1D, 1W, 1M<br>

returns:<br>
PreviousHigh = the previous high<br>
PreviousLow = the previous low<br>

## 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. If you are stuggling to find something to do then please check out the issues tab for requested changes.

1. Fork it (https://github.com/joshyattridge/smartmoneyconcepts/fork).
2. Study how it's implemented.
3. Create your feature branch (git checkout -b my-new-feature).
4. Commit your changes (git commit -am 'Add some feature').
5. Push to the branch (git push origin my-new-feature).
6. Create a new Pull Request.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/joshyattridge/smartmoneyconcepts",
    "name": "smartmoneyconcepts",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "smart, money, concepts, ict, indicators, trading, forex, stocks, crypto, order, blocks, liquidity",
    "author": "Joshua Attridge",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/7b/ff/026d0118bc3c08b0ba2eb7ad6039f85626693441f0e2c5c4ea5cfea7f10b/smartmoneyconcepts-0.0.18.tar.gz",
    "platform": null,
    "description": "# Smart Money Concepts (smc) BETA\n\nThe 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 inspired by Inner Circle Trader (ICT) concepts like Order blocks, Liquidity, Fair Value Gap, Swing Highs and Lows, Break of Structure, Change of Character, and more. Please Take a look and contribute to the project.\n\n![alt text](https://github.com/joshyattridge/smart-money-concepts/blob/53dd0b0a5e598d04b0cd3d10af71a0c252ad850d/tests/test_binance.png)\n\n## Installation\n\n```bash\npip install smartmoneyconcepts\n```\n\n## Usage\n\n```python\nfrom smartmoneyconcepts import smc\n```\n\nPrepare data to use with smc:\n\nsmc expects properly formated ohlc DataFrame, with column names in lowercase: [\"open\", \"high\", \"low\", \"close\"] and [\"volume\"] for indicators that expect ohlcv input.\n\n## Indicators\n\n### Fair Value Gap (FVG)\n\n```python\nsmc.fvg(ohlc, join_consecutive=False)\n```\n\nA fair value gap is when the previous high is lower than the next low if the current candle is bullish.\nOr when the previous low is higher than the next high if the current candle is bearish.\n\nparameters:<br>\njoin_consecutive: bool - if there are multiple FVG in a row then they will be merged into one using the highest top and the lowest bottom<br>\n\nreturns:<br>\nFVG = 1 if bullish fair value gap, -1 if bearish fair value gap<br>\nTop = the top of the fair value gap<br>\nBottom = the bottom of the fair value gap<br>\nMitigatedIndex = the index of the candle that mitigated the fair value gap<br>\n\n### Swing Highs and Lows\n\n```python\nsmc.swing_highs_lows(ohlc, swing_length = 50)\n```\n\nA swing high is when the current high is the highest high out of the swing_length amount of candles before and after.\nA swing low is when the current low is the lowest low out of the swing_length amount of candles before and after.\n\nparameters:<br>\nswing_length: int - the amount of candles to look back and forward to determine the swing high or low<br>\n\nreturns:<br>\nHighLow = 1 if swing high, -1 if swing low<br>\nLevel = the level of the swing high or low<br>\n\n### Break of Structure (BOS) & Change of Character (CHoCH)\n\n```python\nsmc.bos_choch(ohlc, swing_highs_lows, close_break = True)\n```\n\nThese are both indications of market structure changing\n\nparameters:<br>\nswing_highs_lows: DataFrame - provide the dataframe from the swing_highs_lows function<br>\nclose_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.<br>\n\nreturns:<br>\nBOS = 1 if bullish break of structure, -1 if bearish break of structure<br>\nCHOCH = 1 if bullish change of character, -1 if bearish change of character<br>\nLevel = the level of the break of structure or change of character<br>\nBrokenIndex = the index of the candle that broke the level<br>\n\n### Order Blocks (OB)\n\n```python\nsmc.ob(ohlc, swing_highs_lows, close_mitigation = False)\n```\n\nThis method detects order blocks when there is a high amount of market orders exist on a price range.\n\nparameters:<br>\nswing_highs_lows: DataFrame - provide the dataframe from the swing_highs_lows function<br>\nclose_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.\n\nreturns:<br>\nOB = 1 if bullish order block, -1 if bearish order block<br>\nTop = top of the order block<br>\nBottom = bottom of the order block<br>\nOBVolume = volume + 2 last volumes amounts<br>\nPercentage = strength of order block (min(highVolume, lowVolume)/max(highVolume,lowVolume))<br>\n\n### Liquidity\n\n```python\nsmc.liquidity(ohlc, swing_highs_lows, range_percent = 0.01)\n```\n\nLiquidity is when there are multiply highs within a small range of each other.\nor multiply lows within a small range of each other.\n\nparameters:<br>\nswing_highs_lows: DataFrame - provide the dataframe from the swing_highs_lows function<br>\nrange_percent: float - the percentage of the range to determine liquidity<br>\n\nreturns:<br>\nLiquidity = 1 if bullish liquidity, -1 if bearish liquidity<br>\nLevel = the level of the liquidity<br>\nEnd = the index of the last liquidity level<br>\nSwept = the index of the candle that swept the liquidity<br>\n\n### Previous High And Low\n\n```python\nsmc.previous_high_low(ohlc, time_frame = \"1D\")\n```\n\nThis method returns the previous high and low of the given time frame.\n\nparameters:<br>\ntime_frame: str - the time frame to get the previous high and low 15m, 1H, 4H, 1D, 1W, 1M<br>\n\nreturns:<br>\nPreviousHigh = the previous high<br>\nPreviousLow = the previous low<br>\n\n## Contributing\n\nThis project is still in BETA so please feel free to contribute to the project. By creating your own indicators or improving the existing ones. If you are stuggling to find something to do then please check out the issues tab for requested changes.\n\n1. Fork it (https://github.com/joshyattridge/smartmoneyconcepts/fork).\n2. Study how it's implemented.\n3. Create your feature branch (git checkout -b my-new-feature).\n4. Commit your changes (git commit -am 'Add some feature').\n5. Push to the branch (git push origin my-new-feature).\n6. Create a new Pull Request.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Getting indicators based on smart money concepts or ICT",
    "version": "0.0.18",
    "project_urls": {
        "Homepage": "https://github.com/joshyattridge/smartmoneyconcepts"
    },
    "split_keywords": [
        "smart",
        " money",
        " concepts",
        " ict",
        " indicators",
        " trading",
        " forex",
        " stocks",
        " crypto",
        " order",
        " blocks",
        " liquidity"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f3e3caf1800e17df20d0739148f63332b783f2a80a5ec08330c41e8d73675c47",
                "md5": "7d78365f3859c0cc592e98d87963b707",
                "sha256": "d1ef815471db2f90506dc672a31418aeaf3fb2f2b3feda9a4cddd15bc8476173"
            },
            "downloads": -1,
            "filename": "smartmoneyconcepts-0.0.18-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7d78365f3859c0cc592e98d87963b707",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 9575,
            "upload_time": "2024-04-21T19:52:46",
            "upload_time_iso_8601": "2024-04-21T19:52:46.424451Z",
            "url": "https://files.pythonhosted.org/packages/f3/e3/caf1800e17df20d0739148f63332b783f2a80a5ec08330c41e8d73675c47/smartmoneyconcepts-0.0.18-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7bff026d0118bc3c08b0ba2eb7ad6039f85626693441f0e2c5c4ea5cfea7f10b",
                "md5": "c6d88610987c7d21dc7fdde68b2a4b91",
                "sha256": "e21b68f294f83babf02705fe5c4d7593f875e0c4decb1a4fb494596a2fb41d8a"
            },
            "downloads": -1,
            "filename": "smartmoneyconcepts-0.0.18.tar.gz",
            "has_sig": false,
            "md5_digest": "c6d88610987c7d21dc7fdde68b2a4b91",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 10230,
            "upload_time": "2024-04-21T19:52:47",
            "upload_time_iso_8601": "2024-04-21T19:52:47.590952Z",
            "url": "https://files.pythonhosted.org/packages/7b/ff/026d0118bc3c08b0ba2eb7ad6039f85626693441f0e2c5c4ea5cfea7f10b/smartmoneyconcepts-0.0.18.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-21 19:52:47",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "joshyattridge",
    "github_project": "smartmoneyconcepts",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "smartmoneyconcepts"
}
        
Elapsed time: 0.25610s