velo-plot 1.19.0 → 2.20.0
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/dist/{ChartCore-DQ691eXH.js → ChartCore-ivzLqxVb.js} +1376 -1153
- package/dist/ChartCore-ivzLqxVb.js.map +1 -0
- package/dist/SciPlot-CEU4ApgD.js +463 -0
- package/dist/SciPlot-CEU4ApgD.js.map +1 -0
- package/dist/axisFormat-CzumxpCL.js +200 -0
- package/dist/axisFormat-CzumxpCL.js.map +1 -0
- package/dist/core/InteractionManager.d.ts +1 -0
- package/dist/core/OverlayRenderer.d.ts +11 -0
- package/dist/core/chart/ChartAxisManager.d.ts +2 -0
- package/dist/core/chart/ChartCore.d.ts +20 -0
- package/dist/core/chart/ChartPluginBridge.d.ts +1 -0
- package/dist/core/chart/ChartRenderLoop.d.ts +7 -0
- package/dist/core/chart/ChartRenderer.d.ts +5 -0
- package/dist/core/chart/ChartStateManager.d.ts +2 -0
- package/dist/core/chart/positionLines.d.ts +12 -0
- package/dist/core/chart/types.d.ts +7 -0
- package/dist/core/format/axisFormat.d.ts +2 -1
- package/dist/core/indicator/addIndicator.d.ts +1 -1
- package/dist/core/indicator/indicatorPresets.d.ts +10 -2
- package/dist/core/sync/index.d.ts +0 -1
- package/dist/core/time/TimeScale.d.ts +2 -2
- package/dist/core/time/applyTimeScale.d.ts +10 -0
- package/dist/createStackedChart-DxNW0VkF.js +705 -0
- package/dist/createStackedChart-DxNW0VkF.js.map +1 -0
- package/dist/{index-D7dTq6VB.js → index-BBpJwOct.js} +17 -19
- package/dist/index-BBpJwOct.js.map +1 -0
- package/dist/{index-CUGS98p4.js → index-CaXWSOTk.js} +3 -6
- package/dist/index-CaXWSOTk.js.map +1 -0
- package/dist/{index-DjeWClO9.js → index-qunX30Xu.js} +2 -2
- package/dist/{index-DjeWClO9.js.map → index-qunX30Xu.js.map} +1 -1
- package/dist/{index.core-BtGFYMOu.js → index.core-COREBDNq.js} +25 -24
- package/dist/{index.core-BtGFYMOu.js.map → index.core-COREBDNq.js.map} +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/mockDatafeed-927foCM4.js +511 -0
- package/dist/mockDatafeed-927foCM4.js.map +1 -0
- package/dist/plugins/analysis/contours.d.ts +31 -0
- package/dist/plugins/analysis.js +494 -407
- package/dist/plugins/analysis.js.map +1 -1
- package/dist/plugins/broken-axis.js +170 -181
- package/dist/plugins/broken-axis.js.map +1 -1
- package/dist/plugins/drawing-tools/index.d.ts +14 -1
- package/dist/plugins/drawing-tools/measure.d.ts +21 -0
- package/dist/plugins/drawing-tools/snapToCandle.d.ts +21 -0
- package/dist/plugins/forecasting/algorithms.d.ts +7 -2
- package/dist/plugins/forecasting/types.d.ts +13 -3
- package/dist/plugins/forecasting.js +355 -175
- package/dist/plugins/forecasting.js.map +1 -1
- package/dist/plugins/latex/symbols.d.ts +50 -0
- package/dist/plugins/latex/types.d.ts +13 -1
- package/dist/plugins/latex.js +351 -331
- package/dist/plugins/latex.js.map +1 -1
- package/dist/plugins/ml-integration/native-algorithms.d.ts +24 -4
- package/dist/plugins/ml-integration/types.d.ts +19 -0
- package/dist/plugins/ml-integration.js +191 -140
- package/dist/plugins/ml-integration.js.map +1 -1
- package/dist/plugins/pattern-recognition/types.d.ts +28 -1
- package/dist/plugins/pattern-recognition.js +416 -343
- package/dist/plugins/pattern-recognition.js.map +1 -1
- package/dist/plugins/snapshot.js +36 -36
- package/dist/plugins/snapshot.js.map +1 -1
- package/dist/plugins/sync.js +1 -1
- package/dist/plugins/tools.js +1 -1
- package/dist/plugins/virtualization.js +1 -1
- package/dist/react.js +5 -5
- package/dist/symbols-DT0eLlpW.js +568 -0
- package/dist/symbols-DT0eLlpW.js.map +1 -0
- package/dist/trading/datafeed.d.ts +48 -0
- package/dist/trading/index.d.ts +29 -0
- package/dist/trading/mockDatafeed.d.ts +9 -0
- package/dist/trading/ohlcvGenerator.d.ts +25 -0
- package/dist/trading.d.ts +1 -0
- package/dist/trading.js +95 -0
- package/dist/trading.js.map +1 -0
- package/dist/types.d.ts +1 -1
- package/dist/velo-plot.full.js +835 -1054
- package/dist/velo-plot.full.js.map +1 -1
- package/dist/velo-plot.js +13 -13
- package/dist/workers/indicatorsAsync.d.ts +24 -0
- package/package.json +13 -1
- package/dist/ChartCore-DQ691eXH.js.map +0 -1
- package/dist/axisFormat-B7o_uIEA.js +0 -127
- package/dist/axisFormat-B7o_uIEA.js.map +0 -1
- package/dist/createStackedChart-BPooTQ9z.js +0 -1164
- package/dist/createStackedChart-BPooTQ9z.js.map +0 -1
- package/dist/index-CUGS98p4.js.map +0 -1
- package/dist/index-D7dTq6VB.js.map +0 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Measurement helper for the price-range / measure tool (TradingView-style).
|
|
3
|
+
*/
|
|
4
|
+
export interface MeasurePoint {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
}
|
|
8
|
+
export interface Measurement {
|
|
9
|
+
/** Absolute price change (end - start) */
|
|
10
|
+
change: number;
|
|
11
|
+
/** Percentage change relative to the start price */
|
|
12
|
+
percent: number;
|
|
13
|
+
/** Number of bars spanned (rounded X distance) */
|
|
14
|
+
bars: number;
|
|
15
|
+
/** True when the range moves up (change >= 0) */
|
|
16
|
+
up: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare function computeMeasurement(a: MeasurePoint, b: MeasurePoint): Measurement;
|
|
19
|
+
export declare function formatMeasurement(m: Measurement): string;
|
|
20
|
+
/** Compact price formatting used for level labels. */
|
|
21
|
+
export declare function formatPrice(value: number): string;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Snap drawing points to nearest candlestick O/H/L/C (TradingView-style magnet).
|
|
3
|
+
*/
|
|
4
|
+
export interface CandleSnapInput {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
barX: Float32Array | Float64Array;
|
|
8
|
+
open: Float32Array | Float64Array;
|
|
9
|
+
high: Float32Array | Float64Array;
|
|
10
|
+
low: Float32Array | Float64Array;
|
|
11
|
+
close: Float32Array | Float64Array;
|
|
12
|
+
dataToPixelX: (x: number) => number;
|
|
13
|
+
dataToPixelY: (y: number) => number;
|
|
14
|
+
pixelThreshold?: number;
|
|
15
|
+
enabled?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare function findNearestBarIndex(barX: Float32Array | Float64Array, x: number): number;
|
|
18
|
+
export declare function snapToCandle(input: CandleSnapInput): {
|
|
19
|
+
x: number;
|
|
20
|
+
y: number;
|
|
21
|
+
};
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { ForecastingMethod, ForecastingParams, ForecastingResult } from './types';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Main dispatcher for forecasting algorithms
|
|
4
|
+
* Main dispatcher for forecasting algorithms.
|
|
5
5
|
*/
|
|
6
|
-
export declare function calculateForecast(x: number[] | Float64Array | Float32Array, y: number[] | Float64Array | Float32Array, method: ForecastingMethod, horizon: number, params?: ForecastingParams): ForecastingResult;
|
|
6
|
+
export declare function calculateForecast(x: number[] | Float64Array | Float32Array, y: number[] | Float64Array | Float32Array, method: ForecastingMethod, horizon: number, params?: ForecastingParams, confidence?: number): ForecastingResult;
|
|
7
|
+
/**
|
|
8
|
+
* Solve `A x = b` for a square matrix via Gaussian elimination with partial
|
|
9
|
+
* pivoting. Returns [] if the matrix is singular.
|
|
10
|
+
*/
|
|
11
|
+
export declare function gaussianSolve(A: number[][], b: number[]): number[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SeriesData } from '../../types';
|
|
2
2
|
|
|
3
|
-
export type ForecastingMethod = 'sma' | 'ema' | 'wma' | 'linear' | 'expSmoothing' | 'holt' | 'holtWinters';
|
|
3
|
+
export type ForecastingMethod = 'sma' | 'ema' | 'wma' | 'linear' | 'expSmoothing' | 'holt' | 'holtWinters' | 'arima';
|
|
4
4
|
export interface ForecastingOptions {
|
|
5
5
|
/** Method to use for forecasting */
|
|
6
6
|
method: ForecastingMethod;
|
|
@@ -24,6 +24,12 @@ export interface ForecastingParams {
|
|
|
24
24
|
period?: number;
|
|
25
25
|
/** Polynomial order for trend fitting (default: 1) */
|
|
26
26
|
polynomialOrder?: number;
|
|
27
|
+
/** ARIMA autoregressive order (p, default: 1) */
|
|
28
|
+
p?: number;
|
|
29
|
+
/** ARIMA differencing order (d, default: 1) */
|
|
30
|
+
d?: number;
|
|
31
|
+
/** ARIMA moving-average order (q, default: 0) */
|
|
32
|
+
q?: number;
|
|
27
33
|
}
|
|
28
34
|
export interface ForecastingResult {
|
|
29
35
|
/** Forecasted points (X values) */
|
|
@@ -39,9 +45,12 @@ export interface ForecastingResult {
|
|
|
39
45
|
/** Metadata and fit statistics */
|
|
40
46
|
metadata: {
|
|
41
47
|
mse?: number;
|
|
48
|
+
rmse?: number;
|
|
42
49
|
mae?: number;
|
|
43
50
|
r2?: number;
|
|
44
51
|
aic?: number;
|
|
52
|
+
/** Confidence level used to build the prediction band (e.g. 0.95) */
|
|
53
|
+
confidence?: number;
|
|
45
54
|
};
|
|
46
55
|
}
|
|
47
56
|
export interface ForecastingVisualizationConfig {
|
|
@@ -69,9 +78,10 @@ export interface PluginForecastingConfig {
|
|
|
69
78
|
}
|
|
70
79
|
export interface ForecastingAPI {
|
|
71
80
|
/**
|
|
72
|
-
* Forecast future values for a given dataset
|
|
81
|
+
* Forecast future values for a given dataset, or for a series by id when a
|
|
82
|
+
* string is passed (e.g. `forecast('s1', { method: 'arima', horizon: 50 })`).
|
|
73
83
|
*/
|
|
74
|
-
forecast(data: SeriesData | number[] | Float32Array, options: ForecastingOptions): ForecastingResult;
|
|
84
|
+
forecast(data: SeriesData | number[] | Float32Array | string, options: ForecastingOptions): ForecastingResult;
|
|
75
85
|
/**
|
|
76
86
|
* Forecast future values for a series by ID
|
|
77
87
|
*/
|