Skip to main content

Display custom stats

To add more information to your custom strategies, you can display additional fields on the overview sidebar next to the chart. This is useful for showing your own statistics or other data that's relevant to your strategy.

It works by storing the data as an array of objects in the pair ledger, similar to how you would place custom chart lines.

gb.data.pairLedger.sidebarExtras = [
{
label: `Item 1`, // string
value: `Your label`, // string
tooltip: `Tooltip text for this element`, // optional, can be omitted
valueColor: '#e7e7', // optional string with valid css color (hex, rgb, etc)
},
{
label: `Item 2`, // string
value: `Your label`, // string
},
]

Quanta G-type strategy interface showing custom statistics in the Gunbot sidebar

Example of the custom [Quanta G-type strategy](https://www.gunbot.com/blog/quanta-g-type-strategy-explained/) using custom stats in the sidebar on the right side of the screen.