Module Trading_engine.Bar

One instrument's completed OHLCV bar in a synchronized market slice.

type t = private {
  1. instrument_id : Id.Instrument.t;
  2. open_price : Scalar.Price.t;
  3. high_price : Scalar.Price.t;
  4. low_price : Scalar.Price.t;
  5. close_price : Scalar.Price.t;
  6. volume : Scalar.Quantity.t option;
}
val create : instrument_id:Id.Instrument.t -> open_price:Scalar.Price.t -> high_price:Scalar.Price.t -> low_price:Scalar.Price.t -> close_price:Scalar.Price.t -> volume:Scalar.Quantity.t option -> (t, string) Stdlib.result
val pp : Stdlib.Format.formatter -> t -> unit