Price Oscillator

Description

This indicator is based on the difference between two moving averages. The difference is measured in absolute values, not in percentages.

Usage

PriceOscillator(int fast, int slow, int smooth)
PriceOscillator(IDataSeries inSeries, int fast, int slow, int smooth)
PriceOscillator(int fast, int slow, int smooth)[int barsAgo]
PriceOscillator(IDataSeries inSeries, int fast, int slow, int smooth)[int barsAgo]

Return value

double

When using this method with an index (e.g. PriceOscillator(12,26,9)[int barsAgo] ), the value of the indicator will be issued for the referenced bar.

Parameters

inSeries Input data series for the indicator

fast Number of bars used for the calculation of the fast EMA

slow Number of bars used for the calculation of the slow EMA

smooth Number of bars used for the calculation of the EMA signal line

Visualization

Example

//Output for the value of the price oscillator
Print("The current value for the PPO is " + PriceOscillator(12, 26, 9)[0]);
//Output for the value of the smooth price oscillator
Print("The current value for the smooth is " + PriceOscillator(12, 26, 9).Smoothed[0]);

Last updated