Skip to content

WilliamsRLayerConfig

Renders Williams %R on a bounded -100 to 0 scale.

Examples

tsx
<WilliamsR length={14} />
ts
{
  type: 'williams-r',
  length: 14,
  valueGridLines: [-80, -20],
}

Properties

Base Props

BaseLayerConfig

type

  • Type: 'williams-r'

length

  • Type: number
  • Default: 14

The oscillator lookback length. The inherited period prop is accepted as an alias.

source

  • Type: { high?: PriceField; low?: PriceField; close?: PriceField }

Optional shorthand for remapping the required price inputs.

series

  • Type: { value?: false | LineConfig }

markers

  • Type: { value?: false | ValueMarkerConfig }

Indicator value markers are disabled by default. Set markers.value to {} to show one.

Defaults

PropertyDefault
id'williams-r-layer'
outputs['value']
valueGridLines[-80, -20]
scale{ key: 'value_bounded_-100_0', domain: 'value', range: { type: 'bounded', min: -100, max: 0 } }

TypeScript

ts
interface WilliamsRLayerConfig extends BaseLayerConfig {
  type: 'williams-r';
  source?: {
    high?: PriceField;
    low?: PriceField;
    close?: PriceField;
  };
  length?: number;
  series?: {
    value?: false | LineConfig;
  };
  markers?: {
    value?: false | ValueMarkerConfig;
  };
}

React Candlesticks is available on npm and GitHub under the MIT License.