feat(indicators): A5b Fibonacci tools (geometric) (#172)
Completes the **Fibonacci** family with the four geometric/time tools (catalogue 373 -> 377). All extend the internal `pattern_swing` ZigZag tracker with a per-pivot bar index and a current-bar counter (additive — the chart/harmonic detectors are unaffected), and emit `Candle -> struct` outputs via custom Python/Node/WASM bindings. | Tool | Output | |------|--------| | `FibFan` | three trendlines fanning from a swing start through its 38.2/50/61.8% retracement levels, extended to the current bar | | `FibArcs` | semicircular retracement levels centred on the swing end, normalised by the leg's bar-width (chart-scale-free) | | `FibChannel` | a sloped base trendline plus parallel lines at Fibonacci multiples of the channel width | | `FibTimeZones` | markers at Fibonacci bar-distances (1/2/3/5/8/...) from the latest swing pivot | The geometric tools are novel as streaming indicators; each normalises its geometry to the swing leg's bar-width so the output is chart-scale-free. Formulas are documented in each module and deep-dive. Fully wired: core (100% unit-tested branches incl. the new `pattern_swing` bar tracking), Python/Node/WASM struct bindings, fuzz, reference + streaming-vs-batch tests. Verification: `cargo test --workspace` green, clippy `-D warnings` clean, node 454 tests, python 768 tests.
This commit is contained in:
Vendored
+56
@@ -402,6 +402,26 @@ export interface FibConfluenceValue {
|
||||
price: number
|
||||
strength: number
|
||||
}
|
||||
export interface FibFanValue {
|
||||
fan382: number
|
||||
fan500: number
|
||||
fan618: number
|
||||
}
|
||||
export interface FibArcsValue {
|
||||
arc382: number
|
||||
arc500: number
|
||||
arc618: number
|
||||
}
|
||||
export interface FibChannelValue {
|
||||
base: number
|
||||
level618: number
|
||||
level1000: number
|
||||
level1618: number
|
||||
}
|
||||
export interface FibTimeZonesValue {
|
||||
onZone: number
|
||||
barsToNext: number
|
||||
}
|
||||
export type SmaNode = SMA
|
||||
export declare class SMA {
|
||||
constructor(period: number)
|
||||
@@ -3926,3 +3946,39 @@ export declare class FibConfluence {
|
||||
isReady(): boolean
|
||||
warmupPeriod(): number
|
||||
}
|
||||
export type FibFanNode = FibFan
|
||||
export declare class FibFan {
|
||||
constructor()
|
||||
update(high: number, low: number): FibFanValue | null
|
||||
batch(high: Array<number>, low: Array<number>): Array<number>
|
||||
reset(): void
|
||||
isReady(): boolean
|
||||
warmupPeriod(): number
|
||||
}
|
||||
export type FibArcsNode = FibArcs
|
||||
export declare class FibArcs {
|
||||
constructor()
|
||||
update(high: number, low: number): FibArcsValue | null
|
||||
batch(high: Array<number>, low: Array<number>): Array<number>
|
||||
reset(): void
|
||||
isReady(): boolean
|
||||
warmupPeriod(): number
|
||||
}
|
||||
export type FibChannelNode = FibChannel
|
||||
export declare class FibChannel {
|
||||
constructor()
|
||||
update(high: number, low: number): FibChannelValue | null
|
||||
batch(high: Array<number>, low: Array<number>): Array<number>
|
||||
reset(): void
|
||||
isReady(): boolean
|
||||
warmupPeriod(): number
|
||||
}
|
||||
export type FibTimeZonesNode = FibTimeZones
|
||||
export declare class FibTimeZones {
|
||||
constructor()
|
||||
update(high: number, low: number): FibTimeZonesValue | null
|
||||
batch(high: Array<number>, low: Array<number>): Array<number>
|
||||
reset(): void
|
||||
isReady(): boolean
|
||||
warmupPeriod(): number
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user