| Overloads | |
|---|---|
| Apo(int, int, double[], int, int, MAType) | Calculates the Absolute Price Oscillator (APO) which shows the difference between two moving averages. |
| Apo(int, int, float[], int, int, MAType) | Calculates the Absolute Price Oscillator (APO) which shows the difference between two moving averages. |
Calculates the Absolute Price Oscillator (APO) which shows the difference between two moving averages.
public static TechnicalAnalysis.Functions.ApoResult Apo(int startIdx, int endIdx, double[] real, int fastPeriod=12, int slowPeriod=26, TechnicalAnalysis.Common.MAType maType=TechnicalAnalysis.Common.MAType.Sma);startIdx System.Int32
The starting index for the calculation range.
endIdx System.Int32
The ending index for the calculation range.
real System.Double[]
Array of input values (usually closing prices).
fastPeriod System.Int32
The number of periods for the fast moving average (default: 12).
slowPeriod System.Int32
The number of periods for the slow moving average (default: 26).
maType TechnicalAnalysis.Common.MAType
The type of moving average to use (default: Simple Moving Average).
ApoResult
An ApoResult containing the calculated values and metadata.
The APO is calculated as: Fast MA - Slow MA. Unlike the PPO (Percentage Price Oscillator), the APO provides the absolute difference, making it useful for comparing momentum across different time periods of the same security.
Calculates the Absolute Price Oscillator (APO) which shows the difference between two moving averages.
public static TechnicalAnalysis.Functions.ApoResult Apo(int startIdx, int endIdx, float[] real, int fastPeriod=12, int slowPeriod=26, TechnicalAnalysis.Common.MAType maType=TechnicalAnalysis.Common.MAType.Sma);startIdx System.Int32
The starting index for the calculation range.
endIdx System.Int32
The ending index for the calculation range.
real System.Single[]
Array of input values (usually closing prices).
fastPeriod System.Int32
The number of periods for the fast moving average (default: 12).
slowPeriod System.Int32
The number of periods for the slow moving average (default: 26).
maType TechnicalAnalysis.Common.MAType
The type of moving average to use (default: Simple Moving Average).
ApoResult
An ApoResult containing the calculated values and metadata.
This overload accepts float arrays and converts them to double arrays for calculation.