pub struct StrategyFactory { /* private fields */ }Expand description
Creates built-in and host strategies by name.
Ten price-action strategies need only strategies; twelve more use the public study
calculations when studies is enabled. Inputs are available through
Strategy::study_inputs and edited through Strategy::set_input. Entry size and
pyramiding come from super::BacktestSettings. Built-ins ignore fill callbacks and decide
at bar close, or on forming-bar updates when tick recalculation is enabled.
use egui_charts::strategies::StrategyFactory;
use egui_charts::studies::InputValue;
let factory = StrategyFactory::new();
let mut strategy = factory.create("Consecutive Up/Down").unwrap();
strategy.set_input("length", InputValue::Length(3)).unwrap();
assert!(!strategy.study_inputs().is_empty());Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for StrategyFactory
impl !UnwindSafe for StrategyFactory
impl Freeze for StrategyFactory
impl Send for StrategyFactory
impl Sync for StrategyFactory
impl Unpin for StrategyFactory
impl UnsafeUnpin for StrategyFactory
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
Converts
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> ⓘ
Converts
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