utils
utils
Functions:
Name | Description |
---|---|
candle_bodylong |
real body is long when it's longer than the average of the 10 previous candles' real body |
candle_bodyshort |
real body is short when it's shorter than the average of the 10 previous candles' real bodies |
candle_bodyverylong |
real body is very long when it's longer than 3 times the average of the 10 previous candles' real body |
candle_doji |
real body is like doji's body when it's shorter than 10% the average of the 10 previous candles' high-low range |
candle_equal |
when measuring distance between parts of candles or width of gaps |
candle_far |
when measuring distance between parts of candles or width of gaps |
candle_near |
when measuring distance between parts of candles or width of gaps |
candle_shadow_long |
shadow is long when it's longer than the real body |
candle_shadow_short |
shadow is short when it's shorter than half the average of the 10 previous candles' sum of shadows |
candle_shadow_verylong |
shadow is very long when it's longer than 2 times the real body |
candle_shadow_veryshort |
shadow is very short when it's shorter than 10% the average of the 10 previous candles' high-low range |
high_low_avg |
Computes the average of the high-low range over a specified number of candles, |
highest |
Computes the highest value of the specified |
lowest |
Computes the lowest value of the specified |
realbody_avg |
Computes the average real body of a specified number of candles, including the current candle. |
realbody_gapdown |
Computes if a candle has a real body gap-down compared to a previous candle. |
realbody_gapup |
Computes if a candle has a real body gap-up compared to a previous candle. |
shadow_lower_avg |
Computes the average lower shadow over a specified number of candles, including the current candle. |
shadow_upper_avg |
Computes the average upper shadow over a specified number of candles, including the current candle. |
candle_bodylong
real body is long when it's longer than the average of the 10 previous candles' real body
Source code in hexital/analysis/utils.py
candle_bodyshort
real body is short when it's shorter than the average of the 10 previous candles' real bodies
Source code in hexital/analysis/utils.py
candle_bodyverylong
candle_bodyverylong(
candles: List[Candle], index: Optional[int] = None, length: int = 10
) -> float
real body is very long when it's longer than 3 times the average of the 10 previous candles' real body
Source code in hexital/analysis/utils.py
candle_doji
real body is like doji's body when it's shorter than 10% the average of the 10 previous candles' high-low range
Source code in hexital/analysis/utils.py
candle_equal
when measuring distance between parts of candles or width of gaps equal means "<= 5% of the average of the 5 previous candles' high-low range
Source code in hexital/analysis/utils.py
candle_far
when measuring distance between parts of candles or width of gaps far means ">= 60% of the average of the 5 previous candles' high-low range
Source code in hexital/analysis/utils.py
candle_near
when measuring distance between parts of candles or width of gaps near means "<= 20% of the average of the 5 previous candles' high-low range"
Source code in hexital/analysis/utils.py
candle_shadow_long
shadow is long when it's longer than the real body
candle_shadow_short
candle_shadow_short(
candles: List[Candle], index: Optional[int] = None, length: int = 10
) -> float
shadow is short when it's shorter than half the average of the 10 previous candles' sum of shadows
Source code in hexital/analysis/utils.py
candle_shadow_verylong
shadow is very long when it's longer than 2 times the real body
candle_shadow_veryshort
candle_shadow_veryshort(
candles: List[Candle], index: Optional[int] = None, length: int = 10
) -> float
shadow is very short when it's shorter than 10% the average of the 10 previous candles' high-low range
Source code in hexital/analysis/utils.py
high_low_avg
Computes the average of the high-low range over a specified number of candles, including the current candle. The high-low range is the difference between a candle's high and low prices.
Source code in hexital/analysis/utils.py
highest
highest(
candles: List[Candle],
indicator: str,
length: int,
index: Optional[int] = None,
) -> float | None
Computes the highest value of the specified indicator
over a given range of candles.
The range includes the latest candle by default and considers up to the specified number of candles.
Source code in hexital/analysis/utils.py
lowest
lowest(
candles: List[Candle],
indicator: str,
length: int,
index: Optional[int] = None,
) -> float | None
Computes the lowest value of the specified indicator
over a given range of candles.
The range includes the latest candle by default and considers up to the specified number of candles.
Source code in hexital/analysis/utils.py
realbody_avg
Computes the average real body of a specified number of candles, including the current candle. The real body is calculated as the absolute difference between a candle's open and close prices.
Source code in hexital/analysis/utils.py
realbody_gapdown
Computes if a candle has a real body gap-down compared to a previous candle. A gap-down occurs when the maximum value of the current candle's real body (i.e., the higher of its open or close) is less than the minimum value of the previous candle's real body (i.e., the lower of its open or close).
Source code in hexital/analysis/utils.py
realbody_gapup
Computes if a candle has a real body gap-up compared to a previous candle. A gap-up occurs when the minimum value of the current candle's real body (i.e., the lower of its open or close) is greater than the maximum value of the previous candle's real body (i.e., the higher of its open or close).
Source code in hexital/analysis/utils.py
shadow_lower_avg
Computes the average lower shadow over a specified number of candles, including the current candle. The lower shadow is the difference between a candle's high price and either its open or close price.
Source code in hexital/analysis/utils.py
shadow_upper_avg
Computes the average upper shadow over a specified number of candles, including the current candle. The upper shadow is the difference between a candle's high price and either its open or close price.