ATR Bands

Going all the way back until the famous turtle trading systems, ATR has always been an important measurement for volatility in the markets. ATR’s are still used for exits in trading systems and sometimes for pre trade risk assessment.

hm202301-2

I have created two more indicators around ATR that are discussed in this article.

ATR Bands

Just like the Bollinger Bands I am using a simple 21 period moving average to smooth out the market movements. Instead of Standard Deviation, I am adding and subtracting one and two times the value of a 10 period ATR.

The length of the MA, the period for the ATR as well as the factors for the two bands can be changed as parameters.

Code:

MA:   MA(@,Sim,period)
HT1: (MA(@,Sim,period)+ATR(@,Sim,periodATR)*factor1)
HT2: (MA(@,Sim,period)+ATR(@,Sim,periodATR)*factor2)
LT1: (MA(@,Sim,period)- ATR(@,Sim,periodATR)*factor1)
LT2: (MA(@,Sim,period)- ATR(@,Sim,periodATR)*factor1)

hm202301-3

If the candles are away from center MA and move between the first and the second band – sometimes even beyond the second band – that is an indication of a strong trend.

ATR Index

hm202301-4

ATR Index is measuring the percentage of highs and lows, over a period of bars being outside the first and outside the second band. Pars are the same as ATR Band plus the sum.

hm202301-5

Sample Code:

hm202301-6

hm202301-7

For example: for a lookback period of 10 bars, 100% of the highs have been above the first band and 40% of the bars (4) have been above the second band.

If you measure this over a long period of bars, it seems to become very smooth and does not mark significant events anymore. Stay on small sample size (sum)!

hm202301-8

For all the users that are enabled for back testing, you could use these indicators for building trading systems as well.

hm202301-9

In this case I am initiating a trade when I have a turn away from a 100% reading.

Download the PAC file ‌‍‍‍‍


Learn more from CQG HTML Help