PriceOscillator
Posted by Mohammad Rahhal, Last modified by Diana Alkouni on 27 August 2020 10:22 AM

Syntax

Public Function PriceOscillator(chart_ID As long, applyTo As ENUM_APPLIED_PRICE, LongCycle As Integer, ShortCycle As Integer, Ma As ENUM_MA_METHOD) As String 

Description

Price Oscillator (PO) is a momentum oscillator that measures the difference between two moving averages as a percentage of the larger moving average.

As with its cousin, MACD, the Percentage Price Oscillator is shown with a signal line, a histogram and a centreline.

Signals are generated with signal line crossovers, centreline crossovers and divergences

Parameters

Key Description 
chart_ID Chart identifier, 0 is the current chart ,value of type Long
applyTo Applied price , can be one of the  ENUM_APPLIED_PRICE
LongCycle Specifying the number of periods to use in the long moving average calculation, value of type Integer.
ShortCycle Specifying the number of periods to use in the short moving average calculation, value of type Integer.
Ma An integer value of type ENUM_MA_METHOD. Is an integer specifying the moving average type to be used (Simple = 1, Exponential = 2, TimeSeries = 3, Variable = 4, Triangular = 5, Weighted = 6, VIDYA = 7)

Return value

Returns the handles of a technical indicator, in case of failure returns an empty string.

Sample

Public Sub main()

AlertMessage (PriceOscillator(0,PRICE_HIGH,30,15, MODE_SMA))

'Draws the indicator on chart and shows a message box with the indicator name.

End Su

See Also


Back to VTL Client Script Index

(0 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).

Help Desk Software by Hybrid Solutions