[docs]defset_line_width(self,width:int|float):"""Sets the width of the stochastic oscillator line. Args: width (int | float): Width of the line. """self.instance.send(self.id,'setLineWidth',{'width':width})returnself
[docs]defset_moving_average_line_color(self,color:str):"""Sets the color of the moving average line. Args: color (str): Color of the moving average line. """self.instance.send(self.id,'setMovingAverageLineColor',{'color':color})returnself
[docs]defset_moving_average_types(self,oscillator_smoothing_average:int,ma_moving_average:int):"""Sets the types of moving averages for smoothing and the MA line. Args: oscillator_smoothing_average (int): The smoothing moving average type. ma_moving_average (int): The moving average type for the MA line. """self.instance.send(self.id,'setMovingAverageTypesStochasticOscillatorSmoothed',{'oscillatorSmoothingAverage':oscillator_smoothing_average,'maMovingAverage':ma_moving_average,},)returnself
[docs]defset_overbought_color(self,color:str):"""Sets the color representing the overbought threshold. Args: color (str): The overbought color. """self.instance.send(self.id,'setOverboughtColor',{'color':color})returnself
[docs]defset_oversold_and_overbought_ranges(self,oversold_range:float,overbought_range:float):"""Sets the oversold and overbought threshold ranges. Args: oversold_range (float): The oversold range value. overbought_range (float): The overbought range value. """self.instance.send(self.id,'setOversoldAndOverboughtRanges',{'oversoldRange':oversold_range,'overboughtRange':overbought_range},)returnself
[docs]defset_oversold_color(self,color:str):"""Sets the color representing the oversold threshold. Args: color (str): The oversold color. """self.instance.send(self.id,'setOversoldColor',{'color':color})returnself
[docs]defset_period_counts(self,oscillator_period_count:int,oscillator_smoothing_periods:int,moving_average_period_count:int,):"""Sets the period counts for different components of the oscillator. Args: oscillator_period_count (int): The number of periods for the oscillator. oscillator_smoothing_periods (int): The number of periods for smoothing the oscillator. moving_average_period_count (int): The number of periods for the moving average. """self.instance.send(self.id,'setPeriodCountsStochasticOscillatorSmoothed',{'oscillatorPeriodCount':oscillator_period_count,'oscillatorSmoothingPeriods':oscillator_smoothing_periods,'movingAveragePeriodCount':moving_average_period_count,},)returnself
[docs]defset_stochastic_line_color(self,color:str):"""Sets the color of the stochastic line. Args: color (str): Color of the stochastic line. """self.instance.send(self.id,'setStochasticLineColor',{'color':color})returnself