Forecast  Oscillator (FOSC)
Previous Topic  Next Topic 

Definition

Courtesy of FM Labs.

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

Returns default value
FOSC(int period)[int barsAgo]
FOSC(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

// OnBarUpdate method
protected override void OnBarUpdate()
{
    // Checks if the current bar FOCS is above zero
    if (FOSC(14)[0] > 0)
        Print("FOSC is above zero indicating prices may rise");
}


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