Category Other  Published on 28/01/2023

IchimokuPlus (Japsian)

Description

This indicator is based on "Ichimoku", and with its additional and useful features, it can help traders to get the right positions and help analysts to have an accurate analysis.
Additional features used in this indicator are:

  1. It has two extra KijunSen that user can adjust the period and properties of their lines.(eg 103 and 207)
  2. It has a QualityLine and DirectionLine, which is the same KijunSen that shift 26 Candle to the front and back.
    Using these two lines can be a great help in Trading and analysis.
  3. There is a separate "KijunSen" and "TenkanSen" With different settings for shifting forward or backward to the user's desired number
  4. Adjust and modify the Kumo and Chikou and TenkenSen and extra KijunSen and QualityLine and DirectionLine shift to the desired value.
  5. Adjust and change the color of the Kumo.
  6. Show the maximum and minimum Price lines for Last month on the chart.
    These two lines are very powerful and strong resistance and support.
  • All features above have the ability to enable or disable, And the user can change their properties, such as color, thickness and type of lines.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using cAlgo.API;
using cAlgo.API.Collections;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;

namespace cAlgo
{

    [Indicator(IsOverlay = true, TimeZone = TimeZones.EasternStandardTime, AccessRights = AccessRights.None, AutoRescale = false)]
    [Cloud("Kumo Up", "Kumo Down", Opacity = 0.3)]

    public class IchimokuPlus : Indicator
    {

        #region parameters

        [Parameter("TenkanSen", DefaultValue = 9, MinValue = 1, Group = "Period")]
        public int TenkanSenPeriods { get; set; }

        [Parameter("KijunSen", DefaultValue = 26, MinValue = 1, Group = "Period")]
        public int KijunSenPeriods { get; set; }

        [Parameter("SenkouSpanB", DefaultValue = 52, MinValue = 1, Group = "Period")]
        public int SenkouSpanBPeriods { get; set; }

        [Parameter("KijunSen extra1", DefaultValue = 103, MinValue = 1, Group = "Period")]
        public int KijunSenExtra1Periods { get; set; }

        [Parameter("KijunSen extra2", DefaultValue = 207, MinValue = 1, Group = "Period")]
        public int KijunSenExtera2Periods { get; set; }

        [Parameter("TenkanSen +17", DefaultValue = 9, MinValue = 1, Group = "Period")]
        public int TenkanSen17Periods { get; set; }

        [Parameter("QualityLine", DefaultValue = 26, MinValue = 1, Group = "Period")]
        public int QualityLinePeriod { get; set; }

        [Parameter("DirectionLine", DefaultValue = 26, MinValue = 1, Group = "Period")]
        public int DirectionLinePeriod { get; set; }

        [Parameter("ChikouSpan Shift", DefaultValue = -26, MaxValue = 9999, Group = "Shift")]
        public int ChikouSpanShift { get; set; }

        [Parameter("Kumo Shift", DefaultValue = 26, MinValue = -9999, Group = "Shift")]
        public int KumoShift { get; set; }

        [Parameter("TenkanSen +17", DefaultValue = 17, MinValue = -9999, Group = "Shift")]
        public int TenkanSen17Shift { get; set; }

        [Parameter("QualityLine", DefaultValue = 26, MinValue = -9999, Group = "Shift")]
        public int QualityLineShift { get; set; }

        [Parameter("DirectionLine", DefaultValue = -26, MaxValue = 9999, Group = "Shift")]
        public int DirectionLineShift { get; set; }

        [Parameter("KijunSen extra1", DefaultValue = 0, MinValue = -9999, Group = "Shift")]
        public int KijunSenExtra1Shift { get; set; }

        [Parameter("KijunSen extra2", DefaultValue = 0, MinValue = -9999, Group = "Shift")]
        public int KijunSenExtra2Shift { get; set; }

        [Output("TenkanSen", PlotType = PlotType.Line, LineColor = "Red")]
        public IndicatorDataSeries TenkanSenResult { get; set; }

        [Output("KijunSen", PlotType = PlotType.Line, LineColor = "Blue")]
        public IndicatorDataSeries KijunSenResult { get; set; }

        [Output("ChikuSpan", PlotType = PlotType.Line, LineColor = "Green")]
        public IndicatorDataSeries ChikouSpanResult { get; set; }

        [Output("Kumo Up", PlotType = PlotType.Line, LineColor = "Green")]
        public IndicatorDataSeries KumoUpResult { get; set; }

        [Output("Kumo Down", PlotType = PlotType.Line, LineColor = "FFFF6666")]
        public IndicatorDataSeries KumoDownResult { get; set; }

        [Output("SenkouSpanA", PlotType = PlotType.Line, LineColor = "Green")]
        public IndicatorDataSeries SenkouSpanAResult { get; set; }

        [Output("SenkouSpanB", PlotType = PlotType.Line, LineColor = "FFFF6666")]
        public IndicatorDataSeries SenkouSpanBResult { get; set; }

        [Output("KijunSen extra1", PlotType = PlotType.Line, LineColor = "green")]
        public IndicatorDataSeries KijunSenExtra1Result { get; set; }

        [Output("KijunSen extra2", PlotType = PlotType.Line, LineColor = "orange")]
        public IndicatorDataSeries KijunSenExtra2Result { get; set; }

        [Output("Tenkan +17", PlotType = PlotType.Line, LineColor = "yellow")]
        public IndicatorDataSeries TenkanSen17Result { get; set; }

        [Output("QualityLine", PlotType = PlotType.Line, LineColor = "Black")]
        public IndicatorDataSeries QualityLineResult { get; set; }

        [Output("DirectionLine", PlotType = PlotType.Line, LineColor = "Purple")]
        public IndicatorDataSeries DirectionLineResult { get; set; }
        
        double High, Low, High1, Low1, High2, Low2, High3, Low3, High4, Low4, High5, Low5;

        #endregion

        #region Global Variables


        private IchimokuKinkoHyo Ichimoku;
        #endregion

        protected override void Initialize()
        {
        // Initialize and create nested indicators
   
        Ichimoku = Indicators.IchimokuKinkoHyo( TenkanSenPeriods, KijunSenPeriods, SenkouSpanBPeriods);
            
            
            }

        
        //END METHOD INITIALIZE

        public override void Calculate(int index)
        {
     
            

            High = Bars.HighPrices[index];
            Low = Bars.LowPrices[index];
            High1 = Bars.HighPrices[index];
            Low1 = Bars.LowPrices[index];
            High2 = Bars.HighPrices[index];
            Low2 = Bars.LowPrices[index];
            High3 = Bars.HighPrices[index];
            Low3 = Bars.LowPrices[index];
            High4 = Bars.HighPrices[index];
            Low4 = Bars.LowPrices[index];
            High5 = Bars.HighPrices[index];
            Low5 = Bars.LowPrices[index];


         

            for (int i = 0; i < TenkanSen17Periods; i++)
            {
                if (High < Bars.HighPrices[index - i])
                {
                    High = Bars.HighPrices[index - i];
                }
                if (Low > Bars.LowPrices[index - i])
                {
                    Low = Bars.LowPrices[index - i];
                }
            }
            for (int i = 0; i < QualityLinePeriod; i++)
            {
                if (High1 < Bars.HighPrices[index - i])
                {
                    High1 = Bars.HighPrices[index - i];
                }
                if (Low1 > Bars.LowPrices[index - i])
                {
                    Low1 = Bars.LowPrices[index - i];
                }
            }
            for (int i = 0; i < DirectionLinePeriod; i++)
            {
                if (High2 < Bars.HighPrices[index - i])
                {
                    High2 = Bars.HighPrices[index - i];
                }
                if (Low2 > Bars.LowPrices[index - i])
                {
                    Low2 = Bars.LowPrices[index - i];
                }
            }
             for (int i = 0; i < SenkouSpanBPeriods; i++)
            {
                if (High3 < Bars.HighPrices[index - i])
                {
                    High3 = Bars.HighPrices[index - i];
                }
                if (Low3 > Bars.LowPrices[index - i])
                {
                    Low3 = Bars.LowPrices[index - i];
                }
            }
            for (int i = 0; i < KijunSenExtra1Periods; i++)
            {
                if (High4 < Bars.HighPrices[index - i])
                {
                    High4 = Bars.HighPrices[index - i];
                }
                if (Low4 > Bars.LowPrices[index - i])
                {
                    Low4 = Bars.LowPrices[index - i];
                }
            }
            for (int i = 0; i < KijunSenExtera2Periods; i++)
            {
                if (High5 < Bars.HighPrices[index - i])
                {
                    High5 = Bars.HighPrices[index - i];
                }
                if (Low5 > Bars.LowPrices[index - i])
                {
                    Low5 = Bars.LowPrices[index - i];
                }
            }


            TenkanSenResult[index] = Ichimoku.TenkanSen[index];
            KijunSenResult[index] = Ichimoku.KijunSen[index];
            ChikouSpanResult[index + ChikouSpanShift] = Bars.ClosePrices[index];
            SenkouSpanAResult[index + KumoShift] = (TenkanSenResult[index] + KijunSenResult[index]) / 2;
            SenkouSpanBResult[index + KumoShift] = ((High3 + Low3) / 2); 
            KumoUpResult[index + KumoShift] = (TenkanSenResult[index] + KijunSenResult[index]) / 2;
            KumoDownResult[index + KumoShift] = ((High3 + Low3) / 2);

            TenkanSen17Result[index + TenkanSen17Shift] = ((High + Low) / 2);
            QualityLineResult[index + QualityLineShift] = ((High1 + Low1) / 2);
            DirectionLineResult[index + DirectionLineShift] = ((High2 + Low2) / 2);
            KijunSenExtra1Result[index + KijunSenExtra1Shift] = ((High4 + Low4) / 2);
            KijunSenExtra2Result[index + KijunSenExtra2Shift] = ((High5 + Low5) / 2);


        }
        //END METHOD CALCULATE
    }
    //END class DisplayDWMPipsonCharts
}
//END namespace cAlgo



ichimoku.trader's avatar
ichimoku.trader

Joined on 27.03.2022

  • Distribution: Free
  • Language: C#
  • Trading platform: cTrader Automate
  • File name: IchimokuPlus.algo
  • Rating: 5
  • Installs: 1083
  • Modified: 28/07/2024 19:34
Comments
Log in to add a comment.
matfx's avatar
matfx · 1 year ago

Thanks for sharing. Interesting piece of indicator. It does help people that solely using ichimoku kinko hyo trading strategy