Description
The Accumulation Volume RVI is a custom indicator, and its result is the identification of price impulses based on the accumulation of price volume.
In its content, this indicator incorporates the algorithm of the Relative Vigor Index to identify price impulses.
Use this indicator during positive values for trading with impulses. For negative values, consider it for identifying the range of price values.
using System;
using cAlgo.API;
using cAlgo.API.Internals;
using cAlgo.API.Indicators;
using cAlgo.Indicators;
namespace cAlgo
{
[Cloud("Volume Accumulation", "Levelzero", FirstColor = "ForestGreen", SecondColor = "Orange", Opacity = 0.3)]
[Levels(0)]
[Indicator(IsOverlay = false, AccessRights = AccessRights.None, AutoRescale = true)]
public class mAccumulationVolumeRVI : Indicator
{
[Output("Volume Accumulation", LineColor = "Black", LineStyle = LineStyle.Solid, Thickness = 1)]
public IndicatorDataSeries outVolumeAccumulation { get; set; }
[Output("Levelzero", LineColor = "Transparent", PlotType = PlotType.Line, Thickness = 1)]
public IndicatorDataSeries outLevelZero { get; set; }
private IndicatorDataSeries _openclose, _volumeaccumulation;
protected override void Initialize()
{
_openclose = CreateDataSeries();
_volumeaccumulation = CreateDataSeries();
}
public override void Calculate(int i)
{
_openclose[i] = ((Bars.ClosePrices[i] - Bars.OpenPrices[i]) + 2 * (Bars.ClosePrices[i-1] - Bars.OpenPrices[i-1]) + 2 * (Bars.ClosePrices[i-2] - Bars.OpenPrices[i-2]) + (Bars.ClosePrices[i-3] - Bars.OpenPrices[i-3])) / 6;
_volumeaccumulation[i] = (Bars.HighPrices[i] - Bars.LowPrices[i] !=0 ? _openclose[i] * ( 2 * Bars.ClosePrices[i] - Bars.HighPrices[i] - Bars.LowPrices[i]) / (Bars.HighPrices[i] - Bars.LowPrices[i]) : 0);
outVolumeAccumulation[i] = _volumeaccumulation[i];
outLevelZero[i] = 0;
}
}
}
mfejza
Joined on 25.01.2022
- Distribution: Free
- Language: C#
- Trading platform: cTrader Automate
- File name: mAccumulationVolumeRVI.algo
- Rating: 5
- Installs: 380
- Modified: 20/11/2023 13:47
Note that publishing copyrighted material is strictly prohibited. If you believe there is copyrighted material in this section, please use the Copyright Infringement Notification form to submit a claim.
Comments
Log in to add a comment.
No comments found.