Category Other  Published on 31/05/2023

Up and Down TICK

Description

Thats all it is but you can see whats going on.

 


using System;
using cAlgo.API;
using cAlgo.API.Indicators;

namespace cAlgo.Indicators
{
    [Indicator(IsOverlay = false, AccessRights = AccessRights.None)]
    public class UpDownTick : Indicator
    {
        [Output("Up Volume", LineColor = "FFFFFF00", PlotType = PlotType.Histogram, Thickness = 3)]
        public IndicatorDataSeries UpVolume { get; set; }

        [Output("Down Volume", LineColor = "FFAA00FF", PlotType = PlotType.Histogram, Thickness = 1)]
        public IndicatorDataSeries DownVolume { get; set; }
        
        public override void Calculate(int index)
        
        {
            
            if (Bars.ClosePrices[index] >= Bars.OpenPrices[index])
            {
                UpVolume[index] = Bars.TickVolumes[index] ;
            }
            if (Bars.ClosePrices[index] <= Bars.OpenPrices[index])
            {
                DownVolume[index] = Bars.TickVolumes[index] ;
            }
        }
    }
}


VE
VEI5S6C4OUNT0

Joined on 06.12.2022

  • Distribution: Free
  • Language: C#
  • Trading platform: cTrader Automate
  • File name: UpDownTick.algo
  • Rating: 5
  • Installs: 670
  • Modified: 31/05/2023 12:34
Comments
Log in to add a comment.
No comments found.