cQ-Indicators
Home MT4 Indicators MT4 Interface Improvements Contact
cQ-DATR Volume MT4 Indicator v3.3 Updated (March 2024)

 

Requirements
MT4 - MetaTrader 4
Version 4.00 Build 1360 or greater

March 25, 2024
Download cQ-DATR Volume v3.3 Indicator for MT4
(not compatible with earlier versions, earlier versions below)

Overview

If you are new to this indicator, the above video has a short intro on this current update then will play the v3.2 (previous version) video. See below for a text description of the indicator.

This is an update to the cQ-DATR Volume indicator's algorithm. It responds differently than that of the earlier versions. The indicator will still read presets created in v3.2 but they will display differently.

This update should give you better entries. Your older preset will very likely have to be changed.

Here is the update to the code:

cQ-DATR Volume Indicator v3.2
cQ-DATR Volumes v3.2 Main Chart

Requirements
MT4 - MetaTrader 4
Version 4.00 Build 1360 or greater

February 16, 2024
Download cQ-DATR Volume v3.2 Indicator for MT4
(not compatible with earlier versions, earlier versions below)

Overview

The cQ-DATR Volume indicator is as you would expect a volume indicator. If there is enough up volume then a blue bar is drawn, and if there is enough down volume then an orange bar is drawn. If there isn't enough volume then a darker blue and darker orange color is drawn. The indicator is similar in design to the W.A.E. volume indictor but does not use the MACD. In place of the MACD the DATR is used, that is the Directional Average True Range.

If the candle's close is greater than it's open then it is used for the Up ATR, and if the close is less than the open it's used for the Down ATR. The price data is then input in to a moving average which outputs the DATR. If the Up DATR is greater than the Down DATR, then the Up DATR is used and vice-versa.

The DATR can use a number of different moving average types. This offers a greater range of possibilities. Many of which respond differently than simply using a longer/shorter time period on the SMA.

cQ-DATR Volume v3.2 Input VariablesThis version is different than previous version with the addition of using the slope of a moving average to act as noise reduction. If the slope is less than the selected amount, set by the DATR Slope Noise Reduction ATR varables, the opposite DATR input (UP or DOWN) is sent the negated DATR Slope Noise Reduction ATR value. This reduces the amount of noise and allows only the more significant volume changes to be used.

The rest of the indicator is the same as that described below.

cQ-DATR Volume MT4 Indicator v3.0

Requirements
MT4 - MetaTrader 4
Version 4.00 Build 1360 or greater

November 30, 2023
Download cQ-DATR Volume v3.0 Indicator for MT4
(not compatible with earlier versions, earlier versions below)

Overview

The cQ-DATR Volume indicator is as you would expect a volume indicator. If there is enough up volume then a blue bar is drawn, and if there is enough down volume then an orange bar is drawn. If there isn't enough volume then a darker blue and darker orange color is drawn.

DATR Moving Averages & Level Detection

cQ-DATR Volume v3.0 DATR ParametersThis version is different than previous version with the addition of using standard deviation and threshold parameters for level detection. This determines if the current candle should be allowed to enter the DATR, else a zero is used. The location in the algorithm of this detection module has been moved to after the directional input module of the DATR (See code below).

Generic C Code of the DATR Volume Indicator

Below is the 'C' code for the indicator. This is for version 3.0 as future version will probably change. The ATR is calculated first. It will be described further down. Next the directional part of the DATR is calculated. The current price (close) has to move further than the previous close ± the Candle Distance (an ATR value). If it doesn't move far enough then a 0.0 is entered into both the UpBuf[i] and DownBuf[i], else if it's greater than the close[i]+CandleDistanceMultiplier then it's entered into the UpBuf[i] and a 0.0 is entered into the DownBuf[i].

Next is the DATR Level Detection module. Here the Threshold value is calculation using the ATR. Next the Standard Deviation of the current UpBuf[i] is calculated. The Threshold is the level the DATR Up value has to be greater than to be entered into the DATR's Up buffer. The same thing is tested for the DownBuf[i].

The Maximum Candle Height (Maximum DATR Height) is then calculated using an ATR value. If it's greater than this value then the UpBuf[i] is set to this value. This helps to reduce the effect of large candles on the DATR. Again the same is done to the DownBuf[i].

Finally both the UpBuf[i] and DownBuf[i] are smoothed using the selected moving average.

ATR Calculation

cQ-DATR Volume v3.0 ATR Calculation Moving Average TypescQ-DATR Volume v3.0 ATR CalculationIn edition to the input level detection the traditional ATR has been replaced with one that can use a number of different moving averages as well as input types. This ATR setting is used to calculate all ATR values in the indicator.

For normal ATR calculation the SMA is use as is the high[i]-low[i]. You can also select from abs(open[i]-close[i]) or abs(price[i]-price[i+1]). Both of these offer a wider range of indicator responses.

The USE_APPLIED_PRICE uses the mladen getPrice() which offers a number of different price constants. The difference between the current price constant and previous price constant is used in place of the high[i]-low[i] or abs(open[i]-close[i]).

 

The Bands

The Bands are calculated using the DATRUp[i] & DATRDown[i] values. They are either a moving average or a Standard Deviation of these values. You can select from a number of moving averages to use as either the moving average or the standard deviation.

Using a Single Channel mode the DATRUp[i] is added to the DATRDown[i] before they are smoothed by the moving average or standard deviation.

There are 4 Bands modes to select from. cQ-DATR Volume v3.0 Band Modes

  • Standard Deviation Single
  • Standard Deviation Dual
  • Moving Average Single
  • Moving Average Dual

The easiest to use is the dual moving average mode. Depending upon the moving average selected you may need to increase the BANDS Deviation/Multiplier value to be comparable to the Moving Average modes. The Standard Deviation modes use the same moving average in the calculation as the moving average modes. You have a large selection of moving average types to choose from. You can reverse or swap the Bands by setting the BANDS Swap Channels to YES. This sometimes helps if you are having trouble finding a good setting.

The MINIMUM ATR LEVEL

The MINIMUM ATR LEVEL is made up of 2 ATRs. Each ATR has it's own Moving Average type, Period, and Multiplier. The ATR values use the DATRUp and DATRDown values for it's calculation.

The first one can be used to raise the ATR to eliminate the noise, but it can also be used in conjunction with the Inverted ATR. The Inverted ATR is subtracted from the first ATR level to allow for it to response to DATR changes. Using a larger period on the first ATR and a smaller period on the Inverted ATR allow you to remove the low level noise as well as a certain amount of sideways price action.

cQ-DATR Volume v3.0 Dialog Box
cQ-DATR Volume MT4 Indicator v2.23 and Before

cQ-DATR Volume  main screen

 

 

 

 

 

Requirements
MT4 - MetaTrader 4
Version 4.00 Build 1360 or greater

November 30, 2023 - Updated to v2.32 (fixed memory problem)
Download cQ-DATR Volume v2.32 Indicator for MT4 (not compatible with earlier versions)
See Changes described below

November 30, 2023 - Updated to v2.23 (fixed memory problem)
Download cQ-DATR Volume v2.23 Indicator for MT4 (not compatible with v2.0 & v2.1)
Added 4 parameters described below

November 30, 2023 - Updated to v2.11 (fixed memory problem)
Download cQ-DATR Volume v2.11 Indicator for MT4
(this indicator used to be called cQ-Volume DATR)

Overview

The cQ-DATR Volume indicator is as you would expect a volume indicator. If there is enough up volume then a blue bar is drawn, while if there is enough down volume then an orange bar is drawn. If there isn't enough volume then a darker blue and darker orange color is drawn.

The indicator is similar in design to the W.A.E. volume indictor but does not use the MACD. In place of the MACD the DATR is used, that is the Directional Average True Range. If the candle's close is greater than it's open then it is used for the Up ATR, and if the close is less than the open it's used for the Down ATR. The price data is then input in to a moving average which outputs the DATR. If the Up DATR is greater than the Down DATR, then the Up DATR is used and vice-versa.

Version 2.0 of this indicator uses a different price input filter to the DATR. It can be disabled by setting both the Distance ATR Multipliers to 0.0. Where the previous version used 1 distance filter this one uses two. It also subtracts the input*CandleDistanceMultiplier of the opposite direction. This allows the DATR to return to zero faster.

There are 4 Band modes that generate one or two trigger lines:

  1. StdDev Single Channel
  2. StdDev Dual Channel
  3. Moving Average Single Channel
  4. Moving Average Dual Channel

Both the Up and Down DATR are used to generate the trigger lines. The DATRUp and DATRDown values are tested for the larger value with the smaller value being set to zero as shown below. The StdDev Single Channel input uses the sum of both the Up and Down DATR. The StdDev Dual Channel is the StdDev of the Up and Down DATR. The Moving Average Single and Dual Channels are simply the DATR smoothed by a moving average, either the sum of both or each individually.

The MINIMUM ATR Level can be used to help reduce the noise when price is going sideways. The histogram will turn a darker color when current DATR Volume is below this level. It uses two different ATR settings, one longer and the other shorter, to modulate the level. The longer/larger setting is used to keep the level above the noise while the shorter level is SUBTRACTED from the longer/larger level thus lowering its level to the point of triggering a brighter blue or orange bar to be drawn.

It is calculated using the current value used to calculate the DATR, the high-low, fabs(open-close), or the fabs(close[i]-close[i+1]). This value is then smoothed by either an SMA, EMA, SMMA, or LWMA. If the DATR Input is set to high-low and the MINIMUM ATR Level Mode is set to SMA it is the same thing as the ATR. Changing the DATR Input Mode setting from high-low to fabs(open-close) will require the MINIMUM ATR Level Mulitiplier to be increased. So this isn't exactly two ATR values.

The above download (zip file) contains this indicator and a No-Parameters version. The parameters version will save the indicator's current settings to a file. This file is read by the No-Parameters version where the saved parameters used by the indicator. The No-Parameters version only has one parameter which is the preset filename. Here you would put the previously saved parameters created when using the Parameters version. This will allow you to use the No-Parameters version in an expert advisor without the need to pass all the parameters (see dialogbox image below). When used in an expert advisor the No-Parameters version parameters are loaded one time when the indicator is initalized. You only need to call the iCustom("cQ-DATR Volume",Buffer#,Candle#) to retrive the indicator's output.

You can access the saved parameter files by opening the Open Data Folder and going to the cQ-DATR Voume folder: MT4HASH# -> MQL4 -> Files -> cQ-Indicators -> cQ-DATR Volume 2.0. Here you will find the saved parameter files. It is a good idea to save an MT4 Preset of settings just in case you over-write the cQ-DATR Volume Parameters file.

cQ-DATR Volume Files Location

October 31, 2023 Version 2.2 Update - Starting in v2.2 I added 4 new parameters and increased the number of moving averages which can be used to calculate the MINIMUM ATR LEVEL from 4 to 35. Because of this the "No Parameters" indicators are unable to read the v2.0 or v2.1 created preset files (*.bin). They are however able to read the MT4 presets created by the indicator (Load & Save buttons). You can save your v2.0 and v2.1 to an MT4 preset and then load them into the v2.2 indicators which will create a *.bin preset file that the v2.2 "No Parameters" indicator can read.

The DATR Threshold ATR parameter operates on price data before the DATR. The parameter controls the level at which price date enters the DATR. If the current input cQ-DATR Volume v2.2 threshold parameters(high[i]-low[i],fabs(open-close), or fabs(close[i]-close[i+1])) is less than the DATR Threshold ATR value a 0.0 is used for the input value. If the current input is greater than this value then the value is entered. When in use it effects the DATR by turning more of the blue and orange histogram bars to darker colors. It has a similar effect to DATR Larger Distance and DATR Smaller Distance parameters, but is more selective.

The BANDS Zero Opposite DATR Input and BANDS Zero Opposite BAND Output parameters operate on the BANDS. The DATR output is fed into the input of the BANDS (which is either a smoothing moving cQ-DATR Volume v2.2 BANDS Zero Opposite BAND Outputaverage or standard deviation). At the DATR output, if the DATR Up value is greater than the DATR Down value the DATR Down value is set to 0.0 and vice-versa. The BANDS Zero Opposite BAND Output does a similar thing to the BANDS output values. If the BANDS Up value is greater than the BANDS Down value then the BANDS Down value is set to 0.0. This will cause the bands to be closer to the zero line level instead of floating above it. When set to 'YES' you will get more Brighter Histogram Colors (Enough Volume is present).

November 16, 2023 Version 2.3 Update - The DATR Input Mode has been removed and a new OUTPUT Mode has been added. Also the pre-filters used before the DATR have been changed, and it responds differently now. This is the main reason v2.3 isn't compatible with earlier versions. It should however be easier to use and give more usable results. Another OUTPUT Mode called Darker Bar When Decreasing has been added. In this mode if the current Histogram Bar has enough volume (brighter color) and the next Histogram bar is less than the current one, the next bar will be drawn in a darker color. See image below.

cQ-DATR Volume v2.3 Darker When Decreasing Mode

When price is below the Bands it will be drawn in a more darker color. The EA buffer have changed to 9.

cQ-DATR Volume v2.3 Expert advisor buffers

cQ-DATR Volume  dialogbox