Skip to content

Latest commit

 

History

History
119 lines (69 loc) · 6.34 KB

TAMath.Apo.md

File metadata and controls

119 lines (69 loc) · 6.34 KB

TAMath.Apo Method

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.

TAMath.Apo(int, int, double[], int, int, MAType) Method

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);

Parameters

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).

Returns

ApoResult
An ApoResult containing the calculated values and metadata.

Remarks

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.

TAMath.Apo(int, int, float[], int, int, MAType) Method

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);

Parameters

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).

Returns

ApoResult
An ApoResult containing the calculated values and metadata.

Remarks

This overload accepts float arrays and converts them to double arrays for calculation.