%K and %D should be swapped in Stochastic RSI #1024
Blank chart when tabbing (Mac OSX) #1015 Study Template drop down error #1013 Double volume when loading study template #1012 Remove all studies breaks chart #1008 Rename Donchian Channels plot names #1006 Stochastic %K and %D should be swapped #982 Change brush tool default color #976 Send search requests with a delay #974 Unstable Version - Info indicator top right + event bubble #962 Compress language json #961 Intermittent issue loading complex charts #956 Label "closed" when market should be open #942 Pitchfork plots visibilities are not saved (unstable) #938 Unable to get 'Symbol Info ' option in chart... #936 Add more colors to the bar marks #914 custom_css_url doesn't work #912 Fibonacci retracements' custom levels not being saved #911 Volume added to mutichart layout even if not supported by a symbol #910 Marks are not requested in unstable 1.5 #909 Chart x-axis does not correctly reflect the data when market hours differ from normal #886 Position Line only visible on the top panel #880 Uncaught incorrect identifiers #871 Delete study template confirm message is not available to translate #863 Name escaped incorrectly on templates API call #855 MACD does not show all 3 lines as per the MACD theory #854 unstable: Cannot load chart with Moving Average Convergence/Divergence #853 Chart doesn't load after refreshing if saving with lock scale #852 Problem with left_toolbar disabled feature #851 XSS vulnerability in demo code #847 Delay in firing onAutoSaveNeeded #846 Loading chart with the same symbol leads to request more and more data #841 Display timezones offset #838 Fetching bars with wrong local date #837 Screenshot dialog appearing #836 Source of Moving averages + MACD #828 Unable to set some style options on studies #798 Timescale marks displayed incorrectly when zoom in/out of chart #796 Volume is recreated when scrolling chart #792 Always show the last tick on the axis #780 Snapshot dialog copy button background is not fully filled #769 True Strength Indicator only shows short length #758 Create an event for crosshair moving #735 Loading chart Layout #720 Remove symbol compare #694 Advanced settings for Moving Average #676 Limit number of studies in the chart #649 Disable timezone #647 Critical bug | Drawing Objects in the empty space in front of the chart #562 Make chart do not request external resources #421
This commit is contained in:
57
charting_library/charting_library.min.js
vendored
57
charting_library/charting_library.min.js
vendored
@@ -1,28 +1,29 @@
|
|||||||
(function(f){"function"===typeof define&&define.amd?define(["jquery"],f):f(jQuery)})(function(f){if(!f.support.cors&&f.ajaxTransport&&window.XDomainRequest){var h=/^https?:\/\//i,e=/^get|post$/i,a=new RegExp("^"+location.protocol,"i");f.ajaxTransport("* text html xml json",function(b,c,g){if(b.crossDomain&&b.async&&e.test(b.type)&&h.test(b.url)&&a.test(b.url)){var d=null;return{send:function(a,e){var g="",l=(c.dataType||"").toLowerCase();d=new XDomainRequest;/^\d+$/.test(c.timeout)&&(d.timeout=c.timeout);
|
(function(f){"function"===typeof define&&define.amd?define(["jquery"],f):f(jQuery)})(function(f){if(!f.support.cors&&f.ajaxTransport&&window.XDomainRequest){var h=/^https?:\/\//i,d=/^get|post$/i,a=new RegExp("^"+location.protocol,"i");f.ajaxTransport("* text html xml json",function(b,c,g){if(b.crossDomain&&b.async&&d.test(b.type)&&h.test(b.url)&&a.test(b.url)){var e=null;return{send:function(a,d){var g="",l=(c.dataType||"").toLowerCase();e=new XDomainRequest;/^\d+$/.test(c.timeout)&&(e.timeout=c.timeout);
|
||||||
d.ontimeout=function(){e(500,"timeout")};d.onload=function(){var a="Content-Length: "+d.responseText.length+"\r\nContent-Type: "+d.contentType,b=200,c="success",g={text:d.responseText};try{if("html"===l||/text\/html/i.test(d.contentType))g.html=d.responseText;else if("json"===l||"text"!==l&&/\/json/i.test(d.contentType))try{g.json=f.parseJSON(d.responseText)}catch(h){b=500,c="parseerror"}else if("xml"===l||"text"!==l&&/\/xml/i.test(d.contentType)){var k=new ActiveXObject("Microsoft.XMLDOM");k.async=
|
e.ontimeout=function(){d(500,"timeout")};e.onload=function(){var a="Content-Length: "+e.responseText.length+"\r\nContent-Type: "+e.contentType,b=200,c="success",g={text:e.responseText};try{if("html"===l||/text\/html/i.test(e.contentType))g.html=e.responseText;else if("json"===l||"text"!==l&&/\/json/i.test(e.contentType))try{g.json=f.parseJSON(e.responseText)}catch(h){b=500,c="parseerror"}else if("xml"===l||"text"!==l&&/\/xml/i.test(e.contentType)){var k=new ActiveXObject("Microsoft.XMLDOM");k.async=
|
||||||
!1;try{k.loadXML(d.responseText)}catch(n){k=void 0}if(!k||!k.documentElement||k.getElementsByTagName("parsererror").length)throw b=500,c="parseerror","Invalid XML: "+d.responseText;g.xml=k}}catch(m){throw m;}finally{e(b,c,g,a)}};d.onprogress=function(){};d.onerror=function(){e(500,"error",{text:d.responseText})};c.data&&(g="string"===f.type(c.data)?c.data:f.param(c.data));d.open(b.type,b.url);d.send(g)},abort:function(){d&&d.abort()}}}})}});"use strict";
|
!1;try{k.loadXML(e.responseText)}catch(n){k=void 0}if(!k||!k.documentElement||k.getElementsByTagName("parsererror").length)throw b=500,c="parseerror","Invalid XML: "+e.responseText;g.xml=k}}catch(m){throw m;}finally{d(b,c,g,a)}};e.onprogress=function(){};e.onerror=function(){d(500,"error",{text:e.responseText})};c.data&&(g="string"===f.type(c.data)?c.data:f.param(c.data));e.open(b.type,b.url);e.send(g)},abort:function(){e&&e.abort()}}}})}});"use strict";
|
||||||
function inherit(f,h){var e=function(){};e.prototype=h.prototype;f.prototype=new e;f.prototype.constructor=f;f.prototype.superclass=h}
|
function inherit(f,h){var d=function(){};d.prototype=h.prototype;f.prototype=new d;f.prototype.constructor=f;f.prototype.superclass=h}
|
||||||
(function(){function f(a){"hideSymbolSearch enabledStudies enabledDrawings disabledDrawings disabledStudies disableLogo hideSideToolbar".split(" ").map(function(b){a[b]&&console.warn("Feature `"+b+"` is obsolete. Please see the doc for details.")})}if(!window.TradingView){var h={mobile:{disabledFeatures:"left_toolbar header_widget timeframes_toolbar edit_buttons_in_legend context_menus control_bar border_around_the_chart".split(" "),enabledFeatures:["narrow_chart_enabled"]}},e={BARS:0,CANDLES:1,LINE:2,
|
(function(){function f(a){"hideSymbolSearch enabledStudies enabledDrawings disabledDrawings disabledStudies disableLogo hideSideToolbar".split(" ").map(function(b){a[b]&&console.warn("Feature `"+b+"` is obsolete. Please see the doc for details.")})}if(!window.TradingView){var h={mobile:{disabledFeatures:"left_toolbar header_widget timeframes_toolbar edit_buttons_in_legend context_menus control_bar border_around_the_chart".split(" "),enabledFeatures:["narrow_chart_enabled"]}},d={BARS:0,CANDLES:1,LINE:2,
|
||||||
AREA:3,HEIKEN_ASHI:8,HOLLOW_CANDLES:9,version:function(){return"1.4 (internal id 6adf7f18 @ 2015-12-10 20:59:31.081309)"},gEl:function(a){return document.getElementById(a)},gId:function(){return"tradingview_"+(1048576*(1+Math.random())|0).toString(16).substring(1)},onready:function(a){window.addEventListener?window.addEventListener("DOMContentLoaded",a,!1):window.attachEvent("onload",a)},css:function(a){var b=document.getElementsByTagName("head")[0],c=document.createElement("style");c.type="text/css";
|
AREA:3,HEIKEN_ASHI:8,HOLLOW_CANDLES:9,version:function(){return"1.5 (internal id cc8f8613 @ 2016-04-01 05:32:35.757118)"},gEl:function(a){return document.getElementById(a)},gId:function(){return"tradingview_"+(1048576*(1+Math.random())|0).toString(16).substring(1)},onready:function(a){window.addEventListener?window.addEventListener("DOMContentLoaded",a,!1):window.attachEvent("onload",a)},css:function(a){var b=document.getElementsByTagName("head")[0],c=document.createElement("style");c.type="text/css";
|
||||||
c.styleSheet?c.styleSheet.cssText=a:(a=document.createTextNode(a),c.appendChild(a));b.appendChild(c)},bindEvent:function(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent&&a.attachEvent("on"+b,c)},unbindEvent:function(a,b,c){a.removeEventListener?a.removeEventListener(b,c,!1):a.detachEvent&&a.detachEvent("on"+b,c)},widget:function(a){this.id=e.gId();if(!a.datafeed)throw"Datafeed is not defined";var b={width:800,height:500,symbol:"AA",interval:"D",timezone:"",container:"",path:"",
|
c.styleSheet?c.styleSheet.cssText=a:(a=document.createTextNode(a),c.appendChild(a));b.appendChild(c)},bindEvent:function(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent&&a.attachEvent("on"+b,c)},unbindEvent:function(a,b,c){a.removeEventListener?a.removeEventListener(b,c,!1):a.detachEvent&&a.detachEvent("on"+b,c)},widget:function(a){this.id=d.gId();if(!a.datafeed)throw"Datafeed is not defined";var b={width:800,height:500,symbol:"AA",interval:"D",timezone:"",container:"",path:"",
|
||||||
locale:"en",toolbar_bg:void 0,hideSymbolSearch:!1,hideSideToolbar:!1,enabledStudies:[],enabledDrawings:[],disabledDrawings:[],disabledStudies:[],drawingsAccess:void 0,studiesAccess:void 0,widgetbar:{datawindow:!1,details:!1,watchlist:!1,watchlist_settings:{default_symbols:[]}},overrides:{"mainSeriesProperties.showCountdown":!1},studiesOverrides:{},fullscreen:!1,autosize:!1,disabledFeatures:[],enabledFeatures:[],indicators_file_name:null,custom_css_url:null,debug:!1,time_frames:[{text:"5y",resolution:"W"},
|
locale:"en",toolbar_bg:void 0,hideSymbolSearch:!1,hideSideToolbar:!1,enabledStudies:[],enabledDrawings:[],disabledDrawings:[],disabledStudies:[],drawingsAccess:void 0,studiesAccess:void 0,widgetbar:{datawindow:!1,details:!1,watchlist:!1,watchlist_settings:{default_symbols:[]}},overrides:{"mainSeriesProperties.showCountdown":!1},studiesOverrides:{},fullscreen:!1,autosize:!1,disabledFeatures:[],enabledFeatures:[],indicators_file_name:null,custom_css_url:null,auto_save_delay:null,debug:!1,time_frames:[{text:"5y",
|
||||||
{text:"1y",resolution:"W"},{text:"6m",resolution:"120"},{text:"3m",resolution:"60"},{text:"1m",resolution:"30"},{text:"5d",resolution:"5"},{text:"1d",resolution:"1"}],client_id:"0",user_id:"0",charts_storage_url:void 0,charts_storage_api_version:"1.0",logo:{},favorites:{intervals:[],chartTypes:[]}},c={width:a.width,height:a.height,symbol:a.symbol,interval:a.interval,timezone:a.timezone,container:a.container_id,path:a.library_path,locale:a.locale,toolbar_bg:a.toolbar_bg,hideSymbolSearch:a.hide_symbol_search||
|
resolution:"W"},{text:"1y",resolution:"W"},{text:"6m",resolution:"120"},{text:"3m",resolution:"60"},{text:"1m",resolution:"30"},{text:"5d",resolution:"5"},{text:"1d",resolution:"1"}],client_id:"0",user_id:"0",charts_storage_url:void 0,charts_storage_api_version:"1.0",logo:{},favorites:{intervals:[],chartTypes:[]},rss_news_feed:null},c={width:a.width,height:a.height,symbol:a.symbol,interval:a.interval,timezone:a.timezone,container:a.container_id,path:a.library_path,locale:a.locale,toolbar_bg:a.toolbar_bg,
|
||||||
a.hideSymbolSearch,hideSideToolbar:a.hide_side_toolbar,enabledStudies:a.enabled_studies,disabledStudies:a.disabled_studies,enabledDrawings:a.enabled_drawings,disabledDrawings:a.disabled_drawings,drawingsAccess:a.drawings_access,studiesAccess:a.studies_access,widgetbar:a.widgetbar,overrides:a.overrides,studiesOverrides:a.studies_overrides,savedData:a.saved_data||a.savedData,snapshotUrl:a.snapshot_url,uid:this.id,datafeed:a.datafeed,disableLogo:a.disable_logo||a.disableLogo,logo:a.logo,autosize:a.autosize,
|
hideSymbolSearch:a.hide_symbol_search||a.hideSymbolSearch,hideSideToolbar:a.hide_side_toolbar,enabledStudies:a.enabled_studies,disabledStudies:a.disabled_studies,enabledDrawings:a.enabled_drawings,disabledDrawings:a.disabled_drawings,drawingsAccess:a.drawings_access,studiesAccess:a.studies_access,widgetbar:a.widgetbar,overrides:a.overrides,studiesOverrides:a.studies_overrides,savedData:a.saved_data||a.savedData,snapshotUrl:a.snapshot_url,uid:this.id,datafeed:a.datafeed,tradingController:a.trading_controller,
|
||||||
fullscreen:a.fullscreen,disabledFeatures:a.disabled_features,enabledFeatures:a.enabled_features,indicators_file_name:a.indicators_file_name,custom_css_url:a.custom_css_url,debug:a.debug,client_id:a.client_id,user_id:a.user_id,charts_storage_url:a.charts_storage_url,charts_storage_api_version:a.charts_storage_api_version,favorites:a.favorites,numeric_formatting:a.numeric_formatting};f(c);this.options=$.extend(!0,b,c);this.options.time_frames=a.time_frames||b.time_frames;a.preset&&(a=a.preset,h[a]?
|
disableLogo:a.disable_logo||a.disableLogo,logo:a.logo,autosize:a.autosize,fullscreen:a.fullscreen,disabledFeatures:a.disabled_features,enabledFeatures:a.enabled_features,indicators_file_name:a.indicators_file_name,custom_css_url:a.custom_css_url,auto_save_delay:a.auto_save_delay,debug:a.debug,client_id:a.client_id,user_id:a.user_id,charts_storage_url:a.charts_storage_url,charts_storage_api_version:a.charts_storage_api_version,favorites:a.favorites,numeric_formatting:a.numeric_formatting,rss_news_feed:a.rss_news_feed,
|
||||||
(a=h[a],this.options.disabledFeatures=0<this.options.disabledFeatures.length?this.options.disabledFeatures.concat(a.disabledFeatures):a.disabledFeatures,this.options.enabledFeatures=0<this.options.enabledFeatures.length?this.options.enabledFeatures.concat(a.enabledFeatures):a.enabledFeatures):console.warn("Unknown preset: `"+a+"`"));this._ready_handlers=[];this.create()}};e.widget.prototype={_innerWindow:function(){return e.gEl(this.id).contentWindow},_autoResizeChart:function(){this.options.fullscreen&&
|
studyCountLimit:a.study_count_limit,symbolSearchRequestDelay:a.symbol_search_request_delay};f(c);this.options=$.extend(!0,b,c);this.options.time_frames=a.time_frames||b.time_frames;a.preset&&(a=a.preset,h[a]?(a=h[a],this.options.disabledFeatures=0<this.options.disabledFeatures.length?this.options.disabledFeatures.concat(a.disabledFeatures):a.disabledFeatures,this.options.enabledFeatures=0<this.options.enabledFeatures.length?this.options.enabledFeatures.concat(a.enabledFeatures):a.enabledFeatures):
|
||||||
$(e.gEl(this.id)).css("height",$(window).height()+"px")},create:function(){function a(a){g.load(JSON.parse(a.content),a)}function b(){e.gEl(g.id).contentWindow.Q16.subscribe("chart_load_requested",a)}var c=this.render(),g=this,d;if(this.options.container){var f=e.gEl(this.options.container);f.innerHTML=c}else document.write(c);if(this.options.autosize||this.options.fullscreen)f=$(e.gEl(this.id)),f.css("width","100%"),this.options.fullscreen||f.css("height","100%");this._autoResizeChart();
|
console.warn("Unknown preset: `"+a+"`"));this._ready_handlers=[];this.create()}};d.widget.prototype={_innerWindow:function(){return d.gEl(this.id).contentWindow},_autoResizeChart:function(){this.options.fullscreen&&$(d.gEl(this.id)).css("height",$(window).height()+"px")},create:function(){function a(a){g.load(JSON.parse(a.content),a)}function b(){d.gEl(g.id).contentWindow.Q15.subscribe("chart_load_requested",a)}var c=this.render(),g=this,e;if(this.options.container){var f=
|
||||||
this._onWindowResize=function(a){g._autoResizeChart()};window.addEventListener("resize",this._onWindowResize);this.unsubscribeFromLoadRequestEvent=function(){e.gEl(g.id).contentWindow.Q16.unsubscribe("chart_load_requested",a)};d=e.gEl(this.id);var h=null,h=function(){e.unbindEvent(d,"load",h);d.contentWindow.widgetReady(function(){var a;g._ready=!0;for(a=g._ready_handlers.length;a--;)g._ready_handlers[a].call(g);d.contentWindow._initializationFinished();var c=e.gEl(g.id).contentWindow;
|
d.gEl(this.options.container);f.innerHTML=c}else document.write(c);if(this.options.autosize||this.options.fullscreen)f=$(d.gEl(this.id)),f.css("width","100%"),this.options.fullscreen||f.css("height","100%");this._autoResizeChart();this._onWindowResize=function(a){g._autoResizeChart()};window.addEventListener("resize",this._onWindowResize);this.unsubscribeFromLoadRequestEvent=function(){d.gEl(g.id).contentWindow.Q15.unsubscribe("chart_load_requested",a)};e=d.gEl(this.id);
|
||||||
if(c.Q16)b();else{var f=null,f=function(){b();e.unbindEvent(c,"load",f)};e.bindEvent(c,"load",f)}})};e.bindEvent(d,"load",h)},render:function(){window[this.options.uid]={datafeed:this.options.datafeed,overrides:this.options.overrides,studiesOverrides:this.options.studiesOverrides,disabledFeatures:this.options.disabledFeatures,enabledFeatures:this.options.enabledFeatures,enabledDrawings:this.options.enabledDrawings,disabledDrawings:this.options.disabledDrawings,favorites:this.options.favorites,
|
var h=null,h=function(){d.unbindEvent(e,"load",h);e.contentWindow.widgetReady(function(){var a;g._ready=!0;for(a=g._ready_handlers.length;a--;)g._ready_handlers[a].call(g);e.contentWindow._initializationFinished();var c=d.gEl(g.id).contentWindow;if(c.Q15)b();else{var f=null,f=function(){b();d.unbindEvent(c,"load",f)};d.bindEvent(c,"load",f)}})};d.bindEvent(e,"load",h)},render:function(){window[this.options.uid]={datafeed:this.options.datafeed,tradingController:this.options.tradingController,
|
||||||
logo:this.options.logo,numeric_formatting:this.options.numeric_formatting};this.options.savedData&&(window[this.options.uid].chartContent={json:this.options.savedData});var a=(this.options.path||"")+"static/tv-chart.html#localserver=1&symbol="+encodeURIComponent(this.options.symbol)+"&interval="+encodeURIComponent(this.options.interval)+(this.options.toolbar_bg?"&toolbarbg="+this.options.toolbar_bg.replace("#",""):"")+"&hideSymbolSearch="+this.options.hideSymbolSearch+"&hideSideToolbar="+this.options.hideSideToolbar+
|
overrides:this.options.overrides,studiesOverrides:this.options.studiesOverrides,disabledFeatures:this.options.disabledFeatures,enabledFeatures:this.options.enabledFeatures,enabledDrawings:this.options.enabledDrawings,disabledDrawings:this.options.disabledDrawings,favorites:this.options.favorites,logo:this.options.logo,numeric_formatting:this.options.numeric_formatting,rss_news_feed:this.options.rss_news_feed};this.options.savedData&&(window[this.options.uid].chartContent={json:this.options.savedData});
|
||||||
"&enabledStudies="+encodeURIComponent(JSON.stringify(this.options.enabledStudies))+"&disabledStudies="+encodeURIComponent(JSON.stringify(this.options.disabledStudies))+(this.options.studiesAccess?"&studiesAccess="+encodeURIComponent(JSON.stringify(this.options.studiesAccess)):"")+"&widgetbar="+encodeURIComponent(JSON.stringify(this.options.widgetbar))+(this.options.drawingsAccess?"&drawingsAccess="+encodeURIComponent(JSON.stringify(this.options.drawingsAccess)):"")+"&timeFrames="+encodeURIComponent(JSON.stringify(this.options.time_frames))+
|
var a=(this.options.path||"")+"static/tv-chart.html#localserver=1&symbol="+encodeURIComponent(this.options.symbol)+"&interval="+encodeURIComponent(this.options.interval)+(this.options.toolbar_bg?"&toolbarbg="+this.options.toolbar_bg.replace("#",""):"")+"&hideSymbolSearch="+this.options.hideSymbolSearch+"&hideSideToolbar="+this.options.hideSideToolbar+"&enabledStudies="+encodeURIComponent(JSON.stringify(this.options.enabledStudies))+"&disabledStudies="+encodeURIComponent(JSON.stringify(this.options.disabledStudies))+
|
||||||
(this.options.hasOwnProperty("disableLogo")?"&disableLogo="+encodeURIComponent(this.options.disableLogo):"")+"&locale="+encodeURIComponent(this.options.locale)+"&uid="+encodeURIComponent(this.options.uid)+"&clientId="+encodeURIComponent(this.options.client_id)+"&userId="+encodeURIComponent(this.options.user_id)+(this.options.charts_storage_url?"&chartsStorageUrl="+encodeURIComponent(this.options.charts_storage_url):"")+(this.options.charts_storage_api_version?"&chartsStorageVer="+encodeURIComponent(this.options.charts_storage_api_version):
|
(this.options.studiesAccess?"&studiesAccess="+encodeURIComponent(JSON.stringify(this.options.studiesAccess)):"")+"&widgetbar="+encodeURIComponent(JSON.stringify(this.options.widgetbar))+(this.options.drawingsAccess?"&drawingsAccess="+encodeURIComponent(JSON.stringify(this.options.drawingsAccess)):"")+"&timeFrames="+encodeURIComponent(JSON.stringify(this.options.time_frames))+(this.options.hasOwnProperty("disableLogo")?"&disableLogo="+encodeURIComponent(this.options.disableLogo):"")+"&locale="+encodeURIComponent(this.options.locale)+
|
||||||
"")+(this.options.indicators_file_name?"&indicatorsFile="+encodeURIComponent(this.options.indicators_file_name):"")+(this.options.custom_css_url?"&customCSS="+encodeURIComponent(this.options.custom_css_url):"")+"&debug="+this.options.debug+(this.options.snapshotUrl?"&snapshotUrl="+encodeURIComponent(this.options.snapshotUrl):"")+(this.options.timezone?"&timezone="+encodeURIComponent(this.options.timezone):"");return'<iframe id="'+this.id+'" name="'+this.id+'" src="'+a+'"'+(this.options.autosize||
|
"&uid="+encodeURIComponent(this.options.uid)+"&clientId="+encodeURIComponent(this.options.client_id)+"&userId="+encodeURIComponent(this.options.user_id)+(this.options.charts_storage_url?"&chartsStorageUrl="+encodeURIComponent(this.options.charts_storage_url):"")+(this.options.charts_storage_api_version?"&chartsStorageVer="+encodeURIComponent(this.options.charts_storage_api_version):"")+(this.options.indicators_file_name?"&indicatorsFile="+encodeURIComponent(this.options.indicators_file_name):"")+
|
||||||
this.options.fullscreen?"":' width="'+this.options.width+'" height="'+this.options.height+'"')+' frameborder="0" allowTransparency="true" scrolling="no" allowfullscreen style="display:block;"></iframe>'},onChartReady:function(a){this._ready?a.call(this):this._ready_handlers.push(a)},setSymbol:function(a,b,c){this._innerWindow().changeSymbol(a,b+"",c)},executeAction:function(a){this._innerWindow().executeAction(a)},executeActionById:function(a){this._innerWindow().executeActionById(a)},removeAllStudies:function(){this._innerWindow().removeAllStudies()},
|
(this.options.custom_css_url?"&customCSS="+encodeURIComponent(this.options.custom_css_url):"")+(this.options.auto_save_delay?"&autoSaveDelay="+encodeURIComponent(this.options.auto_save_delay):"")+"&debug="+this.options.debug+(this.options.snapshotUrl?"&snapshotUrl="+encodeURIComponent(this.options.snapshotUrl):"")+(this.options.timezone?"&timezone="+encodeURIComponent(this.options.timezone):"")+(this.options.studyCountLimit?"&studyCountLimit="+encodeURIComponent(this.options.studyCountLimit):"")+
|
||||||
removeAllShapes:function(){this._innerWindow().removeAllShapes()},createStudy:function(a,b,c,e,d,f){this._innerWindow().createStudy({name:a,lock:c,forceOverlay:b,inputs:e,callback:d,overrides:f})},removeEntity:function(a){this._innerWindow().removeEntity(a)},createShape:function(a,b,c){return this._innerWindow().createShape({point:a,options:b,callback:c})},createMultipointShape:function(a,b,c){return this._innerWindow().createMultipointShape({points:a,options:b,callback:c})},createVerticalLine:function(a,
|
(this.options.symbolSearchRequestDelay?"&ssreqdelay="+encodeURIComponent(this.options.symbolSearchRequestDelay):"");return'<iframe id="'+this.id+'" name="'+this.id+'" src="'+a+'"'+(this.options.autosize||this.options.fullscreen?"":' width="'+this.options.width+'" height="'+this.options.height+'"')+' frameborder="0" allowTransparency="true" scrolling="no" allowfullscreen style="display:block;"></iframe>'},onChartReady:function(a){this._ready?a.call(this):this._ready_handlers.push(a)},setSymbol:function(a,
|
||||||
b){this.createShape(a,$.extend(b,{shape:"vertical_line"}))},createOrderLine:function(a){a=a||{};return this._innerWindow().createTradingPrimitive("LineToolOrder",a.disableUndo)},createPositionLine:function(a){a=a||{};return this._innerWindow().createTradingPrimitive("LineToolPosition",a.disableUndo)},createExecutionShape:function(a){a=a||{};return this._innerWindow().createTradingPrimitive("LineToolExecution",a.disableUndo)},_widgetResizeTimer:null,createButton:function(a){var b=this;a=a||{};var c=
|
b,c){this._innerWindow().changeSymbol(a,b+"",c)},layout:function(){return this._innerWindow().layout()},setLayout:function(a){return this._innerWindow().setLayout(a)},chartsCount:function(a){return this._innerWindow().chartsCount(a)},chart:function(a){return this._innerWindow().chart(a)},activeChart:function(){return this._innerWindow().activeChart()},_widgetResizeTimer:null,createButton:function(a){var b=this;a=a||{};var c=a.align||"left";a=this._innerWindow().headerWidget;c="left"==c?a._$left:a._$right;
|
||||||
a.align||"left";a=this._innerWindow().headerWidget;c="left"==c?a._$left:a._$right;a=a.createGroup({single:!0}).appendTo(c);a=$('<div class="button"></div>').appendTo(a);this._widgetResizeTimer&&clearTimeout(this._widgetResizeTimer);this._widgetResizeTimer=setTimeout(function(){b._innerWindow().resizeWindow();clearTimeout(b._widgetResizeTimer)},5);return a},symbolInterval:function(a){var b=this._innerWindow().getSymbolInterval();a&&a(b);return b},onSymbolChange:function(a){this._innerWindow().setCallback("onSymbolChange",
|
a=a.createGroup({single:!0}).appendTo(c);a=$('<div class="button"></div>').appendTo(a);this._widgetResizeTimer&&clearTimeout(this._widgetResizeTimer);this._widgetResizeTimer=setTimeout(function(){b._innerWindow().resizeWindow();clearTimeout(b._widgetResizeTimer)},5);return a},symbolInterval:function(a){var b=this._innerWindow().getSymbolInterval();a&&a(b);return b},onSymbolChange:function(a){this._innerWindow().setCallback("onSymbolChange",a)},onIntervalChange:function(a){this._innerWindow().setCallback("onIntervalChange",
|
||||||
a)},onIntervalChange:function(a){this._innerWindow().setCallback("onIntervalChange",a)},onTick:function(a){this._innerWindow().setCallback("onTick",a)},remove:function(){window.removeEventListener("resize",this._onWindowResize);delete window[this.options.uid];var a=e.gEl(this.id);a.contentWindow.destroyChart();this.unsubscribeFromLoadRequestEvent();a.parentNode.removeChild(a)},getVisibleRange:function(a){var b=this._innerWindow().getVisibleRange();a&&a(b);return b},setVisibleRange:function(a,b){this._innerWindow().setVisibleRange(a,
|
a)},onTick:function(a){this._innerWindow().setCallback("onTick",a)},remove:function(){window.removeEventListener("resize",this._onWindowResize);delete window[this.options.uid];var a=d.gEl(this.id);a.contentWindow.destroyChart();this.unsubscribeFromLoadRequestEvent();a.parentNode.removeChild(a)},getVisibleRange:function(a){var b=this.activeChart().getVisibleRange();a&&a(b);return b},onAutoSaveNeeded:function(a){this._innerWindow().setCallback("onAutoSaveNeeded",a)},onMarkClick:function(a){this._innerWindow().setCallback("onMarkClick",
|
||||||
b)},onAutoSaveNeeded:function(a){this._innerWindow().setCallback("onAutoSaveNeeded",a)},onMarkClick:function(a){this._innerWindow().setCallback("onMarkClick",a)},onBarMarkClicked:function(a){this._innerWindow().setCallback("onMarkClick",a)},onTimescaleMarkClicked:function(a){this._innerWindow().setCallback("onTimescaleMarkClick",a)},subscribe:function(a,b){this._innerWindow().setCallback(a,b)},onScreenshotReady:function(a){this._innerWindow().setCallback("onScreenshotReady",a)},onContextMenu:function(a){this._innerWindow().Q16.subscribe("onContextMenu",
|
a)},onBarMarkClicked:function(a){this._innerWindow().setCallback("onMarkClick",a)},onTimescaleMarkClicked:function(a){this._innerWindow().setCallback("onTimescaleMarkClick",a)},subscribe:function(a,b){this._innerWindow().setCallback(a,b)},onScreenshotReady:function(a){this._innerWindow().setCallback("onScreenshotReady",a)},onContextMenu:function(a){this._innerWindow().Q15.subscribe("onContextMenu",function(b){b.callback(a(b.unixtime,b.price))})},onShortcut:function(a,b){this._innerWindow().createShortcutAction(a,
|
||||||
function(b){b.callback(a(b.unixtime,b.price))})},onShortcut:function(a,b){this._innerWindow().createShortcutAction(a,b)},onGrayedObjectClicked:function(a){this._innerWindow().Q16.subscribe("onGrayedObjectClicked",a)},refreshMarks:function(){this._innerWindow().refreshMarks()},closePopupsAndDialogs:function(){this._innerWindow().closePopupsAndDialogs()},clearMarks:function(){this._innerWindow().clearMarks()},setChartType:function(a){this._innerWindow().setChartType(a)},
|
b)},onGrayedObjectClicked:function(a){this._innerWindow().Q15.subscribe("onGrayedObjectClicked",a)},closePopupsAndDialogs:function(){this._innerWindow().closePopupsAndDialogs()},applyOverrides:function(a){this.options=$.extend(!0,this.options,{overrides:a});this._innerWindow().applyOverrides(a)},createStudyTemplate:function(a,b){var c=this.activeChart().createStudyTemplate(a);b&&b(c);return c},addCustomCSSFile:function(a){this._innerWindow().addCustomCSSFile(a)},save:function(a){this._innerWindow().saveChart(a)},
|
||||||
createStudyTemplate:function(a,b){var c=this._innerWindow().createStudyTemplate(a);b&&b(c);return c},applyStudyTemplate:function(a){this._innerWindow().applyStudyTemplate(a)},addCustomCSSFile:function(a){this._innerWindow().addCustomCSSFile(a)},save:function(a){this._innerWindow().saveChart(a)},load:function(a,b){this._innerWindow().loadChart({json:a,extendedData:b})},setLanguage:function(a){this.remove();this.options.locale=a;this.create()}};window.TradingView&&jQuery?jQuery.extend(window.TradingView,
|
load:function(a,b){this._innerWindow().loadChart({json:a,extendedData:b})},setLanguage:function(a){this.remove();this.options.locale=a;this.create()},isFloatingTradingPanelVisible:function(){return this._innerWindow().isFloatingTradingPanelVisible()},toggleFloatingTradingPanel:function(){this._innerWindow().toggleFloatingTradingPanel()},isBottomTradingPanelVisible:function(){return this._innerWindow().isBottomTradingPanelVisible()},toggleBottomTradingPanel:function(){this._innerWindow().toggleBottomTradingPanel()},
|
||||||
e):window.TradingView=e}})();
|
showSampleOrderDialog:function(a){return this._innerWindow().showSampleOrderDialog(a)},showSamplePositionDialog:function(a){return this._innerWindow().showSamplePositionDialog(a)},showSampleClosePositionDialog:function(a){return this._innerWindow().showSampleClosePositionDialog(a)},showSampleReversePositionDialog:function(a){return this._innerWindow().showSampleReversePositionDialog(a)},mainSeriesPriceFormatter:function(){return this._innerWindow().mainSeriesPriceFormatter()}};"applyStudyTemplate setChartType clearMarks refreshMarks setVisibleRange createOrderLine createPositionLine createExecutionShape createVerticalLine createMultipointShape createShape removeEntity createStudy removeAllShapes removeAllStudies executeActionById executeAction".split(" ").forEach(function(a){d.widget.prototype[a]=
|
||||||
|
function(){console.warn("Method `"+a+"` is obsolete. Please use `chart()."+a+"` instead.");return this.activeChart()[a].apply(this.activeChart(),arguments)}});window.TradingView&&jQuery?jQuery.extend(window.TradingView,d):window.TradingView=d}})();
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
|||||||
|
!function(e){function t(a){if(n[a])return n[a].exports;var c=n[a]={exports:{},id:a,loaded:!1};return e[a].call(c.exports,c,c.exports,t),c.loaded=!0,c.exports}var a=window.webpackJsonp;window.webpackJsonp=function(r,o){for(var i,s,l=0,p=[];l<r.length;l++)s=r[l],c[s]&&p.push.apply(p,c[s]),c[s]=0;for(i in o){var f=o[i];switch(typeof f){case"object":e[i]=function(t){var a=t.slice(1),n=t[0];return function(t,c,r){e[n].apply(this,[t,c,r].concat(a))}}(f);break;case"function":e[i]=f;break;default:e[i]=e[f]}}for(a&&a(r,o);p.length;)p.shift().call(null,t);return o[0]?(n[0]=0,t(0)):void 0};var n={},c={4:0};t.e=function(e,a){if(0===c[e])return a.call(null,t);if(void 0!==c[e])c[e].push(a);else{c[e]=[a];var n=document.getElementsByTagName("head")[0],r=document.createElement("script");r.type="text/javascript",r.charset="utf-8",r.async=!0,r.src=t.p+""+({0:"library",3:"vendors"}[e]||e)+"."+{0:"17acb93c64b76e7a15ec",1:"582da139b296ac74d66e",2:"351f06db7c9bd8e2a0f1",3:"0ecbebb1e373a92bb4fa"}[e]+".js",n.appendChild(r)}},t.m=e,t.c=n,t.p="bundles/"}(function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(typeof e[t]){case"function":break;case"object":e[t]=function(t){var a=t.slice(1),n=e[t[0]];return function(e,t,c){n.apply(this,[e,t,c].concat(a))}}(e[t]);break;default:e[t]=e[e[t]]}return e}([]));
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 27 KiB |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,3 +1 @@
|
|||||||
{
|
{"test string": "test string1"}
|
||||||
"test string" : "test string1"
|
|
||||||
}
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
18
test.html
18
test.html
@@ -263,7 +263,7 @@
|
|||||||
})
|
})
|
||||||
.append($('<span>get range</span>'));
|
.append($('<span>get range</span>'));
|
||||||
|
|
||||||
var position = widget.createPositionLine()
|
var position = widget.chart().createPositionLine()
|
||||||
.onReverse(function(text) {
|
.onReverse(function(text) {
|
||||||
console.log("Position reverse event");
|
console.log("Position reverse event");
|
||||||
})
|
})
|
||||||
@@ -275,7 +275,7 @@
|
|||||||
.setLineLength(3);
|
.setLineLength(3);
|
||||||
position.setPrice(position.getPrice() - 2);
|
position.setPrice(position.getPrice() - 2);
|
||||||
|
|
||||||
var order = widget.createOrderLine()
|
var order = widget.chart().createOrderLine()
|
||||||
.onMove(function() {
|
.onMove(function() {
|
||||||
console.log("Order moved event");
|
console.log("Order moved event");
|
||||||
})
|
})
|
||||||
@@ -287,7 +287,7 @@
|
|||||||
.setQuantity("2");
|
.setQuantity("2");
|
||||||
order.setPrice(order.getPrice() - 2.5);
|
order.setPrice(order.getPrice() - 2.5);
|
||||||
|
|
||||||
widget.createExecutionShape()
|
widget.chart().createExecutionShape()
|
||||||
.setText("@1,320.75 Limit Buy 1")
|
.setText("@1,320.75 Limit Buy 1")
|
||||||
.setTextColor("rgba(255,0,0,0.5)")
|
.setTextColor("rgba(255,0,0,0.5)")
|
||||||
.setArrowSpacing(25)
|
.setArrowSpacing(25)
|
||||||
@@ -302,7 +302,7 @@
|
|||||||
// draw some simple technical analysis figures using drawings to show how it works
|
// draw some simple technical analysis figures using drawings to show how it works
|
||||||
getMinAndMaxPrice(udf_datafeed, fourMonthAgo, today,
|
getMinAndMaxPrice(udf_datafeed, fourMonthAgo, today,
|
||||||
function(minPrice, maxPrice, minPriceTime, maxPriceTime) {
|
function(minPrice, maxPrice, minPriceTime, maxPriceTime) {
|
||||||
widget.createMultipointShape(
|
widget.chart().createMultipointShape(
|
||||||
[{time:fourMonthAgo, price: minPrice}, {time:today, price: minPrice}],
|
[{time:fourMonthAgo, price: minPrice}, {time:today, price: minPrice}],
|
||||||
{
|
{
|
||||||
shape: "trend_line",
|
shape: "trend_line",
|
||||||
@@ -318,7 +318,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
widget.createShape({time: Math.floor((fourMonthAgo + today) / 2), price: minPrice},
|
widget.chart().createShape({time: Math.floor((fourMonthAgo + today) / 2), price: minPrice},
|
||||||
{
|
{
|
||||||
shape: "text",
|
shape: "text",
|
||||||
lock: true,
|
lock: true,
|
||||||
@@ -328,7 +328,7 @@
|
|||||||
text: "3 month low at " + minPrice,
|
text: "3 month low at " + minPrice,
|
||||||
overrides: { color: "#00FF00" }
|
overrides: { color: "#00FF00" }
|
||||||
});
|
});
|
||||||
widget.createMultipointShape(
|
widget.chart().createMultipointShape(
|
||||||
[{time:fourMonthAgo, price: maxPrice}, {time:today, price: maxPrice}],
|
[{time:fourMonthAgo, price: maxPrice}, {time:today, price: maxPrice}],
|
||||||
{
|
{
|
||||||
shape: "trend_line",
|
shape: "trend_line",
|
||||||
@@ -344,7 +344,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
widget.createShape({time: Math.floor((fourMonthAgo + today) / 2), price: maxPrice},
|
widget.chart().createShape({time: Math.floor((fourMonthAgo + today) / 2), price: maxPrice},
|
||||||
{
|
{
|
||||||
shape: "text",
|
shape: "text",
|
||||||
lock: true,
|
lock: true,
|
||||||
@@ -354,7 +354,7 @@
|
|||||||
text: "3 month high at " + maxPrice,
|
text: "3 month high at " + maxPrice,
|
||||||
overrides: { color: "#FF0000" }
|
overrides: { color: "#FF0000" }
|
||||||
});
|
});
|
||||||
widget.createMultipointShape(
|
widget.chart().createMultipointShape(
|
||||||
[{time:maxPriceTime, price: maxPrice}, {time:minPriceTime, price: minPrice}],
|
[{time:maxPriceTime, price: maxPrice}, {time:minPriceTime, price: minPrice}],
|
||||||
{
|
{
|
||||||
shape: "trend_line",
|
shape: "trend_line",
|
||||||
@@ -369,7 +369,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
widget.createMultipointShape(
|
widget.chart().createMultipointShape(
|
||||||
[{time: Math.floor((maxPriceTime + minPriceTime) / 2), price: (maxPrice + minPrice) / 2},
|
[{time: Math.floor((maxPriceTime + minPriceTime) / 2), price: (maxPrice + minPrice) / 2},
|
||||||
{time: Math.floor((maxPriceTime + minPriceTime) / 2) + 5 * 24 * 60 * 60, price: (maxPrice + minPrice) / 2 * 1.1}],
|
{time: Math.floor((maxPriceTime + minPriceTime) / 2) + 5 * 24 * 60 * 60, price: (maxPrice + minPrice) / 2 * 1.1}],
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user