candleview 1.0.0 → 1.0.1

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/README.md CHANGED
@@ -1,397 +1,498 @@
1
- <h1 align="center">
2
- 📊 CandleView
3
- </h1>
4
- <h4 align="center">
5
- Chart engine in the financial field.
6
- </h4>
7
- <p align="center">
8
- <a href="https://https://github.com/0xhappyboy/candleview/LICENSE"><img src="https://img.shields.io/badge/License-AGPL3.0-d1d1f6.svg?style=flat&labelColor=1C2C2E&color=BEC5C9&logo=googledocs&label=license&logoColor=BEC5C9" alt="License"></a>
9
- </p>
10
- <p align="center">
11
- <a href="./README_zh-CN.md">įŽ€äŊ“中文</a> | <a href="./README.md">English</a>
12
- </p>
13
-
14
- # 🚀 Quick Start
15
-
16
- ```typescript
17
- import { CandleView } from "./CandleView";
18
-
19
- const App = () => {
20
- return (
21
- <CandleView
22
- title="BTC/USDT"
23
- height={600}
24
- theme="dark"
25
- i18n="en"
26
- showToolbar={true}
27
- showLeftPanel={true}
28
- showTopPanel={true}
29
- timeframe="1d"
30
- timezone="America/New_York"
31
- data={klineData}
32
- />
33
- );
34
- };
35
- ```
36
-
37
- # Preview
38
-
39
- ## Theme
40
-
41
- <table>
42
- <tr>
43
- <td align="left">
44
- <h4>Dark</h4>
45
- </td>
46
- <td align="left">
47
- <h4>Light</h4>
48
- </td>
49
- </tr>
50
- <tr>
51
- <td align="center"><img src="./assets/preview_theme_dark.png" width="400"></td>
52
- <td align="center"><img src="./assets/preview_theme_light.png" width="400"></td>
53
- </tr>
54
- </table>
55
-
56
- ## I18n
57
-
58
- <table>
59
- <tr>
60
- <td align="left">
61
- <h4>En</h4>
62
- </td>
63
- <td align="left">
64
- <h4>zh-CN</h4>
65
- </td>
66
- </tr>
67
- <tr>
68
- <td align="center"><img src="./assets/preview_i18n_en.png" width="400"></td>
69
- <td align="center"><img src="./assets/preview_i18n_zh-CN.png" width="400"></td>
70
- </tr>
71
- </table>
72
-
73
- # 🔧 Configuration Options
74
-
75
- ## Props
76
-
77
- | Parameter | Type | Default | Description | Required |
78
- | ------------------------- | -------------------------------------------------------------------------------------------------------- | ----------------- | ---------------------------------------- | -------- |
79
- | `theme` | `'dark' \| 'light'` | `'dark'` | Theme mode | No |
80
- | `i18n` | `'en' \| 'zh-cn'` | `'zh-cn'` | Language setting | No |
81
- | `height` | `number \| string` | `500` | Chart height (px or percentage) | No |
82
- | `title` | `string` | `''` | Chart title displayed on the chart | Yes |
83
- | `showToolbar` | `boolean` | `true` | Show top toolbar | No |
84
- | `showLeftPanel` | `boolean` | `true` | Show left drawing tools panel | No |
85
- | `showTopPanel` | `boolean` | `true` | Show top settings panel | No |
86
- | `showIndicators` | `boolean` | `true` | Show indicators panel | No |
87
- | `timeframe` | `string` | `'1d'` | Chart timeframe (e.g., '1m', '1h', '1d') | No |
88
- | `timezone` | `string` | `'Asia/Shanghai'` | Timezone for data display | No |
89
- | `data` | `ICandleViewDataPoint[]` | `[]` | K-line data array | No |
90
- | `jsonFilePath` | `string` | `''` | Path to JSON data file | No |
91
- | `url` | `string` | `''` | URL to fetch data from | No |
92
- | `markData` | `IStaticMarkData[]` | `[]` | Pre-drawn marks data | No |
93
- | `handleScreenshotCapture` | `(imageData: { dataUrl: string; blob: Blob; width: number; height: number; timestamp: number }) => void` | `undefined` | Callback for screenshot capture | No |
94
-
95
- ## ⏰ Supported Timeframes
96
-
97
- ### Second-based Timeframes
98
-
99
- | Value | Display Name | Description |
100
- | ------- | ------------------ | ----------- |
101
- | `'1S'` | 1 į§’ / 1 Second | 1 second |
102
- | `'5S'` | 5 į§’ / 5 Seconds | 5 seconds |
103
- | `'15S'` | 15 į§’ / 15 Seconds | 15 seconds |
104
- | `'30S'` | 30 į§’ / 30 Seconds | 30 seconds |
105
-
106
- ### Minute-based Timeframes
107
-
108
- | Value | Display Name | Description |
109
- | ------- | ------------------ | ----------- |
110
- | `'1M'` | 1 分 / 1 Minute | 1 minute |
111
- | `'3M'` | 3 分 / 3 Minutes | 3 minutes |
112
- | `'5M'` | 5 分 / 5 Minutes | 5 minutes |
113
- | `'15M'` | 15 分 / 15 Minutes | 15 minutes |
114
- | `'30M'` | 30 分 / 30 Minutes | 30 minutes |
115
- | `'45M'` | 45 分 / 45 Minutes | 45 minutes |
116
-
117
- ### Hour-based Timeframes
118
-
119
- | Value | Display Name | Description |
120
- | ------- | ------------------ | ----------- |
121
- | `'1H'` | 1 小æ—ļ / 1 Hour | 1 hour |
122
- | `'2H'` | 2 小æ—ļ / 2 Hours | 2 hours |
123
- | `'3H'` | 3 小æ—ļ / 3 Hours | 3 hours |
124
- | `'4H'` | 4 小æ—ļ / 4 Hours | 4 hours |
125
- | `'6H'` | 6 小æ—ļ / 6 Hours | 6 hours |
126
- | `'8H'` | 8 小æ—ļ / 8 Hours | 8 hours |
127
- | `'12H'` | 12 小æ—ļ / 12 Hours | 12 hours |
128
-
129
- ### Day-based Timeframes
130
-
131
- | Value | Display Name | Description |
132
- | ------ | ------------- | ----------- |
133
- | `'1D'` | 1 æ—Ĩ / 1 Day | 1 day |
134
- | `'3D'` | 3 æ—Ĩ / 3 Days | 3 days |
135
-
136
- ### Week-based Timeframes
137
-
138
- | Value | Display Name | Description |
139
- | ------ | -------------- | ----------- |
140
- | `'1W'` | 1 周 / 1 Week | 1 week |
141
- | `'2W'` | 2 周 / 2 Weeks | 2 weeks |
142
-
143
- ### Month-based Timeframes
144
-
145
- | Value | Display Name | Description |
146
- | -------- | --------------- | ----------- |
147
- | `'1MON'` | 1 月 / 1 Month | 1 month |
148
- | `'3MON'` | 3 月 / 3 Months | 3 months |
149
- | `'6MON'` | 6 月 / 6 Months | 6 months |
150
-
151
- ## 🌍 Supported Timezones
152
-
153
- ### Americas
154
-
155
- | Timezone ID | Display Name | UTC Offset | Major Cities |
156
- | ----------------------- | -------------------- | ----------- | -------------------------- |
157
- | `'America/New_York'` | įēŊįēĻ / New York | UTC-5/UTC-4 | New York, Washington DC |
158
- | `'America/Chicago'` | čŠåŠ å“Ĩ / Chicago | UTC-6/UTC-5 | Chicago, Dallas |
159
- | `'America/Denver'` | 业äŊ› / Denver | UTC-7/UTC-6 | Denver, Phoenix |
160
- | `'America/Los_Angeles'` | 洛杉įŸļ / Los Angeles | UTC-8/UTC-7 | Los Angeles, San Francisco |
161
- | `'America/Toronto'` | 多äŧĻ多 / Toronto | UTC-5/UTC-4 | Toronto, Montreal |
162
-
163
- ### Europe
164
-
165
- | Timezone ID | Display Name | UTC Offset | Major Cities |
166
- | ----------------- | -------------------- | ----------- | -------------------- |
167
- | `'Europe/London'` | äŧĻæ•Ļ / London | UTC+0/UTC+1 | London, Dublin |
168
- | `'Europe/Paris'` | 厴éģŽ / Paris | UTC+1/UTC+2 | Paris, Berlin |
169
- | `'Europe/Berlin'` | æŗ•å…°å…‹įĻ / Frankfurt | UTC+1/UTC+2 | Frankfurt, Amsterdam |
170
- | `'Europe/Zurich'` | 苏éģŽä¸– / Zurich | UTC+1/UTC+2 | Zurich, Vienna |
171
- | `'Europe/Moscow'` | čŽĢæ–¯į§‘ / Moscow | UTC+3 | Moscow, Istanbul |
172
-
173
- ### Asia
174
-
175
- | Timezone ID | Display Name | UTC Offset | Major Cities |
176
- | ------------------ | ------------------ | ---------- | ----------------------- |
177
- | `'Asia/Dubai'` | čŋĒæ‹œ / Dubai | UTC+4 | Dubai, Abu Dhabi |
178
- | `'Asia/Karachi'` | åĄæ‹‰åĨ‡ / Karachi | UTC+5 | Karachi, Lahore |
179
- | `'Asia/Kolkata'` | åŠ å°”å„į­” / Kolkata | UTC+5:30 | Kolkata, Mumbai |
180
- | `'Asia/Shanghai'` | 上æĩˇ / Shanghai | UTC+8 | Shanghai, Beijing |
181
- | `'Asia/Hong_Kong'` | éĻ™æ¸¯ / Hong Kong | UTC+8 | Hong Kong, Macau |
182
- | `'Asia/Singapore'` | æ–°åŠ åĄ / Singapore | UTC+8 | Singapore, Kuala Lumpur |
183
- | `'Asia/Tokyo'` | 东äēŦ / Tokyo | UTC+9 | Tokyo, Seoul |
184
- | `'Asia/Seoul'` | éĻ–å°” / Seoul | UTC+9 | Seoul, Pyongyang |
185
-
186
- ### Pacific
187
-
188
- | Timezone ID | Display Name | UTC Offset | Major Cities |
189
- | -------------------- | ----------------- | ------------- | -------------------- |
190
- | `'Australia/Sydney'` | 悉å°ŧ / Sydney | UTC+10/UTC+11 | Sydney, Melbourne |
191
- | `'Pacific/Auckland'` | åĨĨ克兰 / Auckland | UTC+12/UTC+13 | Auckland, Wellington |
192
-
193
- ### Global
194
-
195
- | Timezone ID | Display Name | UTC Offset | Description |
196
- | ----------- | ------------ | ---------- | -------------------------- |
197
- | `'UTC'` | UTC / UTC | UTC+0 | Coordinated Universal Time |
198
-
199
- ## 📄 Data structure
200
-
201
- ```typescript
202
- interface ICandleViewDataPoint {
203
- time: number; // timestamp in seconds
204
- open: number;
205
- high: number;
206
- low: number;
207
- close: number;
208
- volume?: number;
209
- }
210
-
211
- export interface IStaticMarkData {
212
- time: number;
213
- type: string;
214
- data: {
215
- direction: string;
216
- text: string;
217
- fontSize?: number;
218
- textColor?: string;
219
- backgroundColor?: string;
220
- isCircular?: boolean;
221
- padding?: number;
222
- }[];
223
- }
224
- ```
225
-
226
- # 🌟 Core Features
227
-
228
- ## 📈 Supported Technical Indicators
229
-
230
- ### Main Chart Indicators
231
-
232
- - Moving Average (MA)
233
- - Exponential Moving Average (EMA)
234
- - Bollinger Bands
235
- - Ichimoku Cloud
236
- - Donchian Channel
237
- - Envelope
238
- - Volume Weighted Average Price (VWAP)
239
- - Heat Map
240
- - Market Profile
241
-
242
- ### Sub Chart Indicators
243
-
244
- - Relative Strength Index (RSI)
245
- - Moving Average Convergence Divergence (MACD)
246
- - Volume
247
- - Parabolic SAR
248
- - KDJ Indicator
249
- - Average True Range (ATR)
250
- - Stochastic Oscillator
251
- - Commodity Channel Index (CCI)
252
- - Bollinger Bands Width
253
- - Average Directional Index (ADX)
254
- - On Balance Volume (OBV)
255
-
256
- ## 🎨 Supported Drawing Tools
257
-
258
- ### Basic Tools
259
-
260
- - Pencil, Pen, Brush, Marker Pen, Eraser
261
- - Line Segment, Horizontal Line, Vertical Line
262
- - Arrow Line, Thick Arrow Line
263
-
264
- ### Channel Tools
265
-
266
- - Parallel Channel
267
- - Linear Regression Channel
268
- - Equidistant Channel
269
- - Disjoint Channel
270
-
271
- ### Fibonacci Tools
272
-
273
- - Fibonacci Retracement
274
- - Fibonacci Time Zones
275
- - Fibonacci Arc
276
- - Fibonacci Circle
277
- - Fibonacci Spiral
278
- - Fibonacci Fan
279
- - Fibonacci Channel
280
- - Fibonacci Price Extension
281
- - Fibonacci Time Extension
282
-
283
- ### Gann Tools
284
-
285
- - Gann Fan
286
- - Gann Box
287
- - Gann Rectangle
288
-
289
- ### Pattern Tools
290
-
291
- - Andrew Pitchfork
292
- - Enhanced Andrew Pitchfork
293
- - Schiff Pitchfork
294
- - XABCD Pattern
295
- - Head and Shoulders
296
- - ABCD Pattern
297
- - Triangle ABCD Pattern
298
-
299
- ### Elliott Wave
300
-
301
- - Elliott Impulse Wave
302
- - Elliott Corrective Wave
303
- - Elliott Triangle
304
- - Elliott Double Combination
305
- - Elliott Triple Combination
306
-
307
- ### Geometric Shapes
308
-
309
- - Rectangle, Circle, Ellipse, Triangle
310
- - Sector, Curve, Double Curve
311
-
312
- ### Annotation Tools
313
-
314
- - Text Annotation, Price Note
315
- - Bubble Box, Pin, Signpost
316
- - Price Label, Flag Mark
317
- - Image Insertion
318
-
319
- ### Range Tools
320
-
321
- - Time Range, Price Range
322
- - Time-Price Range
323
- - Heat Map
324
-
325
- ### Trading Tools
326
-
327
- - Long Position, Short Position
328
- - Mock K-line
329
-
330
- ## ⏰ Supported Timeframes
331
-
332
- ### Second-based
333
-
334
- - 1s, 5s, 15s, 30s
335
-
336
- ### Minute-based
337
-
338
- - 1m, 3m, 5m, 15m
339
- - 30m, 45m
340
-
341
- ### Hour-based
342
-
343
- - 1h, 2h, 3h, 4h
344
- - 6h, 8h, 12h
345
-
346
- ### Day-based
347
-
348
- - 1d, 3d
349
-
350
- ### Week-based
351
-
352
- - 1w, 2w
353
-
354
- ### Month-based
355
-
356
- - 1M, 3M, 6M
357
-
358
- ## 🌍 Supported Timezones
359
-
360
- - New York (America/New_York)
361
- - Chicago (America/Chicago)
362
- - Denver (America/Denver)
363
- - Los Angeles (America/Los_Angeles)
364
- - Toronto (America/Toronto)
365
- - London (Europe/London)
366
- - Paris (Europe/Paris)
367
- - Frankfurt (Europe/Berlin)
368
- - Zurich (Europe/Zurich)
369
- - Moscow (Europe/Moscow)
370
- - Dubai (Asia/Dubai)
371
- - Karachi (Asia/Karachi)
372
- - Kolkata (Asia/Kolkata)
373
- - Shanghai (Asia/Shanghai)
374
- - Hong Kong (Asia/Hong_Kong)
375
- - Singapore (Asia/Singapore)
376
- - Tokyo (Asia/Tokyo)
377
- - Seoul (Asia/Seoul)
378
- - Sydney (Australia/Sydney)
379
- - Auckland (Pacific/Auckland)
380
- - UTC
381
-
382
- ## đŸŽ¯ Supported Chart Types
383
-
384
- - Candlestick Chart
385
- - Hollow Candlestick Chart
386
- - Bar Chart (OHLC)
387
- - BaseLine Chart
388
- - Line Chart
389
- - Area Chart
390
- - Step Line Chart
391
- - Heikin Ashi Chart
392
- - Histogram Chart
393
- - Line Break Chart
394
- - Mountain Chart
395
- - Baseline Area Chart
396
- - High Low Chart
397
- - HLCArea Chart
1
+ <h1 align="center">
2
+ 📊 CandleView
3
+ </h1>
4
+ <h4 align="center">
5
+ Chart engine in the financial field.
6
+ </h4>
7
+ <p align="center">
8
+ <a href="https://https://github.com/0xhappyboy/candleview/LICENSE"><img src="https://img.shields.io/badge/License-AGPL3.0-d1d1f6.svg?style=flat&labelColor=1C2C2E&color=BEC5C9&logo=googledocs&label=license&logoColor=BEC5C9" alt="License"></a>
9
+ </p>
10
+ <p align="center">
11
+ <a href="./README_zh-CN.md">įŽ€äŊ“中文</a> | <a href="./README.md">English</a>
12
+ </p>
13
+
14
+ # 🚀 Quick Start
15
+
16
+ ```typescript
17
+ import { CandleView } from "./CandleView";
18
+
19
+ const App = () => {
20
+ return (
21
+ <CandleView
22
+ title="BTC/USDT"
23
+ height={600}
24
+ theme="dark"
25
+ i18n="en"
26
+ showToolbar={true}
27
+ showLeftPanel={true}
28
+ showTopPanel={true}
29
+ timeframe="1d"
30
+ timezone="America/New_York"
31
+ data={klineData}
32
+ />
33
+ );
34
+ };
35
+ ```
36
+
37
+ # Preview
38
+
39
+ ## Draw Graphics
40
+
41
+ ### Fibonacci
42
+
43
+ <table>
44
+ <tr>
45
+ <td align="left">
46
+ <h4>Arc</h4>
47
+ </td>
48
+ <td align="left">
49
+ <h4>Channel</h4>
50
+ </td>
51
+ <td align="left">
52
+ <h4>Circle</h4>
53
+ </td>
54
+ </tr>
55
+ <tr>
56
+ <td align="center"><img src="./assets/fibonacci/fibonacci-arc.png" width="400"></td>
57
+ <td align="center"><img src="./assets/fibonacci/fibonacci-channel.png" width="400"></td>
58
+ <td align="center"><img src="./assets/fibonacci/fibonacci-circle.png" width="400"></td>
59
+ </tr>
60
+ <tr>
61
+ <td align="left">
62
+ <h4>Fan</h4>
63
+ </td>
64
+ <td align="left">
65
+ <h4>Price Extension</h4>
66
+ </td>
67
+ <td align="left">
68
+ <h4>Retracement</h4>
69
+ </td>
70
+ </tr>
71
+ <tr>
72
+ <td align="center"><img src="./assets/fibonacci/fibonacci-fan.png" width="400"></td>
73
+ <td align="center"><img src="./assets/fibonacci/fibonacci-price-extension.png" width="400"></td>
74
+ <td align="center"><img src="./assets/fibonacci/fibonacci-retracement.png" width="400"></td>
75
+ </tr>
76
+ <tr>
77
+ <td align="left">
78
+ <h4>Spiral</h4>
79
+ </td>
80
+ <td align="left">
81
+ <h4>Time Expansion</h4>
82
+ </td>
83
+ <td align="left">
84
+ <h4>Time Zoon</h4>
85
+ </td>
86
+ </tr>
87
+ <tr>
88
+ <td align="center"><img src="./assets/fibonacci/fibonacci-spiral.png" width="400"></td>
89
+ <td align="center"><img src="./assets/fibonacci/fibonacci-time-expansion.png" width="400"></td>
90
+ <td align="center"><img src="./assets/fibonacci/fibonacci-time-zoon.png" width="400"></td>
91
+ </tr>
92
+ <tr>
93
+ <td align="left">
94
+ <h4>Wedge</h4>
95
+ </td>
96
+ <td align="left">
97
+ </td>
98
+ <td align="left">
99
+ </td>
100
+ </tr>
101
+ <tr>
102
+ <td align="center"><img src="./assets/fibonacci/fibonacci-wedge.png" width="400"></td>
103
+ </tr>
104
+ </table>
105
+
106
+ ### Gann
107
+
108
+ <table>
109
+ <tr>
110
+ <td align="left">
111
+ <h4>Box</h4>
112
+ </td>
113
+ <td align="left">
114
+ <h4>Fan</h4>
115
+ </td>
116
+ <td align="left">
117
+ <h4>Rectangle</h4>
118
+ </td>
119
+ </tr>
120
+ <tr>
121
+ <td align="center"><img src="./assets/gann/gann-box.png" width="400"></td>
122
+ <td align="center"><img src="./assets/gann/gann-fan.png" width="400"></td>
123
+ <td align="center"><img src="./assets/gann//gann-rectangle.png" width="400"></td>
124
+ </tr>
125
+ </table>
126
+
127
+ ### Mark
128
+
129
+ <table>
130
+ <tr>
131
+ <td align="left">
132
+ <h4>Mark</h4>
133
+ </td>
134
+ </tr>
135
+ <tr>
136
+ <td align="center"><img src="./assets/mark.png" width="400"></td>
137
+ </tr>
138
+ </table>
139
+
140
+ ## Theme
141
+
142
+ <table>
143
+ <tr>
144
+ <td align="left">
145
+ <h4>Dark</h4>
146
+ </td>
147
+ <td align="left">
148
+ <h4>Light</h4>
149
+ </td>
150
+ </tr>
151
+ <tr>
152
+ <td align="center"><img src="./assets/preview_theme_dark.png" width="400"></td>
153
+ <td align="center"><img src="./assets/preview_theme_light.png" width="400"></td>
154
+ </tr>
155
+ </table>
156
+
157
+ ## I18n
158
+
159
+ <table>
160
+ <tr>
161
+ <td align="left">
162
+ <h4>En</h4>
163
+ </td>
164
+ <td align="left">
165
+ <h4>zh-CN</h4>
166
+ </td>
167
+ </tr>
168
+ <tr>
169
+ <td align="center"><img src="./assets/preview_i18n_en.png" width="400"></td>
170
+ <td align="center"><img src="./assets/preview_i18n_zh-CN.png" width="400"></td>
171
+ </tr>
172
+ </table>
173
+
174
+ # 🔧 Configuration Options
175
+
176
+ ## Props
177
+
178
+ | Parameter | Type | Default | Description | Required |
179
+ | ------------------------- | -------------------------------------------------------------------------------------------------------- | ----------------- | ---------------------------------------- | -------- |
180
+ | `theme` | `'dark' \| 'light'` | `'dark'` | Theme mode | No |
181
+ | `i18n` | `'en' \| 'zh-cn'` | `'zh-cn'` | Language setting | No |
182
+ | `height` | `number \| string` | `500` | Chart height (px or percentage) | No |
183
+ | `title` | `string` | `''` | Chart title displayed on the chart | Yes |
184
+ | `showToolbar` | `boolean` | `true` | Show top toolbar | No |
185
+ | `showLeftPanel` | `boolean` | `true` | Show left drawing tools panel | No |
186
+ | `showTopPanel` | `boolean` | `true` | Show top settings panel | No |
187
+ | `showIndicators` | `boolean` | `true` | Show indicators panel | No |
188
+ | `timeframe` | `string` | `'1d'` | Chart timeframe (e.g., '1m', '1h', '1d') | No |
189
+ | `timezone` | `string` | `'Asia/Shanghai'` | Timezone for data display | No |
190
+ | `data` | `ICandleViewDataPoint[]` | `[]` | K-line data array | No |
191
+ | `jsonFilePath` | `string` | `''` | Path to JSON data file | No |
192
+ | `url` | `string` | `''` | URL to fetch data from | No |
193
+ | `markData` | `IStaticMarkData[]` | `[]` | Pre-drawn marks data | No |
194
+ | `handleScreenshotCapture` | `(imageData: { dataUrl: string; blob: Blob; width: number; height: number; timestamp: number }) => void` | `undefined` | Callback for screenshot capture | No |
195
+
196
+ ## ⏰ Supported Timeframes
197
+
198
+ ### Second-based Timeframes
199
+
200
+ | Value | Display Name | Description |
201
+ | ------- | ------------------ | ----------- |
202
+ | `'1S'` | 1 į§’ / 1 Second | 1 second |
203
+ | `'5S'` | 5 į§’ / 5 Seconds | 5 seconds |
204
+ | `'15S'` | 15 į§’ / 15 Seconds | 15 seconds |
205
+ | `'30S'` | 30 į§’ / 30 Seconds | 30 seconds |
206
+
207
+ ### Minute-based Timeframes
208
+
209
+ | Value | Display Name | Description |
210
+ | ------- | ------------------ | ----------- |
211
+ | `'1M'` | 1 分 / 1 Minute | 1 minute |
212
+ | `'3M'` | 3 分 / 3 Minutes | 3 minutes |
213
+ | `'5M'` | 5 分 / 5 Minutes | 5 minutes |
214
+ | `'15M'` | 15 分 / 15 Minutes | 15 minutes |
215
+ | `'30M'` | 30 分 / 30 Minutes | 30 minutes |
216
+ | `'45M'` | 45 分 / 45 Minutes | 45 minutes |
217
+
218
+ ### Hour-based Timeframes
219
+
220
+ | Value | Display Name | Description |
221
+ | ------- | ------------------ | ----------- |
222
+ | `'1H'` | 1 小æ—ļ / 1 Hour | 1 hour |
223
+ | `'2H'` | 2 小æ—ļ / 2 Hours | 2 hours |
224
+ | `'3H'` | 3 小æ—ļ / 3 Hours | 3 hours |
225
+ | `'4H'` | 4 小æ—ļ / 4 Hours | 4 hours |
226
+ | `'6H'` | 6 小æ—ļ / 6 Hours | 6 hours |
227
+ | `'8H'` | 8 小æ—ļ / 8 Hours | 8 hours |
228
+ | `'12H'` | 12 小æ—ļ / 12 Hours | 12 hours |
229
+
230
+ ### Day-based Timeframes
231
+
232
+ | Value | Display Name | Description |
233
+ | ------ | ------------- | ----------- |
234
+ | `'1D'` | 1 æ—Ĩ / 1 Day | 1 day |
235
+ | `'3D'` | 3 æ—Ĩ / 3 Days | 3 days |
236
+
237
+ ### Week-based Timeframes
238
+
239
+ | Value | Display Name | Description |
240
+ | ------ | -------------- | ----------- |
241
+ | `'1W'` | 1 周 / 1 Week | 1 week |
242
+ | `'2W'` | 2 周 / 2 Weeks | 2 weeks |
243
+
244
+ ### Month-based Timeframes
245
+
246
+ | Value | Display Name | Description |
247
+ | -------- | --------------- | ----------- |
248
+ | `'1MON'` | 1 月 / 1 Month | 1 month |
249
+ | `'3MON'` | 3 月 / 3 Months | 3 months |
250
+ | `'6MON'` | 6 月 / 6 Months | 6 months |
251
+
252
+ ## 🌍 Supported Timezones
253
+
254
+ ### Americas
255
+
256
+ | Timezone ID | Display Name | UTC Offset | Major Cities |
257
+ | ----------------------- | -------------------- | ----------- | -------------------------- |
258
+ | `'America/New_York'` | įēŊįēĻ / New York | UTC-5/UTC-4 | New York, Washington DC |
259
+ | `'America/Chicago'` | čŠåŠ å“Ĩ / Chicago | UTC-6/UTC-5 | Chicago, Dallas |
260
+ | `'America/Denver'` | 业äŊ› / Denver | UTC-7/UTC-6 | Denver, Phoenix |
261
+ | `'America/Los_Angeles'` | 洛杉įŸļ / Los Angeles | UTC-8/UTC-7 | Los Angeles, San Francisco |
262
+ | `'America/Toronto'` | 多äŧĻ多 / Toronto | UTC-5/UTC-4 | Toronto, Montreal |
263
+
264
+ ### Europe
265
+
266
+ | Timezone ID | Display Name | UTC Offset | Major Cities |
267
+ | ----------------- | -------------------- | ----------- | -------------------- |
268
+ | `'Europe/London'` | äŧĻæ•Ļ / London | UTC+0/UTC+1 | London, Dublin |
269
+ | `'Europe/Paris'` | 厴éģŽ / Paris | UTC+1/UTC+2 | Paris, Berlin |
270
+ | `'Europe/Berlin'` | æŗ•å…°å…‹įĻ / Frankfurt | UTC+1/UTC+2 | Frankfurt, Amsterdam |
271
+ | `'Europe/Zurich'` | 苏éģŽä¸– / Zurich | UTC+1/UTC+2 | Zurich, Vienna |
272
+ | `'Europe/Moscow'` | čŽĢæ–¯į§‘ / Moscow | UTC+3 | Moscow, Istanbul |
273
+
274
+ ### Asia
275
+
276
+ | Timezone ID | Display Name | UTC Offset | Major Cities |
277
+ | ------------------ | ------------------ | ---------- | ----------------------- |
278
+ | `'Asia/Dubai'` | čŋĒæ‹œ / Dubai | UTC+4 | Dubai, Abu Dhabi |
279
+ | `'Asia/Karachi'` | åĄæ‹‰åĨ‡ / Karachi | UTC+5 | Karachi, Lahore |
280
+ | `'Asia/Kolkata'` | åŠ å°”å„į­” / Kolkata | UTC+5:30 | Kolkata, Mumbai |
281
+ | `'Asia/Shanghai'` | 上æĩˇ / Shanghai | UTC+8 | Shanghai, Beijing |
282
+ | `'Asia/Hong_Kong'` | éĻ™æ¸¯ / Hong Kong | UTC+8 | Hong Kong, Macau |
283
+ | `'Asia/Singapore'` | æ–°åŠ åĄ / Singapore | UTC+8 | Singapore, Kuala Lumpur |
284
+ | `'Asia/Tokyo'` | 东äēŦ / Tokyo | UTC+9 | Tokyo, Seoul |
285
+ | `'Asia/Seoul'` | éĻ–å°” / Seoul | UTC+9 | Seoul, Pyongyang |
286
+
287
+ ### Pacific
288
+
289
+ | Timezone ID | Display Name | UTC Offset | Major Cities |
290
+ | -------------------- | ----------------- | ------------- | -------------------- |
291
+ | `'Australia/Sydney'` | 悉å°ŧ / Sydney | UTC+10/UTC+11 | Sydney, Melbourne |
292
+ | `'Pacific/Auckland'` | åĨĨ克兰 / Auckland | UTC+12/UTC+13 | Auckland, Wellington |
293
+
294
+ ### Global
295
+
296
+ | Timezone ID | Display Name | UTC Offset | Description |
297
+ | ----------- | ------------ | ---------- | -------------------------- |
298
+ | `'UTC'` | UTC / UTC | UTC+0 | Coordinated Universal Time |
299
+
300
+ ## 📄 Data structure
301
+
302
+ ```typescript
303
+ interface ICandleViewDataPoint {
304
+ time: number; // timestamp in seconds
305
+ open: number;
306
+ high: number;
307
+ low: number;
308
+ close: number;
309
+ volume?: number;
310
+ }
311
+
312
+ export interface IStaticMarkData {
313
+ time: number;
314
+ type: string;
315
+ data: {
316
+ direction: string;
317
+ text: string;
318
+ fontSize?: number;
319
+ textColor?: string;
320
+ backgroundColor?: string;
321
+ isCircular?: boolean;
322
+ padding?: number;
323
+ }[];
324
+ }
325
+ ```
326
+
327
+ # 🌟 Core Features
328
+
329
+ ## 📈 Supported Technical Indicators
330
+
331
+ ### Main Chart Indicators
332
+
333
+ - Moving Average (MA)
334
+ - Exponential Moving Average (EMA)
335
+ - Bollinger Bands
336
+ - Ichimoku Cloud
337
+ - Donchian Channel
338
+ - Envelope
339
+ - Volume Weighted Average Price (VWAP)
340
+ - Heat Map
341
+ - Market Profile
342
+
343
+ ### Sub Chart Indicators
344
+
345
+ - Relative Strength Index (RSI)
346
+ - Moving Average Convergence Divergence (MACD)
347
+ - Volume
348
+ - Parabolic SAR
349
+ - KDJ Indicator
350
+ - Average True Range (ATR)
351
+ - Stochastic Oscillator
352
+ - Commodity Channel Index (CCI)
353
+ - Bollinger Bands Width
354
+ - Average Directional Index (ADX)
355
+ - On Balance Volume (OBV)
356
+
357
+ ## 🎨 Supported Drawing Tools
358
+
359
+ ### Basic Tools
360
+
361
+ - Pencil, Pen, Brush, Marker Pen, Eraser
362
+ - Line Segment, Horizontal Line, Vertical Line
363
+ - Arrow Line, Thick Arrow Line
364
+
365
+ ### Channel Tools
366
+
367
+ - Parallel Channel
368
+ - Linear Regression Channel
369
+ - Equidistant Channel
370
+ - Disjoint Channel
371
+
372
+ ### Fibonacci Tools
373
+
374
+ - Fibonacci Retracement
375
+ - Fibonacci Time Zones
376
+ - Fibonacci Arc
377
+ - Fibonacci Circle
378
+ - Fibonacci Spiral
379
+ - Fibonacci Fan
380
+ - Fibonacci Channel
381
+ - Fibonacci Price Extension
382
+ - Fibonacci Time Extension
383
+
384
+ ### Gann Tools
385
+
386
+ - Gann Fan
387
+ - Gann Box
388
+ - Gann Rectangle
389
+
390
+ ### Pattern Tools
391
+
392
+ - Andrew Pitchfork
393
+ - Enhanced Andrew Pitchfork
394
+ - Schiff Pitchfork
395
+ - XABCD Pattern
396
+ - Head and Shoulders
397
+ - ABCD Pattern
398
+ - Triangle ABCD Pattern
399
+
400
+ ### Elliott Wave
401
+
402
+ - Elliott Impulse Wave
403
+ - Elliott Corrective Wave
404
+ - Elliott Triangle
405
+ - Elliott Double Combination
406
+ - Elliott Triple Combination
407
+
408
+ ### Geometric Shapes
409
+
410
+ - Rectangle, Circle, Ellipse, Triangle
411
+ - Sector, Curve, Double Curve
412
+
413
+ ### Annotation Tools
414
+
415
+ - Text Annotation, Price Note
416
+ - Bubble Box, Pin, Signpost
417
+ - Price Label, Flag Mark
418
+ - Image Insertion
419
+
420
+ ### Range Tools
421
+
422
+ - Time Range, Price Range
423
+ - Time-Price Range
424
+ - Heat Map
425
+
426
+ ### Trading Tools
427
+
428
+ - Long Position, Short Position
429
+ - Mock K-line
430
+
431
+ ## ⏰ Supported Timeframes
432
+
433
+ ### Second-based
434
+
435
+ - 1s, 5s, 15s, 30s
436
+
437
+ ### Minute-based
438
+
439
+ - 1m, 3m, 5m, 15m
440
+ - 30m, 45m
441
+
442
+ ### Hour-based
443
+
444
+ - 1h, 2h, 3h, 4h
445
+ - 6h, 8h, 12h
446
+
447
+ ### Day-based
448
+
449
+ - 1d, 3d
450
+
451
+ ### Week-based
452
+
453
+ - 1w, 2w
454
+
455
+ ### Month-based
456
+
457
+ - 1M, 3M, 6M
458
+
459
+ ## 🌍 Supported Timezones
460
+
461
+ - New York (America/New_York)
462
+ - Chicago (America/Chicago)
463
+ - Denver (America/Denver)
464
+ - Los Angeles (America/Los_Angeles)
465
+ - Toronto (America/Toronto)
466
+ - London (Europe/London)
467
+ - Paris (Europe/Paris)
468
+ - Frankfurt (Europe/Berlin)
469
+ - Zurich (Europe/Zurich)
470
+ - Moscow (Europe/Moscow)
471
+ - Dubai (Asia/Dubai)
472
+ - Karachi (Asia/Karachi)
473
+ - Kolkata (Asia/Kolkata)
474
+ - Shanghai (Asia/Shanghai)
475
+ - Hong Kong (Asia/Hong_Kong)
476
+ - Singapore (Asia/Singapore)
477
+ - Tokyo (Asia/Tokyo)
478
+ - Seoul (Asia/Seoul)
479
+ - Sydney (Australia/Sydney)
480
+ - Auckland (Pacific/Auckland)
481
+ - UTC
482
+
483
+ ## đŸŽ¯ Supported Chart Types
484
+
485
+ - Candlestick Chart
486
+ - Hollow Candlestick Chart
487
+ - Bar Chart (OHLC)
488
+ - BaseLine Chart
489
+ - Line Chart
490
+ - Area Chart
491
+ - Step Line Chart
492
+ - Heikin Ashi Chart
493
+ - Histogram Chart
494
+ - Line Break Chart
495
+ - Mountain Chart
496
+ - Baseline Area Chart
497
+ - High Low Chart
498
+ - HLCArea Chart