AroonDown

Modified on 2008/04/13 15:01 by Administrator — Categorized as: Standard Indicators

Syntax

public AroonDown(WealthLab.DataSeries source, int period, string description) public static AroonDown Series(WealthLab.DataSeries source, int period) public static double Value(int bar, WealthLab.DataSeries source, int period)

Parameter Description

source Price series
Period Indicator calculation period

Description

The Aroon indicator developed by Tushar Chande, indicates if a price is trending or in range trading. It can also reveal the beginning of a new trend, its strength and also allows you to anticipate changes from trading ranges to trends. AroonDown and the AroonUp indicators are used together and combined are called the Aroon indicator.

AroonUp measures how long it has been since prices have recorded a new high within the specified period. If the current price is higher then the user defined number of periods before it, then the AroonUp value is %100. In other words, it's a new high for that period. If a new low occurred during the period then AroonDown will be zero. Otherwise it returns a percent valve indicating the time since the new high occurred.

AroonDown measures how long it has been since prices have recorded a new low within the specified period. If the current price is lower then the user defined number of periods before it, then the AroonDown value is %100. In other words, it's a new low for that period. If a new high occurred during the period then AroonDown will be zero. Otherwise it returns a percent valve indicating the time since the new low occurred.

Another indicator, the Aroon Oscillator, can be constructed by subtracting AroonDown from AroonUp.

Interpretation


Calculation

AroonUp: 100 * ( n - ( Num. of bars since highest high in the last n periods ) )/ n

AroonDown: 100 * ( n - ( Num. of bars since lowest low in the last n periods ) )/ n

n = number of periods or bars

Example

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

namespace WealthLab.Strategies { public class MyStrategy : WealthScript { protected override void Execute() { for(int bar = 20; bar < Bars.Count; bar++) { // Flag Bearish Aroon Crossovers

if( CrossUnder( bar, AroonDown.Series( Close, 20 ), AroonUp.Series( Close, 20 ) ) ) SetBackgroundColor( bar, Color.FromArgb(255, 227, 231) ); } } } }