pub struct IchimokuEngine { /* private fields */ }Expand description
Ichimoku Kinko Hyo: tenkan-sen, kijun-sen and the two cloud spans.
A line’s value is the midpoint of the highest high and the lowest low over its window:
tenkan over tenkan_p bars, kijun over kijun_p, senkou_b over senkou_b_p, and
senkou_a = (tenkan + kijun) / 2. The spans are published unshifted, on the bar they are
computed for; drawing them kijun_p bars ahead, as the cloud is usually shown, is left to the
consumer. There is no chikou span.
value: tenkan - kijun; extra carries all four lines. First output: with the
senkou_b_p-th bar. Indicator::reset clears the window.
Implementations§
Trait Implementations§
Source§impl Indicator for IchimokuEngine
impl Indicator for IchimokuEngine
fn name(&self) -> &str
fn warmup_period(&self) -> usize
fn reset(&mut self)
fn on_bar(&mut self, bar: &Bar) -> Option<IndicatorOutput>
fn alerts(&self) -> Vec<IndicatorAlert>
Source§fn on_checked_bar(
&mut self,
bar: &Bar,
) -> Result<Option<IndicatorOutput>, BarValidationError>
fn on_checked_bar( &mut self, bar: &Bar, ) -> Result<Option<IndicatorOutput>, BarValidationError>
Validates a bar before forwarding it to
Indicator::on_bar.Auto Trait Implementations§
impl Freeze for IchimokuEngine
impl RefUnwindSafe for IchimokuEngine
impl Send for IchimokuEngine
impl Sync for IchimokuEngine
impl Unpin for IchimokuEngine
impl UnsafeUnpin for IchimokuEngine
impl UnwindSafe for IchimokuEngine
Blanket Implementations§
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
Mutably borrows from an owned value. Read more