├── .gitignore ├── charting_library ├── static │ ├── images │ │ ├── icons.png │ │ ├── balloon.png │ │ ├── delayed.png │ │ ├── bar-loader.gif │ │ ├── button-bg.png │ │ ├── controlll.png │ │ ├── select-bg.png │ │ ├── warning-icon.png │ │ ├── dialogs │ │ │ ├── checkbox.png │ │ │ ├── close-flat.png │ │ │ ├── opacity-slider.png │ │ │ ├── linewidth-slider.png │ │ │ └── large-slider-handle.png │ │ ├── tvcolorpicker-bg.png │ │ ├── sidetoolbar │ │ │ ├── toolgroup.png │ │ │ └── instruments.png │ │ ├── tvcolorpicker-check.png │ │ ├── tvcolorpicker-sprite.png │ │ ├── prediction-clock-black.png │ │ ├── prediction-clock-white.png │ │ ├── prediction-failure-white.png │ │ ├── prediction-success-white.png │ │ ├── tvcolorpicker-bg-gradient.png │ │ ├── charting_library │ │ │ ├── logo-widget-copyright.png │ │ │ └── logo-widget-copyright-faded.png │ │ └── svg │ │ │ ├── chart │ │ │ ├── font.svg │ │ │ ├── pencil2.svg │ │ │ ├── bucket2.svg │ │ │ └── large-slider-handle.svg │ │ │ └── question-mark-rounded.svg │ ├── dark.css │ ├── light.css │ ├── fonts │ │ ├── fontawesome-webfont.ttf │ │ └── fontawesome-webfont.woff │ ├── bundles │ │ ├── dot.ed68e83c16f77203e73dbc4c3a7c7fa1.cur │ │ ├── grab.bc156522a6b55a60be9fae15c14b66c5.cur │ │ ├── zoom.e21f24dd632c7069139bc47ae89c54b5.cur │ │ ├── eraser.0579d40b812fa2c3ffe72e5803a6e14c.cur │ │ ├── crosshair.6c091f7d5427d0c5e6d9dc3a90eb2b20.cur │ │ ├── grabbing.1c0862a8a8c0fb02885557bc97fdafe7.cur │ │ ├── vendors.a94ef44ed5c201cefcf6ad7460788c1a.css │ │ ├── propertypagesfactory.37bd38e8744b0cc04a07.js │ │ ├── 10.ef75a963f37114f76e2f.js │ │ ├── ie-fallback-logos.8319ee6d7ee230348d2d.js │ │ ├── 13.23881782ce3895456f66.js │ │ ├── 9.8309436d1561a99a7fad.js │ │ ├── 15.14e44c9fe762e0c75635.js │ │ ├── editobjectdialog.e76ba6bc652064d1ce6a.js │ │ └── symbol-info-dialog-impl.f3cf4493236b7285e923.js │ ├── lib │ │ └── external │ │ │ └── spin.min.js │ ├── en-tv-chart.1c7535a2aac5ec511ed5.html │ ├── no-tv-chart.1c7535a2aac5ec511ed5.html │ ├── et_EE-tv-chart.1c7535a2aac5ec511ed5.html │ ├── ro-tv-chart.1c7535a2aac5ec511ed5.html │ ├── sk_SK-tv-chart.1c7535a2aac5ec511ed5.html │ ├── el-tv-chart.1c7535a2aac5ec511ed5.html │ └── da_DK-tv-chart.1c7535a2aac5ec511ed5.html ├── datafeed-api.d.ts └── charting_library.min.js ├── index.html ├── readme.md └── js ├── tools.js ├── socket.js ├── config.js ├── app.js └── datafeed.js /.gitignore: -------------------------------------------------------------------------------- 1 | build/*.ts 2 | build/*.js 3 | build/*.css -------------------------------------------------------------------------------- /charting_library/static/images/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastarder/tradingView-websocket-exa/HEAD/charting_library/static/images/icons.png -------------------------------------------------------------------------------- /charting_library/static/images/balloon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastarder/tradingView-websocket-exa/HEAD/charting_library/static/images/balloon.png -------------------------------------------------------------------------------- /charting_library/static/images/delayed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastarder/tradingView-websocket-exa/HEAD/charting_library/static/images/delayed.png -------------------------------------------------------------------------------- /charting_library/static/images/bar-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastarder/tradingView-websocket-exa/HEAD/charting_library/static/images/bar-loader.gif -------------------------------------------------------------------------------- /charting_library/static/images/button-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastarder/tradingView-websocket-exa/HEAD/charting_library/static/images/button-bg.png -------------------------------------------------------------------------------- /charting_library/static/images/controlll.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastarder/tradingView-websocket-exa/HEAD/charting_library/static/images/controlll.png -------------------------------------------------------------------------------- /charting_library/static/images/select-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastarder/tradingView-websocket-exa/HEAD/charting_library/static/images/select-bg.png -------------------------------------------------------------------------------- /charting_library/static/dark.css: -------------------------------------------------------------------------------- 1 | 2 | .chart-page.on-widget{ 3 | background: #161E2A; 4 | } 5 | 6 | .chart-page .chart-container{ 7 | border-color: #161E2A; 8 | } -------------------------------------------------------------------------------- /charting_library/static/images/warning-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastarder/tradingView-websocket-exa/HEAD/charting_library/static/images/warning-icon.png -------------------------------------------------------------------------------- /charting_library/static/light.css: -------------------------------------------------------------------------------- 1 | 2 | .chart-page.on-widget{ 3 | background: #ffffff; 4 | } 5 | 6 | .chart-page .chart-container{ 7 | border-color: #ffffff; 8 | } -------------------------------------------------------------------------------- /charting_library/static/images/dialogs/checkbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastarder/tradingView-websocket-exa/HEAD/charting_library/static/images/dialogs/checkbox.png -------------------------------------------------------------------------------- /charting_library/static/images/tvcolorpicker-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastarder/tradingView-websocket-exa/HEAD/charting_library/static/images/tvcolorpicker-bg.png -------------------------------------------------------------------------------- /charting_library/static/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastarder/tradingView-websocket-exa/HEAD/charting_library/static/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /charting_library/static/images/dialogs/close-flat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastarder/tradingView-websocket-exa/HEAD/charting_library/static/images/dialogs/close-flat.png -------------------------------------------------------------------------------- /charting_library/static/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastarder/tradingView-websocket-exa/HEAD/charting_library/static/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /charting_library/static/images/sidetoolbar/toolgroup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastarder/tradingView-websocket-exa/HEAD/charting_library/static/images/sidetoolbar/toolgroup.png -------------------------------------------------------------------------------- /charting_library/static/images/tvcolorpicker-check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastarder/tradingView-websocket-exa/HEAD/charting_library/static/images/tvcolorpicker-check.png -------------------------------------------------------------------------------- /charting_library/static/images/tvcolorpicker-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastarder/tradingView-websocket-exa/HEAD/charting_library/static/images/tvcolorpicker-sprite.png -------------------------------------------------------------------------------- /charting_library/static/images/dialogs/opacity-slider.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastarder/tradingView-websocket-exa/HEAD/charting_library/static/images/dialogs/opacity-slider.png -------------------------------------------------------------------------------- /charting_library/static/images/prediction-clock-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastarder/tradingView-websocket-exa/HEAD/charting_library/static/images/prediction-clock-black.png -------------------------------------------------------------------------------- /charting_library/static/images/prediction-clock-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastarder/tradingView-websocket-exa/HEAD/charting_library/static/images/prediction-clock-white.png -------------------------------------------------------------------------------- /charting_library/static/images/sidetoolbar/instruments.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastarder/tradingView-websocket-exa/HEAD/charting_library/static/images/sidetoolbar/instruments.png -------------------------------------------------------------------------------- /charting_library/static/images/dialogs/linewidth-slider.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastarder/tradingView-websocket-exa/HEAD/charting_library/static/images/dialogs/linewidth-slider.png -------------------------------------------------------------------------------- /charting_library/static/images/prediction-failure-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastarder/tradingView-websocket-exa/HEAD/charting_library/static/images/prediction-failure-white.png -------------------------------------------------------------------------------- /charting_library/static/images/prediction-success-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastarder/tradingView-websocket-exa/HEAD/charting_library/static/images/prediction-success-white.png -------------------------------------------------------------------------------- /charting_library/static/images/tvcolorpicker-bg-gradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastarder/tradingView-websocket-exa/HEAD/charting_library/static/images/tvcolorpicker-bg-gradient.png -------------------------------------------------------------------------------- /charting_library/static/images/dialogs/large-slider-handle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastarder/tradingView-websocket-exa/HEAD/charting_library/static/images/dialogs/large-slider-handle.png -------------------------------------------------------------------------------- /charting_library/static/bundles/dot.ed68e83c16f77203e73dbc4c3a7c7fa1.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastarder/tradingView-websocket-exa/HEAD/charting_library/static/bundles/dot.ed68e83c16f77203e73dbc4c3a7c7fa1.cur -------------------------------------------------------------------------------- /charting_library/static/bundles/grab.bc156522a6b55a60be9fae15c14b66c5.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastarder/tradingView-websocket-exa/HEAD/charting_library/static/bundles/grab.bc156522a6b55a60be9fae15c14b66c5.cur -------------------------------------------------------------------------------- /charting_library/static/bundles/zoom.e21f24dd632c7069139bc47ae89c54b5.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastarder/tradingView-websocket-exa/HEAD/charting_library/static/bundles/zoom.e21f24dd632c7069139bc47ae89c54b5.cur -------------------------------------------------------------------------------- /charting_library/static/images/charting_library/logo-widget-copyright.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastarder/tradingView-websocket-exa/HEAD/charting_library/static/images/charting_library/logo-widget-copyright.png -------------------------------------------------------------------------------- /charting_library/static/bundles/eraser.0579d40b812fa2c3ffe72e5803a6e14c.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastarder/tradingView-websocket-exa/HEAD/charting_library/static/bundles/eraser.0579d40b812fa2c3ffe72e5803a6e14c.cur -------------------------------------------------------------------------------- /charting_library/static/bundles/crosshair.6c091f7d5427d0c5e6d9dc3a90eb2b20.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastarder/tradingView-websocket-exa/HEAD/charting_library/static/bundles/crosshair.6c091f7d5427d0c5e6d9dc3a90eb2b20.cur -------------------------------------------------------------------------------- /charting_library/static/bundles/grabbing.1c0862a8a8c0fb02885557bc97fdafe7.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastarder/tradingView-websocket-exa/HEAD/charting_library/static/bundles/grabbing.1c0862a8a8c0fb02885557bc97fdafe7.cur -------------------------------------------------------------------------------- /charting_library/static/images/charting_library/logo-widget-copyright-faded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastarder/tradingView-websocket-exa/HEAD/charting_library/static/images/charting_library/logo-widget-copyright-faded.png -------------------------------------------------------------------------------- /charting_library/static/bundles/vendors.a94ef44ed5c201cefcf6ad7460788c1a.css: -------------------------------------------------------------------------------- 1 | @keyframes highlight-animation{0%{background:transparent}to{background:#fff2cf}}@keyframes highlight-animation-theme-dark{0%{background:transparent}to{background:#194453}} -------------------------------------------------------------------------------- /charting_library/static/images/svg/chart/font.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /charting_library/static/images/svg/chart/pencil2.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /charting_library/static/images/svg/chart/bucket2.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /charting_library/static/images/svg/chart/large-slider-handle.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /charting_library/static/images/svg/question-mark-rounded.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /charting_library/static/bundles/propertypagesfactory.37bd38e8744b0cc04a07.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([12],{1077:function(e,r,t){"use strict";r.createInputsPropertyPage=function(e,r){var t=e.getInputsPropertyPage();return null==t?null:new t(e.properties(),r,e)},r.createStudyStrategyPropertyPage=function(e,r){var t=e.getStrategyPropertyPage();return null==t?null:new t(e.properties(),r,e)},r.createStylesPropertyPage=function(e,r){var t=e.getStylesPropertyPage();return null==t?null:new t(e.properties(),r,e)},r.createDisplayPropertyPage=function(e,r){var t=e.getDisplayPropertyPage();return null==t?null:new t(e.properties(),r,e)},r.createVisibilitiesPropertyPage=function(e,r){var t=e.getVisibilitiesPropertyPage();return null==t?null:new t(e.properties(),r,e)},r.hasInputsPropertyPage=function(e){return null!==e.getInputsPropertyPage()},r.hasStylesPropertyPage=function(e){return null!==e.getStylesPropertyPage()}}}); -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | TradingView Charting Library 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 28 | 29 | 30 | 31 |
32 |
33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /charting_library/static/bundles/10.ef75a963f37114f76e2f.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([10],{1193:function(t,e,i){"use strict";function r(){return n.enabled("saveload_requires_authentication")&&!window.is_authenticated?Promise.resolve([]):new Promise(function(t){c.getCharts(function(e){t(e)})})}var n,o,a,c,s,u,h,l;Object.defineProperty(e,"__esModule",{value:!0}),n=i(5),o=i(1320),a=i(397),c=i(92),s=i(398),u=i(93),h=i(24),l=function(){function t(t){var e=this;this._favoriteChartsService=new o.FavoriteChartsService(u.TVXWindowEvents,h),this._dialog=new a,this._getChartEntry=function(t){return{id:t.id,url:t.url,title:t.name,symbol:t.short_symbol,interval:t.interval,toolsCount:0,modified:t.modified_iso,active:function(){return e._isActiveChart(t.id)},openAction:function(){return c.loadChart(t)},deleteAction:function(i,r){s.deleteChart(r,t.image_url,function(){e._deleteChart(t.id),i.resolve()},i.reject.bind(i))},favoriteAction:e._updateFavorites}},this._updateFavorites=function(t){return e._favoriteChartsService.set(t)},this._isActiveChart=function(t){return t===e._chartWidgetCollection.metaInfo.id.value()},this._deleteChart=function(t){e._isActiveChart(t)&&(n.enabled("saveload_storage_customization")?e._chartWidgetCollection.clearChartMetaInfo():location.href="/chart/")},this._chartWidgetCollection=t}return t.prototype.showLoadDialog=function(){var t=this;r().then(function(e){return e.map(t._getChartEntry)}).then(function(e){t._dialog.show(e,t._favoriteChartsService.get())})},t}(),e.LoadChartService=l},1320:function(t,e,i){"use strict";var r,n,o;Object.defineProperty(e,"__esModule",{value:!0}),r=i(0),n=i(174),o=function(t){function e(e,i){return t.call(this,e,i,"FAVORITE_CHARTS_CHANGED","loadChartDialog.favorites",{})||this}return r.__extends(e,t),e}(n.CommonJsonStoreService),e.FavoriteChartsService=o}}); -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | ## 运行 2 | ``` 3 | ./charting_library 图表库 4 | ./charting_library/static/view.css 图表库样式位置 5 | 6 | ./js/app.js 启动相关 7 | ./js/datafeeds.js 封装的数据源接口对象(UDF-JS-API) 8 | ./js/socket.js 封装的websocket对象 9 | 10 | 运行需要本地启动web server 11 | 例: cd trading-view-example && python3 -m http.server 12 | 13 | ``` 14 | ### 初始化图表方法(只需执行一次) 15 | ``` 16 | startChart(baseUrl?: string , symbol?: string , language?: string , resolution?: string , theme? : string, chartType?: string):void; 17 | 例: startChart("192.168.21.135:8081", 'BTC_USDT', 'en', '5', 'light', '1') 18 | ``` 19 | 20 | ### 强制刷新图表(一般无需调用) 21 | ``` 22 | initChart() 23 | ``` 24 | 25 | ### 修改主题 26 | ``` 27 | setTheme(theme: 'dark' | 'light'); 28 | ``` 29 | 30 | ### 修改交易对 31 | ``` 32 | setSymbol(trading_pair: string); 33 | ``` 34 | 35 | ### 修改语言 36 | ``` 37 | setLanguage(language: string); 38 | ``` 39 | 40 | ### 修改间隔 ('1天', 5分 这些) 41 | ``` 42 | setResolution(resolution: string): boolean; 43 | 间隔对照表,传左侧的数字字符串的值; 44 | 例: setResolution('240') 45 | '1': '1m', 46 | '5': '5m', 47 | '15': '15m', 48 | '30': '30m', 49 | '60': '1h', 50 | '240': '4h', 51 | '1440': '1D', 52 | '10080': '7D', 53 | '43200': '1M', 54 | ``` 55 | 56 | ### 设置图表类型 57 | ``` 58 | setChartType(type: string); "3"为分时 "1"为正常; 59 | ``` 60 | 61 | ### 创建指标 62 | ``` 63 | createStudy(name, forceOverlay, lock, inputs, callback, overrides, options): string | boolean; 64 | 例: createStudy('Money Flow'); 65 | ``` 66 | [查看详情参数解释](https://zlq4863947.gitbooks.io/tradingview/book/Chart-Methods.html#createstudyname-forceoverlay-lock-inputs-callback-overrides-options) 67 | ### 删除指标 68 | ``` 69 | removeStudy(id): boolean; 70 | 创建指标时会返回指标的唯一标识(string); 71 | ``` 72 | 73 | ### 获取当前已存在的指标列表 74 | ``` 75 | getAllStudies(): []; 76 | 返回示例: [ 77 | {id: "QKqW9B", name: "Volume"}, 78 | {id: "bzJSHX", name: "MACD"}, 79 | ] 80 | ``` 81 | 82 | ## 智能创建指标方法 83 | ``` 84 | createStudyAuto(studyName, type) 85 | type: 主指标: 'first' 副指标: 'second'; 86 | studyName 传 空字符串("")时, 将影藏所有 指定类型(主或副)的指标; 87 | 例1: createStudyAuto('Relative Strength Index', 'second'); 88 | 例2: createStudyAuto('', 'first') //隐藏所有主指标; 89 | ``` 90 | 91 | ## 重置表单 92 | ``` 93 | reset() 94 | 重置表单K线位置,大小至初始状态; 95 | ``` 96 | -------------------------------------------------------------------------------- /js/tools.js: -------------------------------------------------------------------------------- 1 | var getTimeZone = function() { 2 | var timeZoneList = [{"key":"Etc/UTC","timezone":null},{"key":"exchange","timezone":null},{"key":"Pacific/Honolulu","timezone":"UTC-10"},{"key":"America/Los_Angeles","timezone":"UTC-8"},{"key":"America/Vancouver","timezone":"UTC-8"},{"key":"America/Phoenix","timezone":"UTC-7"},{"key":"America/Chicago","timezone":"UTC-6"},{"key":"America/Mexico_City","timezone":"UTC-6"},{"key":"America/El_Salvador","timezone":"UTC-6"},{"key":"America/Bogota","timezone":"UTC-5"},{"key":"America/New_York","timezone":"UTC-5"},{"key":"America/Toronto","timezone":"UTC-5"},{"key":"America/Caracas","timezone":"UTC-4"},{"key":"America/Argentina/Buenos_Aires","timezone":"UTC-3"},{"key":"America/Sao_Paulo","timezone":"UTC-2"},{"key":"Europe/London","timezone":"UTC"},{"key":"Europe/Belgrade","timezone":"UTC+1"},{"key":"Europe/Berlin","timezone":"UTC+1"},{"key":"Europe/Luxembourg","timezone":"UTC+1"},{"key":"Europe/Madrid","timezone":"UTC+1"},{"key":"Europe/Paris","timezone":"UTC+1"},{"key":"Europe/Rome","timezone":"UTC+1"},{"key":"Europe/Warsaw","timezone":"UTC+1"},{"key":"Europe/Zurich","timezone":"UTC+1"},{"key":"Europe/Athens","timezone":"UTC+2"},{"key":"Africa/Cairo","timezone":"UTC+2"},{"key":"Asia/Jerusalem","timezone":"UTC+2"},{"key":"Europe/Istanbul","timezone":"UTC+3"},{"key":"Asia/Kuwait","timezone":"UTC+3"},{"key":"Europe/Moscow","timezone":"UTC+3"},{"key":"Asia/Qatar","timezone":"UTC+3"},{"key":"Asia/Riyadh","timezone":"UTC+3"},{"key":"Asia/Tehran","timezone":"UTC+3:30"},{"key":"Asia/Dubai","timezone":"UTC+4"},{"key":"Asia/Muscat","timezone":"UTC+4"},{"key":"Asia/Ashkhabad","timezone":"UTC+5"},{"key":"Asia/Kolkata","timezone":"UTC+5:30"},{"key":"Asia/Almaty","timezone":"UTC+6"},{"key":"Asia/Bangkok","timezone":"UTC+7"},{"key":"Asia/Chongqing","timezone":"UTC+8"},{"key":"Asia/Hong_Kong","timezone":"UTC+8"},{"key":"Asia/Shanghai","timezone":"UTC+8"},{"key":"Asia/Singapore","timezone":"UTC+8"},{"key":"Asia/Taipei","timezone":"UTC+8"},{"key":"Asia/Seoul","timezone":"UTC+9"},{"key":"Asia/Tokyo","timezone":"UTC+9"},{"key":"Australia/Brisbane","timezone":"UTC+10"},{"key":"Australia/Adelaide","timezone":"UTC+10:30"},{"key":"Australia/Sydney","timezone":"UTC+11"},{"key":"Pacific/Auckland","timezone":"UTC+13"},{"key":"Pacific/Fakaofo","timezone":"UTC+13"},{"key":"Pacific/Chatham","timezone":"UTC+13:45"}]; 3 | var localTimeZone = new Date().getTimezoneOffset() / 60; 4 | localTimeZone = 'UTC' + (localTimeZone > 0 ? '-' : '+') + Math.abs(localTimeZone); 5 | 6 | var offset = new Date().getTimezoneOffset() % 60; 7 | if(offset > 0) { 8 | localTimeZone = localTimeZone + ':' + offset; 9 | } 10 | 11 | var item = timeZoneList.find(function(i){ return i.timezone === localTimeZone}) || timeZoneList[0]; 12 | return item.key; 13 | } -------------------------------------------------------------------------------- /charting_library/static/bundles/ie-fallback-logos.8319ee6d7ee230348d2d.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([11],{1191:function(i,t,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fallbackImages={tvLogo:h(1266)},t.logoSizes={benzingapro:{width:135,height:25},bithub:{width:134,height:35},bovespa:{width:135,height:50},cme:{width:175,height:26},currencywiki:{width:135,height:25},dailyfx:{width:135,height:25},fx168:{width:80,height:32},fxmag:{width:95,height:35},fxstreet:{width:137,height:33},investopedia:{width:135,height:23},smartlab:{width:135,height:37},lse:{width:135,height:31},arabictrader:{width:135,height:40},goldprice:{width:135,height:27},silverprice:{width:135,height:27},inbestia:{width:195,height:50},immfx:{width:122,height:26},kitco:{width:130,height:35},enbourse:{width:135,height:40},rankia:{width:65,height:17},soldionline:{width:126,height:36},stockwatch:{width:135,height:19},tradecapitan:{width:121,height:45},newsbtc:{width:35,height:35},bitcoinprice:{width:135,height:25},exame:{width:135,height:27}}},1266:function(i,t){i.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAbCAYAAAAH+20UAAAAAXNSR0IArs4c6QAABXNJREFUWAnVV11sVFUQPnP3dsvf/pRabBOoSfEnETXRVrv9MyXG+hcgKra7lRijBKTxAWLCgw8mBn1RQkRD+2ACL9rdVltS+qQktNrfNYDhQaIkNkqNQMB07/aH3e699/id3d79ud3t3m1f9CTtOTNnZs5358yZmWXsfzZotXjrA6HtOmdtjPMWRux+zqiMOJtnjP/FGI1IjPWNt7svrNZ+Lr2CATf1zpbFNPVTgNrHObflMhznE7siMVvHhM85vqJcAZsFAa7tDTcyVeuF/QrrZ5BOjA5Ptru+sK6TW9Iy4IaA4tG4fp5ztim3uRw7RFxifP+Er+R0DgnLbEuAn+kPl85H9Kuc8S2WLS8TJF0ivhegzy7bKoCBt5F/zEW0E2sDK87gks6os2GAO/KfmFtCzr2V2GnsvVupatHX8cCyiNIdwsPCzjZkiwezCGSyOC/XF5SDYB5/rZfbp/W57UR6Jf5ula53XxvcRQuZCsupvCFRF1A+0HX9Q7MqrubkVtl99JtWWhR7Hn94N2Pa1/ljnH4jiQ0wzvbDCZuTdhHnSIv9siQfG/VuupLkmxZ5Q4LrvMmkI8gfx33uIwZYwZj0Oc/h1t8X65UHfwg2j2aAFQpc4GW7NR6rWkl/WUjAEDX0hGt0zp+Ftyphph7eyBj4yrMEj2QwQZBc1M/V6OdmvjWaYniUbcajRMjY4BDNrJvh4QZ/uAkhcFHT9Z8A/GN89kGA3WBWQmULL+OBsUFWI9n4+XkUI4l7DbC13XP3TqvKuMhOZt0kYE8gdEhj+hCAPmEWSqdRBM4Ul7u703nGWitxKPD8lwZtZYa8KsBOekv6hbwAy1jsArLSU/NR7bDZRjwk6vwzL6MvOCXiyCyQoinGJFQsr6szxctcDe8kFZwD+Pg/EacfZe4upwRYVBRvsC0Btr5/dosWiYn+4+El6Z1mLRJ5UVtQfodny8ybafQNiWxI+omeoHmIy5Gb4U+g8wa+MMiIVyKCR7fZXO8acVfbrexDSKGy8aI0O8llCqy7TzATYNUhLA2wiDw2u85hqxre5bxjKEraQkikl5xgkWfH7cX2agOsaH4iNxWUaP0IwJTi6l7E43wENt65roUGWr7jG4XxYLvrK3RGz+NUxTjMmK2AFbJ41Y7IrDZV2z3znqGLEs/2GIR5huGuxx5wN4+8uvGG2KsPKE8uauolgGs2y8Zpzl5S/lF+SMQhY6K9tJHcCNDThrwAi4fjC7aleTaqpoeBIbpkkonKeNzjnzkmGOTpDt0yl10YjSKdHQp6S87EtfAPcf4Wet5OgC02eLlm6P9BRdILE3udvwqZpr75Cj2m3sft0pS0yN2jXue1OB+3BQcMwWk7ctlK55NE1eTxhyIZIOANmdErYz73RSEcL6GaclJcebpyvjWyyYyNpD1jPudINlkRWoWAFTbgiB4JcfJ3yiAN2W1ytQFWeOa6qgwXClbYw62VIE2ebx4M35Oyn1rFdO2AVc+mtFiNhJf4s2AQk06sr3C1jLQ6bgva0xNuWFyMXcbRdYJezYjf3F1H1mJCnMffRYF2t8oSo9OIzW8n2l1+Q7k2oHRwTf8MYLOmJEPOyhzRQjWQGzbL4kzwcb8FDBENcHBqIL+uQ37tQsp6M8Vd2wpxd9m52fX0988RfqAmRoM/VIMKM4ZCZTd4lmZip5KARd8bU6Moj7zaknJBQjSF2OuCh5DeqBZndGQ8dAu28OG3i2y2HcluLcaiZWjAyrP26RYMrizCq1D68UtbjMLCQGgg40SYJL0t3ley+Qm2ui/JDnoUueO4SElC8D8xiCbJLj0+2eYcFHiSIZEObqlXqIbHKxFna/oNlm63oDXRrCzZfoFXr6br/Qu3D06pDETciQAAAABJRU5ErkJggg=="}}); -------------------------------------------------------------------------------- /charting_library/static/bundles/13.23881782ce3895456f66.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([13],{1194:function(t,e,n){"use strict";function r(t,e,n,r){return l.__awaiter(this,void 0,void 0,function(){var a;return l.__generator(this,function(o){return a=new s.SaveRenameDialog({fields:[new h.InputField({name:w,label:t+":",error:e,maxLength:64})],title:n}),void 0!==r&&a.setField(w,r),[2,a.show().then(function(t){return t[w]})]})})}function a(t){return l.__awaiter(this,void 0,void 0,function(){return l.__generator(this,function(e){return[2,r(f.labelRename,f.error,f.titleRename,t)]})})}function o(t){return l.__awaiter(this,void 0,void 0,function(){return l.__generator(this,function(e){return[2,r(f.labelRename,f.error,f.titleCopy,f.valueCopy.format(t))]})})}function i(t){return l.__awaiter(this,void 0,void 0,function(){return l.__generator(this,function(e){return[2,r(f.labelRename,f.error,f.titleNew,t)]})})}function u(t){"/chart/"===location.pathname&&(location.href="/chart/"+t)}function c(){return l.__awaiter(this,void 0,void 0,function(){return l.__generator(this,function(t){return[2,new Promise(function(t){v.enabled("saved_charts_count_restriction")&&!window.user.is_pro?_.getCharts(function(e){t(e.length<5)}):t(!0)})]})})}var l,s,h,_,v,d,f,w,m;Object.defineProperty(e,"__esModule",{value:!0}),l=n(0),s=n(396),h=n(395),_=n(92),v=n(5),d=n(40),f={labelName:window.t("Chart layout name"),labelRename:window.t("Enter a new chart layout name"),error:window.t("Please enter chart layout name"),titleNew:window.t("Save New Chart Layout"),titleRename:window.t("Rename Chart Layout"),titleCopy:window.t("Copy Chart Layout"),valueCopy:window.t("{0} copy",{context:"ex: AAPL chart copy"})},w="chart-title",m=function(){function t(t,e){this._chartWidgetCollection=t,this._chartSaver=e}return t.prototype.tryCloneChart=function(){var t=this;!function(){l.__awaiter(t,void 0,void 0,function(){var t,e,n;return l.__generator(this,function(r){switch(r.label){case 0:return t=this._chartWidgetCollection,[4,c()];case 1:return e=r.sent(),e?[4,o(t.metaInfo.name.value())]:[3,3];case 2:return n=r.sent(),this._saveCurrentChartAsNewWithTitle(n),[3,3];case 3:return[2]}})})}()},t.prototype.tryRenameChart=function(){var t=this;!function(){l.__awaiter(t,void 0,void 0,function(){var t,e,n;return l.__generator(this,function(r){switch(r.label){case 0:return t=this._chartWidgetCollection,e=t.metaInfo.name.value(),[4,a(e)];case 1:return n=r.sent(),t.metaInfo.name.setValue(n),this._doSave(),[2]}})})}()},t.prototype.trySaveNewChart=function(){var t=this;!function(){l.__awaiter(t,void 0,void 0,function(){var t,e,n,r;return l.__generator(this,function(a){switch(a.label){case 0:return t=this._chartWidgetCollection,e=t.metaInfo.name.value(),[4,c()];case 1:return n=a.sent(),n?[4,i(e)]:[3,3];case 2:return r=a.sent(),t.metaInfo.name.setValue(r),this._doSave(),[3,3];case 3:return[2]}})})}()},t.prototype.trySaveExistentChart=function(){this._doSave()},t.prototype._saveCurrentChartAsNewWithTitle=function(t){var e=this._chartWidgetCollection;v.enabled("saveload_storage_customization")?(e.metaInfo.uid.deleteValue(),e.metaInfo.id.deleteValue(), 2 | e.metaInfo.name.setValue(t),this._doSave()):window.open("/chart/?clone="+e.metaInfo.uid.value()+"&name="+encodeURIComponent(t),"_blank")},t.prototype._doSave=function(){var t=this._chartWidgetCollection;this._chartSaver.saveChartSilently(function(){d.trackEvent("GUI","Save Chart Layout"),u(t.metaInfo.uid.value())})},t}(),e.SaveAsService=m}}); -------------------------------------------------------------------------------- /charting_library/static/lib/external/spin.min.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | //fgnass.github.com/spin.js#v2.0.1 3 | !function(a,b){"object"==typeof exports?module.exports=b():"function"==typeof define&&define.amd?define(b):a.Spinner=b()}(this,function(){"use strict";function a(a,b){var c,d=document.createElement(a||"div");for(c in b)d[c]=b[c];return d}function b(a){for(var b=1,c=arguments.length;c>b;b++)a.appendChild(arguments[b]);return a}function c(a,b,c,d){var e=["opacity",b,~~(100*a),c,d].join("-"),f=.01+c/d*100,g=Math.max(1-(1-a)/b*(100-f),a),h=j.substring(0,j.indexOf("Animation")).toLowerCase(),i=h&&"-"+h+"-"||"";return l[e]||(m.insertRule("@"+i+"keyframes "+e+"{0%{opacity:"+g+"}"+f+"%{opacity:"+a+"}"+(f+.01)+"%{opacity:1}"+(f+b)%100+"%{opacity:"+a+"}100%{opacity:"+g+"}}",m.cssRules.length),l[e]=1),e}function d(a,b){var c,d,e=a.style;for(b=b.charAt(0).toUpperCase()+b.slice(1),d=0;d',c)}m.addRule(".spin-vml","behavior:url(#default#VML)"),h.prototype.lines=function(a,d){function f(){return e(c("group",{coordsize:k+" "+k,coordorigin:-j+" "+-j}),{width:k,height:k})}function h(a,h,i){b(m,b(e(f(),{rotation:360/d.lines*a+"deg",left:~~h}),b(e(c("roundrect",{arcsize:d.corners}),{width:j,height:d.width,left:d.radius,top:-d.width>>1,filter:i}),c("fill",{color:g(d.color,a),opacity:d.opacity}),c("stroke",{opacity:0}))))}var i,j=d.length+d.width,k=2*j,l=2*-(d.width+d.length)+"px",m=e(f(),{position:"absolute",top:l,left:l});if(d.shadow)for(i=1;i<=d.lines;i++)h(i,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(i=1;i<=d.lines;i++)h(i);return b(a,m)},h.prototype.opacity=function(a,b,c,d){var e=a.firstChild;d=d.shadow&&d.lines||0,e&&b+d>1)+"px"})}for(var i,k=0,l=(f.lines-1)*(1-f.direction)/2;k 0) { 45 | activeCb.forEach(function (cb) { return cb(response_1); }); 46 | } 47 | } 48 | catch (error) { 49 | console.warn('Onmessage Error: ==> ', error); 50 | } 51 | }; 52 | }; 53 | WebSocketClient.prototype.send = function (sendKey) { 54 | this._ws.send(JSON.stringify(sendKey)); 55 | }; 56 | WebSocketClient.prototype.handleKey = function (data) { 57 | var type = data.type, _a = data.service, service = _a === void 0 ? "@" : _a, _b = data.pair, pair = _b === void 0 ? "$" : _b, _c = data.period, period = _c === void 0 ? "#" : _c, _d = data.limit, limit = _d === void 0 ? "*" : _d; 58 | if (!type || !~WebSocketClient.supportEventType.indexOf(type)) 59 | return false; 60 | if (type === 'ticker') { 61 | pair = 'all'; 62 | } 63 | return service + "." + type + "." + pair + "." + period + "." + limit; 64 | }; 65 | WebSocketClient.prototype.close = function () { 66 | this._cb = {}; 67 | this._ws.close(); 68 | }; 69 | WebSocketClient.prototype.add = function (param, cb) { 70 | var _this = this; 71 | var key = this.handleKey(param); 72 | if (!key) 73 | return false; 74 | var sendKey = __assign({}, param, { model: 'sub' }); 75 | var unKey = __assign({}, param, { model: 'uns' }); 76 | if (this._cb[key]) { 77 | this._cb[key].push(cb); 78 | } 79 | else { 80 | this.send(sendKey); 81 | this._cb[key] = [cb]; 82 | } 83 | var listener = { 84 | cb: cb, 85 | param: param, 86 | sendKey: sendKey, 87 | addTime: new Date(), 88 | delete: function () { 89 | if (!_this._cb[key]) 90 | return; 91 | _this._cb[key] = _this._cb[key].filter(function (item) { return item !== cb; }); 92 | }, 93 | close: function () { 94 | delete _this._cb[key]; 95 | _this.send(unKey); 96 | } 97 | }; 98 | this._listener[key] = listener; 99 | return listener; 100 | }; 101 | WebSocketClient.reConnectDelay = 15000; 102 | WebSocketClient.supportEventType = ['kline', 'ticker', 'trade', 'depth']; 103 | return WebSocketClient; 104 | }()); 105 | -------------------------------------------------------------------------------- /charting_library/static/bundles/9.8309436d1561a99a7fad.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([9],{1081:function(t,o){t.exports='{\n\t"content": {\n\t\t"chartProperties": {\n\t\t\t"scalesProperties": {\n\t\t\t\t"textColor": "#D9D9D9",\n\t\t\t\t"lineColor": "#787878",\n\t\t\t\t"backgroundColor": "#ffffff"\n\t\t\t},\n\t\t\t"paneProperties": {\n\t\t\t\t"gridProperties": {\n\t\t\t\t\t"color": "#363c4e"\n\t\t\t\t},\n\t\t\t\t"background": "#131722"\n\t\t\t}\n\t\t},\n\t\t"mainSourceProperties": {\n\t\t\t"candleStyle": {\n\t\t\t\t"borderColor": "#378658",\n\t\t\t\t"upColor": "#53b987",\n\t\t\t\t"wickColor": "#B5B5B8",\n\t\t\t\t"wickUpColor": "#336854",\n\t\t\t\t"wickDownColor": "#7f323f",\n\t\t\t\t"downColor": "#eb4d5c",\n\t\t\t\t"borderUpColor": "#53b987",\n\t\t\t\t"borderDownColor": "#eb4d5c"\n\t\t\t},\n\t\t\t"haStyle": {\n\t\t\t\t"borderColor": "#378658",\n\t\t\t\t"upColor": "#53b987",\n\t\t\t\t"wickColor": "#B5B5B8",\n\t\t\t\t"wickUpColor": "#53b987",\n\t\t\t\t"wickDownColor": "#eb4d5c",\n\t\t\t\t"downColor": "#eb4d5c",\n\t\t\t\t"borderUpColor": "#53b987",\n\t\t\t\t"borderDownColor": "#eb4d5c"\n\t\t\t},\n\t\t\t"barStyle": {\n\t\t\t\t"downColor": "#eb4d5c",\n\t\t\t\t"upColor": "#53b987"\n\t\t\t},\n\t\t\t"pnfStyle": {\n\t\t\t\t"downColor": "#eb4d5c",\n\t\t\t\t"upColor": "#53b987",\n\t\t\t\t"upColorProjection": "#336854",\n\t\t\t\t"downColorProjection": "#7f323f"\n\t\t\t},\n\t\t\t"areaStyle": {\n\t\t\t\t"transparency": 50,\n\t\t\t\t"color1": "#606090",\n\t\t\t\t"color2": "#01F6F5",\n\t\t\t\t"linecolor": "#0094FF",\n\t\t\t\t"linewidth": 1,\n\t\t\t\t"linestyle": 0\n\t\t\t},\n\t\t\t"renkoStyle": {\n\t\t\t\t"upColor": "#53b987",\n\t\t\t\t"downColor": "#eb4d5c",\n\t\t\t\t"borderUpColor": "#53b987",\n\t\t\t\t"borderDownColor": "#eb4d5c",\n\t\t\t\t"upColorProjection": "#336854",\n\t\t\t\t"downColorProjection": "#7f323f",\n\t\t\t\t"borderUpColorProjection": "#336854",\n\t\t\t\t"borderDownColorProjection": "#7f323f",\n\t\t\t\t"wickUpColor": "#336854",\n\t\t\t\t"wickDownColor": "#7f323f"\n\t\t\t},\n\t\t\t"lineStyle": {\n\t\t\t\t"color": "#6FB8F7",\n\t\t\t\t"linewidth": 1,\n\t\t\t\t"linestyle": 0\n\t\t\t},\n\t\t\t"kagiStyle": {\n\t\t\t\t"downColor": "#eb4d5c",\n\t\t\t\t"upColor": "#53b987",\n\t\t\t\t"upColorProjection": "#336854",\n\t\t\t\t"downColorProjection": "#7f323f"\n\t\t\t},\n\t\t\t"pbStyle": {\n\t\t\t\t"upColor": "#53b987",\n\t\t\t\t"downColor": "#eb4d5c",\n\t\t\t\t"borderUpColor": "#53b987",\n\t\t\t\t"borderDownColor": "#eb4d5c",\n\t\t\t\t"upColorProjection": "#336854",\n\t\t\t\t"downColorProjection": "#7f323f",\n\t\t\t\t"borderUpColorProjection": "#336854",\n\t\t\t\t"borderDownColorProjection": "#7f323f"\n\t\t\t}\n\t\t}\n\t}\n}\n'},1082:function(t,o){ 2 | t.exports='{\n\t"content": {\n\t\t"chartProperties": {\n\t\t\t"scalesProperties": {\n\t\t\t\t"textColor": "#555",\n\t\t\t\t"lineColor": "#555",\n\t\t\t\t"backgroundColor": "#ffffff"\n\t\t\t},\n\t\t\t"paneProperties": {\n\t\t\t\t"gridProperties": {\n\t\t\t\t\t"color": "#e1ecf2"\n\t\t\t\t},\n\t\t\t\t"background": "#ffffff"\n\t\t\t}\n\t\t},\n\t\t"mainSourceProperties": {\n\t\t\t"candleStyle": {\n\t\t\t\t"borderColor": "#378658",\n\t\t\t\t"upColor": "#53b987",\n\t\t\t\t"wickColor": "#737375",\n\t\t\t\t"wickUpColor": "#a9dcc3",\n\t\t\t\t"wickDownColor": "#f5a6ae",\n\t\t\t\t"downColor": "#eb4d5c",\n\t\t\t\t"borderUpColor": "#53b987",\n\t\t\t\t"borderDownColor": "#eb4d5c"\n\t\t\t},\n\t\t\t"haStyle": {\n\t\t\t\t"borderColor": "#378658",\n\t\t\t\t"upColor": "#53b987",\n\t\t\t\t"wickColor": "#737375",\n\t\t\t\t"wickUpColor": "#53b987",\n\t\t\t\t"wickDownColor": "#eb4d5c",\n\t\t\t\t"downColor": "#eb4d5c",\n\t\t\t\t"borderUpColor": "#53b987",\n\t\t\t\t"borderDownColor": "#eb4d5c"\n\t\t\t},\n\t\t\t"barStyle": {\n\t\t\t\t"downColor": "#eb4d5c",\n\t\t\t\t"upColor": "#53b987"\n\t\t\t},\n\t\t\t"pnfStyle": {\n\t\t\t\t"downColor": "#eb4d5c",\n\t\t\t\t"upColor": "#53b987",\n\t\t\t\t"upColorProjection": "#a9dcc3",\n\t\t\t\t"downColorProjection": "#f5a6ae"\n\t\t\t},\n\t\t\t"areaStyle": {\n\t\t\t\t"transparency": 50,\n\t\t\t\t"color1": "#606090",\n\t\t\t\t"color2": "#01F6F5",\n\t\t\t\t"linecolor": "#0094FF",\n\t\t\t\t"linewidth": 1,\n\t\t\t\t"linestyle": 0\n\t\t\t},\n\t\t\t"renkoStyle": {\n\t\t\t\t"upColor": "#53b987",\n\t\t\t\t"downColor": "#eb4d5c",\n\t\t\t\t"borderUpColor": "#53b987",\n\t\t\t\t"borderDownColor": "#eb4d5c",\n\t\t\t\t"upColorProjection": "#a9dcc3",\n\t\t\t\t"downColorProjection": "#f5a6ae",\n\t\t\t\t"borderUpColorProjection": "#a9dcc3",\n\t\t\t\t"borderDownColorProjection": "#f5a6ae",\n\t\t\t\t"wickUpColor": "#a9dcc3",\n\t\t\t\t"wickDownColor": "#f5a6ae"\n\t\t\t},\n\t\t\t"lineStyle": {\n\t\t\t\t"color": "#0303F7",\n\t\t\t\t"linewidth": 1,\n\t\t\t\t"linestyle": 0\n\t\t\t},\n\t\t\t"kagiStyle": {\n\t\t\t\t"downColor": "#eb4d5c",\n\t\t\t\t"upColor": "#53b987",\n\t\t\t\t"upColorProjection": "#a9dcc3",\n\t\t\t\t"downColorProjection": "#f5a6ae"\n\t\t\t},\n\t\t\t"pbStyle": {\n\t\t\t\t"upColor": "#53b987",\n\t\t\t\t"downColor": "#eb4d5c",\n\t\t\t\t"borderUpColor": "#53b987",\n\t\t\t\t"borderDownColor": "#eb4d5c",\n\t\t\t\t"upColorProjection": "#a9dcc3",\n\t\t\t\t"downColorProjection": "#f5a6ae",\n\t\t\t\t"borderUpColorProjection": "#a9dcc3",\n\t\t\t\t"borderDownColorProjection": "#f5a6ae"\n\t\t\t}\n\t\t}\n\t}\n}\n'}}); -------------------------------------------------------------------------------- /js/config.js: -------------------------------------------------------------------------------- 1 | // darkbg 161E2A 2 | 3 | var light = { 4 | timezone: getTimeZone(), 5 | preset: "mobile", 6 | container_id: 'tv_chart_container', 7 | library_path: './charting_library/', 8 | disabled_features: [ 9 | 'header_widget', 10 | // 'widget_logo', 11 | 'use_localstorage_for_settings', 12 | 'left_toolbar', 13 | 'display_market_status', 14 | 'go_to_date', 15 | 'volume_force_overlay', 16 | 'control_bar', 17 | 'timeframes_toolbar', 18 | ], 19 | enabled_features: ["", "hide_last_na_study_output"], 20 | client_id: 'tradingview.com', 21 | user_id: 'public_user_id', 22 | fullscreen: false, 23 | autosize: true, 24 | custom_css_url: './light.css', 25 | loading_screen: { 26 | backgroundColor: "#FFFFFF" 27 | }, 28 | overrides: { 29 | 'paneProperties.background': "#FFFFFF", 30 | 'paneProperties.bottomMargin': 25, 31 | 'paneProperties.topMargin': 5, 32 | 'mainSeriesProperties.barStyle.upColor': "#15CC89", //蜡烛图颜色-绿 33 | 'mainSeriesProperties.barStyle.downColor': "#FF5B7D",//蜡烛图颜色-红 34 | 'mainSeriesProperties.candleStyle.wickUpColor': "#15CC89", 35 | 'mainSeriesProperties.candleStyle.wickDownColor': "#FF5B7D", 36 | 'paneProperties.vertGridProperties.color': "RGBA(0,0,0,0)", 37 | 'paneProperties.horzGridProperties.color': "#EDF1F4", 38 | 'scalesProperties.textColor': "#C4D0D7", 39 | 'scalesProperties.lineColor': "#EDF1F4", 40 | 'paneProperties.legendProperties.showLegend': false, 41 | 'paneProperties.legendProperties.showStudyArguments': false, 42 | 'paneProperties.legendProperties.showStudyTitles': false, 43 | 'paneProperties.legendProperties.showStudyValues': false, 44 | 'paneProperties.legendProperties.showSeriesTitle': false, 45 | 'paneProperties.legendProperties.showSeriesOHLC': false, 46 | }, 47 | studies_overrides: { //布林柱状图颜色 48 | "volume.precision": 2, 49 | "volume.volume.color.1": "#15CC89", //绿 50 | "volume.volume.color.0": "#FF5B7D",//红 51 | "stochastic.hlines background.visible": false, 52 | "Relative Strength Index.hlines background.visible": false, 53 | "Williams %R.hlines background.visible": false, 54 | }, 55 | time_frames: [], 56 | } 57 | 58 | var dark = { 59 | timezone: getTimeZone(), 60 | preset: "mobile", 61 | container_id: 'tv_chart_container', 62 | library_path: './charting_library/', 63 | disabled_features: [ 64 | 'header_widget', 65 | // 'widget_logo', 66 | 'use_localstorage_for_settings', 67 | 'left_toolbar', 68 | 'display_market_status', 69 | 'go_to_date', 70 | 'volume_force_overlay', 71 | 'control_bar', 72 | 'timeframes_toolbar', 73 | ], 74 | enabled_features: ["", "hide_last_na_study_output"], 75 | client_id: 'tradingview.com', 76 | user_id: 'public_user_id', 77 | fullscreen: false, 78 | autosize: true, 79 | custom_css_url: './dark.css', 80 | loading_screen: { 81 | backgroundColor: "#161E2A" 82 | }, 83 | overrides: { 84 | 'paneProperties.bottomMargin': 25, 85 | 'paneProperties.topMargin': 5, 86 | 'paneProperties.background': "#161E2A", 87 | 'mainSeriesProperties.barStyle.upColor': "#15CC89", //蜡烛图颜色-绿 88 | 'mainSeriesProperties.barStyle.downColor': "#FF5B7D",//蜡烛图颜色-红 89 | 'mainSeriesProperties.candleStyle.wickUpColor': "#15CC89", 90 | 'mainSeriesProperties.candleStyle.wickDownColor': "#FF5B7D", 91 | 'paneProperties.vertGridProperties.color': "RGBA(0,0,0,0)", 92 | 'paneProperties.horzGridProperties.color': "#394D66", 93 | 'scalesProperties.textColor': "#627180", 94 | 'scalesProperties.lineColor': "#394D66", 95 | 'paneProperties.legendProperties.showLegend': false, 96 | 'paneProperties.legendProperties.showStudyArguments': false, 97 | 'paneProperties.legendProperties.showStudyTitles': false, 98 | 'paneProperties.legendProperties.showStudyValues': false, 99 | 'paneProperties.legendProperties.showSeriesTitle': false, 100 | 'paneProperties.legendProperties.showSeriesOHLC': false, 101 | }, 102 | studies_overrides: { //布林柱状图颜色 103 | "volume.precision": 2, 104 | "volume.volume.color.1": "#00ce7d", //绿 105 | "volume.volume.color.0": "#e55541",//红 106 | 107 | "stochastic.hlines background.visible": false, 108 | "stochastic.%D.color": "#FF5B7D", 109 | "stochastic.%K.color": "#4D81F3", 110 | 111 | "Relative Strength Index.hlines background.visible": false, 112 | "Relative Strength Index.Plot.color": "#E04DF3", 113 | 114 | "Williams %R.hlines background.visible": false, 115 | "Williams %R.Plot.color": "#5E4DF3", 116 | 117 | "Moving Average.Plot.color": "#4D81F3", 118 | 119 | "Bollinger Bands.Median.color": "#FF5B7D", 120 | "Bollinger Bands.Upper.color": "#4D81F3", 121 | "Bollinger Bands.Lower.color": "#4D81F3", 122 | 123 | "MACD.Histogram.color": "#FF5B7D", 124 | "MACD.MACD.color": "#4D81F3", 125 | "MACD.Signal.color": "#FF5B7D", 126 | }, 127 | time_frames: [], 128 | } 129 | 130 | var tradingConfig = { 131 | light: light, 132 | dark: dark 133 | } -------------------------------------------------------------------------------- /js/app.js: -------------------------------------------------------------------------------- 1 | 2 | var _baseUrl = "192.168.21.135:8081"; 3 | var rss = null; 4 | var widget = null; 5 | var _symbol = 'BTC_USDT'; 6 | var _language = 'en'; 7 | var _datafeedUrl = 'http://' + _baseUrl + '/v1'; 8 | var _resolution = '5'; 9 | var _theme = 'dark'; 10 | var _chartType = '1'; 11 | var initTimer = null; 12 | var loading = true; 13 | var pageInitFinish = false; 14 | var waitInitTimer = null; 15 | 16 | window.onload = function(){ 17 | pageInitFinish = true; 18 | // startChart('excalibur-websocket.blockvalley.io:88'); 19 | handleTouchRange(); 20 | } 21 | 22 | function handleTouchRange(){ 23 | handle(); 24 | setInterval(handle, 1000); 25 | function handle(){ 26 | try { 27 | var width = +window.frames[0].document.getElementsByClassName('chart-markup-table price-axis')[1].style.width.replace('px', ''); 28 | } catch (error) { 29 | var width = 55; 30 | } 31 | 32 | try { 33 | document.getElementById('disabled-touch-scale').style.width = width + 4 + 'px'; 34 | } catch (error) { 35 | 36 | } 37 | } 38 | } 39 | 40 | function startChart(baseUrl, symbol, language, resolution, theme, chartType){ 41 | _baseUrl = baseUrl || _baseUrl; 42 | _datafeedUrl = 'http://' + _baseUrl + '/v1'; 43 | _symbol = symbol || _symbol; 44 | _language = language || _language; 45 | _resolution = resolution || _resolution; 46 | _theme = theme || _theme; 47 | _chartType = chartType || _chartType; 48 | document.body.className = _theme; 49 | 50 | waitInitTimer = setInterval(function(){ 51 | if(!pageInitFinish) return ; 52 | clearInterval(waitInitTimer); 53 | 54 | rss = new WebSocketClient({ 55 | socketUrl: "ws://" + _baseUrl + "/ws", 56 | }, { 57 | onopen: function(){ 58 | initChart(); 59 | } 60 | }) 61 | }, 100) 62 | } 63 | 64 | function initChart(){ 65 | initTimer && clearTimeout(initTimer); 66 | initTimer = setTimeout(function(){ 67 | loading = true; 68 | rss && rss._closeCurrentKline && rss._closeCurrentKline(); 69 | 70 | var config = tradingConfig[_theme]; 71 | 72 | config.symbol = _symbol; 73 | config.interval = _resolution; 74 | config.locale = _language; 75 | config.datafeed = new Datafeeds(_datafeedUrl, rss) 76 | 77 | widget = new TradingView.widget(config) 78 | widget.onChartReady(function(){ 79 | createStudy('volume', true); 80 | createStudyAuto('Moving Average', 'first'); 81 | setChartType(_chartType); 82 | widget.chart().onDataLoaded().subscribe(null, function(){ 83 | loading = false; 84 | }) 85 | widget.subscribe('edit_object_dialog', function(){ 86 | widget.closePopupsAndDialogs(); 87 | }) 88 | }); 89 | }, 200) 90 | } 91 | 92 | function setTheme(theme){ 93 | _theme = theme; 94 | document.body.className = _theme; 95 | initChart(); 96 | } 97 | 98 | function setSymbol(symbol){ 99 | _symbol = symbol; 100 | initChart(); 101 | } 102 | 103 | function setLanguage(language){ 104 | _language = language; 105 | initChart(); 106 | } 107 | 108 | function setResolution(interval){ 109 | if(!widget || loading){ 110 | return false; 111 | } 112 | 113 | var chartType = 1; 114 | var resolution = interval; 115 | 116 | if(interval == '1000001'){ 117 | chartType = 3; 118 | resolution = '1'; 119 | } 120 | 121 | _resolution = resolution; 122 | 123 | if(widget.chart().resolution() != resolution){ 124 | loading = true; 125 | widget.chart().setResolution(String(resolution), function() { 126 | console.log('Set Success!', String(resolution)) 127 | loading = false; 128 | widget.chart().setChartType(chartType); 129 | }); 130 | }else{ 131 | widget.chart().setChartType(chartType); 132 | } 133 | } 134 | 135 | function setChartType(chartType){ 136 | if(chartType === '3'){ 137 | setResolution('1000001'); 138 | }else{ 139 | widget && widget.chart().setChartType(Number(chartType)); 140 | } 141 | } 142 | 143 | function createStudy(){ 144 | if(!widget || !widget.chart()){ 145 | return false 146 | } 147 | 148 | if(arguments[0] === 'Moving Average'){ 149 | // var colors = ['#222222', '#333333', '#ffffff', '#000000']; 150 | [5, 10, 30, 60].forEach(function(range, index){ 151 | widget.chart().createStudy('Moving Average', false, false, [range], null, { 152 | // 'Plot.color': colors[index], 153 | }) 154 | }) 155 | return '0' 156 | } 157 | 158 | var id = widget.chart().createStudy.apply(widget.chart(), arguments); 159 | 160 | widget.chart().getStudyById(id).setUserEditEnabled(false); 161 | 162 | return id; 163 | } 164 | 165 | function createStudyAuto(key, type){ 166 | var studiesMap = { 167 | first: ['Moving Average', 'Bollinger Bands'], 168 | second: ['MACD', 'Stochastic', 'Relative Strength Index', 'Williams %R'] 169 | } 170 | 171 | var studies = studiesMap[type] || []; 172 | var current_studies = getAllStudies() || []; 173 | 174 | current_studies.forEach(function(study){ 175 | if(~studies.indexOf(study.name)){ 176 | removeStudy(study.id); 177 | } 178 | }); 179 | 180 | key && createStudy(key); 181 | } 182 | 183 | function removeStudy(id){ 184 | if(!widget || !widget.chart()){ 185 | return false 186 | } 187 | return widget.chart().removeEntity(id); 188 | } 189 | 190 | function getAllStudies(){ 191 | if(!widget || !widget.chart()){ 192 | return false 193 | } 194 | return widget.chart().getAllStudies() 195 | } 196 | 197 | function action(id){ 198 | if(!widget || !widget.chart()){ 199 | return false 200 | } 201 | return widget.chart().executeActionById(id || 'chartProperties') 202 | } 203 | 204 | function resetChart(){ 205 | action('chartReset'); 206 | } 207 | 208 | window.onerror = function(err) { 209 | console.warn('Error:', err) 210 | } 211 | -------------------------------------------------------------------------------- /js/datafeed.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var ajax = function (url, fn, fnf) { 3 | var obj = new XMLHttpRequest(); 4 | obj.open('GET', url, true); 5 | obj.onreadystatechange = function () { 6 | if (obj.readyState == 4 && obj.status == 200 || obj.status == 304) { 7 | fn(JSON.parse(obj.responseText)); 8 | } 9 | else if (obj.readyState == 4) { 10 | fnf(); 11 | } 12 | }; 13 | obj.onerror = function () { return fnf(); }; 14 | obj.send(null); 15 | }; 16 | var timeMap = { 17 | '1': '1m', 18 | '5': '5m', 19 | '15': '15m', 20 | '30': '30m', 21 | '60': '1h', 22 | '240': '4h', 23 | '1440': '1D', 24 | '10080': '7D', 25 | '43200': '1M', 26 | }; 27 | var Datafeeds = (function () { 28 | function Datafeeds(_datafeedURL, _app) { 29 | var _this = this; 30 | this._datafeedURL = _datafeedURL; 31 | this._app = _app; 32 | this._protocolVersion = 2; 33 | this.onTick = function () { }; 34 | this._app._closeCurrentKline = function () { 35 | _this._ws && _this._ws.close(); 36 | }; 37 | } 38 | Datafeeds.prototype.searchSymbols = function () { 39 | return; 40 | }; 41 | Datafeeds.prototype.getServerTime = function (cb) { 42 | setTimeout(function () { return cb(Date.now()); }, 0); 43 | }; 44 | Datafeeds.prototype.onReady = function (cb) { 45 | setTimeout(function () { return cb({ 46 | supports_time: true, 47 | supports_timescale_marks: false, 48 | supports_marks: false, 49 | supported_resolutions: ['1', '5', '15', '30', '60', '240', '1440', '10080', '43200'], 50 | exchanges: [], 51 | }); }, 0); 52 | }; 53 | Datafeeds.prototype.resolveSymbol = function (trading_pair, onResolve, onError) { 54 | this._send('/trading_pairs', { 55 | pair: trading_pair ? trading_pair.toUpperCase() : "" 56 | }, function (data) { 57 | if (!data) { 58 | onError("unknown_symbol"); 59 | } 60 | else { 61 | onResolve({ 62 | name: trading_pair, 63 | base_name: [trading_pair], 64 | full_name: trading_pair, 65 | timezone: getTimeZone(), 66 | minmov: 1, 67 | exchange: "", 68 | listed_exchange: "", 69 | session: '24x7', 70 | has_intraday: true, 71 | has_daily: true, 72 | has_empty_bars: true, 73 | has_no_volume: true, 74 | has_weekly_and_monthly: false, 75 | description: '', 76 | type: 'stock', 77 | supported_resolutions: ['1', '5', '15', '30', '60', '240', '1440', '10080', '43200'], 78 | pricescale: Math.pow(10, parseInt(data.quote_decimal)), 79 | ticker: trading_pair, 80 | }); 81 | } 82 | }, function () { 83 | onError("unknown_symbol"); 84 | }); 85 | }; 86 | Datafeeds.prototype.subscribeBars = function (symbolInfo, resolution, onTick, listenerGuid, onResetCacheNeededCallback) { 87 | this.onTick = onTick; 88 | }; 89 | Datafeeds.prototype.unsubscribeBars = function () { 90 | this.onTick = function () { }; 91 | }; 92 | Datafeeds.prototype.getBars = function (symbolInfo, resolution, rangeStartDate, rangeEndDate, onResult, onError, isFirstCall) { 93 | var _this = this; 94 | if (!isFirstCall) { 95 | try { 96 | this._send('/get_bars', { 97 | pair: symbolInfo.name, 98 | limit: 1000, 99 | end: this.cacheBars[0].time, 100 | period: timeMap[resolution], 101 | }, function (res) { 102 | var options = _this.getBarsDataFormat(res) || {}; 103 | var _a = options.bars, bars = _a === void 0 ? [] : _a; 104 | _this.cacheBars = _this.cacheBars.concat(bars); 105 | _this.cacheBars = _this.cacheBars.sort(function (a, b) { return a.time - b.time; }); 106 | onResult(bars, { noData: !bars.length }); 107 | }, function () { 108 | onResult([], { noData: true }); 109 | }); 110 | } 111 | catch (error) { 112 | onResult([], { noData: true }); 113 | } 114 | return; 115 | } 116 | this._ws && this._ws.close(); 117 | var rssParam = { 118 | service: "market", 119 | type: 'kline', 120 | pair: symbolInfo.name.toLowerCase(), 121 | period: timeMap[resolution], 122 | }; 123 | this._ws = this._app.add(rssParam, function (data) { 124 | var options = _this.getBarsDataFormat(data); 125 | if (!options) 126 | return; 127 | if (options.isFirst) { 128 | _this.cacheBars = options.bars; 129 | onResult(options.bars, options.meta); 130 | } 131 | else { 132 | var lastIndex = _this.cacheBars.length - 1; 133 | var lastBar = _this.cacheBars[lastIndex]; 134 | if (lastBar.time === options.bars[0].time) { 135 | _this.cacheBars[lastIndex] = options.bars[0]; 136 | } 137 | else { 138 | _this.cacheBars.push(options.bars[0]); 139 | } 140 | _this.onTick(options.bars[0]); 141 | } 142 | }); 143 | }; 144 | Datafeeds.prototype.getBarsDataFormat = function (res) { 145 | var type = res.type, _a = res.data, data = _a === void 0 ? [] : _a; 146 | if (!data || !data.length) 147 | return false; 148 | var dt = { s: 'ok', t: [], c: [], o: [], h: [], l: [], v: [] }; 149 | for (var i = 0; i < data.length; i++) { 150 | dt.t.push(parseInt((data[i][0] / 1000).toString())); 151 | dt.o.push(parseFloat(data[i][1])); 152 | dt.h.push(parseFloat(data[i][2])); 153 | dt.l.push(parseFloat(data[i][3])); 154 | dt.c.push(parseFloat(data[i][4])); 155 | dt.v.push(parseFloat(data[i][5])); 156 | } 157 | var bars = []; 158 | var barsCount = dt.t.length || 0; 159 | var volumePresent = typeof dt.v !== 'undefined'; 160 | var ohlPresent = typeof dt.o !== 'undefined'; 161 | for (var i = 0; i < barsCount; ++i) { 162 | var barValue = { 163 | time: dt.t[i] * 1000, 164 | close: dt.c[i], 165 | }; 166 | if (ohlPresent) { 167 | barValue.open = dt.o[i]; 168 | barValue.high = dt.h[i]; 169 | barValue.low = dt.l[i]; 170 | } 171 | else { 172 | barValue.open = barValue.high = barValue.low = barValue.close; 173 | } 174 | if (volumePresent) { 175 | barValue.volume = dt.v[i]; 176 | } 177 | bars.push(barValue); 178 | } 179 | var meta = { version: this._protocolVersion, noData: false, nextTime: dt.nb || dt.nextTime }; 180 | bars = bars.sort(function (a, b) { 181 | return a.time - b.time; 182 | }); 183 | return { 184 | bars: bars, 185 | meta: meta, 186 | isFirst: type === 'i', 187 | }; 188 | }; 189 | Datafeeds.prototype._send = function (urlPath, params, cb, ecb) { 190 | if (cb === void 0) { cb = function (data) { }; } 191 | if (ecb === void 0) { ecb = function () { }; } 192 | if (params) { 193 | var paramKeys = Object.keys(params); 194 | if (paramKeys.length !== 0) { 195 | urlPath += '?'; 196 | } 197 | urlPath += paramKeys.map(function (key) { 198 | return encodeURIComponent(key) + "=" + encodeURIComponent(params[key].toString()); 199 | }).join('&'); 200 | } 201 | return ajax(this._datafeedURL + urlPath, cb, ecb); 202 | }; 203 | return Datafeeds; 204 | }()); 205 | -------------------------------------------------------------------------------- /charting_library/datafeed-api.d.ts: -------------------------------------------------------------------------------- 1 | export declare type ResolutionString = string; 2 | export interface Exchange { 3 | value: string; 4 | name: string; 5 | desc: string; 6 | } 7 | export interface DatafeedSymbolType { 8 | name: string; 9 | value: string; 10 | } 11 | export interface DatafeedConfiguration { 12 | exchanges?: Exchange[]; 13 | supported_resolutions?: ResolutionString[]; 14 | supports_marks?: boolean; 15 | supports_time?: boolean; 16 | supports_timescale_marks?: boolean; 17 | symbols_types?: DatafeedSymbolType[]; 18 | } 19 | export declare type OnReadyCallback = (configuration: DatafeedConfiguration) => void; 20 | export interface IExternalDatafeed { 21 | onReady(callback: OnReadyCallback): void; 22 | } 23 | export interface DatafeedQuoteValues { 24 | ch?: number; 25 | chp?: number; 26 | short_name?: string; 27 | exchange?: string; 28 | description?: string; 29 | lp?: number; 30 | ask?: number; 31 | bid?: number; 32 | spread?: number; 33 | open_price?: number; 34 | high_price?: number; 35 | low_price?: number; 36 | prev_close_price?: number; 37 | volume?: number; 38 | original_name?: string; 39 | [valueName: string]: string | number | undefined; 40 | } 41 | export interface QuoteOkData { 42 | s: 'ok'; 43 | n: string; 44 | v: DatafeedQuoteValues; 45 | } 46 | export interface QuoteErrorData { 47 | s: 'error'; 48 | n: string; 49 | v: object; 50 | } 51 | export declare type QuoteData = QuoteOkData | QuoteErrorData; 52 | export declare type QuotesCallback = (data: QuoteData[]) => void; 53 | export interface IDatafeedQuotesApi { 54 | getQuotes(symbols: string[], onDataCallback: QuotesCallback, onErrorCallback: (msg: string) => void): void; 55 | subscribeQuotes(symbols: string[], fastSymbols: string[], onRealtimeCallback: QuotesCallback, listenerGUID: string): void; 56 | unsubscribeQuotes(listenerGUID: string): void; 57 | } 58 | export declare type CustomTimezones = 'America/New_York' | 'America/Los_Angeles' | 'America/Chicago' | 'America/Phoenix' | 'America/Toronto' | 'America/Vancouver' | 'America/Argentina/Buenos_Aires' | 'America/El_Salvador' | 'America/Sao_Paulo' | 'America/Bogota' | 'America/Caracas' | 'Europe/Moscow' | 'Europe/Athens' | 'Europe/Belgrade' | 'Europe/Berlin' | 'Europe/London' | 'Europe/Luxembourg' | 'Europe/Madrid' | 'Europe/Paris' | 'Europe/Rome' | 'Europe/Warsaw' | 'Europe/Istanbul' | 'Europe/Zurich' | 'Australia/Sydney' | 'Australia/Brisbane' | 'Australia/Adelaide' | 'Australia/ACT' | 'Asia/Almaty' | 'Asia/Ashkhabad' | 'Asia/Tokyo' | 'Asia/Taipei' | 'Asia/Singapore' | 'Asia/Shanghai' | 'Asia/Seoul' | 'Asia/Tehran' | 'Asia/Dubai' | 'Asia/Kolkata' | 'Asia/Hong_Kong' | 'Asia/Bangkok' | 'Asia/Chongqing' | 'Asia/Jerusalem' | 'Asia/Kuwait' | 'Asia/Muscat' | 'Asia/Qatar' | 'Asia/Riyadh' | 'Pacific/Auckland' | 'Pacific/Chatham' | 'Pacific/Fakaofo' | 'Pacific/Honolulu' | 'America/Mexico_City' | 'Africa/Cairo' | 'Africa/Johannesburg' | 'Asia/Kathmandu' | 'US/Mountain'; 59 | export declare type Timezone = 'Etc/UTC' | CustomTimezones; 60 | export interface LibrarySymbolInfo { 61 | /** 62 | * Symbol Name 63 | */ 64 | name: string; 65 | full_name: string; 66 | base_name?: [string]; 67 | /** 68 | * Unique symbol id 69 | */ 70 | ticker?: string; 71 | description: string; 72 | type: string; 73 | /** 74 | * @example "1700-0200" 75 | */ 76 | session: string; 77 | /** 78 | * Traded exchange 79 | * @example "NYSE" 80 | */ 81 | exchange: string; 82 | listed_exchange: string; 83 | timezone: Timezone; 84 | /** 85 | * Code (Tick) 86 | * @example 8/16/.../256 (1/8/100 1/16/100 ... 1/256/100) or 1/10/.../10000000 (1 0.1 ... 0.0000001) 87 | */ 88 | pricescale: number; 89 | /** 90 | * The number of units that make up one tick. 91 | * @example For example, U.S. equities are quotes in decimals, and tick in decimals, and can go up +/- .01. So the tick increment is 1. But the e-mini S&P futures contract, though quoted in decimals, goes up in .25 increments, so the tick increment is 25. (see also Tick Size) 92 | */ 93 | minmov: number; 94 | fractional?: boolean; 95 | /** 96 | * @example Quarters of 1/32: pricescale=128, minmovement=1, minmovement2=4 97 | */ 98 | minmove2?: number; 99 | /** 100 | * false if DWM only 101 | */ 102 | has_intraday?: boolean; 103 | /** 104 | * An array of resolutions which should be enabled in resolutions picker for this symbol. 105 | */ 106 | supported_resolutions: ResolutionString[]; 107 | /** 108 | * @example (for ex.: "1,5,60") - only these resolutions will be requested, all others will be built using them if possible 109 | */ 110 | intraday_multipliers?: string[]; 111 | has_seconds?: boolean; 112 | /** 113 | * It is an array containing seconds resolutions (in seconds without a postfix) the datafeed builds by itself. 114 | */ 115 | seconds_multipliers?: string[]; 116 | has_daily?: boolean; 117 | has_weekly_and_monthly?: boolean; 118 | has_empty_bars?: boolean; 119 | force_session_rebuild?: boolean; 120 | has_no_volume?: boolean; 121 | /** 122 | * Integer showing typical volume value decimal places for this symbol 123 | */ 124 | volume_precision?: number; 125 | data_status?: 'streaming' | 'endofday' | 'pulsed' | 'delayed_streaming'; 126 | /** 127 | * Boolean showing whether this symbol is expired futures contract or not. 128 | */ 129 | expired?: boolean; 130 | /** 131 | * Unix timestamp of expiration date. 132 | */ 133 | expiration_date?: number; 134 | sector?: string; 135 | industry?: string; 136 | currency_code?: string; 137 | } 138 | export interface DOMLevel { 139 | price: number; 140 | volume: number; 141 | } 142 | export interface DOMData { 143 | snapshot: boolean; 144 | asks: DOMLevel[]; 145 | bids: DOMLevel[]; 146 | } 147 | export interface Bar { 148 | time: number; 149 | open: number; 150 | high: number; 151 | low: number; 152 | close: number; 153 | volume?: number; 154 | } 155 | export interface SearchSymbolResultItem { 156 | symbol: string; 157 | full_name: string; 158 | description: string; 159 | exchange: string; 160 | ticker: string; 161 | type: string; 162 | } 163 | export interface HistoryMetadata { 164 | noData: boolean; 165 | nextTime?: number | null; 166 | } 167 | export interface MarkCustomColor { 168 | color: string; 169 | background: string; 170 | } 171 | export declare type MarkConstColors = 'red' | 'green' | 'blue' | 'yellow'; 172 | export interface Mark { 173 | id: string | number; 174 | time: number; 175 | color: MarkConstColors | MarkCustomColor; 176 | text: string; 177 | label: string; 178 | labelFontColor: string; 179 | minSize: number; 180 | } 181 | export interface TimescaleMark { 182 | id: string | number; 183 | time: number; 184 | color: MarkConstColors | string; 185 | label: string; 186 | tooltip: string[]; 187 | } 188 | export declare type ResolutionBackValues = 'D' | 'M'; 189 | export interface HistoryDepth { 190 | resolutionBack: ResolutionBackValues; 191 | intervalBack: number; 192 | } 193 | export declare type SearchSymbolsCallback = (items: SearchSymbolResultItem[]) => void; 194 | export declare type ResolveCallback = (symbolInfo: LibrarySymbolInfo) => void; 195 | export declare type HistoryCallback = (bars: Bar[], meta: HistoryMetadata) => void; 196 | export declare type SubscribeBarsCallback = (bar: Bar) => void; 197 | export declare type GetMarksCallback = (marks: T[]) => void; 198 | export declare type ServerTimeCallback = (serverTime: number) => void; 199 | export declare type DomeCallback = (data: DOMData) => void; 200 | export declare type ErrorCallback = (reason: string) => void; 201 | export interface IDatafeedChartApi { 202 | calculateHistoryDepth?(resolution: ResolutionString, resolutionBack: ResolutionBackValues, intervalBack: number): HistoryDepth | undefined; 203 | getMarks?(symbolInfo: LibrarySymbolInfo, from: number, to: number, onDataCallback: GetMarksCallback, resolution: ResolutionString): void; 204 | getTimescaleMarks?(symbolInfo: LibrarySymbolInfo, from: number, to: number, onDataCallback: GetMarksCallback, resolution: ResolutionString): void; 205 | /** 206 | * This function is called if configuration flag supports_time is set to true when chart needs to know the server time. 207 | * The charting library expects callback to be called once. 208 | * The time is provided without milliseconds. Example: 1445324591. It is used to display Countdown on the price scale. 209 | */ 210 | getServerTime?(callback: ServerTimeCallback): void; 211 | searchSymbols(userInput: string, exchange: string, symbolType: string, onResult: SearchSymbolsCallback): void; 212 | resolveSymbol(symbolName: string, onResolve: ResolveCallback, onError: ErrorCallback): void; 213 | getBars(symbolInfo: LibrarySymbolInfo, resolution: ResolutionString, rangeStartDate: number, rangeEndDate: number, onResult: HistoryCallback, onError: ErrorCallback, isFirstCall: boolean): void; 214 | subscribeBars(symbolInfo: LibrarySymbolInfo, resolution: ResolutionString, onTick: SubscribeBarsCallback, listenerGuid: string, onResetCacheNeededCallback: () => void): void; 215 | unsubscribeBars(listenerGuid: string): void; 216 | subscribeDepth?(symbolInfo: LibrarySymbolInfo, callback: DomeCallback): string; 217 | unsubscribeDepth?(subscriberUID: string): void; 218 | } 219 | 220 | export as namespace TradingView; 221 | -------------------------------------------------------------------------------- /charting_library/static/bundles/15.14e44c9fe762e0c75635.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([15],{1248:function(t,e,n){var o,i,r;!function(a,c){i=[t,n(1313),n(1315),n(1316)],o=c,void 0!==(r="function"==typeof o?o.apply(e,i):o)&&(t.exports=r)}(0,function(t,e,n,o){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function u(t,e){var n="data-clipboard-"+t;if(e.hasAttribute(n))return e.getAttribute(n)}var l=i(e),s=i(n),f=i(o),h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d=function(){function t(t,e){var n,o;for(n=0;n0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===h(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=(0,f.default)(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new l.default({action:this.action(e),target:this.target(e),text:this.text(e),container:this.container,trigger:e,emitter:this})}},{key:"defaultAction",value:function(t){return u("action",t)}},{key:"defaultTarget",value:function(t){var e=u("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return u("text",t)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],e="string"==typeof t?[t]:t,n=!!document.queryCommandSupported;return e.forEach(function(t){n=n&&!!document.queryCommandSupported(t)}),n}}]),e}(s.default);t.exports=p})},1313:function(t,e,n){var o,i,r;!function(a,c){i=[t,n(1314)],o=c, 2 | void 0!==(r="function"==typeof o?o.apply(e,i):o)&&(t.exports=r)}(0,function(t,e){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=n(e),r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a=function(){function t(t,e){var n,o;for(n=0;n0&&void 0!==arguments[0]?arguments[0]:{};this.action=t.action,this.container=t.container,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var t,e=this,n="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return e.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[n?"right":"left"]="-9999px",t=window.pageYOffset||document.documentElement.scrollTop,this.fakeElem.style.top=t+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=(0,i.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,i.default)(this.target),this.copyText()}},{key:"copyText",value:function(){var t=void 0;try{t=document.execCommand(this.action)}catch(e){t=!1}this.handleResult(t)}},{key:"handleResult",value:function(t){this.emitter.emit(t?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=t,"copy"!==this._action&&"cut"!==this._action)throw Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target", 3 | set:function(t){if(void 0!==t){if(!t||"object"!==(void 0===t?"undefined":r(t))||1!==t.nodeType)throw Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&t.hasAttribute("disabled"))throw Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(t.hasAttribute("readonly")||t.hasAttribute("disabled")))throw Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=t}},get:function(){return this._target}}]),t}();t.exports=c})},1314:function(t,e){function n(t){var e,n,o,i;return"SELECT"===t.nodeName?(t.focus(),e=t.value):"INPUT"===t.nodeName||"TEXTAREA"===t.nodeName?(n=t.hasAttribute("readonly"),n||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),n||t.removeAttribute("readonly"),e=t.value):(t.hasAttribute("contenteditable")&&t.focus(),o=window.getSelection(),i=document.createRange(),i.selectNodeContents(t),o.removeAllRanges(),o.addRange(i),e=""+o),e}t.exports=n},1315:function(t,e){function n(){}n.prototype={on:function(t,e,n){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){function o(){i.off(t,o),e.apply(n,arguments)}var i=this;return o._=e,this.on(t,o,n)},emit:function(t){var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,i=n.length;for(o;o'},t}(),d=a;window.TradingView=window.TradingView||{},window.TradingView.version=o,t.version=o,t.onready=i,t.widget=d,Object.defineProperty(t,"__esModule",{value:!0})}); 2 | -------------------------------------------------------------------------------- /charting_library/static/en-tv-chart.1c7535a2aac5ec511ed5.html: -------------------------------------------------------------------------------- 1 |
-------------------------------------------------------------------------------- /charting_library/static/no-tv-chart.1c7535a2aac5ec511ed5.html: -------------------------------------------------------------------------------- 1 |
-------------------------------------------------------------------------------- /charting_library/static/et_EE-tv-chart.1c7535a2aac5ec511ed5.html: -------------------------------------------------------------------------------- 1 |
-------------------------------------------------------------------------------- /charting_library/static/ro-tv-chart.1c7535a2aac5ec511ed5.html: -------------------------------------------------------------------------------- 1 |
-------------------------------------------------------------------------------- /charting_library/static/sk_SK-tv-chart.1c7535a2aac5ec511ed5.html: -------------------------------------------------------------------------------- 1 |
-------------------------------------------------------------------------------- /charting_library/static/bundles/editobjectdialog.e76ba6bc652064d1ce6a.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([8,12],{1076:function(e,t,i){"use strict";function a(e,t,i){r.call(this,e,t),this._linetool=i,this.prepareLayout()}var o=i(238),r=o.PropertyPage,n=o.GreateTransformer,s=o.LessTransformer,l=o.ToIntTransformer,p=o.SimpleStringBinder;i(241),inherit(a,r),a.BarIndexPastLimit=-5e4,a.BarIndexFutureLimit=15e3,a.prototype.bindBarIndex=function(e,t,i,o){var r=[l(e.value()),n(a.BarIndexPastLimit),s(a.BarIndexFutureLimit)];this.bindControl(this.createStringBinder(t,e,r,!0,i,o))},a.prototype.createPriceEditor=function(e){var t,i,a,o=this._linetool,r=o.ownerSource().formatter(),n=function(e){return r.format(e)},s=function(e){var t=r.parse(e);if(t.res)return t.price?t.price:t.value},l=$("");return l.TVTicker({step:r._minMove/r._priceScale||1,formatter:n,parser:s}),e&&(t=[function(t){var i=s(t);return void 0===i?e.value():i}],i="Change "+o.title()+" point price",a=this.createStringBinder(l,e,t,!1,this.model(),i),a.addFormatter(function(e){return r.format(e)}),this.bindControl(a)),l},a.prototype._createPointRow=function(e,t,i){var a,o,r,n,s,l=$(""),p=$("");return p.html($.t("Price")+i),p.appendTo(l),a=$(""),a.appendTo(l),o=this.createPriceEditor(t.price),o.appendTo(a),r=$(""),r.html($.t("Bar #")),r.appendTo(l),n=$(""),n.appendTo(l),s=$(""),s.appendTo(n),s.addClass("ticker"),this.bindBarIndex(t.bar,s,this.model(),"Change "+this._linetool.title()+" point bar index"),l},a.prototype.prepareLayoutForTable=function(e){var t,i,a,o,r,n=this._linetool.points(),s=n.length;for(t=0;t1?" "+(t+1):"",r=this._createPointRow(i,a,o),r.appendTo(e))},a.prototype.prepareLayout=function(){this._table=$(document.createElement("table")),this._table.addClass("property-page"),this._table.attr("cellspacing","0"),this._table.attr("cellpadding","2"),this.prepareLayoutForTable(this._table),this.loadData()},a.prototype.widget=function(){return this._table},a.prototype.createStringBinder=function(e,t,i,a,o,r){return new p(e,t,i,a,o,r)},e.exports=a},1077:function(e,t,i){"use strict";t.createInputsPropertyPage=function(e,t){var i=e.getInputsPropertyPage();return null==i?null:new i(e.properties(),t,e)},t.createStudyStrategyPropertyPage=function(e,t){var i=e.getStrategyPropertyPage();return null==i?null:new i(e.properties(),t,e)},t.createStylesPropertyPage=function(e,t){var i=e.getStylesPropertyPage();return null==i?null:new i(e.properties(),t,e)},t.createDisplayPropertyPage=function(e,t){var i=e.getDisplayPropertyPage();return null==i?null:new i(e.properties(),t,e)},t.createVisibilitiesPropertyPage=function(e,t){var i=e.getVisibilitiesPropertyPage();return null==i?null:new i(e.properties(),t,e)},t.hasInputsPropertyPage=function(e){return null!==e.getInputsPropertyPage()},t.hasStylesPropertyPage=function(e){return null!==e.getStylesPropertyPage()}},1195:function(e,t,i){"use strict";function a(e){function t(t,i,a){e.call(this,t,i,a),this._linetool=a, 2 | this._templateList=new p(this._linetool._constructor,this.applyTemplate.bind(this))}return inherit(t,e),t.prototype.applyTemplate=function(e){this.model().applyLineToolTemplate(this._linetool,e,"Apply Drawing Template"),this.loadData()},t.prototype.createTemplateButton=function(e){var t=this;return e=$.extend({},e,{getDataForSaveAs:function(){return t._linetool.template()}}),this._templateList.createButton(e)},t}function o(e,t,i){n.call(this,e,t),this._linetool=i}var r=i(238),n=r.PropertyPage,s=r.ColorBinding,l=i(372).addColorPicker,p=i(385);inherit(o,n),o.prototype.createOneColorForAllLinesWidget=function(){var e=$("");return this.bindControl(new s(l(e),this._linetool.properties().collectibleColors,!0,this.model(),"Change All Lines Color",0)),{label:$(""+$.t("Use one color")+""),editor:e}},o.prototype.addOneColorPropertyWidget=function(e){var t=this.createOneColorForAllLinesWidget(),i=$("");i.append($("")).append(t.label).append(t.editor),i.appendTo(e)},o=a(o),o.createTemplatesPropertyPage=a,e.exports=o},1201:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Coordinates=100]="Coordinates",e[e.Display=100]="Display",e[e.Style=200]="Style",e[e.Inputs=300]="Inputs",e[e.Properties=250]="Properties"}(t.TabPriority||(t.TabPriority={})),function(e){e.background="Background",e.coordinates="Coordinates",e.drawings="Drawings",e.events="Events",e.eventsAndAlerts="Events & Alerts",e.inputs="Inputs",e.properties="Properties",e.scales="Scales",e.sourceCode="Source Code",e.style="Style",e.timezoneSessions="Timezone/Sessions",e.trading="Trading",e.visibility="Visibility"}(t.TabNames||(t.TabNames={})),function(e){e[e.Default=100]="Default",e[e.UserSave=200]="UserSave",e[e.Override=300]="Override"}(t.TabOpenFrom||(t.TabOpenFrom={}))},412:function(e,t,i){"use strict";(function(t){function a(e,t,i){this._source=e,this._model=t,this._undoCheckpoint=i}var o=i(1).LineDataSource,r=i(35).Study,n=i(77),s=i(46).DataSource,l=i(23),p=i(133).bindPopupMenu,c=i(1201),d=i(40).trackEvent;i(241),a.prototype.hide=function(e){TVDialogs.destroy(this._dialogTitle,{undoChanges:!!e})},a.prototype._onDestroy=function(e,t){var i,a,o=(t||{}).undoChanges;$(window).unbind("keyup.hidePropertyDialog"),o?(i=this._undoCheckpoint?this._undoCheckpoint:this._undoCheckpointOnShow)&&this._model.undoToCheckpoint(i):this._source.hasAlert.value()&&(a=this._source,setTimeout(function(){a.localAndServerAlersMismatch&&a.synchronizeAlert(!0)})),this._undoCheckpointOnShow&&delete this._undoCheckpointOnShow,window.lineToolPropertiesToolbar&&window.lineToolPropertiesToolbar.refresh()},a.prototype.isVisible=function(){return this._dialog&&this._dialog.is(":visible")},a.prototype.focusOnText=function(){this._dialog.find('input[type="text"]').focus().select()},a.prototype.switchTab=function(e,t){var i,a;if(this._tabs)return i=null,e?e=e.valueOf():null===e&&(e=void 0),"string"==typeof e&&$.each(this._tabs,function(t,a){if(a.name===e)return i=a,!1}), 3 | "object"==typeof e&&$.each(this._tabs,function(t,a){if(e===a||$(a.labelObject).is(e)||$(a.wrapperObject).is(e))return i=a,!1}),i||(i=this._tabs[~~e]),!!i&&($.each(this._tabs,function(e,t){var a=t===i;$(t.wrapperObject)[a?"show":"hide"](),$(t.labelObject)[a?"addClass":"removeClass"]("active")}),t&&(a=this.activeTabSettingsName())&&TVSettings.setValue(a,i.name),this._dialog.height()+100>$(window).height()&&!i.isScrollable&&this.makeScrollable(i),$(":focus").blur(),!0)},a.prototype.makeScrollable=function(e){var t=e.wrapperObject,i=$(e.objects[0]),a=i.width();t.css({height:$(window).height()/1.4,overflow:"auto"}),i.css("width",a+20),e.isScrollable=!0},a.prototype.appendToTab=function(e,t,i,a,o,r){var n,s;$(e).is("table")&&!$(e).find("tr").size()||(this._tabs||(this._tabs=[]),$.each(this._tabs,function(e,i){if(i.name===t)return n=e,!1}),void 0===n&&(this._tabs.push({name:t,localizedName:$.t(t),objects:$(),displayPriority:0,defaultOpen:0,isButton:!!o,callback:o?r||function(){}:null}),n=this._tabs.length-1),s=this._tabs[n],s.objects=s.objects.add(e),s.displayPriority=Math.max(s.displayPriority||0,i||0),s.defaultOpen=Math.max(s.defaultOpen||0,a||0))},a.prototype.insertTabs=function(){function e(e){r&&r===e.name&&(e.defaultOpen=Math.max(~~e.defaultOpen,c.TabOpenFrom.UserSave)),(!a||~~a.defaultOpen<~~e.defaultOpen)&&(a=e),e.labelObject=$('').text(e.localizedName).appendTo(i._tabContainer),e.labelObject.bind("click",function(e){e.preventDefault(),i.switchTab(this,!0)});var t=$('
');e.wrapperObject=$().add(t),e.objects.each(function(i,a){var o=$(a);o.is("table")?(o.data("layout-separated")&&(e.wrapperObject=e.wrapperObject.add('
').add(t=$('
')),o.removeData("layout-separated")),t.append(o),o.children("tbody").each(function(i,o){if(0!==i&&$(o).data("layout-separated")){e.wrapperObject=e.wrapperObject.add('
').add(t=$('
'));var r=$(a).clone(!0,!1).appendTo(t);r.children().remove(),r.append(o),$(o).removeData("layout-separated")}})):t.append(o)}),e.wrapperObject.appendTo(i._container)}function t(e){e.labelObject=$('').text(e.localizedName).appendTo(i._tabContainer),e.labelObject.bind("click",e.callback)}var i,a,o,r;this._tabs&&(this._tabs.sort(function(e,t){return(t.displayPriority||0)-(e.displayPriority||0)}),i=this,a=null,o=this.activeTabSettingsName(),o&&(r=TVSettings.getValue(o)),$.each(this._tabs,function(i,a){a.isButton?t(a):e(a)}),this.switchTab(a))},a.prototype.activeTabSettingsName=function(){var e=this._source;if(e)return e instanceof n?"properties_dialog.active_tab.chart":e instanceof o?"properties_dialog.active_tab.drawing":e instanceof r?"properties_dialog.active_tab.study":void 0},a.prototype.show=function(e){function a(){T.hide(!0)}var u,h,b,f,y,_,g,T,m,v,P,w,S,C,D,O,k,I,x,j,N,V,L,B,z 4 | ;if(t.enabled("property_pages")&&(u=i(1077),e=e||{},h=e.onWidget||!1,TradingView.isInherited(this._source.constructor,n)&&d("GUI","Series Properties"),TradingView.isInherited(this._source.constructor,r)&&d("GUI","Study Properties"),TradingView.isInherited(this._source.constructor,s)&&this._model.setSelectedSource(this._source),b=u.createStudyStrategyPropertyPage(this._source,this._model),f=u.createInputsPropertyPage(this._source,this._model),y=u.createStylesPropertyPage(this._source,this._model),_=u.createVisibilitiesPropertyPage(this._source,this._model),g=u.createDisplayPropertyPage(this._source,this._model),f&&!f.widget().is(":empty")||y||b))return T=this,m=null!==f,v=this._source.title(),P=TVDialogs.createDialog(v,{hideTitle:!0,dragHandle:".properties-tabs"}),w=P.find("._tv-dialog-content"),S=$('
').appendTo(w),D=[],O=400,this._tabs=D,this._dialog=P,this._dialogTitle=v,this._container=w,this._tabContainer=S,this._undoCheckpointOnShow=this._model.createUndoCheckpoint(),P.on("destroy",function(e,t){var t=t||{};T._onDestroy(e,t),C&&(t.undoChanges?C.restore():C.applyTheme()),f&&f.destroy(),b&&b.destroy(),y&&y.destroy(),g&&g.destroy(),_&&_.destroy(),$("select",w).each(function(){$(this).selectbox("detach")})}),e.selectScales&&y.setScalesOpenTab&&y.setScalesOpenTab(),e.selectTmz&&y.setTmzOpenTab&&y.setTmzOpenTab(),!this._model.readOnly()&&b&&b.widget().each(function(e,t){var i,a,o=+$(t).data("layout-tab-priority");isNaN(o)&&(o=c.TabPriority.Properties),i=~~$(t).data("layout-tab-open"),a=$(t).data("layout-tab"),void 0===a&&(a=c.TabNames.properties),T.appendToTab(t,a,o,i)}),this._model.readOnly()||!m||f.widget().is(":empty")||f.widget().each(function(e,t){var a,o,r=i(1076),n=f instanceof r,s=+$(t).data("layout-tab-priority");TradingView.isNaN(s)&&(s=n?c.TabPriority.Coordinates:c.TabPriority.Inputs),a=~~$(t).data("layout-tab-open"),o=$(t).data("layout-tab"),void 0===o&&(o=n?c.TabNames.coordinates:c.TabNames.inputs),T.appendToTab(t,o,s,a)}),y&&y.widget().each(function(e,t){var a,o,r,n=+$(t).data("layout-tab-priority");TradingView.isNaN(n)&&(n=c.TabPriority.Style),a=~~$(t).data("layout-tab-open"),o=i(1195),!a&&y instanceof o&&(a=c.TabOpenFrom.Default),r=$(t).data("layout-tab"),void 0===r&&(r=c.TabNames.style),T.appendToTab(t,r,n,a)}),g&&g.widget().each(function(e,t){var i,a,o=+$(t).data("layout-tab-priority");TradingView.isNaN(o)&&(o=c.TabPriority.Display),i=~~$(t).data("layout-tab-open"),a=$(t).data("layout-tab"),void 0===a&&(a=c.TabNames.properties),T.appendToTab(t,a,o,i)}),_&&_.widget().each(function(e,t){T.appendToTab(t,c.TabNames.visibility,c.TabPriority.Display,!1)}),x=this._source instanceof r&&!!this._source.metaInfo().pine,x&&this._source.metaInfo(),this.insertTabs(),this._helpItemRequired()&&this._createHelp(),j=110,$(".js-dialog").each(function(){var e=parseInt($(this).css("z-index"),10);e>j&&(j=e)}),P.css("z-index",j),k=$('
').appendTo(w),I=$('
').appendTo(k),N=function(){ 5 | function e(t){t._childs&&t._childs.length&&$.each(t._childs,function(i,a){"percentage"===a?t.percentage.listeners().fire(t.percentage):e(t[a])})}var t=[];y&&"function"==typeof y.defaultProperties&&(t=t.concat(y.defaultProperties())),f&&"function"==typeof f.defaultProperties&&(t=t.concat(f.defaultProperties())),0===t.length&&T._source.properties?t=[T._source.properties()]:T._source._sessionsStudy&&(t=t.concat(T._source._sessionsStudy.properties())),t.length&&($.each(t,function(t,i){"chartproperties"===i._defaultName||(T._source instanceof o?T._model.restoreLineToolFactoryDefaults(T._source,"Load default drawing template"):T._source instanceof r?T._model.restoreDefaults(i):T._model.restoreFactoryDefaults(i)),T._source.calcIsActualSymbol&&T._source.calcIsActualSymbol(),e(i)}),T._source.properties().minTick&&T._source.properties().minTick.listeners().fire(T._source.properties().minTick),T._source.properties().precision&&T._source.properties().precision.listeners().fire(T._source.properties().precision),f&&f.loadData(),b&&b.loadData(),y.onResoreDefaults&&y.onResoreDefaults(),y&&y.loadData(),_&&_.loadData())},V=function(){_&&_.loadData(),f&&f.loadData()},(!h||window.is_authenticated)&&y&&"function"==typeof y.createTemplateButton&&t.enabled("linetoolpropertieswidget_template_button")?(C&&I[0].appendChild(C.domNode),y.createTemplateButton({popupZIndex:j,defaultsCallback:N,loadTemplateCallback:V}).addClass("tv-left").appendTo(I)):TradingView.isInherited(this._source.constructor,r)?(L=[{title:$.t("Reset Settings"),action:N},{title:$.t("Save As Default"),action:function(){T._source.properties().saveDefaults()}}],B=$(''+$.t("Defaults")+''),B.on("click",function(e){e.preventDefault();var t=$(this);t.is(".active")||t.trigger("button-popup",[L,!0])}).appendTo(I),p(B,null,{direction:"down",event:"button-popup",notCloseOnButtons:!0,zIndex:j})):$(''+$.t("Defaults")+"").appendTo(I).click(N),$(''+$.t("OK")+"").appendTo(I).click(function(){T.hide()}),$(''+$.t("Cancel")+"").appendTo(I).on("click",a),P.find("._tv-dialog-title a").on("click",a),$(window).bind("keyup.hidePropertyDialog",function(e){13===e.keyCode&&"textarea"!==e.target.tagName.toLowerCase()&&T.hide()}),$("select",w).each(function(){var e=$(this),t="tv-select-container dialog";e.hasClass("tv-select-container-fontsize")&&(t+=" tv-select-container-fontsize"),e.selectbox({speed:100,classHolder:t})}),$('input[type="text"]',w).addClass("tv-text-input inset dialog"),$("input.ticker",w).TVTicker(),P.css("min-width",O+"px"),TVDialogs.applyHandlers(P,e),z={top:($(window).height()-P.height())/2,left:($(window).width()-P.width())/2},y&&"function"==typeof y.dialogPosition&&(z=y.dialogPosition(z,P)||z),TVDialogs.positionDialog(P,z),window.lineToolPropertiesToolbar&&window.lineToolPropertiesToolbar.hide(),l.emit("edit_object_dialog",{ 6 | objectType:this._source===this._model.mainSeries()?"mainSeries":this._source instanceof o?"drawing":this._source instanceof r?"study":"other",scriptTitle:this._source.title()}),P},a.prototype._helpItemRequired=function(){return this._source._metaInfo&&!!this._source._metaInfo.helpURL},a.prototype._createHelp=function(){var e=$('');e.attr("href",this._source._metaInfo.helpURL),this._tabContainer.prepend(e)},e.exports=a}).call(t,i(5))}}); -------------------------------------------------------------------------------- /charting_library/static/bundles/symbol-info-dialog-impl.f3cf4493236b7285e923.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([5],{1200:function(e,t,n){"use strict";function o(e){return t=function(t){function n(e,n){var o=t.call(this,e,n)||this;return o._getWrappedComponent=function(e){o._instance=e},o}return i.__extends(n,t),n.prototype.componentDidMount=function(){this._instance.componentWillEnter&&this.context.lifecycleProvider.registerWillEnterCb(this._instance.componentWillEnter.bind(this._instance)),this._instance.componentDidEnter&&this.context.lifecycleProvider.registerDidEnterCb(this._instance.componentDidEnter.bind(this._instance)),this._instance.componentWillLeave&&this.context.lifecycleProvider.registerWillLeaveCb(this._instance.componentWillLeave.bind(this._instance)),this._instance.componentDidLeave&&this.context.lifecycleProvider.registerDidLeaveCb(this._instance.componentDidLeave.bind(this._instance))},n.prototype.render=function(){return r.createElement(e,i.__assign({},this.props,{ref:this._getWrappedComponent}),this.props.children)},n}(r.PureComponent),t.displayName="Lifecycle Consumer",t.contextTypes={lifecycleProvider:s.object},t;var t}var i,r,s,a;Object.defineProperty(t,"__esModule",{value:!0}),i=n(0),r=n(2),s=n(27),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t}(r.PureComponent),t.LifecycleConsumer=a,t.makeTransitionGroupLifecycleConsumer=o},1202:function(e,t,n){"use strict";function o(e){var t,n=e.rounded,o=void 0===n||n,a=e.shadowed,u=void 0===a||a,l=e.fullscreen,c=void 0!==l&&l,d=e.className,p=void 0===d?"":d,h=s(r.dialog,(t={},t[p]=!!p,t[r.rounded]=o,t[r.shadowed]=u,t[r.fullscreen]=c,t[r.animated]=r.animated,t)),f={bottom:e.bottom,left:e.left,maxWidth:e.width,right:e.right,top:e.top,zIndex:e.zIndex};return i.createElement("div",{className:h,ref:e.reference,style:f,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onClick:e.onClick,onKeyDown:e.onKeyDown,tabIndex:-1},e.children)}var i,r,s;Object.defineProperty(t,"__esModule",{value:!0}),i=n(2),r=n(1203),s=n(14),t.Dialog=o},1203:function(e,t){e.exports={dialog:"dialog-37P3XYj--",rounded:"rounded-2hsCfk1q-",shadowed:"shadowed-1iGQR9Xl-",fullscreen:"fullscreen-1I0OIOcc-"}},1204:function(e,t,n){"use strict";function o(e){return t=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(n,t),n.prototype.componentWillEnter=function(e){this.props.beforeOpen?this.props.beforeOpen(e):e()},n.prototype.componentDidEnter=function(){this.props.afterOpen&&this.props.afterOpen()},n.prototype.componentWillLeave=function(e){this.props.beforeClose?this.props.beforeClose(e):e()},n.prototype.componentDidLeave=function(){this.props.afterClose&&this.props.afterClose()},n.prototype.render=function(){return s.createElement(e,r.__assign({},this.props))},n}(s.PureComponent),t.displayName="OverlapLifecycle("+(e.displayName||"Component")+")",t;var t}function i(e){var t,n=l.makeTransitionGroupLifecycleProvider(c.makeTransitionGroupLifecycleConsumer(o(e)));return t=function(e){function t(t){var n=e.call(this,t)||this;return n._onZIndexUpdate=function(){ 2 | n.props.isOpened&&("parent"===n.props.root?n.forceUpdate():n._renderWindow(n.props))},n._uuid=d.guid(),n._zIndexUpdateEvent=u.EVENTS.ZindexUpdate+":"+n._uuid,n}return r.__extends(t,e),t.prototype.componentDidMount=function(){this._subscribe()},t.prototype.componentWillUnmount=function(){this._unsubscribe(),u.OverlapManager.removeWindow(this._uuid)},t.prototype.componentWillReceiveProps=function(e){"parent"!==this.props.root&&this._renderWindow(e)},t.prototype.render=function(){return"parent"===this.props.root?s.createElement(a.TransitionGroup,{component:"div"},this._createContent(this.props)):null},t.prototype._renderWindow=function(e){u.OverlapManager.renderWindow(this._uuid,this._createContent(e))},t.prototype._createContent=function(e){return e.isOpened?(u.OverlapManager.registerWindow(this._uuid),s.createElement(n,r.__assign({},e,{key:this._uuid,zIndex:u.OverlapManager.getZindex(this._uuid)}),e.children)):(u.OverlapManager.unregisterWindow(this._uuid),null)},t.prototype._subscribe=function(){u.OverlapManager.getStream().on(this._zIndexUpdateEvent,this._onZIndexUpdate)},t.prototype._unsubscribe=function(){u.OverlapManager.getStream().off(this._zIndexUpdateEvent,this._onZIndexUpdate)},t}(s.PureComponent),t.displayName="Overlapable("+(e.displayName||"Component")+")",t}var r,s,a,u,l,c,d;Object.defineProperty(t,"__esModule",{value:!0}),r=n(0),s=n(2),a=n(239),u=n(1205),l=n(1206),c=n(1200),d=n(61),t.makeOverlapable=i},1205:function(e,t,n){"use strict";function o(){d=document.createElement("div"),document.body.appendChild(d),r()}function i(e,t){p.getItems().forEach(function(n){n!==t&&f.emitEvent(e+":"+n)})}function r(e){a.render(s.createElement(u.TransitionGroup,{component:"div"},Array.from(m.values())),d,e)}var s,a,u,l,c,d,p,h,f,m;Object.defineProperty(t,"__esModule",{value:!0}),s=n(2),a=n(39),u=n(239),l=n(91),c=function(){function e(){this._storage=[]}return e.prototype.add=function(e){this._storage.push(e)},e.prototype.remove=function(e){this._storage=this._storage.filter(function(t){return e!==t})},e.prototype.getIndex=function(e){return this._storage.findIndex(function(t){return e===t})},e.prototype.toTop=function(e){this.remove(e),this.add(e)},e.prototype.has=function(e){return this._storage.includes(e)},e.prototype.getItems=function(){return this._storage},e}(),t.EVENTS={ZindexUpdate:"ZindexUpdate"},p=new c,h=150,f=new l,m=new Map,function(e){function n(e){p.has(e)||(p.add(e),i(t.EVENTS.ZindexUpdate,e))}function o(e){p.remove(e),m.delete(e)}function s(e){return p.getIndex(e)+h}function a(e,t,n){m.set(e,t),r(n)}function u(e,t){o(e),r(t)}function l(){return f}e.registerWindow=n,e.unregisterWindow=o,e.getZindex=s,e.renderWindow=a,e.removeWindow=u,e.getStream=l}(t.OverlapManager||(t.OverlapManager={})),o()},1206:function(e,t,n){"use strict";function o(e){return t=function(t){function n(e){var n=t.call(this,e)||this;return n._registerWillEnterCb=function(e){n._willEnter.push(e)},n._registerDidEnterCb=function(e){n._didEnter.push(e)},n._registerWillLeaveCb=function(e){n._willLeave.push(e)}, 3 | n._registerDidLeaveCb=function(e){n._didLeave.push(e)},n._willEnter=[],n._didEnter=[],n._willLeave=[],n._didLeave=[],n}return i.__extends(n,t),n.prototype.getChildContext=function(){return{lifecycleProvider:{registerWillEnterCb:this._registerWillEnterCb,registerDidEnterCb:this._registerDidEnterCb,registerWillLeaveCb:this._registerWillLeaveCb,registerDidLeaveCb:this._registerDidLeaveCb}}},n.prototype.componentWillEnter=function(e){var t=this._willEnter.map(function(e){return new Promise(function(t){e(t)})});Promise.all(t).then(e)},n.prototype.componentDidEnter=function(){this._didEnter.forEach(function(e){e()})},n.prototype.componentWillLeave=function(e){var t=this._willLeave.map(function(e){return new Promise(function(t){e(t)})});Promise.all(t).then(e)},n.prototype.componentDidLeave=function(){this._didLeave.forEach(function(e){e()})},n.prototype.render=function(){return r.createElement(e,i.__assign({},this.props),this.props.children)},n}(r.PureComponent),t.displayName="Lifecycle Provider",t.childContextTypes={lifecycleProvider:s.object},t;var t}var i,r,s;Object.defineProperty(t,"__esModule",{value:!0}),i=n(0),r=n(2),s=n(27),t.makeTransitionGroupLifecycleProvider=o},1207:function(e,t,n){"use strict";var o,i,r,s;Object.defineProperty(t,"__esModule",{value:!0}),o=n(1208),t.Header=o.Header,i=n(1210),t.Footer=i.Footer,r=n(1212),t.Body=r.Body,s=n(1214),t.Message=s.Message},1208:function(e,t,n){"use strict";function o(e){return i.createElement("div",{className:r.header,"data-dragg-area":!0,ref:e.reference},e.children,i.createElement(a.Icon,{className:r.close,icon:s,onClick:e.onClose}))}var i,r,s,a;Object.defineProperty(t,"__esModule",{value:!0}),i=n(2),r=n(1209),s=n(169),a=n(59),t.Header=o},1209:function(e,t){e.exports={header:"header-dpl-vtN_-",close:"close-3kPn4OTV-"}},1210:function(e,t,n){"use strict";function o(e){return i.createElement("div",{className:r.footer,ref:e.reference},e.children)}var i,r;Object.defineProperty(t,"__esModule",{value:!0}),i=n(2),r=n(1211),t.Footer=o},1211:function(e,t){e.exports={footer:"footer-2Zoji8zg-"}},1212:function(e,t,n){"use strict";function o(e){return i.createElement("div",{className:r.body,ref:e.reference},e.children)}var i,r;Object.defineProperty(t,"__esModule",{value:!0}),i=n(2),r=n(1213),t.Body=o},1213:function(e,t){e.exports={body:"body-2N-vuwQW-"}},1214:function(e,t,n){"use strict";function o(e){var t,n;return e.text?t=i.createElement("span",null,e.text):e.html&&(t=i.createElement("span",{dangerouslySetInnerHTML:{__html:e.html}})),n=r.message,e.isError&&(n+=" "+r.error),i.createElement(s.CSSTransitionGroup,{transitionName:"message",transitionEnterTimeout:u.dur,transitionLeaveTimeout:u.dur},t?i.createElement("div",{className:n,key:"0"},i.createElement(a.OutsideEvent,{mouseDown:!0,touchStart:!0,handler:e.onClickOutside},t)):null)}var i,r,s,a,u;Object.defineProperty(t,"__esModule",{value:!0}),i=n(2),r=n(1215),s=n(239),a=n(374),u=n(31),t.Message=o},1215:function(e,t){e.exports={message:"message-2o-rtQm0-",error:"error-2EW0C6z--"}},1220:function(e,t,n){"use strict" 4 | ;var o,i,r,s,a,u,l,c,d,p,h;Object.defineProperty(t,"__esModule",{value:!0}),o=n(0),i=n(2),r=n(1202),s=n(1204),a=n(1200),u=n(374),l=n(1221),c=n(1222),d=n(1223),p=n(14),h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._setDialog=function(e){e&&(t._dialog=e)},t}return o.__extends(t,e),t.prototype.render=function(){return i.createElement(u.OutsideEvent,{mouseDown:!0,touchStart:!0,handler:this.props.onClickOutside},i.createElement(r.Dialog,o.__assign({},this.props,{reference:this._setDialog,className:p(l.dialog,this.props.className)}),this.props.children))},t.prototype.componentDidMount=function(){if(this._dialog){var e=this._dialog.querySelector("[data-dragg-area]");e&&(this._drag=new c.DragHandler(this._dialog,e)),this._resize=new d.ResizeHandler(this._dialog)}},t.prototype.componentWillEnter=function(e){this._resize&&this._resize.position(),e()},t.prototype.componentWillUnmount=function(){this._drag&&this._drag.destroy(),this._resize&&this._resize.destroy()},t}(i.PureComponent),t.PopupDialog=s.makeOverlapable(a.makeTransitionGroupLifecycleConsumer(h))},1221:function(e,t){e.exports={dialog:"dialog-aQQq411q-",dragging:"dragging-3fV74VcN-"}},1222:function(e,t,n){"use strict";function o(e,t,n){return e+t>n&&(e=n-t),e<0&&(e=0),e}function i(e){return{x:e.pageX,y:e.pageY}}function r(e){return{x:e.touches[0].pageX,y:e.touches[0].pageY}}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){var n=this;this._drag=null,this._onMouseDragStart=function(e){e.preventDefault(),document.addEventListener("mousemove",n._onMouseDragMove),n._dragStart(i(e))},this._onTouchDragStart=function(e){document.addEventListener("touchmove",n._onTouchDragMove),n._dragStart(r(e))},this._onMouseDragEnd=function(e){e.preventDefault(),document.removeEventListener("mousemove",n._onMouseDragMove),n._onDragStop()},this._onTouchDragEnd=function(e){document.removeEventListener("touchmove",n._onTouchDragMove),n._onDragStop()},this._onMouseDragMove=function(e){n._dragMove(i(e))},this._onTouchDragMove=function(e){e.preventDefault(),n._dragMove(r(e))},this._onDragStop=function(){n._drag=null,n._header.classList.remove("dragging")},this._dialog=e,this._header=t,this._header.addEventListener("mousedown",this._onMouseDragStart),document.addEventListener("mouseup",this._onMouseDragEnd),this._header.addEventListener("touchstart",this._onTouchDragStart),this._header.addEventListener("touchend",this._onTouchDragEnd),document.addEventListener("mouseleave",this._onMouseDragEnd)}return e.prototype.destroy=function(){this._header.removeEventListener("mousedown",this._onMouseDragStart),document.removeEventListener("mouseup",this._onMouseDragEnd),this._header.removeEventListener("touchstart",this._onTouchDragStart),this._header.removeEventListener("touchend",this._onTouchDragEnd),document.removeEventListener("mouseleave",this._onMouseDragEnd)},e.prototype._dragStart=function(e){var t=this._dialog.getBoundingClientRect();this._drag={startX:e.x,startY:e.y,dialogX:t.left,dialogY:t.top}, 5 | this._dialog.style.left=t.left+"px",this._dialog.style.top=t.top+"px",this._header.classList.add("dragging")},e.prototype._dragMove=function(e){var t,n;this._drag&&(t=e.x-this._drag.startX,n=e.y-this._drag.startY,this._moveDialog(this._drag.dialogX+t,this._drag.dialogY+n))},e.prototype._moveDialog=function(e,t){var n=this._dialog.getBoundingClientRect();this._dialog.style.left=o(e,n.width,window.innerWidth)+"px",this._dialog.style.top=o(t,n.height,window.innerHeight)+"px"},e}();t.DragHandler=s},1223:function(e,t,n){"use strict";function o(e,t,n){return e+t>n&&(e=n-t),e<0&&(e=0),e}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e){this._onResizeThrottled=requestAnimationFrame.bind(null,this._onResize.bind(this)),this._dialog=e,this._initialHeight=e.style.height,window.addEventListener("resize",this._onResizeThrottled)}return e.prototype.position=function(){var e,t=this._dialog.getBoundingClientRect(),n=window.innerWidth/2-t.width/2;this._dialog.style.left=n+"px",e=window.innerHeight/2-t.height/2,this._dialog.style.top=e+"px"},e.prototype.destroy=function(){window.removeEventListener("resize",this._onResizeThrottled)},e.prototype._onResize=function(){var e,t=this._dialog.getBoundingClientRect(),n=o(t.left,t.width,window.innerWidth);n!==t.left&&(this._dialog.style.left=n+"px"),e=o(t.top,t.height,window.innerHeight),e!==t.top&&(this._dialog.style.top=e+"px"),this._dialog.style.height=window.innerHeight")}function u(e){return e||"-"}function l(e,t){var n,o,i,r,s=0;for(n=0;n0&&!e.fractional&&e.pricescale?(t[n].value=new w(e.pricescale/i).format(i/e.pricescale),t[n].title=$.t("Pip Size")):t[n].value=(t[n].formatter||u)(i),s++);return r=e.type&&"economic"===e.type||e.listed_exchange&&["QUANDL","BSE_EOD","NSE_EOD","LSE_EOD"].indexOf(e.listed_exchange)>=0,r&&c(t),s}function c(e){for(var t=0;tN.minutesPerDay&&(e-=N.minutesPerDay),t=e%60,n=(e-t)/60,S(n,2)+":"+S(t,2)}function p(e){return e.reduce(function(e,t){var n=d(t.alignedStart())+"-"+d(t.alignedStart()+t.length()),o=t.dayOfWeek();return e.hasOwnProperty(n)?e[n].push(o):e[n]=[o],e},{})}function h(e){return e.match(W)[0]}function f(e,t){var n=h(e),o=h(t);return T[n]>T[o]}function m(t,n,o){return void 0===o?e.weekdaysMin(n-1)+" "+t:e.weekdaysMin(n-1)+"-"+e.weekdaysMin(o-1)+" "+t}function _(e){return 1===e?7:e-1}function g(e,t,n){return n?m(e,_(t),t):m(e,t)}function v(e,t){if(t){var n=e[0];e.unshift(_(n))}}function y(e){var t=p(e);return Object.keys(t).reduce(function(e,n){var o,i=t[n].sort(),r=n.split("-"),s=N.get_minutes_from_hhmm(r[0]),a=N.get_minutes_from_hhmm(r[1]),u=s>=a;return 1===i.length?(v(i,u),e.push(m(n,i[0]))):(o=[],i.forEach(function(t,r){var s=i[r+1];s&&t===s-1?o.push(t):t!==o[o.length-1]+1?e.push(g(n,t,u)):(o.push(t),v(o,u),e.push(m(n,o[0],o[o.length-1])), 7 | o.splice(0,o.length))})),e},[]).sort(f)}var E,b=n(76),D=n(171).availableTimezones,w=n(28).PriceFormatter,x=n(61),M=n(2),C=n(39),L=n(1283).SymbolInfoDialog,O=n(411).ExchangeSession,N=n(50),S=n(28).numberToStringWithLeadingZero,P=[2,3,4,5,6,7,1].map(function(t){return e.weekdaysMin(t-1)}),W=RegExp(P.join("|")),T=P.reduce(function(e,t,n){return e[t]=n+1,e},{});t.showSymbolInfoDialog=i}).call(t,n(38),n(5))}}); -------------------------------------------------------------------------------- /charting_library/static/el-tv-chart.1c7535a2aac5ec511ed5.html: -------------------------------------------------------------------------------- 1 |
-------------------------------------------------------------------------------- /charting_library/static/da_DK-tv-chart.1c7535a2aac5ec511ed5.html: -------------------------------------------------------------------------------- 1 |
--------------------------------------------------------------------------------