IchiSpanB VolumeIndex free

by d.deel in category Other at 16/04/2021

Cause of lack of possible entries, there has been an /Update/ for this indicator(but same caption as before)

The idea behind this indicator is, depending on the type of strategy used, it is to find better exit or/and entry point,

Using the PVI as base DataSeries, the SenkouSpanB of the higher, lower and concerned TM has been applied,

which helps a lot against noises that can be found on a chart, 

entries should be after the crossing of the C.SSB by the PVI, while the L.SSB is, (Buy)below/(Sell)above the C.SSB

or/and exit should be after the crossing of the L.SSB by the PVI. 


Using the IchimokuKyo indicator(cloud(with a period of 306)) could be beneficial.

Chartshot: EURUSD, h1

03:08:19 (UTC+0) on Apr 16th, 2021

Notification Publishing copyrighted material is strictly prohibited. If you believe there is copyrighted material in this section you may use the Copyright Infringement Notification form to submit a claim.
Formula / Source Code
Language: C#
Trading Platform: cAlgocTrader
´╗┐using System;
using cAlgo.API;
using cAlgo.API.Internals;
using cAlgo.API.Indicators;
using cAlgo.Indicators;

namespace cAlgo
    [Indicator(IsOverlay = false, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None, AutoRescale = false)]
    public class IchiSpanBVolumeIndex : Indicator

        [Parameter("Higher Kyo Periode", DefaultValue = 6)]
        public int HigherIchi { get; set; }
        [Parameter("Lower Kyo Periode", DefaultValue = 2)]
        public int LowerIchi { get; set; }

        [Parameter("Senkou Periode", DefaultValue = 52)]
        public int SenkouPeriod { get; set; }
        [Parameter("SenkouIndex", DefaultValue = 0)]
        public int SenkouP { get; set; }
        [Output("PV Index", LineColor = "#FFFF3334")]
        public IndicatorDataSeries ResultP { get; set; }
        [Output("SenkouSpan B3", LineColor = "#FFFFFF01")]
        public IndicatorDataSeries ResultH { get; set; }
        [Output("SenkouSpan B2", LineColor = "#FF65FE66")]
        public IndicatorDataSeries ResultS2 { get; set; }
        [Output("SenkouSpan B1", LineColor = "#FF02AFF1")]
        public IndicatorDataSeries ResultS1 { get; set; }

        private PositiveVolumeIndex _positiveVolumeIndex;
        protected override void Initialize()
            _positiveVolumeIndex = Indicators.PositiveVolumeIndex(Bars.ClosePrices);

        private void IchiResult(out double result1, out double result2, ref int senkouSycle)
            double res1 = _positiveVolumeIndex.Result.LastValue;
            double res2 = _positiveVolumeIndex.Result.LastValue;
            int i = 0;
            while (i <= senkouSycle)
                if (_positiveVolumeIndex.Result.Last(i) > res1)
                    res1 = _positiveVolumeIndex.Result.Last(i);
                    if (_positiveVolumeIndex.Result.Last(i) < res2)
                        res2 = _positiveVolumeIndex.Result.Last(i);

            result1 = res1;
            result2 = res2;

        private double _calResult1, _calResult2;
        private double _calResult3, _calResult4;
        private double _calResult5, _calResult6;
        public override void Calculate(int index)

            int senPeriod = SenkouPeriod;
            int senPeriod2 = SenkouPeriod * HigherIchi;
            int senPeriod3 = SenkouPeriod / LowerIchi;

            IchiResult(out _calResult1, out _calResult2, ref senPeriod);
            IchiResult(out _calResult3, out _calResult4, ref senPeriod2);
            IchiResult(out _calResult5, out _calResult6, ref senPeriod3);

            double result = (_calResult1 + _calResult2) / 2;
            double result2 = (_calResult3 + _calResult4) / 2;
            double result3 = (_calResult5 + _calResult6) / 2;
            ResultP[index] = _positiveVolumeIndex.Result[index];
            ResultS1[index + SenkouP] = result;
            ResultS2[index + SenkouP] = result2;
            ResultH[index] = result3;