DYO: ATR band from Open example


Q:  How can the following formula be implemented?    Upper Band = Open + 0.30 * ATR(7)   and  Lower Band = Open - 0.3 * ATR(7)

A:  Here is a DYO that you can use with a daily chart.

Template:  1386-ATRband

Line A calculates the Average True Range for a 7 bar period ending at the prior bar.  Thus the Bar Offset is a -1.   The ATR is stored in GV [1].  

Line B stores the Open in GV [2]. 

Lines C and D implement the formula of multiplying the ATR by a number and adding the Open.  The bands are plotted using the marker in the Cyan color.

 

Template:  1386-ATRband


Last modified 8/7/08 3:46 PM