Dynamically add forex data points to Shield UI Chart

I need is to dynamically add the points I


  • You are right, that there is no addPoints method of the Shield UI Chart. However we can add the incoming data values to an array instead. You might find useful following code:

    We need some arrays- as many as we need to show.

    [code] var EURUSD = new Array();
    var USDCAD = new Array();
    var GBPUSD = new Array();[/code]
    In the body of the function, that will actually display the data we will have the following code:

    [code] EURUSD[EURUSD.length] = parseFloat(data.ticks.EURUSD);
    USDCAD[USDCAD.length] = parseFloat(data.ticks.USDCAD);
    GBPUSD[GBPUSD.length] = parseFloat(data.ticks.GBPUSD);[/code]
    it will actually put the new data to the designated arrays. You can note, that each time data is received, it has been added to the last index of each array:

    [code]EURUSD.length [/code]
    Since we don
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion