How savvibrax/smartmoneyconcepts-py works
Main Components
• Library Package ("smartmoneyconcepts"): This is the core of the project. It contains the main module (SMC.py) that implements the various indicator functions.
• Data Input: Although the library itself does not handle data ingestion, it expects an OHLC or OHLCV DataFrame from an external source. Represent this as an “Input Data” component.
• Indicator Functions: Inside the SMC.py, functions for each indicator are defined. Consider breaking these out into separate “function blocks” if needed (FVG, highs_lows, bos_choch, ob, liquidity).
• Tests: The tests directory holds example CSV files and test scripts (e.g., SMC.test.py, SMC.test_binance.py) which validate the functionalities. This represents your “verification and usage examples” layer.
• Packaging & Distribution: Represent components relating to setup.py and metadata (egg-info) showing that it’s a pip-installable package.
Relationships and Interactions
• The “Input Data” component (data provider) sends the OHLC/OHLCV DataFrame into the library functions.
• The “Indicator Functions” process the data and output the calculated values or signals.
• The library is consumed by client code (end-user code that imports the package as shown in the usage documentation) and tested through unit tests.
• The tests component simulates various inputs (using CSV data), invokes the library functions, and validates outcomes, ensuring the reliability of the indicator calculations.
Architectural Patterns and Design Principles
• Modularity: The design follows a modular structure where the main business logic is encapsulated within the “smartmoneyconcepts” package.
• Separation of Concerns: Indicator functions are clearly separated from data input and test components, which helps maintain clarity and eases future enhancements or contributions.
• Extensibility: The README mentions that new indicators can be added, so the architecture should be depicted to allow additional indicator modules or functions within the central package.
Relevant Technologies & Libraries
• Python: The core programming language.
• Pandas (implied): Used for managing OHLC/OHLCV DataFrames.
• External Code Quality Tools: Mention of the black code formatter in the contribution guidelines.
• Testing Framework: Implied unit testing framework for the files in the tests directory (e.g., pytest or unittest).
Elements
• A connection from the module to the “Client Code / Application Layer” that imports and uses the functions.