diff --git a/src/strategy.rs b/src/strategy.rs index 7080018..d4c7893 100644 --- a/src/strategy.rs +++ b/src/strategy.rs @@ -70,10 +70,15 @@ impl Debug for dyn OrderStrategy { #[derive(Clone, Debug)] pub struct TrailingStop { - // position id: stop_percentage + // Position ID: stop percentage mapping stop_percentages: HashMap, - // position_id: bool + // Position ID: bool mapping. Represents when the strategy has asked the + // order manager to set a stop loss order stop_loss_flags: HashMap, + // Position ID: bool mapping. Represents when the strategy has asked the + // order manager to set a limit order to close the position as the stop percentage + // has been surpassed + trail_set_flags: HashMap, capital_max_loss: f64, capital_min_profit: f64, capital_good_profit: f64,