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 a ratio, or current value / total, as a bar.

Examples

Shows the share of frozen funds and today's order count against a cap.

javascript
function main() { var account = exchange.GetAccount() if (!account) return var total = account.Balance + account.FrozenBalance var frozen = total > 0 ? account.FrozenBalance / total : 0 var orders = 3 // Order count kept by the strategy LogStatus([ {type: "progress", title: "Frozen share", value: frozen}, {type: "progress", title: "Orders today", value: orders, max: 20, color: "warning"} ]) }
python
def main(): account = exchange.GetAccount() if not account: return total = account["Balance"] + account["FrozenBalance"] frozen = account["FrozenBalance"] / total if total > 0 else 0 orders = 3 # Order count kept by the strategy LogStatus([ {"type": "progress", "title": "Frozen share", "value": frozen}, {"type": "progress", "title": "Orders today", "value": orders, "max": 20, "color": "warning"} ])
rust
fn main() { let Ok(a) = exchange.GetAccount() else { return }; let total = a.Balance + a.FrozenBalance; let frozen = if total > 0.0 { a.FrozenBalance / total } else { 0.0 }; let orders = 3; // Order count kept by the strategy LogStatus!(format!( r#"[{{"type": "progress", "title": "Frozen share", "value": {}}}, {{"type": "progress", "title": "Orders today", "value": {}, "max": 20, "color": "warning"}}]"#, frozen, orders )); }

Attributes

NameTypeDescription

type

string

Required. Always progress.

value

number

Required. Current value.

max

number

Total. When given the bar shows value / max; otherwise value is a ratio from 0 to 1 shown as a percentage.

color

string

Bar 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