hexital
hexital
Modules:
Name | Description |
---|---|
analysis |
|
candlesticks |
|
core |
|
indicators |
|
movement |
|
patterns |
|
utils |
|
Classes:
Name | Description |
---|---|
ADX |
Average Directional Index - ADX |
AROON |
Aroon - AROON |
ATR |
Average True Range - ATR |
Amorph |
Amorph |
BBANDS |
Bollinger Bands - BBANDS |
CMO |
Chande Momentum Oscillator - CMO |
Counter |
Counter |
Donchian |
Donchian Channels - Donchian |
EMA |
Exponential Moving Average - EMA |
HL |
Highest Lowest - HL |
HLA |
High Low Average - HLA |
HLCA |
High Low Close Average - HLCA |
HMA |
Hull Moving Average - HMA |
JMA |
Jurik Moving Average Average - JMA |
KC |
Keltner Channel - KC |
MACD |
Moving Average Convergence Divergence - MACD |
MFI |
Money Flow Index - MFI |
MOP |
Midpoint Over Period - MOP |
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 |
SMA |
Simple Moving Average - SMA |
STDEV |
Rolling Standard Deviation - STDEV |
STDEVT |
Standard Deviation Threshold - STDEVT |
STOCH |
Stochastic - STOCH |
Supertrend |
Supertrend |
TR |
True Range - TR |
TSI |
True Strength Index - TSI |
VWAP |
Volume-Weighted Average Price - VWAP |
VWMA |
Volume Weighted Moving Average - VWMA |
WMA |
Weighted Moving Average - WMA |
ADX
dataclass
ADX(
*,
candles: List[Candle] = list(),
name: str = "",
timeframe: Optional[str | TimeFrame | timedelta | int] = None,
timeframe_fill: bool = False,
candle_life: Optional[timedelta] = None,
candlestick: Optional[CandlestickType | str] = None,
rounding: Optional[int] = 4,
period: int = 14,
period_signal: Optional[int] = None,
multiplier: float = 100.0
)
Bases: Indicator
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 |
None
|
multiplier
|
Optional[float]
|
ADX smoothing multiplier. Defaults to 100.0 |
100.0
|
Methods:
Name | Description |
---|---|
add_managed_indicator |
Adds managed sub indicator, this will not auto calculate with indicator |
add_sub_indicator |
Adds sub indicator, this will auto calculate with indicator |
as_list |
Retrieve the indicator values for all candles as a list. |
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 |
purge |
Remove this indicator value from all Candles |
read_candle |
Simple method to get an indicator reading from a candle, |
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 |
Attributes:
Name | Type | Description |
---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
has_reading |
bool
|
Check if the indicator has generated values in the candles. |
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
has_reading
property
has_reading: bool
Check if the indicator has generated values in the candles.
This property determines whether the indicator readings have been generated for the associated candle data.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
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_managed_indicator
Adds managed sub indicator, this will not auto calculate with indicator
Source code in hexital/core/indicator.py
add_sub_indicator
Adds sub indicator, this will auto calculate with indicator
Source code in hexital/core/indicator.py
as_list
Retrieve the indicator values for all 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
|
Optional[str]
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
Type | Description |
---|---|
List[float | dict | None]
|
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.py
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator.py
purge
Remove this indicator value from all Candles
Source code in hexital/core/indicator.py
read_candle
read_candle(
candle: Candle, name: Optional[str] = None, default: Optional[T] = None
) -> float | dict | None | T
Simple method to get an indicator reading from a candle, regardless of it's location
Source code in hexital/core/indicator.py
reading
reading(
name: Optional[str] = None,
index: Optional[int] = None,
default: Optional[T] = None,
) -> float | dict | None | T
Simple method to get an indicator reading from the index Name can use '.' to find nested reading, E.G 'MACD_12_26_9.MACD
Source code in hexital/core/indicator.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator.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.py
AROON
dataclass
AROON(
*,
candles: List[Candle] = list(),
name: str = "",
timeframe: Optional[str | TimeFrame | timedelta | int] = None,
timeframe_fill: bool = False,
candle_life: Optional[timedelta] = None,
candlestick: Optional[CandlestickType | str] = None,
rounding: Optional[int] = 4,
period: int = 14
)
Bases: Indicator
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_managed_indicator |
Adds managed sub indicator, this will not auto calculate with indicator |
add_sub_indicator |
Adds sub indicator, this will auto calculate with indicator |
as_list |
Retrieve the indicator values for all candles as a list. |
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 |
purge |
Remove this indicator value from all Candles |
read_candle |
Simple method to get an indicator reading from a candle, |
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 |
Attributes:
Name | Type | Description |
---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
has_reading |
bool
|
Check if the indicator has generated values in the candles. |
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
has_reading
property
has_reading: bool
Check if the indicator has generated values in the candles.
This property determines whether the indicator readings have been generated for the associated candle data.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
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_managed_indicator
Adds managed sub indicator, this will not auto calculate with indicator
Source code in hexital/core/indicator.py
add_sub_indicator
Adds sub indicator, this will auto calculate with indicator
Source code in hexital/core/indicator.py
as_list
Retrieve the indicator values for all 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
|
Optional[str]
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
Type | Description |
---|---|
List[float | dict | None]
|
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.py
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator.py
purge
Remove this indicator value from all Candles
Source code in hexital/core/indicator.py
read_candle
read_candle(
candle: Candle, name: Optional[str] = None, default: Optional[T] = None
) -> float | dict | None | T
Simple method to get an indicator reading from a candle, regardless of it's location
Source code in hexital/core/indicator.py
reading
reading(
name: Optional[str] = None,
index: Optional[int] = None,
default: Optional[T] = None,
) -> float | dict | None | T
Simple method to get an indicator reading from the index Name can use '.' to find nested reading, E.G 'MACD_12_26_9.MACD
Source code in hexital/core/indicator.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator.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.py
ATR
dataclass
ATR(
*,
candles: List[Candle] = list(),
name: str = "",
timeframe: Optional[str | TimeFrame | timedelta | int] = None,
timeframe_fill: bool = False,
candle_life: Optional[timedelta] = None,
candlestick: Optional[CandlestickType | str] = None,
rounding: Optional[int] = 4,
period: int = 14
)
Bases: Indicator
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_managed_indicator |
Adds managed sub indicator, this will not auto calculate with indicator |
add_sub_indicator |
Adds sub indicator, this will auto calculate with indicator |
as_list |
Retrieve the indicator values for all candles as a list. |
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 |
purge |
Remove this indicator value from all Candles |
read_candle |
Simple method to get an indicator reading from a candle, |
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 |
Attributes:
Name | Type | Description |
---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
has_reading |
bool
|
Check if the indicator has generated values in the candles. |
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
has_reading
property
has_reading: bool
Check if the indicator has generated values in the candles.
This property determines whether the indicator readings have been generated for the associated candle data.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
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_managed_indicator
Adds managed sub indicator, this will not auto calculate with indicator
Source code in hexital/core/indicator.py
add_sub_indicator
Adds sub indicator, this will auto calculate with indicator
Source code in hexital/core/indicator.py
as_list
Retrieve the indicator values for all 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
|
Optional[str]
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
Type | Description |
---|---|
List[float | dict | None]
|
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.py
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator.py
purge
Remove this indicator value from all Candles
Source code in hexital/core/indicator.py
read_candle
read_candle(
candle: Candle, name: Optional[str] = None, default: Optional[T] = None
) -> float | dict | None | T
Simple method to get an indicator reading from a candle, regardless of it's location
Source code in hexital/core/indicator.py
reading
reading(
name: Optional[str] = None,
index: Optional[int] = None,
default: Optional[T] = None,
) -> float | dict | None | T
Simple method to get an indicator reading from the index Name can use '.' to find nested reading, E.G 'MACD_12_26_9.MACD
Source code in hexital/core/indicator.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator.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.py
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
|
Optional[dict]
|
All of the Arguments as keyword arguments as a dict of keyword arguments for called analysis |
None
|
Methods:
Name | Description |
---|---|
add_managed_indicator |
Adds managed sub indicator, this will not auto calculate with indicator |
add_sub_indicator |
Adds sub indicator, this will auto calculate with indicator |
as_list |
Retrieve the indicator values for all candles as a list. |
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 |
purge |
Remove this indicator value from all Candles |
read_candle |
Simple method to get an indicator reading from a candle, |
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 |
Attributes:
Name | Type | Description |
---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
has_reading |
bool
|
Check if the indicator has generated values in the candles. |
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
has_reading
property
has_reading: bool
Check if the indicator has generated values in the candles.
This property determines whether the indicator readings have been generated for the associated candle data.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
add_managed_indicator
Adds managed sub indicator, this will not auto calculate with indicator
Source code in hexital/core/indicator.py
add_sub_indicator
Adds sub indicator, this will auto calculate with indicator
Source code in hexital/core/indicator.py
as_list
Retrieve the indicator values for all 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
|
Optional[str]
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
Type | Description |
---|---|
List[float | dict | None]
|
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.py
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator.py
purge
Remove this indicator value from all Candles
Source code in hexital/core/indicator.py
read_candle
read_candle(
candle: Candle, name: Optional[str] = None, default: Optional[T] = None
) -> float | dict | None | T
Simple method to get an indicator reading from a candle, regardless of it's location
Source code in hexital/core/indicator.py
reading
reading(
name: Optional[str] = None,
index: Optional[int] = None,
default: Optional[T] = None,
) -> float | dict | None | T
Simple method to get an indicator reading from the index Name can use '.' to find nested reading, E.G 'MACD_12_26_9.MACD
Source code in hexital/core/indicator.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator.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.py
BBANDS
dataclass
BBANDS(
*,
candles: List[Candle] = list(),
name: str = "",
timeframe: Optional[str | TimeFrame | timedelta | int] = None,
timeframe_fill: bool = False,
candle_life: Optional[timedelta] = None,
candlestick: Optional[CandlestickType | str] = None,
rounding: Optional[int] = 4,
period: int = 5,
source: str = "close"
)
Bases: Indicator
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_managed_indicator |
Adds managed sub indicator, this will not auto calculate with indicator |
add_sub_indicator |
Adds sub indicator, this will auto calculate with indicator |
as_list |
Retrieve the indicator values for all candles as a list. |
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 |
purge |
Remove this indicator value from all Candles |
read_candle |
Simple method to get an indicator reading from a candle, |
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 |
Attributes:
Name | Type | Description |
---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
has_reading |
bool
|
Check if the indicator has generated values in the candles. |
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
has_reading
property
has_reading: bool
Check if the indicator has generated values in the candles.
This property determines whether the indicator readings have been generated for the associated candle data.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
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_managed_indicator
Adds managed sub indicator, this will not auto calculate with indicator
Source code in hexital/core/indicator.py
add_sub_indicator
Adds sub indicator, this will auto calculate with indicator
Source code in hexital/core/indicator.py
as_list
Retrieve the indicator values for all 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
|
Optional[str]
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
Type | Description |
---|---|
List[float | dict | None]
|
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.py
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator.py
purge
Remove this indicator value from all Candles
Source code in hexital/core/indicator.py
read_candle
read_candle(
candle: Candle, name: Optional[str] = None, default: Optional[T] = None
) -> float | dict | None | T
Simple method to get an indicator reading from a candle, regardless of it's location
Source code in hexital/core/indicator.py
reading
reading(
name: Optional[str] = None,
index: Optional[int] = None,
default: Optional[T] = None,
) -> float | dict | None | T
Simple method to get an indicator reading from the index Name can use '.' to find nested reading, E.G 'MACD_12_26_9.MACD
Source code in hexital/core/indicator.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator.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.py
CMO
dataclass
CMO(
*,
candles: List[Candle] = list(),
name: str = "",
timeframe: Optional[str | TimeFrame | timedelta | int] = None,
timeframe_fill: bool = False,
candle_life: Optional[timedelta] = None,
candlestick: Optional[CandlestickType | str] = None,
rounding: Optional[int] = 4,
period: int = 14,
source: str = "close"
)
Bases: Indicator
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_managed_indicator |
Adds managed sub indicator, this will not auto calculate with indicator |
add_sub_indicator |
Adds sub indicator, this will auto calculate with indicator |
as_list |
Retrieve the indicator values for all candles as a list. |
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 |
purge |
Remove this indicator value from all Candles |
read_candle |
Simple method to get an indicator reading from a candle, |
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 |
Attributes:
Name | Type | Description |
---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
has_reading |
bool
|
Check if the indicator has generated values in the candles. |
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
has_reading
property
has_reading: bool
Check if the indicator has generated values in the candles.
This property determines whether the indicator readings have been generated for the associated candle data.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
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_managed_indicator
Adds managed sub indicator, this will not auto calculate with indicator
Source code in hexital/core/indicator.py
add_sub_indicator
Adds sub indicator, this will auto calculate with indicator
Source code in hexital/core/indicator.py
as_list
Retrieve the indicator values for all 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
|
Optional[str]
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
Type | Description |
---|---|
List[float | dict | None]
|
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.py
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator.py
purge
Remove this indicator value from all Candles
Source code in hexital/core/indicator.py
read_candle
read_candle(
candle: Candle, name: Optional[str] = None, default: Optional[T] = None
) -> float | dict | None | T
Simple method to get an indicator reading from a candle, regardless of it's location
Source code in hexital/core/indicator.py
reading
reading(
name: Optional[str] = None,
index: Optional[int] = None,
default: Optional[T] = None,
) -> float | dict | None | T
Simple method to get an indicator reading from the index Name can use '.' to find nested reading, E.G 'MACD_12_26_9.MACD
Source code in hexital/core/indicator.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator.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.py
Counter
dataclass
Counter(
*,
candles: List[Candle] = list(),
name: str = "",
timeframe: Optional[str | TimeFrame | timedelta | int] = None,
timeframe_fill: bool = False,
candle_life: Optional[timedelta] = None,
candlestick: Optional[CandlestickType | str] = None,
rounding: Optional[int] = 4,
source: str,
count_value: bool | int = True
)
Bases: Indicator
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_managed_indicator |
Adds managed sub indicator, this will not auto calculate with indicator |
add_sub_indicator |
Adds sub indicator, this will auto calculate with indicator |
as_list |
Retrieve the indicator values for all candles as a list. |
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 |
purge |
Remove this indicator value from all Candles |
read_candle |
Simple method to get an indicator reading from a candle, |
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 |
Attributes:
Name | Type | Description |
---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
has_reading |
bool
|
Check if the indicator has generated values in the candles. |
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
has_reading
property
has_reading: bool
Check if the indicator has generated values in the candles.
This property determines whether the indicator readings have been generated for the associated candle data.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
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_managed_indicator
Adds managed sub indicator, this will not auto calculate with indicator
Source code in hexital/core/indicator.py
add_sub_indicator
Adds sub indicator, this will auto calculate with indicator
Source code in hexital/core/indicator.py
as_list
Retrieve the indicator values for all 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
|
Optional[str]
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
Type | Description |
---|---|
List[float | dict | None]
|
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.py
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator.py
purge
Remove this indicator value from all Candles
Source code in hexital/core/indicator.py
read_candle
read_candle(
candle: Candle, name: Optional[str] = None, default: Optional[T] = None
) -> float | dict | None | T
Simple method to get an indicator reading from a candle, regardless of it's location
Source code in hexital/core/indicator.py
reading
reading(
name: Optional[str] = None,
index: Optional[int] = None,
default: Optional[T] = None,
) -> float | dict | None | T
Simple method to get an indicator reading from the index Name can use '.' to find nested reading, E.G 'MACD_12_26_9.MACD
Source code in hexital/core/indicator.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator.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.py
Donchian
dataclass
Donchian(
*,
candles: List[Candle] = list(),
name: str = "",
timeframe: Optional[str | TimeFrame | timedelta | int] = None,
timeframe_fill: bool = False,
candle_life: Optional[timedelta] = None,
candlestick: Optional[CandlestickType | str] = None,
rounding: Optional[int] = 4,
period: int = 20
)
Bases: Indicator
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_managed_indicator |
Adds managed sub indicator, this will not auto calculate with indicator |
add_sub_indicator |
Adds sub indicator, this will auto calculate with indicator |
as_list |
Retrieve the indicator values for all candles as a list. |
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 |
purge |
Remove this indicator value from all Candles |
read_candle |
Simple method to get an indicator reading from a candle, |
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 |
Attributes:
Name | Type | Description |
---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
has_reading |
bool
|
Check if the indicator has generated values in the candles. |
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
has_reading
property
has_reading: bool
Check if the indicator has generated values in the candles.
This property determines whether the indicator readings have been generated for the associated candle data.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
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_managed_indicator
Adds managed sub indicator, this will not auto calculate with indicator
Source code in hexital/core/indicator.py
add_sub_indicator
Adds sub indicator, this will auto calculate with indicator
Source code in hexital/core/indicator.py
as_list
Retrieve the indicator values for all 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
|
Optional[str]
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
Type | Description |
---|---|
List[float | dict | None]
|
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.py
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator.py
purge
Remove this indicator value from all Candles
Source code in hexital/core/indicator.py
read_candle
read_candle(
candle: Candle, name: Optional[str] = None, default: Optional[T] = None
) -> float | dict | None | T
Simple method to get an indicator reading from a candle, regardless of it's location
Source code in hexital/core/indicator.py
reading
reading(
name: Optional[str] = None,
index: Optional[int] = None,
default: Optional[T] = None,
) -> float | dict | None | T
Simple method to get an indicator reading from the index Name can use '.' to find nested reading, E.G 'MACD_12_26_9.MACD
Source code in hexital/core/indicator.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator.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.py
EMA
dataclass
EMA(
*,
candles: List[Candle] = list(),
name: str = "",
timeframe: Optional[str | TimeFrame | timedelta | int] = None,
timeframe_fill: bool = False,
candle_life: Optional[timedelta] = None,
candlestick: Optional[CandlestickType | str] = None,
rounding: Optional[int] = 4,
period: int = 10,
source: str = "close",
smoothing: float = 2.0
)
Bases: Indicator
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_managed_indicator |
Adds managed sub indicator, this will not auto calculate with indicator |
add_sub_indicator |
Adds sub indicator, this will auto calculate with indicator |
as_list |
Retrieve the indicator values for all candles as a list. |
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 |
purge |
Remove this indicator value from all Candles |
read_candle |
Simple method to get an indicator reading from a candle, |
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 |
Attributes:
Name | Type | Description |
---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
has_reading |
bool
|
Check if the indicator has generated values in the candles. |
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
has_reading
property
has_reading: bool
Check if the indicator has generated values in the candles.
This property determines whether the indicator readings have been generated for the associated candle data.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
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_managed_indicator
Adds managed sub indicator, this will not auto calculate with indicator
Source code in hexital/core/indicator.py
add_sub_indicator
Adds sub indicator, this will auto calculate with indicator
Source code in hexital/core/indicator.py
as_list
Retrieve the indicator values for all 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
|
Optional[str]
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
Type | Description |
---|---|
List[float | dict | None]
|
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.py
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator.py
purge
Remove this indicator value from all Candles
Source code in hexital/core/indicator.py
read_candle
read_candle(
candle: Candle, name: Optional[str] = None, default: Optional[T] = None
) -> float | dict | None | T
Simple method to get an indicator reading from a candle, regardless of it's location
Source code in hexital/core/indicator.py
reading
reading(
name: Optional[str] = None,
index: Optional[int] = None,
default: Optional[T] = None,
) -> float | dict | None | T
Simple method to get an indicator reading from the index Name can use '.' to find nested reading, E.G 'MACD_12_26_9.MACD
Source code in hexital/core/indicator.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator.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.py
HL
dataclass
HL(
*,
candles: List[Candle] = list(),
name: str = "",
timeframe: Optional[str | TimeFrame | timedelta | int] = None,
timeframe_fill: bool = False,
candle_life: Optional[timedelta] = None,
candlestick: Optional[CandlestickType | str] = None,
rounding: Optional[int] = 4,
period: int = 100
)
Bases: Indicator
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_managed_indicator |
Adds managed sub indicator, this will not auto calculate with indicator |
add_sub_indicator |
Adds sub indicator, this will auto calculate with indicator |
as_list |
Retrieve the indicator values for all candles as a list. |
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 |
purge |
Remove this indicator value from all Candles |
read_candle |
Simple method to get an indicator reading from a candle, |
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 |
Attributes:
Name | Type | Description |
---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
has_reading |
bool
|
Check if the indicator has generated values in the candles. |
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
has_reading
property
has_reading: bool
Check if the indicator has generated values in the candles.
This property determines whether the indicator readings have been generated for the associated candle data.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
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_managed_indicator
Adds managed sub indicator, this will not auto calculate with indicator
Source code in hexital/core/indicator.py
add_sub_indicator
Adds sub indicator, this will auto calculate with indicator
Source code in hexital/core/indicator.py
as_list
Retrieve the indicator values for all 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
|
Optional[str]
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
Type | Description |
---|---|
List[float | dict | None]
|
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.py
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator.py
purge
Remove this indicator value from all Candles
Source code in hexital/core/indicator.py
read_candle
read_candle(
candle: Candle, name: Optional[str] = None, default: Optional[T] = None
) -> float | dict | None | T
Simple method to get an indicator reading from a candle, regardless of it's location
Source code in hexital/core/indicator.py
reading
reading(
name: Optional[str] = None,
index: Optional[int] = None,
default: Optional[T] = None,
) -> float | dict | None | T
Simple method to get an indicator reading from the index Name can use '.' to find nested reading, E.G 'MACD_12_26_9.MACD
Source code in hexital/core/indicator.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator.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.py
HLA
dataclass
HLA(
*,
candles: List[Candle] = list(),
name: str = "",
timeframe: Optional[str | TimeFrame | timedelta | int] = None,
timeframe_fill: bool = False,
candle_life: Optional[timedelta] = None,
candlestick: Optional[CandlestickType | str] = None,
rounding: Optional[int] = 4
)
Bases: Indicator
High Low Average - HLA
Output type: float
Methods:
Name | Description |
---|---|
add_managed_indicator |
Adds managed sub indicator, this will not auto calculate with indicator |
add_sub_indicator |
Adds sub indicator, this will auto calculate with indicator |
as_list |
Retrieve the indicator values for all candles as a list. |
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 |
purge |
Remove this indicator value from all Candles |
read_candle |
Simple method to get an indicator reading from a candle, |
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 |
Attributes:
Name | Type | Description |
---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
has_reading |
bool
|
Check if the indicator has generated values in the candles. |
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
has_reading
property
has_reading: bool
Check if the indicator has generated values in the candles.
This property determines whether the indicator readings have been generated for the associated candle data.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
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_managed_indicator
Adds managed sub indicator, this will not auto calculate with indicator
Source code in hexital/core/indicator.py
add_sub_indicator
Adds sub indicator, this will auto calculate with indicator
Source code in hexital/core/indicator.py
as_list
Retrieve the indicator values for all 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
|
Optional[str]
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
Type | Description |
---|---|
List[float | dict | None]
|
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.py
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator.py
purge
Remove this indicator value from all Candles
Source code in hexital/core/indicator.py
read_candle
read_candle(
candle: Candle, name: Optional[str] = None, default: Optional[T] = None
) -> float | dict | None | T
Simple method to get an indicator reading from a candle, regardless of it's location
Source code in hexital/core/indicator.py
reading
reading(
name: Optional[str] = None,
index: Optional[int] = None,
default: Optional[T] = None,
) -> float | dict | None | T
Simple method to get an indicator reading from the index Name can use '.' to find nested reading, E.G 'MACD_12_26_9.MACD
Source code in hexital/core/indicator.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator.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.py
HLCA
dataclass
HLCA(
*,
candles: List[Candle] = list(),
name: str = "",
timeframe: Optional[str | TimeFrame | timedelta | int] = None,
timeframe_fill: bool = False,
candle_life: Optional[timedelta] = None,
candlestick: Optional[CandlestickType | str] = None,
rounding: Optional[int] = 4
)
Bases: Indicator
High Low Close Average - HLCA
Output type: float
Methods:
Name | Description |
---|---|
add_managed_indicator |
Adds managed sub indicator, this will not auto calculate with indicator |
add_sub_indicator |
Adds sub indicator, this will auto calculate with indicator |
as_list |
Retrieve the indicator values for all candles as a list. |
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 |
purge |
Remove this indicator value from all Candles |
read_candle |
Simple method to get an indicator reading from a candle, |
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 |
Attributes:
Name | Type | Description |
---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
has_reading |
bool
|
Check if the indicator has generated values in the candles. |
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
has_reading
property
has_reading: bool
Check if the indicator has generated values in the candles.
This property determines whether the indicator readings have been generated for the associated candle data.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
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_managed_indicator
Adds managed sub indicator, this will not auto calculate with indicator
Source code in hexital/core/indicator.py
add_sub_indicator
Adds sub indicator, this will auto calculate with indicator
Source code in hexital/core/indicator.py
as_list
Retrieve the indicator values for all 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
|
Optional[str]
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
Type | Description |
---|---|
List[float | dict | None]
|
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.py
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator.py
purge
Remove this indicator value from all Candles
Source code in hexital/core/indicator.py
read_candle
read_candle(
candle: Candle, name: Optional[str] = None, default: Optional[T] = None
) -> float | dict | None | T
Simple method to get an indicator reading from a candle, regardless of it's location
Source code in hexital/core/indicator.py
reading
reading(
name: Optional[str] = None,
index: Optional[int] = None,
default: Optional[T] = None,
) -> float | dict | None | T
Simple method to get an indicator reading from the index Name can use '.' to find nested reading, E.G 'MACD_12_26_9.MACD
Source code in hexital/core/indicator.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator.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.py
HMA
dataclass
HMA(
*,
candles: List[Candle] = list(),
name: str = "",
timeframe: Optional[str | TimeFrame | timedelta | int] = None,
timeframe_fill: bool = False,
candle_life: Optional[timedelta] = None,
candlestick: Optional[CandlestickType | str] = None,
rounding: Optional[int] = 4,
period: int = 10,
source: str = "close"
)
Bases: Indicator
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_managed_indicator |
Adds managed sub indicator, this will not auto calculate with indicator |
add_sub_indicator |
Adds sub indicator, this will auto calculate with indicator |
as_list |
Retrieve the indicator values for all candles as a list. |
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 |
purge |
Remove this indicator value from all Candles |
read_candle |
Simple method to get an indicator reading from a candle, |
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 |
Attributes:
Name | Type | Description |
---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
has_reading |
bool
|
Check if the indicator has generated values in the candles. |
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
has_reading
property
has_reading: bool
Check if the indicator has generated values in the candles.
This property determines whether the indicator readings have been generated for the associated candle data.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
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_managed_indicator
Adds managed sub indicator, this will not auto calculate with indicator
Source code in hexital/core/indicator.py
add_sub_indicator
Adds sub indicator, this will auto calculate with indicator
Source code in hexital/core/indicator.py
as_list
Retrieve the indicator values for all 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
|
Optional[str]
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
Type | Description |
---|---|
List[float | dict | None]
|
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.py
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator.py
purge
Remove this indicator value from all Candles
Source code in hexital/core/indicator.py
read_candle
read_candle(
candle: Candle, name: Optional[str] = None, default: Optional[T] = None
) -> float | dict | None | T
Simple method to get an indicator reading from a candle, regardless of it's location
Source code in hexital/core/indicator.py
reading
reading(
name: Optional[str] = None,
index: Optional[int] = None,
default: Optional[T] = None,
) -> float | dict | None | T
Simple method to get an indicator reading from the index Name can use '.' to find nested reading, E.G 'MACD_12_26_9.MACD
Source code in hexital/core/indicator.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator.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.py
JMA
dataclass
JMA(
*,
candles: List[Candle] = list(),
name: str = "",
timeframe: Optional[str | TimeFrame | timedelta | int] = None,
timeframe_fill: bool = False,
candle_life: Optional[timedelta] = None,
candlestick: Optional[CandlestickType | str] = None,
rounding: Optional[int] = 4,
period: int = 7,
source: str = "close",
phase: float = 0.0
)
Bases: Indicator
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_managed_indicator |
Adds managed sub indicator, this will not auto calculate with indicator |
add_sub_indicator |
Adds sub indicator, this will auto calculate with indicator |
as_list |
Retrieve the indicator values for all candles as a list. |
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 |
purge |
Remove this indicator value from all Candles |
read_candle |
Simple method to get an indicator reading from a candle, |
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 |
Attributes:
Name | Type | Description |
---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
has_reading |
bool
|
Check if the indicator has generated values in the candles. |
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
has_reading
property
has_reading: bool
Check if the indicator has generated values in the candles.
This property determines whether the indicator readings have been generated for the associated candle data.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
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_managed_indicator
Adds managed sub indicator, this will not auto calculate with indicator
Source code in hexital/core/indicator.py
add_sub_indicator
Adds sub indicator, this will auto calculate with indicator
Source code in hexital/core/indicator.py
as_list
Retrieve the indicator values for all 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
|
Optional[str]
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
Type | Description |
---|---|
List[float | dict | None]
|
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.py
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator.py
purge
Remove this indicator value from all Candles
Source code in hexital/core/indicator.py
read_candle
read_candle(
candle: Candle, name: Optional[str] = None, default: Optional[T] = None
) -> float | dict | None | T
Simple method to get an indicator reading from a candle, regardless of it's location
Source code in hexital/core/indicator.py
reading
reading(
name: Optional[str] = None,
index: Optional[int] = None,
default: Optional[T] = None,
) -> float | dict | None | T
Simple method to get an indicator reading from the index Name can use '.' to find nested reading, E.G 'MACD_12_26_9.MACD
Source code in hexital/core/indicator.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator.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.py
KC
dataclass
KC(
*,
candles: List[Candle] = list(),
name: str = "",
timeframe: Optional[str | TimeFrame | timedelta | int] = None,
timeframe_fill: bool = False,
candle_life: Optional[timedelta] = None,
candlestick: Optional[CandlestickType | str] = None,
rounding: Optional[int] = 4,
period: int = 20,
source: str = "close",
multiplier: float = 2.0
)
Bases: Indicator
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
|
Methods:
Name | Description |
---|---|
add_managed_indicator |
Adds managed sub indicator, this will not auto calculate with indicator |
add_sub_indicator |
Adds sub indicator, this will auto calculate with indicator |
as_list |
Retrieve the indicator values for all candles as a list. |
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 |
purge |
Remove this indicator value from all Candles |
read_candle |
Simple method to get an indicator reading from a candle, |
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 |
Attributes:
Name | Type | Description |
---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
has_reading |
bool
|
Check if the indicator has generated values in the candles. |
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
has_reading
property
has_reading: bool
Check if the indicator has generated values in the candles.
This property determines whether the indicator readings have been generated for the associated candle data.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
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_managed_indicator
Adds managed sub indicator, this will not auto calculate with indicator
Source code in hexital/core/indicator.py
add_sub_indicator
Adds sub indicator, this will auto calculate with indicator
Source code in hexital/core/indicator.py
as_list
Retrieve the indicator values for all 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
|
Optional[str]
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
Type | Description |
---|---|
List[float | dict | None]
|
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.py
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator.py
purge
Remove this indicator value from all Candles
Source code in hexital/core/indicator.py
read_candle
read_candle(
candle: Candle, name: Optional[str] = None, default: Optional[T] = None
) -> float | dict | None | T
Simple method to get an indicator reading from a candle, regardless of it's location
Source code in hexital/core/indicator.py
reading
reading(
name: Optional[str] = None,
index: Optional[int] = None,
default: Optional[T] = None,
) -> float | dict | None | T
Simple method to get an indicator reading from the index Name can use '.' to find nested reading, E.G 'MACD_12_26_9.MACD
Source code in hexital/core/indicator.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator.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.py
MACD
dataclass
MACD(
*,
candles: List[Candle] = list(),
name: str = "",
timeframe: Optional[str | TimeFrame | timedelta | int] = None,
timeframe_fill: bool = False,
candle_life: Optional[timedelta] = None,
candlestick: Optional[CandlestickType | str] = None,
rounding: Optional[int] = 4,
source: str = "close",
fast_period: int = 12,
slow_period: int = 26,
signal_period: int = 9
)
Bases: Indicator
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_managed_indicator |
Adds managed sub indicator, this will not auto calculate with indicator |
add_sub_indicator |
Adds sub indicator, this will auto calculate with indicator |
as_list |
Retrieve the indicator values for all candles as a list. |
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 |
purge |
Remove this indicator value from all Candles |
read_candle |
Simple method to get an indicator reading from a candle, |
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 |
Attributes:
Name | Type | Description |
---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
has_reading |
bool
|
Check if the indicator has generated values in the candles. |
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
has_reading
property
has_reading: bool
Check if the indicator has generated values in the candles.
This property determines whether the indicator readings have been generated for the associated candle data.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
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_managed_indicator
Adds managed sub indicator, this will not auto calculate with indicator
Source code in hexital/core/indicator.py
add_sub_indicator
Adds sub indicator, this will auto calculate with indicator
Source code in hexital/core/indicator.py
as_list
Retrieve the indicator values for all 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
|
Optional[str]
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
Type | Description |
---|---|
List[float | dict | None]
|
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.py
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator.py
purge
Remove this indicator value from all Candles
Source code in hexital/core/indicator.py
read_candle
read_candle(
candle: Candle, name: Optional[str] = None, default: Optional[T] = None
) -> float | dict | None | T
Simple method to get an indicator reading from a candle, regardless of it's location
Source code in hexital/core/indicator.py
reading
reading(
name: Optional[str] = None,
index: Optional[int] = None,
default: Optional[T] = None,
) -> float | dict | None | T
Simple method to get an indicator reading from the index Name can use '.' to find nested reading, E.G 'MACD_12_26_9.MACD
Source code in hexital/core/indicator.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator.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.py
MFI
dataclass
MFI(
*,
candles: List[Candle] = list(),
name: str = "",
timeframe: Optional[str | TimeFrame | timedelta | int] = None,
timeframe_fill: bool = False,
candle_life: Optional[timedelta] = None,
candlestick: Optional[CandlestickType | str] = None,
rounding: Optional[int] = 4,
period: int = 14,
source: str = "close"
)
Bases: Indicator
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_managed_indicator |
Adds managed sub indicator, this will not auto calculate with indicator |
add_sub_indicator |
Adds sub indicator, this will auto calculate with indicator |
as_list |
Retrieve the indicator values for all candles as a list. |
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 |
purge |
Remove this indicator value from all Candles |
read_candle |
Simple method to get an indicator reading from a candle, |
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 |
Attributes:
Name | Type | Description |
---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
has_reading |
bool
|
Check if the indicator has generated values in the candles. |
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
has_reading
property
has_reading: bool
Check if the indicator has generated values in the candles.
This property determines whether the indicator readings have been generated for the associated candle data.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
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_managed_indicator
Adds managed sub indicator, this will not auto calculate with indicator
Source code in hexital/core/indicator.py
add_sub_indicator
Adds sub indicator, this will auto calculate with indicator
Source code in hexital/core/indicator.py
as_list
Retrieve the indicator values for all 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
|
Optional[str]
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
Type | Description |
---|---|
List[float | dict | None]
|
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.py
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator.py
purge
Remove this indicator value from all Candles
Source code in hexital/core/indicator.py
read_candle
read_candle(
candle: Candle, name: Optional[str] = None, default: Optional[T] = None
) -> float | dict | None | T
Simple method to get an indicator reading from a candle, regardless of it's location
Source code in hexital/core/indicator.py
reading
reading(
name: Optional[str] = None,
index: Optional[int] = None,
default: Optional[T] = None,
) -> float | dict | None | T
Simple method to get an indicator reading from the index Name can use '.' to find nested reading, E.G 'MACD_12_26_9.MACD
Source code in hexital/core/indicator.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator.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.py
MOP
dataclass
MOP(
*,
candles: List[Candle] = list(),
name: str = "",
timeframe: Optional[str | TimeFrame | timedelta | int] = None,
timeframe_fill: bool = False,
candle_life: Optional[timedelta] = None,
candlestick: Optional[CandlestickType | str] = None,
rounding: Optional[int] = 4,
period: int = 2,
source: str = "close"
)
Bases: Indicator
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_managed_indicator |
Adds managed sub indicator, this will not auto calculate with indicator |
add_sub_indicator |
Adds sub indicator, this will auto calculate with indicator |
as_list |
Retrieve the indicator values for all candles as a list. |
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 |
purge |
Remove this indicator value from all Candles |
read_candle |
Simple method to get an indicator reading from a candle, |
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 |
Attributes:
Name | Type | Description |
---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
has_reading |
bool
|
Check if the indicator has generated values in the candles. |
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
has_reading
property
has_reading: bool
Check if the indicator has generated values in the candles.
This property determines whether the indicator readings have been generated for the associated candle data.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
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_managed_indicator
Adds managed sub indicator, this will not auto calculate with indicator
Source code in hexital/core/indicator.py
add_sub_indicator
Adds sub indicator, this will auto calculate with indicator
Source code in hexital/core/indicator.py
as_list
Retrieve the indicator values for all 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
|
Optional[str]
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
Type | Description |
---|---|
List[float | dict | None]
|
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.py
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator.py
purge
Remove this indicator value from all Candles
Source code in hexital/core/indicator.py
read_candle
read_candle(
candle: Candle, name: Optional[str] = None, default: Optional[T] = None
) -> float | dict | None | T
Simple method to get an indicator reading from a candle, regardless of it's location
Source code in hexital/core/indicator.py
reading
reading(
name: Optional[str] = None,
index: Optional[int] = None,
default: Optional[T] = None,
) -> float | dict | None | T
Simple method to get an indicator reading from the index Name can use '.' to find nested reading, E.G 'MACD_12_26_9.MACD
Source code in hexital/core/indicator.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator.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.py
OBV
dataclass
OBV(
*,
candles: List[Candle] = list(),
name: str = "",
timeframe: Optional[str | TimeFrame | timedelta | int] = None,
timeframe_fill: bool = False,
candle_life: Optional[timedelta] = None,
candlestick: Optional[CandlestickType | str] = None,
rounding: Optional[int] = 4
)
Bases: Indicator
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_managed_indicator |
Adds managed sub indicator, this will not auto calculate with indicator |
add_sub_indicator |
Adds sub indicator, this will auto calculate with indicator |
as_list |
Retrieve the indicator values for all candles as a list. |
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 |
purge |
Remove this indicator value from all Candles |
read_candle |
Simple method to get an indicator reading from a candle, |
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 |
Attributes:
Name | Type | Description |
---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
has_reading |
bool
|
Check if the indicator has generated values in the candles. |
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
has_reading
property
has_reading: bool
Check if the indicator has generated values in the candles.
This property determines whether the indicator readings have been generated for the associated candle data.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
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_managed_indicator
Adds managed sub indicator, this will not auto calculate with indicator
Source code in hexital/core/indicator.py
add_sub_indicator
Adds sub indicator, this will auto calculate with indicator
Source code in hexital/core/indicator.py
as_list
Retrieve the indicator values for all 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
|
Optional[str]
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
Type | Description |
---|---|
List[float | dict | None]
|
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.py
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator.py
purge
Remove this indicator value from all Candles
Source code in hexital/core/indicator.py
read_candle
read_candle(
candle: Candle, name: Optional[str] = None, default: Optional[T] = None
) -> float | dict | None | T
Simple method to get an indicator reading from a candle, regardless of it's location
Source code in hexital/core/indicator.py
reading
reading(
name: Optional[str] = None,
index: Optional[int] = None,
default: Optional[T] = None,
) -> float | dict | None | T
Simple method to get an indicator reading from the index Name can use '.' to find nested reading, E.G 'MACD_12_26_9.MACD
Source code in hexital/core/indicator.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator.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.py
PivotPoints
dataclass
PivotPoints(
*,
candles: List[Candle] = list(),
name: str = "",
timeframe: Optional[str | TimeFrame | timedelta | int] = None,
timeframe_fill: bool = False,
candle_life: Optional[timedelta] = None,
candlestick: Optional[CandlestickType | str] = None,
rounding: Optional[int] = 4
)
Bases: Indicator
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_managed_indicator |
Adds managed sub indicator, this will not auto calculate with indicator |
add_sub_indicator |
Adds sub indicator, this will auto calculate with indicator |
as_list |
Retrieve the indicator values for all candles as a list. |
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 |
purge |
Remove this indicator value from all Candles |
read_candle |
Simple method to get an indicator reading from a candle, |
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 |
Attributes:
Name | Type | Description |
---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
has_reading |
bool
|
Check if the indicator has generated values in the candles. |
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
has_reading
property
has_reading: bool
Check if the indicator has generated values in the candles.
This property determines whether the indicator readings have been generated for the associated candle data.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
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_managed_indicator
Adds managed sub indicator, this will not auto calculate with indicator
Source code in hexital/core/indicator.py
add_sub_indicator
Adds sub indicator, this will auto calculate with indicator
Source code in hexital/core/indicator.py
as_list
Retrieve the indicator values for all 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
|
Optional[str]
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
Type | Description |
---|---|
List[float | dict | None]
|
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.py
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator.py
purge
Remove this indicator value from all Candles
Source code in hexital/core/indicator.py
read_candle
read_candle(
candle: Candle, name: Optional[str] = None, default: Optional[T] = None
) -> float | dict | None | T
Simple method to get an indicator reading from a candle, regardless of it's location
Source code in hexital/core/indicator.py
reading
reading(
name: Optional[str] = None,
index: Optional[int] = None,
default: Optional[T] = None,
) -> float | dict | None | T
Simple method to get an indicator reading from the index Name can use '.' to find nested reading, E.G 'MACD_12_26_9.MACD
Source code in hexital/core/indicator.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator.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.py
RMA
dataclass
RMA(
*,
candles: List[Candle] = list(),
name: str = "",
timeframe: Optional[str | TimeFrame | timedelta | int] = None,
timeframe_fill: bool = False,
candle_life: Optional[timedelta] = None,
candlestick: Optional[CandlestickType | str] = None,
rounding: Optional[int] = 4,
period: int = 10,
source: str = "close"
)
Bases: Indicator
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_managed_indicator |
Adds managed sub indicator, this will not auto calculate with indicator |
add_sub_indicator |
Adds sub indicator, this will auto calculate with indicator |
as_list |
Retrieve the indicator values for all candles as a list. |
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 |
purge |
Remove this indicator value from all Candles |
read_candle |
Simple method to get an indicator reading from a candle, |
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 |
Attributes:
Name | Type | Description |
---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
has_reading |
bool
|
Check if the indicator has generated values in the candles. |
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
has_reading
property
has_reading: bool
Check if the indicator has generated values in the candles.
This property determines whether the indicator readings have been generated for the associated candle data.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
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_managed_indicator
Adds managed sub indicator, this will not auto calculate with indicator
Source code in hexital/core/indicator.py
add_sub_indicator
Adds sub indicator, this will auto calculate with indicator
Source code in hexital/core/indicator.py
as_list
Retrieve the indicator values for all 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
|
Optional[str]
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
Type | Description |
---|---|
List[float | dict | None]
|
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.py
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator.py
purge
Remove this indicator value from all Candles
Source code in hexital/core/indicator.py
read_candle
read_candle(
candle: Candle, name: Optional[str] = None, default: Optional[T] = None
) -> float | dict | None | T
Simple method to get an indicator reading from a candle, regardless of it's location
Source code in hexital/core/indicator.py
reading
reading(
name: Optional[str] = None,
index: Optional[int] = None,
default: Optional[T] = None,
) -> float | dict | None | T
Simple method to get an indicator reading from the index Name can use '.' to find nested reading, E.G 'MACD_12_26_9.MACD
Source code in hexital/core/indicator.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator.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.py
ROC
dataclass
ROC(
*,
candles: List[Candle] = list(),
name: str = "",
timeframe: Optional[str | TimeFrame | timedelta | int] = None,
timeframe_fill: bool = False,
candle_life: Optional[timedelta] = None,
candlestick: Optional[CandlestickType | str] = None,
rounding: Optional[int] = 4,
period: int = 10,
source: str = "close"
)
Bases: Indicator
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_managed_indicator |
Adds managed sub indicator, this will not auto calculate with indicator |
add_sub_indicator |
Adds sub indicator, this will auto calculate with indicator |
as_list |
Retrieve the indicator values for all candles as a list. |
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 |
purge |
Remove this indicator value from all Candles |
read_candle |
Simple method to get an indicator reading from a candle, |
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 |
Attributes:
Name | Type | Description |
---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
has_reading |
bool
|
Check if the indicator has generated values in the candles. |
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
has_reading
property
has_reading: bool
Check if the indicator has generated values in the candles.
This property determines whether the indicator readings have been generated for the associated candle data.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
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_managed_indicator
Adds managed sub indicator, this will not auto calculate with indicator
Source code in hexital/core/indicator.py
add_sub_indicator
Adds sub indicator, this will auto calculate with indicator
Source code in hexital/core/indicator.py
as_list
Retrieve the indicator values for all 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
|
Optional[str]
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
Type | Description |
---|---|
List[float | dict | None]
|
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.py
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator.py
purge
Remove this indicator value from all Candles
Source code in hexital/core/indicator.py
read_candle
read_candle(
candle: Candle, name: Optional[str] = None, default: Optional[T] = None
) -> float | dict | None | T
Simple method to get an indicator reading from a candle, regardless of it's location
Source code in hexital/core/indicator.py
reading
reading(
name: Optional[str] = None,
index: Optional[int] = None,
default: Optional[T] = None,
) -> float | dict | None | T
Simple method to get an indicator reading from the index Name can use '.' to find nested reading, E.G 'MACD_12_26_9.MACD
Source code in hexital/core/indicator.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator.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.py
RSI
dataclass
RSI(
*,
candles: List[Candle] = list(),
name: str = "",
timeframe: Optional[str | TimeFrame | timedelta | int] = None,
timeframe_fill: bool = False,
candle_life: Optional[timedelta] = None,
candlestick: Optional[CandlestickType | str] = None,
rounding: Optional[int] = 4,
period: int = 14,
source: str = "close"
)
Bases: Indicator
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_managed_indicator |
Adds managed sub indicator, this will not auto calculate with indicator |
add_sub_indicator |
Adds sub indicator, this will auto calculate with indicator |
as_list |
Retrieve the indicator values for all candles as a list. |
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 |
purge |
Remove this indicator value from all Candles |
read_candle |
Simple method to get an indicator reading from a candle, |
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 |
Attributes:
Name | Type | Description |
---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
has_reading |
bool
|
Check if the indicator has generated values in the candles. |
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
has_reading
property
has_reading: bool
Check if the indicator has generated values in the candles.
This property determines whether the indicator readings have been generated for the associated candle data.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
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_managed_indicator
Adds managed sub indicator, this will not auto calculate with indicator
Source code in hexital/core/indicator.py
add_sub_indicator
Adds sub indicator, this will auto calculate with indicator
Source code in hexital/core/indicator.py
as_list
Retrieve the indicator values for all 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
|
Optional[str]
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
Type | Description |
---|---|
List[float | dict | None]
|
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.py
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator.py
purge
Remove this indicator value from all Candles
Source code in hexital/core/indicator.py
read_candle
read_candle(
candle: Candle, name: Optional[str] = None, default: Optional[T] = None
) -> float | dict | None | T
Simple method to get an indicator reading from a candle, regardless of it's location
Source code in hexital/core/indicator.py
reading
reading(
name: Optional[str] = None,
index: Optional[int] = None,
default: Optional[T] = None,
) -> float | dict | None | T
Simple method to get an indicator reading from the index Name can use '.' to find nested reading, E.G 'MACD_12_26_9.MACD
Source code in hexital/core/indicator.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator.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.py
RVI
dataclass
RVI(
*,
candles: List[Candle] = list(),
name: str = "",
timeframe: Optional[str | TimeFrame | timedelta | int] = None,
timeframe_fill: bool = False,
candle_life: Optional[timedelta] = None,
candlestick: Optional[CandlestickType | str] = None,
rounding: Optional[int] = 4,
period: int = 14,
source: str = "close"
)
Bases: Indicator
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_managed_indicator |
Adds managed sub indicator, this will not auto calculate with indicator |
add_sub_indicator |
Adds sub indicator, this will auto calculate with indicator |
as_list |
Retrieve the indicator values for all candles as a list. |
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 |
purge |
Remove this indicator value from all Candles |
read_candle |
Simple method to get an indicator reading from a candle, |
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 |
Attributes:
Name | Type | Description |
---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
has_reading |
bool
|
Check if the indicator has generated values in the candles. |
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
has_reading
property
has_reading: bool
Check if the indicator has generated values in the candles.
This property determines whether the indicator readings have been generated for the associated candle data.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
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_managed_indicator
Adds managed sub indicator, this will not auto calculate with indicator
Source code in hexital/core/indicator.py
add_sub_indicator
Adds sub indicator, this will auto calculate with indicator
Source code in hexital/core/indicator.py
as_list
Retrieve the indicator values for all 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
|
Optional[str]
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
Type | Description |
---|---|
List[float | dict | None]
|
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.py
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator.py
purge
Remove this indicator value from all Candles
Source code in hexital/core/indicator.py
read_candle
read_candle(
candle: Candle, name: Optional[str] = None, default: Optional[T] = None
) -> float | dict | None | T
Simple method to get an indicator reading from a candle, regardless of it's location
Source code in hexital/core/indicator.py
reading
reading(
name: Optional[str] = None,
index: Optional[int] = None,
default: Optional[T] = None,
) -> float | dict | None | T
Simple method to get an indicator reading from the index Name can use '.' to find nested reading, E.G 'MACD_12_26_9.MACD
Source code in hexital/core/indicator.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator.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.py
SMA
dataclass
SMA(
*,
candles: List[Candle] = list(),
name: str = "",
timeframe: Optional[str | TimeFrame | timedelta | int] = None,
timeframe_fill: bool = False,
candle_life: Optional[timedelta] = None,
candlestick: Optional[CandlestickType | str] = None,
rounding: Optional[int] = 4,
period: int = 10,
source: str = "close"
)
Bases: Indicator
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_managed_indicator |
Adds managed sub indicator, this will not auto calculate with indicator |
add_sub_indicator |
Adds sub indicator, this will auto calculate with indicator |
as_list |
Retrieve the indicator values for all candles as a list. |
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 |
purge |
Remove this indicator value from all Candles |
read_candle |
Simple method to get an indicator reading from a candle, |
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 |
Attributes:
Name | Type | Description |
---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
has_reading |
bool
|
Check if the indicator has generated values in the candles. |
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
has_reading
property
has_reading: bool
Check if the indicator has generated values in the candles.
This property determines whether the indicator readings have been generated for the associated candle data.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
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_managed_indicator
Adds managed sub indicator, this will not auto calculate with indicator
Source code in hexital/core/indicator.py
add_sub_indicator
Adds sub indicator, this will auto calculate with indicator
Source code in hexital/core/indicator.py
as_list
Retrieve the indicator values for all 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
|
Optional[str]
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
Type | Description |
---|---|
List[float | dict | None]
|
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.py
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator.py
purge
Remove this indicator value from all Candles
Source code in hexital/core/indicator.py
read_candle
read_candle(
candle: Candle, name: Optional[str] = None, default: Optional[T] = None
) -> float | dict | None | T
Simple method to get an indicator reading from a candle, regardless of it's location
Source code in hexital/core/indicator.py
reading
reading(
name: Optional[str] = None,
index: Optional[int] = None,
default: Optional[T] = None,
) -> float | dict | None | T
Simple method to get an indicator reading from the index Name can use '.' to find nested reading, E.G 'MACD_12_26_9.MACD
Source code in hexital/core/indicator.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator.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.py
STDEV
dataclass
STDEV(
*,
candles: List[Candle] = list(),
name: str = "",
timeframe: Optional[str | TimeFrame | timedelta | int] = None,
timeframe_fill: bool = False,
candle_life: Optional[timedelta] = None,
candlestick: Optional[CandlestickType | str] = None,
rounding: Optional[int] = 4,
period: int = 30,
source: str = "close"
)
Bases: Indicator
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_managed_indicator |
Adds managed sub indicator, this will not auto calculate with indicator |
add_sub_indicator |
Adds sub indicator, this will auto calculate with indicator |
as_list |
Retrieve the indicator values for all candles as a list. |
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 |
purge |
Remove this indicator value from all Candles |
read_candle |
Simple method to get an indicator reading from a candle, |
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 |
Attributes:
Name | Type | Description |
---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
has_reading |
bool
|
Check if the indicator has generated values in the candles. |
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
has_reading
property
has_reading: bool
Check if the indicator has generated values in the candles.
This property determines whether the indicator readings have been generated for the associated candle data.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
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_managed_indicator
Adds managed sub indicator, this will not auto calculate with indicator
Source code in hexital/core/indicator.py
add_sub_indicator
Adds sub indicator, this will auto calculate with indicator
Source code in hexital/core/indicator.py
as_list
Retrieve the indicator values for all 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
|
Optional[str]
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
Type | Description |
---|---|
List[float | dict | None]
|
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.py
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator.py
purge
Remove this indicator value from all Candles
Source code in hexital/core/indicator.py
read_candle
read_candle(
candle: Candle, name: Optional[str] = None, default: Optional[T] = None
) -> float | dict | None | T
Simple method to get an indicator reading from a candle, regardless of it's location
Source code in hexital/core/indicator.py
reading
reading(
name: Optional[str] = None,
index: Optional[int] = None,
default: Optional[T] = None,
) -> float | dict | None | T
Simple method to get an indicator reading from the index Name can use '.' to find nested reading, E.G 'MACD_12_26_9.MACD
Source code in hexital/core/indicator.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator.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.py
STDEVT
dataclass
STDEVT(
*,
candles: List[Candle] = list(),
name: str = "",
timeframe: Optional[str | TimeFrame | timedelta | int] = None,
timeframe_fill: bool = False,
candle_life: Optional[timedelta] = None,
candlestick: Optional[CandlestickType | str] = None,
rounding: Optional[int] = 4,
period: int = 10,
source: str = "close",
multiplier: float = 2.0
)
Bases: Indicator
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_managed_indicator |
Adds managed sub indicator, this will not auto calculate with indicator |
add_sub_indicator |
Adds sub indicator, this will auto calculate with indicator |
as_list |
Retrieve the indicator values for all candles as a list. |
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 |
purge |
Remove this indicator value from all Candles |
read_candle |
Simple method to get an indicator reading from a candle, |
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 |
Attributes:
Name | Type | Description |
---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
has_reading |
bool
|
Check if the indicator has generated values in the candles. |
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
has_reading
property
has_reading: bool
Check if the indicator has generated values in the candles.
This property determines whether the indicator readings have been generated for the associated candle data.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
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_managed_indicator
Adds managed sub indicator, this will not auto calculate with indicator
Source code in hexital/core/indicator.py
add_sub_indicator
Adds sub indicator, this will auto calculate with indicator
Source code in hexital/core/indicator.py
as_list
Retrieve the indicator values for all 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
|
Optional[str]
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
Type | Description |
---|---|
List[float | dict | None]
|
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.py
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator.py
purge
Remove this indicator value from all Candles
Source code in hexital/core/indicator.py
read_candle
read_candle(
candle: Candle, name: Optional[str] = None, default: Optional[T] = None
) -> float | dict | None | T
Simple method to get an indicator reading from a candle, regardless of it's location
Source code in hexital/core/indicator.py
reading
reading(
name: Optional[str] = None,
index: Optional[int] = None,
default: Optional[T] = None,
) -> float | dict | None | T
Simple method to get an indicator reading from the index Name can use '.' to find nested reading, E.G 'MACD_12_26_9.MACD
Source code in hexital/core/indicator.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator.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.py
STOCH
dataclass
STOCH(
*,
candles: List[Candle] = list(),
name: str = "",
timeframe: Optional[str | TimeFrame | timedelta | int] = None,
timeframe_fill: bool = False,
candle_life: Optional[timedelta] = None,
candlestick: Optional[CandlestickType | str] = None,
rounding: Optional[int] = 4,
period: int = 14,
slow_period: int = 3,
smoothing_k: int = 3,
source: str = "close"
)
Bases: Indicator
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_managed_indicator |
Adds managed sub indicator, this will not auto calculate with indicator |
add_sub_indicator |
Adds sub indicator, this will auto calculate with indicator |
as_list |
Retrieve the indicator values for all candles as a list. |
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 |
purge |
Remove this indicator value from all Candles |
read_candle |
Simple method to get an indicator reading from a candle, |
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 |
Attributes:
Name | Type | Description |
---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
has_reading |
bool
|
Check if the indicator has generated values in the candles. |
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
has_reading
property
has_reading: bool
Check if the indicator has generated values in the candles.
This property determines whether the indicator readings have been generated for the associated candle data.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
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_managed_indicator
Adds managed sub indicator, this will not auto calculate with indicator
Source code in hexital/core/indicator.py
add_sub_indicator
Adds sub indicator, this will auto calculate with indicator
Source code in hexital/core/indicator.py
as_list
Retrieve the indicator values for all 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
|
Optional[str]
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
Type | Description |
---|---|
List[float | dict | None]
|
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.py
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator.py
purge
Remove this indicator value from all Candles
Source code in hexital/core/indicator.py
read_candle
read_candle(
candle: Candle, name: Optional[str] = None, default: Optional[T] = None
) -> float | dict | None | T
Simple method to get an indicator reading from a candle, regardless of it's location
Source code in hexital/core/indicator.py
reading
reading(
name: Optional[str] = None,
index: Optional[int] = None,
default: Optional[T] = None,
) -> float | dict | None | T
Simple method to get an indicator reading from the index Name can use '.' to find nested reading, E.G 'MACD_12_26_9.MACD
Source code in hexital/core/indicator.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator.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.py
Supertrend
dataclass
Supertrend(
*,
candles: List[Candle] = list(),
name: str = "",
timeframe: Optional[str | TimeFrame | timedelta | int] = None,
timeframe_fill: bool = False,
candle_life: Optional[timedelta] = None,
candlestick: Optional[CandlestickType | str] = None,
rounding: Optional[int] = 4,
period: int = 7,
source: str = "close",
multiplier: float = 3.0
)
Bases: Indicator
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_managed_indicator |
Adds managed sub indicator, this will not auto calculate with indicator |
add_sub_indicator |
Adds sub indicator, this will auto calculate with indicator |
as_list |
Retrieve the indicator values for all candles as a list. |
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 |
purge |
Remove this indicator value from all Candles |
read_candle |
Simple method to get an indicator reading from a candle, |
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 |
Attributes:
Name | Type | Description |
---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
has_reading |
bool
|
Check if the indicator has generated values in the candles. |
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
has_reading
property
has_reading: bool
Check if the indicator has generated values in the candles.
This property determines whether the indicator readings have been generated for the associated candle data.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
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_managed_indicator
Adds managed sub indicator, this will not auto calculate with indicator
Source code in hexital/core/indicator.py
add_sub_indicator
Adds sub indicator, this will auto calculate with indicator
Source code in hexital/core/indicator.py
as_list
Retrieve the indicator values for all 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
|
Optional[str]
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
Type | Description |
---|---|
List[float | dict | None]
|
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.py
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator.py
purge
Remove this indicator value from all Candles
Source code in hexital/core/indicator.py
read_candle
read_candle(
candle: Candle, name: Optional[str] = None, default: Optional[T] = None
) -> float | dict | None | T
Simple method to get an indicator reading from a candle, regardless of it's location
Source code in hexital/core/indicator.py
reading
reading(
name: Optional[str] = None,
index: Optional[int] = None,
default: Optional[T] = None,
) -> float | dict | None | T
Simple method to get an indicator reading from the index Name can use '.' to find nested reading, E.G 'MACD_12_26_9.MACD
Source code in hexital/core/indicator.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator.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.py
TR
dataclass
TR(
*,
candles: List[Candle] = list(),
name: str = "",
timeframe: Optional[str | TimeFrame | timedelta | int] = None,
timeframe_fill: bool = False,
candle_life: Optional[timedelta] = None,
candlestick: Optional[CandlestickType | str] = None,
rounding: Optional[int] = 4
)
Bases: Indicator
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_managed_indicator |
Adds managed sub indicator, this will not auto calculate with indicator |
add_sub_indicator |
Adds sub indicator, this will auto calculate with indicator |
as_list |
Retrieve the indicator values for all candles as a list. |
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 |
purge |
Remove this indicator value from all Candles |
read_candle |
Simple method to get an indicator reading from a candle, |
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 |
Attributes:
Name | Type | Description |
---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
has_reading |
bool
|
Check if the indicator has generated values in the candles. |
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
has_reading
property
has_reading: bool
Check if the indicator has generated values in the candles.
This property determines whether the indicator readings have been generated for the associated candle data.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
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_managed_indicator
Adds managed sub indicator, this will not auto calculate with indicator
Source code in hexital/core/indicator.py
add_sub_indicator
Adds sub indicator, this will auto calculate with indicator
Source code in hexital/core/indicator.py
as_list
Retrieve the indicator values for all 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
|
Optional[str]
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
Type | Description |
---|---|
List[float | dict | None]
|
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.py
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator.py
purge
Remove this indicator value from all Candles
Source code in hexital/core/indicator.py
read_candle
read_candle(
candle: Candle, name: Optional[str] = None, default: Optional[T] = None
) -> float | dict | None | T
Simple method to get an indicator reading from a candle, regardless of it's location
Source code in hexital/core/indicator.py
reading
reading(
name: Optional[str] = None,
index: Optional[int] = None,
default: Optional[T] = None,
) -> float | dict | None | T
Simple method to get an indicator reading from the index Name can use '.' to find nested reading, E.G 'MACD_12_26_9.MACD
Source code in hexital/core/indicator.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator.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.py
TSI
dataclass
TSI(
*,
candles: List[Candle] = list(),
name: str = "",
timeframe: Optional[str | TimeFrame | timedelta | int] = None,
timeframe_fill: bool = False,
candle_life: Optional[timedelta] = None,
candlestick: Optional[CandlestickType | str] = None,
rounding: Optional[int] = 4,
period: int = 25,
smooth_period: Optional[int] = None,
source: str = "close"
)
Bases: Indicator
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 |
None
|
source
|
str
|
Which input field to calculate the Indicator. Defaults to "close" |
'close'
|
Methods:
Name | Description |
---|---|
add_managed_indicator |
Adds managed sub indicator, this will not auto calculate with indicator |
add_sub_indicator |
Adds sub indicator, this will auto calculate with indicator |
as_list |
Retrieve the indicator values for all candles as a list. |
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 |
purge |
Remove this indicator value from all Candles |
read_candle |
Simple method to get an indicator reading from a candle, |
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 |
Attributes:
Name | Type | Description |
---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
has_reading |
bool
|
Check if the indicator has generated values in the candles. |
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
has_reading
property
has_reading: bool
Check if the indicator has generated values in the candles.
This property determines whether the indicator readings have been generated for the associated candle data.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
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_managed_indicator
Adds managed sub indicator, this will not auto calculate with indicator
Source code in hexital/core/indicator.py
add_sub_indicator
Adds sub indicator, this will auto calculate with indicator
Source code in hexital/core/indicator.py
as_list
Retrieve the indicator values for all 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
|
Optional[str]
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
Type | Description |
---|---|
List[float | dict | None]
|
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.py
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator.py
purge
Remove this indicator value from all Candles
Source code in hexital/core/indicator.py
read_candle
read_candle(
candle: Candle, name: Optional[str] = None, default: Optional[T] = None
) -> float | dict | None | T
Simple method to get an indicator reading from a candle, regardless of it's location
Source code in hexital/core/indicator.py
reading
reading(
name: Optional[str] = None,
index: Optional[int] = None,
default: Optional[T] = None,
) -> float | dict | None | T
Simple method to get an indicator reading from the index Name can use '.' to find nested reading, E.G 'MACD_12_26_9.MACD
Source code in hexital/core/indicator.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator.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.py
VWAP
dataclass
VWAP(
*,
candles: List[Candle] = list(),
name: str = "",
timeframe: Optional[str | TimeFrame | timedelta | int] = None,
timeframe_fill: bool = False,
candle_life: Optional[timedelta] = None,
candlestick: Optional[CandlestickType | str] = None,
rounding: Optional[int] = 4,
anchor: Optional[str | TimeFrame | timedelta | int] = "D"
)
Bases: Indicator
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.
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_managed_indicator |
Adds managed sub indicator, this will not auto calculate with indicator |
add_sub_indicator |
Adds sub indicator, this will auto calculate with indicator |
as_list |
Retrieve the indicator values for all candles as a list. |
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 |
purge |
Remove this indicator value from all Candles |
read_candle |
Simple method to get an indicator reading from a candle, |
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 |
Attributes:
Name | Type | Description |
---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
has_reading |
bool
|
Check if the indicator has generated values in the candles. |
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
has_reading
property
has_reading: bool
Check if the indicator has generated values in the candles.
This property determines whether the indicator readings have been generated for the associated candle data.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
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_managed_indicator
Adds managed sub indicator, this will not auto calculate with indicator
Source code in hexital/core/indicator.py
add_sub_indicator
Adds sub indicator, this will auto calculate with indicator
Source code in hexital/core/indicator.py
as_list
Retrieve the indicator values for all 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
|
Optional[str]
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
Type | Description |
---|---|
List[float | dict | None]
|
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.py
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator.py
purge
Remove this indicator value from all Candles
Source code in hexital/core/indicator.py
read_candle
read_candle(
candle: Candle, name: Optional[str] = None, default: Optional[T] = None
) -> float | dict | None | T
Simple method to get an indicator reading from a candle, regardless of it's location
Source code in hexital/core/indicator.py
reading
reading(
name: Optional[str] = None,
index: Optional[int] = None,
default: Optional[T] = None,
) -> float | dict | None | T
Simple method to get an indicator reading from the index Name can use '.' to find nested reading, E.G 'MACD_12_26_9.MACD
Source code in hexital/core/indicator.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator.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.py
VWMA
dataclass
VWMA(
*,
candles: List[Candle] = list(),
name: str = "",
timeframe: Optional[str | TimeFrame | timedelta | int] = None,
timeframe_fill: bool = False,
candle_life: Optional[timedelta] = None,
candlestick: Optional[CandlestickType | str] = None,
rounding: Optional[int] = 4,
period: int = 10
)
Bases: Indicator
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_managed_indicator |
Adds managed sub indicator, this will not auto calculate with indicator |
add_sub_indicator |
Adds sub indicator, this will auto calculate with indicator |
as_list |
Retrieve the indicator values for all candles as a list. |
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 |
purge |
Remove this indicator value from all Candles |
read_candle |
Simple method to get an indicator reading from a candle, |
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 |
Attributes:
Name | Type | Description |
---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
has_reading |
bool
|
Check if the indicator has generated values in the candles. |
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
has_reading
property
has_reading: bool
Check if the indicator has generated values in the candles.
This property determines whether the indicator readings have been generated for the associated candle data.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
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_managed_indicator
Adds managed sub indicator, this will not auto calculate with indicator
Source code in hexital/core/indicator.py
add_sub_indicator
Adds sub indicator, this will auto calculate with indicator
Source code in hexital/core/indicator.py
as_list
Retrieve the indicator values for all 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
|
Optional[str]
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
Type | Description |
---|---|
List[float | dict | None]
|
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.py
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator.py
purge
Remove this indicator value from all Candles
Source code in hexital/core/indicator.py
read_candle
read_candle(
candle: Candle, name: Optional[str] = None, default: Optional[T] = None
) -> float | dict | None | T
Simple method to get an indicator reading from a candle, regardless of it's location
Source code in hexital/core/indicator.py
reading
reading(
name: Optional[str] = None,
index: Optional[int] = None,
default: Optional[T] = None,
) -> float | dict | None | T
Simple method to get an indicator reading from the index Name can use '.' to find nested reading, E.G 'MACD_12_26_9.MACD
Source code in hexital/core/indicator.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator.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.py
WMA
dataclass
WMA(
*,
candles: List[Candle] = list(),
name: str = "",
timeframe: Optional[str | TimeFrame | timedelta | int] = None,
timeframe_fill: bool = False,
candle_life: Optional[timedelta] = None,
candlestick: Optional[CandlestickType | str] = None,
rounding: Optional[int] = 4,
period: int = 10,
source: str = "close"
)
Bases: Indicator
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_managed_indicator |
Adds managed sub indicator, this will not auto calculate with indicator |
add_sub_indicator |
Adds sub indicator, this will auto calculate with indicator |
as_list |
Retrieve the indicator values for all candles as a list. |
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 |
purge |
Remove this indicator value from all Candles |
read_candle |
Simple method to get an indicator reading from a candle, |
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 |
Attributes:
Name | Type | Description |
---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
has_reading |
bool
|
Check if the indicator has generated values in the candles. |
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
has_reading
property
has_reading: bool
Check if the indicator has generated values in the candles.
This property determines whether the indicator readings have been generated for the associated candle data.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
|
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_managed_indicator
Adds managed sub indicator, this will not auto calculate with indicator
Source code in hexital/core/indicator.py
add_sub_indicator
Adds sub indicator, this will auto calculate with indicator
Source code in hexital/core/indicator.py
as_list
Retrieve the indicator values for all 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
|
Optional[str]
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
Type | Description |
---|---|
List[float | dict | None]
|
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.py
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator.py
purge
Remove this indicator value from all Candles
Source code in hexital/core/indicator.py
read_candle
read_candle(
candle: Candle, name: Optional[str] = None, default: Optional[T] = None
) -> float | dict | None | T
Simple method to get an indicator reading from a candle, regardless of it's location
Source code in hexital/core/indicator.py
reading
reading(
name: Optional[str] = None,
index: Optional[int] = None,
default: Optional[T] = None,
) -> float | dict | None | T
Simple method to get an indicator reading from the index Name can use '.' to find nested reading, E.G 'MACD_12_26_9.MACD
Source code in hexital/core/indicator.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator.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