pub struct Kagi { /* private fields */ }Expand description
Kagi lines: a new line starts when the price reverses by the reversal amount; lines are thick (yang) after rising above the previous shoulder and thin (yin) after falling below the previous waist. The last line is forming.
§Examples
use ferrochart_core::chart::SeriesOptions;
use ferrochart_core::transform::{Kagi, Reversal};
use ferrochart_core::{Chart, ChartOptions};
let mut chart = Chart::new(ChartOptions::default());
chart.add_transform_series(
chart.main_pane(),
Box::new(Kagi::new(Reversal::Percent(1.0))?),
SeriesOptions::default(),
)?;Implementations§
Trait Implementations§
Source§impl SeriesTransform for Kagi
impl SeriesTransform for Kagi
Source§fn output_kind(&self) -> SeriesKind
fn output_kind(&self) -> SeriesKind
How the output is drawn:
Candlestick, OhlcBar, Kagi or
PointFigure.Source§fn push(&mut self, bar: InputBar, out: &mut TransformOutput)
fn push(&mut self, bar: InputBar, out: &mut TransformOutput)
Commits
bar and writes the elements it finishes.Source§fn peek(&self, bar: InputBar, out: &mut TransformOutput)
fn peek(&self, bar: InputBar, out: &mut TransformOutput)
Writes, without changing the state, the elements
bar would finish
and the ones still forming if it were the last input.Auto Trait Implementations§
impl Forget for Kagi
impl Freeze for Kagi
impl Move for Kagi
impl RefUnwindSafe for Kagi
impl Send for Kagi
impl Sync for Kagi
impl Unpin for Kagi
impl UnsafeUnpin for Kagi
impl UnwindSafe for Kagi
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