pub struct HikkakeModified { /* private fields */ }Expand description
Modified Hikkake — a close-confirmed variant of the Hikkake
trap. An inside bar is followed by a bar that breaks out and is immediately
rejected: it pierces the inside bar’s range intrabar but closes back inside,
a stronger signal than the plain breakout setup.
inside bar : bar2.high < bar1.high && bar2.low > bar1.low
bullish (+1.0): bar3 makes a lower high AND lower low than bar2,
yet closes back above the inside-bar low (close3 > bar2.low)
bearish (−1.0): bar3 makes a higher high AND higher low than bar2,
yet closes back below the inside-bar high (close3 < bar2.high)Output is +1.0 (bullish), −1.0 (bearish), or 0.0 otherwise. The extra
close-recovery condition is what distinguishes it from the plain Hikkake, which
fires on the high/low break alone. The first two bars always return 0.0
because the three-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, −1.0 bearish, 0.0 no pattern — so it
drops straight into a machine-learning feature matrix as a single dimension.
§Example
use wickra_core::{Candle, HikkakeModified, Indicator};
let mut indicator = HikkakeModified::new();
indicator.update(Candle::new(10.0, 15.0, 5.0, 12.0, 1.0, 0).unwrap());
indicator.update(Candle::new(11.0, 13.0, 8.0, 12.0, 1.0, 1).unwrap());
let out = indicator
.update(Candle::new(9.0, 12.0, 6.0, 9.0, 1.0, 2).unwrap());
assert_eq!(out, Some(1.0));Implementations§
Trait Implementations§
Source§impl Clone for HikkakeModified
impl Clone for HikkakeModified
Source§fn clone(&self) -> HikkakeModified
fn clone(&self) -> HikkakeModified
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 HikkakeModified
impl Debug for HikkakeModified
Source§impl Default for HikkakeModified
impl Default for HikkakeModified
Source§fn default() -> HikkakeModified
fn default() -> HikkakeModified
Source§impl Indicator for HikkakeModified
impl Indicator for HikkakeModified
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 HikkakeModified
impl RefUnwindSafe for HikkakeModified
impl Send for HikkakeModified
impl Sync for HikkakeModified
impl Unpin for HikkakeModified
impl UnsafeUnpin for HikkakeModified
impl UnwindSafe for HikkakeModified
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