Skip to content

Latest commit

 

History

History
41 lines (31 loc) · 812 Bytes

README.md

File metadata and controls

41 lines (31 loc) · 812 Bytes

Xarizmi

Xarizmi (read Khwarizmi) project is an educational project that contains tools for technical analysis in Python.

Installation

pip install xarizmi

Example

Build Candlestick

from xarizmi.candlestick import Candlestick
c = Candlestick(
    **{
        "open": 2,
        "low": 1,
        "high": 4,
        "close": 3,
    }
)

Indicators

OBV Indicator

from xarizmi.candlestick import CandlestickChart
from xarizmi.ta.obv import OBVIndicator

# assuming btc_usdt_monthly_data is defined (similar to tests/conftest.py)
c = CandlestickChart.model_validate({"candles": btc_usdt_monthly_data})

obv_indicator = OBVIndicator(candlestick_chart=c, volume='amount')
obv_indicator.compute()
print(obv_indicator.indicator_data)
obv_indicator.plot()