pub struct LadderBottom { /* private fields */ }Expand description
Ladder Bottom — a 5-bar bullish reversal. Three long black candles step the
market down like rungs of a ladder, a fourth black candle finally shows an
upper shadow (the first sign of buying), and a white candle then gaps up into
its body and closes above the fourth bar’s high to confirm the turn (Nison;
TA-Lib CDLLADDERBOTTOM).
bar1, bar2, bar3 black, with consecutively lower opens AND closes
bar4 black with an upper shadow (high4 > open4)
bar5 white, opens above bar4's body (open5 > open4)
and closes above bar4's high (close5 > high4)Output is +1.0 when the pattern completes and 0.0 otherwise. Ladder Bottom
is a single-direction (bullish-only) reversal, so it never emits −1.0. The
first four bars always return 0.0 because the five-bar window is not yet
filled. Pattern-shape check only — no trend filter is applied; combine with a
trend indicator for actionable signals.
§Signed ±1 encoding
This detector emits the uniform candlestick sign convention shared across the
pattern family — +1.0 bullish, 0.0 no pattern — so it drops straight into
a machine-learning feature matrix as a single dimension.
§Example
use wickra_core::{Candle, Indicator, LadderBottom};
let mut indicator = LadderBottom::new();
indicator.update(Candle::new(20.0, 20.1, 17.9, 18.0, 1.0, 0).unwrap());
indicator.update(Candle::new(18.0, 18.1, 15.9, 16.0, 1.0, 1).unwrap());
indicator.update(Candle::new(16.0, 16.1, 13.9, 14.0, 1.0, 2).unwrap());
indicator.update(Candle::new(14.0, 15.0, 12.4, 12.5, 1.0, 3).unwrap());
let out = indicator
.update(Candle::new(15.0, 17.1, 14.9, 17.0, 1.0, 4).unwrap());
assert_eq!(out, Some(1.0));Implementations§
Source§impl LadderBottom
impl LadderBottom
Trait Implementations§
Source§impl Clone for LadderBottom
impl Clone for LadderBottom
Source§impl Debug for LadderBottom
impl Debug for LadderBottom
Source§impl Default for LadderBottom
impl Default for LadderBottom
Source§impl Indicator for LadderBottom
impl Indicator for LadderBottom
Source§type Input = Candle
type Input = Candle
f64 for a price, or Candle / Tick).Source§fn update(&mut self, candle: Candle) -> Option<f64>
fn update(&mut self, candle: Candle) -> Option<f64>
None if there is no value for this input. Read moreSource§fn reset(&mut self)
fn reset(&mut self)
Source§fn warmup_period(&self) -> usize
fn warmup_period(&self) -> usize
None output can be produced.Source§fn is_ready(&self) -> bool
fn is_ready(&self) -> bool
Source§fn name(&self) -> &'static str
fn name(&self) -> &'static str
Source§fn batch_nan_into(&mut self, inputs: &[Self::Input], out: &mut [f64])
fn batch_nan_into(&mut self, inputs: &[Self::Input], out: &mut [f64])
Source§fn batch_fast_into(&mut self, inputs: &[Self::Input], out: &mut [f64])
fn batch_fast_into(&mut self, inputs: &[Self::Input], out: &mut [f64])
batch_nan_into, but
an indicator with a vectorised kernel may reassociate its arithmetic to
run it in SIMD lanes. Each value then agrees with the exact batch to within
the tolerance the indicator documents (a few units in the last place), not
bit for bit; warmup positions, NaN placement and the output length are
identical. The kernels are deterministic: the same input produces the same
bits on every platform, with or without SIMD hardware. Read moreAuto Trait Implementations§
impl Freeze for LadderBottom
impl RefUnwindSafe for LadderBottom
impl Send for LadderBottom
impl Sync for LadderBottom
impl Unpin for LadderBottom
impl UnsafeUnpin for LadderBottom
impl UnwindSafe for LadderBottom
Blanket Implementations§
Source§impl<T> BatchExt for Twhere
T: Indicator,
impl<T> BatchExt for Twhere
T: Indicator,
Source§fn batch(&mut self, inputs: &[Self::Input]) -> Vec<Option<Self::Output>>
fn batch(&mut self, inputs: &[Self::Input]) -> Vec<Option<Self::Output>>
None during warmup) per input.Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more