Skip to main content

render_trading_lines

Function render_trading_lines 

Source
pub fn render_trading_lines<'a>(
    ui: &mut Ui,
    mapping: &ChartMapping,
    orders: impl IntoIterator<Item = &'a Order>,
    positions: impl IntoIterator<Item = &'a Position>,
    options: &TradingLineOptions<'_>,
) -> TradingLines
Expand description

Draws the working orders with their brackets and the open positions of one symbol on the chart, and returns what the user asked for. Pass only the orders and positions of the chart’s symbol, and call it after drawing the chart. The price axis is left to the caller; see TradingLines::tags.