react-candlesticks 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +219 -0
- package/dist/components/Chart/Chart.d.ts +36 -0
- package/dist/components/Chart/ChartWithPropTypes.d.ts +7 -0
- package/dist/components/Chart/chartPropTypes.d.ts +21 -0
- package/dist/components/Chart/index.d.ts +8 -0
- package/dist/components/Chart/parseConfigComponents.d.ts +19 -0
- package/dist/components/ChartCanvases/ChartCanvases.d.ts +26 -0
- package/dist/components/ChartCanvases/index.d.ts +8 -0
- package/dist/components/InteractiveArea/InteractiveArea.d.ts +13 -0
- package/dist/components/InteractiveArea/index.d.ts +8 -0
- package/dist/components/StatefulChart/StatefulChart.d.ts +26 -0
- package/dist/components/StatefulChart/getViewportData.d.ts +6 -0
- package/dist/components/StatefulChart/index.d.ts +8 -0
- package/dist/components/UIs/PanelUIs/Legend/Legend.d.ts +13 -0
- package/dist/components/UIs/PanelUIs/PanelControls/PanelControls.d.ts +13 -0
- package/dist/components/UIs/PanelUIs/PanelUIs.d.ts +16 -0
- package/dist/components/UIs/UIs.d.ts +23 -0
- package/dist/components/index.d.ts +8 -0
- package/dist/config/chart/ChartConfig.d.ts +19 -0
- package/dist/config/chart/borders/BordersConfig.d.ts +21 -0
- package/dist/config/chart/borders/parseBordersConfig.d.ts +3 -0
- package/dist/config/chart/crosshairs/CrosshairsConfig.d.ts +14 -0
- package/dist/config/chart/crosshairs/parseCrosshairsConfig.d.ts +3 -0
- package/dist/config/chart/crosshairs/timeCrosshair/TimeCrosshairConfig.d.ts +14 -0
- package/dist/config/chart/crosshairs/timeCrosshair/parseTimeCrosshairConfig.d.ts +3 -0
- package/dist/config/chart/crosshairs/timeCrosshair/timeCrosshairLabel/CrosshairTimeFormat.d.ts +7 -0
- package/dist/config/chart/crosshairs/timeCrosshair/timeCrosshairLabel/TimeCrosshairLabelConfig.d.ts +10 -0
- package/dist/config/chart/crosshairs/timeCrosshair/timeCrosshairLabel/TimeCrosshairLabelFormatter.d.ts +7 -0
- package/dist/config/chart/crosshairs/timeCrosshair/timeCrosshairLabel/defaultTimeCrosshairLabelFormatter.d.ts +3 -0
- package/dist/config/chart/crosshairs/timeCrosshair/timeCrosshairLabel/parseTimeCrosshairLabelConfig.d.ts +3 -0
- package/dist/config/chart/crosshairs/valueCrosshair/ValueCrosshairConfig.d.ts +14 -0
- package/dist/config/chart/crosshairs/valueCrosshair/parseValueCrosshairConfig.d.ts +3 -0
- package/dist/config/chart/crosshairs/valueCrosshair/valueCrosshairLabel/ValueCrosshairLabelConfig.d.ts +5 -0
- package/dist/config/chart/crosshairs/valueCrosshair/valueCrosshairLabel/parseValueCrosshairLabelConfig.d.ts +3 -0
- package/dist/config/chart/grid/GridConfig.d.ts +13 -0
- package/dist/config/chart/grid/parseGridConfig.d.ts +3 -0
- package/dist/config/chart/parseChartConfig.d.ts +4 -0
- package/dist/config/chart/xAxis/XAxisConfig.d.ts +23 -0
- package/dist/config/chart/xAxis/parseXAxisConfig.d.ts +3 -0
- package/dist/config/elements/bar/BarConfig.d.ts +20 -0
- package/dist/config/elements/bar/DirectionalBarConfig.d.ts +17 -0
- package/dist/config/elements/bar/parseBarConfig.d.ts +3 -0
- package/dist/config/elements/bar/parseDirectionalBarConfig.d.ts +3 -0
- package/dist/config/elements/boxedTimeLabel/BoxedTimeLabelConfig.d.ts +23 -0
- package/dist/config/elements/boxedTimeLabel/parseBoxedTimeLabelConfig.d.ts +3 -0
- package/dist/config/elements/boxedValueLabel/BoxedValueLabelConfig.d.ts +23 -0
- package/dist/config/elements/boxedValueLabel/parseBoxedValueLabelConfig.d.ts +3 -0
- package/dist/config/elements/button/ButtonConfig.d.ts +21 -0
- package/dist/config/elements/button/parseButtonConfig.d.ts +3 -0
- package/dist/config/elements/label/Font.d.ts +9 -0
- package/dist/config/elements/label/LabelConfig.d.ts +27 -0
- package/dist/config/elements/label/parseLabelConfig.d.ts +3 -0
- package/dist/config/elements/line/DirectionalLineConfig.d.ts +17 -0
- package/dist/config/elements/line/LineConfig.d.ts +28 -0
- package/dist/config/elements/line/parseDirectionalLineConfig.d.ts +3 -0
- package/dist/config/elements/line/parseLineConfig.d.ts +3 -0
- package/dist/config/elements/timeLabel/TimeLabelConfig.d.ts +14 -0
- package/dist/config/elements/timeLabel/TimeLabelFormatter.d.ts +9 -0
- package/dist/config/elements/timeLabel/defaultTimeLabelFormatter.d.ts +3 -0
- package/dist/config/elements/timeLabel/parseTimeLabelConfig.d.ts +3 -0
- package/dist/config/elements/valueLabel/ValueLabelConfig.d.ts +11 -0
- package/dist/config/elements/valueLabel/defaultValueLabelFormatter.d.ts +8 -0
- package/dist/config/elements/valueLabel/parseValueLabelConfig.d.ts +3 -0
- package/dist/config/index.d.ts +7 -0
- package/dist/config/layer/BaseLayerConfig.d.ts +81 -0
- package/dist/config/layer/Layer.d.ts +17 -0
- package/dist/config/layer/LayerConfig.d.ts +24 -0
- package/dist/config/layer/LayerType.d.ts +7 -0
- package/dist/config/layer/createLayerTopology.d.ts +9 -0
- package/dist/config/layer/inputSourceShorthand.d.ts +4 -0
- package/dist/config/layer/layerComponentNameToLayerTypeMap.d.ts +19 -0
- package/dist/config/layer/layerComponentTypeKey.d.ts +8 -0
- package/dist/config/layer/parseLayerConfig.d.ts +3 -0
- package/dist/config/layer/parseLayerConfigs.d.ts +3 -0
- package/dist/config/layer/parseLookback.d.ts +8 -0
- package/dist/config/layer/validateLayerInputs.d.ts +3 -0
- package/dist/config/layer/yAxis/YAxisConfig.d.ts +22 -0
- package/dist/config/layer/yAxis/parseYAxisConfig.d.ts +3 -0
- package/dist/config/legend/LegendConfig.d.ts +29 -0
- package/dist/config/legend/LegendFieldConfig.d.ts +31 -0
- package/dist/config/legend/parseLegendConfig.d.ts +4 -0
- package/dist/config/legend/parseLegendFieldConfig.d.ts +3 -0
- package/dist/config/legend/parseLegendFieldsConfig.d.ts +3 -0
- package/dist/config/panel/Panel.d.ts +7 -0
- package/dist/config/panel/PanelConfig.d.ts +30 -0
- package/dist/config/panel/controls/PanelControlsConfig.d.ts +10 -0
- package/dist/config/panel/controls/parsePanelControlsConfig.d.ts +3 -0
- package/dist/config/panel/parsePanelConfig.d.ts +4 -0
- package/dist/config/panel/parsePanelConfigs.d.ts +4 -0
- package/dist/config/panel/setPanelYAxes.d.ts +4 -0
- package/dist/config/utils/validateNumber.d.ts +9 -0
- package/dist/config/valueMarker/DirectionalValueMarkerConfig.d.ts +25 -0
- package/dist/config/valueMarker/ValueMarkerConfig.d.ts +19 -0
- package/dist/config/valueMarker/ValueMarkerMode.d.ts +7 -0
- package/dist/config/valueMarker/parseDirectionalValueMarkerConfig.d.ts +3 -0
- package/dist/config/valueMarker/parseValueMarkerConfig.d.ts +3 -0
- package/dist/data/layers/createLayersData.d.ts +4 -0
- package/dist/data/layers/createPriceVolumeCalculationContext.d.ts +4 -0
- package/dist/data/layers/createPriceVolumeDerivedLayerCalculationContext.d.ts +5 -0
- package/dist/data/layers/updateLayersData.d.ts +7 -0
- package/dist/data/map/buildDataMap.d.ts +9 -0
- package/dist/data/utils/deduceGranulairty.d.ts +4 -0
- package/dist/data/utils/granularityToTimeUnit.d.ts +4 -0
- package/dist/domain/constants/time/days.d.ts +8 -0
- package/dist/domain/constants/time/months.d.ts +8 -0
- package/dist/domain/constants/time/timeDurationsAsMs.d.ts +10 -0
- package/dist/domain/constants/timeZone/timeZones.d.ts +8 -0
- package/dist/domain/types/DataMap.d.ts +18 -0
- package/dist/domain/types/DataPoint.d.ts +14 -0
- package/dist/domain/types/DataPointInfo.d.ts +9 -0
- package/dist/domain/types/DateTimeFormatToken.d.ts +7 -0
- package/dist/domain/types/Granularity.d.ts +7 -0
- package/dist/domain/types/IndexBlock.d.ts +20 -0
- package/dist/domain/types/IndexProvider.d.ts +13 -0
- package/dist/domain/types/LayersData.d.ts +20 -0
- package/dist/domain/types/Layout.d.ts +19 -0
- package/dist/domain/types/LocalDateTime.d.ts +25 -0
- package/dist/domain/types/RawSession.d.ts +14 -0
- package/dist/domain/types/Theme.d.ts +17 -0
- package/dist/domain/types/TimeFormatToken.d.ts +7 -0
- package/dist/domain/types/TimeScale.d.ts +21 -0
- package/dist/domain/types/TimeUnit.d.ts +7 -0
- package/dist/domain/types/ViewportData.d.ts +18 -0
- package/dist/domain/types/gridLine/TimeGridLine.d.ts +7 -0
- package/dist/domain/types/gridLine/TimeGridStep.d.ts +14 -0
- package/dist/domain/types/gridLine/TimeIntervalSpec.d.ts +9 -0
- package/dist/domain/types/metrics/ChartMetrics.d.ts +5 -0
- package/dist/domain/types/metrics/LayerMetrics.d.ts +11 -0
- package/dist/domain/types/metrics/PanelMetrics.d.ts +15 -0
- package/dist/drawing/chart/borders/drawBorders.d.ts +4 -0
- package/dist/drawing/chart/crosshairs/clearChartCrosshairs.d.ts +8 -0
- package/dist/drawing/chart/crosshairs/drawChartCrosshairs.d.ts +13 -0
- package/dist/drawing/chart/crosshairs/drawChartValueCrosshairLabel.d.ts +5 -0
- package/dist/drawing/chart/drawChart.d.ts +9 -0
- package/dist/drawing/chart/grid/time/TimeGridLine.d.ts +11 -0
- package/dist/drawing/chart/grid/time/drawTimeGridLabels.d.ts +6 -0
- package/dist/drawing/chart/grid/time/drawTimeGridLines.d.ts +6 -0
- package/dist/drawing/chart/grid/time/isTimeGridLine.d.ts +3 -0
- package/dist/drawing/chart/grid/value/ValueGridLine.d.ts +10 -0
- package/dist/drawing/chart/grid/value/calculateValueGridLines.d.ts +3 -0
- package/dist/drawing/chart/grid/value/drawValueGridLines.d.ts +7 -0
- package/dist/drawing/chart/grid/value/getDefaultValueGridLines.d.ts +8 -0
- package/dist/drawing/elements/drawBar.d.ts +3 -0
- package/dist/drawing/elements/labels/timeLabel/drawTimeGridLabel.d.ts +4 -0
- package/dist/drawing/elements/labels/valueLabel/drawValueGridLabels.d.ts +9 -0
- package/dist/drawing/elements/line/drawLine.d.ts +8 -0
- package/dist/drawing/elements/line/endDrawLine.d.ts +3 -0
- package/dist/drawing/elements/line/startDrawLine.d.ts +3 -0
- package/dist/drawing/getCanvasContext.d.ts +12 -0
- package/dist/drawing/labels/valueLabel/drawValueGridLabels.d.ts +9 -0
- package/dist/drawing/layer/drawLayer.d.ts +10 -0
- package/dist/drawing/layer/drawLayers.d.ts +11 -0
- package/dist/drawing/panel/drawLayersForScale.d.ts +12 -0
- package/dist/drawing/panel/drawPanel.d.ts +14 -0
- package/dist/drawing/panel/drawPanelBorder.d.ts +9 -0
- package/dist/drawing/panel/drawPanels.d.ts +14 -0
- package/dist/drawing/panel/getPanelYAxes.d.ts +21 -0
- package/dist/drawing/panel/mapLayersByScale.d.ts +4 -0
- package/dist/drawing/valueMarker/drawDirectionalValueMarker.d.ts +12 -0
- package/dist/drawing/valueMarker/drawValueMarker.d.ts +12 -0
- package/dist/drawing/valueMarker/drawValueMarkerLabel.d.ts +13 -0
- package/dist/drawing/valueMarker/drawValueMarkerLine.d.ts +9 -0
- package/dist/exampleData/d1.d.ts +3 -0
- package/dist/exampleData/d1Short.d.ts +3 -0
- package/dist/exampleData/index.d.ts +7 -0
- package/dist/hooks/useDevicePixelRatio.d.ts +8 -0
- package/dist/hooks/useResizeObserver.d.ts +7 -0
- package/dist/index-Bb_QstiX.js +9443 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +21 -0
- package/dist/indexProviders/continuous/createContinuousIndexProvider.d.ts +5 -0
- package/dist/indexProviders/continuous/findClosestIndex.d.ts +3 -0
- package/dist/indexProviders/continuous/getKnownBars.d.ts +6 -0
- package/dist/indexProviders/continuous/indexToTimestamp.d.ts +3 -0
- package/dist/indexProviders/continuous/lowerBound.d.ts +8 -0
- package/dist/indexProviders/continuous/timestampToBarIndex.d.ts +3 -0
- package/dist/layers/atr/ATRLayer.d.ts +8 -0
- package/dist/layers/atr/AtrLayerConfig.d.ts +44 -0
- package/dist/layers/atr/calc.d.ts +4 -0
- package/dist/layers/atr/draw.d.ts +10 -0
- package/dist/layers/atr/index.d.ts +5 -0
- package/dist/layers/atr/parse.d.ts +4 -0
- package/dist/layers/bollingerBands/BollingerBandsLayer.d.ts +8 -0
- package/dist/layers/bollingerBands/BollingerBandsLayerConfig.d.ts +65 -0
- package/dist/layers/bollingerBands/calc.d.ts +4 -0
- package/dist/layers/bollingerBands/draw.d.ts +10 -0
- package/dist/layers/bollingerBands/index.d.ts +5 -0
- package/dist/layers/bollingerBands/parse.d.ts +4 -0
- package/dist/layers/candlesticks/CandlestickLayerConfig.d.ts +42 -0
- package/dist/layers/candlesticks/CandlesticksLayer.d.ts +8 -0
- package/dist/layers/candlesticks/calc.d.ts +5 -0
- package/dist/layers/candlesticks/draw/_debugDrawEmptyCandle.d.ts +8 -0
- package/dist/layers/candlesticks/draw/draw.d.ts +10 -0
- package/dist/layers/candlesticks/draw/drawCandleBody.d.ts +3 -0
- package/dist/layers/candlesticks/draw/drawCandleWick.d.ts +3 -0
- package/dist/layers/candlesticks/draw/drawCandlestick.d.ts +4 -0
- package/dist/layers/candlesticks/index.d.ts +5 -0
- package/dist/layers/candlesticks/parse.d.ts +4 -0
- package/dist/layers/ema/EMALayer.d.ts +8 -0
- package/dist/layers/ema/EmaLayerConfig.d.ts +42 -0
- package/dist/layers/ema/calc.d.ts +4 -0
- package/dist/layers/ema/draw.d.ts +10 -0
- package/dist/layers/ema/index.d.ts +5 -0
- package/dist/layers/ema/parse.d.ts +4 -0
- package/dist/layers/index.d.ts +11 -0
- package/dist/layers/layers.d.ts +4 -0
- package/dist/layers/macd/MACDLayer.d.ts +8 -0
- package/dist/layers/macd/MacdLayerConfig.d.ts +61 -0
- package/dist/layers/macd/calc.d.ts +4 -0
- package/dist/layers/macd/draw.d.ts +10 -0
- package/dist/layers/macd/index.d.ts +5 -0
- package/dist/layers/macd/parse.d.ts +4 -0
- package/dist/layers/priceLine/PriceLineLayer.d.ts +8 -0
- package/dist/layers/priceLine/PriceLineLayerConfig.d.ts +39 -0
- package/dist/layers/priceLine/calc.d.ts +5 -0
- package/dist/layers/priceLine/draw.d.ts +10 -0
- package/dist/layers/priceLine/index.d.ts +5 -0
- package/dist/layers/priceLine/parse.d.ts +4 -0
- package/dist/layers/rsi/RSILayer.d.ts +8 -0
- package/dist/layers/rsi/RsiLayerConfig.d.ts +40 -0
- package/dist/layers/rsi/calc.d.ts +4 -0
- package/dist/layers/rsi/draw.d.ts +10 -0
- package/dist/layers/rsi/index.d.ts +5 -0
- package/dist/layers/rsi/parse.d.ts +4 -0
- package/dist/layers/sma/SMALayer.d.ts +8 -0
- package/dist/layers/sma/SmaLayerConfig.d.ts +42 -0
- package/dist/layers/sma/calc.d.ts +4 -0
- package/dist/layers/sma/draw.d.ts +10 -0
- package/dist/layers/sma/index.d.ts +5 -0
- package/dist/layers/sma/parse.d.ts +4 -0
- package/dist/layers/stochastic/StochasticLayer.d.ts +8 -0
- package/dist/layers/stochastic/StochasticLayerConfig.d.ts +56 -0
- package/dist/layers/stochastic/calc.d.ts +4 -0
- package/dist/layers/stochastic/draw.d.ts +10 -0
- package/dist/layers/stochastic/index.d.ts +5 -0
- package/dist/layers/stochastic/parse.d.ts +4 -0
- package/dist/layers/volumeBars/VolumeBarsLayer.d.ts +8 -0
- package/dist/layers/volumeBars/VolumeBarsLayerConfig.d.ts +38 -0
- package/dist/layers/volumeBars/calc.d.ts +5 -0
- package/dist/layers/volumeBars/draw/draw.d.ts +10 -0
- package/dist/layers/volumeBars/draw/drawVolumeBar.d.ts +3 -0
- package/dist/layers/volumeBars/index.d.ts +5 -0
- package/dist/layers/volumeBars/parse.d.ts +4 -0
- package/dist/layout/getLayout.d.ts +5 -0
- package/dist/metrics/chart/calculateChartMetrics.d.ts +5 -0
- package/dist/metrics/layer/calculateLayerMetrics.d.ts +8 -0
- package/dist/metrics/layer/getIndicatorScalingValues.d.ts +3 -0
- package/dist/metrics/layer/getMinAndMaxValues.d.ts +8 -0
- package/dist/propTypes.d.ts +15 -0
- package/dist/propTypes.js +77 -0
- package/dist/react-candlesticks.css +6 -0
- package/dist/themes/defaultDarkTheme.d.ts +3 -0
- package/dist/themes/defaultLightTheme.d.ts +3 -0
- package/dist/themes/themes.d.ts +4 -0
- package/dist/timeScale/continuous/continuousTimeScale.d.ts +5 -0
- package/dist/timeScale/core/calculateNewScrollOffset.d.ts +3 -0
- package/dist/timeScale/core/createTimeScale.d.ts +15 -0
- package/dist/timeScale/gridLines/generateTimeGridLines.d.ts +5 -0
- package/dist/timeScale/gridLines/getTimeGridStep.d.ts +5 -0
- package/dist/timeScale/gridLines/isTimeGridLine.d.ts +7 -0
- package/dist/utils/createSelector.d.ts +8 -0
- package/dist/utils/throttle.d.ts +8 -0
- package/dist/utils/time/isoTimestampToMs.d.ts +8 -0
- package/dist/utils/time/localToUtc.d.ts +14 -0
- package/dist/utils/time/utcToLocal.d.ts +3 -0
- package/package.json +117 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* react-candlesticks, trendingcandles.com
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2026 Jason Wilson
|
|
5
|
+
* Licensed under the MIT License (see LICENSE file in the project root).
|
|
6
|
+
*/
|
|
7
|
+
export * from './components';
|
|
8
|
+
export * from './config';
|
|
9
|
+
export * from './layers';
|
|
10
|
+
export * from './domain/types/DataPoint';
|
|
11
|
+
export * from './exampleData';
|
|
12
|
+
export type { Theme } from './domain/types/Theme';
|
|
13
|
+
export type { ThemeName } from './themes/themes';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2026 Jason Wilson, trendingcandles.com
|
|
3
|
+
* Licensed under the MIT License
|
|
4
|
+
* Build time: 2026-05-10T11:51:19.652Z
|
|
5
|
+
*/
|
|
6
|
+
import { A as e, B as l, C as r, a as t, E as c, M as i, P as n, b as o, R as A, S as B, c as C, V as M, e as S } from "./index-Bb_QstiX.js";
|
|
7
|
+
export {
|
|
8
|
+
e as ATR,
|
|
9
|
+
l as BollingerBands,
|
|
10
|
+
r as Candlesticks,
|
|
11
|
+
t as Chart,
|
|
12
|
+
c as EMA,
|
|
13
|
+
i as MACD,
|
|
14
|
+
n as Panel,
|
|
15
|
+
o as PriceLine,
|
|
16
|
+
A as RSI,
|
|
17
|
+
B as SMA,
|
|
18
|
+
C as Stochastic,
|
|
19
|
+
M as VolumeBars,
|
|
20
|
+
S as exampleData
|
|
21
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { DataPoint } from '../../domain/types/DataPoint';
|
|
2
|
+
import { Granularity } from '../../domain/types/Granularity';
|
|
3
|
+
import { IndexProvider } from '../../domain/types/IndexProvider';
|
|
4
|
+
declare const createContinuousIndexProvider: (data: DataPoint[], granularity: Granularity) => IndexProvider;
|
|
5
|
+
export default createContinuousIndexProvider;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* react-candlesticks, trendingcandles.com
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2026 Jason Wilson
|
|
5
|
+
* Licensed under the MIT License (see LICENSE file in the project root).
|
|
6
|
+
*/
|
|
7
|
+
declare const lowerBound: (arr: ArrayLike<number>, value: number) => number;
|
|
8
|
+
export default lowerBound;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { BaseLayerConfig, BaseLayerConfigComplete } from '../../config/layer/BaseLayerConfig';
|
|
2
|
+
import { LineConfig, LineConfigComplete } from '../../config/elements/line/LineConfig';
|
|
3
|
+
import { ValueMarkerConfig, ValueMarkerConfigComplete, ValueMarkerTheme } from '../../config/valueMarker/ValueMarkerConfig';
|
|
4
|
+
import { LegendTheme } from '../../config/legend/LegendConfig';
|
|
5
|
+
import { YAxisTheme } from '../../config/layer/yAxis/YAxisConfig';
|
|
6
|
+
import { LayerInputField } from '../../config/layer/inputSourceShorthand';
|
|
7
|
+
type RequiredInputKeys = ['high', 'low', 'close'];
|
|
8
|
+
export declare const REQUIRED_INPUT_KEYS: RequiredInputKeys;
|
|
9
|
+
export interface AtrLayerConfigComplete extends BaseLayerConfigComplete {
|
|
10
|
+
type: 'atr';
|
|
11
|
+
requiredInputKeys: RequiredInputKeys;
|
|
12
|
+
series: {
|
|
13
|
+
value: null | LineConfigComplete;
|
|
14
|
+
};
|
|
15
|
+
markers: {
|
|
16
|
+
value: null | ValueMarkerConfigComplete;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export interface AtrLayerConfig extends BaseLayerConfig {
|
|
20
|
+
type: 'atr';
|
|
21
|
+
source?: {
|
|
22
|
+
high?: LayerInputField;
|
|
23
|
+
low?: LayerInputField;
|
|
24
|
+
close?: LayerInputField;
|
|
25
|
+
};
|
|
26
|
+
series?: {
|
|
27
|
+
value?: false | LineConfig;
|
|
28
|
+
};
|
|
29
|
+
markers?: {
|
|
30
|
+
value?: false | ValueMarkerConfig;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export interface AtrTheme {
|
|
34
|
+
series: {
|
|
35
|
+
value: LineConfigComplete;
|
|
36
|
+
};
|
|
37
|
+
markers: {
|
|
38
|
+
value: ValueMarkerTheme;
|
|
39
|
+
};
|
|
40
|
+
legend: LegendTheme;
|
|
41
|
+
yAxis: YAxisTheme;
|
|
42
|
+
}
|
|
43
|
+
export declare const atrDefaults: Omit<AtrLayerConfigComplete, 'type' | 'scale' | 'scalePolicy' | 'requiredInputKeys' | 'markers' | 'legend' | 'yAxis'>;
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { LayerConfigComplete } from '../../config/layer/LayerConfig';
|
|
2
|
+
import { LayerInputSeries } from '../../domain/types/LayersData';
|
|
3
|
+
declare const calc: (layerConfig: LayerConfigComplete, inputs: Record<string, LayerInputSeries>, outputValues: Record<string, Float64Array>, startBarIndex: number, endBarIndex: number) => void;
|
|
4
|
+
export default calc;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ChartConfigComplete } from '../../config/chart/ChartConfig';
|
|
2
|
+
import { PanelConfigComplete } from '../../config/panel/PanelConfig';
|
|
3
|
+
import { Layout } from '../../domain/types/Layout';
|
|
4
|
+
import { ChartMetrics } from '../../domain/types/metrics/ChartMetrics';
|
|
5
|
+
import { LayerMetrics } from '../../domain/types/metrics/LayerMetrics';
|
|
6
|
+
import { PanelMetrics } from '../../domain/types/metrics/PanelMetrics';
|
|
7
|
+
import { default as ViewportData } from '../../domain/types/ViewportData';
|
|
8
|
+
import { LayerConfigComplete } from '../../config/layer/LayerConfig';
|
|
9
|
+
declare const draw: (context: CanvasRenderingContext2D, axesContext: CanvasRenderingContext2D, chartConfig: ChartConfigComplete, panelConfig: PanelConfigComplete, layerConfig: LayerConfigComplete, layout: Layout, viewportData: ViewportData, chartMetrics: ChartMetrics | null, panelMetrics: PanelMetrics | null, layerMetrics: LayerMetrics | null) => void;
|
|
10
|
+
export default draw;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AtrLayerConfig, AtrLayerConfigComplete } from './AtrLayerConfig';
|
|
2
|
+
import { LayersTheme } from '../../config/layer/LayerConfig';
|
|
3
|
+
declare const parse: (partialConfig: AtrLayerConfig, layersTheme: LayersTheme, panelId: string) => AtrLayerConfigComplete;
|
|
4
|
+
export default parse;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BollingerBandsLayerConfig } from './BollingerBandsLayerConfig';
|
|
2
|
+
export interface BollingerBandsLayerProps extends Omit<BollingerBandsLayerConfig, 'type'> {
|
|
3
|
+
}
|
|
4
|
+
declare const BollingerBandsLayer: {
|
|
5
|
+
(_props: BollingerBandsLayerProps): null;
|
|
6
|
+
displayName: string;
|
|
7
|
+
};
|
|
8
|
+
export default BollingerBandsLayer;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { BaseLayerConfig, BaseLayerConfigComplete } from '../../config/layer/BaseLayerConfig';
|
|
2
|
+
import { ValueMarkerConfig, ValueMarkerConfigComplete, ValueMarkerTheme } from '../../config/valueMarker/ValueMarkerConfig';
|
|
3
|
+
import { LineConfig, LineConfigComplete } from '../../config/elements/line/LineConfig';
|
|
4
|
+
import { LegendTheme } from '../../config/legend/LegendConfig';
|
|
5
|
+
import { YAxisTheme } from '../../config/layer/yAxis/YAxisConfig';
|
|
6
|
+
import { LayerInputField } from '../../config/layer/inputSourceShorthand';
|
|
7
|
+
type RequiredInputKeys = ['input'];
|
|
8
|
+
export declare const REQUIRED_INPUT_KEYS: RequiredInputKeys;
|
|
9
|
+
export interface BollingerBandsLayerConfigComplete extends BaseLayerConfigComplete {
|
|
10
|
+
type: 'bollinger-bands';
|
|
11
|
+
requiredInputKeys: RequiredInputKeys;
|
|
12
|
+
standardDeviations: number;
|
|
13
|
+
offset: number;
|
|
14
|
+
series: {
|
|
15
|
+
middle: null | LineConfigComplete;
|
|
16
|
+
upper: null | LineConfigComplete;
|
|
17
|
+
lower: null | LineConfigComplete;
|
|
18
|
+
};
|
|
19
|
+
bands: {
|
|
20
|
+
channel: null | {
|
|
21
|
+
fillColor: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
markers: {
|
|
25
|
+
value: null | ValueMarkerConfigComplete;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export interface BollingerBandsLayerConfig extends BaseLayerConfig {
|
|
29
|
+
type: 'bollinger-bands';
|
|
30
|
+
source?: LayerInputField;
|
|
31
|
+
standardDeviations?: number;
|
|
32
|
+
offset?: number;
|
|
33
|
+
series?: {
|
|
34
|
+
middle?: false | LineConfig;
|
|
35
|
+
upper?: false | LineConfig;
|
|
36
|
+
lower?: false | LineConfig;
|
|
37
|
+
};
|
|
38
|
+
bands?: {
|
|
39
|
+
channel?: false | {
|
|
40
|
+
fillColor?: string;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
markers?: {
|
|
44
|
+
value?: false | ValueMarkerConfig;
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
export interface BollingerBandsTheme {
|
|
48
|
+
series: {
|
|
49
|
+
middle: LineConfigComplete;
|
|
50
|
+
upper: LineConfigComplete;
|
|
51
|
+
lower: LineConfigComplete;
|
|
52
|
+
};
|
|
53
|
+
bands: {
|
|
54
|
+
channel: {
|
|
55
|
+
fillColor: string;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
markers: {
|
|
59
|
+
value: ValueMarkerTheme;
|
|
60
|
+
};
|
|
61
|
+
legend: LegendTheme;
|
|
62
|
+
yAxis: YAxisTheme;
|
|
63
|
+
}
|
|
64
|
+
export declare const bollingerBandsDefaults: Omit<BollingerBandsLayerConfigComplete, 'type' | 'scale' | 'scalePolicy' | 'requiredInputKeys' | 'markers' | 'legend' | 'yAxis'>;
|
|
65
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { LayerConfigComplete } from '../../config/layer/LayerConfig';
|
|
2
|
+
import { LayerInputSeries } from '../../domain/types/LayersData';
|
|
3
|
+
declare const calc: (layerConfig: LayerConfigComplete, inputs: Record<string, LayerInputSeries>, outputValues: Record<string, Float64Array>, startBarIndex: number, endBarIndex: number) => void;
|
|
4
|
+
export default calc;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ChartConfigComplete } from '../../config/chart/ChartConfig';
|
|
2
|
+
import { PanelConfigComplete } from '../../config/panel/PanelConfig';
|
|
3
|
+
import { Layout } from '../../domain/types/Layout';
|
|
4
|
+
import { ChartMetrics } from '../../domain/types/metrics/ChartMetrics';
|
|
5
|
+
import { LayerMetrics } from '../../domain/types/metrics/LayerMetrics';
|
|
6
|
+
import { PanelMetrics } from '../../domain/types/metrics/PanelMetrics';
|
|
7
|
+
import { default as ViewportData } from '../../domain/types/ViewportData';
|
|
8
|
+
import { LayerConfigComplete } from '../../config/layer/LayerConfig';
|
|
9
|
+
declare const draw: (context: CanvasRenderingContext2D, axesContext: CanvasRenderingContext2D, chartConfig: ChartConfigComplete, panelConfig: PanelConfigComplete, layerConfig: LayerConfigComplete, layout: Layout, viewportData: ViewportData, chartMetrics: ChartMetrics | null, panelMetrics: PanelMetrics | null, layerMetrics: LayerMetrics | null) => void;
|
|
10
|
+
export default draw;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BollingerBandsLayerConfig, BollingerBandsLayerConfigComplete } from './BollingerBandsLayerConfig';
|
|
2
|
+
import { default as Layer } from '../../config/layer/Layer';
|
|
3
|
+
export type { BollingerBandsLayerConfig, BollingerBandsLayerConfigComplete, };
|
|
4
|
+
declare const bollingerBands: Layer;
|
|
5
|
+
export default bollingerBands;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { BollingerBandsLayerConfig, BollingerBandsLayerConfigComplete } from './BollingerBandsLayerConfig';
|
|
2
|
+
import { LayersTheme } from '../../config/layer/LayerConfig';
|
|
3
|
+
declare const parse: (partialConfig: BollingerBandsLayerConfig, layersTheme: LayersTheme, panelId: string) => BollingerBandsLayerConfigComplete;
|
|
4
|
+
export default parse;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { BaseLayerConfig, BaseLayerConfigComplete } from '../../config/layer/BaseLayerConfig';
|
|
2
|
+
import { DirectionalValueMarkerConfig, DirectionalValueMarkerConfigComplete, DirectionalValueMarkerTheme } from '../../config/valueMarker/DirectionalValueMarkerConfig';
|
|
3
|
+
import { DirectionalBarConfig, DirectionalBarConfigComplete, DirectionalBarTheme } from '../../config/elements/bar/DirectionalBarConfig';
|
|
4
|
+
import { DirectionalLineConfig, DirectionalLineConfigComplete, DirectionalLineTheme } from '../../config/elements/line/DirectionalLineConfig';
|
|
5
|
+
import { LegendTheme } from '../../config/legend/LegendConfig';
|
|
6
|
+
import { YAxisTheme } from '../../config/layer/yAxis/YAxisConfig';
|
|
7
|
+
type RequiredInputKeys = ['open', 'high', 'low', 'close'];
|
|
8
|
+
export declare const REQUIRED_INPUT_KEYS: RequiredInputKeys;
|
|
9
|
+
export interface CandlestickLayerConfigComplete extends BaseLayerConfigComplete {
|
|
10
|
+
type: 'price:candlesticks';
|
|
11
|
+
requiredInputKeys: RequiredInputKeys;
|
|
12
|
+
series: {
|
|
13
|
+
body: null | DirectionalBarConfigComplete;
|
|
14
|
+
wick: null | DirectionalLineConfigComplete;
|
|
15
|
+
};
|
|
16
|
+
markers: {
|
|
17
|
+
value: null | DirectionalValueMarkerConfigComplete;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export interface CandlestickLayerConfig extends BaseLayerConfig {
|
|
21
|
+
type: 'price:candlesticks';
|
|
22
|
+
series?: {
|
|
23
|
+
body?: false | DirectionalBarConfig;
|
|
24
|
+
wick?: false | DirectionalLineConfig;
|
|
25
|
+
};
|
|
26
|
+
markers?: {
|
|
27
|
+
value?: false | DirectionalValueMarkerConfig;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export interface CandlesticksTheme {
|
|
31
|
+
series: {
|
|
32
|
+
body: DirectionalBarTheme;
|
|
33
|
+
wick: DirectionalLineTheme;
|
|
34
|
+
};
|
|
35
|
+
markers: {
|
|
36
|
+
value: DirectionalValueMarkerTheme;
|
|
37
|
+
};
|
|
38
|
+
legend: LegendTheme;
|
|
39
|
+
yAxis: YAxisTheme;
|
|
40
|
+
}
|
|
41
|
+
export declare const candlestickLayerDefaults: Omit<CandlestickLayerConfigComplete, 'type' | 'scale' | 'scalePolicy' | 'requiredInputKeys' | 'period' | 'markers' | 'legend' | 'yAxis'>;
|
|
42
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CandlestickLayerConfig } from './CandlestickLayerConfig';
|
|
2
|
+
export interface CandlesticksProps extends Omit<CandlestickLayerConfig, 'type'> {
|
|
3
|
+
}
|
|
4
|
+
declare const CandlesticksLayer: {
|
|
5
|
+
(_props: CandlesticksProps): null;
|
|
6
|
+
displayName: string;
|
|
7
|
+
};
|
|
8
|
+
export default CandlesticksLayer;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { LayerConfigComplete } from '../../config/layer/LayerConfig';
|
|
2
|
+
import { LayerInputSeries } from '../../domain/types/LayersData';
|
|
3
|
+
declare const calculateCandlesticks2: (layerConfig: LayerConfigComplete, inputs: Record<string, LayerInputSeries>, outputValues: Record<string, Float64Array>, startBarIndex: number, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
4
|
+
endBarIndex: number) => void;
|
|
5
|
+
export default calculateCandlesticks2;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* react-candlesticks, trendingcandles.com
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2026 Jason Wilson
|
|
5
|
+
* Licensed under the MIT License (see LICENSE file in the project root).
|
|
6
|
+
*/
|
|
7
|
+
declare const _debugDrawEmptyCandle: (context: CanvasRenderingContext2D, x: number, intervalWidthPx: number, height: number) => void;
|
|
8
|
+
export default _debugDrawEmptyCandle;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ChartConfigComplete } from '../../../config/chart/ChartConfig';
|
|
2
|
+
import { Layout } from '../../../domain/types/Layout';
|
|
3
|
+
import { ChartMetrics } from '../../../domain/types/metrics/ChartMetrics';
|
|
4
|
+
import { PanelMetrics } from '../../../domain/types/metrics/PanelMetrics';
|
|
5
|
+
import { LayerMetrics } from '../../../domain/types/metrics/LayerMetrics';
|
|
6
|
+
import { PanelConfigComplete } from '../../../config/panel/PanelConfig';
|
|
7
|
+
import { LayerConfigComplete } from '../../../config/layer/LayerConfig';
|
|
8
|
+
import { default as ViewportData } from '../../../domain/types/ViewportData';
|
|
9
|
+
declare const draw: (context: CanvasRenderingContext2D, axesContext: CanvasRenderingContext2D, chartConfig: ChartConfigComplete, panelConfig: PanelConfigComplete, layerConfig: LayerConfigComplete, layout: Layout, viewportData: ViewportData, chartMetrics: ChartMetrics | null, panelMetrics: PanelMetrics, layerMetrics: LayerMetrics) => void;
|
|
10
|
+
export default draw;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { CandlestickLayerConfigComplete } from '../CandlestickLayerConfig';
|
|
2
|
+
declare const drawCandleBody: (context: CanvasRenderingContext2D, candlestickslayerConfig: CandlestickLayerConfigComplete, variantKey: "up" | "down" | "flat", x: number, openY: number, closeY: number, intervalWidthPx: number) => void;
|
|
3
|
+
export default drawCandleBody;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { CandlestickLayerConfigComplete } from '../CandlestickLayerConfig';
|
|
2
|
+
declare const drawCandleWick: (context: CanvasRenderingContext2D, candlestickslayerConfig: CandlestickLayerConfigComplete, variantKey: "up" | "down" | "flat", x: number, highY: number, lowY: number) => void;
|
|
3
|
+
export default drawCandleWick;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { PanelConfigComplete } from '../../../config/panel/PanelConfig';
|
|
2
|
+
import { CandlestickLayerConfigComplete } from '../CandlestickLayerConfig';
|
|
3
|
+
declare const drawCandlestick: (context: CanvasRenderingContext2D, panelConfig: PanelConfigComplete, candlestickslayerConfig: CandlestickLayerConfigComplete, intervalWidthPx: number, priceToY: (price: number) => number, open: number, high: number, low: number, close: number, x: number, ts: number) => void;
|
|
4
|
+
export default drawCandlestick;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { default as Layer } from '../../config/layer/Layer';
|
|
2
|
+
import { CandlestickLayerConfig, CandlestickLayerConfigComplete } from './CandlestickLayerConfig';
|
|
3
|
+
export type { CandlestickLayerConfig, CandlestickLayerConfigComplete, };
|
|
4
|
+
declare const candlesticks: Layer;
|
|
5
|
+
export default candlesticks;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { CandlestickLayerConfig, CandlestickLayerConfigComplete } from './CandlestickLayerConfig';
|
|
2
|
+
import { LayersTheme } from '../../config/layer/LayerConfig';
|
|
3
|
+
declare const parseCandlestickLayerConfig: (partialConfig: CandlestickLayerConfig, layersTheme: LayersTheme, panelId: string) => CandlestickLayerConfigComplete;
|
|
4
|
+
export default parseCandlestickLayerConfig;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { BaseLayerConfig, BaseLayerConfigComplete } from '../../config/layer/BaseLayerConfig';
|
|
2
|
+
import { LineConfig, LineConfigComplete } from '../../config/elements/line/LineConfig';
|
|
3
|
+
import { ValueMarkerConfig, ValueMarkerConfigComplete, ValueMarkerTheme } from '../../config/valueMarker/ValueMarkerConfig';
|
|
4
|
+
import { LegendTheme } from '../../config/legend/LegendConfig';
|
|
5
|
+
import { YAxisTheme } from '../../config/layer/yAxis/YAxisConfig';
|
|
6
|
+
import { LayerInputField } from '../../config/layer/inputSourceShorthand';
|
|
7
|
+
type RequiredInputKeys = ['input'];
|
|
8
|
+
export declare const REQUIRED_INPUT_KEYS: RequiredInputKeys;
|
|
9
|
+
export interface EmaLayerConfigComplete extends BaseLayerConfigComplete {
|
|
10
|
+
type: 'ema';
|
|
11
|
+
requiredInputKeys: RequiredInputKeys;
|
|
12
|
+
offset: number;
|
|
13
|
+
series: {
|
|
14
|
+
value: null | LineConfigComplete;
|
|
15
|
+
};
|
|
16
|
+
markers: {
|
|
17
|
+
value: null | ValueMarkerConfigComplete;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export interface EmaLayerConfig extends BaseLayerConfig {
|
|
21
|
+
type: 'ema';
|
|
22
|
+
source?: LayerInputField;
|
|
23
|
+
offset?: number;
|
|
24
|
+
series?: {
|
|
25
|
+
value?: false | LineConfig;
|
|
26
|
+
};
|
|
27
|
+
markers?: {
|
|
28
|
+
value?: false | ValueMarkerConfig;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export interface EmaTheme {
|
|
32
|
+
series: {
|
|
33
|
+
value: LineConfigComplete;
|
|
34
|
+
};
|
|
35
|
+
markers: {
|
|
36
|
+
value: ValueMarkerTheme;
|
|
37
|
+
};
|
|
38
|
+
legend: LegendTheme;
|
|
39
|
+
yAxis: YAxisTheme;
|
|
40
|
+
}
|
|
41
|
+
export declare const emaDefaults: Omit<EmaLayerConfigComplete, 'type' | 'scale' | 'scalePolicy' | 'requiredInputKeys' | 'markers' | 'legend' | 'yAxis'>;
|
|
42
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { LayerConfigComplete } from '../../config/layer/LayerConfig';
|
|
2
|
+
import { LayerInputSeries } from '../../domain/types/LayersData';
|
|
3
|
+
declare const calc: (layerConfig: LayerConfigComplete, inputs: Record<string, LayerInputSeries>, outputValues: Record<string, Float64Array>, startBarIndex: number, endBarIndex: number) => void;
|
|
4
|
+
export default calc;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ChartConfigComplete } from '../../config/chart/ChartConfig';
|
|
2
|
+
import { Layout } from '../../domain/types/Layout';
|
|
3
|
+
import { ChartMetrics } from '../../domain/types/metrics/ChartMetrics';
|
|
4
|
+
import { PanelMetrics } from '../../domain/types/metrics/PanelMetrics';
|
|
5
|
+
import { LayerMetrics } from '../../domain/types/metrics/LayerMetrics';
|
|
6
|
+
import { PanelConfigComplete } from '../../config/panel/PanelConfig';
|
|
7
|
+
import { default as ViewportData } from '../../domain/types/ViewportData';
|
|
8
|
+
import { LayerConfigComplete } from '../../config/layer/LayerConfig';
|
|
9
|
+
declare const draw: (context: CanvasRenderingContext2D, axesContext: CanvasRenderingContext2D, chartConfig: ChartConfigComplete, panelConfig: PanelConfigComplete, layerConfig: LayerConfigComplete, layout: Layout, viewportData: ViewportData, chartMetrics: ChartMetrics | null, panelMetrics: PanelMetrics, layerMetrics: LayerMetrics) => void;
|
|
10
|
+
export default draw;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { EmaLayerConfigComplete, EmaLayerConfig } from './EmaLayerConfig';
|
|
2
|
+
import { LayersTheme } from '../../config/layer/LayerConfig';
|
|
3
|
+
declare const parse: (partialConfig: EmaLayerConfig, layersTheme: LayersTheme, panelId: string) => EmaLayerConfigComplete;
|
|
4
|
+
export default parse;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as Candlesticks } from './candlesticks/CandlesticksLayer';
|
|
2
|
+
import { default as PriceLine } from './priceLine/PriceLineLayer';
|
|
3
|
+
import { default as VolumeBars } from './volumeBars/VolumeBarsLayer';
|
|
4
|
+
import { default as ATR } from './atr/ATRLayer';
|
|
5
|
+
import { default as BollingerBands } from './bollingerBands/BollingerBandsLayer';
|
|
6
|
+
import { default as EMA } from './ema/EMALayer';
|
|
7
|
+
import { default as MACD } from './macd/MACDLayer';
|
|
8
|
+
import { default as RSI } from './rsi/RSILayer';
|
|
9
|
+
import { default as SMA } from './sma/SMALayer';
|
|
10
|
+
import { default as Stochastic } from './stochastic/StochasticLayer';
|
|
11
|
+
export { Candlesticks, PriceLine, VolumeBars, ATR, BollingerBands, EMA, MACD, RSI, SMA, Stochastic, };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { BaseLayerConfig, BaseLayerConfigComplete } from '../../config/layer/BaseLayerConfig';
|
|
2
|
+
import { ValueMarkerConfig, ValueMarkerConfigComplete, ValueMarkerTheme } from '../../config/valueMarker/ValueMarkerConfig';
|
|
3
|
+
import { LineConfig, LineConfigComplete, LineTheme } from '../../config/elements/line/LineConfig';
|
|
4
|
+
import { BarConfig, BarConfigComplete } from '../../config/elements/bar/BarConfig';
|
|
5
|
+
import { LegendTheme } from '../../config/legend/LegendConfig';
|
|
6
|
+
import { YAxisTheme } from '../../config/layer/yAxis/YAxisConfig';
|
|
7
|
+
import { LayerInputField } from '../../config/layer/inputSourceShorthand';
|
|
8
|
+
type RequiredInputKeys = ['input'];
|
|
9
|
+
export declare const REQUIRED_INPUT_KEYS: RequiredInputKeys;
|
|
10
|
+
export interface MacdLayerConfigComplete extends BaseLayerConfigComplete {
|
|
11
|
+
type: 'macd';
|
|
12
|
+
requiredInputKeys: RequiredInputKeys;
|
|
13
|
+
fastPeriod: number;
|
|
14
|
+
period: number;
|
|
15
|
+
slowPeriod: number;
|
|
16
|
+
signalPeriod: number;
|
|
17
|
+
series: {
|
|
18
|
+
macd: null | LineConfigComplete;
|
|
19
|
+
signal: null | LineConfigComplete;
|
|
20
|
+
histogramUp: null | BarConfigComplete;
|
|
21
|
+
histogramDown: null | BarConfigComplete;
|
|
22
|
+
};
|
|
23
|
+
markers: {
|
|
24
|
+
macd: null | ValueMarkerConfigComplete;
|
|
25
|
+
signal: null | ValueMarkerConfigComplete;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export interface MacdLayerConfig extends BaseLayerConfig {
|
|
29
|
+
type: 'macd';
|
|
30
|
+
source?: LayerInputField;
|
|
31
|
+
fastPeriod?: number;
|
|
32
|
+
period?: number;
|
|
33
|
+
slowPeriod?: number;
|
|
34
|
+
signalPeriod?: number;
|
|
35
|
+
series?: {
|
|
36
|
+
macd?: false | LineConfig;
|
|
37
|
+
signal?: false | LineConfig;
|
|
38
|
+
histogramUp?: false | BarConfig;
|
|
39
|
+
histogramDown?: false | BarConfig;
|
|
40
|
+
};
|
|
41
|
+
markers?: {
|
|
42
|
+
macd?: false | ValueMarkerConfig;
|
|
43
|
+
signal?: false | ValueMarkerConfig;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export interface MacdTheme {
|
|
47
|
+
series: {
|
|
48
|
+
macd: LineTheme;
|
|
49
|
+
signal: LineTheme;
|
|
50
|
+
histogramUp: BarConfigComplete;
|
|
51
|
+
histogramDown: BarConfigComplete;
|
|
52
|
+
};
|
|
53
|
+
markers: {
|
|
54
|
+
macd: ValueMarkerTheme;
|
|
55
|
+
signal: ValueMarkerTheme;
|
|
56
|
+
};
|
|
57
|
+
legend: LegendTheme;
|
|
58
|
+
yAxis: YAxisTheme;
|
|
59
|
+
}
|
|
60
|
+
export declare const macdDefaults: Omit<MacdLayerConfigComplete, 'type' | 'scale' | 'scalePolicy' | 'requiredInputKeys' | 'series' | 'markers' | 'legend' | 'yAxis'>;
|
|
61
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { LayerConfigComplete } from '../../config/layer/LayerConfig';
|
|
2
|
+
import { LayerInputSeries } from '../../domain/types/LayersData';
|
|
3
|
+
declare const calc: (layerConfig: LayerConfigComplete, inputs: Record<string, LayerInputSeries>, outputValues: Record<string, Float64Array>, startBarIndex: number, endBarIndex: number) => void;
|
|
4
|
+
export default calc;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ChartConfigComplete } from '../../config/chart/ChartConfig';
|
|
2
|
+
import { PanelConfigComplete } from '../../config/panel/PanelConfig';
|
|
3
|
+
import { Layout } from '../../domain/types/Layout';
|
|
4
|
+
import { ChartMetrics } from '../../domain/types/metrics/ChartMetrics';
|
|
5
|
+
import { PanelMetrics } from '../../domain/types/metrics/PanelMetrics';
|
|
6
|
+
import { LayerMetrics } from '../../domain/types/metrics/LayerMetrics';
|
|
7
|
+
import { default as ViewportData } from '../../domain/types/ViewportData';
|
|
8
|
+
import { LayerConfigComplete } from '../../config/layer/LayerConfig';
|
|
9
|
+
declare const draw: (context: CanvasRenderingContext2D, axesContext: CanvasRenderingContext2D, chartConfig: ChartConfigComplete, panelConfig: PanelConfigComplete, layerConfig: LayerConfigComplete, layout: Layout, viewportData: ViewportData, chartMetrics: ChartMetrics | null, panelMetrics: PanelMetrics | null, layerMetrics: LayerMetrics | null) => void;
|
|
10
|
+
export default draw;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { MacdLayerConfig, MacdLayerConfigComplete } from './MacdLayerConfig';
|
|
2
|
+
import { LayersTheme } from '../../config/layer/LayerConfig';
|
|
3
|
+
declare const parse: (partialConfig: MacdLayerConfig, layersTheme: LayersTheme, panelId: string) => MacdLayerConfigComplete;
|
|
4
|
+
export default parse;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PriceLineLayerConfig } from './PriceLineLayerConfig';
|
|
2
|
+
export interface PriceLineProps extends Omit<PriceLineLayerConfig, 'type'> {
|
|
3
|
+
}
|
|
4
|
+
declare const PriceLineLayer: {
|
|
5
|
+
(_props: PriceLineProps): null;
|
|
6
|
+
displayName: string;
|
|
7
|
+
};
|
|
8
|
+
export default PriceLineLayer;
|