Several questions about Time&Sales, DOM and tick data on the chart

Hello folks!
Starting with developing my own trading apps I faced up to a couple of questions!

1) How to store streaming market data (DOM, Time&Sales) when:
a) The data are displayed in the UI on the graph and at the same time are analyzed in real time.
b) The data are used for testing algorithms and trading strategies

2) How Time & Sales is formed.
Does it represent itself an original "Full Order Log" or sorted "Full Order Log"?
As far as I know, Depth of Market (DOM) represents itself as a sorted "Full Order Log".
Does the similar principle work for the Time&Sales (Tape) calculation?

3) In a classic trading terminal the last candlestick on the chart is usually floating and changes within one second. This last candle also depends on the best BID/ASK. Need to understand based on what price (BID or ASK) the last candlestick fluctuates.

4) In some trading terminals such data as Time&Sales and DOM are aggregated into larger time frames (e.g. msec. -> sec. -> min etc.). What is the formula which is used for aggregation?

Will appreciate your assistance!


Zerodha – Open Paperless Account

Open online account with Zerodha. Free delivery trading and Max Rs 20 for Intraday, F&O, Currency and Commodity Trading. Intraday High leverage with MIS, CO and BO.

Are you a day trader?