Type/to search
Built-in Functions
Global
Log
Market
Trade
Account
Futures
Exchange
IO
Network
Storage
Threads
TA
Talib
Overlap Studies
Momentum Indicators
Volume Indicators
Volatility Indicators
Cycle Indicators
Price Transform
Statistic Functions
Math Transform
Math Operators
Pattern Recognition
OS
Structures
Built-in Variables and Constants
Conventions
Exchanges

Calculates the Ultimate Oscillator.

talib.ULTOSC(inPriceHLC)
talib.ULTOSC(inPriceHLC, optInTimePeriod1)
talib.ULTOSC(inPriceHLC, optInTimePeriod1, optInTimePeriod2)
talib.ULTOSC(inPriceHLC, optInTimePeriod1, optInTimePeriod2, optInTimePeriod3)

Examples

Compute the Ultimate Oscillator from the latest K-lines.

javascript
function main() { var records = exchange.GetRecords() if (!records) return var ret = talib.ULTOSC(records) Log(ret) }
python
import talib def main(): records = exchange.GetRecords() if not records: return ret = talib.ULTOSC(records.High, records.Low, records.Close) Log(ret)

Returns

TypeDescription

numeric array

Indicator values, the same length as the input; the leading values without enough data are NaN.

Arguments

NameTypeRequiredDescription

inPriceHLC

Record array

Yes

K-line array; the high, low and close fields are used. In Python, pass records.High, records.Low, records.Close in this order.

optInTimePeriod1

number

No

First period. Default 7.

optInTimePeriod2

number

No

Second period. Default 14.

optInTimePeriod3

number

No

Third period. Default 28.

See Also

Remarks

TA-Lib equivalent: ULTOSC(Records[High,Low,Close],First Period = 7,Second Period = 14,Third Period = 28) = Array(outReal).