Category Other  Published on 17/06/2021

Hull VolumeIndex

Description

 

With it's default parameters,Trend will be determinate by the TMA, WMA and HMA results

[On chart (Hull with param 50)]

Get it on the App Store Get it on the Google Play Download Trader's Way cTrader Launch Trader's Way cTrader Web

Chartshot: EURUSD, h12

18:52:45 (UTC+0) on Jun 17th, 2021

 

 


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)]
    public class HullVolumeIndex : Indicator
    {

        [Parameter("Hull Periode", Group = "Periodes Sett", DefaultValue = 100)]
        public int Per { get; set; }
        [Parameter("Weight Periode", Group = "Periodes Sett", DefaultValue = 150)]
        public int Weight { get; set; }
        [Parameter("Triangular Periode", Group = "Periodes Sett", DefaultValue = 130)]
        public int Triang { get; set; }
        [Output("Psv Index", LineColor = "#FFFF3334")]
        public IndicatorDataSeries ResultP { get; set; }
        [Output("Hull Average", LineColor = "#FF02AFF1")]
        public IndicatorDataSeries ResultH { get; set; }
        [Output("Weight Average", LineColor = "#FF65FE66")]
        public IndicatorDataSeries ResultW { get; set; }
        [Output("Triangular Average", LineColor = "#FF542478")]
        public IndicatorDataSeries ResultT { get; set; }


        private HullMovingAverage MovingAverageS;
        private WeightedMovingAverage _wma;
        private TriangularMovingAverage _tma;
        private PositiveVolumeIndex _positiveVolumeIndex;
        protected override void Initialize()
        {
            _positiveVolumeIndex = Indicators.PositiveVolumeIndex(Bars.ClosePrices);
            var averageSeries = _positiveVolumeIndex.Result;
            MovingAverageS = Indicators.HullMovingAverage(averageSeries, Per);
            _wma = Indicators.WeightedMovingAverage(averageSeries, Weight);
            _tma = Indicators.TriangularMovingAverage(averageSeries, Triang);
        }

        public override void Calculate(int index)
        {
            ResultP[index] = _positiveVolumeIndex.Result[index];
            ResultH[index] = MovingAverageS.Result[index];
            ResultW[index] = _wma.Result[index];
            ResultT[index] = _tma.Result[index];
        }
    }
}


D.
d.deel

Joined on 06.01.2021

  • Distribution: Free
  • Language: C#
  • Trading platform: cTrader Automate
  • File name: HullVolumeIndex.algo
  • Rating: 0
  • Installs: 1655
  • Modified: 13/10/2021 09:54
Comments
Log in to add a comment.
No comments found.