@tradecanvas/commons 1.22.0 → 1.23.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.
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** Which way a candle pattern points. */
|
|
2
|
+
export type CandlePatternDirection = 'bullish' | 'bearish' | 'neutral';
|
|
3
|
+
/** What a candle pattern says: a turn, more of the same, or doubt. */
|
|
4
|
+
export type CandlePatternKind = 'reversal' | 'continuation' | 'indecision';
|
|
5
|
+
export interface CandlePatternInfo {
|
|
6
|
+
/** `'bullishEngulfing'`, `'hammer'`… */
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
/** A label short enough to print over a bar: `'Engulf'`, `'Hammer'`. */
|
|
10
|
+
short: string;
|
|
11
|
+
direction: CandlePatternDirection;
|
|
12
|
+
kind: CandlePatternKind;
|
|
13
|
+
/** How many bars it spans, its last bar the one it is found on. */
|
|
14
|
+
bars: number;
|
|
15
|
+
}
|
|
16
|
+
export interface CandlePatternMatch {
|
|
17
|
+
/** The index of the pattern's last bar. */
|
|
18
|
+
index: number;
|
|
19
|
+
/** That bar's time. */
|
|
20
|
+
time: number;
|
|
21
|
+
pattern: CandlePatternInfo;
|
|
22
|
+
}
|
|
23
|
+
export interface CandlePatternOptions {
|
|
24
|
+
/** Only these pattern ids; default all. */
|
|
25
|
+
patterns?: readonly string[];
|
|
26
|
+
/** Bars in the average the trend before a pattern is read from, and in the average body and range. Default `10`. */
|
|
27
|
+
trendPeriod?: number;
|
|
28
|
+
/** Only patterns ending at or after this bar index. */
|
|
29
|
+
from?: number;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=candlePatterns.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"candlePatterns.d.ts","sourceRoot":"","sources":["../../src/types/candlePatterns.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,MAAM,MAAM,sBAAsB,GAAG,SAAS,GA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7B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,qBAAqB,CAAC"}
|