pub struct OutcomeRecorder { /* private fields */ }Expand description
Bar-by-bar lookahead-free evaluation recorder for active strategy setups.
Implementations§
Source§impl OutcomeRecorder
impl OutcomeRecorder
pub fn new() -> Self
pub fn with_intrabar_fill_policy(policy: IntrabarFillPolicy) -> Self
Sourcepub fn record_setup(
&mut self,
timestamp: i64,
trigger: TriggerAction,
score: f64,
agreement: f64,
entry_price: f64,
target_price: f64,
stop_price: f64,
max_duration_bars: usize,
) -> Result<u64, RecordSetupError>
pub fn record_setup( &mut self, timestamp: i64, trigger: TriggerAction, score: f64, agreement: f64, entry_price: f64, target_price: f64, stop_price: f64, max_duration_bars: usize, ) -> Result<u64, RecordSetupError>
Registers a new active trade setup for forward evaluation.
Sourcepub fn on_bar(&mut self, bar: &Bar)
pub fn on_bar(&mut self, bar: &Bar)
Processes an incoming price bar, updating MFE/MAE and checking for target/stop hits.
pub fn completed_records(&self) -> &[SignalEvaluationRecord]
pub fn active_setups(&self) -> &[ActiveSetup]
pub fn completed_excursions(&self) -> &[OutcomeExcursion]
Trait Implementations§
Source§impl Clone for OutcomeRecorder
impl Clone for OutcomeRecorder
Source§fn clone(&self) -> OutcomeRecorder
fn clone(&self) -> OutcomeRecorder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OutcomeRecorder
impl Debug for OutcomeRecorder
Source§impl Default for OutcomeRecorder
impl Default for OutcomeRecorder
Source§fn default() -> OutcomeRecorder
fn default() -> OutcomeRecorder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for OutcomeRecorder
impl RefUnwindSafe for OutcomeRecorder
impl Send for OutcomeRecorder
impl Sync for OutcomeRecorder
impl Unpin for OutcomeRecorder
impl UnsafeUnpin for OutcomeRecorder
impl UnwindSafe for OutcomeRecorder
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