KeyReversalDown
Previous Topic  Next Topic 

Definition
Returns a value of 1 when the current close is less than the prior close and the current high has penetrated the highest high of the last n bars.

Syntax
KeyReversalDown(int period)
KeyReversalDown(IDataSeries inputData, int period)

Returns default value
KeyReversalDown(int period)[int barsAgo]
KeyReversalDown(IDataSeries inputData, int period)[int barsAgo]


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


Parameters

period

The number of bars to include in the calculation

inputData

Indicator source data (?)


Examples

protected override void OnBarUpdate()
{
    // If we get a reversal over the past 10 bars go short
    if (KeyReversalDown(10)[0] == 1)
        EnterShort();
}


Source Code
You can open up the indicator source code via the NinjaScript Editor.