@orangecharts/wrun-chart-host 0.19.1 → 0.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.
Files changed (55) hide show
  1. package/README.md +1 -0
  2. package/dist/index.d.ts +1 -0
  3. package/dist/index.js +1 -0
  4. package/dist/settings-templates/frvp-fields.js +9 -3
  5. package/dist/settings-templates/index.d.ts +29 -4
  6. package/dist/settings-templates/index.js +82 -27
  7. package/dist/settings-templates/indicator-fields.d.ts +11 -0
  8. package/dist/settings-templates/indicator-fields.js +5 -4
  9. package/dist/settings-templates/market-bound.d.ts +93 -20
  10. package/dist/settings-templates/market-bound.js +229 -41
  11. package/dist/settings-templates/tool-rules.d.ts +197 -18
  12. package/dist/settings-templates/tool-rules.js +98 -4
  13. package/dist/settings-templates/tool-tables.generated.d.ts +2 -0
  14. package/dist/settings-templates/tool-tables.generated.js +194 -11
  15. package/dist/utility/chart/calendar-interval.util.d.ts +7 -0
  16. package/dist/utility/chart/calendar-interval.util.js +9 -0
  17. package/dist/utility/chart/index-mode.util.d.ts +11 -0
  18. package/dist/utility/chart/index-mode.util.js +24 -0
  19. package/dist/utility/chart/indicator-run-interval.util.d.ts +7 -3
  20. package/dist/utility/chart/indicator-run-interval.util.js +16 -5
  21. package/dist/utility/chart/market-session-schedule.util.d.ts +2 -0
  22. package/dist/utility/chart/market-session-schedule.util.js +2 -0
  23. package/dist/utility/chart/run-interval-warmup.leaf.d.ts +16 -1
  24. package/dist/utility/chart/run-interval-warmup.leaf.js +28 -2
  25. package/dist/utility/options/option-contract-market.leaf.d.ts +2 -0
  26. package/dist/utility/options/option-contract-market.leaf.js +21 -0
  27. package/dist/utility/options/option-trade-units.util.d.ts +35 -5
  28. package/dist/utility/options/option-trade-units.util.js +31 -5
  29. package/dist/utility/wrun/wrun-chart-market-facts.util.js +3 -3
  30. package/dist/utility/wrun/wrun-color-settings.util.d.ts +2 -13
  31. package/dist/utility/wrun/wrun-color-settings.util.js +3 -29
  32. package/dist/utility/wrun/wrun-lane-warmup.util.d.ts +1 -1
  33. package/dist/utility/wrun/wrun-lane-warmup.util.js +8 -3
  34. package/dist/utility/wrun/wrun-live-intake.util.js +13 -6
  35. package/dist/utility/wrun/wrun-live-tick.util.js +35 -18
  36. package/dist/utility/wrun/wrun-market-size-defaults.leaf.d.ts +34 -1
  37. package/dist/utility/wrun/wrun-market-size-defaults.leaf.js +57 -0
  38. package/dist/utility/wrun/wrun-market-size-defaults.util.d.ts +76 -13
  39. package/dist/utility/wrun/wrun-market-size-defaults.util.js +286 -45
  40. package/dist/utility/wrun/wrun-market-size-rank.leaf.d.ts +75 -0
  41. package/dist/utility/wrun/wrun-market-size-rank.leaf.js +154 -0
  42. package/dist/utility/wrun/wrun-overlay-run.util.js +124 -21
  43. package/dist/utility/wrun/wrun-param-values.util.d.ts +2 -1
  44. package/dist/utility/wrun/wrun-param-values.util.js +3 -9
  45. package/dist/utility/wrun/wrun-row-scalars.leaf.d.ts +30 -0
  46. package/dist/utility/wrun/wrun-row-scalars.leaf.js +73 -0
  47. package/dist/utility/wrun/wrun-run-health.util.d.ts +24 -2
  48. package/dist/utility/wrun/wrun-run-health.util.js +39 -7
  49. package/dist/utility/wrun/wrun-run-interval-session.util.d.ts +18 -0
  50. package/dist/utility/wrun/wrun-run-interval-session.util.js +25 -0
  51. package/dist/utility/wrun/wrun-run-interval.util.d.ts +52 -5
  52. package/dist/utility/wrun/wrun-run-interval.util.js +88 -7
  53. package/dist/utility/wrun/wrun-script-inputs.util.d.ts +4 -7
  54. package/dist/utility/wrun/wrun-script-inputs.util.js +6 -33
  55. package/package.json +1 -1
@@ -4,6 +4,7 @@
4
4
  * on its own, so it imports nothing) and writes tool-tables.generated.ts from it and chart-schema TOOLS:
5
5
  *
6
6
  * - TOOL_DEFAULT_STYLE[type]: the registry defaultStyle, then the held extras below with their declared defaults;
7
+ * - TOOL_START_STYLE[type]: TOOL_DEFAULT_STYLE[type] with the start overrides below, the style a new drawing starts at;
7
8
  * - TOOL_TEMPLATE_KEYS[type]: those keys, then the text of a type whose text is a label (the text rule, textRoleOf),
8
9
  * then `visibleIntervalsMs` unless the type is interval-bound, never an instance key (the type's own too,
9
10
  * `instanceKeysByType`) or a cached compute key (`settingsKeysToStrip`).
@@ -15,6 +16,11 @@
15
16
  * tests/packages/wrun-chart-host/settings-templates/tool-tables.generated.spec.ts regenerates the tables and fails
16
17
  * when they differ from the committed file.
17
18
  */
19
+ /** The levels look every fib, Gann and pitchfork type holds (TOOL_TEMPLATE_RULES.heldExtras), at the seed titan's
20
+ * classes declare: the chart's text colour, `#787B86` as the own colour until one is picked. */
21
+ const LEVELS_LOOK = { levelsInk: 'text', levelsColor: '#787B86' };
22
+ /** The levels look of a type that labels its levels: the label at 11 px, regular weight (Bold is 700). */
23
+ const LEVELS_LOOK_LABELLED = { ...LEVELS_LOOK, fontSize: 11, fontWeight: 400 };
18
24
  export const TOOL_TEMPLATE_RULES = {
19
25
  /**
20
26
  * Per-drawing state a template never carries and never writes: lock, hide, layer and name are the drawing's own
@@ -58,7 +64,24 @@ export const TOOL_TEMPLATE_RULES = {
58
64
  key: 'text',
59
65
  heldBy: 'fontSize',
60
66
  content: ['Text', 'AnchoredText', 'Note', 'AnchoredNote', 'Callout', 'Comment'],
61
- ignored: ['PriceLabel'],
67
+ // The fib, Gann and pitchfork types that label their levels hold `fontSize` for those labels (LEVELS_LOOK below),
68
+ // which is no free text: they keep no box and no template text, as before they held it.
69
+ ignored: [
70
+ 'PriceLabel',
71
+ 'FibonacciRetracement',
72
+ 'FibonacciTrend',
73
+ 'FibChannel',
74
+ 'FibCircles',
75
+ 'FibSpeedResistanceArcs',
76
+ 'FibSpeedResistanceFan',
77
+ 'FibTimeZone',
78
+ 'FibTrendTime',
79
+ 'FibWedge',
80
+ 'GannBox',
81
+ 'GannFan',
82
+ 'GannSquare',
83
+ 'GannSquareFixed',
84
+ ],
62
85
  },
63
86
  /**
64
87
  * Drawings whose legs or captured bars read wrong on another interval (a GhostFeed's legs, a Bar Pattern's bars, a
@@ -85,9 +108,69 @@ export const TOOL_TEMPLATE_RULES = {
85
108
  CrossLine: { highlight: true },
86
109
  // "Fib levels based on log scale" (feedback 1815): titan from 3dcd6689 (the release after 0.0.4-alpha.1211) spaces
87
110
  // the levels in log10 of the price while it is on; chart-schema 0.8.0's FIB_STYLE does not list it yet, and the
88
- // generator refuses these two once it does.
89
- FibonacciRetracement: { levelsOnLogScale: false },
90
- FibonacciTrend: { levelsOnLogScale: false },
111
+ // generator refuses these two once it does. They sit with the family's levels look below.
112
+ // The fill strength (TradingView's background opacity, 0..100): titan shades each of these tools' zones, bands or
113
+ // box at `backgroundOpacity` and seeds the strength it drew at before the key existed (LongPosition, ShortPosition,
114
+ // RegressionTrend, PriceRange, DatePriceRange, DateRange, Signpost, Callout classes). The registry lists the key
115
+ // on the shapes and fibs but not on these types yet.
116
+ LongPosition: { backgroundOpacity: 19 },
117
+ ShortPosition: { backgroundOpacity: 19 },
118
+ RegressionTrend: { backgroundOpacity: 20 },
119
+ PriceRange: { backgroundOpacity: 15 },
120
+ DatePriceRange: { backgroundOpacity: 15 },
121
+ DateRange: { backgroundOpacity: 15 },
122
+ Signpost: { backgroundOpacity: 15 },
123
+ Callout: { backgroundOpacity: 50 },
124
+ // The levels look of the fib, Gann and pitchfork family (titan's tool classes from the release after
125
+ // 0.0.4-alpha.1329.56): one ink for every level (`levelsInk`: 'text', 'up' and 'down' the chart theme's text and
126
+ // candle colours, 'custom' the drawing's `levelsColor`, 'each' or no key every level its own colour, the look
127
+ // before it existed) and, on the 13 types that label their levels, the label size and weight. The registry
128
+ // (chart-schema 0.9.1) lists none of them.
129
+ FibonacciRetracement: { levelsOnLogScale: false, ...LEVELS_LOOK_LABELLED },
130
+ FibonacciTrend: { levelsOnLogScale: false, ...LEVELS_LOOK_LABELLED },
131
+ FibChannel: LEVELS_LOOK_LABELLED,
132
+ FibCircles: LEVELS_LOOK_LABELLED,
133
+ FibSpeedResistanceArcs: LEVELS_LOOK_LABELLED,
134
+ FibSpeedResistanceFan: LEVELS_LOOK_LABELLED,
135
+ FibSpiral: LEVELS_LOOK,
136
+ FibTimeZone: LEVELS_LOOK_LABELLED,
137
+ FibTrendTime: LEVELS_LOOK_LABELLED,
138
+ FibWedge: LEVELS_LOOK_LABELLED,
139
+ GannBox: LEVELS_LOOK_LABELLED,
140
+ GannFan: LEVELS_LOOK_LABELLED,
141
+ GannSquare: LEVELS_LOOK_LABELLED,
142
+ GannSquareFixed: LEVELS_LOOK_LABELLED,
143
+ Pitchfork: LEVELS_LOOK,
144
+ SchiffPitchfork: LEVELS_LOOK,
145
+ ModSchiffPitchfork: LEVELS_LOOK,
146
+ InsidePitchfork: LEVELS_LOOK,
147
+ Pitchfan: LEVELS_LOOK,
148
+ },
149
+ /**
150
+ * The values a NEW drawing starts at where they differ from the registry defaultStyle (TOOL_START_STYLE, generated):
151
+ * the fib, Gann and pitchfork family's quieter look (a 4% wash, a dotted diagonal), seeded by titan's tool classes
152
+ * from the same release as LEVELS_LOOK. The registry keeps its defaults (a drawing saved without a key restores at
153
+ * them), so a changed default of a key the registry lists rides here, never in the held extras (the generator refuses
154
+ * a held extra the registry lists). The generator refuses a key the type's style does not hold and a value equal to
155
+ * it. Web's arm and Reset read TOOL_START_STYLE, and so does the phone.
156
+ */
157
+ startOverrides: {
158
+ FibonacciRetracement: { backgroundOpacity: 4, trendLineLineStyle: 'dotted' },
159
+ FibonacciTrend: { backgroundOpacity: 4, trendLineLineStyle: 'dotted' },
160
+ FibChannel: { backgroundOpacity: 4 },
161
+ FibCircles: { backgroundOpacity: 4 },
162
+ FibSpeedResistanceArcs: { backgroundOpacity: 4 },
163
+ FibSpeedResistanceFan: { backgroundOpacity: 4 },
164
+ FibTimeZone: { backgroundOpacity: 4, trendLineLineStyle: 'dotted' },
165
+ FibTrendTime: { backgroundOpacity: 4, trendLineLineStyle: 'dotted' },
166
+ FibWedge: { backgroundOpacity: 4 },
167
+ GannBox: { backgroundOpacity: 4 },
168
+ GannFan: { backgroundOpacity: 4 },
169
+ Pitchfork: { backgroundOpacity: 4 },
170
+ SchiffPitchfork: { backgroundOpacity: 4 },
171
+ ModSchiffPitchfork: { backgroundOpacity: 4 },
172
+ InsidePitchfork: { backgroundOpacity: 4 },
173
+ Pitchfan: { backgroundOpacity: 4 },
91
174
  },
92
175
  /**
93
176
  * Style keys Save as default never keeps, and so neither does web's style memory (src/store/tool-style-memory.ts
@@ -104,6 +187,17 @@ export const TOOL_TEMPLATE_RULES = {
104
187
  */
105
188
  defaultExcludedTypes: ['Image'],
106
189
  };
190
+ /**
191
+ * A number field's range on one drawing type, where the type's own look reaches past the range chart-schema's
192
+ * TOOL_FIELD_SPECS gives the key on every type: the bound named here replaces that bound on this type only, in every
193
+ * host (web and phone read it through toolFieldRange, settings-templates/index.ts). A Highlighter starts at width 14
194
+ * (chart-schema TOOLS) while every type's Width stops at 12, so its first step up made the stroke thinner; a marker
195
+ * stroke takes a thick width, so it goes to 40. The schema's own per-type field table (beside TOOL_FIELD_GATES) is
196
+ * this rule's home once it has one; then this table goes.
197
+ */
198
+ export const TOOL_FIELD_RANGES = {
199
+ Highlighter: { lineWidth: { max: 40 } },
200
+ };
107
201
  /**
108
202
  * The text rule over one drawing type: what its free text is, or undefined when the type holds none. `style` is the
109
203
  * type's style as the tables hold it (TOOL_DEFAULT_STYLE[type]: the registry style and the held extras); the generator
@@ -1,2 +1,4 @@
1
1
  export declare const TOOL_DEFAULT_STYLE: Readonly<Record<string, Readonly<Record<string, unknown>>>>;
2
2
  export declare const TOOL_TEMPLATE_KEYS: Readonly<Record<string, readonly string[]>>;
3
+ /** The style a NEW drawing starts at: TOOL_DEFAULT_STYLE with the start overrides (tool-rules.ts startOverrides). */
4
+ export declare const TOOL_START_STYLE: Readonly<Record<string, Readonly<Record<string, unknown>>>>;
@@ -93,6 +93,7 @@ export const TOOL_DEFAULT_STYLE = {
93
93
  fontStyle: 'normal',
94
94
  textPosition: 'center',
95
95
  color: '#4DA3FF',
96
+ backgroundOpacity: 50,
96
97
  },
97
98
  Circle: {
98
99
  color: '#4DA3FF',
@@ -122,8 +123,14 @@ export const TOOL_DEFAULT_STYLE = {
122
123
  backgroundOpacity: 10,
123
124
  showLabels: true,
124
125
  },
125
- DatePriceRange: { bullishColor: '#00C2A8', bearishColor: '#ff3232', lineWidth: 2, lineStyle: 'solid' },
126
- DateRange: { color: '#00C2A8', lineWidth: 2, lineStyle: 'solid' },
126
+ DatePriceRange: {
127
+ bullishColor: '#00C2A8',
128
+ bearishColor: '#ff3232',
129
+ lineWidth: 2,
130
+ lineStyle: 'solid',
131
+ backgroundOpacity: 15,
132
+ },
133
+ DateRange: { color: '#00C2A8', lineWidth: 2, lineStyle: 'solid', backgroundOpacity: 15 },
127
134
  DisjointChannel: {
128
135
  color: '#4DA3FF',
129
136
  lineWidth: 2,
@@ -223,6 +230,10 @@ export const TOOL_DEFAULT_STYLE = {
223
230
  { value: 3.618, color: '#9C27B0', enabled: true },
224
231
  { value: 4.236, color: '#E91E63', enabled: true },
225
232
  ],
233
+ levelsInk: 'text',
234
+ levelsColor: '#787B86',
235
+ fontSize: 11,
236
+ fontWeight: 400,
226
237
  },
227
238
  FibCircles: {
228
239
  lineWidth: 2,
@@ -243,6 +254,10 @@ export const TOOL_DEFAULT_STYLE = {
243
254
  { value: 4.236, color: '#9E7548', enabled: false },
244
255
  { value: 4.618, color: '#F23645', enabled: false },
245
256
  ],
257
+ levelsInk: 'text',
258
+ levelsColor: '#787B86',
259
+ fontSize: 11,
260
+ fontWeight: 400,
246
261
  },
247
262
  FibSpeedResistanceArcs: {
248
263
  lineWidth: 2,
@@ -263,6 +278,10 @@ export const TOOL_DEFAULT_STYLE = {
263
278
  { value: 4.236, color: '#9E7548', enabled: false },
264
279
  { value: 4.618, color: '#F23645', enabled: false },
265
280
  ],
281
+ levelsInk: 'text',
282
+ levelsColor: '#787B86',
283
+ fontSize: 11,
284
+ fontWeight: 400,
266
285
  },
267
286
  FibSpeedResistanceFan: {
268
287
  lineWidth: 2,
@@ -291,8 +310,19 @@ export const TOOL_DEFAULT_STYLE = {
291
310
  { value: 0.75, color: '#00BCD4', enabled: true },
292
311
  { value: 1, color: '#787B86', enabled: true },
293
312
  ],
313
+ levelsInk: 'text',
314
+ levelsColor: '#787B86',
315
+ fontSize: 11,
316
+ fontWeight: 400,
317
+ },
318
+ FibSpiral: {
319
+ color: '#4DA3FF',
320
+ lineWidth: 2,
321
+ lineStyle: 'solid',
322
+ counterclockwise: false,
323
+ levelsInk: 'text',
324
+ levelsColor: '#787B86',
294
325
  },
295
- FibSpiral: { color: '#4DA3FF', lineWidth: 2, lineStyle: 'solid', counterclockwise: false },
296
326
  FibTimeZone: {
297
327
  lineWidth: 2,
298
328
  lineStyle: 'solid',
@@ -315,6 +345,10 @@ export const TOOL_DEFAULT_STYLE = {
315
345
  { value: 55, color: '#2962FF', enabled: true },
316
346
  { value: 89, color: '#2962FF', enabled: true },
317
347
  ],
348
+ levelsInk: 'text',
349
+ levelsColor: '#787B86',
350
+ fontSize: 11,
351
+ fontWeight: 400,
318
352
  },
319
353
  FibTrendTime: {
320
354
  lineWidth: 2,
@@ -338,6 +372,10 @@ export const TOOL_DEFAULT_STYLE = {
338
372
  { value: 2.618, color: '#9C27B0', enabled: true },
339
373
  { value: 3.618, color: '#E91E63', enabled: true },
340
374
  ],
375
+ levelsInk: 'text',
376
+ levelsColor: '#787B86',
377
+ fontSize: 11,
378
+ fontWeight: 400,
341
379
  },
342
380
  FibWedge: {
343
381
  lineWidth: 2,
@@ -358,6 +396,10 @@ export const TOOL_DEFAULT_STYLE = {
358
396
  { value: 4.236, color: '#9E7548', enabled: false },
359
397
  { value: 4.618, color: '#F23645', enabled: false },
360
398
  ],
399
+ levelsInk: 'text',
400
+ levelsColor: '#787B86',
401
+ fontSize: 11,
402
+ fontWeight: 400,
361
403
  },
362
404
  FibonacciRetracement: {
363
405
  lineWidth: 2,
@@ -399,6 +441,10 @@ export const TOOL_DEFAULT_STYLE = {
399
441
  { value: 4.764, color: '#00BCD4', enabled: false },
400
442
  ],
401
443
  levelsOnLogScale: false,
444
+ levelsInk: 'text',
445
+ levelsColor: '#787B86',
446
+ fontSize: 11,
447
+ fontWeight: 400,
402
448
  },
403
449
  FibonacciTrend: {
404
450
  lineWidth: 2,
@@ -440,6 +486,10 @@ export const TOOL_DEFAULT_STYLE = {
440
486
  { value: 4.764, color: '#00BCD4', enabled: false },
441
487
  ],
442
488
  levelsOnLogScale: false,
489
+ levelsInk: 'text',
490
+ levelsColor: '#787B86',
491
+ fontSize: 11,
492
+ fontWeight: 400,
443
493
  },
444
494
  FixedRangeVolumeProfile: {},
445
495
  FlagMark: { color: '#4DA3FF' },
@@ -480,6 +530,10 @@ export const TOOL_DEFAULT_STYLE = {
480
530
  { value: 0.75, color: '#00BCD4', enabled: true },
481
531
  { value: 1, color: '#787B86', enabled: true },
482
532
  ],
533
+ levelsInk: 'text',
534
+ levelsColor: '#787B86',
535
+ fontSize: 11,
536
+ fontWeight: 400,
483
537
  },
484
538
  GannFan: {
485
539
  lineWidth: 1,
@@ -498,6 +552,10 @@ export const TOOL_DEFAULT_STYLE = {
498
552
  { coeff1: 1, coeff2: 4, color: '#F23645', enabled: true },
499
553
  { coeff1: 1, coeff2: 8, color: '#9598A1', enabled: true },
500
554
  ],
555
+ levelsInk: 'text',
556
+ levelsColor: '#787B86',
557
+ fontSize: 11,
558
+ fontWeight: 400,
501
559
  },
502
560
  GannSquare: {
503
561
  lineWidth: 1,
@@ -547,6 +605,10 @@ export const TOOL_DEFAULT_STYLE = {
547
605
  { coeff1: 1, coeff2: 5, color: '#2962FF', enabled: false },
548
606
  { coeff1: 1, coeff2: 8, color: '#9598A1', enabled: false },
549
607
  ],
608
+ levelsInk: 'text',
609
+ levelsColor: '#787B86',
610
+ fontSize: 11,
611
+ fontWeight: 400,
550
612
  },
551
613
  GannSquareFixed: {
552
614
  lineWidth: 1,
@@ -596,6 +658,10 @@ export const TOOL_DEFAULT_STYLE = {
596
658
  { coeff1: 1, coeff2: 5, color: '#2962FF', enabled: false },
597
659
  { coeff1: 1, coeff2: 8, color: '#9598A1', enabled: false },
598
660
  ],
661
+ levelsInk: 'text',
662
+ levelsColor: '#787B86',
663
+ fontSize: 11,
664
+ fontWeight: 400,
599
665
  },
600
666
  GhostFeed: {
601
667
  followChartTheme: true,
@@ -685,6 +751,8 @@ export const TOOL_DEFAULT_STYLE = {
685
751
  { value: 1.5, color: '#9C27B0', enabled: false },
686
752
  { value: 1.75, color: '#E91E63', enabled: false },
687
753
  ],
754
+ levelsInk: 'text',
755
+ levelsColor: '#787B86',
688
756
  },
689
757
  Journey: { color: '#FFD878', highlight: false, lineWidth: 2 },
690
758
  LongPosition: {
@@ -699,6 +767,7 @@ export const TOOL_DEFAULT_STYLE = {
699
767
  compactStats: false,
700
768
  lineWidth: 2,
701
769
  lineStyle: 'solid',
770
+ backgroundOpacity: 19,
702
771
  },
703
772
  ModSchiffPitchfork: {
704
773
  medianColor: '#F23645',
@@ -719,6 +788,8 @@ export const TOOL_DEFAULT_STYLE = {
719
788
  { value: 1.5, color: '#9C27B0', enabled: false },
720
789
  { value: 1.75, color: '#E91E63', enabled: false },
721
790
  ],
791
+ levelsInk: 'text',
792
+ levelsColor: '#787B86',
722
793
  },
723
794
  Momentum: { color: '#00FF7F', highlight: true, lineWidth: 2 },
724
795
  Note: {
@@ -773,6 +844,8 @@ export const TOOL_DEFAULT_STYLE = {
773
844
  { value: 1.5, color: '#9C27B0', enabled: false },
774
845
  { value: 1.75, color: '#E91E63', enabled: false },
775
846
  ],
847
+ levelsInk: 'text',
848
+ levelsColor: '#787B86',
776
849
  },
777
850
  Pitchfork: {
778
851
  medianColor: '#F23645',
@@ -793,6 +866,8 @@ export const TOOL_DEFAULT_STYLE = {
793
866
  { value: 1.5, color: '#9C27B0', enabled: false },
794
867
  { value: 1.75, color: '#E91E63', enabled: false },
795
868
  ],
869
+ levelsInk: 'text',
870
+ levelsColor: '#787B86',
796
871
  },
797
872
  Polyline: {
798
873
  color: '#4DA3FF',
@@ -811,7 +886,13 @@ export const TOOL_DEFAULT_STYLE = {
811
886
  },
812
887
  PriceLabel: { color: '#4DA3FF', fontColor: '#FFFFFF', fontSize: 12 },
813
888
  PriceNote: { color: '#4DA3FF', fontColor: '#FFFFFF', fontSize: 12, lineWidth: 1.5, lineStyle: 'solid' },
814
- PriceRange: { bullishColor: '#00C2A8', bearishColor: '#ff3232', lineWidth: 2, lineStyle: 'solid' },
889
+ PriceRange: {
890
+ bullishColor: '#00C2A8',
891
+ bearishColor: '#ff3232',
892
+ lineWidth: 2,
893
+ lineStyle: 'solid',
894
+ backgroundOpacity: 15,
895
+ },
815
896
  Ray: {
816
897
  color: '#4DA3FF',
817
898
  fontColor: '#4DA3FF',
@@ -849,6 +930,7 @@ export const TOOL_DEFAULT_STYLE = {
849
930
  useUpperDeviation: true,
850
931
  useLowerDeviation: true,
851
932
  showPearson: true,
933
+ backgroundOpacity: 20,
852
934
  },
853
935
  RotatedRectangle: {
854
936
  color: '#4DA3FF',
@@ -878,6 +960,8 @@ export const TOOL_DEFAULT_STYLE = {
878
960
  { value: 1.5, color: '#9C27B0', enabled: false },
879
961
  { value: 1.75, color: '#E91E63', enabled: false },
880
962
  ],
963
+ levelsInk: 'text',
964
+ levelsColor: '#787B86',
881
965
  },
882
966
  Sector: {
883
967
  color: '#4DA3FF',
@@ -899,8 +983,9 @@ export const TOOL_DEFAULT_STYLE = {
899
983
  compactStats: false,
900
984
  lineWidth: 2,
901
985
  lineStyle: 'solid',
986
+ backgroundOpacity: 19,
902
987
  },
903
- Signpost: { color: '#4DA3FF', fontColor: '#FFFFFF', fontSize: 12 },
988
+ Signpost: { color: '#4DA3FF', fontColor: '#FFFFFF', fontSize: 12, backgroundOpacity: 15 },
904
989
  SineLine: { color: '#4DA3FF', lineWidth: 2, lineStyle: 'solid' },
905
990
  Subtle: { color: '#656565', highlight: false, lineWidth: 2 },
906
991
  Text: {
@@ -1069,7 +1154,16 @@ export const TOOL_TEMPLATE_KEYS = {
1069
1154
  ArrowMarker: ['color', 'lineWidth', 'lineStyle', 'visibleIntervalsMs'],
1070
1155
  BarPattern: ['color', 'patternMode', 'transparency', 'mirrored', 'flipped'],
1071
1156
  Burj: ['color', 'highlight', 'lineWidth', 'visibleIntervalsMs'],
1072
- Callout: ['fontColor', 'fontFamily', 'fontSize', 'fontStyle', 'textPosition', 'color', 'visibleIntervalsMs'],
1157
+ Callout: [
1158
+ 'fontColor',
1159
+ 'fontFamily',
1160
+ 'fontSize',
1161
+ 'fontStyle',
1162
+ 'textPosition',
1163
+ 'color',
1164
+ 'backgroundOpacity',
1165
+ 'visibleIntervalsMs',
1166
+ ],
1073
1167
  Circle: [
1074
1168
  'color',
1075
1169
  'borderColor',
@@ -1101,8 +1195,8 @@ export const TOOL_TEMPLATE_KEYS = {
1101
1195
  'showLabels',
1102
1196
  'visibleIntervalsMs',
1103
1197
  ],
1104
- DatePriceRange: ['bullishColor', 'bearishColor', 'lineWidth', 'lineStyle', 'visibleIntervalsMs'],
1105
- DateRange: ['color', 'lineWidth', 'lineStyle', 'visibleIntervalsMs'],
1198
+ DatePriceRange: ['bullishColor', 'bearishColor', 'lineWidth', 'lineStyle', 'backgroundOpacity', 'visibleIntervalsMs'],
1199
+ DateRange: ['color', 'lineWidth', 'lineStyle', 'backgroundOpacity', 'visibleIntervalsMs'],
1106
1200
  DisjointChannel: [
1107
1201
  'color',
1108
1202
  'lineWidth',
@@ -1190,6 +1284,10 @@ export const TOOL_TEMPLATE_KEYS = {
1190
1284
  'showPrices',
1191
1285
  'levelFormat',
1192
1286
  'fibLevels',
1287
+ 'levelsInk',
1288
+ 'levelsColor',
1289
+ 'fontSize',
1290
+ 'fontWeight',
1193
1291
  'visibleIntervalsMs',
1194
1292
  ],
1195
1293
  FibCircles: [
@@ -1199,6 +1297,10 @@ export const TOOL_TEMPLATE_KEYS = {
1199
1297
  'backgroundOpacity',
1200
1298
  'showLabels',
1201
1299
  'fibLevels',
1300
+ 'levelsInk',
1301
+ 'levelsColor',
1302
+ 'fontSize',
1303
+ 'fontWeight',
1202
1304
  'visibleIntervalsMs',
1203
1305
  ],
1204
1306
  FibSpeedResistanceArcs: [
@@ -1208,6 +1310,10 @@ export const TOOL_TEMPLATE_KEYS = {
1208
1310
  'backgroundOpacity',
1209
1311
  'showLabels',
1210
1312
  'fibLevels',
1313
+ 'levelsInk',
1314
+ 'levelsColor',
1315
+ 'fontSize',
1316
+ 'fontWeight',
1211
1317
  'visibleIntervalsMs',
1212
1318
  ],
1213
1319
  FibSpeedResistanceFan: [
@@ -1221,9 +1327,13 @@ export const TOOL_TEMPLATE_KEYS = {
1221
1327
  'showLabels',
1222
1328
  'hLevels',
1223
1329
  'vLevels',
1330
+ 'levelsInk',
1331
+ 'levelsColor',
1332
+ 'fontSize',
1333
+ 'fontWeight',
1224
1334
  'visibleIntervalsMs',
1225
1335
  ],
1226
- FibSpiral: ['color', 'lineWidth', 'lineStyle', 'counterclockwise', 'visibleIntervalsMs'],
1336
+ FibSpiral: ['color', 'lineWidth', 'lineStyle', 'counterclockwise', 'levelsInk', 'levelsColor', 'visibleIntervalsMs'],
1227
1337
  FibTimeZone: [
1228
1338
  'lineWidth',
1229
1339
  'lineStyle',
@@ -1234,6 +1344,10 @@ export const TOOL_TEMPLATE_KEYS = {
1234
1344
  'trendLineLineStyle',
1235
1345
  'trendLineLineWidth',
1236
1346
  'fibLevels',
1347
+ 'levelsInk',
1348
+ 'levelsColor',
1349
+ 'fontSize',
1350
+ 'fontWeight',
1237
1351
  'visibleIntervalsMs',
1238
1352
  ],
1239
1353
  FibTrendTime: [
@@ -1246,6 +1360,10 @@ export const TOOL_TEMPLATE_KEYS = {
1246
1360
  'trendLineLineStyle',
1247
1361
  'trendLineLineWidth',
1248
1362
  'fibLevels',
1363
+ 'levelsInk',
1364
+ 'levelsColor',
1365
+ 'fontSize',
1366
+ 'fontWeight',
1249
1367
  'visibleIntervalsMs',
1250
1368
  ],
1251
1369
  FibWedge: [
@@ -1255,6 +1373,10 @@ export const TOOL_TEMPLATE_KEYS = {
1255
1373
  'backgroundOpacity',
1256
1374
  'showLabels',
1257
1375
  'fibLevels',
1376
+ 'levelsInk',
1377
+ 'levelsColor',
1378
+ 'fontSize',
1379
+ 'fontWeight',
1258
1380
  'visibleIntervalsMs',
1259
1381
  ],
1260
1382
  FibonacciRetracement: [
@@ -1272,6 +1394,10 @@ export const TOOL_TEMPLATE_KEYS = {
1272
1394
  'textPosition',
1273
1395
  'fibLevels',
1274
1396
  'levelsOnLogScale',
1397
+ 'levelsInk',
1398
+ 'levelsColor',
1399
+ 'fontSize',
1400
+ 'fontWeight',
1275
1401
  'visibleIntervalsMs',
1276
1402
  ],
1277
1403
  FibonacciTrend: [
@@ -1289,6 +1415,10 @@ export const TOOL_TEMPLATE_KEYS = {
1289
1415
  'textPosition',
1290
1416
  'fibLevels',
1291
1417
  'levelsOnLogScale',
1418
+ 'levelsInk',
1419
+ 'levelsColor',
1420
+ 'fontSize',
1421
+ 'fontWeight',
1292
1422
  'visibleIntervalsMs',
1293
1423
  ],
1294
1424
  FixedRangeVolumeProfile: [
@@ -1370,6 +1500,10 @@ export const TOOL_TEMPLATE_KEYS = {
1370
1500
  'backgroundOpacity',
1371
1501
  'hLevels',
1372
1502
  'vLevels',
1503
+ 'levelsInk',
1504
+ 'levelsColor',
1505
+ 'fontSize',
1506
+ 'fontWeight',
1373
1507
  'visibleIntervalsMs',
1374
1508
  ],
1375
1509
  GannFan: [
@@ -1379,6 +1513,10 @@ export const TOOL_TEMPLATE_KEYS = {
1379
1513
  'fillBackground',
1380
1514
  'backgroundOpacity',
1381
1515
  'gannLevels',
1516
+ 'levelsInk',
1517
+ 'levelsColor',
1518
+ 'fontSize',
1519
+ 'fontWeight',
1382
1520
  'visibleIntervalsMs',
1383
1521
  ],
1384
1522
  GannSquare: [
@@ -1391,6 +1529,10 @@ export const TOOL_TEMPLATE_KEYS = {
1391
1529
  'vLevels',
1392
1530
  'arcs',
1393
1531
  'fans',
1532
+ 'levelsInk',
1533
+ 'levelsColor',
1534
+ 'fontSize',
1535
+ 'fontWeight',
1394
1536
  'visibleIntervalsMs',
1395
1537
  ],
1396
1538
  GannSquareFixed: [
@@ -1403,6 +1545,10 @@ export const TOOL_TEMPLATE_KEYS = {
1403
1545
  'vLevels',
1404
1546
  'arcs',
1405
1547
  'fans',
1548
+ 'levelsInk',
1549
+ 'levelsColor',
1550
+ 'fontSize',
1551
+ 'fontWeight',
1406
1552
  ],
1407
1553
  GhostFeed: [
1408
1554
  'followChartTheme',
@@ -1488,6 +1634,8 @@ export const TOOL_TEMPLATE_KEYS = {
1488
1634
  'backgroundOpacity',
1489
1635
  'extendLines',
1490
1636
  'fibLevels',
1637
+ 'levelsInk',
1638
+ 'levelsColor',
1491
1639
  'visibleIntervalsMs',
1492
1640
  ],
1493
1641
  Journey: ['color', 'highlight', 'lineWidth', 'visibleIntervalsMs'],
@@ -1503,6 +1651,7 @@ export const TOOL_TEMPLATE_KEYS = {
1503
1651
  'compactStats',
1504
1652
  'lineWidth',
1505
1653
  'lineStyle',
1654
+ 'backgroundOpacity',
1506
1655
  'visibleIntervalsMs',
1507
1656
  ],
1508
1657
  ModSchiffPitchfork: [
@@ -1515,6 +1664,8 @@ export const TOOL_TEMPLATE_KEYS = {
1515
1664
  'backgroundOpacity',
1516
1665
  'extendLines',
1517
1666
  'fibLevels',
1667
+ 'levelsInk',
1668
+ 'levelsColor',
1518
1669
  'visibleIntervalsMs',
1519
1670
  ],
1520
1671
  Momentum: ['color', 'highlight', 'lineWidth', 'visibleIntervalsMs'],
@@ -1548,6 +1699,8 @@ export const TOOL_TEMPLATE_KEYS = {
1548
1699
  'backgroundOpacity',
1549
1700
  'extendLines',
1550
1701
  'fibLevels',
1702
+ 'levelsInk',
1703
+ 'levelsColor',
1551
1704
  'visibleIntervalsMs',
1552
1705
  ],
1553
1706
  Pitchfork: [
@@ -1560,6 +1713,8 @@ export const TOOL_TEMPLATE_KEYS = {
1560
1713
  'backgroundOpacity',
1561
1714
  'extendLines',
1562
1715
  'fibLevels',
1716
+ 'levelsInk',
1717
+ 'levelsColor',
1563
1718
  'visibleIntervalsMs',
1564
1719
  ],
1565
1720
  Polyline: [
@@ -1574,7 +1729,7 @@ export const TOOL_TEMPLATE_KEYS = {
1574
1729
  PositionForecast: ['color', 'lineWidth', 'lineStyle', 'profitColor', 'stopColor', 'visibleIntervalsMs'],
1575
1730
  PriceLabel: ['color', 'fontColor', 'fontSize', 'visibleIntervalsMs'],
1576
1731
  PriceNote: ['color', 'fontColor', 'fontSize', 'lineWidth', 'lineStyle', 'text', 'visibleIntervalsMs'],
1577
- PriceRange: ['bullishColor', 'bearishColor', 'lineWidth', 'lineStyle', 'visibleIntervalsMs'],
1732
+ PriceRange: ['bullishColor', 'bearishColor', 'lineWidth', 'lineStyle', 'backgroundOpacity', 'visibleIntervalsMs'],
1578
1733
  Ray: [
1579
1734
  'color',
1580
1735
  'fontColor',
@@ -1616,6 +1771,7 @@ export const TOOL_TEMPLATE_KEYS = {
1616
1771
  'useUpperDeviation',
1617
1772
  'useLowerDeviation',
1618
1773
  'showPearson',
1774
+ 'backgroundOpacity',
1619
1775
  'visibleIntervalsMs',
1620
1776
  ],
1621
1777
  RotatedRectangle: [
@@ -1638,6 +1794,8 @@ export const TOOL_TEMPLATE_KEYS = {
1638
1794
  'backgroundOpacity',
1639
1795
  'extendLines',
1640
1796
  'fibLevels',
1797
+ 'levelsInk',
1798
+ 'levelsColor',
1641
1799
  'visibleIntervalsMs',
1642
1800
  ],
1643
1801
  Sector: [
@@ -1661,9 +1819,10 @@ export const TOOL_TEMPLATE_KEYS = {
1661
1819
  'compactStats',
1662
1820
  'lineWidth',
1663
1821
  'lineStyle',
1822
+ 'backgroundOpacity',
1664
1823
  'visibleIntervalsMs',
1665
1824
  ],
1666
- Signpost: ['color', 'fontColor', 'fontSize', 'text', 'visibleIntervalsMs'],
1825
+ Signpost: ['color', 'fontColor', 'fontSize', 'backgroundOpacity', 'text', 'visibleIntervalsMs'],
1667
1826
  SineLine: ['color', 'lineWidth', 'lineStyle', 'visibleIntervalsMs'],
1668
1827
  Subtle: ['color', 'highlight', 'lineWidth', 'visibleIntervalsMs'],
1669
1828
  Text: [
@@ -1770,3 +1929,27 @@ export const TOOL_TEMPLATE_KEYS = {
1770
1929
  'visibleIntervalsMs',
1771
1930
  ],
1772
1931
  };
1932
+ /** The style a NEW drawing starts at: TOOL_DEFAULT_STYLE with the start overrides (tool-rules.ts startOverrides). */
1933
+ export const TOOL_START_STYLE = {
1934
+ ...TOOL_DEFAULT_STYLE,
1935
+ FibChannel: { ...TOOL_DEFAULT_STYLE['FibChannel'], backgroundOpacity: 4 },
1936
+ FibCircles: { ...TOOL_DEFAULT_STYLE['FibCircles'], backgroundOpacity: 4 },
1937
+ FibSpeedResistanceArcs: { ...TOOL_DEFAULT_STYLE['FibSpeedResistanceArcs'], backgroundOpacity: 4 },
1938
+ FibSpeedResistanceFan: { ...TOOL_DEFAULT_STYLE['FibSpeedResistanceFan'], backgroundOpacity: 4 },
1939
+ FibTimeZone: { ...TOOL_DEFAULT_STYLE['FibTimeZone'], backgroundOpacity: 4, trendLineLineStyle: 'dotted' },
1940
+ FibTrendTime: { ...TOOL_DEFAULT_STYLE['FibTrendTime'], backgroundOpacity: 4, trendLineLineStyle: 'dotted' },
1941
+ FibWedge: { ...TOOL_DEFAULT_STYLE['FibWedge'], backgroundOpacity: 4 },
1942
+ FibonacciRetracement: {
1943
+ ...TOOL_DEFAULT_STYLE['FibonacciRetracement'],
1944
+ backgroundOpacity: 4,
1945
+ trendLineLineStyle: 'dotted',
1946
+ },
1947
+ FibonacciTrend: { ...TOOL_DEFAULT_STYLE['FibonacciTrend'], backgroundOpacity: 4, trendLineLineStyle: 'dotted' },
1948
+ GannBox: { ...TOOL_DEFAULT_STYLE['GannBox'], backgroundOpacity: 4 },
1949
+ GannFan: { ...TOOL_DEFAULT_STYLE['GannFan'], backgroundOpacity: 4 },
1950
+ InsidePitchfork: { ...TOOL_DEFAULT_STYLE['InsidePitchfork'], backgroundOpacity: 4 },
1951
+ ModSchiffPitchfork: { ...TOOL_DEFAULT_STYLE['ModSchiffPitchfork'], backgroundOpacity: 4 },
1952
+ Pitchfan: { ...TOOL_DEFAULT_STYLE['Pitchfan'], backgroundOpacity: 4 },
1953
+ Pitchfork: { ...TOOL_DEFAULT_STYLE['Pitchfork'], backgroundOpacity: 4 },
1954
+ SchiffPitchfork: { ...TOOL_DEFAULT_STYLE['SchiffPitchfork'], backgroundOpacity: 4 },
1955
+ };