Cumulative Delta MT5
The indicator analyzes the volume scale and splits it into two components - seller volumes and buyer volumes, and also calculates the delta and cumulative delta.
The indicator does not flicker or redraw, its calculation and plotting are performed fairly quickly, while using the data from the smaller (relative to the current) periods.
The indicator operation modes can be switched using the Mode input variable:
- Buy - display only the buyer volumes.
- Sell - display only the seller volumes.
- BuySell - display only the buyer and seller volumes in two separate scales.
- Delta - the mode of difference (delta) between the buyer volumes and seller volumes.
- CumDelta - cumulative delta mode.
- CumDeltaDaily - cumulative delta mode with zeroing the balance at the beginning of each day.
- CumDeltaWeekly - cumulative delta mode with zeroing the balance at the beginning of each week.
- DemandAndSupply - display the supply and demand diagram.
Full recalculation of data is performed once per minute, when a new candle opens on the M1 timeframe, or in case of a user activity, namely, when scrolling the chart deeper into the history, when changing the time scale of the chart or when changing the current timeframe.
By default, the initial reference point is the very first candle from the left border of the chart window. The reference point can be changed using the BarsLimit input variable.
The indicator works with both real volumes and tick volumes. The required scale can be selected in the indicator properties using the Volumes input variable, which sets the Tick or Real modes.
In case the data from any of the volume scales or the data on any of the periods required in calculations is missing, the indicator generates a corresponding message.
A full recalculation (in any mode) the indicator still performs once a minute, at the moment when a new candle appears on the M1 timeframe, and regardless of which timeframe is selected in the input variable Timeframe.
Using the input variable DsSmoothing user can enable or disable curves smoothing for the DemandAndSupply and DemandAndSupplyRatio modes.
Using the input variable DsPeriod user can set the period (if the value is zero, the period is assigned automatically) for calculating curves for the DemandAndSupply and DemandAndSupplyRatio modes.
UpOnly - the columns of the histogram are directed only upwards, regardless of the delta sign.
UpAndDown - the columns of the histogram are directed depending on the delta sign.
Alerts are triggered when the levels AlertLevelForDemand and AlertLevelForSupply are reached by the value on the current candle.
The green line shows demand, the red line shows supply.
The mode can be additionally managed using the DsContrast input variable:
DsContrast = 0 - no candlestick coloring,
DsContrast > 1 - coloring candlesticks,
DsContrast < -1 - reverse coloring.