From fdc93e9cbe21f24ebf7d674426e3863238d702e6 Mon Sep 17 00:00:00 2001 From: Giulio De Pasquale Date: Thu, 25 Feb 2021 19:25:23 +0000 Subject: [PATCH] Comments --- src/strategy.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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,