Hull VolumeIndex free

by d.deel in category Other at 10/04/2021
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

 

 

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)]
    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];
        }
    }
}
Comments
0