diff --git a/charting_library/charting_library.min.js b/charting_library/charting_library.min.js index 0f041a3a..96994a08 100644 --- a/charting_library/charting_library.min.js +++ b/charting_library/charting_library.min.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.TradingView=t.TradingView||{})}(this,function(t){"use strict";function e(t,o){var i=n({},t);for(var s in o)"object"!=typeof t[s]||null===t[s]||Array.isArray(t[s])?void 0!==o[s]&&(i[s]=o[s]):i[s]=e(t[s],o[s]);return i}function o(){return"1.12 (internal id e816a7a6 @ 2018-03-26 08:21:11.837530)"}function i(t){window.addEventListener("DOMContentLoaded",t,!1)}var n=Object.assign||function(t){for(var e,o=arguments,i=1,n=arguments.length;i'},t}(),d=a;window.TradingView=window.TradingView||{},window.TradingView.version=o,t.version=o,t.onready=i,t.widget=d,Object.defineProperty(t,"__esModule",{value:!0})}); +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.TradingView=t.TradingView||{})}(this,function(t){"use strict";function e(t,o){var i=n({},t);for(var s in o)"object"!=typeof t[s]||null===t[s]||Array.isArray(t[s])?void 0!==o[s]&&(i[s]=o[s]):i[s]=e(t[s],o[s]);return i}function o(){return"1.12 (internal id 7580da73 @ 2018-05-14 05:13:04.428607)"}function i(t){window.addEventListener("DOMContentLoaded",t,!1)}var n=Object.assign||function(t){for(var e,o=arguments,i=1,n=arguments.length;i'},t}(),d=a;window.TradingView=window.TradingView||{},window.TradingView.version=o,t.version=o,t.onready=i,t.widget=d,Object.defineProperty(t,"__esModule",{value:!0})}); diff --git a/charting_library/static/bundles/13.416855bb3e77f54b85bc.js b/charting_library/static/bundles/13.280894673316ad6ac6f2.js similarity index 97% rename from charting_library/static/bundles/13.416855bb3e77f54b85bc.js rename to charting_library/static/bundles/13.280894673316ad6ac6f2.js index c8625e03..7fd3a6ad 100644 --- a/charting_library/static/bundles/13.416855bb3e77f54b85bc.js +++ b/charting_library/static/bundles/13.280894673316ad6ac6f2.js @@ -1,4 +1,4 @@ -webpackJsonp([13],{334:function(t,e,n){var o,i,r;!function(a,c){i=[t,n(516),n(1091),n(687)],o=c,void 0!==(r="function"==typeof o?o.apply(e,i):o)&&(t.exports=r)}(0,function(t,e,n,o){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function u(t,e){var n="data-clipboard-"+t;if(e.hasAttribute(n))return e.getAttribute(n)}var l=i(e),s=i(n),f=i(o),h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d=function(){function t(t,e){var n,o;for(n=0;n0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===h(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=(0,f.default)(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new l.default({action:this.action(e),target:this.target(e),text:this.text(e),container:this.container,trigger:e,emitter:this})}},{key:"defaultAction",value:function(t){return u("action",t)}},{key:"defaultTarget",value:function(t){var e=u("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return u("text",t)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],e="string"==typeof t?[t]:t,n=!!document.queryCommandSupported;return e.forEach(function(t){n=n&&!!document.queryCommandSupported(t)}),n}}]),e}(s.default);t.exports=p})},516:function(t,e,n){var o,i,r;!function(a,c){i=[t,n(1090)],o=c, +webpackJsonp([13],{334:function(t,e,n){var o,i,r;!function(a,c){i=[t,n(516),n(1092),n(687)],o=c,void 0!==(r="function"==typeof o?o.apply(e,i):o)&&(t.exports=r)}(0,function(t,e,n,o){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function u(t,e){var n="data-clipboard-"+t;if(e.hasAttribute(n))return e.getAttribute(n)}var l=i(e),s=i(n),f=i(o),h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d=function(){function t(t,e){var n,o;for(n=0;n0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===h(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=(0,f.default)(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new l.default({action:this.action(e),target:this.target(e),text:this.text(e),container:this.container,trigger:e,emitter:this})}},{key:"defaultAction",value:function(t){return u("action",t)}},{key:"defaultTarget",value:function(t){var e=u("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return u("text",t)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],e="string"==typeof t?[t]:t,n=!!document.queryCommandSupported;return e.forEach(function(t){n=n&&!!document.queryCommandSupported(t)}),n}}]),e}(s.default);t.exports=p})},516:function(t,e,n){var o,i,r;!function(a,c){i=[t,n(1091)],o=c, void 0!==(r="function"==typeof o?o.apply(e,i):o)&&(t.exports=r)}(0,function(t,e){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=n(e),r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a=function(){function t(t,e){var n,o;for(n=0;n0&&void 0!==arguments[0]?arguments[0]:{};this.action=t.action,this.container=t.container,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var t,e=this,n="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return e.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[n?"right":"left"]="-9999px",t=window.pageYOffset||document.documentElement.scrollTop,this.fakeElem.style.top=t+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=(0,i.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,i.default)(this.target),this.copyText()}},{key:"copyText",value:function(){var t=void 0;try{t=document.execCommand(this.action)}catch(e){t=!1}this.handleResult(t)}},{key:"handleResult",value:function(t){this.emitter.emit(t?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=t,"copy"!==this._action&&"cut"!==this._action)throw Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target", -set:function(t){if(void 0!==t){if(!t||"object"!==(void 0===t?"undefined":r(t))||1!==t.nodeType)throw Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&t.hasAttribute("disabled"))throw Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(t.hasAttribute("readonly")||t.hasAttribute("disabled")))throw Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=t}},get:function(){return this._target}}]),t}();t.exports=c})},613:function(t,e){function n(t,e){for(;t&&t.nodeType!==i;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}var o,i=9;"undefined"==typeof Element||Element.prototype.matches||(o=Element.prototype,o.matches=o.matchesSelector||o.mozMatchesSelector||o.msMatchesSelector||o.oMatchesSelector||o.webkitMatchesSelector),t.exports=n},614:function(t,e,n){function o(t,e,n,o,i){var a=r.apply(this,arguments);return t.addEventListener(n,a,i),{destroy:function(){t.removeEventListener(n,a,i)}}}function i(t,e,n,i,r){return"function"==typeof t.addEventListener?o.apply(null,arguments):"function"==typeof n?o.bind(null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,function(t){return o(t,e,n,i,r)}))}function r(t,e,n,o){return function(n){n.delegateTarget=a(n.target,e),n.delegateTarget&&o.call(t,n)}}var a=n(613);t.exports=i},686:function(t,e){e.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},e.nodeList=function(t){var n=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in t&&(0===t.length||e.node(t[0]))},e.string=function(t){return"string"==typeof t||t instanceof String},e.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},687:function(t,e,n){function o(t,e,n){if(!t&&!e&&!n)throw Error("Missing required arguments");if(!c.string(e))throw new TypeError("Second argument must be a String");if(!c.fn(n))throw new TypeError("Third argument must be a Function");if(c.node(t))return i(t,e,n);if(c.nodeList(t))return r(t,e,n);if(c.string(t))return a(t,e,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function i(t,e,n){return t.addEventListener(e,n),{destroy:function(){t.removeEventListener(e,n)}}}function r(t,e,n){return Array.prototype.forEach.call(t,function(t){t.addEventListener(e,n)}),{destroy:function(){Array.prototype.forEach.call(t,function(t){t.removeEventListener(e,n)})}}}function a(t,e,n){return u(document.body,t,e,n)}var c=n(686),u=n(614);t.exports=o},1090:function(t,e){function n(t){var e,n,o,i;return"SELECT"===t.nodeName?(t.focus(),e=t.value):"INPUT"===t.nodeName||"TEXTAREA"===t.nodeName?(n=t.hasAttribute("readonly"),n||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),n||t.removeAttribute("readonly"),e=t.value):(t.hasAttribute("contenteditable")&&t.focus(),o=window.getSelection(), -i=document.createRange(),i.selectNodeContents(t),o.removeAllRanges(),o.addRange(i),e=""+o),e}t.exports=n},1091:function(t,e){function n(){}n.prototype={on:function(t,e,n){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){function o(){i.off(t,o),e.apply(n,arguments)}var i=this;return o._=e,this.on(t,o,n)},emit:function(t){var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,i=n.length;for(o;o");return this.bindControl(new l(p(e),this._linetool.properties().collectibleColors,!0,this.model(),"Change All Lines Color",0)),{label:$(""+$.t("Use one color")+""),editor:e}},n.prototype.addOneColorPropertyWidget=function(e){var t=this.createOneColorForAllLinesWidget(),o=$("");o.append($("")).append(t.label).append(t.editor),o.appendTo(e)},n=i(n),n.createTemplatesPropertyPage=i,e.exports=n},15:function(e,t,o){"use strict";function i(){return $('
').slider({max:4,min:1,step:1})}Object.defineProperty(t,"__esModule",{value:!0}),o(22),o(285),t.createLineWidthEditor=i},31:function(e,t,o){"use strict";function i(){return new n.Combobox([{html:'
',value:a.LINESTYLE_SOLID},{html:'
',value:a.LINESTYLE_DOTTED},{html:'
',value:a.LINESTYLE_DASHED}])}var n,a;Object.defineProperty(t,"__esModule",{value:!0}),n=o(738),a=o(115),t.createLineStyleEditor=i},65:function(e,t,o){"use strict";function i(e){var t=$('
').slider({max:100,min:0,step:1}),o=["-moz-linear-gradient(left, %COLOR 0%, transparent 100%)","-webkit-gradient(linear, left top, right top, color-stop(0%,%COLOR), color-stop(100%,transparent))","-webkit-linear-gradient(left, %COLOR 0%,transparent 100%)","-o-linear-gradient(left, %COLOR 0%,transparent 100%)","linear-gradient(to right, %COLOR 0%,transparent 100%)"];return t.updateColor=function(e){var i=t.find(".gradient");o.forEach(function(t){i.css("background-image",t.replace(/%COLOR/,e))})},e?(t.updateColor(e.val()||"black"),e.on("change",function(e){t.updateColor(e.target.value)})):t.updateColor("black"),t}Object.defineProperty(t,"__esModule",{value:!0}),o(22),o(285),t.createTransparencyEditor=i},81:function(e,t,o){"use strict";function i(e,t,o){a.call(this,e,t),this._linetool=o,this.prepareLayout()}var n=o(10),a=n.PropertyPage,r=n.GreateTransformer,l=n.LessTransformer,p=n.ToIntTransformer,s=n.SimpleStringBinder;o(142),inherit(i,a),i.BarIndexPastLimit=-5e4,i.BarIndexFutureLimit=15e3,i.prototype.bindBarIndex=function(e,t,o,n){var a=[p(e.value()),r(i.BarIndexPastLimit),l(i.BarIndexFutureLimit)];this.bindControl(new s(t,e,a,!1,o,n))}, -i.prototype.createPriceEditor=function(e){var t,o=this._linetool.ownerSource().formatter(),i=function(e){return o.format(e)},n=function(e){var t=o.parse(e);if(t.res)return t.price?t.price:t.value},a=$("");return a.TVTicker({step:o._minMove/o._priceScale||1,formatter:i,parser:n}),e&&(t=[function(t){var o=n(t);return void 0===o?e.value():o}],this.bindControl(new s(a,e,t,!1,this.model(),"Change "+this._linetool+" point price")).addFormatter(function(e){return o.format(e)})),a},i.prototype._createPointRow=function(e,t,o){var i,n,a,r,l,p=$(""),s=$("");return s.html($.t("Price")+o),s.appendTo(p),i=$(""),i.appendTo(p),n=this.createPriceEditor(t.price),n.appendTo(i),a=$(""),a.html($.t("Bar #")),a.appendTo(p),r=$(""),r.appendTo(p),l=$(""),l.appendTo(r),l.addClass("ticker"),this.bindBarIndex(t.bar,l,this.model(),"Change "+this._linetool+" point bar index"),p},i.prototype.prepareLayoutForTable=function(e){var t,o,i,n,a,r=this._linetool.points(),l=r.length;for(t=0;t1?" "+(t+1):"",a=this._createPointRow(o,i,n),a.appendTo(e))},i.prototype.prepareLayout=function(){this._table=$(document.createElement("table")),this._table.addClass("property-page"),this._table.attr("cellspacing","0"),this._table.attr("cellpadding","2"),this.prepareLayoutForTable(this._table),this.loadData()},i.prototype.widget=function(){return this._table},e.exports=i},121:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Coordinates=100]="Coordinates",e[e.Display=100]="Display",e[e.Style=200]="Style",e[e.Inputs=300]="Inputs",e[e.Properties=250]="Properties"}(t.TabPriority||(t.TabPriority={})),function(e){e.background="Background",e.coordinates="Coordinates",e.drawings="Drawings",e.events="Events",e.eventsAndAlerts="Events & Alerts",e.inputs="Inputs",e.properties="Properties",e.scales="Scales",e.sourceCode="Source Code",e.style="Style",e.timezoneSessions="Timezone/Sessions",e.trading="Trading",e.visibility="Visibility"}(t.TabNames||(t.TabNames={})),function(e){e[e.Default=100]="Default",e[e.UserSave=200]="UserSave",e[e.Override=300]="Override"}(t.TabOpenFrom||(t.TabOpenFrom={}))},208:function(e,t,o){"use strict";function i(e,t,o){r.call(this,e,t),this._study=o,this.prepareLayout()}function n(e,t,o){r.call(this,e,t),this._study=o,this._property=e,this.prepareLayout()}var a=o(10),r=a.PropertyPage,l=a.GreateTransformer,p=a.LessTransformer,s=a.ToIntTransformer,d=a.ToFloatTransformer,h=a.SimpleComboBinder,c=a.BooleanBinder,b=a.DisabledBinder,u=a.ColorBinding,C=a.SliderBinder,y=a.SimpleStringBinder,g=o(47).addColorPicker,w=o(31).createLineStyleEditor,T=o(1121).createShapeLocationEditor,_=o(1122).createShapeStyleEditor,m=o(15).createLineWidthEditor,f=o(1123).createVisibilityEditor,L=o(1119).createHHistDirectionEditor,v=o(476).createPlotEditor,k=o(38).NumericFormatter,S=o(45),P=o(106).PlotType,x=o(13).getLogger("Chart.Study.PropertyPage");inherit(i,r),i.prototype.prepareLayout=function(){function e(e){ +i.prototype.createPriceEditor=function(e){var t,o=this._linetool.ownerSource().formatter(),i=function(e){return o.format(e)},n=function(e){var t=o.parse(e);if(t.res)return t.price?t.price:t.value},a=$("");return a.TVTicker({step:o._minMove/o._priceScale||1,formatter:i,parser:n}),e&&(t=[function(t){var o=n(t);return void 0===o?e.value():o}],this.bindControl(new s(a,e,t,!1,this.model(),"Change "+this._linetool+" point price")).addFormatter(function(e){return o.format(e)})),a},i.prototype._createPointRow=function(e,t,o){var i,n,a,r,l,p=$(""),s=$("");return s.html($.t("Price")+o),s.appendTo(p),i=$(""),i.appendTo(p),n=this.createPriceEditor(t.price),n.appendTo(i),a=$(""),a.html($.t("Bar #")),a.appendTo(p),r=$(""),r.appendTo(p),l=$(""),l.appendTo(r),l.addClass("ticker"),this.bindBarIndex(t.bar,l,this.model(),"Change "+this._linetool+" point bar index"),p},i.prototype.prepareLayoutForTable=function(e){var t,o,i,n,a,r=this._linetool.points(),l=r.length;for(t=0;t1?" "+(t+1):"",a=this._createPointRow(o,i,n),a.appendTo(e))},i.prototype.prepareLayout=function(){this._table=$(document.createElement("table")),this._table.addClass("property-page"),this._table.attr("cellspacing","0"),this._table.attr("cellpadding","2"),this.prepareLayoutForTable(this._table),this.loadData()},i.prototype.widget=function(){return this._table},e.exports=i},121:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Coordinates=100]="Coordinates",e[e.Display=100]="Display",e[e.Style=200]="Style",e[e.Inputs=300]="Inputs",e[e.Properties=250]="Properties"}(t.TabPriority||(t.TabPriority={})),function(e){e.background="Background",e.coordinates="Coordinates",e.drawings="Drawings",e.events="Events",e.eventsAndAlerts="Events & Alerts",e.inputs="Inputs",e.properties="Properties",e.scales="Scales",e.sourceCode="Source Code",e.style="Style",e.timezoneSessions="Timezone/Sessions",e.trading="Trading",e.visibility="Visibility"}(t.TabNames||(t.TabNames={})),function(e){e[e.Default=100]="Default",e[e.UserSave=200]="UserSave",e[e.Override=300]="Override"}(t.TabOpenFrom||(t.TabOpenFrom={}))},208:function(e,t,o){"use strict";function i(e,t,o){r.call(this,e,t),this._study=o,this.prepareLayout()}function n(e,t,o){r.call(this,e,t),this._study=o,this._property=e,this.prepareLayout()}var a=o(10),r=a.PropertyPage,l=a.GreateTransformer,p=a.LessTransformer,s=a.ToIntTransformer,d=a.ToFloatTransformer,h=a.SimpleComboBinder,c=a.BooleanBinder,b=a.DisabledBinder,u=a.ColorBinding,C=a.SliderBinder,y=a.SimpleStringBinder,g=o(47).addColorPicker,w=o(31).createLineStyleEditor,T=o(1122).createShapeLocationEditor,_=o(1123).createShapeStyleEditor,m=o(15).createLineWidthEditor,f=o(1124).createVisibilityEditor,L=o(1120).createHHistDirectionEditor,v=o(476).createPlotEditor,k=o(38).NumericFormatter,S=o(45),P=o(106).PlotType,x=o(13).getLogger("Chart.Study.PropertyPage");inherit(i,r),i.prototype.prepareLayout=function(){function e(e){ return(new k).format(e)}var t,o,n,a,r,l,p,s,b,T,_,f,L,v,P,B,E,R,F,I,A,D,W,O,V,j,z,M,H,q,N,G,U,Y,K,Q;for(this._table=$(""),this._table.addClass("property-page"),this._table.attr("cellspacing","0"),this._table.attr("cellpadding","2"),t=this._study.metaInfo(),o={},n=0;n0)for(n=0;n'),T.appendTo(this._table),_=$("
"),_.appendTo(T),f=$(""),f.appendTo(_),L=$.t(b.name.value(),{context:"input"}),v=this.createLabeledCell(L,f).appendTo(T).addClass("propertypage-name-label"),P=$(""),P.appendTo(T),P.addClass("colorpicker-cell"),B=g(P),E=$(""),E.appendTo(T),R=m(),R.appendTo(E),F=$('').css({whiteSpace:"nowrap"}),F.appendTo(T),I=w(),I.render().appendTo(F),A=$(""),A.appendTo(F),D=[d(b.value.value())],W="Change band",O=new y(A,b.value,D,!1,this.model(),W),O.addFormatter(e),this.bindControl(O),this.bindControl(new c(f,b.visible,!0,this.model(),W)),this.bindControl(new u(B,b.color,!0,this.model(),W)),this.bindControl(new h(I,b.linestyle,parseInt,!0,this.model(),W)),this.bindControl(new C(R,b.linewidth,!0,this.model(),W)));if(this._study.properties().bandsBackground&&(b=this._study.properties().bandsBackground,V=$.t("Background"),W=$.t("Change band background"),T=this._prepareFilledAreaBackground(b.fillBackground,b.backgroundColor,b.transparency,V,W),T.appendTo(this._table)),this._study.properties().areaBackground&&(b=this._study.properties().areaBackground,V=$.t("Background"),W=$.t("Change area background"),T=this._prepareFilledAreaBackground(b.fillBackground,b.backgroundColor,b.transparency,V,W),T.appendTo(this._table)),void 0!==(j=t.filledAreas))for(n=0;n'),_=$(""),_.appendTo(T),f=$(""),f.appendTo(_), this.bindControl(new c(f,b.visible,!0,this.model(),W+" visibility")),this.createLabeledCell(V,f).appendTo(T).addClass("propertypage-name-label"),T.appendTo(this._table),M=this._findPlotPalette(n,z),H=M.palette,q=M.paletteProps,this._prepareLayoutForPalette(0,z,H,q,W)):(T=this._prepareFilledAreaBackground(b.visible,b.color,b.transparency,V,W),T.appendTo(this._table)));for(N in t.graphics){G=t.graphics[N];for(U in G)b=this._property.graphics[N][U],i["_createRow_"+N].call(this,this._table,b)}Y=this._table.find(".visibility-switch.plot-visibility-switch"),1===Y.length&&(_=Y.parent(),_.css("display","none"),v=this._table.find(".propertypage-plot-with-palette"),1===v.length?v.css("display","none"):(v=this._table.find(".propertypage-name-label"),v.css("padding-left",0),v.find("label").attr("for",""))),K=this._prepareStudyPropertiesLayout(),this._table=this._table.add(K),S.isScriptStrategy(t)&&(Q=this._prepareOrdersSwitches(),this._table=this._table.add(Q)),this.loadData()},i.prototype._prepareOrdersSwitches=function(){var e,t,o,i,n,a,r,l=$(''),p="chart-orders-switch_"+Date.now().toString(36),s=$("").appendTo(l),d=$('').appendTo($("").appendTo(l),o=$('').appendTo($("").appendTo(l),a=$('').appendTo($("'),o.appendTo(this._table),i=$("'),o.appendTo(this._table), i=$("');y.appendTo(this._table),o=$("'),a.appendTo(this._table),r=$("');L.appendTo(this._table),o=$("'), @@ -16,7 +16,7 @@ i=$("").appendTo(this._table),$('
").appendTo(s));return $('").appendTo($("").appendTo(s)),e="chart-orders-labels-switch_"+Date.now().toString(36),t=$("
").appendTo(t)),$('").appendTo($("").appendTo(t)),i="chart-orders-qty-switch_"+Date.now().toString(36),n=$("
").appendTo(n)),$('").appendTo($("").appendTo(n)),r=this._study.properties(),this.bindControl(new c(d,r.strategy.orders.visible,!0,this.model(),"Trades on chart visibility")),this.bindControl(new c(o,r.strategy.orders.showLabels,!0,this.model(),"Signal labels visibility")),this.bindControl(new b(o,r.strategy.orders.visible,!0,this.model(),"Signal labels visibility",!0)),this.bindControl(new c(a,r.strategy.orders.showQty,!0,this.model(),"Quantity visibility")),this.bindControl(new b(a,r.strategy.orders.visible,!0,this.model(),"Quantity visibility",!0)),l},i.prototype._prepareLayoutForPlot=function(e,t){var o,i,n,a,r,l,p,s,d,b,y,w,T=t.id,_=this._study.properties().styles[T],f=this._findPlotPalette(e,t),L=f.palette,k=f.paletteProps,S="Change "+T;L?(o=$('
"),i.appendTo(o),i.addClass("visibility-cell"),n=$(""),n.appendTo(i),this.bindControl(new c(n,_.visible,!0,this.model(),S)),a=$.t(_.title.value(),{context:"input"}),this.createLabeledCell(a,n).appendTo(o).addClass("propertypage-name-label propertypage-plot-with-palette"),this._prepareLayoutForPalette(e,t,L,k,S)):(o=$('
"),i.appendTo(o),i.addClass("visibility-cell"),n=$(""),n.appendTo(i),a=$.t(this._study.properties().styles[T].title.value(),{context:"input"}),this.createLabeledCell(a,n).appendTo(o).addClass("propertypage-name-label"),r=$(""),r.appendTo(o),r.addClass("colorpicker-cell"),l=g(r),p=$(""),p.appendTo(o),s=m(),s.appendTo(p),d=$(""),d.appendTo(o),b=v(),b.appendTo(d),y=$(""),y.appendTo(o),w=$(""),w.appendTo(y),this.createLabeledCell("Price Line",w).appendTo(o),this.bindControl(new c(n,_.visible,!0,this.model(),S)),this.bindControl(new u(l,_.color,!0,this.model(),S,_.transparency)),this.bindControl(new C(s,_.linewidth,!0,this.model(),S,this._study.metaInfo().isTVScript)),this.bindControl(new h(b,_.plottype,parseInt,!0,this.model(),S)),this.bindControl(new c(w,_.trackPrice,!0,this.model(),"Change Price Line")))},i.prototype._prepareLayoutForBarsPlot=function(e,t){var o,i,n,a,r,l,p=t.id,s=this._study.properties().ohlcPlots[p],d=this._findPlotPalette(e,t),h=d.palette,b=d.paletteProps,C="Change "+p,y=$('
"),o.appendTo(y),o.addClass("visibility-cell"),i=$(""),i.appendTo(o),this.bindControl(new c(i,s.visible,!0,this.model(),C)),n=s.title.value(),this.createLabeledCell(n,i).appendTo(y).addClass("propertypage-name-label"),h?(a=!0,this._prepareLayoutForPalette(e,t,h,b,C,a)):(r=$(""),r.appendTo(y),r.addClass("colorpicker-cell"),l=g(r),this.bindControl(new u(l,s.color,!0,this.model(),C)))},i.prototype._prepareLayoutForCandlesPlot=function(e,t){var o,i,n,a,r,l,p,s,d;this._prepareLayoutForBarsPlot(e,t),o=t.id,i=this._study.properties().ohlcPlots[o],n="Change "+o,a=$('
"),r.appendTo(a),r.addClass("visibility-cell"),l=$(""),l.appendTo(r),this.bindControl(new c(l,i.drawWick,!0,this.model(),n)),p="Wick",this.createLabeledCell(p,l).appendTo(a),s=$(""),s.appendTo(a),s.addClass("colorpicker-cell"),d=g(s),this.bindControl(new u(d,i.wickColor,!0,this.model(),n))},i.prototype._prepareLayoutForShapesPlot=function(e,t){var o,i,n,a,r,l,p,s,d,b=t.id,C=this._study.properties().styles[b],y=this._findPlotPalette(e,t),w=y.palette,m=y.paletteProps,f="Change "+b,L=$('
"),o.appendTo(L),o.addClass("visibility-cell"),i=$(""),i.appendTo(o),this.bindControl(new c(i,C.visible,!0,this.model(),f)),n=$.t(this._study.properties().styles[b].title.value(),{context:"input"}),this.createLabeledCell(n,i).appendTo(L).addClass("propertypage-name-label"),a=$(""),a.appendTo(L),r=_(),r.appendTo(a),this.bindControl(new h(r,C.plottype,null,!0,this.model(),f)),l=$(""),l.appendTo(L),p=T(),p.appendTo(l),this.bindControl(new h(p,C.location,null,!0,this.model(),f)),w?this._prepareLayoutForPalette(e,t,w,m,f):(L=$('
').append($("