Dynamically add forex data points to Shield UI Chart - Programmers Heaven

Howdy, Stranger!

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


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Dynamically add forex data points to Shield UI Chart

CapirexCapirex Posts: 7Member
I need is to dynamically add the points I


  • BATJBATJ Posts: 7Member
    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.