Small changes.

This commit is contained in:
mikasoukhov committed 2025-07-16 20:26:09 +03:00
1 parent 0a4cbc2e60
commit c72eadc91c
2 files changed
+24 -3

No files matched your search

@@ -109,4 +109,25 @@ def create_empty_value(indicator, time):
:param time: The time of the value (DateTimeOffset).
:return: The empty indicator value (IIndicatorValue).
"""
return IndicatorHelper.CreateEmptyValue(indicator, time)
return IndicatorHelper.CreateEmptyValue(indicator, time)
def process_float(indicator, value, time, is_final=True):
"""
Process the indicator with a numeric value.
:param indicator: The indicator (IIndicator).
:param value: The numeric value (Decimal).
:param time: The time of the value (DateTimeOffset).
:param is_final: Whether the value is final (default is True).
:return: The new value of the indicator (IIndicatorValue).
"""
decimal_value = Decimal(value)
return IndicatorHelper.Process(indicator, decimal_value, time, is_final)
def process_candle(indicator, candle):
"""
Process the indicator with a candle.
:param indicator: The indicator (IIndicator).
:param candle: The candle (ICandleMessage).
:return: The new value of the indicator (IIndicatorValue).
"""
return IndicatorHelper.Process(indicator, candle)