4.1 UDI.onContextChange()
UDI.onContextChange() is called whenever there is a change to the chart such as a switch of market or timeframe. The function receives a data parameter which contains the same context information which is passed to UDI.onInit().
For example:
UDI.onContextChange = function(data)
{
// Get current chart timeframe
var tf = data.context.instrument.timeframe;
};
Last updated