WidgetsMarket Trends → Documentation & Demo
Demo
Documentation
Widget description
This widget allows to view list of popular instruments with their trend\sentiment of buy\sell ratioץ
Configurable parameters
widgetClientUrl
The client url
(Usually http://developers.sirixtrader.com)
updateInterval
The data poll time interval (in milliseconds)
instruments
Array of instruments to display
(Leave it empty to get all instruments)
Implementation example
* Please add the script before the </body> tag.
                <script type="text/javascript">
                             (function () {
            var clientUrl = "https://developers.sirixtrader.com";
            var js = document.createElement('script');
            js.type = 'text/javascript';
            js.async = true;
            js.src = clientUrl + '/PageScripts/GetJavaScript/?files=Framework.jQuery.js;Framework.jQuery.Tpl.js;Trends.Widget.js&callback=window.onTrendsWidgetLoad';
            document.getElementsByTagName('head')[0].appendChild(js);
            var css = document.createElement('link');
            css.type = 'text/css';
            css.async = true;
            css.rel = 'stylesheet';
            css.href = clientUrl + '/PageScripts/GetCss/?files=Trends.Widget.css';
            document.getElementsByTagName('head')[0].appendChild(css);
            onTrendsWidgetLoad = function () {
                $('#market_trends')
                    .leverateTrends({
                        widgetClientUrl: clientUrl,
                        updateInterval: 1000,
                        instruments: ['EURUSD','GBPUSD']
                    });
            };
        })();

                </script>
            
* Add the following to the <head> tag in order to support IE8 and under.