lightweight-charts-drawing 0.5.0 → 0.6.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,35 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.6.0 (13/10/2026)
4
+
5
+ ### Added
6
+
7
+ - `Coords.lowerTimeframe` (optional): bars of the chart symbol on a lower
8
+ timeframe (`bars(resolution, from)`, `barEnd(time)`, `seconds`). The fixed
9
+ range and anchored volume profiles are built from them (timeframe by the
10
+ span of the range: the first of 1, 5, 15, 30, 60, 240 minutes or 1 day
11
+ giving fewer than 5000 bars) and fall back to the chart bars without it.
12
+ - Core `kinds/vbp-engine`: the volume profile engine (rows, allocation,
13
+ direction, POC, value area, lower-timeframe choice) shared with the
14
+ OpenTrader profile studies.
15
+
16
+ ### Changed
17
+
18
+ - Volume profiles follow the reference rules: high / low rounded to the tick,
19
+ "Number Of Rows" picks the ticks per row whose row count is closest to the
20
+ input (rows may pass the high), "Ticks Per Row" rows sit on multiples of the
21
+ row size, a doji's direction comes from the previous close, the value area
22
+ adds the larger neighbour row only while it fits in the value area volume,
23
+ and the POC of equal rows is the one closest to the middle.
24
+
25
+ ## 0.5.1 (08/10/2026)
26
+
27
+ ### Added
28
+
29
+ - Core `vwapLast(drawing, bars)` (`src/core/kinds/data-series`): the anchored
30
+ VWAP and its deviation at the last bar of any bars of the symbol, not only
31
+ a chart's. `vwapLastValue` is unchanged.
32
+
3
33
  ## 0.5.0 (08/10/2026)
4
34
 
5
35
  ### Added
package/dist/index.d.ts CHANGED
@@ -114,6 +114,8 @@ export declare type Coords = {
114
114
  timeZone: string;
115
115
  intraday: boolean;
116
116
  };
117
+ /** Lower-timeframe bars of the chart symbol (volume profile drawings); optional. */
118
+ lowerTimeframe?: LowerTimeframe;
117
119
  };
118
120
 
119
121
  declare type Ctx = CanvasRenderingContext2D;
@@ -795,6 +797,18 @@ export declare type LoadedImage = {
795
797
  height: number;
796
798
  };
797
799
 
800
+ /** Bars of the chart symbol on a lower timeframe (the volume profiles are built from them, as the reference
801
+ * app's volume profile study). Optional: without it the profiles use the chart bars. */
802
+ declare type LowerTimeframe = {
803
+ /** Bars on `resolution` ("1", "5", "15", "30", "60", "240", "1D", "1S") from `from` (epoch seconds) on;
804
+ * undefined while they load (the host redraws the drawings when they arrive). */
805
+ bars: (resolution: string, from: number) => OHLC[] | undefined;
806
+ /** End (epoch seconds) of the chart bar starting at `time`: its interval, a daily bar's session close. */
807
+ barEnd: (time: number) => number;
808
+ /** The chart interval is in seconds (its profiles use 1-second bars). */
809
+ seconds: boolean;
810
+ };
811
+
798
812
  export declare type MagnetMode = "off" | "weak" | "strong";
799
813
 
800
814
  export declare function makeCoords(chart: IChartApi, series: ISeriesApi<SeriesType>, getRaw: () => OHLC[],