lightningchart_trader.indicators package

Submodules

lightningchart_trader.indicators.accumulation_distribution module

class lightningchart_trader.indicators.accumulation_distribution.AccumulationDistribution(trader)[source]

Bases: LineIndicator

lightningchart_trader.indicators.accumulative_swing_index module

class lightningchart_trader.indicators.accumulative_swing_index.AccumulativeSwingIndex(trader)[source]

Bases: LineIndicator

set_limit_move_value(limit_move_value)[source]

Sets the maximum price change in one direction.

Parameters:

limit_move_value (float) – Maximum price change.

lightningchart_trader.indicators.aroon module

class lightningchart_trader.indicators.aroon.Aroon(trader, period_count=25)[source]

Bases: LineIndicator, PeriodIndicator

set_aroon_down_line_color(color)[source]

Sets the color of the Aroon Down line.

Parameters:

color (str) – New line color as string, should be in HEX format e.g. #FFFFFF.

set_aroon_up_line_color(color)[source]

Sets the color of the Aroon Up line.

Parameters:

color (str) – New line color as string, should be in HEX format e.g. #FFFFFF.

lightningchart_trader.indicators.aroon_oscillator module

class lightningchart_trader.indicators.aroon_oscillator.AroonOscillator(trader, period_count=25)[source]

Bases: LineIndicator, PeriodIndicator

lightningchart_trader.indicators.average_directional_index module

class lightningchart_trader.indicators.average_directional_index.AverageDirectionalIndex(trader, period_count=14)[source]

Bases: LineIndicator, PeriodIndicator

set_di_minus_color(color)[source]

Sets the line color of the -DI line.

Parameters:

color (str) – New line color as string, should be in HEX format e.g. #FFFFFF.

set_di_plus_color(color)[source]

Sets the line color of the +DI line.

Parameters:

color (str) – New line color as string, should be in HEX format e.g. #FFFFFF.

show_di_lines(show)[source]

Control whether -DI and +DI lines should be displayed.

Parameters:

show (bool) – Set true to show DI lines.

lightningchart_trader.indicators.average_true_range module

class lightningchart_trader.indicators.average_true_range.AverageTrueRange(trader, period_count=14)[source]

Bases: LineIndicator, PeriodIndicator

lightningchart_trader.indicators.awesome_oscillator module

class lightningchart_trader.indicators.awesome_oscillator.AwesomeOscillator(trader)[source]

Bases: IndicatorBase

set_bar_colors(color_up, color_down)[source]

Sets the colors of the bars.

Parameters:
  • color_up (str) – The color of the bar, when its value is higher than the previous bar.

  • color_down (str) – The color of the bar, when its value is lower than the previous bar.

set_period_counts(short_periods, long_periods)[source]

Sets the number of short-term and long-term time periods used to calculate the indicator.

Parameters:
  • short_periods (int) – Short-term period count.

  • long_periods (int) – Long-term period count.

lightningchart_trader.indicators.balance_of_power module

class lightningchart_trader.indicators.balance_of_power.BalanceOfPower(trader)[source]

Bases: LineIndicator, PeriodIndicator

set_moving_average_type(moving_average_type)[source]

Sets the type of Moving Average used to smooth the indicator.

Parameters:

moving_average_type (int) – Moving Average type (use enumeration values).

lightningchart_trader.indicators.bollinger_band module

class lightningchart_trader.indicators.bollinger_band.BollingerBand(trader, period_count=14)[source]

Bases: LineIndicator, PeriodIndicator, SourceIndicator

set_fill_color(color)[source]

Sets the fill color of the area between the upper and lower Bollinger Bands.

Parameters:

color (str) – A string representing the color to be used for the fill (e.g., ‘#FF0000’ for red).

set_fill_enabled(fill_enabled)[source]

Enables or disables the filling of the Bollinger Band area.

Parameters:

fill_enabled (bool) – If True, fills the area between the upper and lower Bollinger Bands.

set_standard_deviation_number(number)[source]

Sets the number of standard deviations used to calculate the upper and lower bands.

Parameters:

number (int) – The number of standard deviations to apply for the Bollinger Bands.

lightningchart_trader.indicators.center_of_gravity module

class lightningchart_trader.indicators.center_of_gravity.CenterOfGravity(trader)[source]

Bases: LineIndicator, PeriodIndicator, SourceIndicator

set_show_signal(show_signal)[source]

Toggles the visibility of the signal line on the Center of Gravity indicator.

Parameters:

show_signal (bool) – If True, the signal line will be displayed; otherwise, it will be hidden.

set_signal_color(color)[source]

Sets the color of the signal line in the Center of Gravity indicator.

Parameters:

color (str) – A string representing the color for the signal line (e.g., ‘#00FF00’ for green).

set_signal_period_count(count)[source]

Defines the number of periods used for calculating the signal line.

Parameters:

count (int) – The number of periods for the signal calculation.

lightningchart_trader.indicators.chaikin_money_flow module

class lightningchart_trader.indicators.chaikin_money_flow.ChaikinMoneyFlow(trader, period_count=21)[source]

Bases: LineIndicator, PeriodIndicator

lightningchart_trader.indicators.chaikin_oscillator module

class lightningchart_trader.indicators.chaikin_oscillator.ChaikinOscillator(trader, fast_period_count=3, slow_period_count=10)[source]

Bases: LineIndicator

set_period_counts(fast_period_count, slow_period_count)[source]

Sets the period counts for the fast and slow moving averages used in the Chaikin Oscillator.

Parameters:
  • fast_period_count (int) – The number of periods for the fast moving average.

  • slow_period_count (int) – The number of periods for the slow moving average.

lightningchart_trader.indicators.chaikin_volatility module

class lightningchart_trader.indicators.chaikin_volatility.ChaikinVolatility(trader)[source]

Bases: LineIndicator

set_moving_average_type(moving_average_type)[source]

Sets the type of moving average used in the Chaikin Volatility indicator.

Parameters:

moving_average_type (int) – The type of moving average to be used (e.g., Simple, Exponential, etc.).

set_period_counts(period_count, period_count_ma)[source]

Sets the period counts for the Chaikin Volatility indicator and its moving average.

Parameters:
  • period_count (int) – The number of periods for the volatility calculation.

  • period_count_ma (int) – The number of periods for the moving average calculation.

Raises:

ValueError – If either period_count or period_count_ma is not greater than zero.

lightningchart_trader.indicators.chande_forecast_oscillator module

class lightningchart_trader.indicators.chande_forecast_oscillator.ChandeForecastOscillator(trader, period_count=14)[source]

Bases: LineIndicator, PeriodIndicator, SourceIndicator

lightningchart_trader.indicators.chande_momentum_oscillator module

class lightningchart_trader.indicators.chande_momentum_oscillator.ChandeMomentumOscillator(trader, period_count=9)[source]

Bases: LineIndicator, PeriodIndicator, SourceIndicator

lightningchart_trader.indicators.commodity_channel_index module

class lightningchart_trader.indicators.commodity_channel_index.CommodityChannelIndex(trader, period_count=20)[source]

Bases: LineIndicator, PeriodIndicator

set_fill_color(color)[source]

Sets the fill color for the Commodity Channel Index (CCI) visualization.

Parameters:

color (str) – The fill color in hexadecimal or RGB format.

set_overbought_and_sold_levels(overbought_level, oversold_level)[source]

Sets the overbought and oversold levels for the Commodity Channel Index (CCI) indicator.

Parameters:
  • overbought_level (int | float) – The overbought threshold level.

  • oversold_level (int | float) – The oversold threshold level.

lightningchart_trader.indicators.coppock_curve module

class lightningchart_trader.indicators.coppock_curve.CoppockCurve(trader)[source]

Bases: LineIndicator, SourceIndicator

set_period_counts(period_count_long_roc, period_count_short_roc, period_count_wma)[source]

Sets the period counts for the Coppock Curve indicator.

Parameters:
  • period_count_long_roc (int) – The period count for the long rate of change (ROC).

  • period_count_short_roc (int) – The period count for the short rate of change (ROC).

  • period_count_wma (int) – The period count for the weighted moving average (WMA).

lightningchart_trader.indicators.correlation_coefficient module

class lightningchart_trader.indicators.correlation_coefficient.CorrelationCoefficient(trader)[source]

Bases: LineIndicator, PeriodIndicator, SourceIndicator

set_dataset(dataset)[source]

Sets the dataset to be used for the correlation coefficient calculation.

Parameters:

dataset (Any) – The dataset on which the correlation coefficient will be computed.

set_symbol(symbol)[source]

Sets the symbol to be used in the correlation coefficient calculation.

Parameters:

symbol (str) – The symbol representing the financial instrument.

lightningchart_trader.indicators.custom_overlay module

class lightningchart_trader.indicators.custom_overlay.CustomOverlay(trader, line_color='#00FF00', line_width=2)[source]

Bases: LineIndicator

add_data(data_values)[source]

Adds additional data to the custom overlay.

Parameters:

data_values (list) – A list of data values to be added to the custom overlay.

set_data(data_values)[source]

Sets the data for the custom overlay.

Parameters:

data_values (list) – A list of data values to be used for the custom overlay.

lightningchart_trader.indicators.custom_study module

class lightningchart_trader.indicators.custom_study.CustomStudy(trader, line_color='#00FF00', line_width=2, row_index=0)[source]

Bases: LineIndicator

add_data(data_values)[source]

Adds additional data to the custom study.

Parameters:

data_values (list) – A list of data values to be added to the custom study.

set_data(data_values)[source]

Sets the data for the custom study.

Parameters:

data_values (list) – A list of data values to be used for the custom study.

lightningchart_trader.indicators.detrended_price_oscillator module

class lightningchart_trader.indicators.detrended_price_oscillator.DetrendedPriceOscillator(trader)[source]

Bases: LineIndicator, PeriodIndicator, SourceIndicator

set_moving_average_type(moving_average_type)[source]

Sets the type of moving average to be used for the Detrended Price Oscillator.

Parameters:

moving_average_type (int) – The type of moving average (e.g., 0 for simple moving average, 1 for exponential moving average).

lightningchart_trader.indicators.donchian_channels module

class lightningchart_trader.indicators.donchian_channels.DonchianChannels(trader, period_count=20)[source]

Bases: PeriodIndicator

set_fill_color(color)[source]

Sets the fill color for the Donchian Channels.

Parameters:

color (str) – The color to use for filling the channel area.

set_fill_enabled(fill_enabled)[source]

Enables or disables the fill inside the Donchian Channels.

Parameters:

fill_enabled (bool) – If True, the area between the lines will be filled with color.

set_line_width(width)[source]

Sets the width of the Donchian Channels’ lines.

Parameters:

width (int | float) – The width of the lines (can be an integer or float value).

set_lower_line_color(color)[source]

Sets the color of the lower line in the Donchian Channels.

Parameters:

color (str) – The color to use for the lower line.

set_mid_line_color(color)[source]

Sets the color of the middle line in the Donchian Channels.

Parameters:

color (str) – The color to use for the middle line.

set_upper_line_color(color)[source]

Sets the color of the upper line in the Donchian Channels.

Parameters:

color (str) – The color to use for the upper line.

lightningchart_trader.indicators.ease_of_movement module

class lightningchart_trader.indicators.ease_of_movement.EaseOfMovement(trader)[source]

Bases: LineIndicator, PeriodIndicator

set_moving_average_type(moving_average_type)[source]

Sets the moving average type for the Ease of Movement indicator.

Parameters:

moving_average_type (int) – The type of moving average to be applied (e.g., 0 for Simple Moving Average, 1 for Exponential Moving Average).

set_scale(scale)[source]

Sets the scale for the Ease of Movement indicator.

Parameters:

scale (int | float) – The scale factor to adjust the indicator’s sensitivity. It can be an integer or float value.

lightningchart_trader.indicators.ehler_fisher_transform module

class lightningchart_trader.indicators.ehler_fisher_transform.EhlerFisherTransform(trader)[source]

Bases: LineIndicator, PeriodIndicator

set_signal_color(color)[source]

Sets the color for the signal line in the Ehler Fisher Transform indicator.

Parameters:

color (str) – The color for the signal line (e.g., ‘#FF0000’ for red).

set_signal_period_count(count)[source]

Sets the number of periods used for calculating the signal line.

Parameters:

count (int) – The number of periods to use for the signal calculation.

set_smoothing_period_counts(raw_smoothing_periods, fisher_smoothing_periods)[source]

Sets the smoothing period counts for the Ehler Fisher Transform.

Parameters:
  • raw_smoothing_periods (int) – The number of periods used for raw data smoothing.

  • fisher_smoothing_periods (int) – The number of periods used for Fisher Transform smoothing.

lightningchart_trader.indicators.elder_ray_index module

class lightningchart_trader.indicators.elder_ray_index.ElderRayIndex(trader, period_count=13)[source]

Bases: PeriodIndicator, SourceIndicator

set_bear_power_color(color)[source]

Sets the color for the Bear Power line in the Elder Ray Index.

Parameters:

color (str) – The color for the Bear Power line (e.g., ‘#FF0000’ for red).

set_bull_power_color(color)[source]

Sets the color for the Bull Power line in the Elder Ray Index.

Parameters:

color (str) – The color for the Bull Power line (e.g., ‘#00FF00’ for green).

set_line_width(width)[source]

Sets the line width for the Elder Ray Index.

Parameters:

width (int | float) – The width of the lines (e.g., 2 for a thicker line).

set_moving_average_type(moving_average_type)[source]

Sets the moving average type used for calculating the Elder Ray Index.

Parameters:

moving_average_type (int) – The type of moving average (e.g., 0 for Simple Moving Average, 1 for Exponential).

lightningchart_trader.indicators.elder_thermometer_custom module

class lightningchart_trader.indicators.elder_thermometer_custom.ElderThermometerCustom(trader)[source]

Bases: PeriodIndicator

set_bar_colors(bull_color, bear_color)[source]

Sets the colors for the Bull and Bear bars in the Elder Thermometer.

Parameters:
  • bull_color (str) – The color for the Bull bars (e.g., ‘#00FF00’ for green).

  • bear_color (str) – The color for the Bear bars (e.g., ‘#FF0000’ for red).

lightningchart_trader.indicators.elders_force_index module

class lightningchart_trader.indicators.elders_force_index.EldersForceIndex(trader, period_count=13)[source]

Bases: LineIndicator, PeriodIndicator, SourceIndicator

lightningchart_trader.indicators.exponential_moving_average module

class lightningchart_trader.indicators.exponential_moving_average.ExponentialMovingAverage(trader, period_count=14)[source]

Bases: LineIndicator, PeriodIndicator, SourceIndicator

lightningchart_trader.indicators.fractal_chaos_bands module

class lightningchart_trader.indicators.fractal_chaos_bands.FractalChaosBands(trader)[source]

Bases: PeriodIndicator

set_fill_color(color)[source]

Sets the fill color for the Fractal Chaos Bands.

Parameters:

color (str) – The fill color (e.g., ‘#FF0000’ for red).

set_fill_enabled(fill_enabled)[source]

Enables or disables the fill for the Fractal Chaos Bands.

Parameters:

fill_enabled (bool) – Whether the fill is enabled (True or False).

set_line_width(width)[source]

Sets the width of the lines for the Fractal Chaos Bands.

Parameters:

width (int | float) – The width of the lines (e.g., 1.5 for 1.5px width).

set_lower_line_color(color)[source]

Sets the color of the lower line in the Fractal Chaos Bands.

Parameters:

color (str) – The color of the lower line (e.g., ‘#00FF00’ for green).

set_upper_line_color(color)[source]

Sets the color of the upper line in the Fractal Chaos Bands.

Parameters:

color (str) – The color of the upper line (e.g., ‘#0000FF’ for blue).

lightningchart_trader.indicators.fractal_chaos_oscillator module

class lightningchart_trader.indicators.fractal_chaos_oscillator.FractalChaosOscillator(trader)[source]

Bases: LineIndicator, PeriodIndicator

lightningchart_trader.indicators.gopalakrishnan_range_index module

class lightningchart_trader.indicators.gopalakrishnan_range_index.GopalakrishnanRangeIndex(trader, period_count=14)[source]

Bases: LineIndicator, PeriodIndicator

lightningchart_trader.indicators.high_low_bands module

class lightningchart_trader.indicators.high_low_bands.HighLowBands(trader)[source]

Bases: LineIndicator, PeriodIndicator, SourceIndicator

set_fill_color(color)[source]

Sets the fill color for the HighLowBands.

Parameters:

color (str) – The fill color (e.g., ‘#FF0000’ for red).

set_fill_enabled(fill_enabled)[source]

Enables or disables the fill for the HighLowBands.

Parameters:

fill_enabled (bool) – Whether the fill is enabled (True or False).

set_percentage(percentage)[source]

Sets the percentage for the HighLowBands.

Parameters:

percentage (int | float) – The percentage used in the HighLowBands calculation (e.g., 10 for 10%).

lightningchart_trader.indicators.high_minus_low module

class lightningchart_trader.indicators.high_minus_low.HighMinusLow(trader)[source]

Bases: LineIndicator

lightningchart_trader.indicators.historical_volatility_index module

class lightningchart_trader.indicators.historical_volatility_index.HistoricalVolatilityIndex(trader)[source]

Bases: LineIndicator, PeriodIndicator, SourceIndicator

set_periods_per_year(count)[source]

Sets the number of periods per year for the Historical Volatility Index calculation.

Parameters:

count (int) – The number of periods per year (e.g., 252 for trading days in a year).

set_standard_deviations(deviations)[source]

Sets the number of standard deviations for the Historical Volatility Index.

Parameters:

deviations (int | float) – The number of standard deviations.

set_use_moving_average(use_moving_average)[source]

Enables or disables the use of a moving average for the Historical Volatility Index.

Parameters:

use_moving_average (bool) – True to use a moving average, False otherwise.

lightningchart_trader.indicators.ichimoku_cloud module

class lightningchart_trader.indicators.ichimoku_cloud.IchimokuCloud(trader)[source]

Bases: IndicatorBase

set_chikou_span_color(color)[source]

Sets the color for the Chikou Span line in the Ichimoku Cloud.

Parameters:

color (str) – The color for the Chikou Span line (e.g., ‘#FF0000’ for red).

set_kijun_sen_color(color)[source]

Sets the color for the Kijun Sen line in the Ichimoku Cloud.

Parameters:

color (str) – The color for the Kijun Sen line.

set_line_width(width)[source]

Sets the width for the Ichimoku Cloud lines.

Parameters:

width (int | float) – The line width for the Ichimoku Cloud.

set_period_counts(tenkan_sen_period, kijun_sen_period, senkou_span_b_period, chikou_span_period)[source]

Sets the period counts for the various lines in the Ichimoku Cloud.

Parameters:
  • tenkan_sen_period (int) – The period count for the Tenkan Sen line.

  • kijun_sen_period (int) – The period count for the Kijun Sen line.

  • senkou_span_b_period (int) – The period count for the Senkou Span B line.

  • chikou_span_period (int) – The period count for the Chikou Span line.

set_senkou_span_a_color(color)[source]

Sets the color for the Senkou Span A line in the Ichimoku Cloud.

Parameters:

color (str) – The color for the Senkou Span A line.

set_senkou_span_b_color(color)[source]

Sets the color for the Senkou Span B line in the Ichimoku Cloud.

Parameters:

color (str) – The color for the Senkou Span B line.

set_tenkan_sen_color(color)[source]

Sets the color for the Tenkan Sen line in the Ichimoku Cloud.

Parameters:

color (str) – The color for the Tenkan Sen line.

lightningchart_trader.indicators.intraday_momentum_index module

class lightningchart_trader.indicators.intraday_momentum_index.IntradayMomentumIndex(trader)[source]

Bases: LineIndicator, PeriodIndicator

set_high_color(color)[source]

Sets the color for the high threshold line of the Intraday Momentum Index.

Parameters:

color (str) – The color for the high threshold line (e.g., ‘#FF0000’ for red).

set_low_color(color)[source]

Sets the color for the low threshold line of the Intraday Momentum Index.

Parameters:

color (str) – The color for the low threshold line.

set_thresholds(low_threshold, high_threshold)[source]

Sets the thresholds for the Intraday Momentum Index.

Parameters:
  • low_threshold (int | float) – The value for the low threshold.

  • high_threshold (int | float) – The value for the high threshold.

lightningchart_trader.indicators.keltner_channels module

class lightningchart_trader.indicators.keltner_channels.KeltnerChannels(trader)[source]

Bases: LineIndicator

set_fill_color(color)[source]

Sets the fill color of the Keltner Channels.

Parameters:

color (str) – The color to set for the filled area of the Keltner Channels (e.g., ‘#FF0000’ for red).

set_fill_enabled(fill_enabled)[source]

Enables or disables the fill color for the Keltner Channels.

Parameters:

fill_enabled (bool) – If True, the Keltner Channels will be filled with color.

set_multiplier(multiplier)[source]

Sets the multiplier for the Keltner Channels.

Parameters:

multiplier (int | float) – The multiplier used to calculate the channel width.

set_period_counts(period_count_ema, period_count_atr)[source]

Sets the period counts for EMA and ATR in the Keltner Channels.

Parameters:
  • period_count_ema (int) – The period count for the Exponential Moving Average (EMA).

  • period_count_atr (int) – The period count for the Average True Range (ATR).

lightningchart_trader.indicators.klinger_volume_oscillator module

class lightningchart_trader.indicators.klinger_volume_oscillator.KlingerVolumeOscillator(trader)[source]

Bases: IndicatorBase

set_histogram_color(color)[source]

Sets the histogram color for the Klinger Volume Oscillator.

Parameters:

color (str) – The color to set for the histogram (e.g., ‘#00FF00’ for green).

set_line_width(width)[source]

Sets the line width for the Klinger Volume Oscillator.

Parameters:

width (int | float) – The width of the oscillator lines.

set_moving_average_signal(moving_average_type)[source]

Sets the moving average signal type for the Klinger Volume Oscillator.

Parameters:

moving_average_type (int) – The type of moving average used for the signal line.

set_moving_average_type(moving_average_type)[source]

Sets the moving average type for the Klinger Volume Oscillator.

Parameters:

moving_average_type (int) – The type of moving average used in the calculation of the oscillator.

set_period_counts(short_period_count, long_period_count, signal_period_count)[source]

Sets the period counts for the Klinger Volume Oscillator.

Parameters:
  • short_period_count (int) – The number of periods for the short moving average.

  • long_period_count (int) – The number of periods for the long moving average.

  • signal_period_count (int) – The number of periods for the signal line moving average.

set_signal_line_color(color)[source]

Sets the color of the signal line for the Klinger Volume Oscillator.

Parameters:

color (str) – The color to set for the signal line (e.g., ‘#FF0000’ for red).

set_vo_line_color(color)[source]

Sets the color of the volume oscillator line.

Parameters:

color (str) – The color to set for the volume oscillator line (e.g., ‘#0000FF’ for blue).

lightningchart_trader.indicators.kurtosis module

class lightningchart_trader.indicators.kurtosis.Kurtosis(trader)[source]

Bases: LineIndicator, PeriodIndicator, SourceIndicator

set_moving_average_type(moving_average_type)[source]

Sets the moving average type for the Kurtosis indicator.

Parameters:

moving_average_type (int) – The type of moving average used in the Kurtosis calculation.

set_show_as_excess(show_as_excess)[source]

Determines whether the Kurtosis indicator should be shown as excess kurtosis.

Parameters:

show_as_excess (bool) – Set to True to display excess kurtosis, or False to display regular kurtosis.

lightningchart_trader.indicators.linear_regression module

class lightningchart_trader.indicators.linear_regression.LinearRegression(trader)[source]

Bases: LineIndicator, PeriodIndicator, SourceIndicator

lightningchart_trader.indicators.market_facilitation_index module

class lightningchart_trader.indicators.market_facilitation_index.MarketFacilitationIndex(trader)[source]

Bases: IndicatorBase

lightningchart_trader.indicators.mass_index module

class lightningchart_trader.indicators.mass_index.MassIndex(trader, period_count=25)[source]

Bases: LineIndicator, PeriodIndicator

lightningchart_trader.indicators.median_price module

class lightningchart_trader.indicators.median_price.MedianPrice(trader)[source]

Bases: LineIndicator

lightningchart_trader.indicators.momentum_oscillator module

class lightningchart_trader.indicators.momentum_oscillator.MomentumOscillator(trader, period_count=10)[source]

Bases: LineIndicator, PeriodIndicator, SourceIndicator

lightningchart_trader.indicators.money_flow_index module

class lightningchart_trader.indicators.money_flow_index.MoneyFlowIndex(trader, period_count=14)[source]

Bases: LineIndicator, PeriodIndicator

set_overbought_color(color)[source]

Sets the color for the overbought line in the Money Flow Index indicator.

Parameters:

color (str) – The color to set for the overbought line.

set_oversold_and_overbought_ranges(oversold, overbought)[source]

Sets the oversold and overbought ranges for the Money Flow Index indicator.

Parameters:
  • oversold (int) – The value to define the oversold threshold.

  • overbought (int) – The value to define the overbought threshold.

set_oversold_color(color)[source]

Sets the color for the oversold line in the Money Flow Index indicator.

Parameters:

color (str) – The color to set for the oversold line.

lightningchart_trader.indicators.moving_average_convergence_divergence module

class lightningchart_trader.indicators.moving_average_convergence_divergence.MovingAverageConvergenceDivergence(trader)[source]

Bases: SourceIndicator

set_histogram_colors(positive_strong_color, positive_weak_color, negative_strong_color, negative_weak_color)[source]

Sets the colors for the MACD histogram bars.

Parameters:
  • positive_strong_color (str) – Color for the strong positive values in the histogram.

  • positive_weak_color (str) – Color for the weak positive values in the histogram.

  • negative_strong_color (str) – Color for the strong negative values in the histogram.

  • negative_weak_color (str) – Color for the weak negative values in the histogram.

set_line_width(width)[source]

Sets the width of the MACD line.

Parameters:

width (int | float) – Width of the MACD line.

set_macd_line_color(color)[source]

Sets the color of the MACD line.

Parameters:

color (str) – Color to be set for the MACD line.

set_period_counts(long_period_count, short_period_count, signal_period_count)[source]

Sets the period counts for the MACD indicator.

Parameters:
  • long_period_count (int) – Number of periods for the long-term moving average.

  • short_period_count (int) – Number of periods for the short-term moving average.

  • signal_period_count (int) – Number of periods for the signal moving average.

set_signal_line_color(color)[source]

Sets the color of the signal line.

Parameters:

color (str) – Color to be set for the signal line.

lightningchart_trader.indicators.moving_average_convergence_divergence_custom module

class lightningchart_trader.indicators.moving_average_convergence_divergence_custom.MovingAverageConvergenceDivergenceCustom(trader)[source]

Bases: SourceIndicator

set_histogram_colors(positive_strong_color, positive_weak_color, negative_strong_color, negative_weak_color)[source]

Sets the colors for the histogram bars in the custom MACD indicator.

Parameters:
  • positive_strong_color (str) – The color for strong positive values.

  • positive_weak_color (str) – The color for weak positive values.

  • negative_strong_color (str) – The color for strong negative values.

  • negative_weak_color (str) – The color for weak negative values.

set_line_width(width)[source]

Sets the width of the lines in the MACD custom indicator.

Parameters:

width (int | float) – The width to set for the line.

set_macd_line_color(color)[source]

Sets the color of the MACD line in the custom MACD indicator.

Parameters:

color (str) – The color to set for the MACD line.

set_moving_average_types(short_moving_average, long_moving_average, signal_moving_average)[source]

Sets the types of moving averages for the MACD custom indicator.

Parameters:
  • short_moving_average (int) – The type of short-term moving average.

  • long_moving_average (int) – The type of long-term moving average.

  • signal_moving_average (int) – The type of signal moving average.

set_period_counts(long_period_count, short_period_count, signal_period_count)[source]

Sets the period counts for the long-term, short-term, and signal moving averages in the MACD custom indicator.

Parameters:
  • long_period_count (int) – The period count for the long-term moving average.

  • short_period_count (int) – The period count for the short-term moving average.

  • signal_period_count (int) – The period count for the signal moving average.

set_signal_line_color(color)[source]

Sets the color of the signal line in the custom MACD indicator.

Parameters:

color (str) – The color to set for the signal line.

lightningchart_trader.indicators.moving_average_envelopes module

class lightningchart_trader.indicators.moving_average_envelopes.MovingAverageEnvelopes(trader, period_count)[source]

Bases: LineIndicator, PeriodIndicator, SourceIndicator

set_fill_color(color)[source]

Sets the fill color for the area between the moving average envelopes.

Parameters:

color (str) – The color to fill the area between the envelopes (e.g., ‘#FF0000’ for red).

set_fill_enabled(fill_enabled)[source]

Enables or disables the filling of the area between the moving average envelopes.

Parameters:

fill_enabled (bool) – If True, fills the area between the envelopes; if False, no fill is applied.

set_moving_average_type(moving_average_type)[source]

Sets the type of moving average used to calculate the envelopes.

Parameters:

moving_average_type (int) – The type of moving average to use (e.g., 0 for Simple Moving Average, 1 for Exponential Moving Average).

set_percentage(percentage)[source]

Sets the percentage distance from the moving average to create the upper and lower envelopes.

Parameters:

percentage (int | float) – The percentage value used to calculate the envelopes (e.g., 2.5 for 2.5%).

lightningchart_trader.indicators.negative_volume_index module

class lightningchart_trader.indicators.negative_volume_index.NegativeVolumeIndex(trader)[source]

Bases: LineIndicator, SourceIndicator

lightningchart_trader.indicators.on_balance_volume module

class lightningchart_trader.indicators.on_balance_volume.OnBalanceVolume(trader)[source]

Bases: LineIndicator, SourceIndicator

lightningchart_trader.indicators.open_interest module

class lightningchart_trader.indicators.open_interest.OpenInterest(trader)[source]

Bases: LineIndicator

lightningchart_trader.indicators.parabolic_sar module

class lightningchart_trader.indicators.parabolic_sar.ParabolicSAR(trader)[source]

Bases: IndicatorBase

set_acceleration_factor(factor)[source]

Sets the acceleration factor used in the Parabolic SAR calculation.

Parameters:

factor (float) – The acceleration factor value (e.g., 0.02). This controls how quickly the indicator reacts to price changes.

set_maximum_acceleration_factor(maximum)[source]

Sets the maximum acceleration factor for the Parabolic SAR.

Parameters:

maximum (float) – The maximum acceleration factor (e.g., 0.2). This limits the sensitivity of the indicator as it moves closer to the price.

set_point_color(color)[source]

Sets the color of the points plotted by the Parabolic SAR.

Parameters:

color (str) – The color of the points (e.g., ‘#FF0000’ for red).

set_point_size(size)[source]

Sets the size of the points in the Parabolic SAR chart.

Parameters:

size (int | float) – The size of the points (e.g., 2.5).

lightningchart_trader.indicators.percentage_price_oscillator module

class lightningchart_trader.indicators.percentage_price_oscillator.PercentagePriceOscillator(trader)[source]

Bases: SourceIndicator

set_histogram_color(color)[source]

Sets the color of the histogram bars in the Percentage Price Oscillator (PPO) chart.

Parameters:

color (str) – The color to set for the histogram bars (e.g., ‘#FF0000’ for red).

set_line_width(width)[source]

Sets the width of the PPO line.

Parameters:

width (int | float) – The width of the PPO line (e.g., 2.5).

set_period_counts(long_period, short_period, signal_period)[source]

Sets the period counts for the long, short, and signal lines of the PPO.

Parameters:
  • long_period (int) – The period for the long line.

  • short_period (int) – The period for the short line.

  • signal_period (int) – The period for the signal line.

set_ppo_line_color(color)[source]

Sets the color of the Percentage Price Oscillator line.

Parameters:

color (str) – The color to set for the PPO line (e.g., ‘#00FF00’ for green).

set_signal_line_color(color)[source]

Sets the color of the signal line in the PPO chart.

Parameters:

color (str) – The color to set for the signal line (e.g., ‘#0000FF’ for blue).

lightningchart_trader.indicators.performance_index module

class lightningchart_trader.indicators.performance_index.PerformanceIndex(trader)[source]

Bases: LineIndicator, SourceIndicator

lightningchart_trader.indicators.positive_volume_index module

class lightningchart_trader.indicators.positive_volume_index.PositiveVolumeIndex(trader)[source]

Bases: LineIndicator, SourceIndicator

lightningchart_trader.indicators.pretty_good_oscillator module

class lightningchart_trader.indicators.pretty_good_oscillator.PrettyGoodOscillator(trader)[source]

Bases: LineIndicator, SourceIndicator

set_moving_average_types(moving_average_ma, moving_average_atr)[source]

Sets the types of moving averages for the Pretty Good Oscillator.

Parameters:
  • moving_average_ma (int) – The type of the Moving Average (MA).

  • moving_average_atr (int) – The type of the Average True Range (ATR).

Raises:

ValueError – Raised if the moving average type is not between 0 and 9.

set_period_counts(period_count_ma, period_count_atr)[source]

Sets the period counts for the MA and ATR in the Pretty Good Oscillator.

Parameters:
  • period_count_ma (int) – The period count for the Moving Average (MA).

  • period_count_atr (int) – The period count for the Average True Range (ATR).

Raises:

ValueError – Raised if the period count is not greater than zero.

lightningchart_trader.indicators.price_volume_trend module

class lightningchart_trader.indicators.price_volume_trend.PriceVolumeTrend(trader)[source]

Bases: LineIndicator, SourceIndicator

lightningchart_trader.indicators.prime_number_bands module

class lightningchart_trader.indicators.prime_number_bands.PrimeNumberBands(trader)[source]

Bases: LineIndicator, SourceIndicator

set_fill_color(color)[source]

Sets the fill color for the Prime Number Bands.

Parameters:

color (str) – The color to set for the fill, in hex or standard color string format.

set_fill_enabled(fill_enabled)[source]

Enables or disables the fill for the Prime Number Bands.

Parameters:

fill_enabled (bool) – A boolean to enable (True) or disable (False) the fill for the bands.

lightningchart_trader.indicators.prime_number_oscillator module

class lightningchart_trader.indicators.prime_number_oscillator.PrimeNumberOscillator(trader)[source]

Bases: LineIndicator, SourceIndicator

lightningchart_trader.indicators.qstick module

class lightningchart_trader.indicators.qstick.QStick(trader, period_count)[source]

Bases: LineIndicator, PeriodIndicator

set_moving_average_type(moving_average_type)[source]

Sets the moving average type for the QStick indicator.

Parameters:

moving_average_type (int) – The type of moving average to be applied (e.g., 0 for simple, 1 for exponential).

lightningchart_trader.indicators.rainbow_oscillator module

class lightningchart_trader.indicators.rainbow_oscillator.RainbowOscillator(trader)[source]

Bases: PeriodIndicator, SourceIndicator

set_fill_enabled(fill_enabled)[source]

Enables or disables fill for the Rainbow Oscillator.

Parameters:

fill_enabled (bool) – Whether to enable or disable the fill.

set_line_width(width)[source]

Sets the line width for the Rainbow Oscillator.

Parameters:

width (int | float) – The width of the line.

set_lookback_periods(lookback_periods)[source]

Sets the number of lookback periods for the Rainbow Oscillator.

Parameters:

lookback_periods (int) – The number of periods to look back.

set_moving_average_type(moving_average_type)[source]

Sets the moving average type for the Rainbow Oscillator.

Parameters:

moving_average_type (int) – The type of moving average to apply.

set_oscillator_colors(color_up, color_down)[source]

Sets the colors for the oscillator.

Parameters:
  • color_up (str) – The color to use when the oscillator is moving up.

  • color_down (str) – The color to use when the oscillator is moving down.

set_smoothing_levels(smoothing_levels)[source]

Sets the number of smoothing levels for the Rainbow Oscillator.

Parameters:

smoothing_levels (int) – The number of smoothing levels.

lightningchart_trader.indicators.random_walk_index module

class lightningchart_trader.indicators.random_walk_index.RandomWalkIndex(trader)[source]

Bases: PeriodIndicator

set_line_width(width)[source]

Sets the line width for the Random Walk Index.

Parameters:

width (int | float) – The width of the line to be displayed.

set_rwi_high_color(color)[source]

Sets the color for the high line of the Random Walk Index.

Parameters:

color (str) – The color of the high line.

set_rwi_low_color(color)[source]

Sets the color for the low line of the Random Walk Index.

Parameters:

color (str) – The color of the low line.

lightningchart_trader.indicators.range_action_verification_index module

class lightningchart_trader.indicators.range_action_verification_index.RangeActionVerificationIndex(trader)[source]

Bases: LineIndicator, SourceIndicator

set_moving_average_types(moving_average_short, moving_average_long)[source]

Sets the moving average types for the Range Action Verification Index.

Parameters:
  • 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.

set_period_counts(short_period_count, long_period_count)[source]

Sets the period counts for the Range Action Verification Index.

Parameters:
  • 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.

lightningchart_trader.indicators.rate_of_change module

class lightningchart_trader.indicators.rate_of_change.RateOfChange(trader, period_count=9)[source]

Bases: LineIndicator, PeriodIndicator, SourceIndicator

lightningchart_trader.indicators.relative_strength_index module

class lightningchart_trader.indicators.relative_strength_index.RelativeStrengthIndex(trader, period_count=14)[source]

Bases: LineIndicator, PeriodIndicator, SourceIndicator

set_high_color(color)[source]

Sets the color for the overbought (high) threshold line.

Parameters:

color (str) – The color for the high threshold line (overbought).

set_low_color(color)[source]

Sets the color for the oversold (low) threshold line.

Parameters:

color (str) – The color for the low threshold line (oversold).

set_thresholds(low_threshold, high_threshold)[source]

Sets the low and high threshold levels for the RSI indicator.

Parameters:
  • low_threshold (int | float) – The value for the oversold threshold.

  • high_threshold (int | float) – The value for the overbought threshold.

lightningchart_trader.indicators.schaff_trend_cycle module

class lightningchart_trader.indicators.schaff_trend_cycle.SchaffTrendCycle(trader)[source]

Bases: LineIndicator, SourceIndicator

set_first_stochastic_moving_averages(k_moving_average, d_moving_average)[source]

Sets the moving average types for the first stochastic oscillator in the Schaff Trend Cycle.

Parameters:
  • k_moving_average (int) – The moving average type for %K.

  • d_moving_average (int) – The moving average type for %D.

set_first_stochastic_period_counts(stochastic_periods, smoothing_periods, moving_average_periods)[source]

Sets the period counts for the first stochastic oscillator.

Parameters:
  • stochastic_periods (int) – The number of periods for the stochastic calculation.

  • smoothing_periods (int) – The number of periods for smoothing the stochastic values.

  • moving_average_periods (int) – The number of periods for calculating the moving average.

set_macd_moving_averages(short_moving_average, long_moving_average)[source]

Sets the moving average types for the MACD calculation.

Parameters:
  • short_moving_average (int) – The short-period moving average type.

  • long_moving_average (int) – The long-period moving average type.

set_macd_period_counts(short_period_count, long_period_count)[source]

Sets the period counts for the MACD calculation.

Parameters:
  • short_period_count (int) – The number of periods for the short moving average.

  • long_period_count (int) – The number of periods for the long moving average.

set_second_stochastic_moving_averages(k_moving_average, d_moving_average)[source]

Sets the moving average types for the second stochastic oscillator.

Parameters:
  • k_moving_average (int) – The moving average type for %K.

  • d_moving_average (int) – The moving average type for %D.

set_second_stochastic_period_counts(stochastic_periods, smoothing_periods, moving_average_periods)[source]

Sets the period counts for the second stochastic oscillator.

Parameters:
  • stochastic_periods (int) – The number of periods for the stochastic calculation.

  • smoothing_periods (int) – The number of periods for smoothing the stochastic values.

  • moving_average_periods (int) – The number of periods for calculating the moving average.

lightningchart_trader.indicators.schaff_trend_cycle_signal module

class lightningchart_trader.indicators.schaff_trend_cycle_signal.SchaffTrendCycleSignal(trader)[source]

Bases: LineIndicator, SourceIndicator

set_first_stochastic_moving_averages(k_moving_average, d_moving_average)[source]

Sets the moving average types for the first stochastic oscillator in the Schaff Trend Cycle.

Parameters:
  • k_moving_average (int) – The moving average type for %K.

  • d_moving_average (int) – The moving average type for %D.

set_first_stochastic_period_counts(stochastic_periods, smoothing_periods, moving_average_periods)[source]

Sets the period counts for the first stochastic oscillator.

Parameters:
  • stochastic_periods (int) – The number of periods for the stochastic calculation.

  • smoothing_periods (int) – The number of periods for smoothing the stochastic values.

  • moving_average_periods (int) – The number of periods for calculating the moving average.

set_macd_moving_averages(short_moving_average, long_moving_average, signal_moving_average)[source]

Sets the moving average types for the MACD calculation.

Parameters:
  • short_moving_average (int) – The short-period moving average type.

  • long_moving_average (int) – The long-period moving average type.

  • signal_moving_average (int) – The signal line moving average type.

set_macd_period_counts(short_period_count, long_period_count, signal_period_count)[source]

Sets the period counts for the MACD calculation.

Parameters:
  • short_period_count (int) – The number of periods for the short moving average.

  • long_period_count (int) – The number of periods for the long moving average.

  • signal_period_count (int) – The number of periods for the signal line.

set_second_stochastic_moving_averages(k_moving_average, d_moving_average)[source]

Sets the moving average types for the second stochastic oscillator.

Parameters:
  • k_moving_average (int) – The moving average type for %K.

  • d_moving_average (int) – The moving average type for %D.

set_second_stochastic_period_counts(stochastic_periods, smoothing_periods, moving_average_periods)[source]

Sets the period counts for the second stochastic oscillator.

Parameters:
  • stochastic_periods (int) – The number of periods for the stochastic calculation.

  • smoothing_periods (int) – The number of periods for smoothing the stochastic values.

  • moving_average_periods (int) – The number of periods for calculating the moving average.

lightningchart_trader.indicators.simple_moving_average module

class lightningchart_trader.indicators.simple_moving_average.SimpleMovingAverage(trader, period_count=14)[source]

Bases: LineIndicator, PeriodIndicator, SourceIndicator

lightningchart_trader.indicators.skewness module

class lightningchart_trader.indicators.skewness.Skewness(trader)[source]

Bases: LineIndicator, PeriodIndicator, SourceIndicator

set_moving_average_type(moving_average_type)[source]

Sets the moving average type used in the Skewness calculation.

Parameters:
  • moving_average_type (int) – The type of moving average to use. This is typically represented as an integer

  • methods (corresponding to different moving average calculation)

lightningchart_trader.indicators.sqn_trend module

class lightningchart_trader.indicators.sqn_trend.SQNTrend(trader)[source]

Bases: LineIndicator, PeriodIndicator, SourceIndicator

set_moving_average_type(moving_average_type)[source]

Sets the type of moving average used in the SQN Trend calculation.

Parameters:
  • moving_average_type (int) – The type of moving average to use, typically represented as an integer

  • methods. (corresponding to different moving average calculation)

lightningchart_trader.indicators.standard_deviation module

class lightningchart_trader.indicators.standard_deviation.StandardDeviation(trader, period_count=20)[source]

Bases: LineIndicator, PeriodIndicator, SourceIndicator

set_moving_average_type(moving_average_type)[source]

Sets the type of moving average used in the Standard Deviation calculation.

Parameters:
  • moving_average_type (int) – The type of moving average to apply, represented as an integer

  • calculation. (corresponding to different methods of)

lightningchart_trader.indicators.standard_error module

class lightningchart_trader.indicators.standard_error.StandardError(trader, period_count=14)[source]

Bases: LineIndicator, PeriodIndicator, SourceIndicator

set_moving_average_type(moving_average_type)[source]

Sets the type of moving average used in the Standard Error calculation.

Parameters:

moving_average_type (int) – The type of moving average to apply.

lightningchart_trader.indicators.standard_error_bands module

class lightningchart_trader.indicators.standard_error_bands.StandardErrorBands(trader)[source]

Bases: LineIndicator, PeriodIndicator, SourceIndicator

set_fill_color(color)[source]

Sets the fill color for the standard error bands.

Parameters:

color (str) – The color code for the fill.

set_fill_enabled(fill_enabled)[source]

Enables or disables the fill for the standard error bands.

Parameters:

fill_enabled (bool) – Boolean value to enable or disable the fill.

set_moving_average_type(moving_average_type)[source]

Sets the type of moving average used in the standard error bands calculation.

Parameters:

moving_average_type (int) – The type of moving average to apply.

set_multiplier(multiplier)[source]

Sets the multiplier for the standard error bands.

Parameters:

multiplier (int | float) – The multiplier value to adjust the band width.

lightningchart_trader.indicators.stochastic_momentum_index module

class lightningchart_trader.indicators.stochastic_momentum_index.StochasticMomentumIndex(trader)[source]

Bases: IndicatorBase

set_line_width(width)[source]

Sets the width of the line in the Stochastic Momentum Index.

Parameters:

width (int | float) – The width of the line.

set_moving_average_line_color(color)[source]

Sets the color of the moving average line.

Parameters:

color (str) – The color of the moving average line.

set_moving_average_types(oscillator_smoothing_average, ma_moving_average)[source]

Sets the types of moving averages used in the Stochastic Momentum Index.

Parameters:
  • oscillator_smoothing_average (int) – Type of smoothing moving average.

  • ma_moving_average (int) – Type of moving average for the MA line.

set_overbought_color(color)[source]

Sets the color for the overbought threshold.

Parameters:

color (str) – The color representing the overbought threshold.

set_oversold_and_overbought_ranges(oversold_range, overbought_range)[source]

Sets the ranges for oversold and overbought levels.

Parameters:
  • oversold_range (int | float) – The value of the oversold threshold.

  • overbought_range (int | float) – The value of the overbought threshold.

set_oversold_color(color)[source]

Sets the color for the oversold threshold.

Parameters:

color (str) – The color representing the oversold threshold.

set_period_counts(oscillator_period_count, first_smooth_periods, double_smooth_periods, moving_average_period_count)[source]

Sets the period counts for various components of the Stochastic Momentum Index.

Parameters:
  • oscillator_period_count (int) – Number of periods for the oscillator.

  • first_smooth_periods (int) – Number of periods for the first smoothing.

  • double_smooth_periods (int) – Number of periods for double smoothing.

  • moving_average_period_count (int) – Number of periods for the moving average.

set_stochastic_line_color(color)[source]

Sets the color of the stochastic line.

Parameters:

color (str) – The color of the stochastic line.

lightningchart_trader.indicators.stochastic_oscillator module

class lightningchart_trader.indicators.stochastic_oscillator.StochasticOscillator(trader)[source]

Bases: IndicatorBase

set_line_width(width)[source]

Sets the width of the stochastic oscillator line.

Parameters:

width (int | float) – Width of the line.

set_moving_average_line_color(color)[source]

Sets the color of the moving average line.

Parameters:

color (str) – The color to set for the moving average line.

set_overbought_color(color)[source]

Sets the color representing the overbought threshold.

Parameters:

color (str) – The color to represent the overbought range.

set_oversold_and_overbought_ranges(oversold_range, overbought_range)[source]

Sets the oversold and overbought threshold ranges.

Parameters:
  • oversold_range (float) – The oversold range value.

  • overbought_range (float) – The overbought range value.

set_oversold_color(color)[source]

Sets the color representing the oversold threshold.

Parameters:

color (str) – The color to represent the oversold range.

set_period_counts(so_period_count, ma_period_count)[source]

Sets the period counts for the stochastic oscillator and moving average.

Parameters:
  • so_period_count (int) – Number of periods for the stochastic oscillator.

  • ma_period_count (int) – Number of periods for the moving average.

set_stochastic_line_color(color)[source]

Sets the color of the stochastic line.

Parameters:

color (str) – The color to set for the stochastic line.

lightningchart_trader.indicators.stochastic_oscillator_smoothed module

class lightningchart_trader.indicators.stochastic_oscillator_smoothed.StochasticOscillatorSmoothed(trader)[source]

Bases: IndicatorBase

set_line_width(width)[source]

Sets the width of the stochastic oscillator line.

Parameters:

width (int | float) – Width of the line.

set_moving_average_line_color(color)[source]

Sets the color of the moving average line.

Parameters:

color (str) – Color of the moving average line.

set_moving_average_types(oscillator_smoothing_average, ma_moving_average)[source]

Sets the types of moving averages for smoothing and the MA line.

Parameters:
  • oscillator_smoothing_average (int) – The smoothing moving average type.

  • ma_moving_average (int) – The moving average type for the MA line.

set_overbought_color(color)[source]

Sets the color representing the overbought threshold.

Parameters:

color (str) – The overbought color.

set_oversold_and_overbought_ranges(oversold_range, overbought_range)[source]

Sets the oversold and overbought threshold ranges.

Parameters:
  • oversold_range (float) – The oversold range value.

  • overbought_range (float) – The overbought range value.

set_oversold_color(color)[source]

Sets the color representing the oversold threshold.

Parameters:

color (str) – The oversold color.

set_period_counts(oscillator_period_count, oscillator_smoothing_periods, moving_average_period_count)[source]

Sets the period counts for different components of the oscillator.

Parameters:
  • 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.

set_stochastic_line_color(color)[source]

Sets the color of the stochastic line.

Parameters:

color (str) – Color of the stochastic line.

lightningchart_trader.indicators.stoller_average_range_channel module

class lightningchart_trader.indicators.stoller_average_range_channel.StollerAverageRangeChannel(trader)[source]

Bases: LineIndicator, SourceIndicator

set_fill_color(color)[source]

Sets the fill color for the Stoller Average Range Channel.

Parameters:

color (str) – The color to set for the fill area.

set_fill_enabled(enabled)[source]

Enables or disables the fill for the Stoller Average Range Channel.

Parameters:

enabled (bool) – True to enable the fill, False to disable it.

set_moving_average_type(ma_type)[source]

Sets the type of moving average used in the channel.

Parameters:

ma_type (int) – The moving average type.

set_multiplier(multiplier)[source]

Sets the multiplier for the Stoller Average Range Channel.

Parameters:

multiplier (float) – The multiplier value to adjust the channel width.

set_period_counts(period_count_ma, period_count_atr)[source]

Sets the period counts for the moving average and ATR.

Parameters:
  • period_count_ma (int) – The number of periods for the moving average.

  • period_count_atr (int) – The number of periods for the ATR (Average True Range).

lightningchart_trader.indicators.super_trend module

class lightningchart_trader.indicators.super_trend.SuperTrend(trader, period_count=10)[source]

Bases: PeriodIndicator

set_fill_enabled(enabled)[source]

Enables or disables the fill area for the SuperTrend indicator.

Parameters:

enabled (bool) – True to enable the fill, False to disable it.

set_line_width(width)[source]

Sets the width of the SuperTrend line.

Parameters:

width (int | float) – The width of the line in pixels.

set_lower_color(color)[source]

Sets the color for the lower part of the SuperTrend indicator.

Parameters:

color (str) – The color for the lower trend line.

set_multiplier(multiplier)[source]

Sets the multiplier for the SuperTrend calculation.

Parameters:

multiplier (float) – The multiplier used to calculate the SuperTrend levels.

set_upper_color(color)[source]

Sets the color for the upper part of the SuperTrend indicator.

Parameters:

color (str) – The color for the upper trend line.

lightningchart_trader.indicators.swing_index module

class lightningchart_trader.indicators.swing_index.SwingIndex(trader)[source]

Bases: LineIndicator

set_limit_move_value(limit_move_value)[source]

Sets the limit move value for the Swing Index calculation.

Parameters:

limit_move_value (int | float) – The maximum price movement value used in the Swing Index calculation.

lightningchart_trader.indicators.time_series_moving_average module

class lightningchart_trader.indicators.time_series_moving_average.TimeSeriesMovingAverage(trader, period_count=25)[source]

Bases: LineIndicator, PeriodIndicator, SourceIndicator

lightningchart_trader.indicators.trade_volume_index module

class lightningchart_trader.indicators.trade_volume_index.TradeVolumeIndex(trader)[source]

Bases: LineIndicator, SourceIndicator

set_minimum_tick_value(minimum_tick_value)[source]

Sets the minimum tick value for the Trade Volume Index.

Parameters:

minimum_tick_value (int | float) – The minimum price change required to count as a tick in the Trade Volume Index.

lightningchart_trader.indicators.triangular_moving_average module

class lightningchart_trader.indicators.triangular_moving_average.TriangularMovingAverage(trader, period_count=20)[source]

Bases: LineIndicator, PeriodIndicator, SourceIndicator

lightningchart_trader.indicators.triple_exponential_average module

class lightningchart_trader.indicators.triple_exponential_average.TripleExponentialAverage(trader)[source]

Bases: LineIndicator, PeriodIndicator, SourceIndicator

set_signal_color(color)[source]

Sets the color for the signal line of the Triple Exponential Average indicator.

Parameters:

color (str) – The color to be applied to the signal line in the indicator.

lightningchart_trader.indicators.true_strength_index module

class lightningchart_trader.indicators.true_strength_index.TrueStrengthIndex(trader)[source]

Bases: LineIndicator, SourceIndicator

set_moving_average_types(first_smooth_ma, double_smooth_ma, signal_ma)[source]

Sets the types of moving averages for different smoothing stages.

Parameters:
  • first_smooth_ma (int) – The moving average type for the first smoothing.

  • double_smooth_ma (int) – The moving average type for the double smoothing.

  • signal_ma (int) – The moving average type for the signal line.

set_period_counts(price_period_count, first_smooth_periods, double_smooth_periods, signal_periods)[source]

Sets the period counts for the different stages of the True Strength Index.

Parameters:
  • price_period_count (int) – The period count for the price.

  • first_smooth_periods (int) – The period count for the first smoothing.

  • double_smooth_periods (int) – The period count for the double smoothing.

  • signal_periods (int) – The period count for the signal line.

set_signal_color(color)[source]

Sets the color of the signal line for the True Strength Index.

Parameters:

color (str) – The color to set for the signal line.

lightningchart_trader.indicators.twiggs_money_flow module

class lightningchart_trader.indicators.twiggs_money_flow.TwiggsMoneyFlow(trader)[source]

Bases: LineIndicator, PeriodIndicator

lightningchart_trader.indicators.typical_price module

class lightningchart_trader.indicators.typical_price.TypicalPrice(trader)[source]

Bases: LineIndicator

lightningchart_trader.indicators.ultimate_oscillator module

class lightningchart_trader.indicators.ultimate_oscillator.UltimateOscillator(trader)[source]

Bases: LineIndicator

set_period_counts(period_count_short, period_count_mid, period_count_long)[source]

Sets the period counts for the Ultimate Oscillator.

Parameters:
  • period_count_short (int) – The period count for short-term oscillation.

  • period_count_mid (int) – The period count for mid-term oscillation.

  • period_count_long (int) – The period count for long-term oscillation.

lightningchart_trader.indicators.ultimate_oscillator_smoothed module

class lightningchart_trader.indicators.ultimate_oscillator_smoothed.UltimateOscillatorSmoothed(trader)[source]

Bases: LineIndicator

set_moving_average_type(ma_type)[source]

Sets the moving average type for the smoothed Ultimate Oscillator.

Parameters:

ma_type (int) – The moving average type to be applied.

set_period_counts(period_count_short, period_count_mid, period_count_long)[source]

Sets the period counts for short, mid, and long-term oscillations.

Parameters:
  • period_count_short (int) – The period count for the short-term oscillator.

  • period_count_mid (int) – The period count for the mid-term oscillator.

  • period_count_long (int) – The period count for the long-term oscillator.

lightningchart_trader.indicators.variable_moving_average module

class lightningchart_trader.indicators.variable_moving_average.VariableMovingAverage(trader, period_count=9)[source]

Bases: LineIndicator, PeriodIndicator, SourceIndicator

lightningchart_trader.indicators.vertical_horizontal_filter module

class lightningchart_trader.indicators.vertical_horizontal_filter.VerticalHorizontalFilter(trader, period_count=28)[source]

Bases: LineIndicator, PeriodIndicator, SourceIndicator

lightningchart_trader.indicators.vidya module

class lightningchart_trader.indicators.vidya.VIDYA(trader, period_count=9)[source]

Bases: LineIndicator, PeriodIndicator, SourceIndicator

set_standard_deviation_period_counts(short_period_count, long_period_count)[source]

Sets the period counts for calculating the standard deviation for VIDYA.

Parameters:
  • short_period_count (int) – The short period count for standard deviation.

  • long_period_count (int) – The long period count for standard deviation.

lightningchart_trader.indicators.volume module

class lightningchart_trader.indicators.volume.Volume(trader, add_as_overlay=True, two_colored_bars=True, bar_color=None, offset=0)[source]

Bases: IndicatorBase

set_bar_color(color)[source]

Sets the color of the volume bars.

Parameters:

color (str) – The color to use for the volume bars.

set_show_as_overlay(show_as_overlay)[source]

Sets whether the volume indicator is displayed as an overlay.

Parameters:

show_as_overlay (bool) – Whether to show the volume bars as an overlay on the price chart.

set_two_colored_bars(use_two_colors)[source]

Enables or disables two-colored volume bars.

Parameters:

use_two_colors (bool) – Whether to use two colors for volume bars (e.g., for up and down movements).

lightningchart_trader.indicators.volume_oscillator module

class lightningchart_trader.indicators.volume_oscillator.VolumeOscillator(trader)[source]

Bases: IndicatorBase

set_calculate_as_percentage(calculate_as_percentage)[source]

Sets whether to calculate the oscillator as a percentage.

Parameters:

calculate_as_percentage (bool) – Whether to calculate the oscillator as a percentage.

set_histogram_color(histogram_color)[source]

Sets the color of the histogram.

Parameters:

histogram_color (str) – The color for the histogram.

set_line_width(width)[source]

Sets the width of the oscillator line.

Parameters:

width (int | float) – The width of the line.

set_moving_average_signal(moving_average_type)[source]

Sets the type of moving average used for the signal line.

Parameters:

moving_average_type (int) – The type of the moving average.

set_moving_average_type(moving_average_type)[source]

Sets the type of moving average for the oscillator.

Parameters:

moving_average_type (int) – The type of the moving average.

set_period_counts(short_period_count, long_period_count, signal_period_count)[source]

Sets the period counts for the oscillator and signal line.

Parameters:
  • short_period_count (int) – The short period count.

  • long_period_count (int) – The long period count.

  • signal_period_count (int) – The signal period count.

set_signal_line_color(color)[source]

Sets the color of the signal line.

Parameters:

color (str) – The color for the signal line.

set_vo_line_color(color)[source]

Sets the color of the oscillator line.

Parameters:

color (str) – The color for the oscillator line.

lightningchart_trader.indicators.volume_rate_of_change module

class lightningchart_trader.indicators.volume_rate_of_change.VolumeRateOfChange(trader)[source]

Bases: LineIndicator, PeriodIndicator

lightningchart_trader.indicators.volume_weighted_moving_average module

class lightningchart_trader.indicators.volume_weighted_moving_average.VolumeWeightedMovingAverage(trader, period_count=20)[source]

Bases: LineIndicator, PeriodIndicator, SourceIndicator

lightningchart_trader.indicators.weighted_close module

class lightningchart_trader.indicators.weighted_close.WeightedClose(trader)[source]

Bases: LineIndicator

lightningchart_trader.indicators.weighted_moving_average module

class lightningchart_trader.indicators.weighted_moving_average.WeightedMovingAverage(trader, period_count=14)[source]

Bases: LineIndicator, PeriodIndicator, SourceIndicator

lightningchart_trader.indicators.welles_wilder_smoothing_average module

class lightningchart_trader.indicators.welles_wilder_smoothing_average.WellesWilderSmoothingAverage(trader, period_count=14)[source]

Bases: LineIndicator, PeriodIndicator, SourceIndicator

lightningchart_trader.indicators.williams_accumulation_distribution module

class lightningchart_trader.indicators.williams_accumulation_distribution.WilliamsAccumulationDistribution(trader)[source]

Bases: LineIndicator

set_volume_use(use_volume)[source]

Sets whether to include volume in the Williams Accumulation/Distribution calculation.

Parameters:

use_volume (bool) – If True, the volume will be used in the calculation. If False, volume is excluded.

lightningchart_trader.indicators.williams_percent_range module

class lightningchart_trader.indicators.williams_percent_range.WilliamsPercentRange(trader, period_count=14)[source]

Bases: LineIndicator, PeriodIndicator, SourceIndicator

set_overbought_color(color)[source]

Sets the color used for the overbought region in the indicator.

Parameters:

color (str) – The color to be used for the overbought region, specified as a hex string (e.g., ‘#FF0000’).

set_oversold_and_overbought_ranges(oversold_range, overbought_range)[source]

Sets the ranges for oversold and overbought levels.

Parameters:
  • oversold_range (int | float) – The threshold value for the oversold range.

  • overbought_range (int | float) – The threshold value for the overbought range.

set_oversold_color(color)[source]

Sets the color used for the oversold region in the indicator.

Parameters:

color (str) – The color to be used for the oversold region, specified as a hex string (e.g., ‘#00FF00’).

lightningchart_trader.indicators.williams_variable_accumulation_distribution module

class lightningchart_trader.indicators.williams_variable_accumulation_distribution.WilliamsVariableAccumulationDistribution(trader)[source]

Bases: LineIndicator, PeriodIndicator

set_moving_average_type(moving_average_type)[source]

Sets the moving average type for the indicator.

Parameters:
  • moving_average_type (int) – The type of moving average to use.

  • Typically – 0 = Simple Moving Average (SMA) 1 = Exponential Moving Average (EMA) 2 = Weighted Moving Average (WMA) 3 = Smoothed Moving Average (SMMA)

  • averages (values represent different types of moving) – 0 = Simple Moving Average (SMA) 1 = Exponential Moving Average (EMA) 2 = Weighted Moving Average (WMA) 3 = Smoothed Moving Average (SMMA)

  • as (such) – 0 = Simple Moving Average (SMA) 1 = Exponential Moving Average (EMA) 2 = Weighted Moving Average (WMA) 3 = Smoothed Moving Average (SMMA)

lightningchart_trader.indicators.z_value module

class lightningchart_trader.indicators.z_value.ZValue(trader, period_count=20)[source]

Bases: SourceIndicator

set_line_color(color)[source]

Sets the color of the Z-Value line.

Parameters:

color (str) – The color of the line in hex format, e.g., ‘#FF0000’ for red.

set_line_width(width)[source]

Sets the width of the Z-Value line.

Parameters:

width (int | float) – The width of the line.

set_moving_average_type(moving_average_type)[source]

Sets the type of moving average used to calculate the Z-Value.

Parameters:
  • moving_average_type (int) – The type of moving average to use.

  • Typically – 0 = Simple Moving Average (SMA) 1 = Exponential Moving Average (EMA) 2 = Weighted Moving Average (WMA)

  • averages (values represent different types of moving) – 0 = Simple Moving Average (SMA) 1 = Exponential Moving Average (EMA) 2 = Weighted Moving Average (WMA)

set_offset(offset)[source]

Sets the offset of the Z-Value line.

Parameters:

offset (int | float) – The offset to apply to the Z-Value.

set_period_count(period_count)[source]

Sets the number of periods for calculating the Z-Value.

Parameters:

period_count (int) – The number of periods to use in the calculation.

set_visible(visible)[source]

Sets the visibility of the Z-Value indicator.

Parameters:

visible (bool) – Whether the indicator is visible or not.

Module contents

class lightningchart_trader.indicators.IndicatorBase(trader)[source]

Bases: object

Base class for all technical indicators.

dispose()[source]

Disposes the indicator.

get_name()[source]

Gets the indicator name.

set_name(name)[source]

Sets the name of the indicator.

Parameters:

name (str) – New indicator name.

set_offset(offset)[source]

Moves the indicator from its calculated position forward or backward.

Parameters:

offset (int | float) – New offset value.

set_value_label_type(label_type)[source]

Sets the value label type for the indicator.

Parameters:

label_type (str) – ‘LabelAndLine’, ‘Label’, ‘Line’, or ‘Hidden’

set_visible(visible)[source]

Sets the visibility of the indicator. Hiding the indicator via setVisible(false) does not remove it. Use dispose() to delete any indicator.

Parameters:

visible (bool) – Visibility of the indicator.

class lightningchart_trader.indicators.LineIndicator(trader)[source]

Bases: IndicatorBase

set_line_color(color)[source]

Sets the line color of the indicator.

Parameters:

color (str) – New line color as string, should be in HEX format e.g. #FFFFFF.

set_line_width(width)[source]

Sets the line width of the indicator.

Parameters:

width (int | float) – New line width.

class lightningchart_trader.indicators.PeriodIndicator(trader)[source]

Bases: IndicatorBase

set_period_count(count)[source]

Sets the number of time periods (n) used to calculate the indicator.

Parameters:

count (int) – New period count.

class lightningchart_trader.indicators.SourceIndicator(trader)[source]

Bases: IndicatorBase

set_source(source)[source]

Sets which values the indicator calculations are based on.

Parameters:

source (str) – “Close” | “High” | “Hl2” | “Hlc3” | “Hlcc4” | “Indicator” | “Low” | “Oc2” | “Olhc4” | “Open”