use std::any::TypeId;
pub use trading_data_core::{Asset, ExchangeName, Instrument, Pair, Symbol};
#[doc(hidden)]
pub use trading_data_dag as __dag;
pub use trading_data_dag::{
__graph_resolve, Armed, Buffer, Buffering, Bump, Cell, Cons, DepOuts, Diff, Emit, EmitOuts, Episode, Episodic, Fire, Flat, Folding, Gate, Gating, Glance, Guide, Hist, Horizon, Ink,
Latch, Latest, Nil, Node, Nudge, Observer, Plot, Present, ProbabilisticDistribution, Roots, Sampling, Series, Spanning, Stamped, Symbolic, Tag, TriggerOut, Want, always_present, graph,
node, node_alias, observe_root, slice_nudge, step, step_exact, step_obs, value_nudge,
};
pub use trading_data_derivatives::{
__td_node_AvgGain,
__td_node_AvgLoss,
__td_node_Bars,
__td_node_Ohlcs,
__td_node_Rsi,
__td_node_RsiDelta,
__td_node_Volumes,
AvgGain,
AvgLoss,
Bar,
Bars,
Ohlc,
Ohlcs,
Rsi,
RsiDelta,
RsiSpec,
RsiValues,
Volume,
Volumes,
Wilder,
WilderAtr,
WilderAvgGainLoss,
closed_by,
rsi,
};
pub use trading_data_expr::{Abs, Add, Ast, Const, Div, Ex, Expr, Mul, Neg, Square, Sub, Sum, Trace, Var, Vars, abs, constant, square, sum};
pub use trading_data_persistence::{
__td_node_Book, Aggregate, Arrival, BatchTrades, Book, BookAnchors, BookDeltas, BookShape, BookUpdate, Catalog, CatalogError, Clock, DeltaBuf, DeltaCols, DeltaFrame, Direction, Exact,
Feather, Feed, FrameKind, InnerTrade, LaneKind, LaneReader, Lanes, LatencyConfig, Live, LiveClock, Local, Mc, McRoot, Oi, OiRoot, Precision, PrecisionPriceQty, ReadClock, Replay,
RotationPolicy, Row, ShadowBook, Side, Sink, Span, Trade, TradeBuf, TradeCols, Trades, Ts, UnixNanos, Usd, Venue, read_mc, read_oi, read_trades,
};
pub use v_utils::{Timeframe, TimeframeDesignator};
pub fn required_lanes<G: Roots>() -> Vec<LaneKind> {
let mut out = Vec::new();
for id in G::required_events() {
let lane = match id {
i if i == TypeId::of::<TradeCols<'static>>() => LaneKind::Trades,
i if i == TypeId::of::<DeltaFrame<'static>>() => LaneKind::BookDeltas,
i if i == TypeId::of::<BookShape>() => LaneKind::BookAnchors,
i if i == TypeId::of::<Oi>() => LaneKind::Oi,
i if i == TypeId::of::<Mc>() => LaneKind::Mc,
_ => panic!("required_lanes: root event {id:?} has no known source lane"),
};
if !out.contains(&lane) {
out.push(lane);
}
}
out
}