The resource loading... loading...

talib.WILLR

The talib.WILLR() function is used to calculate Williams’ %R.

The return value of the talib.WILLR() function is: a one-dimensional array. array

talib.WILLR(inPriceHLC) talib.WILLR(inPriceHLC, optInTimePeriod)

The inPriceHLC parameter is used to specify the K-line data. inPriceHLC true {@struct/Record Record} structure array The optInTimePeriod parameter is used to set the period, the default value is 14. optInTimePeriod false number

function main() {
    var records = exchange.GetRecords()
    var ret = talib.WILLR(records)
    Log(ret)
}
import talib
def main():
    records = exchange.GetRecords()
    ret = talib.WILLR(records.High, records.Low, records.Close)
    Log(ret)
void main() {
    auto records = exchange.GetRecords();
    auto ret = talib.WILLR(records);
    Log(ret);
}```

The ```WILLR()``` function is described in the talib library documentation as: ```WILLR(Records[High,Low,Close],Time Period = 14) = Array(outReal)```
talib.ULTOSC talib.AVGPRICE