pub fn normalize_trade_bin_prices(
open: Price,
high: Price,
low: Price,
close: Price,
symbol: &Ustr,
bar_type: Option<&BarType>,
) -> (Price, Price, Price, Price)
Expand description
Normalizes the OHLC values reported by BitMEX trade bins to ensure high >= max(open, close)
and low <= min(open, close)
.
ยงPanics
Panics if the price array is empty. This should never occur because the caller always supplies four price values (open/high/low/close).