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 to confirm the turn.
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 upOutput 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§fn clone(&self) -> LadderBottom
fn clone(&self) -> LadderBottom
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LadderBottom
impl Debug for LadderBottom
Source§impl Default for LadderBottom
impl Default for LadderBottom
Source§fn default() -> LadderBottom
fn default() -> 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 the indicator is still warming up.Source§fn reset(&mut self)
fn reset(&mut self)
Source§fn warmup_period(&self) -> usize
fn warmup_period(&self) -> usize
None output can be produced.Auto 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