The MindFusion Forums
Gauge and Chart Components >> Html Canvas & JavaScript >> Real Time Financial Chart
https://mindfusion.eu/Forum/YaBB.pl?num=1523560568

Message started by MarkNYoung on Apr 12th, 2018 at 7:16pm

Title: Real Time Financial Chart
Post by MarkNYoung on Apr 12th, 2018 at 7:16pm
Hello - I enjoyed your Real Time Financial Chart JS video and I've been experimenting with it recently. However I'm still more of a trader than programmer - I can't manage to get it to work with currencies as there's no time series, open, high, low etc from the Alphantage Currency example.
I tried to code a function like your updateStock() for currencies but I was unsuccessful. Do you have any pointers on doing this? I'm really interested in this if I can get it to display currency charts.

.../query?function=CURRENCY_EXCHANGE_RATE&from_currency=USD&to_currency=JPY&apikey=demo

I did use my own key for this, not demo.

Best regards.

Title: Re: Real Time Financial Chart
Post by Lyubo on Apr 13th, 2018 at 7:52am
Hello,

Thank you for your interest in our product. The currency exchange rate function is not suited for the CandleStick chart control or the StockPriceSeries, because the service does not report open/close/high/low values, but only provides the exchange rate and the time. So first you should use another one of the provided chart controls, i.e. AreaChart or LineChart with DateTimeSeries. You can then set-up a timer, that will query the API that provides the data and create the series object that will be used by the chart by plotting the time on the X-axis and the exchange rate of the Y-axis.

We've modified the Real Time Financial Chart demo along the above lines, you can download it here: https://mindfusion.eu/_samples/RealTimeCurrencyExchange.zip

You can modify it additionally to show a different time range, can use additional series, to show additional exchange rates, adjust the minimum and maximum values, etc; it should be enough to get you started.

Regards,
Lyubo

The MindFusion Forums » Powered by YaBB 2.6.11!
YaBB Forum Software © 2000-2024. All Rights Reserved.