(function(){var a=function(){};"undefined"===typeof window.console&&(window.console={});for(var b=window.console,c="dir log time info warn count clear debug error group trace assert dirxml profile timeEnd groupEnd profileEnd timeStamp exception table notifyFirebug groupCollapsed getFirebugElement firebug userObjects".split(" "),d=0,e=c.length;de;e+=2)c||(d-=parseFloat(r.css(a,"padding"+na[e]))||0),d="margin"===c?d+(parseFloat(r.css(a,c+na[e]))||0):d-(parseFloat(r.css(a,"border"+na[e]+"Width"))||0);return d+"px"}d=ja(a,b);if(0>d||null==d)d=a.style[b];if(ya.test(d))return d;d=parseFloat(d)||0;if(c)for(;4>e;e+=2)d+=parseFloat(r.css(a,"padding"+na[e]))||0,"padding"!==c&&(d+=parseFloat(r.css(a,"border"+na[e]+"Width"))||0),"margin"===c&&(d+=parseFloat(r.css(a,c+na[e]))||0);return d+"px"}function v(a){return function(b,c){"string"!== typeof b&&(c=b,b="*");if(r.isFunction(c))for(var d=b.toLowerCase().split(jb),e=0,f=d.length,g,h;e").appendTo(b),d=c.css("display");c.remove();if("none"===d||""===d)ka||(ka=G.createElement("iframe"),ka.frameBorder=ka.width=ka.height=0),b.appendChild(ka),wa&&ka.createElement||(wa=(ka.contentWindow||ka.contentDocument).document,wa.write((r.support.boxModel?"":"")+""),wa.close()),c=wa.createElement(a),wa.body.appendChild(c),d=r.css(c,"display"),b.removeChild(ka);ab[a]=d}return ab[a]}function J(a){return r.isWindow(a)?a: 9===a.nodeType?a.defaultView||a.parentWindow:!1}var G=a.document,K=a.navigator,L=a.location,r=function(){function c(){if(!d.isReady){try{G.documentElement.doScroll("left")}catch(a){setTimeout(c,1);return}d.ready()}}var d=function(a,b){return new d.fn.init(a,b,g)},e=a.jQuery,f=a.$,g,h=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,k=/\S/,l=/^\s+/,m=/\s+$/,r=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,q=/^[\],:{}\s]*$/,n=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,v=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, u=/(?:^|:|,)(?:\s*\[)+/g,z=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,w=/(msie) ([\w.]+)/,C=/(mozilla)(?:.*? rv:([\w.]+))?/,A=/-([a-z]|[0-9])/ig,B=/^-ms-/,W=function(a,b){return(b+"").toUpperCase()},E=K.userAgent,F,D,M=Object.prototype.toString,T=Object.prototype.hasOwnProperty,I=Array.prototype.push,S=Array.prototype.slice,L=String.prototype.trim,J=Array.prototype.indexOf,Y={};d.fn=d.prototype={constructor:d,init:function(a,c,e){var f;if(!a)return this;if(a.nodeType)return this.context= this[0]=a,this.length=1,this;if("body"===a&&!c&&G.body)return this.context=G,this[0]=G.body,this.selector=a,this.length=1,this;if("string"===typeof a){f="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&3<=a.length?[null,a,null]:h.exec(a);if(!f||!f[1]&&c)return!c||c.jquery?(c||e).find(a):this.constructor(c).find(a);if(f[1])return e=(c=c instanceof d?c[0]:c)?c.ownerDocument||c:G,(a=r.exec(a))?d.isPlainObject(c)?(a=[G.createElement(a[1])],d.fn.attr.call(a,c,!0)):a=[e.createElement(a[1])]:(a=d.buildFragment([f[1]], [e]),a=(a.cacheable?d.clone(a.fragment):a.fragment).childNodes),d.merge(this,a);if((c=G.getElementById(f[2]))&&c.parentNode){if(c.id!==f[2])return e.find(a);this.length=1;this[0]=c}this.context=G;this.selector=a;return this}if(d.isFunction(a))return e.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return d.makeArray(a,this)},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return S.call(this,0)},get:function(a){return null==a?this.toArray(): 0>a?this[this.length+a]:this[a]},pushStack:function(a,b,c){var e=this.constructor();d.isArray(a)?I.apply(e,a):d.merge(e,a);e.prevObject=this;e.context=this.context;"find"===b?e.selector=this.selector+(this.selector?" ":"")+c:b&&(e.selector=this.selector+"."+b+"("+c+")");return e},each:function(a,b){return d.each(this,a,b)},ready:function(a){d.bindReady();F.add(a);return this},eq:function(a){a=+a;return-1===a?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)}, slice:function(){return this.pushStack(S.apply(this,arguments),"slice",S.call(arguments).join(","))},map:function(a){return this.pushStack(d.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:I,sort:[].sort,splice:[].splice};d.fn.init.prototype=d.fn;d.extend=d.fn.extend=function(){var a,c,e,f,g,h=arguments[0]||{},k=1,l=arguments.length,m=!1;"boolean"===typeof h&&(m=h,h=arguments[1]||{},k=2);"object"===typeof h||d.isFunction(h)||(h={}); l===k&&(h=this,--k);for(;kc?Math.max(0,d+c):c:0;ca.indexOf("compatible")&&C.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}d.extend(!0, a,this);a.superclass=this;a.fn=a.prototype=this();a.fn.constructor=a;a.sub=this.sub;a.fn.init=function(c,e){e&&e instanceof d&&!(e instanceof a)&&(e=a(e));return d.fn.init.call(this,c,e,b)};a.fn.init.prototype=a.fn;var b=a(G);return a},browser:{}});d.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){Y["[object "+b+"]"]=b.toLowerCase()});E=d.uaMatch(E);E.browser&&(d.browser[E.browser]=!0,d.browser.version=E.version);d.browser.webkit&&(d.browser.safari=!0);k.test("\u00a0")&& (l=/^[\s\xA0]+/,m=/[\s\xA0]+$/);g=d(G);G.addEventListener?D=function(){G.removeEventListener("DOMContentLoaded",D,!1);d.ready()}:G.attachEvent&&(D=function(){"complete"===G.readyState&&(G.detachEvent("onreadystatechange",D),d.ready())});return d}(),M={};r.Callbacks=function(a){a=a?M[a]||c(a):{};var d=[],e=[],f,g,h,k,l,m,q=function(b){var c,e,f,g;c=0;for(e=b.length;c=f&&a&&r.isFunction(a.promise)?a:r.Deferred(),l=k.promise();if(1"!==G.createElement("nav").cloneNode(!0).outerHTML,submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0, pixelMargin:!0};r.boxModel=b.boxModel="CSS1Compat"===G.compatMode;c.checked=!0;b.noCloneChecked=c.cloneNode(!0).checked;e.disabled=!0;b.optDisabled=!f.disabled;try{delete l.test}catch(m){b.deleteExpando=!1}!l.addEventListener&&l.attachEvent&&l.fireEvent&&(l.attachEvent("onclick",function(){b.noCloneEvent=!1}),l.cloneNode(!0).fireEvent("onclick"));c=G.createElement("input");c.value="t";c.setAttribute("type","radio");b.radioValue="t"===c.value;c.setAttribute("checked","checked");c.setAttribute("name", "t");l.appendChild(c);d=G.createDocumentFragment();d.appendChild(l.lastChild);b.checkClone=d.cloneNode(!0).cloneNode(!0).lastChild.checked;b.appendChecked=c.checked;d.removeChild(c);d.appendChild(l);if(l.attachEvent)for(h in{submit:1,change:1,focusin:1})c="on"+h,k=c in l,k||(l.setAttribute(c,"return;"),k="function"===typeof l[c]),b[h+"Bubbles"]=k;d.removeChild(l);d=e=f=l=c=null;r(function(){var c,d,e,f,h=G.getElementsByTagName("body")[0];h&&(c=G.createElement("div"),c.style.cssText="padding:0;margin:0;border:0;visibility:hidden;width:0;height:0;position:static;top:0;margin-top:1px", h.insertBefore(c,h.firstChild),l=G.createElement("div"),c.appendChild(l),l.innerHTML="
t
",g=l.getElementsByTagName("td"),k=0===g[0].offsetHeight,g[0].style.display="",g[1].style.display="none",b.reliableHiddenOffsets=k&&0===g[0].offsetHeight,a.getComputedStyle&&(l.innerHTML="",d=G.createElement("div"),d.style.width="0",d.style.marginRight="0",l.style.width="2px",l.appendChild(d),b.reliableMarginRight=0===(parseInt((a.getComputedStyle(d, null)||{marginRight:0}).marginRight,10)||0)),"undefined"!==typeof l.style.zoom&&(l.innerHTML="",l.style.width=l.style.padding="1px",l.style.border=0,l.style.overflow="hidden",l.style.display="inline",l.style.zoom=1,b.inlineBlockNeedsLayout=3===l.offsetWidth,l.style.display="block",l.style.overflow="visible",l.innerHTML="
",b.shrinkWrapBlocks=3!==l.offsetWidth),l.style.cssText="position:absolute;top:0;left:0;width:1px;height:1px;padding:0;margin:0;border:0;visibility:hidden;", l.innerHTML="
",d=l.firstChild,e=d.firstChild,f=d.nextSibling.firstChild.firstChild,f={doesNotAddBorder:5!==e.offsetTop,doesAddBorderForTableAndCells:5=== f.offsetTop},e.style.position="fixed",e.style.top="20px",f.fixedPosition=20===e.offsetTop||15===e.offsetTop,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",f.subtractsBorderForOverflowNotVisible=-5===e.offsetTop,f.doesNotIncludeMarginInBodyOffset=1!==h.offsetTop,a.getComputedStyle&&(l.style.marginTop="1%",b.pixelMargin="1%"!==(a.getComputedStyle(l,null)||{marginTop:0}).marginTop),"undefined"!==typeof c.style.zoom&&(c.style.zoom=1),h.removeChild(c),l=null,r.extend(b, f))});return b}();var Y=/^(?:\{.*\}|\[.*\])$/,Q=/([A-Z])/g;r.extend({cache:{},uuid:0,expando:"jQuery"+(r.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?r.cache[a[r.expando]]:a[r.expando];return!!a&&!e(a)},data:function(a,c,d,e){if(r.acceptData(a)){var f;f=r.expando;var g="string"===typeof c,h=a.nodeType,k=h?r.cache:a,l=h?a[f]:a[f]&&f,m="events"===c;if(l&&k[l]&&(m||e||k[l].data)||!g||d!==b){l|| (h?a[f]=l=++r.uuid:l=f);k[l]||(k[l]={},h||(k[l].toJSON=r.noop));if("object"===typeof c||"function"===typeof c)e?k[l]=r.extend(k[l],c):k[l].data=r.extend(k[l].data,c);f=a=k[l];e||(a.data||(a.data={}),a=a.data);d!==b&&(a[r.camelCase(c)]=d);if(m&&!a[c])return f.events;g?(d=a[c],null==d&&(d=a[r.camelCase(c)])):d=a;return d}}},removeData:function(a,b,c){if(r.acceptData(a)){var d,f,g,h=r.expando,k=a.nodeType,l=k?r.cache:a,m=k?a[h]:h;if(l[m]){if(b&&(d=c?l[m]:l[m].data)){r.isArray(b)||(b in d?b=[b]:(b=r.camelCase(b), b=b in d?[b]:b.split(" ")));f=0;for(g=b.length;fd)return null;a=g?d:0;for(c=g?d+1:f.length;ag.indexOf(":")?"on"+g:"",e){if(c.result=b,c.target||(c.target=e),d=null!=d?r.makeArray(d):[],d.unshift(c),m=r.event.special[g]||{},!m.trigger||!1!==m.trigger.apply(e,d)){n=[[e,m.bindType||g]];if(!f&& !m.noBubble&&!r.isWindow(e)){q=m.delegateType||g;h=da.test(q+g)?e:e.parentNode;for(k=null;h;h=h.parentNode)n.push([h,q]),k=h;k&&k===e.ownerDocument&&n.push([k.defaultView||k.parentWindow||a,q])}for(k=0;ke&&l.push({elem:this,matches:d.slice(e)});for(k=0;k+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e="sizcache"+(Math.random()+"").replace(".",""),f=0,g=Object.prototype.toString,h=!1,l=!0,k=/\\/g, m=/\r\n/g,q=/\W/;[0,0].sort(function(){l=!1;return 0});var n=function(a,b,c,e){c=c||[];var f=b=b||G;if(1!==b.nodeType&&9!==b.nodeType)return[];if(!a||"string"!==typeof a)return c;var h,l,k,m,r,q=!0,v=n.isXML(b),s=[],w=a;do if(d.exec(""),h=d.exec(w))if(w=h[3],s.push(h[1]),h[2]){m=h[3];break}while(h);if(1":function(a,b){var c,d="string"===typeof b,e=0,f=a.length;if(d&&!q.test(b))for(b=b.toLowerCase();ec[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a, b,c,d){var e=b[1],f=u.filters[e];if(f)return f(a,c,b,d);if("contains"===e)return 0<=(a.textContent||a.innerText||v([a])||"").indexOf(b[3]);if("not"===e){b=b[3];c=0;for(d=b.length;c";d.insertBefore(a,d.firstChild);G.getElementById(c)&&(u.find.ID=function(a,c,d){if("undefined"!==typeof c.getElementById&&!d)return(c=c.getElementById(a[1]))? c.id===a[1]||"undefined"!==typeof c.getAttributeNode&&c.getAttributeNode("id").nodeValue===a[1]?[c]:b:[]},u.filter.ID=function(a,b){var c="undefined"!==typeof a.getAttributeNode&&a.getAttributeNode("id");return 1===a.nodeType&&c&&c.nodeValue===b});d.removeChild(a);d=a=null})();(function(){var a=G.createElement("div");a.appendChild(G.createComment(""));0

";if(!b.querySelectorAll||0!==b.querySelectorAll(".TEST").length){n=function(b,c,d,e){c=c||G;if(!e&&!n.isXML(c)){var f=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(f&& (1===c.nodeType||9===c.nodeType)){if(f[1])return C(c.getElementsByTagName(b),d);if(f[2]&&u.find.CLASS&&c.getElementsByClassName)return C(c.getElementsByClassName(f[2]),d)}if(9===c.nodeType){if("body"===b&&c.body)return C([c.body],d);if(f&&f[3]){var g=c.getElementById(f[3]);if(g&&g.parentNode){if(g.id===f[3])return C([g],d)}else return C([],d)}try{return C(c.querySelectorAll(b),d)}catch(h){}}else if(1===c.nodeType&&"object"!==c.nodeName.toLowerCase()){var f=c,l=(g=c.getAttribute("id"))||"__sizzle__", k=c.parentNode,m=/^\s*[+~]/.test(b);g?l=l.replace(/'/g,"\\$&"):c.setAttribute("id",l);m&&k&&(c=c.parentNode);try{if(!m||k)return C(c.querySelectorAll("[id='"+l+"'] "+b),d)}catch(r){}finally{g||f.removeAttribute("id")}}}return a(b,c,d,e)};for(var c in a)n[c]=a[c];b=null}}();(function(){var a=G.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var c=!b.call(G.createElement("div"),"div"),d=!1;try{b.call(G.documentElement,"[test!='']:sizzle")}catch(e){d= !0}n.matchesSelector=function(a,e){e=e.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!n.isXML(a))try{if(d||!u.match.PSEUDO.test(e)&&!/!=/.test(e)){var f=b.call(a,e);if(f||!c||a.document&&11!==a.document.nodeType)return f}}catch(g){}return 0
";a.getElementsByClassName&&0!==a.getElementsByClassName("e").length&&(a.lastChild.className="e",1!==a.getElementsByClassName("e").length&& (u.order.splice(1,0,"CLASS"),u.find.CLASS=function(a,b,c){if("undefined"!==typeof b.getElementsByClassName&&!c)return b.getElementsByClassName(a[1])},a=null))})();n.contains=G.documentElement.contains?function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:G.documentElement.compareDocumentPosition?function(a,b){return!!(a.compareDocumentPosition(b)&16)}:function(){return!1};n.isXML=function(a){return(a=(a?a.ownerDocument||a:0).documentElement)?"HTML"!==a.nodeName:!1};var E=function(a,b,c){var d, e=[],f="";for(b=b.nodeType?[b]:b;d=u.match.PSEUDO.exec(a);)f+=d[0],a=a.replace(u.match.PSEUDO,"");a=u.relative[a]?a+"*":a;d=0;for(var g=b.length;d]*)\/>/ig,Ta=/<([\w:]+)/, db=/]","i"),Va=/checked\s*(?:[^=]|=\s*.checked.)/i,Ba=/\/(java|ecma)script/i,Wa=/^\s*",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"], area:[1,"",""],_default:[0,"",""]},Ca=m(G);ea.optgroup=ea.option;ea.tbody=ea.tfoot=ea.colgroup=ea.caption=ea.thead;ea.th=ea.td;r.support.htmlSerialize||(ea._default=[1,"div
","
"]);r.fn.extend({text:function(a){return r.access(this,function(a){return a===b?r.text(this):this.empty().append((this[0]&&this[0].ownerDocument||G).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(r.isFunction(a))return this.each(function(b){r(this).wrapAll(a.call(this,b))});if(this[0]){var b= r(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var a=this;a.firstChild&&1===a.firstChild.nodeType;)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return r.isFunction(a)?this.each(function(b){r(this).wrapInner(a.call(this,b))}):this.each(function(){var b=r(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=r.isFunction(a);return this.each(function(c){r(this).wrapAll(b?a.call(this,c): a)})},unwrap:function(){return this.parent().each(function(){r.nodeName(this,"body")||r(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){1===this.nodeType&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){1===this.nodeType&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a= r.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,r.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;null!=(d=this[c]);c++)if(!a||r.filter(a,[d]).length)b||1!==d.nodeType||(r.cleanData(d.getElementsByTagName("*")), r.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;null!=(b=this[a]);a++)for(1===b.nodeType&&r.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);return this},clone:function(a,b){a=null==a?!1:a;b=null==b?a:b;return this.map(function(){return r.clone(this,a,b)})},html:function(a){return r.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return 1===c.nodeType?c.innerHTML.replace(Ra,""):null;if("string"=== typeof a&&!(Aa.test(a)||!r.support.leadingWhitespace&&za.test(a)||ea[(Ta.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(Sa,"<$1>");try{for(;dh.length&&g===G&&"<"===h.charAt(0)&&!(fb.test(h)||!r.support.checkClone&&Va.test(h)|| !r.support.html5Clone&&Ua.test(h))&&(e=!0,(f=r.fragments[h])&&1!==f&&(d=f));d||(d=g.createDocumentFragment(),r.clean(a,g,d,c));e&&(r.fragments[h]=f?d:1);return{fragment:d,cacheable:e}};r.fragments={};r.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){r.fn[a]=function(c){var d=[];c=r(c);var e=1===this.length&&this[0].parentNode;if(e&&11===e.nodeType&&1===e.childNodes.length&&1===c.length)return c[b](this[0]),this;for(var e= 0,f=c.length;e")?d=a.cloneNode(!0):(d=G.createElement("div"),Ca.appendChild(d),d.innerHTML=a.outerHTML,d=d.firstChild);var g=d;if(!(r.support.noCloneEvent&&r.support.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||r.isXMLDoc(a)))for(q(a,g),d=l(a),e=l(g),f=0;d[f];++f)e[f]&&q(d[f], e[f]);if(b&&(n(a,g),c))for(d=l(a),e=l(g),f=0;d[f];++f)n(d[f],e[f]);return g},clean:function(a,b,c,d){var e,f=[];b=b||G;"undefined"===typeof b.createElement&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||G);for(var g=0,h;null!=(h=a[g]);g++)if("number"===typeof h&&(h+=""),h){if("string"===typeof h)if(eb.test(h)){h=h.replace(Sa,"<$1>");e=(Ta.exec(h)||["",""])[1].toLowerCase();var l=ea[e]||ea._default,k=l[0],q=b.createElement("div"),n=Ca.childNodes;b===G?Ca.appendChild(q):m(b).appendChild(q);for(q.innerHTML= l[1]+h+l[2];k--;)q=q.lastChild;if(!r.support.tbody)for(k=db.test(h),l="table"!==e||k?""!==l[1]||k?[]:q.childNodes:q.firstChild&&q.firstChild.childNodes,e=l.length-1;0<=e;--e)r.nodeName(l[e],"tbody")&&!l[e].childNodes.length&&l[e].parentNode.removeChild(l[e]);!r.support.leadingWhitespace&&za.test(h)&&q.insertBefore(b.createTextNode(za.exec(h)[0]),q.firstChild);h=q.childNodes;q&&(q.parentNode.removeChild(q),0c;c++)e[a+na[c]+b]=d[c]||d[c-2]||d[0];return e}}});var ia=/%20/g,La=/\[\]$/,W=/\r?\n/g,S=/#.*$/,ma=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,rb=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,sb=/^(?:GET|HEAD)$/,tb=/^\/\//, kb=/\?/,ub=/)<[^<]*)*<\/script>/gi,vb=/^(?:select|textarea)/i,jb=/\s+/,wb=/([?&])_=[^&]*/,lb=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,mb=r.fn.load,$a={},nb={},ta,ua,ob=["*/"]+["*"];try{ta=L.href}catch(Cb){ta=G.createElement("a"),ta.href="",ta=ta.href}ua=lb.exec(ta.toLowerCase())||[];r.fn.extend({load:function(a,c,d){if("string"!==typeof a&&mb)return mb.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(0<=e){var f=a.slice(e,a.length);a= a.slice(0,e)}e="GET";c&&(r.isFunction(c)?(d=c,c=b):"object"===typeof c&&(c=r.param(c,r.ajaxSettings.traditional),e="POST"));var g=this;r.ajax({url:a,type:e,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText;a.isResolved()&&(a.done(function(a){c=a}),g.html(f?r("
").append(c.replace(ub,"")).find(f):c));d&&g.each(d,[c,b,a])}});return this},serialize:function(){return r.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?r.makeArray(this.elements): this}).filter(function(){return this.name&&!this.disabled&&(this.checked||vb.test(this.nodeName)||rb.test(this.type))}).map(function(a,b){var c=r(this).val();return null==c?null:r.isArray(c)?r.map(c,function(a,c){return{name:b.name,value:a.replace(W,"\r\n")}}):{name:b.name,value:c.replace(W,"\r\n")}}).get()}});r.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){r.fn[b]=function(a){return this.on(b,a)}});r.each(["get","post"],function(a,c){r[c]=function(a, d,e,f){r.isFunction(d)&&(f=f||e,e=d,d=b);return r.ajax({type:c,url:a,data:d,success:e,dataType:f})}});r.extend({getScript:function(a,c){return r.get(a,b,c,"script")},getJSON:function(a,b,c){return r.get(a,b,c,"json")},ajaxSetup:function(a,b){b?C(a,r.ajaxSettings):(b=a,a=r.ajaxSettings);C(a,b);return a},ajaxSettings:{url:ta,isLocal:/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/.test(ua[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0, async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":ob},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":r.parseJSON,"text xml":r.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:v($a),ajaxTransport:v(nb),ajax:function(a,c){function d(a,c,q,n){if(2!==A){A=2;w&&clearTimeout(w);s=b;v=n||"";E.readyState=0a||304===a){if(e.ifModified){if(I=E.getResponseHeader("Last-Modified"))r.lastModified[m]= I;if(I=E.getResponseHeader("Etag"))r.etag[m]=I}if(304===a)n="notmodified",u=!0;else try{I=e;I.dataFilter&&(q=I.dataFilter(q,I.dataType));var Y=I.dataTypes;S={};var N,Ka,G=Y.length,Q,ma=Y[0],R,P,K,Z,va;for(N=1;Na&&(a=0);E.status=a;E.statusText=""+(c||n);u?h.resolveWith(f,[z,n,E]):h.rejectWith(f,[E,n,C]);E.statusCode(k);k=b;B&&g.trigger("ajax"+(u?"Success":"Error"),[E,e,u?z:C]);l.fireWith(f,[E,n]);B&&(g.trigger("ajaxComplete",[E,e]),--r.active||r.event.trigger("ajaxStop"))}}"object"===typeof a&&(c=a,a=b);c=c||{};var e=r.ajaxSetup({}, c),f=e.context||e,g=f!==e&&(f.nodeType||f instanceof r)?r(f):r.event,h=r.Deferred(),l=r.Callbacks("once memory"),k=e.statusCode||{},m,q={},n={},v,u,s,w,C,A=0,B,W,E={readyState:0,setRequestHeader:function(a,b){if(!A){var c=a.toLowerCase();a=n[c]=n[c]||a;q[a]=b}return this},getAllResponseHeaders:function(){return 2===A?v:null},getResponseHeader:function(a){var c;if(2===A){if(!u)for(u={};c=ma.exec(v);)u[c[1].toLowerCase()]=c[2];c=u[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){A|| (e.mimeType=a);return this},abort:function(a){a=a||"abort";s&&s.abort(a);d(0,a);return this}};h.promise(E);E.success=E.done;E.error=E.fail;E.complete=l.add;E.statusCode=function(a){if(a){var b;if(2>A)for(b in a)k[b]=[k[b],a[b]];else b=a[E.status],E.then(b,b)}return this};e.url=((a||e.url)+"").replace(S,"").replace(tb,ua[1]+"//");e.dataTypes=r.trim(e.dataType||"*").toLowerCase().split(jb);null==e.crossDomain&&(C=lb.exec(e.url.toLowerCase()),e.crossDomain=!(!C||C[1]==ua[1]&&C[2]==ua[2]&&(C[3]||("http:"=== C[1]?80:443))==(ua[3]||("http:"===ua[1]?80:443))));e.data&&e.processData&&"string"!==typeof e.data&&(e.data=r.param(e.data,e.traditional));z($a,e,c,E);if(2===A)return!1;B=e.global;e.type=e.type.toUpperCase();e.hasContent=!sb.test(e.type);B&&0===r.active++&&r.event.trigger("ajaxStart");if(!e.hasContent&&(e.data&&(e.url+=(kb.test(e.url)?"&":"?")+e.data,delete e.data),m=e.url,!1===e.cache)){C=r.now();var F=e.url.replace(wb,"$1_="+C);e.url=F+(F===e.url?(kb.test(e.url)?"&":"?")+"_="+C:"")}(e.data&&e.hasContent&& !1!==e.contentType||c.contentType)&&E.setRequestHeader("Content-Type",e.contentType);e.ifModified&&(m=m||e.url,r.lastModified[m]&&E.setRequestHeader("If-Modified-Since",r.lastModified[m]),r.etag[m]&&E.setRequestHeader("If-None-Match",r.etag[m]));E.setRequestHeader("Accept",e.dataTypes[0]&&e.accepts[e.dataTypes[0]]?e.accepts[e.dataTypes[0]]+("*"!==e.dataTypes[0]?", "+ob+"; q=0.01":""):e.accepts["*"]);for(W in e.headers)E.setRequestHeader(W,e.headers[W]);if(e.beforeSend&&(!1===e.beforeSend.call(f,E, e)||2===A))return E.abort(),!1;for(W in{success:1,error:1,complete:1})E[W](e[W]);if(s=z(nb,e,c,E)){E.readyState=1;B&&g.trigger("ajaxSend",[E,e]);e.async&&0A)d(-1,D);else throw D;}}else d(-1,"No Transport");return E},param:function(a,c){var d=[],e=function(a,b){b=r.isFunction(b)?b():b;d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=r.ajaxSettings.traditional);if(r.isArray(a)|| a.jquery&&!r.isPlainObject(a))r.each(a,function(){e(this.name,this.value)});else for(var f in a)A(f,a[f],c,e);return d.join("&").replace(ia,"+")}});r.extend({active:0,lastModified:{},etag:{}});var xb=r.now(),Xa=/(\=)\?(&|$)|\?\?/i;r.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return r.expando+"_"+xb++}});r.ajaxPrefilter("json jsonp",function(b,c,d){c="string"===typeof b.data&&/^application\/x\-www\-form\-urlencoded/.test(b.contentType);if("jsonp"===b.dataTypes[0]||!1!==b.jsonp&&(Xa.test(b.url)|| c&&Xa.test(b.data))){var e,f=b.jsonpCallback=r.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,g=a[f],h=b.url,l=b.data,k="$1"+f+"$2";!1!==b.jsonp&&(h=h.replace(Xa,k),b.url===h&&(c&&(l=l.replace(Xa,k)),b.data===l&&(h+=(/\?/.test(h)?"&":"?")+b.jsonp+"="+f)));b.url=h;b.data=l;a[f]=function(a){e=[a]};d.always(function(){a[f]=g;if(e&&r.isFunction(g))a[f](e[0])});b.converters["script json"]=function(){e||r.error(f+" was not called");return e[0]};b.dataTypes[0]="json";return"script"}});r.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"}, contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){r.globalEval(a);return a}}});r.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1);a.crossDomain&&(a.type="GET",a.global=!1)});r.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=G.head||G.getElementsByTagName("head")[0]||G.documentElement;return{send:function(e,f){c=G.createElement("script");c.async="async";a.scriptCharset&&(c.charset=a.scriptCharset);c.src=a.url;c.onload=c.onreadystatechange=function(a, e){if(e||!c.readyState||/loaded|complete/.test(c.readyState))c.onload=c.onreadystatechange=null,d&&c.parentNode&&d.removeChild(c),c=b,e||f(200,"success")};d.insertBefore(c,d.firstChild)},abort:function(){if(c)c.onload(0,1)}}}});var ib=a.ActiveXObject?function(){for(var a in xa)xa[a](0,1)}:!1,yb=0,xa;r.ajaxSettings.xhr=a.ActiveXObject?function(){var b;if(!(b=!this.isLocal&&w()))a:{try{b=new a.ActiveXObject("Microsoft.XMLHTTP");break a}catch(c){}b=void 0}return b}:w;(function(a){r.extend(r.support, {ajax:!!a,cors:!!a&&"withCredentials"in a})})(r.ajaxSettings.xhr());r.support.ajax&&r.ajaxTransport(function(c){if(!c.crossDomain||r.support.cors){var d;return{send:function(e,f){var g=c.xhr(),h,l;c.username?g.open(c.type,c.url,c.async,c.username,c.password):g.open(c.type,c.url,c.async);if(c.xhrFields)for(l in c.xhrFields)g[l]=c.xhrFields[l];c.mimeType&&g.overrideMimeType&&g.overrideMimeType(c.mimeType);c.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");try{for(l in e)g.setRequestHeader(l, e[l])}catch(k){}g.send(c.hasContent&&c.data||null);d=function(a,e){var l,k,m,q,n;try{if(d&&(e||4===g.readyState))if(d=b,h&&(g.onreadystatechange=r.noop,ib&&delete xa[h]),e)4!==g.readyState&&g.abort();else{l=g.status;m=g.getAllResponseHeaders();q={};(n=g.responseXML)&&n.documentElement&&(q.xml=n);try{q.text=g.responseText}catch(v){}try{k=g.statusText}catch(u){k=""}l||!c.isLocal||c.crossDomain?1223===l&&(l=204):l=q.text?200:404}}catch(z){e||f(-1,z)}q&&f(l,k,q,m)};c.async&&4!==g.readyState?(h=++yb,ib&& (xa||(xa={},r(a).unload(ib)),xa[h]=d),g.onreadystatechange=d):d()},abort:function(){d&&d(0,1)}}}});var ab={},ka,wa,zb=/^(?:toggle|show|hide)$/,Ab=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,Ya,Na=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],Ma;r.fn.extend({show:function(a,b,c){if(a||0===a)return this.animate(I("show",3),a,b,c);c=0;for(var d=this.length;c=f.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();f.animatedProperties[this.prop]=!0;for(b in f.animatedProperties)!0!==f.animatedProperties[b]&&(d=!1);if(d){null==f.overflow||r.support.shrinkWrapBlocks||r.each(["","X","Y"],function(a,b){e.style["overflow"+b]=f.overflow[a]});f.hide&&r(e).hide();if(f.hide||f.show)for(b in f.animatedProperties)r.style(e,b,f.orig[b]),r.removeData(e,"fxshow"+b,!0),r.removeData(e,"toggle"+ b,!0);if(a=f.complete)f.complete=!1,a.call(e)}return!1}Infinity==f.duration?this.now=c:(a=c-this.startTime,this.state=a/f.duration,this.pos=r.easing[f.animatedProperties[this.prop]](this.state,a,0,1,f.duration),this.now=this.start+(this.end-this.start)*this.pos);this.update();return!0}};r.extend(r.fx,{tick:function(){for(var a,b=r.timers,c=0;c=c[e]?c[d]:Math.max(a.body[e],c[e],a.body[f],c[f]);if(g===b)return a=r.css(a,c),c=parseFloat(a),r.isNumeric(c)?c:a;r(a).css(c,g)},c,a,arguments.length,null)}});a.jQuery=a.$=r;"function"===typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return r})})(window);jQuery.cookie=function(a,b,c){if(1"),m;g.is(":selected")&&(u.text(g.text()),v=d);f===C-1&&k.addClass("last");(function(){var d=g.text(),f=g.data("custom-option-text"),f=f!=b?f:d;g.is(":disabled")||l?m=a("",{text:f}).addClass(q.settings.classDisabled):(m=a("",{href:"#"+g.val(),rel:g.val(),text:f,click:function(b){b.preventDefault();b=s;b.attr("id").split("_");n._closeSelectbox(c);n._changeSelectbox(c,a(this).attr("rel"), d);b.focus()}}),g.is(":selected")&&m.addClass("active"));h&&m.addClass(q.settings.classSub);m.appendTo(k)})();k.appendTo(B)})}if(this._getInst(c))return!1;var m=a(c),n=this,q=n._newInst(m),l,u,s,B,v=!1;m.find("optgroup");var z=m.find("option"),C=z.length;m.attr("sb",q.uid);a.extend(q.settings,n._defaults,f);n._state[q.uid]=!1;m.hide();l=a("
",{id:"sbHolder_"+q.uid,"class":q.settings.classHolder});var A=m.data("selectbox-css");A&&l.css(A);u=a("",{id:"sbSelector_"+q.uid,href:"#","class":q.settings.classSelector, click:function(b){b.preventDefault();b.stopPropagation();g.apply(a(this),[]);b=a(this).attr("id").split("_")[1];n._state[b]?n._closeSelectbox(c):(n._openSelectbox(c),s.focus())},keyup:function(a){h(a.keyCode)}});s=a("",{id:"sbToggle_"+q.uid,href:"#","class":q.settings.classToggle,click:function(b){b.preventDefault();b.stopPropagation();g.apply(a(this),[]);b=a(this).attr("id").split("_")[1];n._state[b]?n._closeSelectbox(c):(n._openSelectbox(c),s.focus())},keyup:function(a){h(a.keyCode)}});s.appendTo(l); B=a("
    ",{id:"sbOptions_"+q.uid,"class":q.settings.classOptions,css:{display:"none"}});m.children().each(function(b){b=a(this);var c,d={};b.is("option")?k(b):b.is("optgroup")&&(c=a("
  • "),a("",{text:b.attr("label")}).addClass(q.settings.classGroup).appendTo(c),c.appendTo(B),b.is(":disabled")&&(d.disabled=!0),d.sub=!0,k(b.find("option"),d))});v||u.text(z.first().text());a.data(c,"selectbox",q);u.appendTo(l);B.appendTo(l);l.insertAfter(m)},_detachSelectbox:function(b){var c=this._getInst(b); if(!c)return!1;a("#sbHolder_"+c.uid).remove();a.data(b,"selectbox",null);a(b).show()},_changeSelectbox:function(b,c,g){var h=this._getInst(b),k=this._get(h,"onChange");a("#sbSelector_"+h.uid).text(g);a("#sbOptions_"+h.uid).find(".active").removeClass("active");a("#sbOptions_"+h.uid).find('a[rel="'+c+'"]').addClass("active");a(b).find("option").attr("selected",!1);a(b).find("option[value='"+c+"']").attr("selected",d);k?k.apply(h.input?h.input[0]:null,[c,h]):h.input&&h.input.trigger("change")},_enableSelectbox:function(b){var c= this._getInst(b);if(!c||!c.isDisabled)return!1;a("#sbHolder_"+c.uid).removeClass(c.settings.classHolderDisabled);c.isDisabled=!1;a.data(b,"selectbox",c)},_disableSelectbox:function(b){var c=this._getInst(b);if(!c||c.isDisabled)return!1;a("#sbHolder_"+c.uid).addClass(c.settings.classHolderDisabled);c.isDisabled=d;a.data(b,"selectbox",c)},_optionSelectbox:function(b,c,d){var h=this._getInst(b);if(!h)return!1;h[c]=d;a.data(b,"selectbox",h)},_openSelectbox:function(b){var c=this._getInst(b),g=this;if(c&& !c.isOpen&&!c.isDisabled){var h=a("#sbOptions_"+c.uid),k=parseInt(a(window).height(),10),m=parseInt(a(window).width(),10),n=a("#sbHolder_"+c.uid).offset(),q=a(window).scrollTop(),l=h.prev().height(),k=k-(n.top-q)-l/2,u=this._get(c,"onOpen");50m?h.css("left","-"+(h.width()-h.parent().width()+3)+"px"):h.css("left","-1px");"fade"===c.settings.effect? h.fadeIn(c.settings.speed):h.slideDown(c.settings.speed);a("#sbToggle_"+c.uid).addClass(c.settings.classToggleOpen);a("#sbHolder_"+c.uid).addClass(c.settings.classHolderOpen);this._state[c.uid]=d;c.isOpen=d;u&&u.apply(c.input?c.input[0]:null,[c]);a.data(b,"selectbox",c);a("html").unbind("click.sbClose").one("click.sbClose",function(){g._closeSelectbox(b)})}},_closeSelectbox:function(b){var c=this._getInst(b);if(c&&c.isOpen){var d=this._get(c,"onClose");a("#sbOptions_"+c.uid).hide();a("#sbToggle_"+ c.uid).removeClass(c.settings.classToggleOpen);a("#sbHolder_"+c.uid).removeClass(c.settings.classHolderOpen);this._state[c.uid]=!1;c.isOpen=!1;d&&d.apply(c.input?c.input[0]:null,[c]);a.data(b,"selectbox",c);a("html").unbind("click.sbClose")}},_newInst:function(a){return{id:a[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1"),input:a,uid:Math.floor(99999999*Math.random()),isOpen:!1,isDisabled:!1,settings:{}}},_getInst:function(b){try{return a.data(b,"selectbox")}catch(c){throw"Missing instance data for this selectbox"; }},_get:function(a,c){return a.settings[c]!==b?a.settings[c]:this._defaults[c]}});a.fn.selectbox=function(b){var c=Array.prototype.slice.call(arguments,1);return"string"==typeof b&&"isDisabled"==b||"option"==b&&2==arguments.length&&"string"==typeof arguments[1]?a.selectbox["_"+b+"Selectbox"].apply(a.selectbox,[this[0]].concat(c)):this.each(function(){"string"==typeof b?a.selectbox["_"+b+"Selectbox"].apply(a.selectbox,[this].concat(c)):a.selectbox._attachSelectbox(this,b)})};a.selectbox=new c;a.selectbox.version= "0.1.3"})(jQuery);(function(a,b){var c="hidden",d="fontFamily fontSize fontWeight fontStyle letterSpacing textTransform wordSpacing".split(" "),e=a('"):$('');m.val(f);var f=$('
    '),n=$('
    '+c.okButtonText+"
    ").appendTo(f),q=$('
    '+c.cancelButtonText+"
    ").appendTo(f);e(k);var l="function"===typeof c.onCancel?function(){c.onCancel();d()}:function(){d(k)},u=function(a,c,e){/^\s+$/.test(c)&&(c="");m.attr("disabled", "disabled");n.addClass("process");b(a,c,e,function(){d()})};n.click(function(b){b.preventDefault();b.stopPropagation();u(a,m.val(),k)});q.click(function(a){a.preventDefault();a.stopPropagation();l()});m.keyup(function(b){b.preventDefault();b.stopPropagation();13!=b.keyCode||b.shiftKey?27==b.keyCode&&l():u(a,m.val(),k)});a.empty().append(m,f);m.select()}!a instanceof $?console.error("$container should be jQuery object"):b?"function"!=typeof b?console.error("onOk should be function"):(a.addClass("tv-editable"), d()):console.error("onOk required")} function changeUserProfileField(a){function b(a){var b=Array.prototype.slice.call(arguments);b.shift();"function"===typeof a&&a.apply(this,b)}if(a&&a.name&&"string"==typeof a.value){var c={};c[a.name]=a.value;$.post("/accounts/change_any_data/",c,function(c){c.ok?(c=c[a.name],user[a.name]=c,b(a.onSuccess,c)):c.error&&b(a.onError,c.error)}).error(function(c){b(a.onError,c.responseText)}).always(function(){b(a.onComplete)})}else console.warn("Required options.name and options.value")} TradingView.timezoneIsAvailable=function(a){for(var b=0;b "+this.options.itemsSelector).toArray()};b.prototype.addItems=function(a,b){this.items=this.items.concat(a);this.balance(a,b)};b.prototype.balance=function(a,b){switch(this.options.balanceType){case "height":this.balanceHeight(a,b);break;default:this.balanceSimple(a,b)}};b.prototype.balanceHeight=function(b,d){var e=this;this.columns.forEach(function(a){!a.fragment&& (a.fragment=document.createDocumentFragment())});a.each(b,function(b,c){var h=a(c),k=h.data("cb-height")||h.outerHeight(!0);if(k)h.data("cb-height",k);else throw"Cant get item height";var m=null;if(h.hasClass("two-columns-item")){e.columns.sort(TradingView.sortMultipleFunction("index"));if(2n.height?h+=m.height-n.height:q=n.height-m.height;var l=document.createElement("div");l.style.height=h+"px";l.className="empty-space";n.fragment.appendChild(l);n.height+=h;q&&(l=document.createElement("div"),l.style.height=q+"px",l.className="empty-space",m.fragment.appendChild(l),m.height+=q)}else e.columns.sort(TradingView.sortMultipleFunction("height","index")),m=e.columns[0];!e.options.maxRow||this.row_num=e.columnsCount&&(this.row_num++,this.column_num=0)}.bind(this))};b.prototype.init=function(a){this.row_num=this.column_num=0;this.columnsCount=this.calculateColumnsCount();this.createLayout(this.columnsCount); a?this.balance(this.items,!1):this.addItems(this.getItems(),!0);this.pushFragmentsToColumns()};b.prototype.calculateColumnsCount=function(){var a=this.container.width(),b=this.options;if(!a)throw"Can't get container width.";for(var e=Math.floor(a/b.columnWidth);0<=e&&e*b.columnWidth+(e-1)*b.gap>a;)e--;return e};b.prototype.createLayout=function(b){this.columns=[];for(var d=document.createDocumentFragment(),e=0;e
');this.columns.push({target:f,count:0,height:0, index:e});d.appendChild(f[0])}this.container.prepend(d)};b.prototype.pushFragmentsToColumns=function(a){for(var b=this.columns.length,e=0;e

Only D, W, M intervals are supported for this symbol/exchange. You will be automatically switched to a D interval. Intraday intervals are not available because of exchange policies.

'); c=c.find(".main-properties");c=$('
').appendTo(c);if(a){var d=$('').appendTo(c).find("input");d.attr("checked",a.silentIntervalChange.value());d.bind("click",function(){a.silentIntervalChange.setValue(this.checked)})}$('
OK').appendTo(c).bind("click",function(){TVDialogs.destroy()});TVDialogs.positionDialog();TVDialogs.applyHandlers(!1,b)}, showSignInDialog:function(a,b){function c(a){switch(a){case "signup":case "register":break;case "signup-trial":a="signup-trial";break;case "recover":a="recover";break;default:a="signin"}content.find('[name="signup_trial"]').val("signup-trial"==a?1:0);content.find(".show-if-signin, .show-if-signup, .show-if-recover, .show-if-signup-trial").not(".show-if-"+a).hide();content.find(".show-if-"+a).show().find("input:eq(0)").focus();TVDialogs.positionDialog()}is_authenticated||("function"==typeof a?TVDialogs.onSigninSuccess= a:delete TVDialogs.onSigninSuccess,TVDialogs.createModalDialog("Log in",{noHeader:!0,addClass:"auth-dialog",appearance:"flat"}),content=TVDialogs.modalDialog.find(".tv-dialog-content"),content.html(TradingView.templates.dialogs.auth),c(b&&b.mode),content.find(".recover-link").on("click",function(a){c("recover");a.preventDefault()}),content.find(".signup-link").on("click",function(a){c("signup");a.preventDefault()}),content.find(".signin-link").on("click",function(a){c("signin");a.preventDefault()}), content.find(".auth-dialog-field").each(function(){function a(){c.toggleClass("empty",!c.val());g=!1}var b=$(this).find(".auth-dialog-field-placeholder"),c=$(this).find("input"),g=!1;a();c.on("blur",function(){b.toggleClass("disabled",!!this.value)});c.on("keypress keydown keyup input paste",function(){g||(g=!0,setTimeout(function(b){a()},0))})}),"stocktwits google facebook twitter linkedin yahoo".split(" ").forEach(function(a){var c="/accounts/signin/"+a+"/";content.find(".auth-dialog-social-"+a).on("click", function(a){b&&"signup-trial"==b.mode&&$.cookie("will_start_trial",1,{path:"/"});a.preventDefault();window.open(c,"_blank")})}),content.find("#signin-form").on("submit",function(a){a.preventDefault();var b=$(this).find('[type="submit"]').addClass("process");TVDialogs.submit(function(a){""!==a.error?TVDialogs.showError("Error: "+a.error):(TVDialogs.destroy(),user=a.user,changeLoginState(!0),"function"==typeof TVDialogs.onSigninSuccess&&(TVDialogs.onSigninSuccess(),delete TVDialogs.onSigninSuccess), "undefined"!==typeof next&&next&&(location.href=next));b.removeClass("process")},this)}),content.find("#signup-form").on("submit",function(a){var b=this;a.preventDefault();var c=$(b).find('[type="submit"]').addClass("process");TVDialogs.submit(function(a){$(".tv-dialog input").removeClass("error");$(".tv-dialog-field-error").hide();if(""!==a.errors)if("object"==typeof a.errors){for(var d in a.errors)$(b).find("input[name^="+d+"]").addClass("error").data("error",a.errors[d][0]);$(".tv-dialog input.error").first().focus(); TVDialogs.showError($(".tv-dialog input.error").first().data("error"))}else TVDialogs.showError("Error: "+a.errors);else TVDialogs.showNotice("Activate Your Account",a.message);c.removeClass("process")},b)}),content.find("#recover-form").on("submit",function(a){a.preventDefault();var b=TVDialogs.modalDialog;TVDialogs.submit(function(a){""!==a.error?TVDialogs.showError("Failed: "+a.error):(TVDialogs.showMessage("New password is sent to your email."),setTimeout(function(){TVDialogs.modalDialog===b&& TVDialogs.destroy()},TVDialogs.messageDelay))},this)}),TVDialogs.positionDialog(),TVDialogs.applyHandlers(null))},showPublishIntroDialog:function(a){var b=$.Deferred(),c=TVSettings.getBool("publish.showIntroText",!0);if(a||c){a=TVDialogs.createDialog("Please read before publishing");var d=!1;a.css({width:"750px","z-index":130});a.find(".tv-dialog-content").html(Mustache.render(TradingView.templates.dialogs.publishIntro,{do_not_show:!c}));a.draggable({handle:".tv-dialog-title"});a.find('input[name="donotshow"]').on("change", function(a){TVSettings.setValue("publish.showIntroText",!$(this).is(":checked"))});$("#publish-intro-continue").click(function(){TVDialogs.destroy("Please read before publishing");b.resolve()});a.on("destroy",function(){d=!0;setTimeout(b.resolve,0)});b.always(function(){d||TVDialogs.destroy("Please read before publishing")});TVDialogs.positionDialog(a);TVDialogs.applyHandlers(a)}else b.resolve();return b},showPublishChartDialog:function(a){function b(){e.find(".publish-related").tvtags("extractTags"); var b={name:e.find('[name="name"]').val(),description:e.find('[name="description"]').val(),tags:e.find(".publish-tags").tvtags("extractTags").tvtags("tagsWithPending").join(","),twitter:e.find('input[name="twitter"]').is(":checked")?"1":"",stocktwits:e.find('input[name="stocktwits"]').is(":checked")?"1":"",chat:e.find('input[name="chat"]').is(":checked")?"1":"",direction:e.find('input[name="direction"]').val(),is_public:e.find('input[name="public"]').is(":checked")?"1":"",related_charts:e.find(".publish-related").tvtags("extractTags").tvtags("tagsWithPending").join(",")}, c={publishAllLayout:e.find('[name="publish_entire_layout"]').is(":checked")};if(!b.name.trim())TVDialogs.showError("Chart title is required",e),e.find('[name="name"]').focus();else if(!b.description.trim())TVDialogs.showError("Chart description is required",e),e.find('[name="description"]').focus();else if(!isLatin(b.name)||!isLatin(b.description))TVDialogs.showError(m);else if(!isLatin(b.tags))TVDialogs.showError("Please use only English in tags");else if(a.onPublish)a.onPublish(b,c)}function c(){e.show(); var b=TVSettings.getJSON("publishchart.size",{w:u,h:s});e.height(Math.max(Math.min(b.h,0.9*$(window).height()),s));e.width(Math.max(Math.min(b.w,0.9*$(window).width()),u));k();TVDialogs.positionDialog(e);if(a.onShow)a.onShow()}function d(){e.hide();if(a.onMinimize)a.onMinimize()}var e=TVDialogs.createDialog("Publish Idea",{addClass:"publish-dialog",hideCloseCross:!0});e.css("width","700px");var f=e.find(".tv-dialog-content");f.html(Mustache.render(TradingView.templates.dialogs.publishChart,user)); var g=e.find(".tv-dialog-title"),h=$('').appendTo(g);$('Read before publishing').appendTo(g);e.draggable({handle:g});var k=function(){var a=f.find('textarea[name="description"]'),b=e.find(".tv-dialog-title").outerHeight();f.children(".main, *[class^=main-]").eq(0);return function(){a.css("height",e.height()-b-f.height()+a.height())}}();e.on("resize",function(a){a.stopPropagation();a.preventDefault();k();TVSettings.setJSON("publishchart.size", {w:e.width(),h:e.height()})});var m="TradingView is only for English-language content at this time.";$("#publish-chart-form").submit(function(a){a.preventDefault();b()});$("#publish-dialog-do-publish").click(function(a){a.preventDefault();b()});e.find('input[name="public"]').on("change",function(a){$(this).is(":checked")||(user.is_pro?(n.prop("checked",!1).change(),q.prop("checked",!1).change()):($(this).attr("checked",!0),TVDialogs.showGoProDialog({feature:"privateCharts"})))});var n=e.find('input[name="twitter"]'), q=e.find('input[name="stocktwits"]');n.change(function(){n.is(":checked")&&(q.prop("checked",!1).change(),user.has_twitter||window.open("/accounts/permission/twitter/","twitter_permission_request","scrollbars=yes,height=400,width=700").focus())});q.change(function(){q.is(":checked")&&(n.prop("checked",!1).change(),user.has_stocktwits||window.open("https://api.stocktwits.com/api/2/oauth/authorize?client_id="+stocktwits_consumer_key+"&response_type=code&redirect_uri="+location.protocol+"//"+location.host+ "/accounts/return/stocktwits/&scope=publish_messages","stocktwits_permission_request","scrollbars=yes,height=400,width=700").focus())});f.on("mousedown",".publish-direction-buttons .tv-button",function(){var a=$(this);$(".publish-direction-buttons .tv-button").removeClass("active");a.addClass("active");e.find('input[name="direction"]').val(a.data("val"))});e.find(".tv-dialog-readbefore a").on("click",function(a){a.preventDefault();TVDialogs.showPublishIntroDialog(!0)});(function(){function b(a){a= new Date(a);return[a.getFullYear(),("0"+a.getMonth()).substr(-2),("0"+a.getDate()).substr(-2)].join("-")}function c(a){return(/([0-9A-Za-z-]+)\/?$/.exec(a)||0)[1]}var d={},f=e.find(".publish-related");a.related&&f.val([].concat(a.related).join(","));f.tvtags("init",{suggest:function(a,b){var e=location.protocol+"//"+location.host+"/v/";a.substr(0,e.length)===e&&(a=c(a)||a);$.ajax("/ideas-json/",{data:{search:a},dataType:"json"}).done(function(a){a=a||[];a.forEach(function(a){d[a.image_url]=a;a.str= e+a.image_url+"/"});b(a)}).error(function(){b(null)})},formatSuggest:function(a){var c=$(document.createElement("span")).addClass("date").text(b(1E3*a.created)+" "),d=$(document.createElement("strong")).text(a.name);a=$(document.createTextNode(" "+[a.short_name||a.pro_symbol,a.resolution].join(", ")));return{content:$().add(c).add(d).add(a)}},validate:function(a,b){var e=c(a);e?d[e]?b(!0):$.ajax("/ideas-json/"+e+"/",{dataType:"json"}).done(function(a){a&&a.length?(d[a[0].image_url]=a[0],b(!0)):b(!1)}).error(function(){b(!1)}): b(!1)},transform:c,format:function(a){a=a.str;var b=d[a];return b&&a?b.name:"Idea"},keys:["\n",",",/\s/,";"],separator:","}).on("change",k)})();e.find(".publish-tags").tvtags("init",{keys:["\n",",",/\s/,";"],separator:",",addClass:"no-arrow with-ears",format:function(a){return{str:a.str,addClass:"tag"}},suggest:function(a,b){a||b(null);$.ajax("/tags-json/",{data:{search:a},dataType:"json"}).done(function(a){b(a)}).error(function(){b(null)})},maxLength:64}).on("change",k);var l=[];a.chartWidgetCollection&& function(){function b(){var a=h.value().model();return a?(a=a.mainSeries(),(a.properties().shortName.value()||a.symbol())+" ("+a.interval()+")"):"Active Chart"}function c(){d.toggleClass("hidden",!("s"!==g.value()&&!k.value()));q.is(":checked")?(s.text("All Charts"),n.attr({"class":"tv-dialog-layout-button tv-dialog-layout-"+g.value()})):(s.text(b()),n.attr({"class":"tv-dialog-layout-button tv-dialog-layout-s"}))}var d=f.find(".tv-dialog-layoutpicker"),g=a.chartWidgetCollection.layout.spawn(),h=a.chartWidgetCollection.activeChartWidget.spawn(), k=a.chartWidgetCollection.maximizeCurrentChart.spawn(),m=TradingView.Linking.symbol.spawn();l=[g,h,k,m];var n=$(''),q=$('').hide().appendTo(n);$('').appendTo(n);var s=$("").appendTo(n);$('').appendTo(n);g.subscribe(c);h.subscribe(c);k.subscribe(c);m.subscribe(c);c();TradingView.bindPopupMenu(n,function(){var a=q.is(":checked");return[{addClass:"tv-dialog-layout-popup tv-dialog-layout-s", title:"Publish Only "+b(),action:function(){q.attr("checked",!1);c()},active:!a,icon:!0},{addClass:"tv-dialog-layout-popup tv-dialog-layout-"+g.value(),title:"Publish All Charts",action:function(){q.attr("checked",!0);c()},active:a,icon:!0}]},{direction:"up"});n.appendTo(d);e.on("destroy",function(){for(var a=0;a'),e=$('').appendTo(d),f=TradingView.SymbolSearch.bindToInput(e,{callback:function(a){var d=c.find("#tv-dialog-addsymbol-overlay-checkbox").is(":checked");if(a){var e=b.callback;e(a,d);$(window).off("keyup.addOverlay");TVDialogs.destroy(c.data("title"))}}}); c.find("div.symbol-edit-place").replaceWith(d);c.find(".tv-dialog").draggable({handle:".tv-dialog-title"});c.find("input[type=checkbox]").on("change",function(a){TVSettings.setJSON("showAddSymbolDialog.checkboxState",a.target.checked)});c.find(".ok").on("click",function(){f.acceptTypeIn()});c.show();TVDialogs.positionDialog(c);e.focus()},showProRTTrialOffer:function(a){TVDialogs.createModalDialog("",{noHeader:!0,addClass:"prorttrial-dialog ",appearance:"flat"});var b=TVDialogs.modalDialog;b.css({zIndex:1E3}).find(".tv-dialog"); b=b.find(".tv-dialog-content");b.html(Mustache.render(TradingView.templates.dialogs.proRTTrialOffer));b.find("a.trial").on("click",function(b){b.preventDefault();if(a&&a.callbacks&&a.callbacks.onAccept)a.callbacks.onAccept()});b.find("a.nothanks").on("click",function(b){b.preventDefault();if(a&&a.callbacks&&a.callbacks.onDecline)a.callbacks.onDecline()});b.find("a.ordernow").on("click",function(b){b.preventDefault();if(a&&a.callbacks&&a.callbacks.onOrder)a.callbacks.onOrder()});b.find("a.later").on("click", function(b){b.preventDefault();if(a&&a.callbacks&&a.callbacks.onRemindLater)a.callbacks.onRemindLater()});TVDialogs.positionDialog();TVDialogs.applyHandlers(null,!0,!0)},showTrialMessage:function(a){TVDialogs.createModalDialog("",{noHeader:!0,addClass:"prorttrial-dialog ",appearance:"flat"});var b=TVDialogs.modalDialog;b.css({zIndex:1E3}).find(".tv-dialog");b=b.find(".tv-dialog-content");b.html(''); var c=b.find(".title"),d=b.find(".copy"),e=b.find(".big-button.ok"),f=b.find(".big-buttons");a&&a.title?c.html(a.title):c.remove();a&&a.copy?d.html(a.copy):d.remove();a&&a.closeButtonCopy&&e.html(a.closeButtonCopy);a&&a.replaseCloseBtn&&f.html(a.replaseCloseBtn);b.find("a.ok").on("click",function(b){a&&a.replaseCloseBtnFunc?a.replaseCloseBtnFunc(b):(b.preventDefault(),TVDialogs.destroy())});TVDialogs.positionDialog();TVDialogs.applyHandlers(null)},showTrialMessageSuccess:function(){TVDialogs.showTrialMessage({title:"PRO RealTime Trial", copy:"

Your 30-day free PRO Realtime accout has been activated. You are now part of a community of 2 million+ ideas that have been created within TradingView charts. To help get the ball rolling, we'd suggest you spend a few minutes familiarizing yourself with our online help section. We hope you enjoyu working with TradingView and wish you good trading!

",replaseCloseBtn:"LAUNCH CHART",replaseCloseBtnFunc:function(){}})}, showTrialConfirmationDialog:function(a,b,c){TVDialogs.createModalDialog("",{noHeader:!0,addClass:"trialconfirm-dialog ",appearance:"flat"});var d=TVDialogs.modalDialog;d.css({zIndex:1E3});d=d.find(".tv-dialog-content");d.html('

'+(a||"Trial confirmation dialog")+'

'+(b||"Trial confirmation text")+'
');a=d.find(".no-button"); b=d.find(".yes-button");a.on("click",function(a){a.preventDefault();TVDialogs.destroy()});b.on("click",function(a){if("function"==typeof c)return c(a);a.preventDefault()});TVDialogs.positionDialog();TVDialogs.applyHandlers(null)},showEarlyAccessDialog:function(a){TVDialogs.createModalDialog("",{noHeader:!0,addClass:"prorttrial-dialog ",appearance:"flat"});var b=TVDialogs.modalDialog;b.css({zIndex:1E3}).find(".tv-dialog");var b=b.find(".tv-dialog-content"),c={};switch(a&&a.reason){case "after 1 week":c.is_1wk= !0;break;case "after 2 weeks":c.is_2wk=!0;break;case "finished":c.is_finished=!0;break;default:c.is_manual=!0}b.html(Mustache.render(TradingView.templates.dialogs.earlyAccess,c));c=null;b.find("a.nothanks").on("click",function(b){b.preventDefault();if(a&&a.callbacks&&a.callbacks.onDecline)a.callbacks.onDecline()});b.find("a.ordernow").on("click",function(b){b.preventDefault();if(a&&a.callbacks&&a.callbacks.onOrder)a.callbacks.onOrder()});TVDialogs.positionDialog();TVDialogs.applyHandlers(null,!0, !0)},showUnsubscribeConfirmationDialog:function(a,b,c){TVDialogs.createModalDialog(a);TVDialogs.modalDialog.find(".tv-dialog").css("width","450px");TVDialogs.modalDialog.find(".tv-dialog-content").html('
Aww, we are sorry to see you go! If you cancel, you will no longer be billed after your current subscription period ends. Your subscription service will continue to be active until the end of the period that you paid for. Sorry, there are no refunds.

If you are sure you want to cancel, click Cancel, otherwise choose Do Not Cancel. If you cancel, we\u2019d really like to know the reason why you are cancelling so we can make things better.
');var d=TVDialogs.modalDialog.find(".yes");d.click(function(){var a=TVDialogs.modalDialog.find("textarea").val();a?(d.addClass("process"),c(a)):TVDialogs.showError("Please enter your feedback")});TVDialogs.modalDialog.find(".no").click(function(){TVDialogs.destroy()});TVDialogs.positionDialog();TVDialogs.applyHandlers()},showChangeUserStatusDialog:function(){var a=TVDialogs.createDialog("Update status"); a.find(".tv-dialog").css("width","400px");a.find(".tv-dialog-content").html('
');var b=a.find(".ok"),c=a.find('[name="status"]'); a.find("form").submit(function(){b.addClass("process");changeUserProfileField({name:"status",value:String(c.val()).replace(/^\s+|\s+$/g,""),onSuccess:function(a){var b=$("#change-profile-status"),c=a?a:"Add status...";b.hasClass("tv-editable-active")?b.find('input[type="text"], textarea').val(c):b.text(c);$('[name="status"]').val(a);TVDialogs.destroy("Update status")},onError:function(a){TVDialogs.showError("We'are sorry, something went wrong. Try to reload page.");console.warn(a)},onComplete:function(){b.removeClass("process")}}); return!1});a.find(".cancel").click(function(){TVDialogs.destroy("Update status")});Modernizr.touch&&c.val("");TVDialogs.positionDialog(a,{considerScroll:!0});TVDialogs.applyHandlers(a);c.focus().select()},showNotice:function(a,b,c,d){c=c||"";d=d||!1;TVDialogs.createModalDialog(a);TVDialogs.modalDialog.find(".tv-dialog").css("width","400px");TVDialogs.modalDialog.find(".tv-dialog-content").html('
'+b+"
");TVDialogs.positionDialog(); TVDialogs.applyHandlers(!1,d);return TVDialogs.modalDialog},showConfirm:function(a,b,c,d,e){e=e||{};e.dontAskSetting&&TVSettings.getBool(e.dontAskSetting)?c():(TVDialogs.createModalDialog(a,e),TVDialogs.modalDialog.find(".tv-dialog").css("width","400px"),TVDialogs.modalDialog.find(".tv-dialog-content").html('
'+b+"
"+(e.dontAskSetting?' ': "")+'
'),e.okButtonText&&TVDialogs.modalDialog.find(".ok").val(e.okButtonText),e.cancelButtonText&&TVDialogs.modalDialog.find(".cancel").val(e.cancelButtonText),TVDialogs.modalDialog.find(".ok").click(function(){e.dontAskSetting&&$("#confirm-dialog-checkbox").is(":checked")&&TVSettings.setValue(e.dontAskSetting, !0);c();TVDialogs.destroy()}),TVDialogs.modalDialog.find(".cancel").click(function(){d&&d();TVDialogs.destroy()}),TVDialogs.positionDialog(),TVDialogs.applyHandlers())},showPrompt:function(a,b,c,d,e){function f(){var a=k.val();if(h){var b=h(a);if(b){!0===b&&(b="Wrong value");TVDialogs.showError(b,TVDialogs.modalDialog);return}}TVDialogs.destroy();c&&c(a)}var g=e&&e.defaultValue,h=e&&e.validate;TVDialogs.createModalDialog(a,e);TVDialogs.modalDialog.find(".tv-dialog").css("width","400px");TVDialogs.modalDialog.find(".tv-dialog-content").html('
'+ b+':
');var k=TVDialogs.modalDialog.find('[name="prompt-value"]');g&&k.val(g);TVDialogs.modalDialog.find("form").submit(function(a){f();a.preventDefault()});TVDialogs.modalDialog.find(".ok").click(function(a){f(); a.preventDefault()});TVDialogs.modalDialog.find(".cancel").click(function(){TVDialogs.destroy();d&&d(value)});TVDialogs.positionDialog();TVDialogs.applyHandlers();setTimeout(function(){k.focus().select()},0)},showCustomDialog:function(a){function b(b){var d=a.action(TVDialogs.modalDialog);d&&!d.error||void 0===d?TVDialogs.destroy():d.error&&TVDialogs.showError(d.error);b.preventDefault()}TVDialogs.createModalDialog(a.title||"Dialog");TVDialogs.modalDialog.find(".tv-dialog").css("width",a.width||"400px"); TVDialogs.modalDialog.find(".tv-dialog-content").html('
'+(a.html||"Content")+"
"+(a.noButtons?"":'
'+(a.noButtonOk?"":'')+(a.noButtonCnacel?"":'')+"
"));a.okButtonText&&TVDialogs.modalDialog.find(".ok").val(a.okButtonText);a.cancelButtonText&&TVDialogs.modalDialog.find(".cancel").val(a.cancelButtonText); TVDialogs.modalDialog.find(".ok").click(b);TVDialogs.modalDialog.find("form").submit(b);TVDialogs.modalDialog.find(".cancel").click(function(){TVDialogs.destroy()});TVDialogs.positionDialog();TVDialogs.applyHandlers();return TVDialogs.modalDialog},createModalDialog:function(a,b){b=b||{};null!==TVDialogs.modalDialog&&TVDialogs.destroy();TVDialogs.modalDialog=$('
'+(b.noHeader?"":'
'+ (b.noClose?"":'')+""+a+"
")+'
').appendTo($("body")).data("title",a);b.noShadowBox&&TVDialogs.modalDialog.addClass("transparent");b.zIndex&&TVDialogs.modalDialog.css("z-index",b.zIndex)},createDialog:function(a,b){if(TVDialogs.isOpen(a)){var c=TVDialogs.get(a);c.find(".tv-dialog-content").html("");c.data("new",!1);return c}b= b||{};c=$('
'+(b.hideTitle?'
'+(b.hideCloseCross?"":'')+"
":'
'+(b.hideCloseCross?"":'')+a+"
")+'
').appendTo($("body"));b.width&&c.css({width:b.width}); b.content&&c.find(".tv-dialog-content").html(b.content);c.css("z-index",TVDialogs.dialogs.length+110);c.data("new",!0);c.data("title",a);c.data("id",TVDialogs.dialogs.length+1);TVDialogs.dialogs.push({title:a,dialog:c,id:TVDialogs.dialogs.length+1});var d={start:function(a,b){for(var c=b.helper.css("z-index"),d=0,k=null,m=0;md&&(d=n,k=TVDialogs.dialogs[m].dialog)}b.helper.css("z-index",d);k.css("z-index",c)}};b.dragHandle? d.handle=b.dragHandle:b.hideTitle||(d.handle=".tv-dialog-title");c.draggable(d);return c},positionDialog:function(a,b){if(a){var c=a.width(),d=a.height(),e=$(window).width(),f=$(window).height();if(b&&b.top&&b.left)a.css({left:Math.max(2,Math.min(e-c-4,b.left))+"px",top:Math.max(2,Math.min(f-d-4,b.top))+"px"});else if(b&&b.considerScroll){var g=$(document);a.css({left:Math.round((e-c)/2+g.scrollLeft())+"px",top:Math.round((f-d)/2+g.scrollTop())+"px"})}else a.css({left:Math.round((e-c)/2)+"px",top:Math.round((f- d)/2)+"px"})}else a=TVDialogs.modalDialog,c=a.find(".tv-dialog"),c.css("margin-left",-Math.round(c.outerWidth()/2)+"px"),c.css("margin-top",-Math.round(c.outerHeight()/2)+"px")},applyHandlers:function(a,b,c,d){var e=a&&a!==this.modalDialog?function(){TVDialogs.destroy(a.data("title"))}:function(){TVDialogs.destroy()};a||(a=TVDialogs.modalDialog.find(".tv-dialog"));a.find(".tv-dialog-title .tv-dialog-title-close").on("click",e);setTimeout(function(){a.on("mousedownoutside",function(c){c=$(c.target).parents().andSelf(); d||b&&c.is(".tv-dialog-shadowbox")||c.is(".colorpicker, .charts-popup-list, .tvcolorpicker-popup, .symbol-edit-popup")||(a.unbind("mousedownoutside"),e())})},0);a.find('input[type="checkbox"]').change(function(){var a=$(this);a.next(".tv-dialog-checkbox-mask").toggleClass("disabled",a.prop("disabled")).toggleClass("tv-dialog-checkbox-mask-active",a.is(":checked"))});var f=a.find('input[type="text"]').focus(function(){$(this).addClass("tv-dialog-content-textactive")}).blur(function(){$(this).removeClass("tv-dialog-content-textactive")}).first(); Modernizr.touch||f.focus();a.find('input[type="password"]').focus(function(){$(this).addClass("tv-dialog-content-textactive")}).blur(function(){$(this).removeClass("tv-dialog-content-textactive")});a.find("textarea").focus(function(){$(this).addClass("tv-dialog-content-textareaactive")}).blur(function(){$(this).removeClass("tv-dialog-content-textareaactive")});a.find(".tv-dialog-checkbox-mask").click(function(){var a=$(this).prev();a.prop("disabled")||(a.prop("checked",!a[0].checked),a.change())}); $(".tv-dialog .tv-dialog-error").mouseenter(function(){$(this).animate({marginTop:TVDialogs.NOTIFICATION_ANIMATION_START_OFFSET,opacity:0},"fast",function(){$(".tv-dialog .tv-dialog-error").hide()});clearInterval(TVDialogs.messageInterval)});$(".tv-dialog .tv-dialog-message").mouseenter(function(){$(this).animate({marginTop:TVDialogs.NOTIFICATION_ANIMATION_START_OFFSET,opacity:0},"fast",function(){$(".tv-dialog .tv-dialog-message").hide()});clearInterval(TVDialogs.messageInterval)});c||$(window).bind("keyup.hideDialog", function(b){if("27"==b.keyCode)return a?TVDialogs.destroy(a.data("title")):TVDialogs.destroy(),!1})},showError:function(a,b){var c;b?(c=b.find(".tv-dialog-error"),b.width()):(c=$(".tv-dialog .tv-dialog-error"),$(".tv-dialog").width());c.text(a).css({marginTop:TVDialogs.NOTIFICATION_ANIMATION_START_OFFSET,left:"10px",right:"10px",opacity:"0"}).show().animate({marginTop:0,opacity:1},"fast");clearInterval(TVDialogs.messageInterval);TVDialogs.messageInterval=setInterval(function(){$(".tv-dialog .tv-dialog-error").animate({marginTop:TVDialogs.NOTIFICATION_ANIMATION_START_OFFSET, opacity:0},"fast",function(){$(".tv-dialog .tv-dialog-error").hide()});clearInterval(TVDialogs.messageInterval)},TVDialogs.messageDelay)},showMessage:function(a){$(".tv-dialog .tv-dialog-message").text(a).css({marginTop:TVDialogs.NOTIFICATION_ANIMATION_START_OFFSET,left:"10px",right:"10px",opacity:"0"}).show().animate({marginTop:0,opacity:1},"fast");clearInterval(TVDialogs.messageInterval);TVDialogs.messageInterval=setTimeout(function(){$(".tv-dialog .tv-dialog-message").animate({marginTop:TVDialogs.NOTIFICATION_ANIMATION_START_OFFSET, opacity:0},"fast",function(){$(".tv-dialog .tv-dialog-message").hide()});clearInterval(TVDialogs.messageInterval)},TVDialogs.messageDelay)},isOpen:function(a){for(var b=0;bc&&(d=Math.max(0,d-(a-c)),b.height(d))}};function ChartSaver(a){this._chartWidgetCollection=a}ChartSaver.prototype.saveToJSON=function(){return this._fillSavingInfo(!1,!0)}; ChartSaver.prototype._fillSavingInfo=function(a,b){a||(b=!0);var c={publish_request_id:Math.random().toString(36).substring(2)},d=this._chartWidgetCollection,e=d.activeChartWidget.value(),f=d.metaInfo,g=e.model().mainSeries(),h=g.properties(),k=g.symbolInfo();if(!(g&&g.symbolInfo()&&f&&k))throw new ReferenceError("Missed required data");f.id.value()&&(c.id=f.id.value());c.name=f.name.value()||"";c.description=f.description.value()||"";c.resolution=g.properties().interval.value();c.symbol_type=k.type|| "";c.exchange=k.exchange||"";c.listed_exchange=k.listed_exchange||"";g.isSpread()?(h=k.legs[0],f=k.base_name[0],f=f.split(":")[1],c.symbol=h,c.short_name=this.verifiedShortName(h,f,e),c.expression=k.full_name):(f=h.symbol.value(),h=h.shortName.value(),c.symbol=f,c.short_name=this.verifiedShortName(f,h,e));h=[];f=0;for(g=k.legs.length;f=a.description.length&&64>=a.name.length&&($.cookie("publish_request_id",h.publish_request_id,{path:"/"}),d=window.open("/loading/","_blank"))}}function b(a){e=!1;a=a.responseText;"ok:"===a.substr(0,3)?(a=a.substr(3),a=JSON.parse(a),c._chartWidgetCollection.metaInfo.id.value()|| c._chartWidgetCollection.metaInfo.id.setValue(a.id),c._dialogCtl&&c._dialogCtl.close(),c._lastPublishUrl=a.publishUrl,d&&(d.location=a.publishUrl)):(c._dialogCtl&&TVDialogs.showError(a||"Error occured while publishing",c._dialogCtl.dialog),d&&(d.close(),d=null))}var c=this;TradingView.trackEvent("GUI","Publish Chart");$(".publish-chart-button").removeClass("inprogress");c._dialogCtl?c._dialogCtl.show():c._dialogCtl=TVDialogs.showPublishChartDialog({chartWidgetCollection:this._chartWidgetCollection, onPublish:a,onMinimize:function(){$(".publish-chart-button").addClass("inprogress")},onDestroy:function(){delete c._dialogCtl;$(".publish-chart-button").removeClass("inprogress")},related:c._lastPublishUrl});var d=null,e=!1}; ChartSaver.prototype.verifiedShortName=function(a,b,c){b||(b="");c=c.model().mainSeries();var d;if(d=!c.isSpread()){var e=b,f=/^[1-9]\//;d=a.replace(f,"");e=e.replace(f,"");d=-1==d.indexOf(e)}d&&(b=a.substr(a.indexOf(":")+1),c.properties().shortName.setValue(b),TradingView.trackEvent("Chart","short_name differs from full_name"),console.error("short_name differs from full_name"));return b}; ChartSaver.prototype.saveChartSilently=function(a,b){var c=this._chartWidgetCollection.metaInfo,d=this._fillSavingInfo(b),e=this;$(window).on("beforeunload.savechart",function(){return $.t("Your chart is being saved, please wait a moment before you leave this page.")});$.post("/savechart/",d,function(b){"ok:"===b.substr(0,3)?(json=b.substr(3),res=JSON.parse(json),c.id.value()||(c.id.setValue(res.id),c.uid.setValue(res.uid)),"function"==typeof a&&a({uid:c.uid.value()},res.count||0)):$("#error").html(b); $(window).off("beforeunload.savechart")}).fail(function(){setTimeout(function(){e.saveChartSilently(a,b)},1E3)})};function takeSnapshot(a,b,c,d){d=d||{};var e={wl:d.wl,images:JSON.stringify(a.images()),previews:d.previews};if(d.cme||a.activeChartWidget.value().onCmeWidget())e.cme=!0;$.post(TradingView.isRunningChartingLibrary?"https://www.tradingview.com/snapshot/":"/snapshot/",e,function(a){a?b(a):c()}).fail(function(){c()})};TradingView.Tabs=function(a,b,c){this._$tabs=a;this._$pages=b;this.options=$.extend({},this._DEFAULT_OPTIONS,c||{});this.tabChanged=new Delegate;this.initActivePage();this.initHandlers()};TradingView.Tabs.prototype._DEFAULT_OPTIONS={saveTab:!1};TradingView.Tabs.prototype.initActivePage=function(){var a=0;this.options.saveTab&&(a=TVSettings.getInt(this.options.saveTab,0));this.setActivePage(a)}; TradingView.Tabs.prototype.setActivePage=function(a){this._$tabs.children().removeClass("active").eq(a).addClass("active");this._$pages.children().removeClass("active").eq(a).addClass("active");this.options.saveTab&&TVSettings.setValue(this.options.saveTab,a);this.tabChanged.fire(a)};TradingView.Tabs.prototype.initHandlers=function(){this._$tabs.on("click","*",this._onTabClick.bind(this))};TradingView.Tabs.prototype._onTabClick=function(a){a=$(a.currentTarget).index();this.setActivePage(a)}; TradingView.Tabs.prototype.addPage=function(a,b){var c=this.count();this._$tabs.append(a);this._$pages.append(b);c||this.setActivePage(0);return c};TradingView.Tabs.prototype.removePage=function(a){this._$tabs.children().eq(a).remove();this._$pages.children().eq(a).remove();a=this._$tabs.children().filter(".active").length?this._$tabs.children().filter(".active").index():0<=a-1?a-1:0;this.setActivePage(a)};TradingView.Tabs.prototype.count=function(){return this._$tabs.children().length}; TradingView.Tabs.prototype.index=function(){return this._$tabs.children().filter(".active:eq(0)").index()};TradingView.templates={index:{chartsSection:'',chartsSectionItem:''}, dialogs:{publishIntro:'

Publishing means sharing your chart and trading idea with the financial web and the investing community. A published idea needs to be detailed and descriptive in order to be meaningful to other traders.

In effort to make TradingView more useful to a larger number of users, moderators have the right to hide ideas with bad descriptions or not informative from the front page and the gallery. We are NOT limiting any ways of publishing or using TradingView charts. You can still create and publish any kind of charts; your profile and Activity Stream will still show all created charts.

The best ideas are placed in the Suggested tab, where they receive extra exposure. All suggested ideas are hand-picked by our editorial team based on a number of criteria. We have a dedicated group of people who review every idea published every day to find the most interesting and informative ideas that will be helpful to other members.

Following below suggestions will help get your ideas suggested:

  • A clear title that describes your idea. Don\u2019t just write \u201cMSFT\u201d or \u201cMSFT Short\u201d. A title like this doesn\u2019t say much and won\u2019t attract much interest to your idea.
  • A description that clearly states your idea. Describe what you think and WHY you think that. Good fundamental analysis always helps. Put yourself in reader\u2019s shoes and see if you\u2019d understand the context based on what you wrote. It\u2019s also a good idea to re-post descriptions right on the chart, so your idea can be shared without losing meaning.
  • Long-term intervals are better than short-term ones for publishing analysis. An idea on 1 minute bars will probably become obsolete by the time people read it. However a good idea may still be featured.
  • Clearly state Profit Target and Stop Loss areas if you are making a prediction. This significantly helps others understand what you meant.
  • Presentation is important. Too much clutter adds to confusion.

In short, the more understandable and interesting your ideas are, the more you\u2019ll gain respect of others and get discovered by the financial community. We\u2019ll do our best to help showcase good ideas.

Some authors that we recommend get marked as Suggested Authors, and their ideas get posted to the front page automatically. The basis for recommending authors is multiple factors, which include a large number of interesting ideas. A suggested author has a corresponding badge in their profile.

', publishChart:'
CHART TITLE*
MARKET DIRECTION PREDICTION
DESCRIPTION*
LINK TO RELATED IDEAS
TAGS
Repost to
PUBLISH IDEACancel
', goPro:{layout:'
No, thank you{{^trialButton}}Upgrade now{{/trialButton}}{{#trialButton}}30 Day Free Trial{{/trialButton}}

Why Go Pro?

  • AMEX, NYSE & NASDAQ Real-time
  • Intraday Renko, Kagi, Line Break, PnF charts
  • Intraday Spread Charts
  • Volume Profile Indicators
  • Custom Intervals
  • Multiple Watch Lists
  • Hot Lists
  • PRO Badge & Adding Value
  • Private Chart Publishing
  • Extended Trading Hours
  • Multiple Charts Layout
', defaultCopy:"

Upgrade your account

This functionality is available only to PRO users.

Please consider subscribing to our PRO service which includes many other features not available in the free membership.

",features:{proRtSymbol:"

Official AMEX, NYSE & NASDAQ Real-time Data

You requested a symbol that is available only to PRO-RealTime users. You will now be switched to the equivalent BATS symbol.

NASDAQ and NYSE charge exchange and per-user fees, which means we can\u2019t give this for free to everyone (as much as we'd love to). Our free feed is provided by BATS electronic exchange, which offers approximate volumes and prices with fewer updates.

If you need only the most complete and accurate data, then consider subscribing to the PRO-RealTime service for only $19.95/m that offers actual real-time data from the NYSE/NASDAQ/AMEX exchanges and much more.

", kagiRenko:"

Renko, Kagi, Line Break, Point & Figure

Only PRO-RealTime subscribers can access intraday Renko, Kagi, Line Break, Point & Figure charts. You will now be switched to a Daily (D) interval.

Intraday Renko, Kagi, Line Break and Point & Figure charts take considerable resources, so we can't give them out for free to everyone (as much as we'd like to). We can, however, give out these charts for free in the Daily and Weekly resolutions.

If you do intraday analysis consider subscribing to PRO-RealTime service for only $19.95/m. This subscription also includes real-time and historical data from NYSE, NASDAQ and AMEX exchanges, which means you get the most complete and accurate stock data.

", hotLists:"

Hot Lists

You requested a hotlist that is available only to PRO users.

HotLists continuously scan the US stock market to identify best trading opportunities and take considerable resources, so we can't give them out for free to everyone (as much as we'd like to).

If you want to identify opportunities in an efficient manner, consider subscribing to our PRO service for only $9.95/m. This subscription includes many other features not available in the free membership.

", intradaySpread:"

Intraday Spread

You requested an intraday spread symbol that is available only to PRO-RealTime users. You will now be switched to a Daily (D) interval.

Spreads for intraday charts are calculated based on 1-minute bars, and then recompiled into the selected interval. This approach is the only correct one, but requires significant server power. This means we can't give spread charts for free to everyone (as much as we'd like to).

If you do intraday spread analysis consider subscribing to PRO-RealTime service for only $19.95/m. This subscription also includes real-time and historical data from NYSE, NASDAQ and AMEX exchanges, which means you get the most complete and accurate data.

", customIntervals:"

Custom Intervals

You requested a custom interval that is available only to PRO users.

This feature allows you to create any chart, such as 7 minutes, 12 minutes, or 8 hours. If you want to identify opportunities on custom intervals in an efficient manner, consider subscribing to our PRO service for only $9.95/m. This subscription includes many other features not available in the free membership.

",multipleWatchLists:"

Multiple Watch Lists

Multiple Watch Lists available only to PRO users.

Any custom watchlist can be saved under a unique name and loaded at any time with one click. All lists are available from any computer, so you have your workspace wherever you go.

If you want to use different watchlists to quickly assess different sectors of the market, consider subscribing to our PRO service for only $9.95/m. This subscription includes many other features not available in the free membership.

", extendedHours:"

Extended Trading Hours

Only PRO-RealTime subscibers can access extended hours data on the charts. Extended trading hours include both pre-market and after hours sessions each day the market is open.

If you want to act quickly to news and events that occur when the regular market is closed, please consider subscribing to PRO-RealTime service for only $19.95/m. This subscription also includes real-time and historical data from NYSE, NASDAQ and AMEX exchanges, which means you get the most complete and accurate stock data.

", multipleCharts:"

Multiple Charts Layout

Multiple Charts Layout available only to PRO users.

You can plot up to 8 charts in one tab of your browser. Moreover, it\u2019s possible to link your charts by resolutions or symbols. And even use global cursor that synchronizes many charts.

If you want to unlock the power of multiple time frame analysis and add multiple symbols to the same chart layout, consider subscribing to our PRO service for only $9.95/m. This subscription includes many other features not available in the free membership.

", privateCharts:"

Private Chart Publishing

Private chart publishing is available only to PRO users.

Don't want to share your published research with everyone? With this feature you can publish charts without them going into the public gallery, and share the research only with the people that you want. Providers that have premium/paid sections on their websites can share certain ideas only with their subscribers.

"}},addSymbol:'
{{#overlayOption}}
\t\t\t
{{/overlayOption}}
{{okButtonTitle}}
', billingCycleSelection:'
Subscription Plans
You\'re subscribing to {{ product_title }}
Buy Annual

${{price_1_m}} per month

${{price_1_y}} per year

Save ${{savings}}

No monthly invoices

Buy Monthly

${{price_2_m}} per month

${{price_2_y}} per year

Invoiced every month

', symbolSearch:'
',proRTTrialOffer:'

Your Personal Invitation to Go PROREALTIME

For a limited time, we\u2019re offering a FREE 1 month subscription of ProRealTime (no credit card required, no catches or hidden autobilling).

Our ProRealTime users see amazing benefits. You get advanced trading opportunities using multi symbol statistical arbitrage techniques. Read more about ProRealTime features.

', earlyAccess:'

Early Access 50% off{{#is_finished}} – Final chance{{/is_finished}}

{{#is_1wk}}

So… You\u2019ve had free ProRealTime for a week now. Seeing the advantages?

  • Official market data makes ProRealTime users see accurate market conditions
  • Advanced charting removes noise and focuses on trends that matter
  • Shows everyone that you support the community!

If you like what you see, you have an exclusive chance to get 12 months for only $179. That\u2019s less than $15/month and 50% off regular month-to-month payments.

Do you want to take advantage of this offer now?

{{/is_1wk}}{{#is_2wk}}

Oh no! You have only 2 weeks left in your ProRealTime trial! These benefits will expire in two short weeks:

  • Official market data for ProRealTime with exact market conditions
  • Advanced charting that removes noise and shows trends that matter
  • Custom indexes and hotlists for staying on top of the market.

Just for you, we made a special deal that let\u2019s you continue for another 12 months for only $179. That\u2019s less than $15/month and 50% off regular month-to-month payments.

Low price available now – don\u2019t miss this chance!

{{/is_2wk}}{{#is_finished}}

Don\u2019t cry… but your free ProRealTime trial has ended! We hope you benefited from useful features and felt good about yourself for supporting the community.

Now is your LAST and FINAL chance to get 12 months for only $179 (regular $239). That\u2019s less than $15/month and 50% off regular month-to-month payments.

Remember, with ProRealTime you benefit from:

  • Official market data ProRealTime that shows you most accurate market conditions
  • Advanced charting removes noise and focuses on trends that matter
  • Stay on top of who is \u201chot or not\u201d in the market with HotLists
  • Everyone loves you because you support the community!

Don\u2019t miss the last chance to get the special Early Access and secure this low rate! Act now!

{{/is_finished}}{{#is_manual}}

Upgrade and get 50% off regular month-to-month payments!

Just for you, we made a special deal that let\u2019s you continue for another 12 months for only $179. That is less than $15/month. Don\u2019t miss the last chance to get the special Early Access and secure this low rate! Act now!

{{/is_manual}}
', auth:'

Recover Password

'}, charts:{chart:'
{{#nopublic}}{{#canDelete}}{{/canDelete}}{{/nopublic}}
{{ chart.creation_date_timestamp }}
{{chart.name}}
{{>iconedFollowSymbolButton}}{{ chart.short_name }}, {{ chart.interval }} {{#direction_name}}{{chart.direction}}{{/direction_name}}
{{#nopublic}}non public{{/nopublic}} {{chart.comments}} {{chart.views_count}}
{{> chartBadges}} {{clean_name}}
{{{clean_desc}}}
', followedChart:'
{{ chart.creation_date_timestamp }}
{{#canFollow}}{{#chart.user.follow_status}}{{/chart.user.follow_status}}{{^chart.user.follow_status}}{{/chart.user.follow_status}}{{/canFollow}} {{#chart.user}}{{> userlink}}{{/chart.user}}{{chart.user.followers_count}}{{chart.user.published_charts_count}}
{{chart.name}}
{{>iconedFollowSymbolButton}}{{ chart.short_name }}, {{ chart.interval }} {{#direction_name}}{{chart.direction}}{{/direction_name}}
{{&agree}} {{chart.comments}} {{chart.views_count}}
{{> chartBadges}} {{clean_name}}
{{{clean_desc}}}
', timelineChart:"
{{& event.message }}
{{ event.date_timestamp }}
{{#event.chart}}
{{^event.comment}}\t{{ event.chart.descr }}{{/event.comment}}{{#event.comment}}\t{{& event.comment }}{{/event.comment}}
{{/event.chart}}{{#event.isChart}}
{{ event.chart.comments }}{{ event.chart.views_count }}
{{>iconedFollowSymbolButton}}{{ event.chart.short_name }}, {{ event.chart.interval }}{{#direction_name}}{{event.chart.direction}}{{/direction_name}}
{{/event.isChart}}
"}, relates:{relate:''}, followingSymbol:'',lists:{savedCharts:""}, gallery:{item:"
{{symbol}}, {{interval}} {{views_count}}
",tooltip:"
{{created_timestamp}}
{{> chartBadges}}
{{&clean_name}}
{{&clean_desc}}
"}, userlink:"{{username}}{{> userBadge}}",userBadge:"{{#is_moderator}}{{> modBadge}}{{/is_moderator}}{{^is_moderator}}{{#is_pro}}{{> proBadge}}{{/is_pro}}{{/is_moderator}}",proBadge:"<{{badge_tag}}{{^badge_tag}}a href='/gopro/'{{/badge_tag}} class='user-badge pro{{#is_realtime}} realtime{{/is_realtime}}{{#is_trial}} trial{{/is_trial}}{{#large_badge}} large{{/large_badge}}' title='Pro{{#is_realtime}} Realtime{{/is_realtime}}{{#is_trial}} Trial{{/is_trial}}'>{{#large_badge}}pro{{/large_badge}}", modBadge:"<{{badge_tag}}{{^badge_tag}}a href='/house-rules/'{{/badge_tag}} class='user-badge mod{{#large_badge}} large{{/large_badge}}' title='Moderator'>mod",chartBadges:'{{#is_hot}}{{/is_hot}}',iconedFollowSymbolButton:'{{#pro_symbol}}{{/pro_symbol}}', globalNotification:'
{{{ text }}}
',actionsLog:'
{{#is_system}}system{{/is_system}}{{^is_system}}{{username}}{{/is_system}}
{{ created_timestamp }}
{{{text}}}
', onChartMessage:'
',userlinkPopup:'', miniWidgetWizardAddSymbol:'
'};TradingView.postMessageWrapper=function(){var a={},b={},c={},d,e=0,f=0;window.addEventListener&&window.addEventListener("message",function(c){var e;try{e=JSON.parse(c.data)}catch(f){return}e.provider&&"TradingView"==e.provider&&("get"==e.type&&b[e.name]?b[e.name].call(e,e.data,function(a){d.postMessage(JSON.stringify({id:e.id,type:"on",name:e.name,client_id:e.client_id,data:a,provider:"TradingView"}),"*")}):"on"==e.type?a[e.client_id]&&a[e.client_id][e.id]&&(a[e.client_id][e.id].call(e,e.data),delete a[e.client_id][e.id]): "post"==e.type&&"function"===typeof b[e.name]&&b[e.name].call(e,e.data,function(){}))});return function(g,h){a[h]={};d=c[h]=g;return{on:function(a,c){b[a]=c},get:function(b,d,f){b={id:e++,type:"get",name:b,client_id:h,data:d,provider:"TradingView"};a[h][b.id]=f;c[h].postMessage(JSON.stringify(b),"*")},post:function(a,b,c){b={id:f++,type:"post",name:b,data:c,provider:"TradingView"};a&&"function"===typeof a.postMessage&&a.postMessage(JSON.stringify(b),"*")}}}}();TradingView.Linking=function(){function a(a,h){function n(l){function q(b){w.value()!==b&&(h?h.setSymbol(b):a.setSymbol(b))}function s(){b.setValue(w.value())}function B(){c.setValue(A.shortName.value());var a=C.symbolInfo();a?e.setValue(!!a.has_intraday):e.deleteValue()}function v(b){E.value()!==b&&(h?h.setResolution(b):a.setResolution(b))}function z(){d.setValue(E.value())}a.modelCreated().unsubscribe(null,n);var C=a.model().mainSeries(),A=C.properties(),w=A.symbol;w.subscribe(null,s);b.setValue(w.value()); b.subscribe(q);C.onSymbolResolved().subscribe(null,B);C.onSymbolError().subscribe(null,B);B();var E=A.interval;E.subscribe(null,z);d.setValue(E.value());d.subscribe(v);a.readOnly()&&(b.writeLock=!0);f=function(){w.unsubscribe(null,s);b.unsubscribe(q);C.onSymbolResolved().unsubscribe(null,B);C.onSymbolError().unsubscribe(null,B);E.unsubscribe(null,z);d.unsubscribe(v);delete b.writeLock;f=new Function;g=new Function}}f();g=function(){return a};var q=a.model();q?n(q):(a.modelCreated().subscribe(null, n),f=function(){a.modelCreated().unsubscribe(null,n);f=new Function;g=new Function})}var b=new WatchedValue,c=new WatchedValue,d=new WatchedValue,e=new WatchedValue,f=new Function,g=new Function,h=new Function;return{symbol:b,seriesShortSymbol:c.readonly(),interval:d,intraday:e.readonly(),bindToChartWidget:a,unbindFromChartWidget:function(){f()},getChartWidget:function(){return g()},bindToSearchCharts:function(a){function c(a){e=!0;b.setValue(a.resolved_symbol);e=!1}function d(b){e||a.search(b)}h(); var e=!1;a.onSearchBySymbol.subscribe(null,c);b.subscribe(d);h=function(){a.onSearchBySymbol.unsubscribe(null,c);b.unsubscribe(d);h=new Function}},unbindFromSearchCharts:function(){h()},bindToChartWidgetCollection:function(b){f();b.activeChartWidget.subscribe(function(c){f();a(c,b)},{callWithLast:!0})}}}();function linkingSetSymbol(a){a&&"string"===typeof a&&($(".header-chart-panel .symbol-edit-wrap input").val(TradingView.SymbolParser.shortName(a)),TradingView.Linking.symbol.setValue(a))};TradingView.FeatureToggle={force_prefix:"forcefeaturetoggle.",enableFeature:function(a){localStorage[this.force_prefix+a]="true"},disableFeature:function(a){localStorage.removeItem(this.force_prefix+a)}}; TradingView.isFeatureEnabled=function(a){if(TradingView.pushStreamMultiplexer)TradingView.pushStreamMultiplexer.on("featuretoggle",function(b){a[b.name]=b.state;localStorage["featuretoggle."+b.name]=Math.random()<=a[b.name]});return function(b){if("true"===localStorage[TradingView.FeatureToggle.force_prefix+b])return!0;if(!a[b])return!1;if(1===a[b])return!0;var c=localStorage["featuretoggle."+b];return void 0===c||null===c?localStorage["featuretoggle."+b]=Math.random()<=a[b]:"true"===c}}(window.featureToggleState|| {});(function(a){if(document.createElement("canvas")&&document.createElement("canvas").getContext){var b=function(b){return(a.devicePixelRatio||1)/(b.backingStorePixelRatio||b.webkitBackingStorePixelRatio||b.mozBackingStorePixelRatio||b.msBackingStorePixelRatio||b.oBackingStorePixelRatio||b.backingStorePixelRatio||1)}(document.createElement("canvas").getContext("2d"));if(/hidpi/.test(location.hash)||2==b&&/Macintosh/.test(navigator.userAgent)&&TradingView.isFeatureEnabled("hidpi_canvas")&&!(2880c){if(k=m-1,kb?NaN:this.startOfBar(b)}function e(a,b){this.period=a;this.session=b;this.sessionEnd=this.sessionStart=Number.MIN_VALUE}function f(a,b,c,d){this.period=c;this.sessionTgt=a;this.sessionSrc=b||a;this.builder=d;this.periodStart=-Number.MAX_VALUE;this.periodEnd=-Number.MAX_VALUE;this.periodLastBarStart=-Number.MAX_VALUE}function g(a,b){var c=D.get_day_of_week(b),d=D.get_minutes_from_midnight(b),d=a.findSession(c,d),e=d.start(), f=d.dayOfWeek(),g=d.isOvernight(),c=(f-c+7)%7-(g?1:0);0!==c&&D.add_date(b,c);D.set_hms(b,e/60|0,e%60,0,0);return d.length()}function h(a,b){var c=D.get_day_of_week(b),d=D.get_minutes_from_midnight(b);a.findSession(c,d).isOvernight()&&D.add_date(b,1);D.set_hms(b,0,0,0,0);return b}function k(a,b,c){c=D.clone(c);g(b,c);return D.cal_to_utc(a,c)}function m(a){a=D.get_day_of_week(a)-D.MONDAY;return 0>a?6:a}function n(a,b){var c=D.get_day_of_year(a)-1,d=m(a)-c%7;if(0===d)return c;0>d&&(d+=7);b&&(d-=7);return d+ c}function q(){}function l(){}function u(a){this.session=a}function s(){}function B(){}function v(a,b,c){this._dayOfWeek=a;this._start=b;this._length=c}function z(a,b){return a.compareTo(b)}function C(a){a=a||"0000-0000";this.entries=[];if("24x7"===a.toLowerCase())this.isTradedOnWeekEnds=!0,G.forEach(function(a){this.addSessionEntry(a,0,0)},this);else{var b=this.isTradedOnWeekEnds=!1,c={};a.split("|").forEach(function(a){var d=a.split(":");1!==d.length&&2!==d.length&&console.error("bad session section: "+ a);var e=1===d.length;e&&(b&&console.error("duplicated default section: "+a),b=!0);(e?J:A(d[1])).forEach(function(a){e&&c[a]||(c[a]=d[0])},this)},this);J.forEach(function(b){var d=c[b];void 0===d&&(console.error("no session defined for weekday (1-Sunday ... 7-Saturday): "+b),d="0000-0000");d.split(",").forEach(function(c){var d=c.split("-");2!==d.length&&(console.error("bad sessions spec: "+a),d=["0000","0000"]);c=parseInt(d[0]);d=parseInt(d[1]);this.addSessionEntry(b,c%100+60*(c/100|0),d%100+60* (d/100|0))},this)},this)}this.entries.sort(z)}function A(a){for(var b=[],c=0;cD.FRIDAY)&&console.error("bad day of week (valid 2-Monday ... 6-Friday): "+d);-1===b.indexOf(d)&&b.push(d)}return b}function w(){}function E(a,b,c){var d=a.length;if(0===d)return-1;for(var e=0,f=d-1,g=(e+f)/2|0;;){var h=c(a[g],b);if(0===h||0=this.sessionEnd?I:D.time_minutes_diff(a,this.sessionStart)/this.period|0};e.prototype.startOfBar=function(a){return a===I?this.sessionEnd:this.sessionStart+D.time_minutes(this.period*a)};e.prototype.isLastBar=function(a,b){var c=this.sessionStart+D.time_minutes(this.period*(a+1)-1);return b>=c};e.prototype.moveTo=function(a){var b=this.session.timezone;a=D.utc_to_cal(b,a);var c=g(this.session.spec, a);this.sessionStart=D.cal_to_utc(b,a);this.sessionEnd=this.sessionStart+D.time_minutes(c)};f.prototype.alignTime=d;f.prototype.indexOfBar=function(a){return a=this.periodEnd?I:0};f.prototype.startOfBar=function(a){return a===I||0=this.periodLastBarStart};f.prototype.moveTo=function(a){a=D.utc_to_cal(this.sessionSrc.timezone,a);a=h(this.sessionSrc.spec,a);var b=D.get_year(a), c=(this.builder.indexOfPeriod(a)/this.period|0)*this.period,d=c+this.period;a=this.sessionTgt.spec;var e=this.sessionTgt.timezone;this.periodStart=k(e,a,this.builder.startOfPeriod(e,c,b));b=this.builder.startOfPeriod(e,d,b);this.periodEnd=k(e,a,b);c=1;if(!a.isTradedOnWeekEnds)switch(m(b)){case 0:c+=2;break;case 6:c+=1}D.add_date(b,-c);this.periodLastBarStart=k(e,a,b);if(this.periodLastBarStarte)return this.startOfPeriod(a,0,c+1);D.add_date(d,b);return d};B.prototype.indexOfPeriod=function(a){return D.get_month(a)}; B.prototype.startOfPeriod=function(a,b,c){if(0>b){var d=(-b+11)/12|0;c-=d;b+=12*d}if(b>D.DECEMBER)return D.get_cal(a,c+1,D.JANUARY,1);a=D.get_cal(a,c,b,1);b=m(a);4this._start?this._start+D.minutesPerDay:this._start};v.prototype.isOvernight=function(){return 0>this._start};v.prototype.dayOfWeek=function(){return this._dayOfWeek};v.prototype.length=function(){return this._length};v.prototype.weight=function(){return this._dayOfWeek* D.minutesPerDay+this._start};v.prototype.compareTo=function(a){var b=this.weight(),c=b+this._length;a=a.weight();return b<=a&&aa?1:-1};var J=[D.MONDAY,D.TUESDAY,D.WEDNESDAY,D.THURSDAY,D.FRIDAY],G=[D.SUNDAY,D.MONDAY,D.TUESDAY,D.WEDNESDAY,D.THURSDAY,D.FRIDAY,D.SATURDAY];C.prototype.addSessionEntry=function(a,b,c){c<=b&&0!=b&&(b-=D.minutesPerDay);this.entries.push(new v(a,b,c==b?D.minutesPerDay:c-b))};C.prototype.indexOfSession=function(a,b){var c=E(this.entries,new v(a,b,0),z);return-1===c?0: c};C.prototype.findSession=function(a,b){return this.entries[this.indexOfSession(a,b)]};w.prototype.init=function(a,b){this.timezone=a;this.spec=new C(b);return this};var K={PRE_SESSION:F,POST_SESSION:I,LASTBAR_SESSION:-3,newBarBuilder:a,Session:w,alignPeriodsBack:function(a,c,d,e,f){a=D.get_timezone(a);var g=(new w).init(a,c);c=g.spec;d=b(d,g);f=D.utc_to_cal(a,f);g=h(c,f);f=D.get_year(g);e=d.indexOfPeriod(g)-e;return k(a,c,d.startOfPeriod(a,e,f))},extrapolateBarsByCount:function(a,b,d,e,f,g){return c(a, b,d,e,f,function(a,b){return a.length>=g})},extrapolateBarsToTime:function(a,b,d,e,f,g){return c(a,b,d,e,f,function(a,b){return b>g})},lower_bound:E};"undefined"!==typeof module&&module.exports?module.exports=K:this.PineJsBarBuilder=K}).call(this);(function(){function a(a,b,c,d,e){c=e;e=0;if(isNaN(a.get(b-1)))return{index:NaN,value:NaN};for(var f=0;f= Math.abs(a)},toBool:function(a){return isFinite(a)&&!s.isZero(a)},eq:function(a,b){return s.isZero(a-b)},neq:function(a,b){return!s.eq(a,b)},ge:function(a,b){return s.isZero(a-b)||a>b},gt:function(a,b){return!s.isZero(a-b)&&a>b},lt:function(a,b){return!s.isZero(a-b)&&aa-b?-1:0==a-b?0:1);return!isNaN(a.get(1))&&a.get(1)!=a.get()};s.linreg=function(a,b,c){for(var d=0,e=0,f=0,g=0,h=0;h=this.hist.length?(console.error("not enough depth: "+this),NaN):this._get(a):(this.mindepth=s.max(this.mindepth,a),NaN)};d.prototype._get=function(a){a=this.hist_pos- a;0>a&&(a+=this.hist.length);return this.hist[a]};d.prototype.set=function(a){this.hist&&(this.hist[this.hist_pos]=a,this.modified=!0)};d.prototype.prepare=function(a){a===this.symbol&&(a.isNewBar?(this.original=this.get(0),!this.modified&&this.hist||this.add_hist()):this.set(this.original),this.modified=!1)};d.prototype.add_hist=function(){if(!this.hist){for(var a=s.na(this.mindepth)?s.max_series_size:s.min(this.mindepth+1,s.max_series_size),a=Math.round(a),b=Array(a),c=0;cd?NaN:this._get(d)};d.prototype.indexOf=function(a){if(!this.hist)return this.mindepth=NaN,-1;if(s.na(a))return-1;for(var b=this.symbol.index+1,c=this.hist.length,d=0,b=(b>c?c:b)-1,c=(b+d)/2|0;;){if(this._get(c)>a){if(d=c+1,d>b)return c+ 1}else if(b=c-1,d>b)return c;c=(b+d)/2|0}};e.parseTicker=function(a){var b=a.indexOf(":");return-1===b?a:a.substr(b+1)};e.parsePeriod=function(a){var b=!1,c=a[a.length-1];-1==="DWM".indexOf(c)&&(b=!0,c="");a=parseInt(b?a:1b?1:a.value[0]b?1:a=b||!c._shouldExtrapolateMore())return null;var e=b-c._extrapolatedBars.length,f=PineJS.Symbol.parsePeriod(c._resolution);return PineJsBarBuilder.extrapolateBarsByCount(f.resolution,f.interval,a.timezone,a.session,d,e)})}; JSServer.Extrapolator.prototype.ensureExtrapolatedToTime=function(a,b){var c=this;return this._extrapolateData(a,function(d){if(d>=b||!c._shouldExtrapolateMore())return null;var e=PineJS.Symbol.parsePeriod(c._resolution);return PineJsBarBuilder.extrapolateBarsToTime(e.resolution,e.interval,a.timezone,a.session,d,b)})};JSServer.Extrapolator.prototype._shouldExtrapolateMore=function(){return 100>this._extrapolatedBars.length}; JSServer.Extrapolator.prototype.setLastBarTime=function(a,b){this._lastRealBarTime=b;this._lastRealBarIndex=a;for(var c=0;cc||d>m[c].value[0])?m.push({index:m.length,value:[d].concat(e)}):m[c].value=[d].concat(e);k||g([m[m.length-1]],f,c,n,u)},recalc:function(){k=!1;f(m,0
{{symbol}}{{description}}