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

Shows small labels with a dot inline, so they can follow a line of text.

Examples

Shows the run mode and state after a line of text.

javascript
function main() { LogStatus("MA strategy", {type: "badge", items: [ {text: IsVirtual() ? "Backtest" : "Live", color: "muted"}, {text: "Running", color: "up"} ]}) }
python
def main(): LogStatus("MA strategy", {"type": "badge", "items": [ {"text": "Backtest" if IsVirtual() else "Live", "color": "muted"}, {"text": "Running", "color": "up"} ]})
rust
fn main() { let mode = if IsVirtual() { "Backtest" } else { "Live" }; let item = |text: &str, color: &str| format!(r#"{{"text": "{}", "color": "{}"}}"#, text, color); let badge = format!( r#"{{"type": "badge", "items": [{}, {}]}}"#, item(mode, "muted"), item("Running", "up") ); // Text and a component on one line: the component goes last, as one-line JSON LogStatus!("MA strategy", badge); }

Attributes

NameTypeDescription

type

string

Required. Always badge.

items

object array

Required. At least one badge with text.

items[].text

string

Required. Badge text.

items[].color

string

Color, default primary. Values: see Status Bar Components.

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