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
- Weakness in the market is indicated when AroonDown remains between 0 and 30 for an extended period of time. If AroonDown and AroonUp follow similar movement patterns, this is a sign of consolidation. Finally, AroonDown crossing below AroonUp is considered a bearish sign.
- When AroonUp is at 100, a new uptrend may have begun. If it remains persistently between 70 and 100, and the AroonDown remain between 0 and 30, then a new uptrend is underway. If AroonUp dips below 50 then the trend as lost momentum.
- When AroonDown is at 100, a new downtrend may have begun. If it remains persistently between 70 and 100, and the AroonUp remain between 0 and 30, then a new downtrend is underway. If AroonDown dips below 50 then the trend as lost momentum.
- Trading ranges and consolidation. When AroonUp and AroonDown move in parallel (horizontal, sloping up or down) with each other at roughly the same level, then price is range trading or consolidating.
- New Trend, if the AroonUp crosses above the AroonDown, then a new uptrend may soon start. Conversely, if AroonDown crosses above the AroonUp, then a new downtrend may soon start.
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) );
}
}
}
}