Category Other  Published on 12/08/2024

Ichimoku+ half

Description

Ichimoku+ quality line + Half kumo

 




////////////////////////////////////////////////////////////////////////////////////////
///                                     Jepsian                                      ///
///                     (Have full control over Ichimoku cloud)                      ///
///                                                                                  ///
///         Publish date  18-DEC-2021                                                ///
///         Version  1.0.0                                                           ///
///         By  mohamadreza chaji                                                    ///
///         License  MIT                                                             ///
///         Contact  mr.ch1371@gmail.com                                             ///
///                                                                                  ///
////////////////////////////////////////////////////////////////////////////////////////


using System;
using cAlgo.API;
using cAlgo.API.Internals;
using cAlgo.API.Indicators;
using cAlgo.Indicators;

namespace cAlgo
{
    [Indicator(IsOverlay = true, TimeZone = TimeZones.EasternStandardTime, AccessRights = AccessRights.None)]
    [Cloud("Span A", "Span B", Opacity = 0.2)]

    public class Jepsian : Indicator
    {

        #region parameters

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

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

        [Parameter("Senkou span B", DefaultValue = 52, MinValue = 1, Group = "Period")]
        public int SB_Period { get; set; }


        [Parameter("Chikou Shift", DefaultValue = -26, MaxValue = -1, Group = "Shift")]
        public int C_Shift { get; set; }

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

        [Parameter("Quality Line", DefaultValue = 26, Group = "Shift")]
        public int Q_Shift { get; set; }

        [Parameter("Show half cloud?", DefaultValue = false, Group = "half cloud")]
        public bool SHC { get; set; }
        
        [Parameter("Half cloud", DefaultValue = 26, Group = "Shift")]
        public int H_Shift { get; set; }
        
        [Output("Tenkan sen", LineStyle = LineStyle.Solid, LineColor = "Red")]
        public IndicatorDataSeries T_Result { get; set; }

        [Output("Kijun sen", LineStyle = LineStyle.Solid, LineColor = "Blue")]
        public IndicatorDataSeries K_Result { get; set; }

        [Output("Chiku span", LineStyle = LineStyle.Solid, LineColor = "Green")]
        public IndicatorDataSeries C_Result { get; set; }

        [Output("Span A", LineStyle = LineStyle.Solid, LineColor = "Green")]
        public IndicatorDataSeries SA_Result { get; set; }

        [Output("Span B", LineStyle = LineStyle.Solid, LineColor = "FFFF6666")]
        public IndicatorDataSeries SB_Result { get; set; }

        [Output("Quality Line", LineStyle = LineStyle.Lines, LineColor = "white")]
        public IndicatorDataSeries Q_Result { get; set; }
        
        [Output("Half cloud Line", LineStyle = LineStyle.Lines, LineColor = "grey")]
        public IndicatorDataSeries H_Result { get; set; }
        #endregion

        #region Global Variables

        private IchimokuKinkoHyo _ICHI;

        #endregion

        protected override void Initialize()
        {
            _ICHI = Indicators.IchimokuKinkoHyo(T_Period, K_Period, SB_Period);
        }
        //END METHOD INITIALIZE

        public override void Calculate(int index)
        {
            T_Result[index] = _ICHI.TenkanSen.Last(0);
            K_Result[index] = _ICHI.KijunSen.Last(0);
            C_Result[index + C_Shift] = _ICHI.ChikouSpan.Last(0);
            SA_Result[index + K_Shift] = (_ICHI.TenkanSen.Last(0) + _ICHI.KijunSen.Last(0)) / 2;
            SB_Result[index + K_Shift] = _ICHI.SenkouSpanB.Last(0);
            if(SHC)
            H_Result[index + H_Shift]=(_ICHI.SenkouSpanA.Last(0)+_ICHI.SenkouSpanB.Last(0))/2;
            Q_Result[index + Q_Shift] = _ICHI.KijunSen.Last(0);     
          //  Chart.DrawStaticText("Copyright", "mohammadreza chaji", VerticalAlignment.Bottom, HorizontalAlignment.Left, Color.Gray);
        }
        //END METHOD CALCULATE
    }
    //END class DisplayDWMPipsonCharts
}
//END namespace cAlgo


mr.ch1371's avatar
mr.ch1371

Joined on 11.08.2024

  • Distribution: Free
  • Language: C#
  • Trading platform: cTrader Automate
  • File name: Ichimuko+_withSourceCode.algo
  • Rating: 5
  • Installs: 422
  • Modified: 12/08/2024 12:51
Comments
Log in to add a comment.
BA
bairdhoward50 · 3 months ago

good google