Comments
This commit is contained in:
parent
d8d0e07a0b
commit
fdc93e9cbe
@ -70,10 +70,15 @@ impl Debug for dyn OrderStrategy {
|
|||||||
|
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct TrailingStop {
|
pub struct TrailingStop {
|
||||||
// position id: stop_percentage
|
// Position ID: stop percentage mapping
|
||||||
stop_percentages: HashMap<u64, f64>,
|
stop_percentages: HashMap<u64, f64>,
|
||||||
// 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<u64, bool>,
|
stop_loss_flags: HashMap<u64, bool>,
|
||||||
|
// 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<u64, bool>,
|
||||||
capital_max_loss: f64,
|
capital_max_loss: f64,
|
||||||
capital_min_profit: f64,
|
capital_min_profit: f64,
|
||||||
capital_good_profit: f64,
|
capital_good_profit: f64,
|
||||||
|
Loading…
Reference in New Issue
Block a user