cQ-Indicators
cQ-Indicators Home cQ-Indicators MT4 Indicators cQ-Indicators MT4 Interface Improvements Contact
cQ-DATR and cQ-ATR MT4 Indicators


As an Amazon Associate, I earn from qualifying purchases.

cQ-DATR and cQ-ATR mainscreen MT4 Indicator

Requirements
MT4 - MetaTrader 4
Version 4.00 Build 1360 or greater

Sept 5, 2023

Download the cQ-DATR and cQ-ATR Indicators v1.0

Overview

The cQ-DATR and cQ-ATR indicators can be used as you would any ATR. Both could also be used as a confirmation or exit indicator as well. I haven't tried it for calculating stops and targets.

The cQ-DATR is very similar to the cQ-Momentum indicator but this is ATR and not momentum. There are two ATRs, one for UP and the other for DOWN (hence the word 'Directional' ATR). It has two input modes: the normal High-Low and the Abs(Open-Close). The High-Low mode is more inclusive of volatility. The basic idea of the Directional ATR is if the close is greater than the open then the high-low goes in the UpBuffer and 0.0 goes in the DownBuffer. If the close is less than the open then the high-low goes in the DownBuffer and the UpBuffer is 0.0. This is why the DATR reacts faster than the ATR.

If the DATR Up value is increasing then a Brighter Blue color is drawn. If it is decreasing then a Darker Blue color is drawn. If the DATR Up value hasn't change enough then a Gray color is drawn. If the DATR Down value is increasing then a Brighter Orange color is drawn. If it is decreasing then a Darker Orange (Brown) color is drawn. If the DATR Down value hasn't change enough then a Gray color is drawn.

There are a two input filters applied before the DATR is calculated: the first is the Candle Distance (an ATR value) and the second is the Candle Max Height (also an ATR value). The Candle Distance is used to reduce the amount of lesser price action from entering the DATR. If the Price hasn't moved enough then set it to zero. The Candle Max Height limits the height of the candle, either high-low or Abs(open-close), from entering the DATR. This helps reduce the effect large candles have on the DATR. It does this like this:

Input = high[i]-low[i] or fabs(open[i]-close[i])
CMaxHeight = iATR(NULL,0,CMaxHeightPeriod,i)*CMaxHeightMultiplier
if(Input> cMaxHeight)
   Input = cMaxHeight

CDATR = iATR(NULL,0,CandleDistancePeriod,i)*CandleDistanceMultiplier
if(close[i] > open[i] && close[i] > open[i+1]+CandleDistance
{
   UpBuffer[i] = Input
   DownBuffer[i] = 0.0
}
else if(close[i] < open[i] && close[i] < open[i+1]-CandleDistance
{
   UpBuffer[i] = 0.0
   DownBuffer[i] = Input
}

DATRUpBuf[i] = iMAOnArray(UpBuffer,0,DATRPeriod,DATRMode,i);
DATRDownBuf[i] = iMAOnArray(DownBuffer,0,DATRPeriod,DATRMode,i);

There is one post DATR calculation filter and that is Slope. The Slope is an ATR value that is used to signify when the DATR hasn't change enough to print a Brighter color. It does this by making the output line (either Up or Down DATR) a Gray color.

Slope = DATRUpBuf[i]-DATRUpBuf[i+1]
ATRSlope = iATR(NULL,0,ATRSlopePeriod,i)*ATRSlopeMultiplier
if(Slope > ATRSlope)
   DATRUpOutputBuf[i] = Blue
else if(Slope < 0.0)
   DATRUpOutputBuf[i] = DarkerBlue
else //if(Slope == 0.0)
   DATRUpOutputBuf[i] = Gray

Here are the expert advisor buffer numbers:

cQ-DATR Expert Advisor Numbers
cQ-ATR Expert Advisor Buffer numbers

cQ-DATR MT4 Indicator different settings
cQ-DATR MT4 Indicator different settings

 

cQ-DATR Dialog Box
cQ-ATR Dialog Box