pub struct RickshawMan { /* private fields */ }Expand description
Rickshaw Man — a single-bar indecision signal. A long-legged doji whose tiny body sits near the middle of a wide range, the most balanced form of indecision: neither side controlled the close and the midpoint pins it.
range = high − low
doji = |close − open| <= 0.1 * range
long upper = high − max(open, close) >= 0.3 * range
long lower = min(open, close) − low >= 0.3 * range
centred body = body midpoint within the central 40–60 % of the rangeOutput is +1.0 when the rickshaw man prints and 0.0 otherwise. This is a
non-directional indecision flag — it never emits −1.0. A rickshaw man is a
special case of a long-legged doji (the body additionally sits at the centre),
so both detectors may flag the same bar. Body and shadow thresholds follow the
geometric house style (fixed fractions of the bar range) rather than TA-Lib’s
rolling averages. 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 detected, 0.0 no pattern — so it drops straight into
a machine-learning feature matrix as a single dimension.
§Example
use wickra_core::{Candle, Indicator, RickshawMan};
let mut indicator = RickshawMan::new();
// Tiny body centred in a wide range, long shadows both sides.
let candle = Candle::new(10.0, 12.0, 8.0, 10.0, 1.0, 0).unwrap();
assert_eq!(indicator.update(candle), Some(1.0));Implementations§
Source§impl RickshawMan
impl RickshawMan
Trait Implementations§
Source§impl Clone for RickshawMan
impl Clone for RickshawMan
Source§fn clone(&self) -> RickshawMan
fn clone(&self) -> RickshawMan
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 RickshawMan
impl Debug for RickshawMan
Source§impl Default for RickshawMan
impl Default for RickshawMan
Source§fn default() -> RickshawMan
fn default() -> RickshawMan
Source§impl Indicator for RickshawMan
impl Indicator for RickshawMan
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 RickshawMan
impl RefUnwindSafe for RickshawMan
impl Send for RickshawMan
impl Sync for RickshawMan
impl Unpin for RickshawMan
impl UnsafeUnpin for RickshawMan
impl UnwindSafe for RickshawMan
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