Tick Volume with Moving Averages free

by TraderExperto in category Other at 30/09/2020
Description

This is a Simple Tick Volume with Already Implemented Moving Average of Your Choice.

You can choose between as many Moving Averages Algos as you want. Like Exponential, Simple, Weighted and etc.

Para os que querem participar de um Grupo dedicado ao CTrader no Telegram para falar sobre estratégias, desenvolvimento de indicadores na Plataforma e muito mais. Aqui segue o link

You can find me by joyining this Telegram Group http://t.me/cTraderCoders

Grupo de Telegram Para Brasileiros, Portugueses e todos aqueles que falam portugues:http://t.me/ComunidadeCtrader

Grupo CTrader en Español para Latinos:  http://t.me/ComunidadCtrader

 

 

 

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 TickVolumeMA : Indicator
    {
        [Parameter(DefaultValue = 40)]
        public int Parameter { get; set; }

        [Parameter(DefaultValue = MovingAverageType.Simple)]
        public MovingAverageType Matype { get; set; }

        [Output("MA Volume", LineColor = "Gold")]
        public IndicatorDataSeries MaVol { get; set; }

        [Output("UpVolume", LineColor = "E000FCFF", PlotType = PlotType.Histogram, Thickness = 5)]
        public IndicatorDataSeries UpVolume { get; set; }

        [Output("DownVolume", LineColor = "D4FE0000", PlotType = PlotType.Histogram, Thickness = 5)]
        public IndicatorDataSeries DownVolume { get; set; }

        private MovingAverage ma;

        protected override void Initialize()
        {
            ma = Indicators.MovingAverage(Bars.TickVolumes, Parameter, Matype);
        }

        public override void Calculate(int index)
        {
            if (Bars.OpenPrices[index] <= Bars.ClosePrices[index])
            {
                UpVolume[index] = Bars.TickVolumes[index];
                DownVolume[index] = 0.0;
            }
            else
            {
                DownVolume[index] = Bars.TickVolumes[index];
                UpVolume[index] = 0.0;
            }
            MaVol[index] = ma.Result[index];
        }
    }
}
Comments

sejdinimarkelian - November 18, 2020 @ 23:50

thanks alot man , very clean and simple super useful , good job

mkelechm - May 13, 2021 @ 18:30

hey, i did download indicator but it doesn't appear as downloaded....stays on the list of indicators from ctrader.com

5