oakscriptjs 0.1.5 → 0.1.7

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.
Files changed (68) hide show
  1. package/README.md +30 -240
  2. package/dist/array/index.d.ts +57 -0
  3. package/dist/array/index.d.ts.map +1 -0
  4. package/dist/box/index.d.ts +29 -0
  5. package/dist/box/index.d.ts.map +1 -0
  6. package/dist/chartpoint/index.d.ts +8 -0
  7. package/dist/chartpoint/index.d.ts.map +1 -0
  8. package/dist/color/index.d.ts +28 -0
  9. package/dist/color/index.d.ts.map +1 -0
  10. package/dist/index.d.ts +57 -0
  11. package/dist/index.d.ts.map +1 -0
  12. package/dist/index.js +6494 -0
  13. package/dist/index.mjs +6477 -0
  14. package/dist/indicator.d.ts +42 -0
  15. package/dist/indicator.d.ts.map +1 -0
  16. package/dist/input.d.ts +41 -0
  17. package/dist/input.d.ts.map +1 -0
  18. package/dist/label/index.d.ts +22 -0
  19. package/dist/label/index.d.ts.map +1 -0
  20. package/dist/lib/index.d.ts +2 -0
  21. package/dist/lib/index.d.ts.map +1 -0
  22. package/dist/lib/zigzag/index.d.ts +2 -0
  23. package/dist/lib/zigzag/index.d.ts.map +1 -0
  24. package/dist/lib/zigzag/zigzag.d.ts +47 -0
  25. package/dist/lib/zigzag/zigzag.d.ts.map +1 -0
  26. package/dist/line/index.d.ts +22 -0
  27. package/dist/line/index.d.ts.map +1 -0
  28. package/dist/linefill/index.d.ts +8 -0
  29. package/dist/linefill/index.d.ts.map +1 -0
  30. package/dist/math/index.d.ts +53 -0
  31. package/dist/math/index.d.ts.map +1 -0
  32. package/dist/matrix/index.d.ts +52 -0
  33. package/dist/matrix/index.d.ts.map +1 -0
  34. package/dist/plot.d.ts +20 -0
  35. package/dist/plot.d.ts.map +1 -0
  36. package/dist/polyline/index.d.ts +10 -0
  37. package/dist/polyline/index.d.ts.map +1 -0
  38. package/dist/runtime/adapters/LightweightChartsAdapter.d.ts +15 -0
  39. package/dist/runtime/adapters/LightweightChartsAdapter.d.ts.map +1 -0
  40. package/dist/runtime/adapters/SimpleInputAdapter.d.ts +16 -0
  41. package/dist/runtime/adapters/SimpleInputAdapter.d.ts.map +1 -0
  42. package/dist/runtime/index.d.ts +6 -0
  43. package/dist/runtime/index.d.ts.map +1 -0
  44. package/dist/runtime/index.js +556 -0
  45. package/dist/runtime/index.mjs +533 -0
  46. package/dist/runtime/inputs.d.ts +10 -0
  47. package/dist/runtime/inputs.d.ts.map +1 -0
  48. package/dist/runtime/runtime.d.ts +16 -0
  49. package/dist/runtime/runtime.d.ts.map +1 -0
  50. package/dist/runtime/series.d.ts +59 -0
  51. package/dist/runtime/series.d.ts.map +1 -0
  52. package/dist/runtime/types.d.ts +81 -0
  53. package/dist/runtime/types.d.ts.map +1 -0
  54. package/dist/str/index.d.ts +23 -0
  55. package/dist/str/index.d.ts.map +1 -0
  56. package/dist/ta/index.d.ts +63 -0
  57. package/dist/ta/index.d.ts.map +1 -0
  58. package/dist/ta-series.d.ts +67 -0
  59. package/dist/ta-series.d.ts.map +1 -0
  60. package/dist/time/index.d.ts +4 -0
  61. package/dist/time/index.d.ts.map +1 -0
  62. package/dist/types/index.d.ts +175 -0
  63. package/dist/types/index.d.ts.map +1 -0
  64. package/dist/types/metadata.d.ts +90 -0
  65. package/dist/types/metadata.d.ts.map +1 -0
  66. package/dist/utils/index.d.ts +23 -0
  67. package/dist/utils/index.d.ts.map +1 -0
  68. package/package.json +24 -24
package/README.md CHANGED
@@ -1,271 +1,61 @@
1
- # OakScriptJS
1
+ <p align="center">
2
+ <img src="./logo.png" alt="OakScriptJS Logo" width="150">
3
+ </p>
2
4
 
3
- **PineScript v6 compatible technical analysis library for JavaScript/TypeScript**
5
+ <h1 align="center">OakScriptJS</h1>
4
6
 
5
- OakScriptJS provides the computational core of PineScript's API. It focuses on **calculations and data transformations** with a clean Series-based approach.
7
+ OakScriptJS is a TypeScript/JavaScript library that provides PineScript v6 compatible technical analysis functions. Build trading indicators, run backtests, or integrate TA calculations into any JavaScript environment.
6
8
 
7
- ## Core Features
8
-
9
- - **Series Class**: Lazy evaluation with operator chaining
10
- - **BarData**: Versioned wrapper for automatic cache invalidation
11
- - **Core Functions**: Pure array-based calculations (`taCore.*`)
12
- - **TA-Series Wrappers**: Series-based technical analysis functions (`ta.*`)
13
- - **Type Safety**: Full TypeScript support with type definitions
14
-
15
- ## Scope
16
-
17
- **This library includes:**
18
- - Technical Analysis (`ta.*`, `taCore.*`) - All indicators and calculations
19
- - Mathematics (`math.*`) - All mathematical operations
20
- - Arrays (`array.*`) - Array manipulation and operations
21
- - Matrices (`matrix.*`) - Matrix operations
22
- - Strings (`str.*`) - String manipulation
23
- - Time (`time.*`) - Time calculations and conversions
24
- - Color (`color.*`) - Color data structures and manipulation
25
- - Drawing Objects (`line.*`, `box.*`, `label.*`, `linefill.*`) - Computational features only
26
- - Series Class - Lazy evaluation with operator chaining
27
-
28
- **This library does NOT include:**
29
- - UI/Input functions (`input.*`) - Application responsibility
30
- - Strategy execution (`strategy.*`) - Strategy engine responsibility
31
- - Data fetching (`request.*`) - Data provider responsibility
32
- - Alert systems (`alert.*`, `alertcondition.*`) - Application responsibility
9
+ ## Quick Start
33
10
 
34
- ## Installation
11
+ ### Install
35
12
 
36
13
  ```bash
37
14
  npm install oakscriptjs
38
15
  ```
39
16
 
40
- ## Quick Start
41
-
42
- ### Array-based Calculations
43
-
44
- ```typescript
45
- import { taCore } from 'oakscriptjs';
46
-
47
- const prices = [100, 102, 101, 103, 105];
48
- const sma = taCore.sma(prices, 3);
49
- const rsi = taCore.rsi(prices, 14);
50
- ```
51
-
52
- ### Series-based Calculations
17
+ ### Calculate an indicator
53
18
 
54
19
  ```typescript
55
20
  import { Series, ta } from 'oakscriptjs';
56
21
 
57
- const bars = [
58
- { time: '2024-01-01', open: 100, high: 105, low: 99, close: 103 },
59
- { time: '2024-01-02', open: 103, high: 107, low: 102, close: 106 }
60
- ];
61
-
62
- const close = new Series(bars, (bar) => bar.close);
63
- const rsi = ta.rsi(close, 14);
22
+ const prices = [44, 44.5, 45, 45.5, 46, 46.5, 47, 47.5, 48, 48.5];
23
+ const close = new Series(prices);
24
+ const sma = ta.sma(close, 5);
64
25
 
65
- console.log(rsi.toArray());
26
+ console.log(sma.toArray());
66
27
  ```
67
28
 
68
- ### BarData for Automatic Cache Invalidation
69
-
70
- ```typescript
71
- import { BarData, Series, ta } from 'oakscriptjs';
72
-
73
- // Create BarData wrapper
74
- const barData = new BarData(bars);
75
- const close = Series.fromBars(barData, 'close');
76
- const sma = ta.sma(close, 20);
77
-
78
- const values1 = sma.toArray(); // Computes and caches
79
-
80
- // Add new bar - version increments
81
- barData.push({ time: '2024-01-03', open: 106, high: 108, low: 105, close: 107 });
82
-
83
- const values2 = sma.toArray(); // Detects change, recomputes
84
- ```
85
-
86
- ### Memory-Efficient Closure Breaking
87
-
88
- ```typescript
89
- import { Series } from 'oakscriptjs';
90
-
91
- // Complex expression creates closure chain
92
- const complex = a.add(b).mul(c).div(d).sub(e);
93
-
94
- // Break closure chain to free memory
95
- const materialized = complex.materialize();
96
- ```
97
-
98
- ## Supported Namespaces
99
-
100
- ### Technical Analysis (`ta` and `taCore`)
101
-
102
- Complete implementation of PineScript's technical analysis functions:
103
-
104
- ```typescript
105
- // Core (array-based)
106
- import { taCore } from 'oakscriptjs';
107
- taCore.sma(prices, 20)
108
- taCore.ema(prices, 20)
109
- taCore.rsi(prices, 14)
110
-
111
- // Series (Series-based)
112
- import { ta } from 'oakscriptjs';
113
- ta.sma(closeSeries, 20)
114
- ta.ema(closeSeries, 20)
115
- ta.rsi(closeSeries, 14)
116
- ```
117
-
118
- - **Moving Averages**: `sma()`, `ema()`, `wma()`, `vwma()`, `swma()`, etc.
119
- - **Oscillators**: `rsi()`, `stoch()`, `cci()`, `macd()`, `mfi()`, etc.
120
- - **Volatility**: `bb()`, `atr()`, `stdev()`, `variance()`, etc.
121
- - **Momentum**: `mom()`, `roc()`, `percentrank()`, etc.
122
- - **Regression**: `linreg()`, `correlation()`, etc.
123
- - **Crossovers**: `crossover()`, `crossunder()`, `cross()`
124
-
125
- ### Math (`math`)
126
-
127
- ```typescript
128
- math.abs(x), math.ceil(x), math.floor(x), math.round(x)
129
- math.min(...values), math.max(...values), math.avg(...values)
130
- math.sqrt(x), math.pow(x, y), math.exp(x), math.log(x)
131
- math.sin(x), math.cos(x), math.tan(x)
132
- ```
133
-
134
- ### Array (`array`)
135
-
136
- ```typescript
137
- array.new_float(size, initial)
138
- array.push(arr, value)
139
- array.get(arr, index)
140
- array.sum(arr), array.avg(arr), array.sort(arr)
141
- ```
142
-
143
- ### Series Class
144
-
145
- ```typescript
146
- class Series {
147
- // Constructor
148
- constructor(data: Bar[] | BarData, extractor: SeriesExtractor)
149
-
150
- // Properties
151
- get bars(): Bar[]
152
- get barData(): BarData
153
-
154
- // Arithmetic
155
- add(other: Series | number): Series
156
- sub(other: Series | number): Series
157
- mul(other: Series | number): Series
158
- div(other: Series | number): Series
159
-
160
- // Comparison
161
- gt(other: Series | number): Series
162
- lt(other: Series | number): Series
163
-
164
- // Logical
165
- and(other: Series | number): Series
166
- or(other: Series | number): Series
167
-
168
- // Access
169
- toArray(): number[]
170
- last(): number
171
- offset(n: number): Series // Like close[1]
172
-
173
- // Memory management
174
- materialize(): Series // Break closure chains
175
- }
176
- ```
177
-
178
- ### BarData Class
179
-
180
- ```typescript
181
- class BarData {
182
- constructor(bars: Bar[])
183
-
184
- get version(): number
185
- get bars(): Bar[]
186
- get length(): number
187
-
188
- push(bar: Bar): void
189
- pop(): Bar | undefined
190
- set(index: number, bar: Bar): void
191
- updateLast(bar: Bar): void
192
- setAll(bars: Bar[]): void
193
- invalidate(): void
194
- }
195
- ```
196
-
197
- ### Drawing Objects
198
-
199
- - **Line (`line`)**: `new()`, `get_price()`, getters/setters
200
- - **Box (`box`)**: `new()`, getters/setters for gap detection
201
- - **Label (`label`)**: `new()`, getters/setters
202
- - **Linefill (`linefill`)**: `new()`, `set_color()`
203
-
204
- ## Examples
205
-
206
- ```typescript
207
- // Example 1: Simple Moving Average
208
- import {Series, ta, type IndicatorResult} from 'oakscriptjs';
209
-
210
- export function smaIndicator(bars: any[]): IndicatorResult {
211
- const close = new Series(bars, (bar) => bar.close);
212
- const sma20 = ta.sma(close, 20);
29
+ ## Documentation
213
30
 
214
- return {
215
- metadata: { title: "SMA 20", overlay: true },
216
- plots: [{
217
- data: sma20.toArray().map((v, i) => ({ time: bars[i].time, value: v })),
218
- options: { color: '#2196F3', linewidth: 2 }
219
- }]
220
- };
221
- }
31
+ - [Guide](./docs/guide.md) — Getting started and core concepts
32
+ - [Function Inventory](./docs/inventory.md) — All available TA functions
222
33
 
223
- // Example 2: RSI
224
- export function rsiIndicator(bars: any[]): IndicatorResult {
225
- const close = new Series(bars, (bar) => bar.close);
226
- const rsi = ta.rsi(close, 14);
34
+ ## Development
227
35
 
228
- return {
229
- metadata: { title: "RSI", overlay: false },
230
- plots: [{
231
- data: rsi.toArray().map((v, i) => ({ time: bars[i].time, value: v })),
232
- options: { color: '#FF5722', linewidth: 2 }
233
- }],
234
- hlines: [
235
- { value: 70, options: { color: '#FF0000' } },
236
- { value: 30, options: { color: '#00FF00' } }
237
- ]
238
- };
239
- }
240
- ```
36
+ ### Prerequisites
241
37
 
242
- ## Development
38
+ - Node.js >= 18.0.0
243
39
 
244
40
  ### Setup
245
41
 
246
42
  ```bash
247
- npm install
43
+ npm install # Install dependencies
44
+ npm run build # Build
45
+ npm test # Run tests
46
+ npm run typecheck # Type check
248
47
  ```
249
48
 
250
- ### Build
49
+ ## Project Structure
251
50
 
252
- ```bash
253
- npm run build
254
51
  ```
255
-
256
- ### Test
257
-
258
- ```bash
259
- npm test
260
- npm run test:watch
261
- npm run test:coverage
52
+ oakscriptJS/
53
+ ├── src/ # Source code
54
+ ├── tests/ # Test suite
55
+ ├── dist/ # Build output
56
+ └── docs/ # Documentation
262
57
  ```
263
58
 
264
- ## Documentation
265
-
266
- - **[Complete Guide](../../docs/guide.md)** - User guide and examples
267
- - **[Function Inventory](../../docs/inventory.md)** - Complete function list with status
268
-
269
- ## Acknowledgments
59
+ ---
270
60
 
271
- This library is inspired by TradingView's PineScript language. It is not affiliated with or endorsed by TradingView.
61
+ Maintained by [DeepEntropy](https://github.com/deepentropy)
@@ -0,0 +1,57 @@
1
+ import { PineArray, int, float, bool, simple_int, color, Line, Box, Label, Linefill } from '../types';
2
+ export declare function new_array<T>(size?: simple_int, initial_value?: T): PineArray<T>;
3
+ export declare function size<T>(id: PineArray<T>): int;
4
+ export declare function get<T>(id: PineArray<T>, index: simple_int): T;
5
+ export declare function set<T>(id: PineArray<T>, index: simple_int, value: T): void;
6
+ export declare function push<T>(id: PineArray<T>, value: T): void;
7
+ export declare function pop<T>(id: PineArray<T>): T;
8
+ export declare function unshift<T>(id: PineArray<T>, value: T): void;
9
+ export declare function shift<T>(id: PineArray<T>): T;
10
+ export declare function clear<T>(id: PineArray<T>): void;
11
+ export declare function insert<T>(id: PineArray<T>, index: simple_int, value: T): void;
12
+ export declare function remove<T>(id: PineArray<T>, index: simple_int): T;
13
+ export declare function includes<T>(id: PineArray<T>, value: T): bool;
14
+ export declare function indexof<T>(id: PineArray<T>, value: T): int;
15
+ export declare function lastindexof<T>(id: PineArray<T>, value: T): int;
16
+ export declare function copy<T>(id: PineArray<T>): PineArray<T>;
17
+ export declare function concat<T>(id1: PineArray<T>, id2: PineArray<T>): PineArray<T>;
18
+ export declare function join(id: PineArray<any>, separator?: string): string;
19
+ export declare function reverse<T>(id: PineArray<T>): void;
20
+ export declare function slice<T>(id: PineArray<T>, index_from: simple_int, index_to?: simple_int): PineArray<T>;
21
+ export declare function sort<T>(id: PineArray<T>, order?: 'asc' | 'desc'): void;
22
+ export declare function sum(id: PineArray<float>): float;
23
+ export declare function avg(id: PineArray<float>): float;
24
+ export declare function min(id: PineArray<float>): float;
25
+ export declare function max(id: PineArray<float>): float;
26
+ export declare function median(id: PineArray<float>): float;
27
+ export declare function mode(id: PineArray<float>): float;
28
+ export declare function stdev(id: PineArray<float>): float;
29
+ export declare function variance(id: PineArray<float>): float;
30
+ export declare function fill<T>(id: PineArray<T>, value: T, index_from?: simple_int, index_to?: simple_int): void;
31
+ export declare function from<T>(id: PineArray<T>): PineArray<T>;
32
+ export declare function first<T>(id: PineArray<T>): T;
33
+ export declare function last<T>(id: PineArray<T>): T;
34
+ export declare function some<T>(id: PineArray<T>, predicate: (value: T) => bool): bool;
35
+ export declare function every<T>(id: PineArray<T>, predicate: (value: T) => bool): bool;
36
+ export declare function new_bool(size?: simple_int, initial_value?: bool): PineArray<bool>;
37
+ export declare function new_float(size?: simple_int, initial_value?: float): PineArray<float>;
38
+ export declare function new_int(size?: simple_int, initial_value?: int): PineArray<int>;
39
+ export declare function new_string(size?: simple_int, initial_value?: string): PineArray<string>;
40
+ export declare function new_color(size?: simple_int, initial_value?: color): PineArray<color>;
41
+ export declare function new_line(size?: simple_int, initial_value?: Line): PineArray<Line>;
42
+ export declare function new_box(size?: simple_int, initial_value?: Box): PineArray<Box>;
43
+ export declare function new_label(size?: simple_int, initial_value?: Label): PineArray<Label>;
44
+ export declare function new_linefill(size?: simple_int, initial_value?: Linefill): PineArray<Linefill>;
45
+ export declare function abs(id: PineArray<float>): PineArray<float>;
46
+ export declare function range(id: PineArray<float>): float;
47
+ export declare function binary_search(id: PineArray<float>, val: float): int;
48
+ export declare function binary_search_leftmost(id: PineArray<float>, val: float): int;
49
+ export declare function binary_search_rightmost(id: PineArray<float>, val: float): int;
50
+ export declare function covariance(id1: PineArray<float>, id2: PineArray<float>, biased?: bool): float;
51
+ export declare function percentile_linear_interpolation(id: PineArray<float>, percentage: float): float;
52
+ export declare function percentile_nearest_rank(id: PineArray<float>, percentage: float): float;
53
+ export declare function percentrank(id: PineArray<float>, index: int): float;
54
+ export declare function sort_indices(id: PineArray<float>, order?: 'asc' | 'desc'): PineArray<int>;
55
+ export declare function standardize(id: PineArray<float>): PineArray<float>;
56
+ export declare function newtype<T>(size?: simple_int, initial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K,GAAE,KAAK,GAAG,MAAc,GAAG,SAAS,CAAC,GAAG,CAAC,CAchG;AA2BD,wBAAgB,WAAW,CAAC,EAAE,EAAE,SAAS,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,CAelE;AA2BD,wBAAgB,OAAO,CAAC,CAAC,EAAE,IAAI,GAAE,UAAc,EAAE,aAAa,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAIhF"}
@@ -0,0 +1,29 @@
1
+ import { Box, color } from '../types';
2
+ export declare function new_box(left: number, top: number, right: number, bottom: number, xloc?: 'bar_index' | 'bar_time', extend?: 'none' | 'left' | 'right' | 'both', border_color?: color, border_width?: number, border_style?: 'solid' | 'dotted' | 'dashed', bgcolor?: color, text?: string, text_size?: string | number, text_color?: color, text_halign?: 'left' | 'center' | 'right', text_valign?: 'top' | 'center' | 'bottom', text_wrap?: 'none' | 'auto', text_font_family?: 'default' | 'monospace'): Box;
3
+ export declare function get_left(id: Box): number;
4
+ export declare function get_right(id: Box): number;
5
+ export declare function get_top(id: Box): number;
6
+ export declare function get_bottom(id: Box): number;
7
+ export declare function copy(id: Box): Box;
8
+ export declare function set_left(id: Box, left: number): Box;
9
+ export declare function set_right(id: Box, right: number): Box;
10
+ export declare function set_top(id: Box, top: number): Box;
11
+ export declare function set_bottom(id: Box, bottom: number): Box;
12
+ export declare function set_lefttop(id: Box, left: number, top: number): Box;
13
+ export declare function set_rightbottom(id: Box, right: number, bottom: number): Box;
14
+ export declare function set_xloc(id: Box, left: number, right: number, xloc: 'bar_index' | 'bar_time'): Box;
15
+ export declare function set_extend(id: Box, extend: 'none' | 'left' | 'right' | 'both'): Box;
16
+ export declare function set_border_color(id: Box, borderColor: color): Box;
17
+ export declare function set_border_width(id: Box, width: number): Box;
18
+ export declare function set_border_style(id: Box, style: 'solid' | 'dotted' | 'dashed'): Box;
19
+ export declare function set_bgcolor(id: Box, bgColor: color): Box;
20
+ export declare function set_text(id: Box, text: string): Box;
21
+ export declare function set_text_color(id: Box, textColor: color): Box;
22
+ export declare function set_text_size(id: Box, size: string | number): Box;
23
+ export declare function set_text_halign(id: Box, align: 'left' | 'center' | 'right'): Box;
24
+ export declare function set_text_valign(id: Box, align: 'top' | 'center' | 'bottom'): Box;
25
+ export declare function set_text_wrap(id: Box, wrap: 'none' | 'auto'): Box;
26
+ export declare function set_text_font_family(id: Box, font: 'default' | 'monospace'): Box;
27
+ export declare function delete_box(_id: Box): void;
28
+ export { new_box as new };
29
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/box/index.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AA8CtC,wBAAgB,OAAO,CACrB,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,IAAI,GAAE,WAAW,GAAG,UAAwB,EAC5C,MAAM,GAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAe,EACnD,YAAY,CAAC,EAAE,KAAK,EACpB,YAAY,CAAC,EAAE,MAAM,EACrB,YAAY,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,QAAQ,EAC5C,OAAO,CAAC,EAAE,KAAK,EACf,IAAI,CAAC,EAAE,MAAM,EACb,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,EAC3B,UAAU,CAAC,EAAE,KAAK,EAClB,WAAW,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,EACzC,WAAW,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,EACzC,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,EAC3B,gBAAgB,CAAC,EAAE,SAAS,GAAG,WAAW,GACzC,GAAG,CAoBL;AAwBD,wBAAgB,QAAQ,CAAC,EAAE,EAAE,GAAG,GAAG,MAAM,CAExC;A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CAAC,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,GAAG,GAAG,CAG5D;AAiBD,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,GAAG,CAGnF;AAiBD,wBAAgB,WAAW,CAAC,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,GAAG,GAAG,CAGxD;AAqBD,wBAAgB,QAAQ,CAAC,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,GAAG,GAAG,CAGnD;AAiBD,wBAAgB,cAAc,CAAC,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,GAAG,GAAG,CAG7D;AAiBD,wBAAgB,aAAa,CAAC,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,GAAG,CAGjE;AAiBD,wBAAgB,eAAe,CAAC,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,GAAG,CAGhF;AAiBD,wBAAgB,eAAe,CAAC,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,GAAG,GAAG,CAGhF;AAiBD,wBAAgB,aAAa,CAAC,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,GAAG,CAGjE;AAiBD,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,GAAG,WAAW,GAAG,GAAG,CAGhF;AAqBD,wBAAgB,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI,CAIzC;AAGD,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { ChartPoint } from '../types';
2
+ export type { ChartPoint };
3
+ export declare function new_point(time: number | null, index: number | null, price: number): ChartPoint;
4
+ export declare function from_time(time: number, price: number): ChartPoint;
5
+ export declare function from_index(index: number, price: number): ChartPoint;
6
+ export declare function copy(point: ChartPoint): ChartPoint;
7
+ export { new_point as new };
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/chartpoint/index.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAGtC,YAAY,EAAE,UAAU,EAAE,CAAC;AA4B3B,wBAAgB,SAAS,CACvB,IAAI,EAAE,MAAM,GAAG,IAAI,EACnB,KAAK,EAAE,MAAM,GAAG,IAAI,EACpB,KAAK,EAAE,MAAM,GACZ,UAAU,CAMZ;AAoBD,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,UAAU,CAMjE;AAoBD,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,UAAU,CAMnE;AAoBD,wBAAgB,IAAI,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,CAMlD;AAGD,OAAO,EAAE,SAAS,IAAI,GAAG,EAAE,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { color, int, float, simple_int, simple_float } from '../types';
2
+ export declare function rgb(red: simple_int, green: simple_int, blue: simple_int, transp?: simple_float): color;
3
+ export declare function from_hex(hex: string, transp?: simple_float): color;
4
+ export declare function new_color(baseColor: color, transp: simple_float): color;
5
+ export declare function r(clr: color): int;
6
+ export declare function g(clr: color): int;
7
+ export declare function b(clr: color): int;
8
+ export declare function t(clr: color): float;
9
+ export declare const aqua = "#00FFFF";
10
+ export declare const black = "#000000";
11
+ export declare const blue = "#0000FF";
12
+ export declare const fuchsia = "#FF00FF";
13
+ export declare const gray = "#808080";
14
+ export declare const green = "#00FF00";
15
+ export declare const lime = "#00FF00";
16
+ export declare const maroon = "#800000";
17
+ export declare const navy = "#000080";
18
+ export declare const olive = "#808000";
19
+ export declare const orange = "#FFA500";
20
+ export declare const purple = "#800080";
21
+ export declare const red = "#FF0000";
22
+ export declare const silver = "#C0C0C0";
23
+ export declare const teal = "#008080";
24
+ export declare const white = "#FFFFFF";
25
+ export declare const yellow = "#FFFF00";
26
+ export declare function from_gradient(value: float, bottom_value: float, top_value: float, bottom_color: color, top_color: color): color;
27
+ export { new_color as new };
28
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/color/index.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AA0BvE,wBAAgB,GAAG,CAAC,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,YAAY,GAAG,KAAK,CAUtG;AAyBD,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,YAAY,GAAG,KAAK,CASlE;AAwBD,wBAAgB,SAAS,CAAC,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,GAAG,KAAK,CAIvE;AAiBD,wBAAgB,CAAC,CAAC,GAAG,EAAE,KAAK,GAAG,GAAG,CAEjC;AAiBD,wBAAgB,CAAC,CAAC,GAAG,EAAE,KAAK,GAAG,GAAG,CAEjC;AAiBD,wBAAgB,CAAC,CAAC,GAAG,EAAE,KAAK,GAAG,GAAG,CAEjC;AAqBD,wBAAgB,CAAC,CAAC,GAAG,EAAE,KAAK,GAAG,KAAK,CAEnC;AA8BD,eAAO,MAAM,IAAI,YAAY,CAAC;AAM9B,eAAO,MAAM,KAAK,YAAY,CAAC;AAM/B,eAAO,MAAM,IAAI,YAAY,CAAC;AAM9B,eAAO,MAAM,OAAO,YAAY,CAAC;AAMjC,eAAO,MAAM,IAAI,YAAY,CAAC;AAM9B,eAAO,MAAM,KAAK,YAAY,CAAC;AAM/B,eAAO,MAAM,IAAI,YAAY,CAAC;AAM9B,eAAO,MAAM,MAAM,YAAY,CAAC;AAMhC,eAAO,MAAM,IAAI,YAAY,CAAC;AAM9B,eAAO,MAAM,KAAK,YAAY,CAAC;AAM/B,eAAO,MAAM,MAAM,YAAY,CAAC;AAMhC,eAAO,MAAM,MAAM,YAAY,CAAC;AAMhC,eAAO,MAAM,GAAG,YAAY,CAAC;AAM7B,eAAO,MAAM,MAAM,YAAY,CAAC;AAMhC,eAAO,MAAM,IAAI,YAAY,CAAC;AAM9B,eAAO,MAAM,KAAK,YAAY,CAAC;AAM/B,eAAO,MAAM,MAAM,YAAY,CAAC;AAkChC,wBAAgB,aAAa,CAC3B,KAAK,EAAE,KAAK,EACZ,YAAY,EAAE,KAAK,EACnB,SAAS,EAAE,KAAK,EAChB,YAAY,EAAE,KAAK,EACnB,SAAS,EAAE,KAAK,GACf,KAAK,CAoDP;AAqBD,OAAO,EAAE,SAAS,IAAI,GAAG,EAAE,CAAC"}
@@ -0,0 +1,57 @@
1
+ export * from './types';
2
+ export * from './types/metadata';
3
+ import * as taCore from './ta';
4
+ import * as math from './math';
5
+ import * as array from './array';
6
+ import * as str from './str';
7
+ import * as color from './color';
8
+ import * as time from './time';
9
+ import * as matrix from './matrix';
10
+ import * as line from './line';
11
+ import * as box from './box';
12
+ import * as label from './label';
13
+ import * as linefill from './linefill';
14
+ import * as chartPoint from './chartpoint';
15
+ import * as polyline from './polyline';
16
+ export { taCore, math, array, str, color, time, matrix, line, box, label, linefill, chartPoint, polyline };
17
+ export { Series, BarData } from './runtime/series';
18
+ export type { SeriesExtractor } from './runtime/series';
19
+ import * as ta from './ta-series';
20
+ export { ta };
21
+ export type { PlotOptions, HLineOptions, FillOptions, InputMetadata, PlotMetadata, IndicatorMetadata, TimeValue, PlotData, HLineData, FillData, IndicatorResult, IndicatorFactory, PlotStyle, LineStyle, PlotDisplay, InputType } from './types/metadata';
22
+ export { sma, ema, rsi, macd, bb, stdev, crossover, crossunder, change, tr, atr, cum, vwap } from './ta-series';
23
+ export { abs, ceil, floor, round, max, min, avg, sum, sqrt, pow, exp, log, sin, cos, tan } from './math';
24
+ export { rgb, from_hex as color_from_hex, new_color } from './color';
25
+ export { ohlcFromBars, getClose, getHigh, getLow, getOpen, getSourceSeries } from './utils';
26
+ export * from './lib';
27
+ export { isNA as na, nz } from './utils';
28
+ export { indicator, type IndicatorMetadataConfig, type InputDefinition, type IndicatorContext, type IndicatorInstance, type IndicatorConstructor, } from './indicator';
29
+ export { input, type InputValue, type IntInputOptions, type FloatInputOptions, type SourceInputOptions, type BoolInputOptions, type StringInputOptions, type SourceType, } from './input';
30
+ export { plot as plotHelper, createPlot, type Time, type TimeValuePair, type PlotOptions as PlotHelperOptions, type PlotResult, } from './plot';
31
+ export { setContext, clearContext, getContext, registerCalculate, recalculate, plot, hline, clearPlots, } from './runtime/runtime';
32
+ export { input_int, input_float, input_bool, input_string, input_source, } from './runtime/inputs';
33
+ export type { OakScriptContext, ChartAdapter, InputAdapter, SeriesHandle, SeriesOptions, InputConfig, InputOptions, OhlcvData, PlotConfig, HLineConfig, FillConfig, } from './runtime/types';
34
+ export { LightweightChartsAdapter } from './runtime/adapters/LightweightChartsAdapter';
35
+ export { SimpleInputAdapter } from './runtime/adapters/SimpleInputAdapter';
36
+ export declare const VERSION = "0.3.0";
37
+ export declare const info: {
38
+ name: string;
39
+ version: string;
40
+ description: string;
41
+ features: {
42
+ series: string;
43
+ operators: string;
44
+ ta: string;
45
+ runtime: string;
46
+ indicator: string;
47
+ minimal: string;
48
+ };
49
+ namespaces: {
50
+ core: string[];
51
+ drawing: string[];
52
+ runtime: string[];
53
+ indicator: string[];
54
+ };
55
+ };
56
+ export declare function alertcondition(_condition: unknown, _title?: string, _message?: string): void;
57
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAgBA,cA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