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
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_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 typeENUM_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.End Su
Leave A Comment