hyperprop-charting-library 0.1.145 → 0.1.147
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/dist/hyperprop-charting-library.cjs +663 -3
- package/dist/hyperprop-charting-library.d.ts +29 -1
- package/dist/hyperprop-charting-library.js +663 -3
- package/dist/index.cjs +663 -3
- package/dist/index.d.cts +29 -1
- package/dist/index.d.ts +29 -1
- package/dist/index.js +663 -3
- package/docs/API.md +76 -0
- package/package.json +2 -2
|
@@ -120,6 +120,12 @@ type DrawingToolType = "horizontal-line" | "vertical-line" | "trendline" | "ray"
|
|
|
120
120
|
| "brush"
|
|
121
121
|
/** Text box with a connector line pointing at an anchored bar/price. */
|
|
122
122
|
| "callout"
|
|
123
|
+
/**
|
|
124
|
+
* Volume profile over a bar range picked by two clicks (TradingView's
|
|
125
|
+
* fixed-range volume profile). Only the two anchors' bar indexes matter —
|
|
126
|
+
* the price extent comes from the bars they enclose.
|
|
127
|
+
*/
|
|
128
|
+
| "fixed-range-volume-profile"
|
|
123
129
|
/**
|
|
124
130
|
* TradingView-style ruler. Unlike every other tool it is transient: the
|
|
125
131
|
* measurement overlay is never added to the drawings list (no
|
|
@@ -157,6 +163,12 @@ interface DrawingObjectOptions {
|
|
|
157
163
|
pointValue?: number;
|
|
158
164
|
qtyPrecision?: number;
|
|
159
165
|
fontSize?: number;
|
|
166
|
+
/** Price buckets across the range. Default 24. */
|
|
167
|
+
profileRows?: number;
|
|
168
|
+
/** Share of volume enclosed by the value area. Default 70. */
|
|
169
|
+
profileValueAreaPercent?: number;
|
|
170
|
+
/** Profile width as a share of the selected range. Default 0.5. */
|
|
171
|
+
profileWidthRatio?: number;
|
|
160
172
|
}
|
|
161
173
|
/** Default colors for position tools: [profit, loss, label text]. */
|
|
162
174
|
declare const POSITION_DEFAULT_COLORS: string[];
|
|
@@ -220,7 +232,7 @@ interface DrawingHoverEvent {
|
|
|
220
232
|
x: number;
|
|
221
233
|
y: number;
|
|
222
234
|
}
|
|
223
|
-
type DrawingDefaults = Partial<Pick<DrawingObjectOptions, "color" | "colors" | "style" | "width" | "accountSize" | "lotSize" | "risk" | "riskMode" | "leverage" | "pointValue" | "qtyPrecision" | "fontSize">>;
|
|
235
|
+
type DrawingDefaults = Partial<Pick<DrawingObjectOptions, "color" | "colors" | "style" | "width" | "accountSize" | "lotSize" | "risk" | "riskMode" | "leverage" | "pointValue" | "qtyPrecision" | "fontSize" | "profileRows" | "profileValueAreaPercent" | "profileWidthRatio">>;
|
|
224
236
|
interface IndicatorInstanceOptions<TInputs extends Record<string, unknown> = Record<string, unknown>> {
|
|
225
237
|
id?: string;
|
|
226
238
|
type: string;
|
|
@@ -264,6 +276,22 @@ interface IndicatorRenderContext {
|
|
|
264
276
|
opacity: number;
|
|
265
277
|
horizontalLines: boolean;
|
|
266
278
|
};
|
|
279
|
+
/**
|
|
280
|
+
* The chart's trading-session view, so indicators can be session-aware
|
|
281
|
+
* without re-deriving one. Present only when a session spec is configured
|
|
282
|
+
* (`setSession`); session-based indicators should fall back to calendar
|
|
283
|
+
* days — or render nothing — when it is absent.
|
|
284
|
+
*/
|
|
285
|
+
session?: {
|
|
286
|
+
/** Trading day a bar belongs to; equal for bars in the same session. */
|
|
287
|
+
dayAt: (index: number) => number;
|
|
288
|
+
/** False for bars outside trading hours (overnight, maintenance break). */
|
|
289
|
+
inSessionAt: (index: number) => boolean;
|
|
290
|
+
/** True when the bar opens a new trading day. */
|
|
291
|
+
isSessionStart: (index: number) => boolean;
|
|
292
|
+
/** Minutes past midnight in the session's own zone. */
|
|
293
|
+
minutesOfDayAt: (index: number) => number;
|
|
294
|
+
};
|
|
267
295
|
}
|
|
268
296
|
/** Emitted when a pane-legend control (hover buttons) is clicked. */
|
|
269
297
|
interface IndicatorPaneActionEvent {
|