indicators
indicators
Modules:
Classes:
| Name | Description |
|---|---|
ADX |
Average Directional Index - ADX |
AO |
Awesome Oscillator - AO |
AROON |
Aroon - AROON |
ATR |
Average True Range - ATR |
Amorph |
Amorph |
BBANDS |
Bollinger Bands - BBANDS |
BandWidth |
Bollinger BandWidth - BBB |
CCI |
Commodity Channel Index - CCI |
CKSP |
Chande Kroll Stop - CKSP |
CMF |
Chaikin Money Flow - CMF |
CMO |
Chande Momentum Oscillator - CMO |
COPC |
Coppock Curve - COPC |
ChandelierExit |
Chandelier Exit |
Counter |
Counter |
DEMA |
Double Exponential Moving Average - DEMA |
Donchian |
Donchian Channels - Donchian |
EMA |
Exponential Moving Average - EMA |
Fisher |
Fisher Transform - FISHERT |
HL |
Highest Lowest - HL |
HLA |
High Low Average - HLA |
HLCA |
High Low Close Average - HLCA |
HMA |
Hull Moving Average - HMA |
Ichimoku |
Ichimoku Kinko Hyo - ICHIMOKU |
JMA |
Jurik Moving Average Average - JMA |
KAMA |
Kaufman's Adaptive Moving Average - KAMA |
KC |
Keltner Channel - KC |
KST |
Know Sure Thing - KST |
LinearRegression |
Linear Regression - LR |
MACD |
Moving Average Convergence Divergence - MACD |
MFI |
Money Flow Index - MFI |
MOP |
Midpoint Over Period - MOP |
NATR |
Normalized Average True Range - NATR |
OBV |
On-Balance Volume - OBC |
PivotPoints |
Pivot Points - PP |
RMA |
wildeR's Moving Average - RMA |
ROC |
Rate Of Change - ROC |
RSI |
Relative Strength Index - RSI |
RVI |
Relative Vigor Index - RVI |
RegressionChannel |
Regression Channel |
RegressionSlope |
Regression Slope - LRm |
SMA |
Simple Moving Average - SMA |
STDEV |
Rolling Standard Deviation - STDEV |
STDEVT |
Standard Deviation Threshold - STDEVT |
STOCH |
Stochastic - STOCH |
Squeeze |
Squeeze |
SqueezePro |
SqueezePro |
Supertrend |
Supertrend |
TEMA |
Triple Exponential Moving Average - TEMA |
TR |
True Range - TR |
TRIX |
Triple Exponential Average Oscillator - TRIX |
TSI |
True Strength Index - TSI |
UO |
Ultimate Oscillator - UO |
VWAP |
Volume-Weighted Average Price - VWAP |
VWMA |
Volume Weighted Moving Average - VWMA |
Vortex |
Vortex Indicator - VTX |
WMA |
Weighted Moving Average - WMA |
WillR |
William's Percent R - WILLR |
ZScore |
Rolling Z Score - ZS |
ADX
dataclass
ADX(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
period: int = 14,
period_signal: int = 0,
multiplier: float = 100.0
)
Bases: Indicator[dict[str, float | None]]
Average Directional Index - ADX
ADX is a trend strength in a series of prices of a financial instrument.
Sources
https://en.wikipedia.org/wiki/Average_directional_movement_index
Output type: Dict["ADX": float, "DM_Plus": float, "DM_Neg": float]
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
int
|
How many Periods to use. Defaults to 14 |
14
|
period_signal
|
Optional[int]
|
Average Directional Index period. Defaults same as period |
0
|
multiplier
|
float | None
|
ADX smoothing multiplier. Defaults to 100.0 |
100.0
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
AO
dataclass
AO(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
fast: int = 5,
slow: int = 34
)
Bases: Indicator[float | None]
Awesome Oscillator - AO
Awesome Oscillator compares a fast and slow simple moving average of the median price.
Sources
https://tradingstrategy.ai/docs/api/technical-analysis/momentum/help/pandas_ta.momentum.ao.html
Output type: float
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fast
|
int
|
Fast SMA length. Defaults to 5. |
5
|
slow
|
int
|
Slow SMA length. Defaults to 34. |
34
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
AROON
dataclass
AROON(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
period: int = 14
)
Bases: Indicator[dict[str, float | None]]
Aroon - AROON
The Aroon indicator, indicates if a price is trending or is in a trading range. It can also reveal the beginning of a new trend, its strength and can help anticipate changes from trading ranges to trends.
Sources
https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/aroon-indicator
Output type: Dict["AROONU": float, "AROOND": float, "AROONOSC": float]
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
int
|
How many Periods to use. Defaults to 14 |
14
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
ATR
dataclass
ATR(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
period: int = 14
)
Bases: Indicator[float | None]
Average True Range - ATR
Average True Range is used to measure volatility, especially volatility caused by gaps or limit moves.
Sources
https://www.tradingview.com/wiki/Average_True_Range_(ATR)
Output type: float
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
int
|
How many Periods to use. Defaults to 14 |
14
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
Amorph
Bases: Indicator
Amorph
Flexible Skeleton Indicator that will use a method to generate readings on every Candle like indicators.
The given Method is expected to have 'candles' and 'index' as named arguments, EG:
Input type Example: Doji
Output type: Based on analysis method
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
analysis
|
Callable
|
Period to index back in |
required |
args
|
dict | None
|
All of the Arguments as keyword arguments as a dict of keyword arguments for called analysis |
None
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Returns a dict format of how this indicator can be generated |
Source code in hexital/indicators/amorph.py
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
BBANDS
dataclass
BBANDS(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
period: int = 5,
source: Source = "close",
std: float = 2.0
)
Bases: Indicator[dict[str, float | None]]
Bollinger Bands - BBANDS
Bollinger Bands are a type of statistical chart characterizing the prices and volatility over time of a financial instrument or commodity, using a formulaic method.
Sources
https://www.britannica.com/money/bollinger-bands-indicator
Output type: Dict["BBL": float, "BBM": float, "BBU": float]
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
int
|
How many Periods to use. Defaults to 5 |
5
|
source
|
str
|
Which input field to calculate the Indicator. Defaults to "close" |
'close'
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
BandWidth
dataclass
BandWidth(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
period: int = 5,
source: Source = "close",
std: float = 2.0
)
Bases: Indicator[float | None]
Bollinger BandWidth - BBB
BandWidth expresses the Bollinger Band spread relative to the middle band.
Sources
https://tradingstrategy.ai/docs/api/technical-analysis/volatility/help/pandas_ta.volatility.bbands.html
Output type: float
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
int
|
How many periods to use. Defaults to 5. |
5
|
source
|
str
|
Which input field to calculate the indicator from.
Defaults to |
'close'
|
std
|
float
|
Standard deviation multiplier. Defaults to 2.0. |
2.0
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
CCI
dataclass
CCI(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
period: int = 14,
source: Source = "close",
scaling: float = 0.015
)
Bases: Indicator[float | None]
Commodity Channel Index - CCI
The Commodity Channel Index measures the current typical price relative to its rolling mean and mean absolute deviation over a fixed lookback period. It is commonly used to identify overbought, oversold, and trend deviation conditions.
Output type: float
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
int
|
How many periods to use. Defaults to 14 |
14
|
source
|
str
|
Which input field to calculate the indicator from.
Defaults to |
'close'
|
c
|
float
|
Constant scaling factor applied to the mean absolute deviation. Defaults to 0.015 |
required |
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
CKSP
dataclass
CKSP(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
period: int = 10,
multiplier: float = 3.0,
smooth_period: int = 20,
tvmode: bool = True
)
Bases: Indicator[dict[str, float | None]]
Chande Kroll Stop - CKSP
CKSP builds trailing stop bands from ATR and then smooths those raw stop levels with rolling extrema.
Sources
https://tradingstrategy.ai/docs/api/technical-analysis/trend/help/pandas_ta.trend.cksp.html
Output type: Dict["long": float, "short": float]
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
int
|
ATR and primary stop lookback. Defaults to 10.
pandas_ta alias: |
10
|
multiplier
|
float
|
ATR multiplier. Defaults to 3.0.
pandas_ta alias: |
3.0
|
smooth_period
|
int
|
Secondary smoothing lookback. Defaults to 20.
pandas_ta alias: |
20
|
tvmode
|
bool
|
Use TradingView ATR smoothing mode. Defaults to True. |
True
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
CMF
dataclass
CMF(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
period: int = 20
)
Bases: Indicator[float | None]
Chaikin Money Flow - CMF
Chaikin Money Flow measures buying and selling pressure by comparing rolling money flow volume against rolling total volume.
Sources
https://tradingstrategy.ai/docs/api/technical-analysis/volume/help/pandas_ta.volume.cmf.html
Output type: float
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
int
|
Rolling window length. Defaults to 20. |
20
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
CMO
dataclass
CMO(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
period: int = 14,
source: Source = "close"
)
Bases: Indicator[float | None]
Chande Momentum Oscillator - CMO
The CMO indicator is created by calculating the difference between the sum of all recent higher closes and the sum of all recent lower closes and then dividing the result by the sum of all price movement over a given time period. The result is multiplied by 100 to give the -100 to +100 range.
Sources
https://www.fidelity.com/learning-center/trading-investing/technical-analysis/technical-indicator-guide/cmo
Output type: float
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
int
|
How many Periods to use. Defaults to 14 |
14
|
source
|
str
|
Which input field to calculate the Indicator. Defaults to "close" |
'close'
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
COPC
dataclass
COPC(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
period: int = 10,
fast: int = 11,
slow: int = 14
)
Bases: Indicator[float | None]
Coppock Curve - COPC
Coppock Curve is a weighted moving average of the sum of two rate-of-change series.
Sources
https://tradingstrategy.ai/docs/api/technical-analysis/momentum/help/pandas_ta.momentum.coppock.html
Output type: float
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
int
|
WMA smoothing length. Defaults to 10. |
10
|
fast
|
int
|
Fast ROC length. Defaults to 11. |
11
|
slow
|
int
|
Slow ROC length. Defaults to 14. |
14
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
ChandelierExit
dataclass
ChandelierExit(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
period: int = 22,
multiplier: float = 3.0
)
Bases: Indicator[dict[str, float | None]]
Chandelier Exit
Chandelier Exit places trailing stop levels below the rolling high and above the rolling low using an ATR multiple.
Sources
https://chartschool.stockcharts.com/table-of-contents/technical-indicators-and-overlays/technical-overlays/chandelier-exit
Output type: Dict["long": float, "short": float]
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
int
|
Lookback and ATR period. Defaults to 22. |
22
|
multiplier
|
float
|
ATR multiple. Defaults to 3.0. |
3.0
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
Counter
dataclass
Counter(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
source: Source,
count_value: Any = True
)
Counter
Simple Indictor which will count the current streak of a given value, specifically designed for bool values, but useable on any other re-occurring values. E.G Count the streak for current input value == count_value
Output type: float
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
str
|
Which input field to calculate the Indicator. |
required |
count_value
|
bool | int
|
Which value to be counting, E.G |
True
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
DEMA
dataclass
DEMA(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
period: int = 10,
source: Source = "close"
)
Bases: Indicator[float | None]
Double Exponential Moving Average - DEMA
DEMA reduces lag versus a standard EMA by combining an EMA with an EMA of that EMA.
Sources
https://tradingstrategy.ai/docs/api/technical-analysis/overlap/help/pandas_ta.overlap.dema.html
Output type: float
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
int
|
How many periods to use. Defaults to 10. |
10
|
source
|
str
|
Which input field to calculate the indicator from.
Defaults to |
'close'
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
Donchian
dataclass
Donchian(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
period: int = 20
)
Bases: Indicator[dict[str, float | None]]
Donchian Channels - Donchian
Donchian Channels are a technical indicator that seeks to identify bullish and bearish extremes that favor reversals, higher and lower breakouts, breakdowns, and other emerging trends.
Sources
https://upstox.com/learning-center/share-market/a-comprehensive-guide-to-donchian-channels-formula-calculation-and-strategic-uses/ https://en.wikipedia.org/wiki/Donchian_channel
Output type: Dict["DCL": float, "DCM": float, "DCU": float]
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
int
|
How many Periods to use. Defaults to 20 |
20
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
EMA
dataclass
EMA(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
period: int = 10,
source: Source = "close",
smoothing: float = 2.0
)
Bases: Indicator[float | None]
Exponential Moving Average - EMA
The Exponential Moving Average is more responsive moving average compared to the Simple Moving Average (SMA). The weights are determined by alpha which is proportional to it's length.
Sources
https://www.investopedia.com/ask/answers/122314/what-exponential-moving-average-ema-formula-and-how-ema-calculated.asp
Output type: float
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
int
|
How many Periods to use. Defaults to 10 |
10
|
source
|
str
|
Which input field to calculate the Indicator. Defaults to "close" |
'close'
|
smoothing
|
float
|
Smoothing multiplier for EMA. Defaults to 2.0 |
2.0
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
Fisher
dataclass
Fisher(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
period: int = 9,
signal_period: int = 1
)
Bases: Indicator[dict[str, float | None]]
Fisher Transform - FISHERT
Fisher Transform converts price position inside a rolling range into a Gaussian-like oscillator with a lagged signal line.
Sources
https://tradingstrategy.ai/docs/api/technical-analysis/momentum/help/pandas_ta.momentum.fisher.html
Output type: Dict["FISHERT": float, "signal": float]
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
HL
dataclass
HL(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
period: int = 100
)
Bases: Indicator[dict[str, float | None]]
Highest Lowest - HL
Simple utility indicator to record and display the highest and lowest values N periods back.
Output type: Dict["low": float, "high": float]
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
int
|
How many Periods to use. Defaults to 100 |
100
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
HLA
dataclass
HLA(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4
)
High Low Average - HLA
Output type: float
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
HLCA
dataclass
HLCA(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4
)
High Low Close Average - HLCA
Output type: float
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
HMA
dataclass
HMA(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
period: int = 10,
source: Source = "close"
)
Bases: Indicator[float | None]
Hull Moving Average - HMA
It is a combination of weighted moving averages designed to be more responsive to current price fluctuations while still smoothing prices.
Sources
https://school.stockcharts.com/doku.php?id=technical_indicators:hull_moving_average
Output type: float
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
int
|
How many Periods to use. Defaults to 10 |
10
|
source
|
str
|
Which input field to calculate the Indicator. Defaults to "close" |
'close'
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
Ichimoku
dataclass
Ichimoku(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
tenkan: int = 9,
kijun: int = 26,
senkou: int = 52,
include_chikou: bool = True,
offset: int = 0
)
Bases: Indicator[dict[str, float | None]]
Ichimoku Kinko Hyo - ICHIMOKU
Ichimoku is a multi-line trend indicator composed of a conversion line, base line, two leading spans, and an optional chikou span.
This implementation is incremental and does not require future candle data. Shifted components are written to their target candle indexes as new candles arrive, so the chikou span updates older candle readings in place.
Output type: Dict["Lead_A": float, "Lead_B": float, "Conversion": float, "Base": float, "Span": float]
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tenkan
|
int
|
Tenkan period. Defaults to 9 |
9
|
kijun
|
int
|
Kijun period. Defaults to 26 |
26
|
senkou
|
int
|
Senkou period. Defaults to 52 |
52
|
include_chikou
|
bool
|
Include the chikou span. Defaults to True |
True
|
offset
|
int
|
Post shift. Defaults to 0 |
0
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
JMA
dataclass
JMA(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
period: int = 7,
source: Source = "close",
phase: float = 0.0
)
Bases: Indicator[float | None]
Jurik Moving Average Average - JMA
The JMA is an adaptive moving average that aims to reduce lag and improve responsiveness to price changes compared to traditional moving averages. By incorporating volatility and phase shift components, the JMA seeks to provide traders with a more accurate and timely representation of market trends.
Sources
https://c.mql5.com/forextsd/forum/164/jurik_1.pdf
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
int
|
How many Periods to use. Defaults to 7 |
7
|
source
|
str
|
Which input field to calculate the Indicator. Defaults to "close" |
'close'
|
phase
|
float
|
How heavy/light the average is [-100, 100]. Defaults to 0.0 |
0.0
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
KAMA
dataclass
KAMA(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
period: int = 10,
fast: int = 2,
slow: int = 30,
source: Source = "close"
)
Bases: Indicator[float | None]
Kaufman's Adaptive Moving Average - KAMA
KAMA adapts its smoothing based on market efficiency. It responds faster in directional moves and slows down in noisy ranges.
Sources
https://tradingstrategy.ai/docs/api/technical-analysis/overlap/help/pandas_ta.overlap.kama.html
Output type: float
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
int
|
Efficiency ratio lookback. Defaults to 10. |
10
|
fast
|
int
|
Fast EMA length. Defaults to 2. |
2
|
slow
|
int
|
Slow EMA length. Defaults to 30. |
30
|
source
|
str
|
Which input field to calculate the indicator from.
Defaults to |
'close'
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
KC
dataclass
KC(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
period: int = 20,
source: Source = "close",
multiplier: float = 2.0,
mamode: str = "ema",
tr: bool = True
)
Bases: Indicator[dict[str, float | None]]
Keltner Channel - KC
Keltner channel is a technical analysis indicator showing a central moving average line plus channel lines at a distance above and below. A popular volatility indicator similar to Bollinger Bands and Donchian Channels.
Sources
https://www.investopedia.com/terms/k/keltnerchannel.asp
Output type: Dict["lower": float, "band": float, "upper": float]
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
int
|
How many Periods to use. Defaults to 20 |
20
|
source
|
str
|
Which input field to calculate the Indicator. Defaults to "close" |
'close'
|
multiplier
|
float
|
A positive float to multiply the bands. Defaults to 2.0 |
2.0
|
mamode
|
str
|
Center line average type. One of |
'ema'
|
tr
|
bool
|
Use true range for the channel width. Defaults to |
True
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
KST
dataclass
KST(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
roc1: int = 10,
roc2: int = 15,
roc3: int = 20,
roc4: int = 30,
sma1: int = 10,
sma2: int = 10,
sma3: int = 10,
sma4: int = 15,
signal_period: int = 9
)
Bases: Indicator[dict[str, float | None]]
Know Sure Thing - KST
KST combines four smoothed rate-of-change series into a weighted momentum oscillator with a signal line.
Sources
https://tradingstrategy.ai/docs/api/technical-analysis/momentum/help/pandas_ta.momentum.kst.html
Output type: Dict["KST": float, "signal": float]
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
LinearRegression
dataclass
LinearRegression(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
period: int = 14,
source: Source = "close"
)
Bases: Indicator[float | None]
Linear Regression - LR
Linear Regression fits a least-squares line over a rolling window and
returns the line value using the same convention as pandas-ta linreg.
Sources
https://tradingstrategy.ai/docs/api/technical-analysis/overlap/help/pandas_ta.overlap.linreg.html
Output type: float
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
int
|
Rolling window length. Defaults to 14. |
14
|
source
|
str
|
Which input field to calculate the indicator from.
Defaults to |
'close'
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
MACD
dataclass
MACD(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
source: Source = "close",
fast_period: int = 12,
slow_period: int = 26,
signal_period: int = 9
)
Bases: Indicator[dict[str, float | None]]
Moving Average Convergence Divergence - MACD
The MACD is a popular indicator to that is used to identify a security's trend. While APO and MACD are the same calculation, MACD also returns two more series called Signal and Histogram. The Signal is an EMA of MACD and the Histogram is the difference of MACD and Signal.
Sources
https://www.investopedia.com/ask/answers/122314/what-exponential-moving-average-ema-formula-and-how-ema-calculated.asp
Output type: Dict["MACD": float, "signal": float, "histogram": float]
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
str
|
Which input field to calculate the Indicator. Defaults to "close" |
'close'
|
fast_period
|
int
|
How many Periods to use for fast EMA. Defaults to 12 |
12
|
slow_period
|
int
|
How many Periods to use for slow EMA. Defaults to 26 |
26
|
signal_period
|
int
|
How many Periods to use for MACD signal. Defaults to 9 |
9
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
MFI
dataclass
MFI(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
period: int = 14,
source: Source = "close"
)
Bases: Indicator[float | None]
Money Flow Index - MFI
The money flow index (MFI) is an oscillator that ranges from 0 to 100. It is used to show the money flow over several days.
Sources
https://www.tradingview.com/wiki/Money_Flow_(MFI)
Output type: float
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
int
|
How many Periods to use. Defaults to 14 |
14
|
source
|
str
|
Which input field to calculate the Indicator. Defaults to "close" |
'close'
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
MOP
dataclass
MOP(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
period: int = 2,
source: Source = "close"
)
Bases: Indicator[float | None]
Midpoint Over Period - MOP
A technical analysis tool that evaluates the average price movement by calculating the midpoint between the highest and lowest points over a specified period. This indicator aims to provide a smoother representation of price action, avoiding the choppiness of extreme highs and lows.
Sources
https://trendspider.com/learning-center/understanding-and-applying-the-midpoint-over-period-indicator-in-trading/
Output type: float
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
int
|
How many Periods to use. Defaults to 2 |
2
|
source
|
str()
|
Which input field to calculate the Indicator. Defaults to "close" |
'close'
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
NATR
dataclass
NATR(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
period: int = 14
)
Bases: Indicator[float | None]
Normalized Average True Range - NATR
NATR expresses ATR as a percentage of the current close, making volatility readings comparable across instruments with different price levels.
Sources
https://tradingstrategy.ai/docs/api/technical-analysis/volatility/help/pandas_ta.volatility.natr.html
Output type: float
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
int
|
How many periods to use. Defaults to 14. |
14
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
OBV
dataclass
OBV(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4
)
On-Balance Volume - OBC
On-balance volume (OBV) is a technical analysis indicator intended to relate price and volume in the stock market. OBV is based on a cumulative total volume.
Sources
https://en.wikipedia.org/wiki/On-balance_volume
Output type: float
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
PivotPoints
dataclass
PivotPoints(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4
)
Bases: Indicator[dict[str, float | None]]
Pivot Points - PP
Pivot point is a price level that is used by traders as a possible indicator of market movement. A pivot point is calculated as an average of significant prices (high, low, close) from the performance of a market in the prior trading period. If the market in the following period trades above the pivot point it is 1usually evaluated as a bullish sentiment, whereas trading below the pivot point is seen as bearish.
Sources
https://en.wikipedia.org/wiki/Pivot_point_(technical_analysis)
Output type: Dict["S1": float, "R1": float, "S2": float, "R2": float]
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
RMA
dataclass
RMA(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
period: int = 10,
source: Source = "close"
)
Bases: Indicator[float | None]
wildeR's Moving Average - RMA
Wilder's Moving Average places more emphasis on recent price movements than other moving averages. This makes it a more responsive tool for short-term traders who need to adapt quickly to changing market conditions.
Sources
https://tlc.thinkorswim.com/center/reference/Tech-Indicators/studies-library/V-Z/WildersSmoothing https://www.incrediblecharts.com/indicators/wilder_moving_average.php
Output type: float
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
int
|
How many Periods to use. Defaults to 10 |
10
|
source
|
str
|
Which input field to calculate the Indicator. Defaults to "close" |
'close'
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
ROC
dataclass
ROC(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
period: int = 10,
source: Source = "close"
)
Bases: Indicator[float | None]
Rate Of Change - ROC
The Price Rate of Change (ROC) indicator in trading refers to the percentage change between the current price and the price of a set number of periods ago. It is used to identify the momentum of price movement and help traders make informed decisions regarding buying or selling assets. This indicator is calculated by dividing the difference between the current price and the price of a set number of periods ago by the previous price and multiplying by 100.
Sources
https://en.wikipedia.org/wiki/Momentum_(technical_analysis)
Output type: float
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
int
|
How many Periods to use. Defaults to 10 |
10
|
source
|
str
|
Which input field to calculate the Indicator. Defaults to "close" |
'close'
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
RSI
dataclass
RSI(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
period: int = 14,
source: Source = "close"
)
Bases: Indicator[float | None]
Relative Strength Index - RSI
The Relative Strength Index is popular momentum oscillator used to measure the velocity as well as the magnitude of directional price movements.
Sources
https://www.tradingview.com/support/solutions/43000502338-relative-strength-index-rsi/
Output type: float
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
int
|
How many Periods to use. Defaults to 14 |
14
|
source
|
str
|
Which input field to calculate the Indicator. Defaults to "close" |
'close'
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
RVI
dataclass
RVI(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
period: int = 14,
source: Source = "close"
)
Bases: Indicator[float | None]
Relative Vigor Index - RVI
The Relative Vigor Index, or RVI, is a popular member of the “Oscillator” family of technical indicators. although the creator of the Relative Vigor Index is unknown, its design is very similar to Stochastics except that the closing price is compared with the Open rather than the Low price for the period.
Sources
https://www.thinkmarkets.com/en/learn-to-trade/indicators-and-patterns/indicators/relative-vigor-index-rvi-indicator/
Output type: float
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
int
|
How many Periods to use. Defaults to 14 |
14
|
source
|
str
|
Which input field to calculate the Indicator. Defaults to "close" |
'close'
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
RegressionChannel
dataclass
RegressionChannel(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
period: int = 14,
source: Source = "close",
std: float = 2.0
)
Bases: Indicator[dict[str, float | None]]
Regression Channel
Regression Channel fits a rolling least-squares line and places upper and lower bands around it using the residual standard deviation.
Output type: Dict["lower": float, "mid": float, "upper": float]
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
int
|
Rolling window length. Defaults to 14. |
14
|
source
|
str
|
Which input field to calculate the indicator from.
Defaults to |
'close'
|
std
|
float
|
Residual standard deviation multiplier. Defaults to 2.0. |
2.0
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
RegressionSlope
dataclass
RegressionSlope(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
period: int = 14,
source: Source = "close"
)
Bases: Indicator[float | None]
Regression Slope - LRm
Regression Slope returns the least-squares slope over a rolling window.
Sources
https://tradingstrategy.ai/docs/api/technical-analysis/overlap/help/pandas_ta.overlap.linreg.html
Output type: float
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
int
|
Rolling window length. Defaults to 14. |
14
|
source
|
str
|
Which input field to calculate the indicator from.
Defaults to |
'close'
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
SMA
dataclass
SMA(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
period: int = 10,
source: Source = "close"
)
Bases: Indicator[float | None]
Simple Moving Average - SMA
The Simple Moving Average is the classic moving average that is the equally weighted average over n periods.
Sources
https://www.investopedia.com/terms/s/sma.asp
Output type: float
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
int
|
How many Periods to use. Defaults to 10 |
10
|
source
|
str
|
Which input field to calculate the Indicator. Defaults to "close" |
'close'
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
STDEV
dataclass
STDEV(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
period: int = 30,
source: Source = "close"
)
Bases: Indicator[float | None]
Rolling Standard Deviation - STDEV
You use a rolling stdev when you expect the standard deviation to change over time. As long as the standard deviation is changing slowly enough, we should be able to see the change in the standard deviation over time if we use the right size window.
Sources
https://jonisalonen.com/2014/efficient-and-accurate-rolling-standard-deviation/
Output type: float
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
int
|
How many Periods to use. Defaults to 30 |
30
|
source
|
str
|
Which input field to calculate the Indicator. Defaults to "close" |
'close'
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
STDEVT
dataclass
STDEVT(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
period: int = 10,
source: Source = "close",
multiplier: float = 2.0
)
Bases: Indicator[float | None]
Standard Deviation Threshold - STDEVT
Standard Deviation while calculating threshold returning boolean signal if change to input is higher than threshold
Sources
ChatGPT
Output type: float
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
int
|
How many Periods to use. Defaults to 10 |
10
|
source
|
str
|
Which input field to calculate the Indicator. Defaults to "close" |
'close'
|
multiplier
|
float
|
A positive float to multiply the Deviation. Defaults to 2.0 |
2.0
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
STOCH
dataclass
STOCH(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
period: int = 14,
slow_period: int = 3,
smoothing_k: int = 3,
source: Source = "close"
)
Bases: Indicator[dict[str, float | None]]
Stochastic - STOCH
The Stochastic Oscillator (STOCH) was developed by George Lane in the 1950's. He believed this indicator was a good way to measure momentum because changes in momentum precede changes in price.
It is a range-bound oscillator with two lines moving between 0 and 100. The first line (%K) displays the current close in relation to the period's high/low range. The second line (%D) is a Simple Moving Average of the %K line. The most common choices are a 14 period %K and a 3 period SMA for %D.
%K = SMA(100 * (Current Close - Lowest Low) / (Highest High - Lowest Low), smoothK) %D = SMA(%K, periodD)
Sources
https://www.tradingview.com/wiki/Stochastic_(STOCH)
Output type: Dict["stoch": float, "k": float, "d": float]
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
int
|
How many Periods to use. Defaults to 14 |
14
|
slow_period
|
int
|
How many Periods to use on smoothing d. Defaults to 3 |
3
|
smoothing_k
|
int
|
How many Periods to use on smoothing K. Defaults to 3 |
3
|
source
|
str
|
Which input field to calculate the Indicator. Defaults to "close" |
'close'
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
Squeeze
dataclass
Squeeze(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
bb_length: int = 20,
bb_std: float = 2.0,
kc_length: int = 20,
kc_scalar: float = 1.5,
mom_length: int = 12,
mom_smooth: int = 6,
mamode: str = "sma",
period: int | None = None
)
Bases: Indicator[dict[str, float | int | None]]
Squeeze
The TTM Squeeze is a volatility and momentum indicator.
This implementation matches the default pandas_ta.squeeze output used by
the source-of-truth fixture: Bollinger Bands versus SMA-based Keltner
Channels plus mom(12) smoothed by sma(6).
Output type: Dict["SQZ": float, "ON": int, "OFF": int]
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bb_length
|
int
|
Bollinger Bands period. Defaults to 20 |
20
|
bb_std
|
float
|
Bollinger Bands standard deviation multiplier. Defaults to 2.0 |
2.0
|
kc_length
|
int
|
Keltner Channel period. Defaults to 20 |
20
|
kc_scalar
|
float
|
Keltner Channel scalar. Defaults to 1.5 |
1.5
|
mom_length
|
int
|
Momentum period. Defaults to 12 |
12
|
mom_smooth
|
int
|
Momentum smoothing period. Defaults to 6 |
6
|
mamode
|
str
|
Momentum smoothing average type. One of |
'sma'
|
period
|
int | None
|
Backwards-compatible alias for |
None
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
SqueezePro
dataclass
SqueezePro(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
bb_length: int = 20,
bb_std: float = 2.0,
kc_length: int = 20,
kc_scalar_wide: float = 2.0,
kc_scalar_normal: float = 1.5,
kc_scalar_narrow: float = 1.0,
mom_length: int = 12,
mom_smooth: int = 6,
mamode: str = "sma"
)
Bases: Indicator[dict[str, float | int | None]]
SqueezePro
Squeeze Pro extends the classic squeeze by comparing Bollinger Bands against three Keltner Channel widths while keeping the same momentum oscillator.
Output type: Dict["SQZ": float, "Wide": int, "Normal": int, "Narrow": int, "OFF": int]
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
Supertrend
dataclass
Supertrend(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
period: int = 7,
source: Source = "close",
multiplier: float = 3.0
)
Bases: Indicator[dict[str, float | int | None]]
Supertrend
It is used to identify market trends and potential entry and exit points in trading. The indicator is based on two dynamic values, period and multiplier, and incorporates the concept of Average True Range (ATR) to measure market volatility. The SuperTrend Indicator generates buy and sell signals by plotting a line on the price chart.
Output type: Dict["trend": float, "direction": int, "short": float]
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
int
|
How many Periods to use. Defaults to 7 |
7
|
source
|
str
|
Which input field to calculate the Indicator. Defaults to "close" |
'close'
|
multiplier
|
float
|
A positive float to multiply the ATR. Defaults to 3.0 |
3.0
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
TEMA
dataclass
TEMA(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
period: int = 10,
source: Source = "close"
)
Bases: Indicator[float | None]
Triple Exponential Moving Average - TEMA
TEMA reduces lag further than DEMA by combining three EMA layers into one smoothed output.
Sources
https://tradingstrategy.ai/docs/api/technical-analysis/overlap/help/pandas_ta.overlap.tema.html
Output type: float
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
int
|
How many periods to use. Defaults to 10. |
10
|
source
|
str
|
Which input field to calculate the indicator from.
Defaults to |
'close'
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
TR
dataclass
TR(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4
)
Bases: Indicator[float | None]
True Range - TR
An method to expand a classical range (high minus low) to include possible gap scenarios.
Sources
https://www.macroption.com/true-range/
Output type: float
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
TRIX
dataclass
TRIX(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
period: int = 30,
signal_period: int = 9,
scalar: float = 100.0,
source: Source = "close"
)
Bases: Indicator[dict[str, float | None]]
Triple Exponential Average Oscillator - TRIX
TRIX measures the percent rate of change of a triple-smoothed EMA and pairs it with a simple moving average signal line.
Sources
https://tradingstrategy.ai/docs/api/technical-analysis/momentum/help/pandas_ta.momentum.trix.html
Output type: Dict["TRIX": float, "signal": float]
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
int
|
EMA lookback. Defaults to 30. |
30
|
signal_period
|
int
|
Signal SMA lookback. Defaults to 9. |
9
|
scalar
|
float
|
Multiplier applied to the percent change. Defaults to 100.0. |
100.0
|
source
|
str
|
Which input field to calculate the indicator from.
Defaults to |
'close'
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
TSI
dataclass
TSI(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
period: int = 25,
smooth_period: int = 0,
source: Source = "close"
)
Bases: Indicator[float | None]
True Strength Index - TSI TSI attempts to show both trend direction and overbought/oversold conditions, using moving averages of the underlying momentum of a financial instrument.
Sources
https://school.stockcharts.com/doku.php?id=technical_indicators:true_strength_index
Output type: float
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
int
|
How many Periods to use. Defaults to 25 |
25
|
smooth_period
|
int
|
How much to smooth with EMA defaults: (period / 2) + (period % 2 > 0). Defaults to halve of period |
0
|
source
|
str
|
Which input field to calculate the Indicator. Defaults to "close" |
'close'
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
UO
dataclass
UO(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
fast: int = 7,
medium: int = 14,
slow: int = 28,
fast_w: float = 4.0,
medium_w: float = 2.0,
slow_w: float = 1.0
)
Bases: Indicator[float | None]
Ultimate Oscillator - UO
The Ultimate Oscillator blends short, medium, and long buying pressure ratios to reduce false divergence signals from single-window oscillators.
Sources
https://tradingstrategy.ai/docs/api/technical-analysis/momentum/help/pandas_ta.momentum.uo.html
Output type: float
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fast
|
int
|
Fast lookback. Defaults to 7. |
7
|
medium
|
int
|
Medium lookback. Defaults to 14. |
14
|
slow
|
int
|
Slow lookback. Defaults to 28. |
28
|
fast_w
|
float
|
Fast period weight. Defaults to 4.0. |
4.0
|
medium_w
|
float
|
Medium period weight. Defaults to 2.0. |
2.0
|
slow_w
|
float
|
Slow period weight. Defaults to 1.0. |
1.0
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
VWAP
dataclass
VWAP(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
anchor: str | TimeFrame | timedelta | int | None = "D"
)
Volume-Weighted Average Price - VWAP
The volume-weighted average price is a technical analysis indicator used on intraday charts that resets at the start of every new trading session. Resets on the configured anchor timeframe (default: daily "D").
Sources
https://www.investopedia.com/terms/v/vwap.asp
Output type: float
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
anchor
|
Optional[str | TimeFrame | timedelta | int]
|
How to anchor VWAP, Depends on the index values, uses TimeFrame |
'D'
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
VWMA
dataclass
VWMA(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
period: int = 10
)
Bases: Indicator[float | None]
Volume Weighted Moving Average - VWMA
VWMA is the ratio of the value of a security or financial asset traded to the total volume of transactions during a trading session. It is a measure of the average trading price for the period.
Sources
https://www.investopedia.com/ask/answers/071414/whats-difference-between-moving-average-and-weighted-moving-average.asp
Output type: float
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
int
|
How many Periods to use. Defaults to 10 |
10
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
Vortex
dataclass
Vortex(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
period: int = 14,
drift: int = 1
)
Bases: Indicator[dict[str, float | None]]
Vortex Indicator - VTX
Vortex compares directional movement against total true range to highlight bullish and bearish trend dominance.
Sources
https://tradingstrategy.ai/docs/api/technical-analysis/trend/help/pandas_ta.trend.vortex.html
Output type: Dict["VTXP": float, "VTXM": float]
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
int
|
Rolling window length. Defaults to 14. |
14
|
drift
|
int
|
Previous candle offset for movement comparison. Defaults to 1. |
1
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
WMA
dataclass
WMA(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
period: int = 10,
source: Source = "close"
)
Bases: Indicator[float | None]
Weighted Moving Average - WMA
A Weighted Moving Average puts more weight on recent data and less on past data. This is done by multiplying each bar's price by a weighting factor. Because of its unique calculation, WMA will follow prices more closely than a corresponding Simple Moving Average.
Sources
https://www.investopedia.com/ask/answers/071414/whats-difference-between-moving-average-and-weighted-moving-average.asp
Output type: float
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
int
|
How many Periods to use. Defaults to 10 |
10
|
source
|
str
|
Which input field to calculate the Indicator. Defaults to "close" |
'close'
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
WillR
dataclass
WillR(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
period: int = 14,
source: Source = "close"
)
Bases: Indicator[float | None]
William's Percent R - WILLR
Williams %R is a momentum oscillator that measures the current close relative to the highest high and lowest low over a rolling lookback period.
Output type: float
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
int
|
How many periods to use. Defaults to 14 |
14
|
source
|
str
|
Which input field to compare against the rolling range.
Defaults to |
'close'
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |
Source code in hexital/core/indicator/core.py
src
ZScore
dataclass
ZScore(
*,
candles: list[Candle] = list(),
name: str = "",
timeframe: TimeFramesSource | None = None,
timeframe_fill: bool = False,
candle_life: timedelta | None = None,
candlestick: CandlestickType | str | None = None,
rounding: int | None = 4,
period: int = 30,
source: Source = "close",
std: float = 1.0
)
Bases: Indicator[float | None]
Rolling Z Score - ZS
The rolling z-score measures how far the current value is from its rolling mean in units of rolling standard deviation. It is commonly used to detect statistical extremes and mean-reversion conditions.
Output type: float
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
period
|
int
|
How many periods to use. Defaults to 30 |
30
|
source
|
str
|
Which input field to calculate the indicator from.
Defaults to |
'close'
|
std
|
float
|
Standard deviation multiplier applied to the denominator. Defaults to 1.0 |
1.0
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Retrieve the settings required to regenerate this indicator in a dictionary format. |
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
settings
property
settings: dict
Retrieve the settings required to regenerate this indicator in a dictionary format.
This property compiles the configuration details of the indicator, excluding attributes that are irrelevant for generation (e.g., candles and sub-indicators). It ensures the output dictionary is clean and contains only the necessary settings for recreating the indicator.
Special handling is included for attributes like candlestick and timeframe, ensuring
their values are properly formatted.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
A dictionary containing the indicator's settings, ready for regeneration.
- |
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator 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 append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator 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 prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator 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/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |