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
||Chart identifier, 0 is the current chart ,value of type Long
||Applied price , can be one of the ENUM_APPLIED_PRICE
||Specifying the number of periods to use in the long moving average calculation, value of type Integer.
||Specifying the number of periods to use in the short moving average calculation, value of type Integer.
||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)
Returns the handles of a technical indicator, in case of failure returns an empty string.
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.
Back to VTL Client Script Index