Struct StrategyConfigOverride
pub struct StrategyConfigOverride {
pub initial_capital: Option<f64>,
pub commission_type: Option<CommissionType>,
pub commission_value: Option<f64>,
pub margin_long: Option<f64>,
pub margin_short: Option<f64>,
pub slippage: Option<i32>,
pub pyramiding: Option<u32>,
pub risk_free_rate: Option<f64>,
pub process_orders_on_close: Option<bool>,
pub calc_on_order_fills: Option<bool>,
pub backtest_fill_limits_assumption: Option<u32>,
pub close_entries_rule: Option<CloseEntriesRule>,
}Expand description
Partial override for strategy execution parameters.
When building an Instance from a strategy script,
fields set here take precedence over the values declared in the strategy()
call. Fields left as None fall back to the script-declared defaults.
Serialize/deserialize with camelCase field names.
Fields§
§initial_capital: Option<f64>Override for strategy(initial_capital = …).
commission_type: Option<CommissionType>Override for strategy(commission_type = …).
commission_value: Option<f64>Override for strategy(commission_value = …).
margin_long: Option<f64>Override for strategy(margin_long = …).
margin_short: Option<f64>Override for strategy(margin_short = …).
slippage: Option<i32>Override for strategy(slippage = …). Unit: ticks.
pyramiding: Option<u32>Override for strategy(pyramiding = …).
risk_free_rate: Option<f64>Override for strategy(risk_free_rate = …).
process_orders_on_close: Option<bool>Override for strategy(process_orders_on_close = …).
calc_on_order_fills: Option<bool>Override for strategy(calc_on_order_fills = …).
backtest_fill_limits_assumption: Option<u32>Override for strategy(backtest_fill_limits_assumption = …).
close_entries_rule: Option<CloseEntriesRule>Override for strategy(close_entries_rule = …).
Trait Implementations§
§impl Clone for StrategyConfigOverride
impl Clone for StrategyConfigOverride
§fn clone(&self) -> StrategyConfigOverride
fn clone(&self) -> StrategyConfigOverride
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for StrategyConfigOverride
impl Debug for StrategyConfigOverride
§impl Default for StrategyConfigOverride
impl Default for StrategyConfigOverride
§fn default() -> StrategyConfigOverride
fn default() -> StrategyConfigOverride
§impl<'de> Deserialize<'de> for StrategyConfigOverride
impl<'de> Deserialize<'de> for StrategyConfigOverride
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<StrategyConfigOverride, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<StrategyConfigOverride, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl PartialEq for StrategyConfigOverride
impl PartialEq for StrategyConfigOverride
§impl Serialize for StrategyConfigOverride
impl Serialize for StrategyConfigOverride
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Copy for StrategyConfigOverride
impl StructuralPartialEq for StrategyConfigOverride
Auto Trait Implementations§
impl Freeze for StrategyConfigOverride
impl RefUnwindSafe for StrategyConfigOverride
impl Send for StrategyConfigOverride
impl Sync for StrategyConfigOverride
impl Unpin for StrategyConfigOverride
impl UnsafeUnpin for StrategyConfigOverride
impl UnwindSafe for StrategyConfigOverride
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.