Skip to content

SE Client API

Script Engine Client API.

se.uploadData()

Uploads all data into the Script Engine.

se.updateData()

Updates data in the Script Engine. Sends two last candles, performs an update of overlays.

When you are receiving new price data through live stream, you need to call this periodically:

js
async function update() {
    await chart.se.updateData()
    var delay  = 100 // Update rate
    setTimeout(update, delay)
}

se.execScripts()

Sends and executes all scripts in the Script Engine.

se.uploadAndExec()

Performs se.updateData() and se.execScripts() together.

If you updated the main dataset and also have indicator scripts in your data structure it is necessary to call this function to update the scripts:

js
chart.hub.mainOv.data.unshift(newChunk)
chart.se.uploadAndExec()

Released under the MIT License.