(
bars: Vec<openquant::data_structures::StandardBar>,
)
| 117 | } |
| 118 | |
| 119 | pub fn bars_to_rows( |
| 120 | bars: Vec<openquant::data_structures::StandardBar>, |
| 121 | ) -> Vec<(String, String, f64, f64, f64, f64, f64, f64, usize)> { |
| 122 | bars.into_iter() |
| 123 | .map(|b| { |
| 124 | ( |
| 125 | b.start_timestamp.format("%Y-%m-%d %H:%M:%S").to_string(), |
| 126 | b.timestamp.format("%Y-%m-%d %H:%M:%S").to_string(), |
| 127 | b.open, |
| 128 | b.high, |
| 129 | b.low, |
| 130 | b.close, |
| 131 | b.volume, |
| 132 | b.dollar_value, |
| 133 | b.tick_count, |
| 134 | ) |
| 135 | }) |
| 136 | .collect() |
| 137 | } |
| 138 | |
| 139 | pub fn build_ohlcv_columns( |
| 140 | timestamps_us: Vec<i64>, |
no outgoing calls
no test coverage detected