").appendTo(o);this._isShowStyleSwitcher()&&(p=this.addLabeledRow(_e,"Style"),y=$(document.createElement("td")).appendTo(p),y.addClass("property-wide-select"),a=$(document.createElement("select")),$(""+$.t("Bars")+" ").appendTo(a),$(""+$.t("Candles")+" ").appendTo(a),$(""+$.t("Hollow Candles")+" ").appendTo(a),this._isJapaneseChartsAvailable()&&$(""+$.t("Heikin Ashi")+" ").appendTo(a),$(""+$.t("Line")+" ").appendTo(a),$(""+$.t("Area")+" ").appendTo(a),$(""+$.t("Baseline")+" ").appendTo(a),a.css("width","100px").appendTo(y),this.switchStyle(),this.bindControl(new h(a,n.style,parseInt,!0,this.model(),"Change Series Style"))),n.style.listeners().subscribe(this,this.switchStyle),C=this.createColorPicker(),m=this.createColorPicker(),w=this.createColorPicker(),T=this.createColorPicker(),f=this.createColorPicker(),v=this.createColorPicker(),L=$(" ").data("hides",$(f).add(v)),k=$(" ").data("hides",$(w).add(T)),S=$(" "),x=this.addLabeledRow($e,"Color Bars Based on Previous Close",S),
$("").append(S).prependTo(x),x=this.addLabeledRow(Te,"Candles"),$(" ").prependTo(x),$(" ").append(C).appendTo(x),$(" ").append(m).appendTo(x),x=this.addLabeledRow(Te,"Borders",L),$(" ").append(L).prependTo(x),$(" ").append(f).appendTo(x),$(" ").append(v).appendTo(x),x=this.addLabeledRow(Te,"Wick",k),$(" ").append(k).prependTo(x),$(" ").append(w).appendTo(x),$(" ").append(T).appendTo(x),this.bindControl(new c(C,n.candleStyle.upColor,!0,this.model(),"Change Candle Up Color")),this.bindControl(new c(m,n.candleStyle.downColor,!0,this.model(),"Change Candle Down Color")),this.bindControl(new u(k,n.candleStyle.drawWick,!0,this.model(),"Change Candle Wick Visibility")),this.bindControl(new c(w,n.candleStyle.wickUpColor,!0,this.model(),"Change Candle Wick Up Color")),this.bindControl(new c(T,n.candleStyle.wickDownColor,!0,this.model(),"Change Candle Wick Down Color")),this.bindControl(new u(L,n.candleStyle.drawBorder,!0,this.model(),"Change Candle Border Visibility")),this.bindControl(new c(f,n.candleStyle.borderUpColor,!0,this.model(),"Change Candle Up Border Color")),this.bindControl(new c(v,n.candleStyle.borderDownColor,!0,this.model(),"Change Candle Down Border Color")),this.bindControl(new u(S,n.candleStyle.barColorsOnPrevClose,!0,this.model(),"Change Color Bars Based on Previous Close")),P=this.createColorPicker(),B=this.createColorPicker(),E=this.createColorPicker(),R=this.createColorPicker(),F=this.createColorPicker(),I=this.createColorPicker(),D=$(" ").data("hides",$(F).add(I)),V=$(" ").data("hides",$(E).add(R)),x=this.addLabeledRow(fe,"Candles"),$(" ").prependTo(x),$(" ").append(P).appendTo(x),$(" ").append(B).appendTo(x),x=this.addLabeledRow(fe,"Borders",D),$(" ").append(D).prependTo(x),$(" ").append(F).appendTo(x),$(" ").append(I).appendTo(x),x=this.addLabeledRow(fe,"Wick",V),$(" ").append(V).prependTo(x),$(" ").append(E).appendTo(x),$(" ").append(R).appendTo(x),this.bindControl(new c(P,n.hollowCandleStyle.upColor,!0,this.model(),"Change Hollow Candle Up Color")),this.bindControl(new c(B,n.hollowCandleStyle.downColor,!0,this.model(),"Change Hollow Candle Down Color")),this.bindControl(new u(V,n.hollowCandleStyle.drawWick,!0,this.model(),"Change Hollow Candle Wick Visibility")),this.bindControl(new c(E,n.hollowCandleStyle.wickUpColor,!0,this.model(),"Change Hollow Candle Wick Up Color")),this.bindControl(new c(R,n.hollowCandleStyle.wickDownColor,!0,this.model(),"Change Hollow Candle Down Wick Color")),this.bindControl(new u(D,n.hollowCandleStyle.drawBorder,!0,this.model(),"Change Hollow Candle Border Visibility")),this.bindControl(new c(F,n.hollowCandleStyle.borderUpColor,!0,this.model(),"Change Hollow Candle Up Border Color")),this.bindControl(new c(I,n.hollowCandleStyle.borderDownColor,!0,this.model(),"Change Hollow Candle Down Border Color")),A=$(" "),x=this.addLabeledRow(me,"Color Bars Based on Previous Close",A),
$(" ").append(A).prependTo(x),W=$(" "),x=this.addLabeledRow(me,"HLC Bars",W),$(" ").append(W).prependTo(x),M=this.addColorPickerRow(Le,"Up Color"),O=this.addColorPickerRow(Le,"Down Color"),this.bindControl(new c(M,n.barStyle.upColor,!0,this.model(),"Change Bar Up Color")),this.bindControl(new c(O,n.barStyle.downColor,!0,this.model(),"Change Bar Down Color")),this.bindControl(new u(A,n.barStyle.barColorsOnPrevClose,!0,this.model(),"Change Color Bars Based on Previous Close")),this.bindControl(new u(W,n.barStyle.dontDrawOpen,!0,this.model(),"Change HLC Bars")),z=_(),x=this.addLabeledRow(ke,"Price Source"),$(' ').append(z).appendTo(x),H=this.addLabeledRow(ke,"Type"),N=$(' ').appendTo(H),N.addClass("property-wide-select"),G=$(document.createElement("select")),$(""+$.t("Simple")+" ").appendTo(G),$(""+$.t("With Markers")+" ").appendTo(G),$(""+$.t("Step")+" ").appendTo(G),G.appendTo(N),x=this.addLabeledRow(ke,"Line"),j=this.createColorPicker(),q=this.createLineWidthEditor(),$(" ").append(j).appendTo(x),$(" ").append(q).appendTo(x),this.bindControl(new h(z,n.lineStyle.priceSource,null,!0,this.model(),"Change Price Source")),this.bindControl(new h(G,n.lineStyle.styleType,parseInt,!0,this.model(),"Change Line Type")),this.bindControl(new c(j,n.lineStyle.color,!0,this.model(),"Change Line Color")),this.bindControl(new b(q,n.lineStyle.linewidth,!0,this.model(),"Change Line Width")),n.haStyle&&(U=this.createColorPicker(),Y=this.createColorPicker(),K=this.createColorPicker(),J=this.createColorPicker(),Z=this.createColorPicker(),Q=this.createColorPicker(),X=$(" ").data("hides",$(Z).add(Q)),ee=$(" ").data("hides",$(K).add(J)),te=$(" "),x=this.addLabeledRow(we,$.t("Color Bars Based on Previous Close"),te),$(" ").append(te).prependTo(x),x=this.addLabeledRow(ve,$.t("Candles")),$(" ").prependTo(x),$(" ").append(U).appendTo(x),$(" ").append(Y).appendTo(x),x=this.addLabeledRow(ve,$.t("Borders"),X),$(" ").append(X).prependTo(x),$(" ").append(Z).appendTo(x),$(" ").append(Q).appendTo(x),x=this.addLabeledRow(ve,$.t("Wick"),ee),$(" ").append(ee).prependTo(x),$(" ").append(K).appendTo(x),$(" ").append(J).appendTo(x),this.bindControl(new c(U,n.haStyle.upColor,!0,this.model(),"Change Heikin Ashi Up Color")),this.bindControl(new c(Y,n.haStyle.downColor,!0,this.model(),"Change Heikin Ashi Down Color")),this.bindControl(new u(ee,n.haStyle.drawWick,!0,this.model(),"Change Heikin Ashi Wick Visibility")),this.bindControl(new c(K,n.haStyle.wickUpColor,!0,this.model(),"Change Heikin Ashi Wick Up Color")),this.bindControl(new c(J,n.haStyle.wickDownColor,!0,this.model(),"Change Heikin Ashi Wick Down Color")),
this.bindControl(new u(X,n.haStyle.drawBorder,!0,this.model(),"Change Heikin Ashi Border Visibility")),this.bindControl(new c(Z,n.haStyle.borderUpColor,!0,this.model(),"Change Heikin Ashi Up Border Color")),this.bindControl(new c(Q,n.haStyle.borderDownColor,!0,this.model(),"Change Heikin Ashi Down Border Color")),this.bindControl(new u(te,n.haStyle.barColorsOnPrevClose,!0,this.model(),"Change Color Bars Based on Previous Close"))),this._isJapaneseChartsAvailable()&&t.enabled("japanese_chart_styles"),ie=_(),x=this.addLabeledRow(Se,"Price Source"),$(' ').appendTo(x).append(ie),oe=this.createColorPicker(),ne=this.createLineWidthEditor(),x=this.addLabeledRow(Se,"Line"),$(" ").appendTo(x).append(oe),$(' ').appendTo(x).append(ne),ae=this.createColorPicker(),se=this.createColorPicker(),x=this.addLabeledRow(Se,"Fill"),$(" ").appendTo(x).append(ae),$(" ").appendTo(x).append(se),this.bindControl(new h(ie,n.areaStyle.priceSource,null,!0,this.model(),"Change Price Source")),this.bindControl(new c(oe,n.areaStyle.linecolor,!0,this.model(),"Change Line Color")),this.bindControl(new b(ne,n.areaStyle.linewidth,!0,this.model(),"Change Line Width")),this.bindControl(new c(ae,n.areaStyle.color1,!0,this.model(),"Change Line Color",n.areaStyle.transparency)),this.bindControl(new c(se,n.areaStyle.color2,!0,this.model(),"Change Line Color",n.areaStyle.transparency)),re=_(),x=this.addLabeledRow(xe,window.t("Price Source")),$(' ').appendTo(x).append(re),this.bindControl(new h(re,n.baselineStyle.priceSource,null,!0,this.model(),"Change Price Source")),le=this.createColorPicker(),pe=this.createLineWidthEditor(),x=this.addLabeledRow(xe,window.t("Top Line")),$(" ").appendTo(x).append(le),$(" ").appendTo(x).append(pe),this.bindControl(new c(le,n.baselineStyle.topLineColor,!0,this.model(),"Change Top Line Color")),this.bindControl(new b(pe,n.baselineStyle.topLineWidth,!0,this.model(),"Change Top Line Width")),de=this.createColorPicker(),he=this.createLineWidthEditor(),x=this.addLabeledRow(xe,window.t("Bottom Line")),$(" ").appendTo(x).append(de),$(" ").appendTo(x).append(he),this.bindControl(new c(de,n.baselineStyle.bottomLineColor,!0,this.model(),"Change Bottom Line Color")),this.bindControl(new b(he,n.baselineStyle.bottomLineWidth,!0,this.model(),"Change Bottom Line Width")),ce=this.createColorPicker(),ue=this.createColorPicker(),x=this.addLabeledRow(xe,window.t("Fill Top Area")),$(" ").appendTo(x).append(ce),$(" ").appendTo(x).append(ue),this.bindControl(new c(ce,n.baselineStyle.topFillColor1,!0,this.model(),"Change Fill Top Area Color 1"),n.baselineStyle.transparency),this.bindControl(new c(ue,n.baselineStyle.topFillColor2,!0,this.model(),"Change Fill Top Area Color 2"),n.baselineStyle.transparency),be=this.createColorPicker(),ye=this.createColorPicker(),x=this.addLabeledRow(xe,window.t("Fill Bottom Area")),$(" ").appendTo(x).append(be),$(" ").appendTo(x).append(ye),
this.bindControl(new c(be,n.baselineStyle.bottomFillColor1,!0,this.model(),"Change Fill Bottom Area Color 1"),n.baselineStyle.transparency),this.bindControl(new c(ye,n.baselineStyle.bottomFillColor2,!0,this.model(),"Change Fill Bottom Area Color 2"),n.baselineStyle.transparency),x=this.addLabeledRow(xe,window.t("Base Level")),ge=$(' '),$(' ').appendTo(x).append($(" ").append(ge)).append($('% ')),Ce=[l(n.baselineStyle.baseLevelPercentage.value()),r(100),s(0)],this.bindControl(new d(ge,n.baselineStyle.baseLevelPercentage,Ce,!0,this.model(),"Change Base Level"))},e.exports=o}).call(t,i(5))},1105:function(e,t,i){"use strict";function o(){var e=$("");return $(''+$.t("Open")+" ").appendTo(e),$(''+$.t("High")+" ").appendTo(e),$(''+$.t("Low")+" ").appendTo(e),$(''+$.t("Close")+" ").appendTo(e),$(''+$.t("(H + L)/2")+" ").appendTo(e),$(''+$.t("(H + L + C)/3")+" ").appendTo(e),$(''+$.t("(O + H + L + C)/4")+" ").appendTo(e),e}var n;Object.defineProperty(t,"__esModule",{value:!0}),t.createPriceSourceEditor=o,n=i(14),i.n(n),i(11)},1106:function(e,t){},1107:function(e,t){},1108:function(e,t,i){"use strict";function o(){return $(''+$.t("Above Bar")+' '+$.t("Below Bar")+' '+$.t("Top")+' '+$.t("Bottom")+' '+$.t("Absolute")+" ")}var n,a;Object.defineProperty(t,"__esModule",{value:!0}),t.createShapeLocationEditor=o,n=i(14),i.n(n),i(11),a=i(212)},1109:function(e,t,i){"use strict";function o(){var e="";return Object.keys(a.plotShapesData).forEach(function(t){var i=a.plotShapesData[t];e+=''+i.guiName+" "}),e+=" ",$(e)}var n,a;Object.defineProperty(t,"__esModule",{value:!0}),t.createShapeStyleEditor=o,n=i(14),i.n(n),a=i(211)},1110:function(e,t,i){"use strict";function o(){return $(' ')}var n;Object.defineProperty(t,"__esModule",{value:!0}),t.createVisibilityEditor=o,n=i(14),i.n(n)},1111:function(e,t,i){"use strict";function o(){var e=$(" ");return $(''+$.t("Left")+" ").appendTo(e),$(''+$.t("Right")+" ").appendTo(e),e}var n,a,s;Object.defineProperty(t,"__esModule",{value:!0}),n=i(14),i(11),function(e){e.LeftToRight="left_to_right",e.RightToLeft="right_to_left"}(a||(a={})),function(e){e.Relative="relative",e.Absolute="absolute"}(s||(s={})),t.createHHistDirectionEditor=o},1112:function(e,t,i){"use strict";function o(){var e=$(" ")
;return $(''+$.t("Line")+" ").appendTo(e),$(''+$.t("Line With Breaks")+" ").appendTo(e),$(''+$.t("Step Line")+" ").appendTo(e),$(''+$.t("Histogram")+" ").appendTo(e),$(''+$.t("Cross",{context:"chart_type"})+" ").appendTo(e),$(''+$.t("Area")+" ").appendTo(e),$(''+$.t("Area With Breaks")+" ").appendTo(e),$(''+$.t("Columns")+" ").appendTo(e),$(''+$.t("Circles")+" ").appendTo(e),e}var n,a;Object.defineProperty(t,"__esModule",{value:!0}),t.createPlotEditor=o,n=i(14),i.n(n),i(11),a=i(86)},320:function(e,t,i){"use strict";function o(e,t,i){s.call(this,e,t),this._study=i,this.prepareLayout()}function n(e,t,i){s.call(this,e,t),this._study=i,this._property=e,this.prepareLayout()}var a=i(823),s=a.PropertyPage,r=a.GreateTransformer,l=a.LessTransformer,p=a.ToIntTransformer,d=a.ToFloatTransformer,h=a.SimpleComboBinder,c=a.BooleanBinder,u=a.DisabledBinder,b=a.ColorBinding,y=a.SliderBinder,g=a.SimpleStringBinder,C=i(829).addColorPicker,_=i(830).createLineStyleEditor,m=i(1108).createShapeLocationEditor,w=i(1109).createShapeStyleEditor,T=i(1110).createVisibilityEditor,f=i(1111).createHHistDirectionEditor,v=i(1112).createPlotEditor,L=i(105).NumericFormatter,k=i(26),S=i(86).PlotType,x=i(4).getLogger("Chart.Study.PropertyPage");inherit(o,s),o.prototype.prepareLayout=function(){function e(e){return(new L).format(e)}var t,i,n,a,s,r,l,p,u,m,w,T,f,v,S,P,B,E,R,F,I,D,V,A,W,M,O,z,H,N,G,j,q,U,Y,K;for(this._table=$(""),this._table.addClass("property-page"),this._table.attr("cellspacing","0"),this._table.attr("cellpadding","2"),t=this._study.metaInfo(),i={},n=0;n0)for(n=0;n '),m.appendTo(this._table),w=$(" "),w.appendTo(m),T=$(" "),T.appendTo(w),f=$.t(u.name.value(),{context:"input"}),v=this.createLabeledCell(f,T).appendTo(m).addClass("propertypage-name-label"),S=$(" "),S.appendTo(m),S.addClass("colorpicker-cell"),P=C(S),B=$(" "),B.appendTo(m),E=this.createLineWidthEditor(),E.appendTo(B),R=$('').css({whiteSpace:"nowrap"}),R.appendTo(m),F=_(),F.render().appendTo(R),I=$(" "),I.appendTo(R),D=[d(u.value.value())],V="Change band",A=new g(I,u.value,D,!1,this.model(),V),A.addFormatter(e),this.bindControl(A),this.bindControl(new c(T,u.visible,!0,this.model(),V)),this.bindControl(new b(P,u.color,!0,this.model(),V)),this.bindControl(new h(F,u.linestyle,parseInt,!0,this.model(),V)),this.bindControl(new y(E,u.linewidth,!0,this.model(),V)));if(this._study.properties().bandsBackground&&(u=this._study.properties().bandsBackground,W=$.t("Background"),V=$.t("Change band background"),m=this._prepareFilledAreaBackground(u.fillBackground,u.backgroundColor,u.transparency,W,V),m.appendTo(this._table)),this._study.properties().areaBackground&&(u=this._study.properties().areaBackground,W=$.t("Background"),V=$.t("Change area background"),m=this._prepareFilledAreaBackground(u.fillBackground,u.backgroundColor,u.transparency,W,V),m.appendTo(this._table)),void 0!==(M=t.filledAreas))for(n=0;n '),w=$(" "),w.appendTo(m),T=$(" "),T.appendTo(w),this.bindControl(new c(T,u.visible,!0,this.model(),V+" visibility")),this.createLabeledCell(W,T).appendTo(m).addClass("propertypage-name-label"),m.appendTo(this._table),z=this._findPlotPalette(n,O),H=z.palette,N=z.paletteProps,this._prepareLayoutForPalette(0,O,H,N,V)):(m=this._prepareFilledAreaBackground(u.visible,u.color,u.transparency,W,V),m.appendTo(this._table)));for(G in t.graphics){j=t.graphics[G];for(q in j)u=this._property.graphics[G][q],o["_createRow_"+G].call(this,this._table,u)}U=this._table.find(".visibility-switch.plot-visibility-switch"),1===U.length&&(w=U.parent(),w.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",""))),Y=this._prepareStudyPropertiesLayout(),this._table=this._table.add(Y),k.isScriptStrategy(t)&&(K=this._prepareOrdersSwitches(),this._table=this._table.add(K)),this.loadData()},o.prototype._prepareOrdersSwitches=function(){var e,t,i,o,n,a,s,r=$(''),l="chart-orders-switch_"+Date.now().toString(36),p=$("").appendTo(r),d=$(' ').appendTo($("").appendTo(p))
;return $(''+$.t("Trades on Chart")+" ").appendTo($(" ").appendTo(p)),e="chart-orders-labels-switch_"+Date.now().toString(36),t=$(" ").appendTo(r),i=$(' ').appendTo($("").appendTo(t)),$(''+$.t("Signal Labels")+" ").appendTo($(" ").appendTo(t)),o="chart-orders-qty-switch_"+Date.now().toString(36),n=$(" ").appendTo(r),a=$(' ').appendTo($("").appendTo(n)),$(''+$.t("Quantity")+" ").appendTo($(" ").appendTo(n)),s=this._study.properties(),this.bindControl(new c(d,s.strategy.orders.visible,!0,this.model(),"Trades on chart visibility")),this.bindControl(new c(i,s.strategy.orders.showLabels,!0,this.model(),"Signal labels visibility")),this.bindControl(new u(i,s.strategy.orders.visible,!0,this.model(),"Signal labels visibility",!0)),this.bindControl(new c(a,s.strategy.orders.showQty,!0,this.model(),"Quantity visibility")),this.bindControl(new u(a,s.strategy.orders.visible,!0,this.model(),"Quantity visibility",!0)),r},o.prototype._prepareLayoutForPlot=function(e,t){var i,o,n,a,s,r,l,p,d,u,g,_,m=t.id,w=this._study.properties().styles[m],T=this._findPlotPalette(e,t),f=T.palette,L=T.paletteProps,k="Change "+m;f?(i=$(' '),i.appendTo(this._table),o=$(" "),o.appendTo(i),o.addClass("visibility-cell"),n=$(" "),n.appendTo(o),this.bindControl(new c(n,w.visible,!0,this.model(),k)),a=$.t(w.title.value(),{context:"input"}),this.createLabeledCell(a,n).appendTo(i).addClass("propertypage-name-label propertypage-plot-with-palette"),this._prepareLayoutForPalette(e,t,f,L,k)):(i=$(' '),i.appendTo(this._table),o=$(" "),o.appendTo(i),o.addClass("visibility-cell"),n=$(" "),n.appendTo(o),a=$.t(this._study.properties().styles[m].title.value(),{context:"input"}),this.createLabeledCell(a,n).appendTo(i).addClass("propertypage-name-label"),s=$(" "),s.appendTo(i),s.addClass("colorpicker-cell"),r=C(s),l=$(" "),l.appendTo(i),p=this.createLineWidthEditor(),p.appendTo(l),d=$(""),d.appendTo(i),u=v(),u.appendTo(d),g=$(" "),g.appendTo(i),_=$(" "),_.appendTo(g),this.createLabeledCell("Price Line",_).appendTo(i),this.bindControl(new c(n,w.visible,!0,this.model(),k)),this.bindControl(new b(r,w.color,!0,this.model(),k,w.transparency)),this.bindControl(new y(p,w.linewidth,!0,this.model(),k,this._study.metaInfo().isTVScript)),this.bindControl(new h(u,w.plottype,parseInt,!0,this.model(),k)),this.bindControl(new c(_,w.trackPrice,!0,this.model(),"Change Price Line")))},o.prototype._prepareLayoutForBarsPlot=function(e,t){var i,o,n,a,s,r,l=t.id,p=this._study.properties().ohlcPlots[l],d=this._findPlotPalette(e,t),h=d.palette,u=d.paletteProps,y="Change "+l,g=$(' ');g.appendTo(this._table),i=$(" "),i.appendTo(g),i.addClass("visibility-cell"),
o=$(" "),o.appendTo(i),this.bindControl(new c(o,p.visible,!0,this.model(),y)),n=p.title.value(),this.createLabeledCell(n,o).appendTo(g).addClass("propertypage-name-label"),h?(a=!0,this._prepareLayoutForPalette(e,t,h,u,y,a)):(s=$(" "),s.appendTo(g),s.addClass("colorpicker-cell"),r=C(s),this.bindControl(new b(r,p.color,!0,this.model(),y)))},o.prototype._prepareLayoutForCandlesPlot=function(e,t){var i,o,n,a,s,r,l,p,d;this._prepareLayoutForBarsPlot(e,t),i=t.id,o=this._study.properties().ohlcPlots[i],n="Change "+i,a=$(' '),a.appendTo(this._table),s=$(" "),s.appendTo(a),s.addClass("visibility-cell"),r=$(" "),r.appendTo(s),this.bindControl(new c(r,o.drawWick,!0,this.model(),n)),l="Wick",this.createLabeledCell(l,r).appendTo(a),p=$(" "),p.appendTo(a),p.addClass("colorpicker-cell"),d=C(p),this.bindControl(new b(d,o.wickColor,!0,this.model(),n))},o.prototype._prepareLayoutForShapesPlot=function(e,t){var i,o,n,a,s,r,l,p,d,u=t.id,y=this._study.properties().styles[u],g=this._findPlotPalette(e,t),_=g.palette,T=g.paletteProps,f="Change "+u,v=$(' ');v.appendTo(this._table),i=$(" "),i.appendTo(v),i.addClass("visibility-cell"),o=$(" "),o.appendTo(i),this.bindControl(new c(o,y.visible,!0,this.model(),f)),n=$.t(this._study.properties().styles[u].title.value(),{context:"input"}),this.createLabeledCell(n,o).appendTo(v).addClass("propertypage-name-label"),a=$(" "),a.appendTo(v),s=w(),s.appendTo(a),this.bindControl(new h(s,y.plottype,null,!0,this.model(),f)),r=$(" "),r.appendTo(v),l=m(),l.appendTo(r),this.bindControl(new h(l,y.location,null,!0,this.model(),f)),_?this._prepareLayoutForPalette(e,t,_,T,f):(v=$(' '),v.appendTo(this._table),$(" ").appendTo(v),$(" ").appendTo(v),p=$(" "),p.appendTo(v),p.addClass("colorpicker-cell"),d=C(p),this.bindControl(new b(d,y.color,!0,this.model(),f,y.transparency)))},o.prototype._prepareLayoutForCharsPlot=function(e,t){var i,o,n,a,s,r,l,p,d,u=t.id,y=this._study.properties().styles[u],_=this._findPlotPalette(e,t),w=_.palette,T=_.paletteProps,f="Change "+u,v=$(' ');v.appendTo(this._table),i=$(" "),i.appendTo(v),i.addClass("visibility-cell"),o=$(" "),o.appendTo(i),this.bindControl(new c(o,y.visible,!0,this.model(),f)),n=$.t(this._study.properties().styles[u].title.value(),{context:"input"}),this.createLabeledCell(n,o).appendTo(v).addClass("propertypage-name-label"),a=$(" "),a.appendTo(v),s=$(' '),s.appendTo(a),s.keyup(function(){var e=$(this),t=e.val();t&&(e.val(t.split("")[t.length-1]),e.change())}),this.bindControl(new g(s,y.char,null,!1,this.model(),f)),r=$(" "),r.appendTo(v),l=m(),l.appendTo(r),this.bindControl(new h(l,y.location,null,!0,this.model(),f)),w?this._prepareLayoutForPalette(e,t,w,T,f):(v=$(' '),v.appendTo(this._table),$(" ").appendTo(v),
$(" ").appendTo(v),p=$(" "),p.appendTo(v),p.addClass("colorpicker-cell"),d=C(p),this.bindControl(new b(d,y.color,!0,this.model(),f,y.transparency)))},o.prototype._isStyleNeedsConnectPoints=function(e){return[S.Cross,S.Circles].indexOf(e)>=0},o.prototype._prepareLayoutForPalette=function(e,t,i,o,n,a){var s,r,l,p,d,u,g,_,m,w,T,f,L,k,S,x=e,P=t.id,B=null,E=P.startsWith("fill");B=a?this._study.properties().ohlcPlots[P]:E?this._study.properties().filledAreasStyle[P]:this._study.properties().styles[P],s=0;for(r in i.colors)l=o.colors[r],p=$(' '),p.appendTo(this._table),$(" ").appendTo(p),d=$(" "),d.appendTo(p),d.addClass("propertypage-name-label"),d.html($.t(l.name.value(),{context:"input"})),u=$(" "),u.appendTo(p),u.addClass("colorpicker-cell"),g=C(u),this.bindControl(new b(g,l.color,!0,this.model(),n,B.transparency)),!E&&this._study.isLinePlot(x)&&(_=$(" "),_.appendTo(p),m=this.createLineWidthEditor(),m.appendTo(_),this.bindControl(new y(m,l.width,!0,this.model(),n,this._study.metaInfo().isTVScript)),w=$(""),w.appendTo(p),0===s&&(T=v(),T.appendTo(w),this.bindControl(new h(T,B.plottype,parseInt,!0,this.model(),n)),f=$(" "),L=$(' ').css({whiteSpace:"nowrap"}),k=$("").html($.t("Price Line")),S=$(""),S.append(f),L.append(S).append(k).appendTo(p),this.bindControl(new c(f,B.trackPrice,!0,this.model(),"Change Price Line")))),s++},o.prototype._prepareLayoutForArrowsPlot=function(e,t){var i,o,n,a,s,r,l,p=t.id,d=this._study.properties().styles[p],h="Change "+p,u=$(' ');u.appendTo(this._table),i=$(" "),i.appendTo(u),i.addClass("visibility-cell"),o=$(" "),o.appendTo(i),n=$.t(this._study.properties().styles[p].title.value(),{context:"input"}),this.createLabeledCell(n,o).appendTo(u).addClass("propertypage-name-label"),a=$(" "),a.appendTo(u),a.addClass("colorpicker-cell"),s=C(a),r=$(" "),r.appendTo(u),r.addClass("colorpicker-cell"),l=C(r),this.bindControl(new c(o,d.visible,!0,this.model(),h)),this.bindControl(new b(s,d.colorup,!0,this.model(),h,d.transparency)),this.bindControl(new b(l,d.colordown,!0,this.model(),h,d.transparency))},o.prototype._findPlotPalette=function(e,t){var i,o=e,n=t.id,a=null,s=null,r=this._study.metaInfo().plots;if(this._study.isBarColorerPlot(o)||this._study.isBgColorerPlot(o))a=this._study.metaInfo().palettes[t.palette],s=this._study.properties().palettes[t.palette];else for(i=0;i'),t=this.createPrecisionEditor(),i=$("");return i.appendTo(e),$(""+$.t("Precision")+" ").appendTo(i),$("").append(t).appendTo(i),
this.bindControl(new h(t,this._study.properties().precision,null,!0,this.model(),"Change Precision")),"Compare@tv-basicstudies"===this._study.metaInfo().id&&(t=this.createSeriesMinTickEditor(),i=$(" "),i.appendTo(e),$(""+$.t("Override Min Tick")+" ").appendTo(i),$("").append(t).appendTo(i),this.bindControl(new h(t,this._study.properties().minTick,null,!0,this.model(),"Change MinTick"))),this._putStudyDefaultStyles(e),e},o.prototype._putStudyDefaultStyles=function(e,t){var i,o,n,a,s,r,l=null,p=this._study;return(!p.properties().linkedToSeries||!p.properties().linkedToSeries.value())&&($.each(this._model.m_model.panes(),function(e,t){$.each(t.dataSources(),function(e,i){if(i===p)return l=t,!1})}),this._pane=l,this._pane&&(-1!==this._pane.leftPriceScale().dataSources().indexOf(this._study)?i="left":-1!==this._pane.rightPriceScale().dataSources().indexOf(this._study)?i="right":this._pane.isOverlay(this._study)&&(i="none")),i&&(o=this,n={left:$.t("Scale Left"),right:$.t("Scale Right")},o._pane.actionNoScaleIsEnabled(p)&&(n.none=$.t("Screen (No Scale)")),a=this.createKeyCombo(n).val(i).change(function(){switch(this.value){case"left":o._model.move(o._study,o._pane,o._pane.leftPriceScale());break;case"right":o._model.move(o._study,o._pane,o._pane.rightPriceScale());break;case"none":o._model.move(o._study,o._pane,null)}}),s=this.addRow(e),$(" "+$.t("Scale")+" ").appendTo(s),r=$("").appendTo(s).append(a),t&&t>2&&r.attr("colspan",t-1)),e)},o.prototype.widget=function(){return this._table},o.prototype._prepareFilledAreaBackground=function(e,t,i,o,n){var a,s,r,l=$(' '),p=$(" ");return p.appendTo(l),a=$(" "),a.appendTo(p),this.createLabeledCell(o,a).appendTo(l).addClass("propertypage-name-label"),s=$(" "),s.appendTo(l),s.addClass("colorpicker-cell"),r=C(s),this.bindControl(new c(a,e,!0,this.model(),n+" visibility")),this.bindControl(new b(r,t,!0,this.model(),n+" color",i)),l},inherit(n,s),n.prototype.prepareLayout=function(){if(this._study.properties().linkedToSeries&&this._study.properties().linkedToSeries.value())return void(this._table=$());this._table=$()},n.prototype.widget=function(){return this._table},o._createRow_horizlines=function(e,t){var i=this.addRow(e),o=t.name.value(),n=$(" "),a=this.createColorPicker(),s=this.createLineWidthEditor(),r=_();$("").append(n).appendTo(i),this.createLabeledCell(o,n).appendTo(i),$(" ").append(a).appendTo(i),$(" ").append(s).appendTo(i),$(" ").append(r.render()).appendTo(i),this.bindControl(new c(n,t.visible,!0,this.model(),"Change "+o+" visibility")),this.bindControl(new b(a,t.color,!0,this.model(),"Change "+o+" color")),this.bindControl(new h(r,t.style,parseInt,!0,this.model(),"Change "+o+" style")),this.bindControl(new y(s,t.width,!0,this.model(),"Change "+o+" width"))},o._createRow_vertlines=function(e,t){
var i=this.addRow(e),o=t.name.value(),n=$(" "),a=this.createColorPicker(),s=this.createLineWidthEditor(),r=_();$(" ").append(n).appendTo(i),this.createLabeledCell(o,n).appendTo(i),$(" ").append(a).appendTo(i),$(" ").append(s).appendTo(i),$(" ").append(r.render()).appendTo(i),this.bindControl(new c(n,t.visible,!0,this.model(),"Change "+o+" visibility")),this.bindControl(new b(a,t.color,!0,this.model(),"Change "+o+" color")),this.bindControl(new h(r,t.style,parseInt,!0,this.model(),"Change "+o+" style")),this.bindControl(new y(s,t.width,!0,this.model(),"Change "+o+" width"))},o._createRow_lines=function(e,t){var i=this.addRow(e),o=t.title.value(),n=$(" "),a=this.createColorPicker(),s=this.createLineWidthEditor(),r=_();$(" ").append(n).appendTo(i),this.createLabeledCell(o,n).appendTo(i),$(" ").append(a).appendTo(i),$(" ").append(s).appendTo(i),$(" ").append(r.render()).appendTo(i),this.bindControl(new c(n,t.visible,!0,this.model(),"Change "+o+" visibility")),this.bindControl(new b(a,t.color,!0,this.model(),"Change "+o+" color")),this.bindControl(new h(r,t.style,parseInt,!0,this.model(),"Change "+o+" style")),this.bindControl(new y(s,t.width,!0,this.model(),"Change "+o+" width"))},o._createRow_hlines=function(e,t){var i,o,n,a=this.addRow(e),s=t.name.value(),r=$(" "),l=this.createColorPicker(),p=this.createLineWidthEditor(),d=_(),u=$(" ");$(" ").append(r).appendTo(a),this.createLabeledCell(s,r).appendTo(a),$(" ").append(l).appendTo(a),$(" ").append(p).appendTo(a),$(" ").append(d.render()).appendTo(a),$(" ").appendTo(a),$(" ").append(u).appendTo(a),this.createLabeledCell("Show Price",u).appendTo(a),this.bindControl(new c(r,t.visible,!0,this.model(),"Change "+s+" visibility")),this.bindControl(new b(l,t.color,!0,this.model(),"Change "+s+" color")),this.bindControl(new h(d,t.style,parseInt,!0,this.model(),"Change "+s+" style")),this.bindControl(new y(p,t.width,!0,this.model(),"Change "+s+" width")),this.bindControl(new c(u,t.showPrice,!0,this.model(),"Change "+s+" show price")),t.enableText.value()&&(a=this.addRow(e),$(' ').appendTo(a),i=$(" "),$(' ').append(i).appendTo(a),this.createLabeledCell("Show Text",i).appendTo(a),this.bindControl(new c(i,t.showText,!0,this.model(),"Change "+s+" show text")),o=TradingView.createTextPosEditor(),$(" ").append(o.render()).appendTo(a),this.bindControl(new h(o,t.textPos,parseInt,!0,this.model(),"Change "+s+" text position")),n=this.createFontSizeEditor(),$(' ').append(n).appendTo(a),this.bindControl(new h(n,t.fontSize,parseInt,!0,this.model(),"Change "+s+" font size")))},o._createRow_hhists=function(e,t){var i,o,n,a,s,d,u=t.title.value(),y=[],C=[],_=this.addRow(e),m=T();$(" ").append(m).appendTo(_),this.createLabeledCell(u,m).appendTo(_),
this.bindControl(new c(m,t.visible,!0,this.model(),"Change "+u+" Visibility")),_=this.addRow(e),i=$(" "),i.attr("type","text"),i.addClass("ticker"),this.createLabeledCell($.t("Width (% of the Box)"),i).appendTo(_),$(" ").append(i).appendTo(_),o=[p(40)],o.push(r(0)),o.push(l(100)),this.bindControl(new g(i,t.percentWidth,o,!1,this.model(),"Change Percent Width")),_=this.addLabeledRow(e,"Placement"),n=f(),$(" ").append(n).appendTo(_),this.bindControl(new h(n,t.direction,null,!0,this.model(),"Change "+u+" Placement")),_=this.addRow(e),a=$(" "),$(" ").append(a).appendTo(_),this.createLabeledCell($.t("Show Values"),a).appendTo(_),this.bindControl(new c(a,t.showValues,!0,this.model(),"Change "+u+" Show Values")),_=this.addRow(e),s=this.createColorPicker(),this.createLabeledCell($.t("Text Color"),s).appendTo(_),$(" ").append(s).appendTo(_),this.bindControl(new b(s,t.valuesColor,!0,this.model(),"Change "+u+" Text Color"));for(d in t.colors)isNumber(parseInt(d,10))&&(_=this.addRow(e),y[d]=t.titles[d].value(),C[d]=this.createColorPicker(),$(" ").append(y[d]).appendTo(_),$(" ").append(C[d]).appendTo(_),this.bindControl(new b(C[d],t.colors[d],!0,this.model(),"Change "+y[d]+" color")))},o._createRow_backgrounds=function(e,t){var i=this.addRow(e),o=$(" "),n=t.name.value(),a=this.createColorPicker();$(" ").append(o).appendTo(i),this.createLabeledCell(n,o).appendTo(i),$(" ").append(a).appendTo(i),this.bindControl(new c(o,t.visible,!0,this.model(),"Change "+n+" visibility")),this.bindControl(new b(a,t.color,!0,this.model(),"Change "+n+" color",t.transparency))},o._createRow_polygons=function(e,t){var i=this.addRow(e),o=t.name.value(),n=this.createColorPicker();$(" ").append(o).appendTo(i),$(" ").append(n).appendTo(i),this.bindControl(new b(n,t.color,!0,this.model(),"Change "+o+" color"))},o._createRow_trendchannels=function(e,t){var i=this.addRow(e),o=t.name.value(),n=this.createColorPicker();$(" ").append(o).appendTo(i),$(" ").append(n).appendTo(i),this.bindControl(new b(n,t.color,!0,this.model(),"Change "+o+" color",t.transparency))},o._createRow_textmarks=function(e,t){var i=this.addLabeledRow(e),o=t.name.value(),n=this.createColorPicker(),a=this.createColorPicker(),s=this.createFontEditor(),r=this.createFontSizeEditor(),l=$(' '),p=$(' ');$(" ").append(o).appendTo(i),"rectangle"!==t.shape.value()&&$(" ").append(n).appendTo(i),$(" ").append(a).appendTo(i),$(" ").append(s).appendTo(i),$(" ").append(r).appendTo(i),$(" ").append(l).appendTo(i),$(" ").append(p).appendTo(i),this.bindControl(new b(n,t.color,!0,this.model(),"Change "+o+" color",t.transparency)),this.bindControl(new b(a,t.fontColor,!0,this.model(),"Change "+o+" text color",t.transparency)),
this.bindControl(new h(r,t.fontSize,parseInt,!0,this.model(),"Change "+o+" font size")),this.bindControl(new h(s,t.fontFamily,null,!0,this.model(),"Change "+o+" font")),this.bindControl(new c(l,t.fontBold,!0,this.model(),"Change Text Font Bold")),this.bindControl(new c(p,t.fontItalic,!0,this.model(),"Change Text Font Italic"))},o._createRow_shapemarks=function(e,t){var i=this.addRow(e),o=$(" "),n=t.name.value(),a=this.createColorPicker(),s=$(" ");s.attr("type","text"),s.addClass("ticker"),$(" ").append(o).appendTo(i),this.createLabeledCell(n,o).appendTo(i),$(" ").append(a).appendTo(i),this.createLabeledCell("Size",s).appendTo(i),$(" ").append(s).appendTo(i),this.bindControl(new c(o,t.visible,!0,this.model(),"Change "+n+" visibility")),this.bindControl(new b(a,t.color,!0,this.model(),"Change "+n+" back color",t.transparency)),this.bindControl(new g(s,t.size,null,!1,this.model(),"Change size"))},t.StudyStylesPropertyPage=o,t.StudyDisplayPropertyPage=n},341:function(e,t,i){"use strict";function o(e,t,i){l.call(this,e,t),this._linetool=i,this.prepareLayout()}function n(e,t,i){a.call(this,e,t,i),this.prepareLayout()}var a=i(825),s=i(691),r=i(823),l=r.PropertyPage,p=r.SliderBinder,d=i(835).createTransparencyEditor,h=i(874);inherit(o,s),o.prototype.prepareLayout=function(){var e,t,i,o,n,a,r=$(''),l=$('').data({"layout-tab":h.TabNames.inputs,"layout-tab-priority":h.TabPriority.Inputs});this._table=r.add(l),s.prototype.prepareLayoutForTable.call(this,r),e=$("").appendTo(l),$("").append($.t("Avg HL in minticks")).appendTo(e),t=$(" ").appendTo(e),i=$(" ").addClass("ticker").appendTo(t),e=$(" ").appendTo(l),$("").append($.t("Variance")).appendTo(e),o=$(" ").appendTo(e),n=$(" ").addClass("ticker").appendTo(o),a=this._linetool.properties(),this.bindInteger(i,a.averageHL,$.t("Change Average HL value"),1,5e4),this.bindInteger(n,a.variance,$.t("Change Variance value"),1,100),this.loadData()},o.prototype.widget=function(){return this._table},inherit(n,a),n.prototype.prepareLayout=function(){var e,t,i,o,n,a,s,r,l,h,c;this._widget=$(""),e=$("
").appendTo(this._widget),t=this.createColorPicker(),i=this.createColorPicker(),o=this.createColorPicker(),n=this.createColorPicker(),a=this.createColorPicker(),s=$(" ").data("hides",$(n).add(a)),r=$(" ").data("hides",$(o)),l=this.addLabeledRow(e,$.t("Candles")),$("").prependTo(l),$(" ").append(t).appendTo(l),$(" ").append(i).appendTo(l),l=this.addLabeledRow(e,$.t("Borders"),s),$(" ").append(s).prependTo(l),$(" ").append(n).appendTo(l),$(" ").append(a).appendTo(l),$(" ").appendTo(l),l=this.addLabeledRow(e,$.t("Wick"),r),$(" ").append(r).prependTo(l),$(" ").append(o).appendTo(l),$(" ").appendTo(l),
e=$("").appendTo(this._widget),l=$("").appendTo(e),$("").append($.t("Transparency")).appendTo(l),h=d(),$(" ").append(h).appendTo(l),c=this._linetool.properties(),this.bindColor(t,c.candleStyle.upColor,"Change Candle Up Color"),this.bindColor(i,c.candleStyle.downColor,"Change Candle Down Color"),this.bindBoolean(r,c.candleStyle.drawWick,"Change Candle Wick Visibility"),this.bindColor(o,c.candleStyle.wickColor,"Change Candle Wick Color"),this.bindBoolean(s,c.candleStyle.drawBorder,"Change Candle Border Visibility"),this.bindColor(n,c.candleStyle.borderUpColor,"Change Candle Up Border Color"),this.bindColor(a,c.candleStyle.borderDownColor,"Change Candle Down Border Color"),this.bindControl(new p(h,c.transparency,!0,this.model(),"Change Guest Feed Transparency"))},n.prototype.widget=function(){return this._widget},t.LineToolGhostFeedInputsPropertyPage=o,t.LineToolGhostFeedStylesPropertyPage=n},342:function(e,t,i){"use strict";function o(e,t,i){a.call(this,e,t,i),this.prepareLayout()}function n(e,t,i){s.call(this,e,t,i)}var a=i(825),s=i(691),r=i(823),l=r.BooleanBinder,p=r.SimpleComboBinder,d=r.SimpleStringBinder,h=r.ColorBinding,c=r.SliderBinder,u=i(830).createLineStyleEditor;inherit(o,a),o.prototype.prepareLayout=function(){var e,t,i,o,n,a,s,r,b,y,g,C,_,m;this._res=$(""),this._table=$('
').appendTo(this._res),e=this.createLineWidthEditor(),t=u(),i=this.createColorPicker(),o=this.addLabeledRow(this._table,"Line"),$("
").append(i).appendTo(o),$(" ").append(e).appendTo(o),$(' ').append(t.render().css("display","block")).appendTo(o),n=$(" "),o=$(" ").appendTo(this._table),$('').append($("").append(n).append($.t("Show Price"))).prependTo(o),a=$(" "),o=$("").appendTo(this._table),$('').append($("").append(a).append($.t("Show Text"))).prependTo(o),o=this.addLabeledRow(this._table,"Text:"),s=this.createColorPicker(),r=this.createFontSizeEditor(),b=this.createFontEditor(),y=$(' '),g=$(' '),$("").append(s).appendTo(o),$(" ").append(b).appendTo(o),$(" ").append(r).appendTo(o),$(" ").append(y).appendTo(o),$(" ").append(g).appendTo(o),o=$(" ").appendTo(this._table),$("").append($.t("Text Alignment:")).appendTo(o),C=$(""+$.t("left")+" "+$.t("center")+" "+$.t("right")+" "),_=$(""+$.t("top")+" "+$.t("middle")+" "+$.t("bottom")+" ").data("selectbox-css",{display:"block"}),$(" ").append(C).appendTo(o),
$(" ").append(_).appendTo(o),m=$("