Aroon Oscillator

View as Markdown

Description

A trend-following indicator that uses aspects of the Aroon indicator (“Aroon up” and “Aroon down”) to gauge the strength of a current trend and the likelihood that it will continue. The Aroon oscillator is calculated by subtracting Aroon down from Aroon up. Readings above zero indicate that an uptrend is present, while readings below zero indicate that a downtrend is present.

Courtesy of Investopedia

Syntax

AroonOscillator(int period)

AroonOscillator(ISeries\<double\> input, int period)

Returns default value

AroonOscillator(int period)[int barsAgo]

AroonOscillator(ISeries\<double\> input, int period)[int barsAgo]

Return Value

double; Accessing this method via an index value [int barsAgo] returns the indicator value of the referenced bar.

Parameters

ParameterDescription
inputIndicator source data
periodNumber of bars used in the calculation

Examples

1// Prints the current values of a 20 period AroonOscillator using default price type
2double upValue = AroonOscillator(20)[0];
3Print("The current AroonOscillator value is " + upValue.ToString());
4
5// Prints the current values of a 20 period AroonOscillator using high price type
6double upValue = AroonOscillator(High, 20)[0];
7Print("The current AroonOscillator value is " + upValue.ToString());

Source Code

You can view this indicator method source code by selecting the menu New > NinjaScript Editor > Indicators within the NinjaTrader Control Center window.