@guihz/trading-vue-editor-tes 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +30 -0
- package/lib/App.d.ts +3 -0
- package/lib/api/api.d.ts +1 -0
- package/lib/api/server.d.ts +8 -0
- package/lib/assets/parserTccWorker-CFBnUzVu.js +99 -0
- package/lib/assets/scriptsRunWorker-CSDMAOri.js +66 -0
- package/lib/components/editor/config/monarchTokens.d.ts +205 -0
- package/lib/components/editor/constants/contents.d.ts +40 -0
- package/lib/components/editor/constants/locals.d.ts +3 -0
- package/lib/components/editor/index.d.ts +21 -0
- package/lib/components/editor/parseScript/buildInConstants.d.ts +252 -0
- package/lib/components/editor/parseScript/buildInFuncNamespace/array.d.ts +144 -0
- package/lib/components/editor/parseScript/buildInFuncNamespace/color.d.ts +25 -0
- package/lib/components/editor/parseScript/buildInFuncNamespace/errorListener.d.ts +8 -0
- package/lib/components/editor/parseScript/buildInFuncNamespace/index.d.ts +12 -0
- package/lib/components/editor/parseScript/buildInFuncNamespace/input.d.ts +70 -0
- package/lib/components/editor/parseScript/buildInFuncNamespace/map.d.ts +37 -0
- package/lib/components/editor/parseScript/buildInFuncNamespace/math.d.ts +47 -0
- package/lib/components/editor/parseScript/buildInFuncNamespace/matrix.d.ts +136 -0
- package/lib/components/editor/parseScript/buildInFuncNamespace/string.d.ts +43 -0
- package/lib/components/editor/parseScript/buildInFuncNamespace/ta.d.ts +116 -0
- package/lib/components/editor/parseScript/buildInFuncNamespace/timeframe.d.ts +19 -0
- package/lib/components/editor/parseScript/buildInVariables.d.ts +122 -0
- package/lib/components/editor/parseScript/constants.d.ts +56 -0
- package/lib/components/editor/parseScript/enum.d.ts +248 -0
- package/lib/components/editor/parseScript/parseToJs.d.ts +44 -0
- package/lib/components/editor/parseScript/type.d.ts +27 -0
- package/lib/components/editor/parseScript/userTypeClass.d.ts +12 -0
- package/lib/components/editor/parseScript/utils.d.ts +8 -0
- package/lib/components/editor/parseScript/visitorParser.d.ts +303 -0
- package/lib/components/editor/parseScript/visitorUtils.d.ts +30 -0
- package/lib/components/editor/parseScript/workerStorage.d.ts +12 -0
- package/lib/components/editor/tokenizer/config.d.ts +40 -0
- package/lib/components/editor/tokenizer/utils.d.ts +33 -0
- package/lib/components/editor/type/index.d.ts +70 -0
- package/lib/components/editor/utils/color.d.ts +33 -0
- package/lib/components/editor/utils/completions.d.ts +61 -0
- package/lib/components/editor/utils/decorations.d.ts +23 -0
- package/lib/components/editor/utils/initEditor.d.ts +23 -0
- package/lib/components/editor/utils/overlayWidgets.d.ts +22 -0
- package/lib/components/editor/utils/parse.d.ts +43 -0
- package/lib/components/editor/utils/parserTccWorker.d.ts +25 -0
- package/lib/components/editor/utils/signatureHelp.d.ts +29 -0
- package/lib/components/editor/utils/suggestions.d.ts +18 -0
- package/lib/components/editor/utils/test.d.ts +22 -0
- package/lib/components/editor/utils/tools.d.ts +1 -0
- package/lib/main.d.ts +1 -0
- package/lib/packages/index.d.ts +5 -0
- package/lib/tccParser/LexerBase.d.ts +19 -0
- package/lib/tccParser/tccScriptParserVisitor.d.ts +486 -0
- package/lib/trading-vue-editor.js +64939 -0
- package/lib/trading-vue-editor.umd.cjs +144 -0
- package/package.json +53 -0
@@ -0,0 +1,205 @@
|
|
1
|
+
import { languages, editor } from 'monaco-editor';
|
2
|
+
export declare const LANGAGE_NAME = "tccScript";
|
3
|
+
export declare const LANGUAGE_MONARCH_TOKENS: languages.IMonarchLanguage;
|
4
|
+
export declare const CONFIGURATION: languages.LanguageConfiguration;
|
5
|
+
export declare const COLORS: {
|
6
|
+
"color-white": string;
|
7
|
+
"color-black": string;
|
8
|
+
"color-transparent": string;
|
9
|
+
"color-cold-gray-50": string;
|
10
|
+
"color-cold-gray-100": string;
|
11
|
+
"color-cold-gray-150": string;
|
12
|
+
"color-cold-gray-200": string;
|
13
|
+
"color-cold-gray-250": string;
|
14
|
+
"color-cold-gray-300": string;
|
15
|
+
"color-cold-gray-350": string;
|
16
|
+
"color-cold-gray-400": string;
|
17
|
+
"color-cold-gray-450": string;
|
18
|
+
"color-cold-gray-500": string;
|
19
|
+
"color-cold-gray-550": string;
|
20
|
+
"color-cold-gray-600": string;
|
21
|
+
"color-cold-gray-650": string;
|
22
|
+
"color-cold-gray-700": string;
|
23
|
+
"color-cold-gray-750": string;
|
24
|
+
"color-cold-gray-800": string;
|
25
|
+
"color-cold-gray-850": string;
|
26
|
+
"color-cold-gray-900": string;
|
27
|
+
"color-cold-gray-950": string;
|
28
|
+
"color-ripe-red-50": string;
|
29
|
+
"color-ripe-red-100": string;
|
30
|
+
"color-ripe-red-200": string;
|
31
|
+
"color-ripe-red-300": string;
|
32
|
+
"color-ripe-red-400": string;
|
33
|
+
"color-ripe-red-500": string;
|
34
|
+
"color-ripe-red-600": string;
|
35
|
+
"color-ripe-red-700": string;
|
36
|
+
"color-ripe-red-800": string;
|
37
|
+
"color-ripe-red-900": string;
|
38
|
+
"color-ripe-red-a100": string;
|
39
|
+
"color-ripe-red-a200": string;
|
40
|
+
"color-ripe-red-a400": string;
|
41
|
+
"color-ripe-red-a600": string;
|
42
|
+
"color-ripe-red-a700": string;
|
43
|
+
"color-ripe-red-a800": string;
|
44
|
+
"color-ripe-red-a900": string;
|
45
|
+
"color-tan-orange-50": string;
|
46
|
+
"color-tan-orange-100": string;
|
47
|
+
"color-tan-orange-200": string;
|
48
|
+
"color-tan-orange-300": string;
|
49
|
+
"color-tan-orange-400": string;
|
50
|
+
"color-tan-orange-500": string;
|
51
|
+
"color-tan-orange-600": string;
|
52
|
+
"color-tan-orange-700": string;
|
53
|
+
"color-tan-orange-800": string;
|
54
|
+
"color-tan-orange-900": string;
|
55
|
+
"color-tan-orange-a200": string;
|
56
|
+
"color-tan-orange-a400": string;
|
57
|
+
"color-tan-orange-a600": string;
|
58
|
+
"color-tan-orange-a700": string;
|
59
|
+
"color-tan-orange-a800": string;
|
60
|
+
"color-tan-orange-a900": string;
|
61
|
+
"color-iguana-green-100": string;
|
62
|
+
"color-iguana-green-200": string;
|
63
|
+
"color-iguana-green-300": string;
|
64
|
+
"color-iguana-green-400": string;
|
65
|
+
"color-iguana-green-500": string;
|
66
|
+
"color-iguana-green-600": string;
|
67
|
+
"color-iguana-green-700": string;
|
68
|
+
"color-iguana-green-800": string;
|
69
|
+
"color-iguana-green-900": string;
|
70
|
+
"color-iguana-green-a700": string;
|
71
|
+
"color-banana-yellow-100": string;
|
72
|
+
"color-banana-yellow-200": string;
|
73
|
+
"color-banana-yellow-300": string;
|
74
|
+
"color-banana-yellow-400": string;
|
75
|
+
"color-banana-yellow-500": string;
|
76
|
+
"color-banana-yellow-600": string;
|
77
|
+
"color-banana-yellow-700": string;
|
78
|
+
"color-banana-yellow-800": string;
|
79
|
+
"color-banana-yellow-900": string;
|
80
|
+
"color-banana-yellow-a400": string;
|
81
|
+
"color-banana-yellow-a700": string;
|
82
|
+
"color-tv-blue-50": string;
|
83
|
+
"color-tv-blue-100": string;
|
84
|
+
"color-tv-blue-200": string;
|
85
|
+
"color-tv-blue-300": string;
|
86
|
+
"color-tv-blue-400": string;
|
87
|
+
"color-tv-blue-500": string;
|
88
|
+
"color-tv-blue-600": string;
|
89
|
+
"color-tv-blue-700": string;
|
90
|
+
"color-tv-blue-800": string;
|
91
|
+
"color-tv-blue-900": string;
|
92
|
+
"color-tv-blue-a100": string;
|
93
|
+
"color-tv-blue-a200": string;
|
94
|
+
"color-tv-blue-a400": string;
|
95
|
+
"color-tv-blue-a600": string;
|
96
|
+
"color-tv-blue-a700": string;
|
97
|
+
"color-tv-blue-a800": string;
|
98
|
+
"color-tv-blue-a900": string;
|
99
|
+
"color-deep-blue-50": string;
|
100
|
+
"color-deep-blue-100": string;
|
101
|
+
"color-deep-blue-200": string;
|
102
|
+
"color-deep-blue-300": string;
|
103
|
+
"color-deep-blue-400": string;
|
104
|
+
"color-deep-blue-500": string;
|
105
|
+
"color-deep-blue-700": string;
|
106
|
+
"color-deep-blue-800": string;
|
107
|
+
"color-deep-blue-900": string;
|
108
|
+
"color-deep-blue-a100": string;
|
109
|
+
"color-deep-blue-a200": string;
|
110
|
+
"color-deep-blue-a400": string;
|
111
|
+
"color-deep-blue-a700": string;
|
112
|
+
"color-minty-green-50": string;
|
113
|
+
"color-minty-green-100": string;
|
114
|
+
"color-minty-green-200": string;
|
115
|
+
"color-minty-green-300": string;
|
116
|
+
"color-minty-green-400": string;
|
117
|
+
"color-minty-green-500": string;
|
118
|
+
"color-minty-green-600": string;
|
119
|
+
"color-minty-green-700": string;
|
120
|
+
"color-minty-green-800": string;
|
121
|
+
"color-minty-green-900": string;
|
122
|
+
"color-minty-green-a400": string;
|
123
|
+
"color-minty-green-a600": string;
|
124
|
+
"color-minty-green-a700": string;
|
125
|
+
"color-minty-green-a800": string;
|
126
|
+
"color-minty-green-a900": string;
|
127
|
+
"color-grapes-purple-50": string;
|
128
|
+
"color-grapes-purple-100": string;
|
129
|
+
"color-grapes-purple-200": string;
|
130
|
+
"color-grapes-purple-300": string;
|
131
|
+
"color-grapes-purple-400": string;
|
132
|
+
"color-grapes-purple-500": string;
|
133
|
+
"color-grapes-purple-600": string;
|
134
|
+
"color-grapes-purple-700": string;
|
135
|
+
"color-grapes-purple-800": string;
|
136
|
+
"color-grapes-purple-900": string;
|
137
|
+
"color-grapes-purple-a100": string;
|
138
|
+
"color-grapes-purple-a200": string;
|
139
|
+
"color-grapes-purple-a400": string;
|
140
|
+
"color-grapes-purple-a700": string;
|
141
|
+
"color-berry-pink-100": string;
|
142
|
+
"color-berry-pink-200": string;
|
143
|
+
"color-berry-pink-300": string;
|
144
|
+
"color-berry-pink-400": string;
|
145
|
+
"color-berry-pink-500": string;
|
146
|
+
"color-berry-pink-600": string;
|
147
|
+
"color-berry-pink-700": string;
|
148
|
+
"color-berry-pink-800": string;
|
149
|
+
"color-berry-pink-900": string;
|
150
|
+
"color-berry-pink-a100": string;
|
151
|
+
"color-berry-pink-a200": string;
|
152
|
+
"color-berry-pink-a400": string;
|
153
|
+
"color-sky-blue-100": string;
|
154
|
+
"color-sky-blue-200": string;
|
155
|
+
"color-sky-blue-300": string;
|
156
|
+
"color-sky-blue-400": string;
|
157
|
+
"color-sky-blue-500": string;
|
158
|
+
"color-sky-blue-600": string;
|
159
|
+
"color-sky-blue-700": string;
|
160
|
+
"color-sky-blue-800": string;
|
161
|
+
"color-sky-blue-900": string;
|
162
|
+
"color-sky-blue-a400": string;
|
163
|
+
"color-sky-blue-a700": string;
|
164
|
+
"color-deep-blue-600": string;
|
165
|
+
"color-forest-green-50": string;
|
166
|
+
"color-forest-green-100": string;
|
167
|
+
"color-forest-green-200": string;
|
168
|
+
"color-forest-green-300": string;
|
169
|
+
"color-forest-green-400": string;
|
170
|
+
"color-forest-green-500": string;
|
171
|
+
"color-forest-green-600": string;
|
172
|
+
"color-forest-green-700": string;
|
173
|
+
"color-forest-green-800": string;
|
174
|
+
"color-forest-green-900": string;
|
175
|
+
"color-facebook": string;
|
176
|
+
"color-deep-facebook": string;
|
177
|
+
"color-twitter": string;
|
178
|
+
"color-deep-twitter": string;
|
179
|
+
"color-youtube": string;
|
180
|
+
"color-linkedin": string;
|
181
|
+
"color-seeking-alpha-brand": string;
|
182
|
+
};
|
183
|
+
export declare const VS: editor.IStandaloneThemeData;
|
184
|
+
export declare const VS_DARK: editor.IStandaloneThemeData;
|
185
|
+
export declare const QQSTRING_REG: RegExp;
|
186
|
+
export declare const QSTRING_REG: RegExp;
|
187
|
+
export declare const DEFAULT_COLORS: {
|
188
|
+
"color.aqua": string;
|
189
|
+
"color.black": string;
|
190
|
+
"color.blue": string;
|
191
|
+
"color.fuchsia": string;
|
192
|
+
"color.gray": string;
|
193
|
+
"color.green": string;
|
194
|
+
"color.lime": string;
|
195
|
+
"color.maroon": string;
|
196
|
+
"color.navy": string;
|
197
|
+
"color.olive": string;
|
198
|
+
"color.orange": string;
|
199
|
+
"color.purple": string;
|
200
|
+
"color.red": string;
|
201
|
+
"color.silver": string;
|
202
|
+
"color.teal": string;
|
203
|
+
"color.white": string;
|
204
|
+
"color.yellow": string;
|
205
|
+
};
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import { IDocValue, IKeyValueStr } from '../type';
|
2
|
+
interface IContents {
|
3
|
+
[key: string]: IDocValue[];
|
4
|
+
}
|
5
|
+
interface IKeyMaps {
|
6
|
+
[key: string]: Map<string, IDocValue[]>;
|
7
|
+
}
|
8
|
+
export interface IKeys {
|
9
|
+
[key: string]: string[];
|
10
|
+
}
|
11
|
+
export declare const ALL_CONTENT: IContents;
|
12
|
+
export declare const SNIPPET_COMPLETIONS: {
|
13
|
+
label: string;
|
14
|
+
insertText: string;
|
15
|
+
kind: string;
|
16
|
+
}[];
|
17
|
+
export declare const COMPLETE_KEYS: string[];
|
18
|
+
export declare const HOVER_KEYS: string[];
|
19
|
+
export declare const BUILD_IN_VALUE: IKeyValueStr;
|
20
|
+
export declare const ALL_KINDS: {
|
21
|
+
argument: string;
|
22
|
+
keyword: string;
|
23
|
+
field: string;
|
24
|
+
userFunction: string;
|
25
|
+
builtInFunction: string;
|
26
|
+
library: string;
|
27
|
+
userVariable: string;
|
28
|
+
builtInVariable: string;
|
29
|
+
namespace: string;
|
30
|
+
operator: string;
|
31
|
+
constant: string;
|
32
|
+
annotation: string;
|
33
|
+
userMethod: string;
|
34
|
+
builtinMethod: string;
|
35
|
+
userType: string;
|
36
|
+
builtinType: string;
|
37
|
+
};
|
38
|
+
export declare const DEFAULT_DETIALS: IKeyValueStr;
|
39
|
+
export declare const KEY_LIST: IKeys, KEY_MAP_LIST: IKeyMaps;
|
40
|
+
export {};
|
@@ -0,0 +1,21 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { Theme } from '@monaco-editor/react';
|
3
|
+
import { IPosition, editor } from 'monaco-editor';
|
4
|
+
import './style.css';
|
5
|
+
import { IKeyObjectValue } from "./type";
|
6
|
+
interface IProps {
|
7
|
+
height?: string | number;
|
8
|
+
width?: string | number;
|
9
|
+
theme?: Theme;
|
10
|
+
options?: editor.IStandaloneEditorConstructionOptions;
|
11
|
+
hasDiff?: boolean;
|
12
|
+
onCursorPositionChange?: (position: IPosition) => void;
|
13
|
+
onChange?: (value: string) => void;
|
14
|
+
onDeclareConfigChange?: (value: IKeyObjectValue) => void;
|
15
|
+
}
|
16
|
+
export interface IRefs {
|
17
|
+
saveScript: () => void;
|
18
|
+
setScript: (code: string) => void;
|
19
|
+
}
|
20
|
+
declare const TradingEditorComponent: import("react").ForwardRefExoticComponent<IProps & import("react").RefAttributes<IRefs>>;
|
21
|
+
export default TradingEditorComponent;
|
@@ -0,0 +1,252 @@
|
|
1
|
+
import { VPlotDisplay, VExtend, VFormatType, VHlineStyle, VLabelStyle, VLineStyle, VLocation, VSortOrder, VPlotStyle, VPosition, VAdjustment, VAlert, VBarmergeGaps, VScale, VSession, VShape, VSize, VStrategy, VCommission, VDirection, VOca, VText, VXloc, VYloc, VEarnings } from './enum';
|
2
|
+
export declare class BuildInConstants {
|
3
|
+
adjustment: {
|
4
|
+
dividends: VAdjustment;
|
5
|
+
none: VAdjustment;
|
6
|
+
splits: VAdjustment;
|
7
|
+
};
|
8
|
+
alert: {
|
9
|
+
freq_all: VAlert;
|
10
|
+
freq_once_per_bar: VAlert;
|
11
|
+
freq_once_per_bar_close: VAlert;
|
12
|
+
};
|
13
|
+
barmerge: {
|
14
|
+
gaps_off: VBarmergeGaps;
|
15
|
+
gaps_on: VBarmergeGaps;
|
16
|
+
lookahead_off: VBarmergeGaps;
|
17
|
+
lookahead_on: VBarmergeGaps;
|
18
|
+
};
|
19
|
+
color: {
|
20
|
+
aqua: string;
|
21
|
+
black: string;
|
22
|
+
blue: string;
|
23
|
+
fuchsia: string;
|
24
|
+
gray: string;
|
25
|
+
green: string;
|
26
|
+
lime: string;
|
27
|
+
maroon: string;
|
28
|
+
navy: string;
|
29
|
+
olive: string;
|
30
|
+
orange: string;
|
31
|
+
purple: string;
|
32
|
+
red: string;
|
33
|
+
silver: string;
|
34
|
+
teal: string;
|
35
|
+
white: string;
|
36
|
+
yellow: string;
|
37
|
+
};
|
38
|
+
currency: {
|
39
|
+
AUD: string;
|
40
|
+
BTC: string;
|
41
|
+
CAD: string;
|
42
|
+
CHF: string;
|
43
|
+
ETH: string;
|
44
|
+
EUR: string;
|
45
|
+
GBP: string;
|
46
|
+
HKD: string;
|
47
|
+
INR: string;
|
48
|
+
JPY: string;
|
49
|
+
KRW: string;
|
50
|
+
MYR: string;
|
51
|
+
NOK: string;
|
52
|
+
NONE: string;
|
53
|
+
NZD: string;
|
54
|
+
RUB: string;
|
55
|
+
SEK: string;
|
56
|
+
SGD: string;
|
57
|
+
TRY: string;
|
58
|
+
USD: string;
|
59
|
+
USDT: string;
|
60
|
+
ZAR: string;
|
61
|
+
};
|
62
|
+
dayofweek: {
|
63
|
+
friday: number;
|
64
|
+
monday: number;
|
65
|
+
saturday: number;
|
66
|
+
sunday: number;
|
67
|
+
thursday: number;
|
68
|
+
tuesday: number;
|
69
|
+
wednesday: number;
|
70
|
+
};
|
71
|
+
earnings: {
|
72
|
+
actual: VEarnings;
|
73
|
+
estimate: VEarnings;
|
74
|
+
standardized: VEarnings;
|
75
|
+
};
|
76
|
+
display: {
|
77
|
+
all: VPlotDisplay[];
|
78
|
+
data_window: VPlotDisplay[];
|
79
|
+
none: never[];
|
80
|
+
pane: VPlotDisplay[];
|
81
|
+
price_scale: VPlotDisplay[];
|
82
|
+
status_line: VPlotDisplay[];
|
83
|
+
};
|
84
|
+
extend: {
|
85
|
+
both: VExtend;
|
86
|
+
left: VExtend;
|
87
|
+
none: VExtend;
|
88
|
+
right: VExtend;
|
89
|
+
};
|
90
|
+
font: {
|
91
|
+
family_default: string;
|
92
|
+
family_monospace: string;
|
93
|
+
};
|
94
|
+
format: {
|
95
|
+
inherit: VFormatType;
|
96
|
+
mintick: VFormatType;
|
97
|
+
percent: VFormatType;
|
98
|
+
price: VFormatType;
|
99
|
+
volume: VFormatType;
|
100
|
+
};
|
101
|
+
hline: {
|
102
|
+
style_solid: VHlineStyle;
|
103
|
+
style_dashed: VHlineStyle;
|
104
|
+
style_dotted: VHlineStyle;
|
105
|
+
};
|
106
|
+
label: {
|
107
|
+
style_arrowdown: VLabelStyle;
|
108
|
+
style_arrowup: VLabelStyle;
|
109
|
+
style_circle: VLabelStyle;
|
110
|
+
style_cross: VLabelStyle;
|
111
|
+
style_diamond: VLabelStyle;
|
112
|
+
style_flag: VLabelStyle;
|
113
|
+
style_label_center: VLabelStyle;
|
114
|
+
style_label_down: VLabelStyle;
|
115
|
+
style_label_left: VLabelStyle;
|
116
|
+
style_label_lower_left: VLabelStyle;
|
117
|
+
style_label_lower_right: VLabelStyle;
|
118
|
+
style_label_right: VLabelStyle;
|
119
|
+
style_label_up: VLabelStyle;
|
120
|
+
style_label_upper_left: VLabelStyle;
|
121
|
+
style_label_upper_right: VLabelStyle;
|
122
|
+
style_none: VLabelStyle;
|
123
|
+
style_square: VLabelStyle;
|
124
|
+
style_text_outline: VLabelStyle;
|
125
|
+
style_triangledown: VLabelStyle;
|
126
|
+
style_triangleup: VLabelStyle;
|
127
|
+
style_xcross: VLabelStyle;
|
128
|
+
};
|
129
|
+
line: {
|
130
|
+
style_arrow_both: VLineStyle;
|
131
|
+
style_arrow_left: VLineStyle;
|
132
|
+
style_arrow_right: VLineStyle;
|
133
|
+
style_dashed: VLineStyle;
|
134
|
+
style_dotted: VLineStyle;
|
135
|
+
style_solid: VLineStyle;
|
136
|
+
};
|
137
|
+
location: {
|
138
|
+
abovebar: VLocation;
|
139
|
+
absolute: VLocation;
|
140
|
+
belowbar: VLocation;
|
141
|
+
bottom: VLocation;
|
142
|
+
top: VLocation;
|
143
|
+
};
|
144
|
+
math: {
|
145
|
+
e: number;
|
146
|
+
phi: number;
|
147
|
+
pi: number;
|
148
|
+
rphi: number;
|
149
|
+
};
|
150
|
+
order: {
|
151
|
+
ascending: VSortOrder;
|
152
|
+
descending: VSortOrder;
|
153
|
+
};
|
154
|
+
plot: {
|
155
|
+
style_area: VPlotStyle;
|
156
|
+
style_areabr: VPlotStyle;
|
157
|
+
style_circles: VPlotStyle;
|
158
|
+
style_columns: VPlotStyle;
|
159
|
+
style_cross: VPlotStyle;
|
160
|
+
style_histogram: VPlotStyle;
|
161
|
+
style_line: VPlotStyle;
|
162
|
+
style_linebr: VPlotStyle;
|
163
|
+
style_stepline: VPlotStyle;
|
164
|
+
style_stepline_diamond: VPlotStyle;
|
165
|
+
style_steplinebr: VPlotStyle;
|
166
|
+
};
|
167
|
+
position: {
|
168
|
+
bottom_center: VPosition;
|
169
|
+
bottom_left: VPosition;
|
170
|
+
bottom_right: VPosition;
|
171
|
+
middle_center: VPosition;
|
172
|
+
middle_left: VPosition;
|
173
|
+
middle_right: VPosition;
|
174
|
+
top_center: VPosition;
|
175
|
+
top_left: VPosition;
|
176
|
+
top_right: VPosition;
|
177
|
+
};
|
178
|
+
scale: {
|
179
|
+
left: VScale;
|
180
|
+
none: VScale;
|
181
|
+
right: VScale;
|
182
|
+
};
|
183
|
+
session: {
|
184
|
+
extended: VSession;
|
185
|
+
regular: VSession;
|
186
|
+
};
|
187
|
+
shape: {
|
188
|
+
arrowdown: VShape;
|
189
|
+
arrowup: VShape;
|
190
|
+
circle: VShape;
|
191
|
+
cross: VShape;
|
192
|
+
diamond: VShape;
|
193
|
+
flag: VShape;
|
194
|
+
labeldown: VShape;
|
195
|
+
labelup: VShape;
|
196
|
+
square: VShape;
|
197
|
+
triangledown: VShape;
|
198
|
+
triangleup: VShape;
|
199
|
+
xcross: VShape;
|
200
|
+
};
|
201
|
+
size: {
|
202
|
+
auto: VSize;
|
203
|
+
huge: VSize;
|
204
|
+
large: VSize;
|
205
|
+
normal: VSize;
|
206
|
+
small: VSize;
|
207
|
+
tiny: VSize;
|
208
|
+
};
|
209
|
+
splits: {
|
210
|
+
denominator: string;
|
211
|
+
numerator: string;
|
212
|
+
};
|
213
|
+
strategy: {
|
214
|
+
cash: VStrategy;
|
215
|
+
fixed: VStrategy;
|
216
|
+
percent_of_equity: VStrategy;
|
217
|
+
commission: {
|
218
|
+
cash_per_contract: VCommission;
|
219
|
+
cash_per_order: VCommission;
|
220
|
+
percent: VCommission;
|
221
|
+
};
|
222
|
+
direction: {
|
223
|
+
all: VDirection;
|
224
|
+
long: VDirection;
|
225
|
+
short: VDirection;
|
226
|
+
};
|
227
|
+
oca: {
|
228
|
+
cancel: VOca;
|
229
|
+
none: VOca;
|
230
|
+
reduce: VOca;
|
231
|
+
};
|
232
|
+
};
|
233
|
+
text: {
|
234
|
+
align_bottom: VText;
|
235
|
+
align_center: VText;
|
236
|
+
align_left: VText;
|
237
|
+
align_right: VText;
|
238
|
+
align_top: VText;
|
239
|
+
wrap_auto: VText;
|
240
|
+
wrap_none: VText;
|
241
|
+
};
|
242
|
+
xloc: {
|
243
|
+
bar_index: VXloc;
|
244
|
+
bar_time: VXloc;
|
245
|
+
};
|
246
|
+
yloc: {
|
247
|
+
abovebar: VYloc;
|
248
|
+
belowbar: VYloc;
|
249
|
+
price: VYloc;
|
250
|
+
};
|
251
|
+
updateData(): void;
|
252
|
+
}
|
@@ -0,0 +1,144 @@
|
|
1
|
+
import { VSortOrder } from "../enum";
|
2
|
+
interface IArrayArgs {
|
3
|
+
id?: PseudoArray;
|
4
|
+
id1?: PseudoArray;
|
5
|
+
id2?: PseudoArray;
|
6
|
+
size?: number;
|
7
|
+
initial_value?: any;
|
8
|
+
index_from?: number;
|
9
|
+
index_to?: number;
|
10
|
+
val?: number;
|
11
|
+
biased?: boolean;
|
12
|
+
value?: any;
|
13
|
+
index?: number;
|
14
|
+
separator?: string;
|
15
|
+
nth?: number;
|
16
|
+
percentage?: number;
|
17
|
+
order?: VSortOrder;
|
18
|
+
}
|
19
|
+
export default class BuildInArray {
|
20
|
+
new({ size, initial_value }?: IArrayArgs): PseudoArray;
|
21
|
+
new_float({ size, initial_value }?: IArrayArgs): PseudoArray;
|
22
|
+
new_int({ size, initial_value }?: IArrayArgs): PseudoArray;
|
23
|
+
new_color({ size, initial_value }?: IArrayArgs): PseudoArray;
|
24
|
+
new_bool({ size, initial_value }?: IArrayArgs): PseudoArray;
|
25
|
+
new_string({ size, initial_value }?: IArrayArgs): PseudoArray;
|
26
|
+
new_line({ size, initial_value }?: IArrayArgs): PseudoArray;
|
27
|
+
new_box({ size, initial_value }?: IArrayArgs): PseudoArray;
|
28
|
+
new_table({ size, initial_value }?: IArrayArgs): PseudoArray;
|
29
|
+
new_linefill({ size, initial_value }?: IArrayArgs): PseudoArray;
|
30
|
+
new_label({ size, initial_value }?: IArrayArgs): PseudoArray;
|
31
|
+
copy({ id }: IArrayArgs): PseudoArray | undefined;
|
32
|
+
slice({ id, index_from, index_to }: IArrayArgs): PseudoArray | undefined;
|
33
|
+
size({ id }: IArrayArgs): number | undefined;
|
34
|
+
first({ id }: IArrayArgs): any;
|
35
|
+
abs({ id }: IArrayArgs): PseudoArray | undefined;
|
36
|
+
avg({ id }: IArrayArgs): number | undefined;
|
37
|
+
binary_search({ id, val }: IArrayArgs): number | undefined;
|
38
|
+
binary_search_leftmost({ id, val }: IArrayArgs): number | undefined;
|
39
|
+
binary_search_rightmost({ id, val }: IArrayArgs): number | undefined;
|
40
|
+
clear({ id }: IArrayArgs): void;
|
41
|
+
concat({ id1, id2 }: IArrayArgs): PseudoArray | undefined;
|
42
|
+
covariance({ id1, id2, biased }: IArrayArgs): number | undefined;
|
43
|
+
every({ id }: IArrayArgs): boolean | undefined;
|
44
|
+
from(_: any, arrVals: any[]): PseudoArray;
|
45
|
+
fill({ id, value, index_from, index_to }: IArrayArgs): void;
|
46
|
+
get({ id, index }: IArrayArgs): any;
|
47
|
+
includes({ id, value }: IArrayArgs): boolean | undefined;
|
48
|
+
indexof({ id, value }: IArrayArgs): number | undefined;
|
49
|
+
insert({ id, index, value }: IArrayArgs): void;
|
50
|
+
join({ id, separator }: IArrayArgs): string | undefined;
|
51
|
+
last({ id }: IArrayArgs): any;
|
52
|
+
lastindexof({ id, value }: IArrayArgs): number | undefined;
|
53
|
+
max({ id, nth }: IArrayArgs): number | undefined;
|
54
|
+
median({ id }: IArrayArgs): number | undefined;
|
55
|
+
min({ id, nth }: IArrayArgs): number | undefined;
|
56
|
+
mode({ id }: IArrayArgs): number | undefined;
|
57
|
+
percentile_linear_interpolation({ id, percentage }: IArrayArgs): number | undefined;
|
58
|
+
percentile_nearest_rank({ id, percentage }: IArrayArgs): number | undefined;
|
59
|
+
percentrank({ id, index }: IArrayArgs): number | undefined;
|
60
|
+
pop({ id }: IArrayArgs): any;
|
61
|
+
push({ id, value }: IArrayArgs): void;
|
62
|
+
range({ id }: IArrayArgs): number | undefined;
|
63
|
+
remove({ id, index }: IArrayArgs): any;
|
64
|
+
reverse({ id }: IArrayArgs): void | undefined;
|
65
|
+
set({ id, index, value }: IArrayArgs): void;
|
66
|
+
shift({ id }: IArrayArgs): any;
|
67
|
+
some({ id }: IArrayArgs): boolean | undefined;
|
68
|
+
sort({ id, order }: IArrayArgs): void;
|
69
|
+
sort_indices({ id, order }: IArrayArgs): PseudoArray | undefined;
|
70
|
+
standardize({ id }: IArrayArgs): PseudoArray | undefined;
|
71
|
+
stdev({ id, biased }: IArrayArgs): number | undefined;
|
72
|
+
sum({ id }: IArrayArgs): any;
|
73
|
+
unshift({ id, value }: IArrayArgs): void;
|
74
|
+
variance({ id, biased }: IArrayArgs): number | undefined;
|
75
|
+
}
|
76
|
+
export declare class PseudoArray {
|
77
|
+
private _arrInstance;
|
78
|
+
constructor(size?: number, initialValue?: any);
|
79
|
+
get isArray(): boolean;
|
80
|
+
get _value(): any[];
|
81
|
+
set _value(val: any[]);
|
82
|
+
private _deepCopyData;
|
83
|
+
private _copyData;
|
84
|
+
copy(): PseudoArray;
|
85
|
+
slice({ index_from, index_to }: IArrayArgs): PseudoArray;
|
86
|
+
size(): number;
|
87
|
+
first(): any;
|
88
|
+
abs(): PseudoArray;
|
89
|
+
avg(): number;
|
90
|
+
binary_search({ val }: IArrayArgs): number;
|
91
|
+
binary_search_leftmost({ val }: IArrayArgs): number;
|
92
|
+
binary_search_rightmost({ val }: IArrayArgs): number;
|
93
|
+
clear(): void;
|
94
|
+
concat({ id2 }: IArrayArgs): this;
|
95
|
+
covariance({ id2, biased }: IArrayArgs): number;
|
96
|
+
every(): boolean;
|
97
|
+
fill({ value, index_from, index_to }: IArrayArgs): void;
|
98
|
+
get({ index }: IArrayArgs): any;
|
99
|
+
includes({ value }: IArrayArgs): boolean;
|
100
|
+
indexof({ value }: IArrayArgs): number;
|
101
|
+
insert({ index, value }: IArrayArgs): void;
|
102
|
+
join({ separator }?: IArrayArgs): string;
|
103
|
+
last(): any;
|
104
|
+
lastindexof({ value }: IArrayArgs): number;
|
105
|
+
max({ nth }?: IArrayArgs): number;
|
106
|
+
median(): number;
|
107
|
+
min({ nth }?: IArrayArgs): number;
|
108
|
+
mode(): number;
|
109
|
+
percentile_linear_interpolation({ percentage }: IArrayArgs): number | undefined;
|
110
|
+
percentile_nearest_rank({ percentage }: IArrayArgs): number;
|
111
|
+
percentrank({ index }: IArrayArgs): number;
|
112
|
+
pop(): any;
|
113
|
+
push({ value }: IArrayArgs): void;
|
114
|
+
range(): number;
|
115
|
+
remove({ index }: IArrayArgs): any;
|
116
|
+
reverse(): void;
|
117
|
+
set({ index, value }: IArrayArgs): void;
|
118
|
+
shift(): any;
|
119
|
+
some(): boolean;
|
120
|
+
sort({ order }?: IArrayArgs): void;
|
121
|
+
sort_indices({ order }?: IArrayArgs): PseudoArray;
|
122
|
+
standardize(): PseudoArray;
|
123
|
+
stdev({ biased }?: IArrayArgs): number;
|
124
|
+
sum(): any;
|
125
|
+
unshift({ value }: IArrayArgs): void;
|
126
|
+
variance({ biased }?: IArrayArgs): number;
|
127
|
+
private _calculateVariances;
|
128
|
+
private _calculateStandardDeviations;
|
129
|
+
private _standardizeArray;
|
130
|
+
private _getPercentileRank;
|
131
|
+
private _getNearestRankPercentile;
|
132
|
+
private _percentileLinearInterpolation;
|
133
|
+
private _mode;
|
134
|
+
private _median;
|
135
|
+
private _minNth;
|
136
|
+
private _maxNth;
|
137
|
+
private _setElements;
|
138
|
+
private _covariance;
|
139
|
+
private _verifySimpleType;
|
140
|
+
private _binarySearch;
|
141
|
+
private _binarySearchLeftMost;
|
142
|
+
private _binarySearchRightMost;
|
143
|
+
}
|
144
|
+
export {};
|
@@ -0,0 +1,25 @@
|
|
1
|
+
export interface IColorArgs {
|
2
|
+
x?: any;
|
3
|
+
color?: string;
|
4
|
+
value?: number;
|
5
|
+
bottom_value?: number;
|
6
|
+
top_value?: number;
|
7
|
+
bottom_color?: string;
|
8
|
+
top_color?: string;
|
9
|
+
transp?: number;
|
10
|
+
red?: number;
|
11
|
+
green?: number;
|
12
|
+
blue?: number;
|
13
|
+
}
|
14
|
+
export default class BuildInColor {
|
15
|
+
color({ x }: IColorArgs): any;
|
16
|
+
new({ color, transp }: IColorArgs): string;
|
17
|
+
rgb({ red, green, blue, transp }: IColorArgs): string;
|
18
|
+
g({ color }: IColorArgs): number;
|
19
|
+
r({ color }: IColorArgs): number;
|
20
|
+
b({ color }: IColorArgs): number;
|
21
|
+
t({ color }: IColorArgs): number;
|
22
|
+
from_gradient({ value, bottom_value, top_value, bottom_color, top_color }: IColorArgs): string;
|
23
|
+
private _parseColor;
|
24
|
+
private _parserRgbColor;
|
25
|
+
}
|