amorph
amorph
Classes:
| Name | Description |
|---|---|
Amorph |
Amorph |
Amorph
Bases: Indicator
Amorph
Flexible Skeleton Indicator that will use a method to generate readings on every Candle like indicators.
The given Method is expected to have 'candles' and 'index' as named arguments, EG:
Input type Example: Doji
Output type: Based on analysis method
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
analysis
|
Callable
|
Period to index back in |
required |
args
|
dict | None
|
All of the Arguments as keyword arguments as a dict of keyword arguments for called analysis |
None
|
Methods:
| Name | Description |
|---|---|
add_child |
Register a child indicator that shares this indicator's candles. |
add_child_after |
Register a child calculated after the parent's reading is stored. |
add_child_managed |
Register a child calculated only when explicitly invoked. |
add_state |
Register hidden state storage for incremental calculations. |
append |
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
at |
Reading at a specific candle index — shorthand for |
at_src |
Reading at |
calculate |
Calculate the TA values, will calculate for all the Candles, |
calculate_index |
Calculate the TA values, will calculate a index range the Candles, will re-calculate |
insert |
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles. |
prepend |
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap. |
prev |
Previous reading — shorthand for |
prev_src |
Previous reading for this indicator's configured |
reading |
Simple method to get an indicator reading from the index |
reading_count |
Returns how many instance of the given indicator exist |
reading_period |
Will return True if the given indicator goes back as far as amount, |
recalculate |
Re-calculate this indicator value for all Candles |
series |
Retrieve the indicator readings for within the candles as a list. |
src |
Current reading for this indicator's configured |
Attributes:
| Name | Type | Description |
|---|---|---|
candle_manager |
CandleManager
|
The Candle Manager which controls TimeFrame, Trimming and collapsing |
settings |
dict
|
Returns a dict format of how this indicator can be generated |
Source code in hexital/indicators/amorph.py
candle_manager
property
writable
candle_manager: CandleManager
The Candle Manager which controls TimeFrame, Trimming and collapsing
add_child
Register a child indicator that shares this indicator's candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
Indicator
|
The child indicator to attach. |
required |
when
|
ChildWhen | str
|
When the child is calculated relative to the parent at each index.
:attr: |
BEFORE
|
Source code in hexital/core/indicator/core.py
add_child_after
Register a child calculated after the parent's reading is stored.
add_child_managed
Register a child calculated only when explicitly invoked.
Source code in hexital/core/indicator/core.py
add_state
Register hidden state storage for incremental calculations.
Source code in hexital/core/indicator/core.py
append
Appends a Candle or a chronological ordered list of Candle's to the end of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
candles
|
Candles
|
The Candle or List of Candle's to append. |
required |
Source code in hexital/core/indicator/core.py
at
at(
index: int, source: Source | None = None, default: T | None = None
) -> V | T
Reading at a specific candle index — shorthand for reading.
at_src
at_src(index: int, default: T | None = None) -> V | T
Reading at index for this indicator's configured source.
calculate
Calculate the TA values, will calculate for all the Candles, where this indicator is missing
Source code in hexital/core/indicator/core.py
calculate_index
Calculate the TA values, will calculate a index range the Candles, will re-calculate
Source code in hexital/core/indicator/core.py
insert
insert a Candle or a list of Candle's to the Indicator Candles. This accepts any order or placement. This will sort, re-sample and re-calculate all Candles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
candles
|
Candles
|
The Candle or List of Candle's to prepend. |
required |
Source code in hexital/core/indicator/core.py
prepend
Prepends a Candle or a chronological ordered list of Candle's to the front of the Indicator Candle's. This will only re-sample and re-calculate the new Candles, with minor overlap.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
candles
|
Candles
|
The Candle or List of Candle's to prepend. |
required |
Source code in hexital/core/indicator/core.py
prev
prev_src
Previous reading for this indicator's configured source.
reading
reading(
source: Source | None = None,
index: int | None = None,
default: T | None = None,
) -> V | T
Simple method to get an indicator reading from the index
Source code in hexital/core/indicator/core.py
reading_count
Returns how many instance of the given indicator exist
Source code in hexital/core/indicator/core.py
reading_period
Will return True if the given indicator goes back as far as amount, It's true if exactly or more than. Period will be period -1
Source code in hexital/core/indicator/core.py
recalculate
series
series(name: Source | None = None) -> list[Reading | V]
Retrieve the indicator readings for within the candles as a list.
This method collects the readings of a specified indicator for all candles and returns them as a list. If no name is provided, the generated name of the indicator is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The name of the indicator to retrieve.
Defaults to |
None
|
Returns:
| Type | Description |
|---|---|
list[Reading | V]
|
List[float | dict | None]: A list containing the indicator values for
each candle. The values may be floats,
dictionaries (for complex indicators),
or |