Supported Indicators

Ichimoku Kinko Hyo

Introduction

This indicator computes the Ichimoku Kinko Hyo indicator. It consists of the following main indicators: Tenkan-sen: (Highest High + Lowest Low) / 2 for the specific period (normally 9) Kijun-sen: (Highest High + Lowest Low) / 2 for the specific period (normally 26) Senkou A Span: (Tenkan-sen + Kijun-sen )/ 2 from a specific number of periods ago (normally 26) Senkou B Span: (Highest High + Lowest Low) / 2 for the specific period (normally 52), from a specific number of periods ago (normally 26)

To view the implementation of this indicator, see the LEAN GitHub repository.

Using ICHIMOKU Indicator

To create an automatic indicators for IchimokuKinkoHyo, call the ICHIMOKU helper method from the QCAlgorithm class. The ICHIMOKU method creates a IchimokuKinkoHyo object, hooks it up for automatic updates, and returns it so you can used it in your algorithm. In most cases, you should call the helper method in the Initializeinitialize method.

public class IchimokuKinkoHyoAlgorithm : QCAlgorithm
{
    private Symbol _symbol;
    private IchimokuKinkoHyo _ichimoku;

    public override void Initialize()
    {
        _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
        _ichimoku = ICHIMOKU(_symbol, 9, 26, 17, 52, 26, 26);
    }

    public override void OnData(Slice data)
    {
        if (_ichimoku.IsReady)
        {
            // The current value of _ichimoku is represented by itself (_ichimoku)
            // or _ichimoku.Current.Value
            Plot("IchimokuKinkoHyo", "ichimoku", _ichimoku);
            // Plot all properties of ichimoku
            Plot("IchimokuKinkoHyo", "tenkan", _ichimoku.Tenkan);
            Plot("IchimokuKinkoHyo", "kijun", _ichimoku.Kijun);
            Plot("IchimokuKinkoHyo", "senkoua", _ichimoku.SenkouA);
            Plot("IchimokuKinkoHyo", "senkoub", _ichimoku.SenkouB);
            Plot("IchimokuKinkoHyo", "chikou", _ichimoku.Chikou);
            Plot("IchimokuKinkoHyo", "tenkanmaximum", _ichimoku.TenkanMaximum);
            Plot("IchimokuKinkoHyo", "tenkanminimum", _ichimoku.TenkanMinimum);
            Plot("IchimokuKinkoHyo", "kijunmaximum", _ichimoku.KijunMaximum);
            Plot("IchimokuKinkoHyo", "kijunminimum", _ichimoku.KijunMinimum);
            Plot("IchimokuKinkoHyo", "senkoubmaximum", _ichimoku.SenkouBMaximum);
            Plot("IchimokuKinkoHyo", "senkoubminimum", _ichimoku.SenkouBMinimum);
            Plot("IchimokuKinkoHyo", "delayedtenkansenkoua", _ichimoku.DelayedTenkanSenkouA);
            Plot("IchimokuKinkoHyo", "delayedkijunsenkoua", _ichimoku.DelayedKijunSenkouA);
            Plot("IchimokuKinkoHyo", "delayedmaximumsenkoub", _ichimoku.DelayedMaximumSenkouB);
            Plot("IchimokuKinkoHyo", "delayedminimumsenkoub", _ichimoku.DelayedMinimumSenkouB);
        }
    }
}
class IchimokuKinkoHyoAlgorithm(QCAlgorithm):
    def initialize(self) -> None:
        self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
        self.ichimoku = self.ICHIMOKU(self.symbol, 9, 26, 17, 52, 26, 26)

    def on_data(self, slice: Slice) -> None:
        if self.ichimoku.is_ready:
            # The current value of self.ichimoku is represented by self.ichimoku.current.value
            self.plot("IchimokuKinkoHyo", "ichimoku", self.ichimoku.current.value)
            # Plot all attributes of self.ichimoku
            self.plot("IchimokuKinkoHyo", "tenkan", self.ichimoku.tenkan.current.value)
            self.plot("IchimokuKinkoHyo", "kijun", self.ichimoku.kijun.current.value)
            self.plot("IchimokuKinkoHyo", "senkou_a", self.ichimoku.senkou_a.current.value)
            self.plot("IchimokuKinkoHyo", "senkou_b", self.ichimoku.senkou_b.current.value)
            self.plot("IchimokuKinkoHyo", "chikou", self.ichimoku.chikou.current.value)
            self.plot("IchimokuKinkoHyo", "tenkan_maximum", self.ichimoku.tenkan_maximum.current.value)
            self.plot("IchimokuKinkoHyo", "tenkan_minimum", self.ichimoku.tenkan_minimum.current.value)
            self.plot("IchimokuKinkoHyo", "kijun_maximum", self.ichimoku.kijun_maximum.current.value)
            self.plot("IchimokuKinkoHyo", "kijun_minimum", self.ichimoku.kijun_minimum.current.value)
            self.plot("IchimokuKinkoHyo", "senkou_b_maximum", self.ichimoku.senkou_b_maximum.current.value)
            self.plot("IchimokuKinkoHyo", "senkou_b_minimum", self.ichimoku.senkou_b_minimum.current.value)
            self.plot("IchimokuKinkoHyo", "delayed_tenkan_senkou_a", self.ichimoku.delayed_tenkan_senkou_a.current.value)
            self.plot("IchimokuKinkoHyo", "delayed_kijun_senkou_a", self.ichimoku.delayed_kijun_senkou_a.current.value)
            self.plot("IchimokuKinkoHyo", "delayed_maximum_senkou_b", self.ichimoku.delayed_maximum_senkou_b.current.value)
            self.plot("IchimokuKinkoHyo", "delayed_minimum_senkou_b", self.ichimoku.delayed_minimum_senkou_b.current.value)

The following reference table describes the ICHIMOKU method:

ichimoku(symbol, tenkan_period, kijun_period, senkou_a_period, senkou_b_period, senkou_a_delay_period, senkou_b_delay_period, resolution=None, selector=None)[source]

Creates a new IchimokuKinkoHyo indicator for the symbol. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose ICHIMOKU we want
  • tenkan_period (int) — The period to calculate the Tenkan-sen period
  • kijun_period (int) — The period to calculate the Kijun-sen period
  • senkou_a_period (int) — The period to calculate the Tenkan-sen period
  • senkou_b_period (int) — The period to calculate the Tenkan-sen period
  • senkou_a_delay_period (int) — The period to calculate the Tenkan-sen period
  • senkou_b_delay_period (int) — The period to calculate the Tenkan-sen period
  • resolution (Resolution, optional) — The resolution
  • selector (Callable[IBaseData, TradeBar], optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

A new IchimokuKinkoHyo indicator with the specified periods and delays

Return type:

IchimokuKinkoHyo

ICHIMOKU(symbol, tenkanPeriod, kijunPeriod, senkouAPeriod, senkouBPeriod, senkouADelayPeriod, senkouBDelayPeriod, resolution=None, selector=None)[source]

Creates a new IchimokuKinkoHyo indicator for the symbol. The indicator will be automatically updated on the given resolution.

Parameters:
  • symbol (Symbol) — The symbol whose ICHIMOKU we want
  • tenkanPeriod (Int32) — The period to calculate the Tenkan-sen period
  • kijunPeriod (Int32) — The period to calculate the Kijun-sen period
  • senkouAPeriod (Int32) — The period to calculate the Tenkan-sen period
  • senkouBPeriod (Int32) — The period to calculate the Tenkan-sen period
  • senkouADelayPeriod (Int32) — The period to calculate the Tenkan-sen period
  • senkouBDelayPeriod (Int32) — The period to calculate the Tenkan-sen period
  • resolution (Resolution, optional) — The resolution
  • selector (Func<IBaseData, TradeBar>, optional) — Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
Returns:

A new IchimokuKinkoHyo indicator with the specified periods and delays

Return type:

IchimokuKinkoHyo

If you don't provide a resolution, it defaults to the security resolution. If you provide a resolution, it must be greater than or equal to the resolution of the security. For instance, if you subscribe to hourly data for a security, you should update its indicator with data that spans 1 hour or longer.

For more information about the selector argument, see Alternative Price Fields.

For more information about plotting indicators, see Plotting Indicators.

You can manually create a IchimokuKinkoHyo indicator, so it doesn't automatically update. Manual indicators let you update their values with any data you choose.

Updating your indicator manually enables you to control when the indicator is updated and what data you use to update it. To manually update the indicator, call the Updateupdate method with a TradeBar or QuoteBar. The indicator will only be ready after you prime it with enough data.

public class IchimokuKinkoHyoAlgorithm : QCAlgorithm
{
    private Symbol _symbol;
    private IchimokuKinkoHyo _ichimoku;

    public override void Initialize()
    {
        _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
        _ichimoku = new IchimokuKinkoHyo(9, 26, 17, 52, 26, 26);
    }

    public override void OnData(Slice data)
    {
        if (data.Bars.TryGetValue(_symbol, out var bar))
        {      
            _ichimoku.Update(bar);
        }
   
        if (_ichimoku.IsReady)
        {
            // The current value of _ichimoku is represented by itself (_ichimoku)
            // or _ichimoku.Current.Value
            Plot("IchimokuKinkoHyo", "ichimoku", _ichimoku);
            // Plot all properties of ichimoku
            Plot("IchimokuKinkoHyo", "tenkan", _ichimoku.Tenkan);
            Plot("IchimokuKinkoHyo", "kijun", _ichimoku.Kijun);
            Plot("IchimokuKinkoHyo", "senkoua", _ichimoku.SenkouA);
            Plot("IchimokuKinkoHyo", "senkoub", _ichimoku.SenkouB);
            Plot("IchimokuKinkoHyo", "chikou", _ichimoku.Chikou);
            Plot("IchimokuKinkoHyo", "tenkanmaximum", _ichimoku.TenkanMaximum);
            Plot("IchimokuKinkoHyo", "tenkanminimum", _ichimoku.TenkanMinimum);
            Plot("IchimokuKinkoHyo", "kijunmaximum", _ichimoku.KijunMaximum);
            Plot("IchimokuKinkoHyo", "kijunminimum", _ichimoku.KijunMinimum);
            Plot("IchimokuKinkoHyo", "senkoubmaximum", _ichimoku.SenkouBMaximum);
            Plot("IchimokuKinkoHyo", "senkoubminimum", _ichimoku.SenkouBMinimum);
            Plot("IchimokuKinkoHyo", "delayedtenkansenkoua", _ichimoku.DelayedTenkanSenkouA);
            Plot("IchimokuKinkoHyo", "delayedkijunsenkoua", _ichimoku.DelayedKijunSenkouA);
            Plot("IchimokuKinkoHyo", "delayedmaximumsenkoub", _ichimoku.DelayedMaximumSenkouB);
            Plot("IchimokuKinkoHyo", "delayedminimumsenkoub", _ichimoku.DelayedMinimumSenkouB);
        }
    }
}
class IchimokuKinkoHyoAlgorithm(QCAlgorithm):
    def initialize(self) -> None:
        self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
        self.ichimoku = IchimokuKinkoHyo(9, 26, 17, 52, 26, 26)

    def on_data(self, slice: Slice) -> None:
        bar = slice.bars.get(self._symbol)
        if bar:
            self.ichimoku.update(bar)
        if self.ichimoku.is_ready:
            # The current value of self.ichimoku is represented by self.ichimoku.current.value
            self.plot("IchimokuKinkoHyo", "ichimoku", self.ichimoku.current.value)
            # Plot all attributes of self.ichimoku
            self.plot("IchimokuKinkoHyo", "tenkan", self.ichimoku.tenkan.current.value)
            self.plot("IchimokuKinkoHyo", "kijun", self.ichimoku.kijun.current.value)
            self.plot("IchimokuKinkoHyo", "senkou_a", self.ichimoku.senkou_a.current.value)
            self.plot("IchimokuKinkoHyo", "senkou_b", self.ichimoku.senkou_b.current.value)
            self.plot("IchimokuKinkoHyo", "chikou", self.ichimoku.chikou.current.value)
            self.plot("IchimokuKinkoHyo", "tenkan_maximum", self.ichimoku.tenkan_maximum.current.value)
            self.plot("IchimokuKinkoHyo", "tenkan_minimum", self.ichimoku.tenkan_minimum.current.value)
            self.plot("IchimokuKinkoHyo", "kijun_maximum", self.ichimoku.kijun_maximum.current.value)
            self.plot("IchimokuKinkoHyo", "kijun_minimum", self.ichimoku.kijun_minimum.current.value)
            self.plot("IchimokuKinkoHyo", "senkou_b_maximum", self.ichimoku.senkou_b_maximum.current.value)
            self.plot("IchimokuKinkoHyo", "senkou_b_minimum", self.ichimoku.senkou_b_minimum.current.value)
            self.plot("IchimokuKinkoHyo", "delayed_tenkan_senkou_a", self.ichimoku.delayed_tenkan_senkou_a.current.value)
            self.plot("IchimokuKinkoHyo", "delayed_kijun_senkou_a", self.ichimoku.delayed_kijun_senkou_a.current.value)
            self.plot("IchimokuKinkoHyo", "delayed_maximum_senkou_b", self.ichimoku.delayed_maximum_senkou_b.current.value)
            self.plot("IchimokuKinkoHyo", "delayed_minimum_senkou_b", self.ichimoku.delayed_minimum_senkou_b.current.value)

To register a manual indicator for automatic updates with the security data, call the RegisterIndicatorregister_indicator method.

public class IchimokuKinkoHyoAlgorithm : QCAlgorithm
{
    private Symbol _symbol;
    private IchimokuKinkoHyo _ichimoku;

    public override void Initialize()
    {
        _symbol = AddEquity("SPY", Resolution.Daily).Symbol;
        _ichimoku = new IchimokuKinkoHyo(9, 26, 17, 52, 26, 26);
        RegisterIndicator(_symbol, _ichimoku, Resolution.Daily);
    }

    public override void OnData(Slice data)
    {
        if (_ichimoku.IsReady)
        {
            // The current value of _ichimoku is represented by itself (_ichimoku)
            // or _ichimoku.Current.Value
            Plot("IchimokuKinkoHyo", "ichimoku", _ichimoku);
            // Plot all properties of ichimoku
            Plot("IchimokuKinkoHyo", "tenkan", _ichimoku.Tenkan);
            Plot("IchimokuKinkoHyo", "kijun", _ichimoku.Kijun);
            Plot("IchimokuKinkoHyo", "senkoua", _ichimoku.SenkouA);
            Plot("IchimokuKinkoHyo", "senkoub", _ichimoku.SenkouB);
            Plot("IchimokuKinkoHyo", "chikou", _ichimoku.Chikou);
            Plot("IchimokuKinkoHyo", "tenkanmaximum", _ichimoku.TenkanMaximum);
            Plot("IchimokuKinkoHyo", "tenkanminimum", _ichimoku.TenkanMinimum);
            Plot("IchimokuKinkoHyo", "kijunmaximum", _ichimoku.KijunMaximum);
            Plot("IchimokuKinkoHyo", "kijunminimum", _ichimoku.KijunMinimum);
            Plot("IchimokuKinkoHyo", "senkoubmaximum", _ichimoku.SenkouBMaximum);
            Plot("IchimokuKinkoHyo", "senkoubminimum", _ichimoku.SenkouBMinimum);
            Plot("IchimokuKinkoHyo", "delayedtenkansenkoua", _ichimoku.DelayedTenkanSenkouA);
            Plot("IchimokuKinkoHyo", "delayedkijunsenkoua", _ichimoku.DelayedKijunSenkouA);
            Plot("IchimokuKinkoHyo", "delayedmaximumsenkoub", _ichimoku.DelayedMaximumSenkouB);
            Plot("IchimokuKinkoHyo", "delayedminimumsenkoub", _ichimoku.DelayedMinimumSenkouB);
        }
    }
}
class IchimokuKinkoHyoAlgorithm(QCAlgorithm):
    def initialize(self) -> None:
        self._symbol = self.add_equity("SPY", Resolution.DAILY).symbol
        self.ichimoku = IchimokuKinkoHyo(9, 26, 17, 52, 26, 26)
        self.register_indicator(self._symbol, self.ichimoku, Resolution.DAILY)

    def on_data(self, slice: Slice) -> None:
        if self.ichimoku.is_ready:
            # The current value of self.ichimoku is represented by self.ichimoku.current.value
            self.plot("IchimokuKinkoHyo", "ichimoku", self.ichimoku.current.value)
            # Plot all attributes of self.ichimoku
            self.plot("IchimokuKinkoHyo", "tenkan", self.ichimoku.tenkan.current.value)
            self.plot("IchimokuKinkoHyo", "kijun", self.ichimoku.kijun.current.value)
            self.plot("IchimokuKinkoHyo", "senkou_a", self.ichimoku.senkou_a.current.value)
            self.plot("IchimokuKinkoHyo", "senkou_b", self.ichimoku.senkou_b.current.value)
            self.plot("IchimokuKinkoHyo", "chikou", self.ichimoku.chikou.current.value)
            self.plot("IchimokuKinkoHyo", "tenkan_maximum", self.ichimoku.tenkan_maximum.current.value)
            self.plot("IchimokuKinkoHyo", "tenkan_minimum", self.ichimoku.tenkan_minimum.current.value)
            self.plot("IchimokuKinkoHyo", "kijun_maximum", self.ichimoku.kijun_maximum.current.value)
            self.plot("IchimokuKinkoHyo", "kijun_minimum", self.ichimoku.kijun_minimum.current.value)
            self.plot("IchimokuKinkoHyo", "senkou_b_maximum", self.ichimoku.senkou_b_maximum.current.value)
            self.plot("IchimokuKinkoHyo", "senkou_b_minimum", self.ichimoku.senkou_b_minimum.current.value)
            self.plot("IchimokuKinkoHyo", "delayed_tenkan_senkou_a", self.ichimoku.delayed_tenkan_senkou_a.current.value)
            self.plot("IchimokuKinkoHyo", "delayed_kijun_senkou_a", self.ichimoku.delayed_kijun_senkou_a.current.value)
            self.plot("IchimokuKinkoHyo", "delayed_maximum_senkou_b", self.ichimoku.delayed_maximum_senkou_b.current.value)
            self.plot("IchimokuKinkoHyo", "delayed_minimum_senkou_b", self.ichimoku.delayed_minimum_senkou_b.current.value)

The following reference table describes the IchimokuKinkoHyo constructor:

IchimokuKinkoHyo

class QuantConnect.Indicators.IchimokuKinkoHyo[source]

This indicator computes the Ichimoku Kinko Hyo indicator. It consists of the following main indicators: Tenkan-sen: (Highest High + Lowest Low) / 2 for the specific period (normally 9) Kijun-sen: (Highest High + Lowest Low) / 2 for the specific period (normally 26) Senkou A Span: (Tenkan-sen + Kijun-sen )/ 2 from a specific number of periods ago (normally 26) Senkou B Span: (Highest High + Lowest Low) / 2 for the specific period (normally 52), from a specific number of periods ago (normally 26)

get_enumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

reset()

Resets this indicator to its initial state

to_detailed_string()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

str

update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (datetime)
  • value (float)
Return type:

bool

update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

bool

property chikou

The Chikou Span component of the Ichimoku indicator

Returns:

The Chikou Span component of the Ichimoku indicator

Return type:

IndicatorBase[IndicatorDataPoint]

property consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet[IDataConsolidator]

property current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property delayed_kijun_senkou_a

The Delayed Kijun Senkou A component of the Ichimoku indicator

Returns:

The Delayed Kijun Senkou A component of the Ichimoku indicator

Return type:

WindowIndicator[IndicatorDataPoint]

property delayed_maximum_senkou_b

The Delayed Maximum Senkou B component of the Ichimoku indicator

Returns:

The Delayed Maximum Senkou B component of the Ichimoku indicator

Return type:

WindowIndicator[IndicatorDataPoint]

property delayed_minimum_senkou_b

The Delayed Minimum Senkou B component of the Ichimoku indicator

Returns:

The Delayed Minimum Senkou B component of the Ichimoku indicator

Return type:

WindowIndicator[IndicatorDataPoint]

property delayed_tenkan_senkou_a

The Delayed Tenkan Senkou A component of the Ichimoku indicator

Returns:

The Delayed Tenkan Senkou A component of the Ichimoku indicator

Return type:

WindowIndicator[IndicatorDataPoint]

property is_ready

Returns true if all of the sub-components of the Ichimoku indicator is ready

Returns:

Returns true if all of the sub-components of the Ichimoku indicator is ready

Return type:

bool

property item

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

property kijun

The Kijun-sen component of the Ichimoku indicator

Returns:

The Kijun-sen component of the Ichimoku indicator

Return type:

IndicatorBase[IndicatorDataPoint]

property kijun_maximum

The Kijun-sen Maximum component of the Ichimoku indicator

Returns:

The Kijun-sen Maximum component of the Ichimoku indicator

Return type:

IndicatorBase[IndicatorDataPoint]

property kijun_minimum

The Kijun-sen Minimum component of the Ichimoku indicator

Returns:

The Kijun-sen Minimum component of the Ichimoku indicator

Return type:

IndicatorBase[IndicatorDataPoint]

property name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

str

property previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property senkou_a

The Senkou A Span component of the Ichimoku indicator

Returns:

The Senkou A Span component of the Ichimoku indicator

Return type:

IndicatorBase[IndicatorDataPoint]

property senkou_b

The Senkou B Span component of the Ichimoku indicator

Returns:

The Senkou B Span component of the Ichimoku indicator

Return type:

IndicatorBase[IndicatorDataPoint]

property senkou_b_maximum

The Senkou B Maximum component of the Ichimoku indicator

Returns:

The Senkou B Maximum component of the Ichimoku indicator

Return type:

IndicatorBase[IndicatorDataPoint]

property senkou_b_minimum

The Senkou B Minimum component of the Ichimoku indicator

Returns:

The Senkou B Minimum component of the Ichimoku indicator

Return type:

IndicatorBase[IndicatorDataPoint]

property tenkan

The Tenkan-sen component of the Ichimoku indicator

Returns:

The Tenkan-sen component of the Ichimoku indicator

Return type:

IndicatorBase[IndicatorDataPoint]

property tenkan_maximum

The Tenkan-sen Maximum component of the Ichimoku indicator

Returns:

The Tenkan-sen Maximum component of the Ichimoku indicator

Return type:

IndicatorBase[IndicatorDataPoint]

property tenkan_minimum

The Tenkan-sen Minimum component of the Ichimoku indicator

Returns:

The Tenkan-sen Minimum component of the Ichimoku indicator

Return type:

IndicatorBase[IndicatorDataPoint]

property warm_up_period

Required period, in data points, for the indicator to be ready and fully initialized.

Returns:

Required period, in data points, for the indicator to be ready and fully initialized.

Return type:

int

property window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow[IndicatorDataPoint]

IchimokuKinkoHyo

class QuantConnect.Indicators.IchimokuKinkoHyo[source]

This indicator computes the Ichimoku Kinko Hyo indicator. It consists of the following main indicators: Tenkan-sen: (Highest High + Lowest Low) / 2 for the specific period (normally 9) Kijun-sen: (Highest High + Lowest Low) / 2 for the specific period (normally 26) Senkou A Span: (Tenkan-sen + Kijun-sen )/ 2 from a specific number of periods ago (normally 26) Senkou B Span: (Highest High + Lowest Low) / 2 for the specific period (normally 52), from a specific number of periods ago (normally 26)

GetEnumerator()

Returns an enumerator that iterates through the history window.

Return type:

IEnumerator[IndicatorDataPoint]

Reset()

Resets this indicator to its initial state

ToDetailedString()

Provides a more detailed string of this indicator in the form of {Name} - {Value}

Return type:

String

Update(time, value)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • time (DateTime)
  • value (decimal)
Return type:

Boolean

Update(input)

Updates the state of this indicator with the given value and returns true if this indicator is ready, false otherwise

Parameters:
  • input (IBaseData)
Return type:

Boolean

property Chikou

The Chikou Span component of the Ichimoku indicator

Returns:

The Chikou Span component of the Ichimoku indicator

Return type:

IndicatorBase<IndicatorDataPoint>

property Consolidators

The data consolidators associated with this indicator if any

Returns:

The data consolidators associated with this indicator if any

Return type:

ISet<IDataConsolidator>

property Current

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the current state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property DelayedKijunSenkouA

The Delayed Kijun Senkou A component of the Ichimoku indicator

Returns:

The Delayed Kijun Senkou A component of the Ichimoku indicator

Return type:

WindowIndicator<IndicatorDataPoint>

property DelayedMaximumSenkouB

The Delayed Maximum Senkou B component of the Ichimoku indicator

Returns:

The Delayed Maximum Senkou B component of the Ichimoku indicator

Return type:

WindowIndicator<IndicatorDataPoint>

property DelayedMinimumSenkouB

The Delayed Minimum Senkou B component of the Ichimoku indicator

Returns:

The Delayed Minimum Senkou B component of the Ichimoku indicator

Return type:

WindowIndicator<IndicatorDataPoint>

property DelayedTenkanSenkouA

The Delayed Tenkan Senkou A component of the Ichimoku indicator

Returns:

The Delayed Tenkan Senkou A component of the Ichimoku indicator

Return type:

WindowIndicator<IndicatorDataPoint>

property IsReady

Returns true if all of the sub-components of the Ichimoku indicator is ready

Returns:

Returns true if all of the sub-components of the Ichimoku indicator is ready

Return type:

bool

property Kijun

The Kijun-sen component of the Ichimoku indicator

Returns:

The Kijun-sen component of the Ichimoku indicator

Return type:

IndicatorBase<IndicatorDataPoint>

property KijunMaximum

The Kijun-sen Maximum component of the Ichimoku indicator

Returns:

The Kijun-sen Maximum component of the Ichimoku indicator

Return type:

IndicatorBase<IndicatorDataPoint>

property KijunMinimum

The Kijun-sen Minimum component of the Ichimoku indicator

Returns:

The Kijun-sen Minimum component of the Ichimoku indicator

Return type:

IndicatorBase<IndicatorDataPoint>

property Name

Gets a name for this indicator

Returns:

Gets a name for this indicator

Return type:

string

property Previous

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Returns:

Gets the previous state of this indicator. If the state has not been updated then the time on the value will equal DateTime.MinValue.

Return type:

IndicatorDataPoint

property Samples

Gets the number of samples processed by this indicator

Returns:

Gets the number of samples processed by this indicator

Return type:

int

property SenkouA

The Senkou A Span component of the Ichimoku indicator

Returns:

The Senkou A Span component of the Ichimoku indicator

Return type:

IndicatorBase<IndicatorDataPoint>

property SenkouB

The Senkou B Span component of the Ichimoku indicator

Returns:

The Senkou B Span component of the Ichimoku indicator

Return type:

IndicatorBase<IndicatorDataPoint>

property SenkouBMaximum

The Senkou B Maximum component of the Ichimoku indicator

Returns:

The Senkou B Maximum component of the Ichimoku indicator

Return type:

IndicatorBase<IndicatorDataPoint>

property SenkouBMinimum

The Senkou B Minimum component of the Ichimoku indicator

Returns:

The Senkou B Minimum component of the Ichimoku indicator

Return type:

IndicatorBase<IndicatorDataPoint>

property Tenkan

The Tenkan-sen component of the Ichimoku indicator

Returns:

The Tenkan-sen component of the Ichimoku indicator

Return type:

IndicatorBase<IndicatorDataPoint>

property TenkanMaximum

The Tenkan-sen Maximum component of the Ichimoku indicator

Returns:

The Tenkan-sen Maximum component of the Ichimoku indicator

Return type:

IndicatorBase<IndicatorDataPoint>

property TenkanMinimum

The Tenkan-sen Minimum component of the Ichimoku indicator

Returns:

The Tenkan-sen Minimum component of the Ichimoku indicator

Return type:

IndicatorBase<IndicatorDataPoint>

property WarmUpPeriod

Required period, in data points, for the indicator to be ready and fully initialized.

Returns:

Required period, in data points, for the indicator to be ready and fully initialized.

Return type:

Int32

property Window

A rolling window keeping a history of the indicator values of a given period

Returns:

A rolling window keeping a history of the indicator values of a given period

Return type:

RollingWindow<IndicatorDataPoint>

property [System.Int32]

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Returns:

Indexes the history windows, where index 0 is the most recent indicator value. If index is greater or equal than the current count, it returns null. If the index is greater or equal than the window size, it returns null and resizes the windows to i + 1.

Return type:

IndicatorDataPoint

Visualization

The following image shows plot values of selected properties of IchimokuKinkoHyo using the plotly library.

IchimokuKinkoHyo line plot.

You can also see our Videos. You can also get in touch with us via Discord.

Did you find this page helpful?

Contribute to the documentation: