1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
use crate::dtf;
pub mod candle;
pub mod tick_bar;
pub mod volume_bar;
pub mod candlestick_graph;
pub use self::tick_bar::TickBars;
pub use self::volume_bar::VolumeBars;
pub use self::candle::Candle;
use self::dtf::update::Update;
type Time = u32;
type Price = f32;
type Volume = f32;
type Scale = u16;
pub fn draw_updates(ups: &[Update]) -> String {
let mut candles = TickBars::from(ups);
candles.insert_continuation_candles();
candlestick_graph::CandleStickGraph::new(20, candles.clone()).draw()
}