openalgo-charts 1.8.1 → 1.8.2

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
@@ -269,7 +269,7 @@ npm run verify # typecheck + test + build + size
269
269
 
270
270
  ## Status & limitations
271
271
 
272
- Version **1.8.1**. All engine build phases are implemented with 2038 unit tests across 110 files.
272
+ Version **1.8.2**. All engine build phases are implemented with 2042 unit tests across 110 files.
273
273
 
274
274
  Known gaps, stated plainly:
275
275
 
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /** Library version string. Matches package.json (published npm release). */
2
- declare const VERSION = "1.8.1";
2
+ declare const VERSION = "1.8.2";
3
3
  /** Returns the current library version. */
4
4
  declare function version(): string;
5
5
 
@@ -1633,6 +1633,14 @@ interface IndicatorCalcContext {
1633
1633
  timezone: string;
1634
1634
  /** Chart wall clock in UTC seconds, the clock the countdown row reads. */
1635
1635
  now(): number;
1636
+ /**
1637
+ * The instrument's tick size, from the pane's price scale `minMove`.
1638
+ *
1639
+ * `undefined` when the host has not told the chart what it is, which is the
1640
+ * honest answer rather than a guessed 0.01: an indicator sizing a range in
1641
+ * ticks has to tell "one paisa" apart from "nobody said".
1642
+ */
1643
+ tickSize?: number;
1636
1644
  }
1637
1645
  /** What an alert's `when` predicate is handed, for the bar it is judging. */
1638
1646
  interface IndicatorAlertContext {
@@ -2324,6 +2332,11 @@ interface IndicatorHost {
2324
2332
  setBarColors?(colors: readonly (string | null)[] | null, owner: string): void;
2325
2333
  /** Emit on the chart's event bus (indicator alerts, and `attach`'s own events). */
2326
2334
  emit?(event: string, payload: unknown): void;
2335
+ /**
2336
+ * Tick size of the pane's price scale, or undefined when none is set.
2337
+ * Optional so a host predating it still satisfies this interface.
2338
+ */
2339
+ tickSize?(paneIndex: number): number | undefined;
2327
2340
  /** Pin a pane's price scale to a fixed range, or release it with `null`. */
2328
2341
  setPaneRange(paneIndex: number, range: {
2329
2342
  min: number;