react-native-vroom-chart 0.15.0 → 0.16.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 (42) hide show
  1. package/cpp/VroomChartHostObject.cpp +171 -1
  2. package/cpp/_core_include/vroom/vroom_chart.h +137 -4
  3. package/cpp/_core_src/atr.cpp +67 -0
  4. package/cpp/_core_src/atr.h +44 -0
  5. package/cpp/_core_src/atr_pane.cpp +162 -0
  6. package/cpp/_core_src/atr_pane.h +48 -0
  7. package/cpp/_core_src/chart.cpp +461 -172
  8. package/cpp/_core_src/chart.h +150 -1
  9. package/cpp/_core_src/chart_facade.cpp +209 -23
  10. package/cpp/_core_src/fair_value_gaps.cpp +76 -0
  11. package/cpp/_core_src/fair_value_gaps.h +54 -0
  12. package/cpp/_core_src/fvg_overlay.cpp +262 -0
  13. package/cpp/_core_src/fvg_overlay.h +43 -0
  14. package/cpp/_core_src/ichimoku.cpp +65 -0
  15. package/cpp/_core_src/ichimoku.h +45 -0
  16. package/cpp/_core_src/labels.cpp +3 -0
  17. package/cpp/_core_src/line_morph.h +159 -0
  18. package/cpp/_core_src/ma_overlay.cpp +259 -36
  19. package/cpp/_core_src/ma_overlay.h +57 -2
  20. package/cpp/_core_src/macd.cpp +24 -1
  21. package/cpp/_core_src/macd.h +16 -0
  22. package/cpp/_core_src/macd_pane.cpp +71 -62
  23. package/cpp/_core_src/macd_pane.h +13 -1
  24. package/cpp/_core_src/pane_series.h +169 -0
  25. package/cpp/_core_src/rsi.cpp +4 -0
  26. package/cpp/_core_src/rsi.h +7 -0
  27. package/cpp/_core_src/rsi_pane.cpp +85 -29
  28. package/cpp/_core_src/rsi_pane.h +11 -1
  29. package/cpp/_core_src/viewport.h +35 -0
  30. package/lib/index.d.mts +251 -3
  31. package/lib/index.d.ts +251 -3
  32. package/lib/index.js +224 -6
  33. package/lib/index.js.map +1 -1
  34. package/lib/index.mjs +224 -6
  35. package/lib/index.mjs.map +1 -1
  36. package/package.json +1 -1
  37. package/src/VroomChart.tsx +21 -3
  38. package/src/dataTransitions.ts +47 -0
  39. package/src/index.ts +5 -0
  40. package/src/jsi.d.ts +97 -1
  41. package/src/types.ts +5 -0
  42. package/src/useChartCore.ts +284 -5
@@ -0,0 +1,48 @@
1
+ // ATR indicator pane — draws the Average True Range line, its caption, and a
2
+ // peak label in the band below the candles. Its own module alongside
3
+ // rsi_pane / macd_pane so the chart orchestrator stays thin.
4
+
5
+ #pragma once
6
+
7
+ #include <cstddef>
8
+ #include <cstdint>
9
+
10
+ #include "vroom/vroom_chart.h" // ::VroomCandle
11
+
12
+ class SkCanvas;
13
+
14
+ namespace vroom {
15
+ struct Layout;
16
+ struct LineMorph;
17
+ } // namespace vroom
18
+
19
+ struct VroomChart;
20
+
21
+ namespace vroom::atr_pane {
22
+
23
+ // Draws the ATR pane spanning vertically [pane_top, pane_bottom]. `atr_visible`
24
+ // is the cached ATR series aligned with `visible` (NaN where undefined). ATR is
25
+ // strictly positive and unbounded, so the pane fits 0..peak anchored at its
26
+ // bottom edge rather than centering on a reference level.
27
+ //
28
+ // `from` / `morph_t` are the interval morph: the capture holds the curve's
29
+ // outgoing shape indexed from the right (slot 0 = newest), in fractions of the
30
+ // band, so the pane is free to re-fit across the switch without the shape
31
+ // moving. The peak label eases between the two fits. A fade's outgoing half
32
+ // passes n = 0 with morph_t = 0, which paints the capture alone.
33
+ void draw(SkCanvas* canvas,
34
+ const VroomChart& chart,
35
+ const Layout& lay,
36
+ const ::VroomCandle* visible,
37
+ std::size_t n,
38
+ const double* atr_visible,
39
+ int64_t window_ms,
40
+ int64_t visible_start_ms,
41
+ int64_t candle_duration_ms,
42
+ float candle_right,
43
+ float pane_top,
44
+ float pane_bottom,
45
+ const LineMorph* from = nullptr,
46
+ float morph_t = 1.f);
47
+
48
+ } // namespace vroom::atr_pane