Type/to search
Built-in Functions
Structures
Ticker
Depth
OrderBook
Trade
Record
Market
Order
Condition
Account
Asset
Position
Funding
Other Structures
HttpQuery-options
HttpQuery-return
LogStatus-table
LogStatus-btnTypeOne
LogStatus-btnTypeTwo
Status Bar Components
grid
tabs
kpi
stat
progress
gauge
sparkline
chart
heatmap
calendar
histogram
pie
timeline
markdown
alert
badge
Chart-options
Chart-return
KLineChart-options
KLineChart-return
SetData-data
EventLoop-return
exchange.Go-return
DBExec-return
Dial-return
Thread.join-return
Built-in Variables and Constants
Conventions
Exchanges

Lists events in order, for fills, trading signals or risk events.

Examples

Lists the latest events recorded by the strategy, newest first.

javascript
function main() { var events = [] var add = function (text, color) { events.unshift({time: Date.now(), text: text, color: color}) if (events.length > 10) events.pop() } add("Strategy started", "primary") add("Price breakout", "up") add("Risk check passed", "muted") LogStatus({type: "timeline", title: "Recent events", items: events}) }
python
import time def main(): events = [] def add(text, color): events.insert(0, {"time": int(time.time() * 1000), "text": text, "color": color}) del events[10:] add("Strategy started", "primary") add("Price breakout", "up") add("Risk check passed", "muted") LogStatus({"type": "timeline", "title": "Recent events", "items": events})
rust
fn main() { let mut events: Vec<String> = Vec::new(); let mut add = |text: &str, color: &str| { let ms = UnixNano() / 1_000_000; let e = format!(r#"{{"time": {}, "text": "{}", "color": "{}"}}"#, ms, text, color); events.insert(0, e); events.truncate(10); }; add("Strategy started", "primary"); add("Price breakout", "up"); add("Risk check passed", "muted"); LogStatus!(format!( r#"{{"type": "timeline", "title": "Recent events", "items": [{}]}}"#, events.join(",") )); }

Attributes

NameTypeDescription

type

string

Required. Always timeline.

items

object array

Required. Events, shown top to bottom in array order; entries without text are skipped.

items[].text

string

Required. Event text.

items[].time

number / string

Millisecond timestamp or any text; a midnight timestamp shows only the date.

items[].color

string

Dot color, default primary. Values: see Status Bar Components.

title

string

Title shown at the top left of the component.

id

string

Stable identifier. Set it when the number or order of components changes, so refreshes do not rebuild the component.

span

number

Number of columns it spans in the enclosing grid. Default 1.

See Also