ObvLayerConfig
Renders On-Balance Volume (OBV) with an optional smoothing line.
Examples
tsx
<OBV smoothingLength={14} />ts
{
type: 'obv',
smoothingLength: 14,
source: 'close',
}Properties
Base Props
type
- Type:
'obv'
smoothingLength
- Type:
number - Default:
14
The SMA length used for the smoothing output.
source
- Type:
'open' | 'high' | 'low' | 'close' - Default:
'close'
The price field used to determine whether volume is added or subtracted.
series
- Type:
{ value?: false | LineConfig; smoothing?: false | LineConfig }
markers
- Type:
{ value?: false | ValueMarkerConfig; smoothing?: false | ValueMarkerConfig }
Indicator value markers are disabled by default. Set markers.value or markers.smoothing to {} to show one.
Defaults
| Property | Default |
|---|---|
id | 'obv-layer' |
inputs | close price and volume |
outputs | ['value', 'smoothing'] |
scale | { key: 'value_auto', domain: 'value', range: { type: 'auto' } } |
TypeScript
ts
interface ObvLayerConfig extends BaseLayerConfig {
type: 'obv';
source?: PriceField;
smoothingLength?: number;
series?: {
value?: false | LineConfig;
smoothing?: false | LineConfig;
};
markers?: {
value?: false | ValueMarkerConfig;
smoothing?: false | ValueMarkerConfig;
};
}