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 an info, success, warning or error message with an icon, for risk and error notices.

Examples

Shows a warning when available funds fall below a threshold, otherwise a passed check.

javascript
function main() { var account = exchange.GetAccount() if (!account) return var alert = account.Balance < 100 ? {type: "alert", level: "warning", title: "Low funds", text: "Below 100, opening paused"} : {type: "alert", level: "success", title: "Funds check passed"} LogStatus(alert) }
python
def main(): account = exchange.GetAccount() if not account: return if account["Balance"] < 100: alert = {"type": "alert", "level": "warning", "title": "Low funds", "text": "Below 100, opening paused"} else: alert = {"type": "alert", "level": "success", "title": "Funds check passed"} LogStatus(alert)
rust
fn main() { let Ok(a) = exchange.GetAccount() else { return }; let alert = if a.Balance < 100.0 { r#"{"type": "alert", "level": "warning", "title": "Low funds", "text": "Below 100, opening paused"}"# } else { r#"{"type": "alert", "level": "success", "title": "Funds check passed"}"# }; // This JSON is the whole status bar, so it may span lines LogStatus!(alert); }

Attributes

NameTypeDescription

type

string

Required. Always alert.

level

string

Level: info, success, warning or error. Default info.

title

string

Title. At least one of title and text is required.

text

string

Description; when only text is given it is shown as the title.

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