Category Volatility  Published on 30/06/2019

Volume Analyzer

Description

Follow my cTrader Telegram group at https://t.me/cTraderCommunity; it's a new community but it will grow fast, plus everyone can talk about cTrader indicators and algorithm without restrictions, though it is not allowed to spam commercial indicators to sell them. There's also a Discord Server now @ https://discord.gg/5GAPMtp

This indicator is a conversion for "Hidden Gap's VSA" from tradingview.

I'm not sure about the original author since it seems that many versions are avaiable online.

This indicator analyzes volumes by color coding them in respect to theri momentum.

HH, LL Small and LL Big are three ranges, the HH is used to put in comparison the current volume to the Highest Volume of the last HH periods, LL Small and LL Big are two ranges for the Lowest Volumes where, obviously, LL Big is a larger range than LL Small.

For any bug report or suggestion, contact me by joining the group linked above, or just comment below


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 HGVSAV : Indicator
    {
        [Parameter("HH Length", DefaultValue = 40)]
        public int perhh { get; set; }
        [Parameter("LL Small Length", DefaultValue = 2)]
        public int perlls { get; set; }
        [Parameter("LL Big Length", DefaultValue = 20)]
        public int perllb { get; set; }
        [Parameter("MA Length", DefaultValue = 20)]
        public int perma { get; set; }

        [Output("Main", LineColor = "Black", Thickness = 0, PlotType = PlotType.Points)]
        public IndicatorDataSeries Result { get; set; }
        [Output("Vol sma", LineColor = "Orange")]
        public IndicatorDataSeries sma { get; set; }

        private SimpleMovingAverage smaVol;
        private IndicatorDataSeries hhvol, llsvol, llbvol;

        protected override void Initialize()
        {
            IndicatorArea.DrawHorizontalLine("0", 0, Color.Gray);
            smaVol = Indicators.SimpleMovingAverage(MarketSeries.TickVolume, perma);

            hhvol = CreateDataSeries();
            llsvol = CreateDataSeries();
            llbvol = CreateDataSeries();
        }

        public override void Calculate(int index)
        {
            hhvol[index] = MarketSeries.TickVolume.Maximum(perhh);
            llsvol[index] = MarketSeries.TickVolume.Minimum(perlls);
            llbvol[index] = MarketSeries.TickVolume.Minimum(perllb);

            Color color;

            double volume = MarketSeries.TickVolume[index];
            color = volume > hhvol[index - 1] ? Color.White : volume < llbvol[index - 1] ? Color.DarkGray : volume < llsvol[index - 1] ? Color.Gray : volume > MarketSeries.TickVolume[index - 1] ? Color.Orange : volume < MarketSeries.TickVolume[index - 1] ? Color.Red : Color.Black;
            IndicatorArea.DrawTrendLine("_Volume" + index, index, 0, index, volume, color, 3);
            Result[index] = volume;
            sma[index] = smaVol.Result[index];
        }
    }
}


CY
cysecsbin.01

Joined on 10.11.2018 Blocked

  • Distribution: Free
  • Language: C#
  • Trading platform: cTrader Automate
  • File name: Hidden Gap's VSA Volume.algo
  • Rating: 5
  • Installs: 4794
  • Modified: 13/10/2021 09:54
Comments
Log in to add a comment.
VE
venomdoli4 · 1 year ago

Get now free Fortnite account tips  easiest way to get free fortnite accounts thanks for visit on this website.

AL
alexsanramon · 5 years ago

Let us all join his Discord group.