Log in to see Cloud of Tags

Wealth-Lab Wiki

ATRBandLower

RSS

Syntax

public ATRBandLower(Bars bars, DataSeries ds, int atrPeriod, double atrMult, string description) public static ATRBandLower(Bars bars, DataSeries ds, int atrPeriod, double atrMult)

Parameter Description

bars The Bars object
ds Data series to use as the center line
atrPeriod The period to smooth Average True Range
atrMult Multiple of the average true range used to determine the modified Keltner Channel bands.

Description

This technical indicator is created by plotting two bands around a user-selected data series (usually, a short-term simple moving average), also known as the center line. The upper band is created by adding a value of the average true range (ATR) to the center line. The lower band is created by subtracting a value of the ATR from the center line. See also: ATRBandUpper.

Interpretation

This indicator is similar in calculation and interpretation to Bollinger Bands.

  • There are numerous uses of this technique. One possible way is to interpret a move toward the upper band to signal an impending pull back of the price toward the moving average, and a move toward the lower band as a signal that the price may head back higher.
  • On the contrary, trend traders may treat a move beyond the bands as an increase in momentum and continuation of the trend.

Calculation

Center Line = ds

Upper Band = Center Line + atrMult times ATR(atrPeriod)

Lower Band = Center Line - atrMult times ATR(atrPeriod)

Example

using System; using System.Collections.Generic; using System.Text; using System.Drawing; using WealthLab; using WealthLab.Indicators; using Community.Indicators;

namespace WealthLab.Strategies { public class MyStrategy : WealthScript { protected override void Execute() { HideVolume(); LinearReg lr = LinearReg.Series( Close,10 ); ATRBandUpper ub = new ATRBandUpper( Bars, lr, 10, 2, "My Upper ATR Band" ); ATRBandLower lb = new ATRBandLower( Bars, lr, 10, 2, "My Lower ATR Band" ); PlotSeriesFillBand( PricePane, ub, lb, Color.Transparent, Color.FromArgb( 30, Color.Blue ), LineStyle.Solid, 1 ); for(int bar = ub.FirstValidValue; bar < Bars.Count; bar++) { if (IsLastPositionActive) { Position p = LastPosition; if ( bar+1 - p.EntryBar >= 10 ) ExitAtMarket( bar+1, p, "Timed" ); } else { if( ( CumUp.Series( High,1 )bar >= 2 ) && ( Highbar > ubbar )) ShortAtMarket( bar + 1 ); else if( ( CumDown.Series( Low,1 )bar >= 2 ) && ( Lowbar < lbbar )) BuyAtMarket( bar + 1 );

} } } } }

Important Disclaimer: The information provided by Wealth-Lab is strictly for informational purposes and is not to be construed as advice or solicitation to buy or sell any security.  The owner of Wealth-Lab.com assumes no liability resulting from the use of the material contained herein for investment purposes. By using this web site, you agree to the terms of this disclaimer and our Terms of Use.


ScrewTurn Wiki. Some of the icons created by FamFamFam.