feat: TA-Lib candlestick patterns — gap-three-methods/stalled/stick-sandwich/takuri (part 8 of 9) (#140)
Adds five TA-Lib candlestick patterns, each a streaming `Indicator<Input = Candle, Output = f64>` emitting the family's uniform `±1.0 / 0.0` sign convention, fully wired across the Rust core, Python / Node / WASM bindings, fuzz target and reference tests. - **Upside Gap Three Methods** (`CDLXSIDEGAP3METHODS`) — a 3-bar bullish continuation: two white candles gap up, then a black candle opens within the second body and closes within the first; bullish +1. - **Downside Gap Three Methods** (`CDLXSIDEGAP3METHODS`) — the bearish mirror: two black candles gap down, then a white candle opens within the second body and closes within the first; bearish -1. - **Stalled Pattern** (`CDLSTALLEDPATTERN`) — a 3-bar bearish reversal warning: two long white candles then a small white candle riding the shoulder, signalling the rally is stalling; bearish -1. - **Stick Sandwich** (`CDLSTICKSANDWICH`) — a 3-bar bullish reversal: two black candles closing at the same level sandwich a white candle, marking a support floor; bullish +1. - **Takuri** (`CDLTAKURI`) — a single-bar bullish reversal, a strict Dragonfly Doji with a negligible upper shadow and very long lower shadow; bullish +1. Body and shadow thresholds follow the geometric house style (fixed fractions of the bar range) rather than TA-Lib's rolling averages. Upside / Downside Gap Three Methods share the `CDLXSIDEGAP3METHODS` code, so the second carries a manual CHANGELOG entry (as with Rising / Falling Three Methods). Counter 279 → 284 (mod-count == lib counted block; FAMILIES total 274 → 279). Stacked on #139 (`feat/cdl-lines`); base retargets to `main` once the predecessor merges.
This commit is contained in:
@@ -11675,6 +11675,19 @@ candle_pattern_no_param!(
|
||||
wc::FallingThreeMethods,
|
||||
"FallingThreeMethods"
|
||||
);
|
||||
candle_pattern_no_param!(
|
||||
PyUpsideGapThreeMethods,
|
||||
wc::UpsideGapThreeMethods,
|
||||
"UpsideGapThreeMethods"
|
||||
);
|
||||
candle_pattern_no_param!(
|
||||
PyDownsideGapThreeMethods,
|
||||
wc::DownsideGapThreeMethods,
|
||||
"DownsideGapThreeMethods"
|
||||
);
|
||||
candle_pattern_no_param!(PyStalledPattern, wc::StalledPattern, "StalledPattern");
|
||||
candle_pattern_no_param!(PyStickSandwich, wc::StickSandwich, "StickSandwich");
|
||||
candle_pattern_no_param!(PyTakuri, wc::Takuri, "Takuri");
|
||||
// ============================== Microstructure: Order Book ==============================
|
||||
//
|
||||
// Order-book indicators consume a depth snapshot rather than OHLCV. Streaming
|
||||
@@ -14206,6 +14219,11 @@ fn _wickra(_py: Python<'_>, m: &Bound<'_, PyModule>) -> PyResult<()> {
|
||||
m.add_class::<PyShortLine>()?;
|
||||
m.add_class::<PyRisingThreeMethods>()?;
|
||||
m.add_class::<PyFallingThreeMethods>()?;
|
||||
m.add_class::<PyUpsideGapThreeMethods>()?;
|
||||
m.add_class::<PyDownsideGapThreeMethods>()?;
|
||||
m.add_class::<PyStalledPattern>()?;
|
||||
m.add_class::<PyStickSandwich>()?;
|
||||
m.add_class::<PyTakuri>()?;
|
||||
// Microstructure: order book.
|
||||
m.add_class::<PyOrderBookImbalanceTop1>()?;
|
||||
m.add_class::<PyOrderBookImbalanceTopN>()?;
|
||||
|
||||
Reference in New Issue
Block a user