turtle_quant_1.strategies.helpers.candle_units¶
turtle_quant_1.strategies.helpers.candle_units
¶
Helper functions for working with candle unit conversions.
convert_units
¶
Approximately convert units between different candle units.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
units
|
int
|
The number of units to convert. |
required |
from_unit
|
CandleUnit
|
The unit to convert from. |
required |
to_unit
|
CandleUnit
|
The unit to convert to. |
required |
Returns:
| Type | Description |
|---|---|
int
|
The number of units in the new unit. |