trading-maid 1.0.2

A high-fidelity crypto futures backtesting and live trading framework with matching, margin, leverage and liquidation simulation.
Documentation
use crate::exchange::*;
use crate::series::*;
use std::ops::Deref;

pub struct Context<'a> {
    pub time: &'a TimeSeries,
    pub open: &'a Series,
    pub high: &'a Series,
    pub low: &'a Series,
    pub close: &'a Series,
    pub volume: &'a Series,
    pub exchange: &'a (dyn Exchange + 'static),
}

impl<'a> Deref for Context<'a> {
    type Target = &'a (dyn Exchange + 'static);

    fn deref(&self) -> &Self::Target {
        &self.exchange
    }
}