docs-v2/content/flux/v0.x/stdlib/universe/kaufmanser.md

2.3 KiB

title description aliases menu weight flux/v0.x/tags related introduced
kaufmansER() function The `kaufmansER()` function calculates the Kaufman's Efficiency Ratio (KER) using values in an input table.
/influxdb/v2.0/reference/flux/functions/built-in/transformations/aggregates/kaufmanser/
/influxdb/v2.0/reference/flux/stdlib/built-in/transformations/aggregates/kaufmanser/
/influxdb/v2.0/reference/flux/stdlib/built-in/transformations/kaufmanser/
/influxdb/cloud/reference/flux/stdlib/built-in/transformations/kaufmanser/
flux_0_x_ref
name parent
kaufmansER universe
102
transformations
/flux/v0.x/stdlib/universe/kaufmansama/
/{{< latest "influxdb" "v1" >}}/query_language/functions/#kaufmans-efficiency-ratio, InfluxQL KAUFMANS_EFFICIENCY_RATIO()
0.40.0

The kaufmansER() function calculates the Kaufman's Efficiency Ratio (KER) using values in an input table. The function operates on the _value column.

kaufmansER(n: 10)

Kaufman's Efficiency Ratio indicator divides the absolute value of the Chande Momentum Oscillator by 100 to return a value between 0 and 1. Higher values represent a more efficient or trending market.

Parameters

n

({{< req >}}) The period or number of points to use in the calculation.

tables

Input data. Default is piped-forward data (<-).

Examples

{{% flux/sample-example-intro %}}

import "sampledata"

sampledata.int()
    |> kaufmansER(n: 3)

{{% expand "View input and output" %}} {{< flex >}} {{% flex-content %}}

Input data

{{% flux/sample "int" %}}

{{% /flex-content %}} {{% flex-content %}}

Output data
_time tag _value
2021-01-01T00:00:30Z t1 0.76
2021-01-01T00:00:40Z t1 0.33333333333333337
2021-01-01T00:00:50Z t1 0.13043478260869565
_time tag _value
2021-01-01T00:00:30Z t2 0.0
2021-01-01T00:00:40Z t2 0.2571428571428572
2021-01-01T00:00:50Z t2 0.1

{{% /flex-content %}} {{< /flex >}} {{% /expand %}}