Activity based Volume free

by Elogos in category Other at 28/11/2014
Description

This indicator is an alternative view of volume.

It removes the width of the candle high-low in ticks from the volume.

It really emphasises the volume in a number of circumstances and can in some instances highlight areas of deep buying and selling over the standard volume indication. The difference is minor in most cases, but in lower time frames it really shines.

 

 

 

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;

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

        [Output("Greater", PlotType = PlotType.Histogram)]
        public IndicatorDataSeries GreaterVolume { get; set; }

        [Output("Lesser", PlotType = PlotType.Histogram)]
        public IndicatorDataSeries LesserVolume { get; set; }

        protected override void Initialize()
        {
            // Initialize and create nested indicators
        }

        public override void Calculate(int index)
        {
            double pVolume = MarketSeries.TickVolume[index - 1] - ((MarketSeries.High[index - 1] - MarketSeries.Low[index - 1]) / Symbol.TickSize);
            double cVolume = MarketSeries.TickVolume[index] - ((MarketSeries.High[index] - MarketSeries.Low[index]) / Symbol.TickSize);


            if (cVolume > pVolume)
            {
                GreaterVolume[index] = cVolume;
                LesserVolume[index] = 0;
            }
            if (cVolume < pVolume)
            {
                LesserVolume[index] = cVolume;
                GreaterVolume[index] = 0;
            }
            if (cVolume == pVolume)
            {
                if (LesserVolume[index - 1] == 0)
                    GreaterVolume[index] = cVolume;
                if (GreaterVolume[index - 1] == 0)
                    LesserVolume[index] = cVolume;
            }



        }
    }
}
Comments
5