hexital
hexital
Classes:
| Name | Description |
|---|---|
Hexital |
|
Hexital
Hexital(
name: str,
candles: Sequence[Candle],
indicators: (
Sequence[dict[str, Any] | Indicator] | IndicatorCollection | None
) = None,
description: str | None = None,
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
)
Methods:
| Name | Description |
|---|---|
add_indicator |
Add's a new indicator to |
all_series |
Returns a Dictionary of all the Indicators and there results in a list format. |
append |
append a Candle or a chronological ordered list of Candle's to the end of the Hexital Candle's. This wil only re-sample and re-calculate the new Candles, with minor overlap. |
calculate |
Calculates all the missing indicator readings. |
calculate_index |
Calculate specific index for all or specific indicator readings. |
candle_pair |
Return candle streams for comparing two series on this strategy. |
candles |
Get a set of candles by using either a Timeframe or Indicator name |
candles_for |
Return the candle stream for an indicator, timeframe, or OHLCV field. |
exists |
Checks if the given Indicator has a valid reading in latest Candle |
from_settings |
Reconstruct a strategy from a settings dictionary. |
has_sufficient_candles |
Whether registered indicators have enough bars on their candle series. |
indicator |
Searches hexital's indicator's and Returns the Indicator object itself. |
insert |
insert a Candle or a list of Candle's to the Hexital Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
minimum_candles |
Largest |
minimum_candles_by_indicator |
|
minimum_candles_by_timeframe |
Largest |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Hexital Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
purge |
Takes Indicator name and removes all readings for said indicator. |
reading |
Attempts to retrieve a reading with a given Indicator name. |
recalculate |
Purge's all indicator reading's and re-calculates them all, |
remove_indicator |
Removes an indicator from running within hexital |
series |
Find given indicator and returns the readings as a list |
Source code in hexital/core/hexital.py
add_indicator
Add's a new indicator to Hexital strategy.
This accept either Indicator datatypes or dict string versions to be packed.
add_indicator(SMA(period=10)) or add_indicator({"indicator": "SMA", "period": 10})
Does not automatically calculates readings.
Source code in hexital/core/hexital.py
all_series
Returns a Dictionary of all the Indicators and there results in a list format.
append
append a Candle or a chronological ordered list of Candle's to the end of the Hexital Candle's. This wil only re-sample and re-calculate the new Candles, with minor overlap.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
candles
|
Candles
|
The Candle or List of Candle's to appended. |
required |
Source code in hexital/core/hexital.py
calculate
calculate(name: str | None = None)
Calculates all the missing indicator readings.
Source code in hexital/core/hexital.py
calculate_index
Calculate specific index for all or specific indicator readings.
Source code in hexital/core/hexital.py
candle_pair
Return candle streams for comparing two series on this strategy.
Source code in hexital/core/hexital.py
candles
Get a set of candles by using either a Timeframe or Indicator name
Source code in hexital/core/hexital.py
candles_for
Return the candle stream for an indicator, timeframe, or OHLCV field.
Source code in hexital/core/hexital.py
exists
Checks if the given Indicator has a valid reading in latest Candle
from_settings
classmethod
Reconstruct a strategy from a settings dictionary.
Source code in hexital/core/hexital.py
has_sufficient_candles
has_sufficient_candles(timeframe: TimeFramesSource | None = None) -> bool
Whether registered indicators have enough bars on their candle series.
With no timeframe, checks every registered indicator. With a
timeframe, checks only indicators on that series (e.g. "T10",
"DEFAULT").
Source code in hexital/core/hexital.py
indicator
insert
insert a Candle or a list of Candle's to the Hexital Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
candles
|
Candles
|
The Candle or List of Candle's to inserted. |
required |
Source code in hexital/core/hexital.py
minimum_candles
minimum_candles(timeframe: TimeFramesSource | None = None) -> int
Largest minimum_candles among indicators on a candle series.
With no timeframe, considers every registered indicator. With a
timeframe, only indicators on that series (e.g. "T10",
"DEFAULT"). Counts are in that series' bar units — pair with
has_sufficient_candles(timeframe=...) to check readiness.
Source code in hexital/core/hexital.py
minimum_candles_by_indicator
minimum_candles per registered indicator, keyed by name.
Source code in hexital/core/hexital.py
minimum_candles_by_timeframe
Largest minimum_candles per candle series, keyed by timeframe label.
Source code in hexital/core/hexital.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Hexital Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
candles
|
Candles
|
The Candle or List of Candle's to prepend. |
required |
Source code in hexital/core/hexital.py
purge
Takes Indicator name and removes all readings for said indicator. Indicator name must be exact
Source code in hexital/core/hexital.py
reading
reading(source: Source, index: int = -1) -> Reading
Attempts to retrieve a reading with a given Indicator name.
name can use ~hexital.core.constants.NESTED_DELI to find a nested
reading, e.g. MACD_12_26_9:signal
Source code in hexital/core/hexital.py
recalculate
Purge's all indicator reading's and re-calculates them all, ideal for changing an indicator parameters midway.
Source code in hexital/core/hexital.py
remove_indicator
Removes an indicator from running within hexital
series
series(source: Source) -> list[Reading]
Find given indicator and returns the readings as a list
Full Name of the indicator E.G EMA_12 OR MACD_12_26_9:signal