Price Oscillator Points Difference
The Price Oscillator displays the difference between two moving averages of a
security's price. The difference between the moving averages can be expressed in
either points or percentages.
The Price Oscillator is almost identical to the MACD, except that the Price
Oscillator can use any two user-specified moving averages. (The MACD always uses
12 and 26-day moving averages, and always expresses the difference in points.)
Moving average analysis typically generates buy signals when a short-term
moving average (or the security's price) rises above a longer-term moving
average. Conversely, sell signals are generated when a shorter-term moving
average (or the security's price) falls below a longer-term moving average. The
Price Oscillator illustrates the cyclical and often profitable signals generated
by these one or two moving average systems.
Syntax:
Public Function PriceOscillatorPointsDiff(ByVal POPDIn() As Double, ByVal Lag1 As Long, ByVal Lag2 As Long, ByVal Method As axltaMovingAverageType) As Double
Parameters:
- ByVal POPDIn() As Double
- ByVal Lag1 As Long
- ByVal Lag2 As Long
- ByVal Method As axltaMovingAverageType
Back to list
Example:
Dim TA4Net As
New TA4Net.CTAFunctions("YOUR-REGISTRATION-CODE")
Dim Result() As
Double
Dim CloseValues() As
Double
' loading values to array
CloseValues =
GetCloseValues()
' calculating Technical Analysis function
Result = TA4Net.PriceOscillatorPointsDiff(CloseValues, 12, 26, TA4Net.axltaMovingAverageType.axltaMovExponential)
|