[docs]defset_moving_average_types(self,moving_average_short:int,moving_average_long:int):"""Sets the moving average types for the Range Action Verification Index. Args: moving_average_short (int): The type of the short moving average (valid values between 0 and 9). moving_average_long (int): The type of the long moving average (valid values between 0 and 9). Raises: ValueError: If either moving average type is not between 0 and 9. """ifnot(0<=moving_average_short<=9)ornot(0<=moving_average_long<=9):raiseValueError('Invalid moving average type. Must be an integer between 0 and 9.')self.instance.send(self.id,'setMovingAverageTypesRangeActionVerification',{'movingAverageShort':moving_average_short,'movingAverageLong':moving_average_long,},)returnself
[docs]defset_period_counts(self,short_period_count:int,long_period_count:int):"""Sets the period counts for the Range Action Verification Index. Args: short_period_count (int): The number of periods for the short-term range action. long_period_count (int): The number of periods for the long-term range action. Raises: ValueError: If either period count is less than or equal to zero. """ifshort_period_count<=0orlong_period_count<=0:raiseValueError('Period count should be an integer larger than zero.')self.instance.send(self.id,'setPeriodCountsRangeActionVerification',{'shortPeriodCount':short_period_count,'longPeriodCount':long_period_count,},)returnself