Skip to main content

PriceStrategy

Trait PriceStrategy 

Source
pub trait PriceStrategy: Send + Sync {
    // Required method
    fn signal(&self, history: &[f64]) -> Signal;
}
Expand description

A stateless strategy mapping price history to a trading signal.

Given the same history, always produces the same signal.

Required Methods§

Source

fn signal(&self, history: &[f64]) -> Signal

Determine the trading signal from observed price history.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§