#[derive(Debug, Clone, PartialEq, Default)]
pub enum TradeAction {
    #[default]
    BuyOpen,
    BuyClose,
    SellOpen,
    SellClose,
}

impl TradeAction {
    pub fn is_open(&self) -> bool {
        matches!(self, TradeAction::BuyOpen | TradeAction::SellOpen)
    }

    pub fn is_buy(&self) -> bool {
        matches!(self, TradeAction::BuyOpen | TradeAction::BuyClose)
    }
}
