pub struct Strategy {
pub name: String,
pub timeframe: Timeframe,
pub entry: ConditionNode,
pub exit: Option<ConditionNode>,
pub stop_loss: StopLoss,
pub take_profit: Option<TakeProfit>,
pub max_position_size_pct: f64,
pub max_daily_loss_pct: f64,
pub max_drawdown_pct: f64,
pub max_concurrent_positions: usize,
}Expand description
A trading strategy composed of conditions and risk rules.
Fields§
§name: String§timeframe: Timeframe§entry: ConditionNode§exit: Option<ConditionNode>§stop_loss: StopLoss§take_profit: Option<TakeProfit>§max_position_size_pct: f64§max_daily_loss_pct: f64§max_drawdown_pct: f64§max_concurrent_positions: usizeImplementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Strategy
impl<'de> Deserialize<'de> for Strategy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Strategy
Auto Trait Implementations§
impl Freeze for Strategy
impl RefUnwindSafe for Strategy
impl Send for Strategy
impl Sync for Strategy
impl Unpin for Strategy
impl UnsafeUnpin for Strategy
impl UnwindSafe for Strategy
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