commit 2018-01-29 07:51:57.508886
"Track time" chart setting #1918 Stoch RSI Calculation #2038
This commit is contained in:
@@ -207,11 +207,11 @@ description:"Price Channel",shortDescription:"PC",is_price_study:!1,inputs:[{id:
|
||||
defval:9,type:"integer",min:1,max:1e12}],id:"rate_of_change@tv-basicstudies-1",scriptIdPart:"",name:"Rate Of Change"},constructor:function(){this.main=function(t,e){var i,n,s;return this._context=t,this._input=e,i=this._context.new_var(o.Std.close(this._context)),n=this._input(0),s=100*(i.get(0)-i.get(n))/i.get(n),[s]}}},{name:"Relative Strength Index",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#800080"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:70},{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:30}],filledAreasStyle:{fill_0:{color:"#800080",transparency:90,visible:!0}},inputs:{in_0:14}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Relative Strength Index",shortDescription:"RSI",is_price_study:!1,bands:[{id:"hline_0",name:"UpperLimit"},{id:"hline_1",name:"LowerLimit"}],filledAreas:[{id:"fill_0",objAId:"hline_0",objBId:"hline_1",type:"hline_hline",title:"Hlines Background"}],inputs:[{id:"in_0",name:"Length",defval:14,type:"integer",min:1,max:2e3}],id:"Relative Strength Index@tv-basicstudies-1",scriptIdPart:"",name:"Relative Strength Index"},constructor:function(){this.f_0=function(t){return o.Std.max(t,0)},this.f_1=function(t){return-o.Std.min(t,0)},this.f_2=function(t,e){return o.Std.eq(t,0)?100:o.Std.eq(e,0)?0:100-100/(1+e/t)},this.main=function(t,e){var i,n,s,r,a,l,h,c,d,p,u,_;return this._context=t,this._input=e,i=o.Std.close(this._context),n=this._input(0),s=this._context.new_var(i),r=o.Std.change(s),a=this.f_0(r),l=this._context.new_var(a),h=o.Std.rma(l,n,this._context),c=this.f_1(r),d=this._context.new_var(c),p=o.Std.rma(d,n,this._context),u=this.f_2(p,h),_=u,[_]}}},{name:"Relative Vigor Index",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008000"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{in_0:10}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],styles:{plot_0:{title:"RVGI",histogramBase:0,joinPoints:!1},plot_1:{title:"Signal",histogramBase:0,joinPoints:!1}},description:"Relative Vigor Index",shortDescription:"RVGI",is_price_study:!1,inputs:[{id:"in_0",name:"Length",defval:10,type:"integer",min:1,max:2e3}],id:"Relative Vigor Index@tv-basicstudies-1",scriptIdPart:"",name:"Relative Vigor Index"},constructor:function(){this.f_0=function(t,e){return t-e},this.f_1=function(t,e){return t/e},this.main=function(t,e){var i,n,s,r,a,l,h,c,d,p,u,_,f,m,g,v;return this._context=t,this._input=e,i=this._input(0),n=this.f_0(o.Std.close(this._context),o.Std.open(this._context)),s=this._context.new_var(n),r=o.Std.swma(s,this._context),a=this._context.new_var(r),l=o.Std.sum(a,i,this._context),
|
||||
h=this.f_0(o.Std.high(this._context),o.Std.low(this._context)),c=this._context.new_var(h),d=o.Std.swma(c,this._context),p=this._context.new_var(d),u=o.Std.sum(p,i,this._context),_=this.f_1(l,u),f=this._context.new_var(_),m=o.Std.swma(f,this._context),g=_,v=m,[g,v]}}},{name:"Relative Volatility Index",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#000080"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:80},{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:20}],filledAreasStyle:{fill_0:{color:"#808000",transparency:90,visible:!0}},inputs:{in_0:10}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Relative Volatility Index",shortDescription:"RVI",is_price_study:!1,bands:[{id:"hline_0",name:"UpperLimit"},{id:"hline_1",name:"LowerLimit"}],filledAreas:[{id:"fill_0",objAId:"hline_0",objBId:"hline_1",type:"hline_hline",title:"Hlines Background"}],inputs:[{id:"in_0",name:"length",defval:10,type:"integer",min:1,max:2e3}],id:"Relative Volatility Index@tv-basicstudies-1",scriptIdPart:"",name:"Relative Volatility Index"},constructor:function(){this.f_0=function(t,e){return o.Std.le(t,0)?0:e},this.f_1=function(t,e){return o.Std.gt(t,0)?0:e},this.f_2=function(t,e){return t/(t+e)*100},this.main=function(t,e){var i,n,s,r,a,l,h,c,d,p,u,_,f,m;return this._context=t,this._input=e,i=this._input(0),n=o.Std.close(this._context),s=this._context.new_var(n),r=o.Std.stdev(s,i,this._context),a=this._context.new_var(n),l=o.Std.change(a),h=this.f_0(l,r),c=this._context.new_var(h),d=o.Std.ema(c,14,this._context),p=this.f_1(l,r),u=this._context.new_var(p),_=o.Std.ema(u,14,this._context),f=this.f_2(d,_),m=f,[m]}}},{name:"SMI Ergodic Indicator/Oscillator",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF7F00"},plot_2:{linestyle:0,linewidth:1,plottype:1,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{in_0:5,in_1:20,in_2:5}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"},{id:"plot_2",type:"line"}],styles:{plot_0:{title:"Indicator",histogramBase:0,joinPoints:!1},plot_1:{title:"Signal",histogramBase:0,joinPoints:!1},plot_2:{title:"Oscillator",histogramBase:0,joinPoints:!1}},description:"SMI Ergodic Indicator/Oscillator",shortDescription:"SMIIO",is_price_study:!1,inputs:[{id:"in_0",name:"shortlen",defval:5,type:"integer",min:1,max:2e3},{id:"in_1",name:"longlen",defval:20,type:"integer",min:1,max:2e3},{id:"in_2",name:"siglen",defval:5,type:"integer",min:1,max:2e3}],id:"SMI Ergodic Indicator/Oscillator@tv-basicstudies-1",scriptIdPart:"",name:"SMI Ergodic Indicator/Oscillator"},constructor:function(){this.f_0=function(t,e){return t-e},
|
||||
this.main=function(t,e){var i,n,s,r,a,l,h,c,d,p,u,_;return this._context=t,this._input=e,i=this._input(0),n=this._input(1),s=this._input(2),r=o.Std.close(this._context),a=this._context.new_var(r),l=o.Std.tsi(a,i,n,this._context),h=this._context.new_var(l),c=o.Std.ema(h,s,this._context),d=this.f_0(l,c),p=l,u=c,_=d,[p,u,_]}}},{name:"Smoothed Moving Average",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{in_0:7,in_1:"close"}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"Smoothed Moving Average",shortDescription:"SMMA",is_price_study:!0,inputs:[{id:"in_0",name:"Length",defval:7,type:"integer",min:1,max:1e12},{id:"in_1",name:"Source",defval:"close",type:"source",options:["open","high","low","close","hl2","hlc3","ohlc4"]}],id:"smoothed_moving_average@tv-basicstudies-1",scriptIdPart:"",name:"Smoothed Moving Average"},constructor:function(){this.f_0=function(){var t,e=this._input(0),i=o.Std[this._input(1)](this._context),n=this._context.new_var(i),s=o.Std.sma(n,e,this._context),r=this._context.new_var(),a=(r.get(1)*(e-1)+i)/e;return r.set(o.Std.na(r.get(1))?s:a),t=r.get(0),[t]},this.main=function(t,e){return this._context=t,this._input=e,this.f_0()}}},{name:"Stochastic",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:80},{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:20}],filledAreasStyle:{fill_0:{color:"#800080",transparency:75,visible:!0}},inputs:{in_0:14,in_1:1,in_2:3}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],styles:{plot_0:{title:"%K",histogramBase:0,joinPoints:!1},plot_1:{title:"%D",histogramBase:0,joinPoints:!1}},description:"Stochastic",shortDescription:"Stoch",is_price_study:!1,bands:[{id:"hline_0",name:"UpperLimit"},{id:"hline_1",name:"LowerLimit"}],filledAreas:[{id:"fill_0",objAId:"hline_0",objBId:"hline_1",type:"hline_hline",title:"Hlines Background"}],inputs:[{id:"in_0",name:"length",defval:14,type:"integer",min:1,max:1e4},{id:"in_1",name:"smoothK",defval:1,type:"integer",min:1,max:1e4},{id:"in_2",name:"smoothD",defval:3,type:"integer",min:1,max:1e4}],id:"Stochastic@tv-basicstudies-1",scriptIdPart:"",name:"Stochastic"},constructor:function(){this.main=function(t,e){var i,n,s,r,a,l,h,c,d,p,u,_,f,m,g,v;return this._context=t,this._input=e,i=this._input(0),n=this._input(1),s=this._input(2),r=o.Std.close(this._context),a=o.Std.high(this._context),l=o.Std.low(this._context),h=this._context.new_var(r),c=this._context.new_var(a),d=this._context.new_var(l),p=o.Std.stoch(h,c,d,i,this._context),u=this._context.new_var(p),
|
||||
_=o.Std.sma(u,n,this._context),f=this._context.new_var(_),m=o.Std.sma(f,s,this._context),g=_,v=m,[g,v]}}},{name:"Stochastic RSI",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:80},{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:20}],filledAreasStyle:{fill_0:{color:"#800080",transparency:80,visible:!0}},inputs:{in_0:14,in_1:14,in_2:3,in_3:3}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],styles:{plot_0:{title:"%K",histogramBase:0,joinPoints:!1},plot_1:{title:"%D",histogramBase:0,joinPoints:!1}},description:"Stochastic RSI",shortDescription:"Stoch RSI",is_price_study:!1,bands:[{id:"hline_0",name:"UpperLimit"},{id:"hline_1",name:"LowerLimit"}],filledAreas:[{id:"fill_0",objAId:"hline_0",objBId:"hline_1",type:"hline_hline",title:"Hlines Background"}],inputs:[{id:"in_0",name:"lengthRSI",defval:14,type:"integer",min:1,max:1e4},{id:"in_1",name:"lengthStoch",defval:14,type:"integer",min:1,max:1e4},{id:"in_2",name:"smoothK",defval:3,type:"integer",min:1,max:1e4},{id:"in_3",name:"smoothD",defval:3,type:"integer",min:1,max:1e4}],id:"Stochastic RSI@tv-basicstudies-1",scriptIdPart:"",name:"Stochastic RSI"},constructor:function(){this.main=function(t,e){var i,n,s,r,a,l,h,c,d,p,u,_,f,m,g,v;return this._context=t,this._input=e,i=o.Std.close(this._context),n=this._input(0),s=this._input(1),r=this._input(2),a=this._input(3),l=o.Std.rsi(i,n),h=this._context.new_var(l),c=this._context.new_var(l),d=this._context.new_var(l),p=o.Std.stoch(h,c,d,s,this._context),u=this._context.new_var(p),_=o.Std.sma(u,r,this._context),f=this._context.new_var(_),m=o.Std.sma(f,a,this._context),g=_,v=m,[g,v]}}},{name:"TRIX",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#800000"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],inputs:{in_0:18}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"TRIX",histogramBase:0,joinPoints:!1}},description:"TRIX",shortDescription:"TRIX",is_price_study:!1,bands:[{id:"hline_0",name:"Zero"}],inputs:[{id:"in_0",name:"length",defval:18,type:"integer",min:1,max:2e3}],id:"TRIX@tv-basicstudies-1",scriptIdPart:"",name:"TRIX"},constructor:function(){this.f_0=function(t){return o.Std.log(t)},this.f_1=function(t){return 1e4*t},this.main=function(t,e){var i,n,s,r,a,l,h,c,d,p,u,_;return this._context=t,this._input=e,i=this._input(0),n=this.f_0(o.Std.close(this._context)),s=this._context.new_var(n),r=o.Std.ema(s,i,this._context),a=this._context.new_var(r),l=o.Std.ema(a,i,this._context),h=this._context.new_var(l),c=o.Std.ema(h,i,this._context),d=this._context.new_var(c),p=o.Std.change(d),u=this.f_1(p),_=u,[_]}
|
||||
}},{name:"Triple EMA",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008000"}},precision:4,inputs:{in_0:9}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Triple EMA",shortDescription:"TEMA",is_price_study:!0,inputs:[{id:"in_0",name:"length",defval:9,type:"integer",min:1,max:1e4}],id:"Triple EMA@tv-basicstudies-1",scriptIdPart:"",name:"Triple EMA"},constructor:function(){this.f_0=function(t,e,i){return 3*(t-e)+i},this.main=function(t,e){var i,n,s,r,a,l,h,c,d,p;return this._context=t,this._input=e,i=this._input(0),n=o.Std.close(this._context),s=this._context.new_var(n),r=o.Std.ema(s,i,this._context),a=this._context.new_var(r),l=o.Std.ema(a,i,this._context),h=this._context.new_var(l),c=o.Std.ema(h,i,this._context),d=this.f_0(r,l,c),p=d,[p]}}},{name:"True Strength Indicator",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#000080"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],inputs:{in_0:25,in_1:13,in_2:13}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1},plot_1:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"True Strength Indicator",shortDescription:"True Strength Indicator",is_price_study:!1,bands:[{id:"hline_0",name:"Zero"}],inputs:[{id:"in_0",name:"long",defval:25,type:"integer",min:1,max:4999},{id:"in_1",name:"short",defval:13,type:"integer",min:1,max:4999},{id:"in_2",name:"siglen",defval:13,type:"integer",min:1,max:4999}],id:"True Strength Indicator@tv-basicstudies-1",scriptIdPart:"",name:"True Strength Indicator"},constructor:function(){this.main=function(t,e){var i,n,s,r,a,l,h,c;return this._context=t,this._input=e,i=this._input(0),n=this._input(1),s=this._input(2),r=o.Std.close(this._context),a=this._context.new_var(r),l=o.Std.tsi(a,n,i,this._context),h=l,c=this._context.new_var(h),[h,o.Std.ema(c,s,this._context)]}}},{name:"Ultimate Oscillator",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{in_0:7,in_1:14,in_2:28}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"UO",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"Ultimate Oscillator",shortDescription:"UO",is_price_study:!1,inputs:[{id:"in_0",name:"length7",defval:7,type:"integer",min:1,max:1e12},{id:"in_1",name:"length14",defval:14,type:"integer",min:1,max:1e12},{id:"in_2",name:"length28",defval:28,type:"integer",min:1,max:1e12}],id:"ultimate_oscillator@tv-basicstudies-1",scriptIdPart:"",name:"Ultimate Oscillator"
|
||||
},constructor:function(){this.f_0=function(t,e,i){var n=this._context.new_var(t),s=this._context.new_var(e);return[o.Std.sum(n,i,this._context)/o.Std.sum(s,i,this._context)]},this.f_1=function(){var t=this._input(0),e=this._input(1),i=this._input(2),n=this._context.new_var(o.Std.close(this._context)),s=o.Std.max(o.Std.high(this._context),n.get(1)),r=this._context.new_var(o.Std.close(this._context)),a=o.Std.min(o.Std.low(this._context),r.get(1)),l=o.Std.close(this._context)-a,h=s-a,c=this.f_0(l,h,t),d=this.f_0(l,h,e),p=this.f_0(l,h,i);return[100*(4*c[0]+2*d[0]+p[0])/7]},this.main=function(t,e){return this._context=t,this._input=e,this.f_1()}}},{name:"VWMA",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}},precision:4,inputs:{in_0:20}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"VWMA",shortDescription:"VWMA",is_price_study:!0,inputs:[{id:"in_0",name:"len",defval:20,type:"integer",min:1,max:1e4}],id:"VWMA@tv-basicstudies-1",scriptIdPart:"",name:"VWMA"},constructor:function(){this.main=function(t,e){var i,n,s,r,a;return this._context=t,this._input=e,i=o.Std.close(this._context),n=this._input(0),s=this._context.new_var(i),r=o.Std.vwma(s,n,this._context),a=r,[a]}}},{name:"Volume Oscillator",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#000080"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],inputs:{in_0:5,in_1:10}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Volume Oscillator",shortDescription:"Volume Osc",is_price_study:!1,bands:[{id:"hline_0",name:"Zero"}],inputs:[{id:"in_0",name:"shortlen",defval:5,type:"integer",min:1,max:4999},{id:"in_1",name:"longlen",defval:10,type:"integer",min:1,max:4999}],id:"Volume Oscillator@tv-basicstudies-1",scriptIdPart:"",name:"Volume Oscillator"},constructor:function(){this.f_0=function(t,e){return 100*(t-e)/e},this.main=function(t,e){var i,n,s,r,a,l,h,c,d;return this._context=t,this._input=e,i=this._input(0),n=this._input(1),s=o.Std.volume(this._context),r=this._context.new_var(s),a=o.Std.ema(r,i,this._context),l=this._context.new_var(s),h=o.Std.ema(l,n,this._context),c=this.f_0(a,h),d=c,[d]}}},{name:"Vortex Indicator",metainfo:{_metainfoVersion:42,isTVScript:!1,isTVScriptStub:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{in_0:14}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],styles:{plot_0:{title:"VI +",histogramBase:0,joinPoints:!1,isHidden:!1},plot_1:{title:"VI -",histogramBase:0,joinPoints:!1,isHidden:!1}},
|
||||
description:"Vortex Indicator",shortDescription:"VI",is_price_study:!1,is_hidden_study:!1,id:"vortex_indicator@tv-basicstudies-1",inputs:[{id:"in_0",name:"Period",defval:14,type:"integer",min:2,max:1e12}],scriptIdPart:"",name:"Vortex Indicator"},constructor:function(){this.f_0=function(){var t=this._input(0),e=this._context.new_var(o.Std.low(this._context)),i=this._context.new_var(o.Std.abs(o.Std.high(this._context)-e.get(1))),n=o.Std.sum(i,t,this._context),s=this._context.new_var(o.Std.high(this._context)),r=this._context.new_var(o.Std.abs(o.Std.low(this._context)-s.get(1))),a=o.Std.sum(r,t,this._context),l=this._context.new_var(o.Std.atr(1,this._context)),h=o.Std.sum(l,t,this._context);return[n/h,a/h]},this.main=function(t,e){return this._context=t,this._input=e,this.f_0()}}},{name:"Willams %R",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#000080"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:-20},{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:-80}],filledAreasStyle:{fill_0:{color:"#000080",transparency:90,visible:!0}},inputs:{in_0:14}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Williams %R",shortDescription:"%R",is_price_study:!1,bands:[{id:"hline_0",name:"UpperLimit"},{id:"hline_1",name:"LowerLimit"}],filledAreas:[{id:"fill_0",objAId:"hline_0",objBId:"hline_1",type:"hline_hline",title:"Hlines Background"}],inputs:[{id:"in_0",name:"length",defval:14,type:"integer",min:1,max:2e3}],id:"Willams %R@tv-basicstudies-1",scriptIdPart:"",name:"Willams %R"},constructor:function(){this.f_0=function(t,e,i){return 100*(t-e)/(e-i)},this.main=function(t,e){var i,n,s,r,a,l,h,c,d;return this._context=t,this._input=e,i=this._input(0),n=o.Std.high(this._context),s=this._context.new_var(n),r=o.Std.highest(s,i,this._context),a=o.Std.low(this._context),l=this._context.new_var(a),h=o.Std.lowest(l,i,this._context),c=this.f_0(o.Std.close(this._context),r,h),d=c,[d]}}},{name:"Williams Alligator",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"},plot_2:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008000"}},precision:4,inputs:{in_0:21,in_1:13,in_2:8}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"},{id:"plot_2",type:"line"}],styles:{plot_0:{title:"Jaw",histogramBase:0,joinPoints:!1},plot_1:{title:"Teeth",histogramBase:0,joinPoints:!1},plot_2:{title:"Lips",histogramBase:0,joinPoints:!1}},description:"Williams Alligator",shortDescription:"Alligator",is_price_study:!0,inputs:[{id:"in_0",name:"jawLength",defval:21,type:"integer",min:1,max:2e3},{id:"in_1",name:"teethLength",defval:13,type:"integer",
|
||||
min:1,max:2e3},{id:"in_2",name:"lipsLength",defval:8,type:"integer",min:1,max:2e3}],id:"Williams Alligator@tv-basicstudies-1",scriptIdPart:"",name:"Williams Alligator"},constructor:function(){this.main=function(t,e){var i,n,s,r,a,l,h,c,d,p,u,_,f;return this._context=t,this._input=e,i=this._input(0),n=this._input(1),s=this._input(2),r=o.Std.hl2(this._context),a=this._context.new_var(r),l=o.Std.ema(a,i,this._context),h=this._context.new_var(r),c=o.Std.ema(h,n,this._context),d=this._context.new_var(r),p=o.Std.ema(d,s,this._context),u=l,_=c,f=p,[{value:u,offset:8},{value:_,offset:5},{value:f,offset:3}]}}},{name:"Williams Fractals",metainfo:{_metainfoVersion:42,isTVScript:!1,isTVScriptStub:!1,defaults:{styles:{plot_0:{plottype:"shape_triangle_down",visible:!0,location:"BelowBar",transparency:0,color:"#800000"},plot_1:{plottype:"shape_triangle_up",visible:!0,location:"AboveBar",transparency:0,color:"#808000"}},precision:4,inputs:{in_0:2}},plots:[{id:"plot_0",type:"shapes"},{id:"plot_1",type:"shapes"}],styles:{plot_0:{title:"Shapes",isHidden:!1},plot_1:{title:"Shapes",isHidden:!1}},description:"Williams Fractal",shortDescription:"Fractals",is_price_study:!0,is_hidden_study:!1,id:"Williams Fractals@tv-basicstudies-1",inputs:[{id:"in_0",name:"Periods",defval:2,type:"integer",min:2,max:1e12}],scriptIdPart:"",name:"Williams Fractals",isCustomIndicator:!0},constructor:function(){this.f_0=function(){var t=this._input(0),e=this._context.new_var(o.Std.high(this._context)),i=o.Std.or(o.Std.and(o.Std.and(o.Std.lt(e.get(t+2),e.get(t)),o.Std.lt(e.get(t+1),e.get(t))),o.Std.and(o.Std.lt(e.get(t-1),e.get(t)),o.Std.lt(e.get(t-2),e.get(t)))),o.Std.or(o.Std.or(o.Std.and(o.Std.lt(e.get(t+3),e.get(t)),o.Std.and(o.Std.and(o.Std.lt(e.get(t+2),e.get(t)),o.Std.eq(e.get(t+1),e.get(t))),o.Std.and(o.Std.lt(e.get(t-1),e.get(t)),o.Std.lt(e.get(t-2),e.get(t))))),o.Std.and(o.Std.and(o.Std.lt(e.get(t+4),e.get(t)),o.Std.lt(e.get(t+3),e.get(t))),o.Std.and(o.Std.and(o.Std.eq(e.get(t+2),e.get(t)),o.Std.le(e.get(t+1),e.get(t))),o.Std.and(o.Std.lt(e.get(t-1),e.get(t)),o.Std.lt(e.get(t-2),e.get(t)))))),o.Std.or(o.Std.and(o.Std.and(o.Std.lt(e.get(t+5),e.get(t)),o.Std.and(o.Std.lt(e.get(t+4),e.get(t)),o.Std.eq(e.get(t+3),e.get(t)))),o.Std.and(o.Std.and(o.Std.eq(e.get(t+2),e.get(t)),o.Std.le(e.get(t+1),e.get(t))),o.Std.and(o.Std.lt(e.get(t-1),e.get(t)),o.Std.lt(e.get(t-2),e.get(t))))),o.Std.and(o.Std.and(o.Std.and(o.Std.lt(e.get(t+6),e.get(t)),o.Std.lt(e.get(t+5),e.get(t))),o.Std.and(o.Std.eq(e.get(t+4),e.get(t)),o.Std.le(e.get(t+3),e.get(t)))),o.Std.and(o.Std.and(o.Std.eq(e.get(t+2),e.get(t)),o.Std.le(e.get(t+1),e.get(t))),o.Std.and(o.Std.lt(e.get(t-1),e.get(t)),o.Std.lt(e.get(t-2),e.get(t)))))))),n=this._context.new_var(o.Std.low(this._context))
|
||||
_=o.Std.sma(u,n,this._context),f=this._context.new_var(_),m=o.Std.sma(f,s,this._context),g=_,v=m,[g,v]}}},{name:"Stochastic RSI",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:80},{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:20}],filledAreasStyle:{fill_0:{color:"#800080",transparency:80,visible:!0}},inputs:{in_0:14,in_1:14,in_2:3,in_3:3}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],styles:{plot_0:{title:"%K",histogramBase:0,joinPoints:!1},plot_1:{title:"%D",histogramBase:0,joinPoints:!1}},description:"Stochastic RSI",shortDescription:"Stoch RSI",is_price_study:!1,bands:[{id:"hline_0",name:"UpperLimit"},{id:"hline_1",name:"LowerLimit"}],filledAreas:[{id:"fill_0",objAId:"hline_0",objBId:"hline_1",type:"hline_hline",title:"Hlines Background"}],inputs:[{id:"in_0",name:"lengthRSI",defval:14,type:"integer",min:1,max:1e4},{id:"in_1",name:"lengthStoch",defval:14,type:"integer",min:1,max:1e4},{id:"in_2",name:"smoothK",defval:3,type:"integer",min:1,max:1e4},{id:"in_3",name:"smoothD",defval:3,type:"integer",min:1,max:1e4}],id:"Stochastic RSI@tv-basicstudies-1",scriptIdPart:"",name:"Stochastic RSI"},constructor:function(){this.f_1=function(t,e,i){var n=i.new_var(o.Std.max(o.Std.change(t),0));return o.Std.rma(n,e,i)},this.f_2=function(t,e,i){var n=i.new_var(-o.Std.min(o.Std.change(t),0));return o.Std.rma(n,e,i)},this.main=function(t,e){var i,n,s,r,a,l,h,c,d,p,u,_,f,m,g,v,y;return this._context=t,this._input=e,i=o.Std.close(this._context),n=this._input(0),s=this._input(1),r=this._input(2),a=this._input(3),l=this._context.new_var(i),h=o.Std.rsi(this.f_1(l,n,this._context),this.f_2(l,n,this._context)),c=this._context.new_var(h),d=this._context.new_var(h),p=this._context.new_var(h),u=o.Std.stoch(c,d,p,s,this._context),_=this._context.new_var(u),f=o.Std.sma(_,r,this._context),m=this._context.new_var(f),g=o.Std.sma(m,a,this._context),v=f,y=g,[v,y]}}},{name:"TRIX",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#800000"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],inputs:{in_0:18}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"TRIX",histogramBase:0,joinPoints:!1}},description:"TRIX",shortDescription:"TRIX",is_price_study:!1,bands:[{id:"hline_0",name:"Zero"}],inputs:[{id:"in_0",name:"length",defval:18,type:"integer",min:1,max:2e3}],id:"TRIX@tv-basicstudies-1",scriptIdPart:"",name:"TRIX"},constructor:function(){this.f_0=function(t){return o.Std.log(t)},this.f_1=function(t){return 1e4*t},this.main=function(t,e){var i,n,s,r,a,l,h,c,d,p,u,_;return this._context=t,this._input=e,i=this._input(0),
|
||||
n=this.f_0(o.Std.close(this._context)),s=this._context.new_var(n),r=o.Std.ema(s,i,this._context),a=this._context.new_var(r),l=o.Std.ema(a,i,this._context),h=this._context.new_var(l),c=o.Std.ema(h,i,this._context),d=this._context.new_var(c),p=o.Std.change(d),u=this.f_1(p),_=u,[_]}}},{name:"Triple EMA",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008000"}},precision:4,inputs:{in_0:9}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Triple EMA",shortDescription:"TEMA",is_price_study:!0,inputs:[{id:"in_0",name:"length",defval:9,type:"integer",min:1,max:1e4}],id:"Triple EMA@tv-basicstudies-1",scriptIdPart:"",name:"Triple EMA"},constructor:function(){this.f_0=function(t,e,i){return 3*(t-e)+i},this.main=function(t,e){var i,n,s,r,a,l,h,c,d,p;return this._context=t,this._input=e,i=this._input(0),n=o.Std.close(this._context),s=this._context.new_var(n),r=o.Std.ema(s,i,this._context),a=this._context.new_var(r),l=o.Std.ema(a,i,this._context),h=this._context.new_var(l),c=o.Std.ema(h,i,this._context),d=this.f_0(r,l,c),p=d,[p]}}},{name:"True Strength Indicator",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#000080"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],inputs:{in_0:25,in_1:13,in_2:13}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1},plot_1:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"True Strength Indicator",shortDescription:"True Strength Indicator",is_price_study:!1,bands:[{id:"hline_0",name:"Zero"}],inputs:[{id:"in_0",name:"long",defval:25,type:"integer",min:1,max:4999},{id:"in_1",name:"short",defval:13,type:"integer",min:1,max:4999},{id:"in_2",name:"siglen",defval:13,type:"integer",min:1,max:4999}],id:"True Strength Indicator@tv-basicstudies-1",scriptIdPart:"",name:"True Strength Indicator"},constructor:function(){this.main=function(t,e){var i,n,s,r,a,l,h,c;return this._context=t,this._input=e,i=this._input(0),n=this._input(1),s=this._input(2),r=o.Std.close(this._context),a=this._context.new_var(r),l=o.Std.tsi(a,n,i,this._context),h=l,c=this._context.new_var(h),[h,o.Std.ema(c,s,this._context)]}}},{name:"Ultimate Oscillator",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{in_0:7,in_1:14,in_2:28}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"UO",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"Ultimate Oscillator",shortDescription:"UO",is_price_study:!1,inputs:[{
|
||||
id:"in_0",name:"length7",defval:7,type:"integer",min:1,max:1e12},{id:"in_1",name:"length14",defval:14,type:"integer",min:1,max:1e12},{id:"in_2",name:"length28",defval:28,type:"integer",min:1,max:1e12}],id:"ultimate_oscillator@tv-basicstudies-1",scriptIdPart:"",name:"Ultimate Oscillator"},constructor:function(){this.f_0=function(t,e,i){var n=this._context.new_var(t),s=this._context.new_var(e);return[o.Std.sum(n,i,this._context)/o.Std.sum(s,i,this._context)]},this.f_1=function(){var t=this._input(0),e=this._input(1),i=this._input(2),n=this._context.new_var(o.Std.close(this._context)),s=o.Std.max(o.Std.high(this._context),n.get(1)),r=this._context.new_var(o.Std.close(this._context)),a=o.Std.min(o.Std.low(this._context),r.get(1)),l=o.Std.close(this._context)-a,h=s-a,c=this.f_0(l,h,t),d=this.f_0(l,h,e),p=this.f_0(l,h,i);return[100*(4*c[0]+2*d[0]+p[0])/7]},this.main=function(t,e){return this._context=t,this._input=e,this.f_1()}}},{name:"VWMA",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}},precision:4,inputs:{in_0:20}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"VWMA",shortDescription:"VWMA",is_price_study:!0,inputs:[{id:"in_0",name:"len",defval:20,type:"integer",min:1,max:1e4}],id:"VWMA@tv-basicstudies-1",scriptIdPart:"",name:"VWMA"},constructor:function(){this.main=function(t,e){var i,n,s,r,a;return this._context=t,this._input=e,i=o.Std.close(this._context),n=this._input(0),s=this._context.new_var(i),r=o.Std.vwma(s,n,this._context),a=r,[a]}}},{name:"Volume Oscillator",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#000080"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],inputs:{in_0:5,in_1:10}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Volume Oscillator",shortDescription:"Volume Osc",is_price_study:!1,bands:[{id:"hline_0",name:"Zero"}],inputs:[{id:"in_0",name:"shortlen",defval:5,type:"integer",min:1,max:4999},{id:"in_1",name:"longlen",defval:10,type:"integer",min:1,max:4999}],id:"Volume Oscillator@tv-basicstudies-1",scriptIdPart:"",name:"Volume Oscillator"},constructor:function(){this.f_0=function(t,e){return 100*(t-e)/e},this.main=function(t,e){var i,n,s,r,a,l,h,c,d;return this._context=t,this._input=e,i=this._input(0),n=this._input(1),s=o.Std.volume(this._context),r=this._context.new_var(s),a=o.Std.ema(r,i,this._context),l=this._context.new_var(s),h=o.Std.ema(l,n,this._context),c=this.f_0(a,h),d=c,[d]}}},{name:"Vortex Indicator",metainfo:{_metainfoVersion:42,isTVScript:!1,isTVScriptStub:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,
|
||||
transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{in_0:14}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],styles:{plot_0:{title:"VI +",histogramBase:0,joinPoints:!1,isHidden:!1},plot_1:{title:"VI -",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"Vortex Indicator",shortDescription:"VI",is_price_study:!1,is_hidden_study:!1,id:"vortex_indicator@tv-basicstudies-1",inputs:[{id:"in_0",name:"Period",defval:14,type:"integer",min:2,max:1e12}],scriptIdPart:"",name:"Vortex Indicator"},constructor:function(){this.f_0=function(){var t=this._input(0),e=this._context.new_var(o.Std.low(this._context)),i=this._context.new_var(o.Std.abs(o.Std.high(this._context)-e.get(1))),n=o.Std.sum(i,t,this._context),s=this._context.new_var(o.Std.high(this._context)),r=this._context.new_var(o.Std.abs(o.Std.low(this._context)-s.get(1))),a=o.Std.sum(r,t,this._context),l=this._context.new_var(o.Std.atr(1,this._context)),h=o.Std.sum(l,t,this._context);return[n/h,a/h]},this.main=function(t,e){return this._context=t,this._input=e,this.f_0()}}},{name:"Willams %R",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#000080"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:-20},{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:-80}],filledAreasStyle:{fill_0:{color:"#000080",transparency:90,visible:!0}},inputs:{in_0:14}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Williams %R",shortDescription:"%R",is_price_study:!1,bands:[{id:"hline_0",name:"UpperLimit"},{id:"hline_1",name:"LowerLimit"}],filledAreas:[{id:"fill_0",objAId:"hline_0",objBId:"hline_1",type:"hline_hline",title:"Hlines Background"}],inputs:[{id:"in_0",name:"length",defval:14,type:"integer",min:1,max:2e3}],id:"Willams %R@tv-basicstudies-1",scriptIdPart:"",name:"Willams %R"},constructor:function(){this.f_0=function(t,e,i){return 100*(t-e)/(e-i)},this.main=function(t,e){var i,n,s,r,a,l,h,c,d;return this._context=t,this._input=e,i=this._input(0),n=o.Std.high(this._context),s=this._context.new_var(n),r=o.Std.highest(s,i,this._context),a=o.Std.low(this._context),l=this._context.new_var(a),h=o.Std.lowest(l,i,this._context),c=this.f_0(o.Std.close(this._context),r,h),d=c,[d]}}},{name:"Williams Alligator",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"},plot_2:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008000"}},precision:4,inputs:{in_0:21,in_1:13,in_2:8}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"},{id:"plot_2",type:"line"}],styles:{plot_0:{title:"Jaw",histogramBase:0,joinPoints:!1},plot_1:{title:"Teeth",histogramBase:0,
|
||||
joinPoints:!1},plot_2:{title:"Lips",histogramBase:0,joinPoints:!1}},description:"Williams Alligator",shortDescription:"Alligator",is_price_study:!0,inputs:[{id:"in_0",name:"jawLength",defval:21,type:"integer",min:1,max:2e3},{id:"in_1",name:"teethLength",defval:13,type:"integer",min:1,max:2e3},{id:"in_2",name:"lipsLength",defval:8,type:"integer",min:1,max:2e3}],id:"Williams Alligator@tv-basicstudies-1",scriptIdPart:"",name:"Williams Alligator"},constructor:function(){this.main=function(t,e){var i,n,s,r,a,l,h,c,d,p,u,_,f;return this._context=t,this._input=e,i=this._input(0),n=this._input(1),s=this._input(2),r=o.Std.hl2(this._context),a=this._context.new_var(r),l=o.Std.ema(a,i,this._context),h=this._context.new_var(r),c=o.Std.ema(h,n,this._context),d=this._context.new_var(r),p=o.Std.ema(d,s,this._context),u=l,_=c,f=p,[{value:u,offset:8},{value:_,offset:5},{value:f,offset:3}]}}},{name:"Williams Fractals",metainfo:{_metainfoVersion:42,isTVScript:!1,isTVScriptStub:!1,defaults:{styles:{plot_0:{plottype:"shape_triangle_down",visible:!0,location:"BelowBar",transparency:0,color:"#800000"},plot_1:{plottype:"shape_triangle_up",visible:!0,location:"AboveBar",transparency:0,color:"#808000"}},precision:4,inputs:{in_0:2}},plots:[{id:"plot_0",type:"shapes"},{id:"plot_1",type:"shapes"}],styles:{plot_0:{title:"Shapes",isHidden:!1},plot_1:{title:"Shapes",isHidden:!1}},description:"Williams Fractal",shortDescription:"Fractals",is_price_study:!0,is_hidden_study:!1,id:"Williams Fractals@tv-basicstudies-1",inputs:[{id:"in_0",name:"Periods",defval:2,type:"integer",min:2,max:1e12}],scriptIdPart:"",name:"Williams Fractals",isCustomIndicator:!0},constructor:function(){this.f_0=function(){var t=this._input(0),e=this._context.new_var(o.Std.high(this._context)),i=o.Std.or(o.Std.and(o.Std.and(o.Std.lt(e.get(t+2),e.get(t)),o.Std.lt(e.get(t+1),e.get(t))),o.Std.and(o.Std.lt(e.get(t-1),e.get(t)),o.Std.lt(e.get(t-2),e.get(t)))),o.Std.or(o.Std.or(o.Std.and(o.Std.lt(e.get(t+3),e.get(t)),o.Std.and(o.Std.and(o.Std.lt(e.get(t+2),e.get(t)),o.Std.eq(e.get(t+1),e.get(t))),o.Std.and(o.Std.lt(e.get(t-1),e.get(t)),o.Std.lt(e.get(t-2),e.get(t))))),o.Std.and(o.Std.and(o.Std.lt(e.get(t+4),e.get(t)),o.Std.lt(e.get(t+3),e.get(t))),o.Std.and(o.Std.and(o.Std.eq(e.get(t+2),e.get(t)),o.Std.le(e.get(t+1),e.get(t))),o.Std.and(o.Std.lt(e.get(t-1),e.get(t)),o.Std.lt(e.get(t-2),e.get(t)))))),o.Std.or(o.Std.and(o.Std.and(o.Std.lt(e.get(t+5),e.get(t)),o.Std.and(o.Std.lt(e.get(t+4),e.get(t)),o.Std.eq(e.get(t+3),e.get(t)))),o.Std.and(o.Std.and(o.Std.eq(e.get(t+2),e.get(t)),o.Std.le(e.get(t+1),e.get(t))),o.Std.and(o.Std.lt(e.get(t-1),e.get(t)),o.Std.lt(e.get(t-2),e.get(t))))),o.Std.and(o.Std.and(o.Std.and(o.Std.lt(e.get(t+6),e.get(t)),o.Std.lt(e.get(t+5),e.get(t))),o.Std.and(o.Std.eq(e.get(t+4),e.get(t)),o.Std.le(e.get(t+3),e.get(t)))),o.Std.and(o.Std.and(o.Std.eq(e.get(t+2),e.get(t)),o.Std.le(e.get(t+1),e.get(t))),o.Std.and(o.Std.lt(e.get(t-1),e.get(t)),o.Std.lt(e.get(t-2),e.get(t)))))))),n=this._context.new_var(o.Std.low(this._context))
|
||||
;return[o.Std.or(o.Std.and(o.Std.and(o.Std.gt(n.get(t+2),n.get(t)),o.Std.gt(n.get(t+1),n.get(t))),o.Std.and(o.Std.gt(n.get(t-1),n.get(t)),o.Std.gt(n.get(t-2),n.get(t)))),o.Std.or(o.Std.or(o.Std.and(o.Std.gt(n.get(t+3),n.get(t)),o.Std.and(o.Std.and(o.Std.gt(n.get(t+2),n.get(t)),o.Std.eq(n.get(t+1),n.get(t))),o.Std.and(o.Std.gt(n.get(t-1),n.get(t)),o.Std.gt(n.get(t-2),n.get(t))))),o.Std.and(o.Std.and(o.Std.gt(n.get(t+4),n.get(t)),o.Std.gt(n.get(t+3),n.get(t))),o.Std.and(o.Std.and(o.Std.eq(n.get(t+2),n.get(t)),o.Std.ge(n.get(t+1),n.get(t))),o.Std.and(o.Std.gt(n.get(t-1),n.get(t)),o.Std.gt(n.get(t-2),n.get(t)))))),o.Std.or(o.Std.and(o.Std.and(o.Std.gt(n.get(t+5),n.get(t)),o.Std.and(o.Std.gt(n.get(t+4),n.get(t)),o.Std.eq(n.get(t+3),n.get(t)))),o.Std.and(o.Std.and(o.Std.eq(n.get(t+2),n.get(t)),o.Std.ge(n.get(t+1),n.get(t))),o.Std.and(o.Std.gt(n.get(t-1),n.get(t)),o.Std.gt(n.get(t-2),n.get(t))))),o.Std.and(o.Std.and(o.Std.and(o.Std.gt(n.get(t+6),n.get(t)),o.Std.gt(n.get(t+5),n.get(t))),o.Std.and(o.Std.eq(n.get(t+4),n.get(t)),o.Std.ge(n.get(t+3),n.get(t)))),o.Std.and(o.Std.and(o.Std.eq(n.get(t+2),n.get(t)),o.Std.ge(n.get(t+1),n.get(t))),o.Std.and(o.Std.gt(n.get(t-1),n.get(t)),o.Std.gt(n.get(t-2),n.get(t)))))))),i]},this.main=function(t,e){this._context=t,this._input=e;var i=this.f_0();return[{value:i[0],offset:-2},{value:i[1],offset:-2}]}}}]},function(t,e,i){(function(t){var e={};e.LINESTYLE_SOLID=0,e.LINESTYLE_DOTTED=1,e.LINESTYLE_DASHED=2,e.LINESTYLE_LARGE_DASHED=3,e.TEXTPOS_TOPLEFT=0,e.TEXTPOS_TOPCENTER=1,e.TEXTPOS_TOPRIGHT=2,e.TEXTPOS_MIDDLELEFT=3,e.TEXTPOS_MIDDLECENTER=4,e.TEXTPOS_MIDDLERIGHT=5,e.TEXTPOS_BOTTOMLEFT=6,e.TEXTPOS_BOTTOMCENTER=7,e.TEXTPOS_BOTTOMRIGHT=8,e.SIZE_AUTO="auto",e.SIZE_TINY="tiny",e.SIZE_SMALL="small",e.SIZE_NORMAL="normal",e.SIZE_LARGE="large",e.SIZE_HUGE="huge",e.MARKLOC_ABOVEBAR="AboveBar",e.MARKLOC_BELOWBAR="BelowBar",e.MARKLOC_TOP="Top",e.MARKLOC_BOTTOM="Bottom",e.MARKLOC_RIGHT="Right",e.MARKLOC_LEFT="Left",e.MARKLOC_ABSOLUTE="Absolute",e.MARKLOC_ABSOLUTEUP="AbsoluteUp",e.MARKLOC_ABSOLUTEDOWN="AbsoluteDown",e.HHISTLOC_RELATIVE="relative",e.HHISTLOC_ABSOLUTE="absolute",e.HHISTDIR_LEFTTORIGHT="left_to_right",e.HHISTDIR_RIGHTTOLEFT="right_to_left",void 0!==t&&t&&t.exports&&(t.exports=e)}).call(e,i(50)(t))},function(t,e,i){"use strict";var o=i(144),n=i(106).setMouseEventHandler,s={};s.createLabel=function(t,e,i){return o.create("label",$.extend(i,{html:e,for:t}))},s.unbindContextMenu=function(t){t.contextMenu(function(t){return!1})},s.offsetX=function(t,e){return t.width()+e.pageX},s.offsetY=function(t,e){return t.height()+e.pageY},s.isElementInViewport=function(t){"function"==typeof jQuery&&t instanceof jQuery&&(t=t[0]);var e=t.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth)},s.checkObjIsOutOfWindowX=function(t,e){var i,o=$(window).width()-s.offsetX(t,e);return o<0?(i=e.pageX+o,i>0?i:0):e.pageX},s.checkObjIsOutOfWindowY=function(t,e){
|
||||
var i,o=$(window).height()-s.offsetY(t,e);return o<0?(i=e.pageY+o,i>0?i:0):e.pageY},s.checkObjIsOutOfWindow=function(t,e){return{left:s.checkObjIsOutOfWindowX(t,e),top:s.checkObjIsOutOfWindowY(t,e)}},s.setAttr=function(t,e,i){return t.attr?t.attr(e,i):t[e]=i,t},s.removeAttr=function(t,e){return t.removeAttr?t.removeAttr(e):t.removeAttribute(e),t},s.notNull=function(t){return-1===$.inArray(t,[null,void 0,"false","null","undefined",0])},s.hideControl=function(t){return t.css({position:"absolute",top:-1e3,left:-1e3})},s.createPopup=function(t,e,i){return new s.Popup(t,e,i).render()},s.Popup=function(t,e,i){if(void 0!==t.selector?this.jqDiv=t:t.nodeType?this.jqDiv=$(t):this.jqDiv=o.create("div",t),i){var s=this;$.each(i,function(t,e){s[t]=e})}n(this.jqDiv,this),this._callback=e},s.Popup.prototype.render=function(){return this.jqDiv},s.Popup.prototype.show=function(){this.jqDiv.show()},s.Popup.prototype.hide=function(){this.jqDiv.hide()},s.Popup.prototype.setVisible=function(t){t?this.show():this.hide()},s.Popup.prototype.isVisible=function(){return this.jqDiv.is(":visible")},s.Popup.prototype.contextMenuEvent=function(t){return!1},s.Popup.prototype.mouseDownOutsideEvent=function(t){if(this.isVisible()){if(this._callback&&!this._callback())return;this.hide()}},t.exports=s},function(t,e){"use strict";var i={};i.renderAttributes=function(t){var e,i="";for(e in t)t[e]&&(i+=" "+e+'="'+t[e]+'"');return i},i.create=function(t,e){var i=$(document.createElement(t));return e&&(e.html&&(i.html(e.html),delete e.html),i.attr(e)),i},i.validAttributes=["abbr","accept-charset","accept","accesskey","action","align","alink","alt","archive","axis","background","bgcolor","border","cellpadding","cellspacing","char","charoff","charset","checked","cite","class","classid","clear","code","codebase","codetype","color","cols","colspan","compact","content","coords","data","datetime","declare","defer","dir","disabled","enctype","face","for","frame","frameborder","headers","height","href","hreflang","hspace","http-equiv","id","ismap","label","lang","language","link","longdesc","marginheight","marginwidth","maxlength","media","method","multiple","name","nohref","noresize","noshade","nowrap","object","onblur","onchange","onclick","ondblclick","onfocus","onkeydown","onkeypress","onkeyup","onload","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onreset","onselect","onsubmit","onunload","profile","prompt","readonly","rel","rev","rows","rowspan","rules","scheme","scope","scrolling","selected","shape","size","span","src","standby","start","style","summary","tabindex","target","text","title","type","usemap","valign","value","valuetype","version","vlink","vspace","width"],i.validAttribute=function(t){return-1!==jQuery.inArray(t,i.validAttributes)},i.cleanAttributes=function(t){return jQuery.each(t,function(e,o){i.validAttribute(e)||delete t[e]}),t},t.exports=i},function(t,e,i){(function(t){"use strict";function i(e,i,o){var n,s,r,a,l,h,c=this;if(this._options=$.extend({},this._defaultOptions,o||{}),this._$wrapper=e,this._$content=i,
|
||||
this._scroll_speed=40,this._shadow_offset=10,this._header_height=this._options.headerHeight,this._scroll_margin_top=this._options.scrollMarginTop,this.scrolled=new t,this.scrolltoend=new t,this.scrolltostart=new t,this.visibilityCallbacks=[],n=navigator.platform.toLowerCase(),s=navigator.userAgent.toLowerCase(),r=s.indexOf("firefox")>-1,a=n.indexOf("android")>-1||s.indexOf("android")>-1,this._touch=Modernizr.touch||navigator.msMaxTouchPoints||r&&a,this._touch)return this._$content.css("position","relative"),void this._$wrapper.css({"overflow-y":"auto","-webkit-overflow-scrolling":"touch","-ms-overflow-style":"-ms-autohiding-scrollbar"}).scroll(this._onScroll.bind(this));this._$wrapper.css("overflow","hidden"),this._$wrapper.on("mouseenter.sidebar-scroll",function(){c._bottomFixed||c._dragging||(c._options.alwaysVisible||c._$scrollBar.addClass("active"),c._onScroll())}).on("mouseleave.sidebar-scroll",function(){c._bottomFixed||c._dragging||(c._options.alwaysVisible||c._$scrollBar.removeClass("active"),c._onScroll())}).on("mousewheel.sidebar-scroll",function(t,e){if(!t.isDefaultPrevented())return c.scroll(e,"MozMousePixelScroll"===t.originalEvent.type?2:null)}),!1!==this._options.showTopShadow&&(this._$shadowTop=$('<div class="sb-inner-shadow top i-invisible">').appendTo(this._$wrapper)),!1!==this._options.showBottomShadow&&(this._$shadowBottom=$('<div class="sb-inner-shadow">').appendTo(this._$wrapper)),this._$shadowTop&&this._header_height&&this._$shadowTop.css("top",this._header_height-this._shadow_offset),l=this._options.additionalClass?" "+this._options.additionalClass:"",h=this._options.alwaysVisible?" active-always":"",this._$scrollBarWrapper=$('<div class="sb-scrollbar-wrap">').appendTo(this._$wrapper),this._$scrollBar=$('<div class="sb-scrollbar sb-scrollbar-body'+l+h+'"></div>').appendTo(this._$scrollBarWrapper),this._onScroll()}i.prototype.isTouch=function(){return this._touch},i.prototype.getScrollBar=function(){return this._$scrollBar},i.prototype._defaultOptions={headerHeight:0,additionalClass:"",alwaysVisible:!1,showBottomShadow:!0,scrollMarginTop:1,bubbleScrollEvent:!1},i.prototype.initDraggable=function(){if(this._dragInitialized)return this;var t=this;return this._$scrollBar.draggable({axis:"y",containment:this._$scrollBarWrapper,start:function(){t._dragging=!0},stop:function(){t._dragging=!1},drag:function(e,i){t.updateScroll()}}),this._dragInitialized=!0,this},i.prototype.updateScroll=function(){var t,e,i,o,n;return this._touch?this:(t=1,e=Math.ceil(this._$scrollBar.position().top-this._scroll_margin_top-this._header_height),i=this.getContainerHeightWithoutHeader(),o=this._$content.outerHeight(),n=o-i-t,i<=0?this:(this._scroll_target_top=n<=0?this._header_height:Math.min(-e*o/i+this._header_height,this._header_height),e+this._$scrollBar.height()+2>=i?this.scrollToEnd():(this._$content.css("top",this._scroll_target_top+"px"),this._onScroll()),this))},i.prototype.getContainerHeightWithoutHeader=function(){return this._$wrapper.outerHeight()-this._header_height},
|
||||
@@ -490,8 +490,8 @@ h._studyEngine.purgeEndOfDataFlags(t,e),h._studyEngine.purgeRangeExtensionData(t
|
||||
;for(e=0;e<i.length;++e)i[e]={span:i[e][0],time:i[e][1],index:i[e][2]};return t},JSServer.ChartApi.prototype._dispathNotification=function(t){var e,i,o,n,s,r,a,l,h,c,d=t.params.shift();if(this._notificationHandlers[d])switch(t.method){case"timescale_update":e=t.params[0],i=t.params[1],o=this._convertTimescaleResponse(i),o.clear=0===i.changes.length&&0===i.marks.length,this._notificationHandlers[d].onMessage({method:"timescale_update",params:o});for(n in e)s={},s.customId=n,s.plots=e[n].series,e[n].ns&&(s.nonseries=e[n].ns),s.turnaround=e[n].turnaround,r={method:"data_update",params:s},this._invokeNotificationHandler(d,n,r);break;case"tickmark_update":o=this._convertTimescaleResponse(t.params[0]),o.changes=[],this._notificationHandlers[d].onMessage({method:"timescale_update",params:o});break;case"data_update":for(n in t.params[0]){a=t.params[0][n],s={},s.customId=n,s.plots=a.series?a.series:a.plots,s.turnaround=a.turnaround,"s"in a&&"ns"in a&&(s.plots=a.s,s.nonseries=a.ns);for(l=0;l<s.plots.length;l++)for(h in s.plots[l].value)1e100===s.plots[l].value[h]&&(s.plots[l].value[h]=void 0);r={method:"data_update",params:s},this._invokeNotificationHandler(d,n,r)}break;case"index_update":for(n in t.params[0])r={method:"index_update",params:t.params[0][n]},this._invokeNotificationHandler(d,n,r);break;case"critical_error":p.logNormal(new Date+" critical_error session:"+this.sessionid+" reason:"+t.params[0]),this._notificationHandlers[d].onMessage({method:"critical_error",params:t.params});break;case"quote_symbol_data":case"quote_list_fields":case"depth_symbol_error":case"depth_symbol_success":case"dd":case"dpu":case"depth_bar_last_value":this._notificationHandlers[d].onMessage({method:t.method,params:t.params});break;default:c=t.params[0],this._invokeNotificationHandler(d,c,t)}},JSServer.ChartApi.prototype._invokeNotificationHandler=function(t,e,i){if(void 0!==e){var o=this._notificationHandlers[t][e];void 0!==o&&o&&this._invokeHandler(o.handler,i),"series_deleted"!==i.method&&"study_deleted"!==i.method||delete this._notificationHandlers[t][e]}},JSServer.ChartApi.prototype.searchSymbols=function(t,e,i,o,n,s,r){0===t.length&&0===e.length&&0===i.length&&r([]),this._studyEngine.searchSymbols(t,e,i,r)},JSServer.ChartApi.prototype._notifySessions=function(t){var e,i;for(e in this._sessions){if(!this._sessions.hasOwnProperty(e))return;i=this._sessions[e],"function"==typeof i.onMessage&&i.onMessage(t)}},JSServer.ChartApi.prototype.unpack=function(t){throw Error("This method is not implemented")},JSServer.ChartApi.prototype.reconnectTimeout=function(t){throw Error("This method is not implemented")},JSServer.ChartApi.prototype.quoteCreateSession=function(t){return this._studyEngine.quoteCreateSession(t)},JSServer.ChartApi.prototype.quoteDeleteSession=function(t){return this._studyEngine.quoteDeleteSession(t)},JSServer.ChartApi.prototype.quoteSetFields=function(t,e){return this._studyEngine.quoteSetFields(t,e)},JSServer.ChartApi.prototype.quoteAddSymbols=function(t,e){
|
||||
return-1!==e.indexOf(void 0)&&(console.warn("Got undefined in quoteAddSymbols"),e=e.filter(function(t){return!!t})),this._studyEngine.quoteAddSymbols(t,e)},JSServer.ChartApi.prototype.quoteRemoveSymbols=function(t,e){return this._studyEngine.quoteRemoveSymbols(t,e)},JSServer.ChartApi.prototype.quoteFastSymbols=function(t,e){return this._studyEngine.quoteFastSymbols(t,e)},JSServer.ChartApi.prototype.quoteHibernateAll=function(t){return this._studyEngine.quoteHibernateAll(t)},JSServer.ChartApi.prototype.depthCreateSession=function(t){return this._studyEngine.depthCreateSession(t)},JSServer.ChartApi.prototype.depthDeleteSession=function(t){return this._studyEngine.depthDeleteSession(t)},JSServer.ChartApi.prototype.depthSetSymbol=function(t,e){return this._studyEngine.depthSetSymbol(t,e)},JSServer.ChartApi.prototype.depthClearSymbol=function(t){},JSServer.ChartApi.prototype.depthSetScale=function(t,e){},JSServer.ChartApi.prototype.createStudiesAccessController=function(t,e,i){return new this.StudiesAccessController(this._studyEngine,t&&JSON.parse(t)||{type:"black",tools:[]})},JSServer.ChartApi.prototype.StudiesAccessController=function(t,e){this._studyEngine=t,this._studiesAccess=e},JSServer.ChartApi.prototype.StudiesAccessController.prototype._findTool=function(t){var e,i,o=null;for(e=0;e<this._studiesAccess.tools.length;++e)if(i=this._studiesAccess.tools[e],i.name===t||i===t){o=i;break}return o},JSServer.ChartApi.prototype.StudiesAccessController.prototype.getEnabledTools=function(){return this._studyEngine.studiesMetadata().filter(function(t){var e=this._findTool(t.description);return"black"===this._studiesAccess.type?!e||e.grayed:!!e},this)},JSServer.ChartApi.prototype.StudiesAccessController.prototype.isToolGrayed=function(t){var e=this._findTool(t);return e&&e.grayed},JSServer.ChartApi.prototype.serverTimeOffset=function(){return this._studyEngine.serverTimeOffset()},JSServer.ChartApi.prototype.alignTimePoint=function(t,e,i){return this._studyEngine.alignTimePoint(t,e,i)},JSServer.ChartApi.prototype.disconnectCount=function(){return 0},d(JSServer.ChartApi,"JSServer.ChartApi",h,"ChartApiInterface"),t.exports=JSServer.ChartApi},function(t,e,i){"use strict";var o=function(){function t(t,e,i){return t+","+e+","+i}function e(e,i,o){delete n[t(e,i,o)]}function o(e,i,o){function r(t){return"undefined"!=typeof TradingView&&TradingView.ChartapiMessagerInstances?n[t]=new a(TradingView.ChartapiMessagerInstances[e],l.pureResolution):n[t]=new a(null,l.pureResolution),n[t]}var l=s.Symbol.parsePeriod(o),h=t(e,i,l.pureResolution);return n[h]?n[h]:r(h)}var n={},s=i(56),r=i(58),a=function(t,e,i){this._chartApiMessager=t,this._lastRealBarTime=null,this._lastRealBarIndex=null,this._resolution=e,this._extrapolatedBarsCache=[],this._onReadyCallbacks=[],this._requestedAmountOfBars=0,this._maxDepth=i||100};return a.prototype.ready=function(){return null!==this._lastRealBarIndex},a.prototype.rebuild=function(t,e){this._lastRealBarTime=t;var i=Math.max(this._extrapolatedBarsCache.length,this._requestedAmountOfBars)
|
||||
;this._extrapolatedBarsCache=[],this.ensureExtrapolatedToBar(e,i)},a.prototype.historyExtrapolator=function(){return void 0===this._historyExtrapolator&&(this._historyExtrapolator=new a(null,this._resolution,Math.max(this._maxDepth,1e3))),this._historyExtrapolator},a.prototype.getPointTimeUTC=function(t,e,i){var o,n;return 0===e?t:!this.ready()||t<this._lastRealBarTime/1e3?(this.historyExtrapolator().setLastBarTime(0,1e3*t),this.historyExtrapolator().getPointTimeUTC(t,e,i)):(o=0===this._extrapolatedBarsCache.length||t===this._lastRealBarTime/1e3,n=o?-1:this.indexOfBar(t,i)-this._lastRealBarIndex-1,this.ensureExtrapolatedToBar(i,n+e+1),this._extrapolatedBarsCache[n+e])},a.prototype.findDistanceInBars=function(t,e,i){return t===e?0:(this.historyExtrapolator().setLastBarTime(0,1e3*t),this.historyExtrapolator().indexOfBar(e,i))},a.prototype.indexOfBar=function(t,e){this._ensureExtrapolatedToTime(e,1e3*t);var i=r.lower_bound(this._extrapolatedBarsCache,t,function(t,e){return t>e?1:t<e?-1:0});return-1===i?i:this._lastRealBarIndex+i+1},a.prototype._extrapolateData=function(t,e){var i,o,n;if(!this._lastRealBarTime)throw Error("No real bars known, so cannot extrapolate anything");if(!(i=e(this._lastRealBarTime))||0===i.length)return void(null!==this._lastRealBarIndex&&null!==this._chartApiMessager&&this._chartApiMessager.onTickmarksUpdated(this._lastRealBarIndex+1,this._extrapolatedBarsCache,t,this._resolution));for(o=0;o<i.length;++o)i[o]=i[o]/1e3;for(i[0]===this._lastRealBarTime/1e3&&(i=i.slice(1)),this._extrapolatedBarsCache=i,n=i.slice(0),n.sort(),o=0;o<n.length-1;++o)n[o]===n[o+1]&&console.error("Duplicating extrapolated bars: duplicated "+new Date(1e3*n[o]));null!==this._lastRealBarIndex&&null!==this._chartApiMessager&&this._chartApiMessager.onTickmarksUpdated(this._lastRealBarIndex+1,i,t,this._resolution)},a.prototype.onTickmarksNeeded=function(t,e){if(this.ready())this.ensureExtrapolatedToBar(t,e);else{var i=this;this._onReadyCallbacks.push(function(){i.ensureExtrapolatedToBar(t,e)})}},a.prototype.ensureExtrapolatedToBar=function(t,e){var i=this;return this._requestedAmountOfBars=e,this._extrapolateData(t,function(o){return i._extrapolatedBarsCache.length>=e||!i._shouldExtrapolateMore()?null:r.extrapolateBarsFrontByCount(i.newBarBuilder(t),o,e)})},a.prototype._ensureExtrapolatedToTime=function(t,e){var i=this;return this._extrapolateData(t,function(o){var n,s;return o>=e||!i._shouldExtrapolateMore()?null:(n=2e3,s=r.extrapolateBarsFrontToTime(i.newBarBuilder(t),o,e,n),s[s.length-1]<e&&console.warn("Extrapolation error: not enough data created"),s)})},a.prototype.newBarBuilder=function(t){var e=s.Symbol.newSession(t.timezone,t.session);return s.Symbol.newBarBuilder(this._resolution,e)},a.prototype._shouldExtrapolateMore=function(){return this._extrapolatedBarsCache.length<this._maxDepth},a.prototype.setLastBarTime=function(t,e){(null===this._lastRealBarIndex||this._lastRealBarIndex===t&&this._lastRealBarTime!==e)&&(this._extrapolatedBarsCache=[]),
|
||||
this._extrapolatedBarsCache&&this._extrapolatedBarsCache.length&&this._lastRealBarIndex!==t&&(this._lastRealBarIndex>t?this._extrapolatedBarsCache=[]:this._lastRealBarTime!==e&&this._extrapolatedBarsCache.shift(t-this._lastRealBarIndex)),this._lastRealBarIndex=t,this._lastRealBarTime=e;for(var i=0;i<this._onReadyCallbacks.length;++i)this._onReadyCallbacks[i]();this._onReadyCallbacks=[]},{remove:e,storage:o}}();t.exports=o},function(t,e){"use strict";var i=function(){function t(t){return t.is_price_study}function e(t,e){var i,o=e.slice(0).toLowerCase();if(t){for(i=0;i<t.length;++i)if(t[i].description.toLowerCase()===o||t[i].shortDescription.toLowerCase()===o)return t[i];throw Error("Can't find metainfo for `"+e+"`")}throw Error("There is no studies metainfo at all")}function i(t){return t.inputs.map(function(t){return{id:t.id,type:t.type,name:t.name}})}function o(o,n){var s,a,l,h,c,d,p,u,_;if(!Array.isArray(o))return s=e(n.model().studiesMetaData(),o),{id:s.id,overlay:t(s)};for(a=o.slice(0),l=a[0],s=e(n.model().studiesMetaData(),l),h=t(s),c=i(s),p=a.splice(1),u=0;u<p.length;++u)d||(d={}),_=r[c[u].type]||r.string,d[c[u].id]=_(p[u]);return{id:s.id,name:l,overlay:h,inputs:d}}function n(t,o,n){function s(t){return t.name.toLowerCase()===a}var r,a,l,h=e(n.model().studiesMetaData(),t),c=i(h),d={};for(r in o)a=r.toLowerCase(),l=c.filter(s),0!==l.length?(l=l[0],d[l.id]=o[r]):console.warn("Uknown input `"+r+"` of `"+t+"`");return{id:h.id,name:t,inputs:d}}var s={},r={bool:function(t){return!!t},integer:function(t){return parseInt(t)},float:function(t){return parseFloat(t)},string:function(t){return t}};return s.getStudyRecordFromArray=function(t,e){return e=e||chartWidget,o(t,e)},s.getStudyRecordFromObject=function(t,e,i){return i=i||chartWidget,n(t,e,i)},s}();t.exports=i},function(t,e,i){"use strict";var o=i(3);window.onload=function(){function t(){var t=0;return JSON.parse(urlParams.logo).image&&(t="C",o.enabled("link_to_tradingview")||(t="D")),t}function e(){try{return/^(192|172|10)\.[0-9][0-9][0-9]\.[0-9][0-9][0-9]\.[0-9][0-9][0-9]/.test(location.hostname)||/^.*((?:\.local)|localhost)$/.test(location.hostname)}catch(t){return!1}}location.hostname.indexOf(".")>=0&&!e()&&setTimeout(function(){try{var e=t();window.ga&&0!==e&&ga("send","event","s",e)}catch(t){}},3e4)}},function(t,e,i){(function(e){"use strict";var o=i(58),n={},s=function(t,i,s){function r(){var t={};t.symbolname=_,t.status="ok",t.values={},t.values.current_session=p,n[_]=p,TradingView.ChartapiMessagerInstances[f].onQuotesData([f].concat([t]))}function a(t,i,n){var s=e.get_timezone(i);h=(new o.Session).init(s,t),c=n,m=setTimeout(l,6e4),l(),r()}function l(){var t,e;if(h){if(c)return void(p="out_of_session");t=o.isTradingNow(new Date,h),e=t?"market":"out_of_session",e!==p&&(p=e,r())}}var h,c,d={},p=n[s]||"out_of_session",u=!1,_=s,f=i,m=null;return t.resolveSymbol(s,function(t){u||a(t.session,t.timezone,t.expired)},function(){}),d.stop=function(){u=!0,m&&clearTimeout(m)},d.marketStatus=function(){return p},d};t.exports=s}).call(e,i(57))},function(t,e,i){
|
||||
(function(e){"use strict";var o=i(730).HeikenAshi,n=i(36).Interval,s=function(){function t(t){this.host=t,this.cache={}}function s(t){var e=t.indexOf(",");return-1===e?t:t.slice(0,e)}function r(t,e,i,o,n){return n+t+e+i+(a(o)?"_":"")}function a(t){return t.has_empty_bars||t.force_session_rebuild}function l(t){if(0!==t.indexOf("="))return{symbol:t};var e;try{e=JSON.parse(t.slice(1))}catch(e){return{symbol:t}}return e.type&&(0===e.type.indexOf("BarSetHeikenAshi@tv-basicstudies-")?e.builder=new o:console.error("unknown builder type: "+e.type)),"string"!=typeof e.symbol&&(e.session=e.symbol.session||e.session,e.symbol=e.symbol.symbol),e}function h(e){t.instance=new t(e),u.setupFeed(t.instance)}var c,d,p,u=i(56),_=i(58),f=u.Symbol,m=u.StudyEngine,g=u.BarBuilder,v=u.BarSet;return t.prototype.getCache=function(t){return this.cache[t]},t.prototype.putCache=function(t,e){this.cache[t]=e},t.prototype.subscribe=function(t,e,i,o,n,s,a,l){var h=r(t,e,i,s,a),c=this.getCache(h);return c||(c=this.createItem(t,e,i,s,l),this.putCache(h,c)),c.listeners.addListener(o,n),{key:h,listener:o}},t.prototype.unsubscribe=function(t){var e=this.getCache(t.key);e&&e.listeners.removeListener(t.listener)},t.prototype.removeUnused=function(){var t,e,i,o,n,s=[];for(t in this.cache)this.cache[t]&&(e=this.cache[t],0===e.listeners.listenersCount()&&s.push(t));if(0!==s.length){for(i=0;i<s.length;i++)o=s[i],n=this.cache[o],this.cache[o]=null,n.stop();this.removeUnused()}},t.prototype.rebuildFrom=function(t,e,i){var o,n,s,r,a=f.parsePeriod(t),l=f.parsePeriod(e);if(""!==a.resolution&&!a.isSeconds){if(i.has_weekly_and_monthly)return a.resolution;if(void 0===i.has_daily||i.has_daily)return"D";""!==l.resolution&&(l.resolution="",l.interval=i.intraday_multipliers?i.intraday_multipliers[0]:1)}if(a.isIntraday&&void 0!==i.has_intraday&&!i.has_intraday)return"";if(a.isSeconds&&!i.has_seconds)return"";if(o=""!==a.resolution?l.interval:""===l.resolution?Math.min(a.interval,l.interval):a.interval,(n=a.isIntraday?i.intraday_multipliers:i.seconds_multipliers)&&-1===n.indexOf(o)){for(s=n.length-1;s>=0;s--)if(r=+n[s],o%r==0)return r+(a.isSeconds?"S":"");return""}return o+(a.isSeconds?"S":"")},t.prototype.createItem=function(t,e,i,o,r){var h,u,_,f,m,v,y=new p,b=l(t);return b.builder?new d(y,b.symbol,e,i,b.builder,o,r):(h=s(e),u=this.rebuildFrom(h,s(i),o),_=a(o),!n.isEqual(h,u)||_?(f=o.has_empty_bars,m=$.extend({},o),_&&(m.has_empty_bars=!1,m.force_session_rebuild=!1),new d(y,b.symbol,e,u,new g(e,f),m,r)):(v=b.session&&"extended"!==b.session,new c(y,b.symbol,e,i,v,this.host,o,r)))},c=function(t,e,i,o,n,r,a,l){this.listeners=t,this.host=r;var h=this;this.host.resolve(e,function(t){n&&t.regular_session&&(t.session=t.regular_session);var r=h.calculateFromTo(t,o||i,e,l);h.subs=h.host.subscribe(t,s(i),r,function(t){h.listeners.fire(t)},function(t){h.listeners.onError(t)})},function(t){h.listeners.onError(t)})},c.prototype._createDWMAligner=function(t,i){var o=e.get_timezone(i.timezone),n=new _.Session;return n.init(o,i.session),f.newBarBuilder(t,n,n)},
|
||||
this._extrapolatedBarsCache&&this._extrapolatedBarsCache.length&&this._lastRealBarIndex!==t&&(this._lastRealBarIndex>t?this._extrapolatedBarsCache=[]:this._lastRealBarTime!==e&&this._extrapolatedBarsCache.shift(t-this._lastRealBarIndex)),this._lastRealBarIndex=t,this._lastRealBarTime=e;for(var i=0;i<this._onReadyCallbacks.length;++i)this._onReadyCallbacks[i]();this._onReadyCallbacks=[]},{remove:e,storage:o}}();t.exports=o},function(t,e){"use strict";var i=function(){function t(t){return t.is_price_study}function e(t,e){var i,o=e.slice(0).toLowerCase();if(t){for(i=0;i<t.length;++i)if(t[i].description.toLowerCase()===o||t[i].shortDescription.toLowerCase()===o)return t[i];throw Error("Can't find metainfo for `"+e+"`")}throw Error("There is no studies metainfo at all")}function i(t){return t.inputs.map(function(t){return{id:t.id,type:t.type,name:t.name}})}function o(o,n){var s,a,l,h,c,d,p,u,_;if(!Array.isArray(o))return s=e(n.model().studiesMetaData(),o),{id:s.id,overlay:t(s)};for(a=o.slice(0),l=a[0],s=e(n.model().studiesMetaData(),l),h=t(s),c=i(s),p=a.splice(1),u=0;u<p.length;++u)d||(d={}),_=r[c[u].type]||r.string,d[c[u].id]=_(p[u]);return{id:s.id,name:l,overlay:h,inputs:d}}function n(t,o,n){function s(t){return t.name.toLowerCase()===a}var r,a,l,h=e(n.model().studiesMetaData(),t),c=i(h),d={};for(r in o)a=r.toLowerCase(),l=c.filter(s),0!==l.length?(l=l[0],d[l.id]=o[r]):console.warn("Uknown input `"+r+"` of `"+t+"`");return{id:h.id,name:t,inputs:d}}var s={},r={bool:function(t){return!!t},integer:function(t){return parseInt(t)},float:function(t){return parseFloat(t)},string:function(t){return t}};return s.getStudyRecordFromArray=function(t,e){return e=e||chartWidget,o(t,e)},s.getStudyRecordFromObject=function(t,e,i){return i=i||chartWidget,n(t,e,i)},s}();t.exports=i},function(t,e,i){"use strict";var o=i(3);window.onload=function(){function t(){var t=0;return JSON.parse(urlParams.logo).image&&(t="C",o.enabled("link_to_tradingview")||(t="D")),t}function e(){try{return/^(192|172|10)\.[0-9][0-9][0-9]\.[0-9][0-9][0-9]\.[0-9][0-9][0-9]/.test(location.hostname)||/^.*((?:\.local)|localhost)$/.test(location.hostname)}catch(t){return!1}}location.hostname.indexOf(".")>=0&&!e()&&setTimeout(function(){try{var e=t();window.ga&&0!==e&&Math.random()>.98&&window.ga("send","event","s",e)}catch(t){}},3e4)}},function(t,e,i){(function(e){"use strict";var o=i(58),n={},s=function(t,i,s){function r(){var t={};t.symbolname=_,t.status="ok",t.values={},t.values.current_session=p,n[_]=p,TradingView.ChartapiMessagerInstances[f].onQuotesData([f].concat([t]))}function a(t,i,n){var s=e.get_timezone(i);h=(new o.Session).init(s,t),c=n,m=setTimeout(l,6e4),l(),r()}function l(){var t,e;if(h){if(c)return void(p="out_of_session");t=o.isTradingNow(new Date,h),e=t?"market":"out_of_session",e!==p&&(p=e,r())}}var h,c,d={},p=n[s]||"out_of_session",u=!1,_=s,f=i,m=null;return t.resolveSymbol(s,function(t){u||a(t.session,t.timezone,t.expired)},function(){}),d.stop=function(){u=!0,m&&clearTimeout(m)},d.marketStatus=function(){return p},d};t.exports=s}).call(e,i(57))
|
||||
},function(t,e,i){(function(e){"use strict";var o=i(730).HeikenAshi,n=i(36).Interval,s=function(){function t(t){this.host=t,this.cache={}}function s(t){var e=t.indexOf(",");return-1===e?t:t.slice(0,e)}function r(t,e,i,o,n){return n+t+e+i+(a(o)?"_":"")}function a(t){return t.has_empty_bars||t.force_session_rebuild}function l(t){if(0!==t.indexOf("="))return{symbol:t};var e;try{e=JSON.parse(t.slice(1))}catch(e){return{symbol:t}}return e.type&&(0===e.type.indexOf("BarSetHeikenAshi@tv-basicstudies-")?e.builder=new o:console.error("unknown builder type: "+e.type)),"string"!=typeof e.symbol&&(e.session=e.symbol.session||e.session,e.symbol=e.symbol.symbol),e}function h(e){t.instance=new t(e),u.setupFeed(t.instance)}var c,d,p,u=i(56),_=i(58),f=u.Symbol,m=u.StudyEngine,g=u.BarBuilder,v=u.BarSet;return t.prototype.getCache=function(t){return this.cache[t]},t.prototype.putCache=function(t,e){this.cache[t]=e},t.prototype.subscribe=function(t,e,i,o,n,s,a,l){var h=r(t,e,i,s,a),c=this.getCache(h);return c||(c=this.createItem(t,e,i,s,l),this.putCache(h,c)),c.listeners.addListener(o,n),{key:h,listener:o}},t.prototype.unsubscribe=function(t){var e=this.getCache(t.key);e&&e.listeners.removeListener(t.listener)},t.prototype.removeUnused=function(){var t,e,i,o,n,s=[];for(t in this.cache)this.cache[t]&&(e=this.cache[t],0===e.listeners.listenersCount()&&s.push(t));if(0!==s.length){for(i=0;i<s.length;i++)o=s[i],n=this.cache[o],this.cache[o]=null,n.stop();this.removeUnused()}},t.prototype.rebuildFrom=function(t,e,i){var o,n,s,r,a=f.parsePeriod(t),l=f.parsePeriod(e);if(""!==a.resolution&&!a.isSeconds){if(i.has_weekly_and_monthly)return a.resolution;if(void 0===i.has_daily||i.has_daily)return"D";""!==l.resolution&&(l.resolution="",l.interval=i.intraday_multipliers?i.intraday_multipliers[0]:1)}if(a.isIntraday&&void 0!==i.has_intraday&&!i.has_intraday)return"";if(a.isSeconds&&!i.has_seconds)return"";if(o=""!==a.resolution?l.interval:""===l.resolution?Math.min(a.interval,l.interval):a.interval,(n=a.isIntraday?i.intraday_multipliers:i.seconds_multipliers)&&-1===n.indexOf(o)){for(s=n.length-1;s>=0;s--)if(r=+n[s],o%r==0)return r+(a.isSeconds?"S":"");return""}return o+(a.isSeconds?"S":"")},t.prototype.createItem=function(t,e,i,o,r){var h,u,_,f,m,v,y=new p,b=l(t);return b.builder?new d(y,b.symbol,e,i,b.builder,o,r):(h=s(e),u=this.rebuildFrom(h,s(i),o),_=a(o),!n.isEqual(h,u)||_?(f=o.has_empty_bars,m=$.extend({},o),_&&(m.has_empty_bars=!1,m.force_session_rebuild=!1),new d(y,b.symbol,e,u,new g(e,f),m,r)):(v=b.session&&"extended"!==b.session,new c(y,b.symbol,e,i,v,this.host,o,r)))},c=function(t,e,i,o,n,r,a,l){this.listeners=t,this.host=r;var h=this;this.host.resolve(e,function(t){n&&t.regular_session&&(t.session=t.regular_session);var r=h.calculateFromTo(t,o||i,e,l);h.subs=h.host.subscribe(t,s(i),r,function(t){h.listeners.fire(t)},function(t){h.listeners.onError(t)})},function(t){h.listeners.onError(t)})},c.prototype._createDWMAligner=function(t,i){var o=e.get_timezone(i.timezone),n=new _.Session;return n.init(o,i.session),f.newBarBuilder(t,n,n)},
|
||||
c.prototype.stop=function(){this.subs&&this.host.unsubscribe(this.subs)},c.prototype.calculateFromTo=function(t,i,o,n){var s,r,a,l,h,c,d,p,u=f.parsePeriod(i),m=(new Date).valueOf(),g=t.expired?e.cal_to_utc(e.get_timezone(t.timezone),new Date(1e3*t.expiration_date))||m:m;return""===u.resolution?(r=u.interval,a="D"):"S"===u.resolution?(r=10*u.interval,a=""):(l="D"===u.resolution?1:"W"===u.resolution?5:30,r=12*l*u.interval,a="M"),u.range?(r=u.range.interval,a=u.range.resolution):this.host.calculateHistoryDepth&&(h=this.host.calculateHistoryDepth(i,a,r))&&(r=h.intervalBack||r,a=void 0===h.resolutionBack?a:h.resolutionBack),c=t.sessionString||t.session,s=_.alignPeriodsBack(c,a,r,1,g),n&&n.getRangeExtensionTime&&(d=n.getRangeExtensionTime())&&(s=Math.min(1e3*d,s)),n&&n.getRangeExtensionCount&&(p=n.getRangeExtensionCount())>0&&(s=_.alignPeriodsBack(c,u.resolution,u.interval,p,s)),{from:s,to:g+6e4}},d=function(t,e,i,o,n,s,r){if(this.listeners=t,this.isRecalculated=!1,""===o)return console.error("unsupported resolution for rebuild: "+i),void this.listeners.onError("unsupported resolution for rebuild: "+i);this.symbolInfo=s;var a=this;this.engine=new m({tickerid:e,period:o,periodBase:i,body:n,symbolInfo:s,rangeExtension:r,recalc:function(t,e){a._recalc(e)},out:function(t,e){a._out(t,e)},nonseriesOut:function(t,e){a._nonseriesOut(t,e)},setNoMoreData:function(){a.barset&&(a.barset.endOfData=!0)},onErrorCallback:function(t){a.listeners.onError(t)}})},d.prototype.stop=function(){this.engine?this.engine.stop():console.error("Internal library error 0x1")},d.prototype._recalc=function(t){this.isRecalculated&&console.error("recalc called twice!"),this.barset||(this.barset=new v(this.symbolInfo)),t&&(this.barset.nextTime=t.nextTime,this.barset.endOfData=t.endOfData),this.listeners.fire(this.barset),this.isRecalculated=!0},d.prototype._nonseriesOut=function(t,e){var i=Object.assign({},e);i.nonseries=!0,i.data=e.bars,delete i.bars,i.barsetSize=this.barset?this.barset.count():0,i.lastBar=this.barset?this.barset.bar(this.barset.count()-1):null,this.listeners.fire(i,!0)},d.prototype._out=function(t,e){var i,o,n,s,r,a,l,h=e[0];if(!isNaN(h)){if(i={time:h,open:e[1],high:e[2],low:e[3],close:e[4],volume:e[5],updatetime:e[6]},o=e[7],this.barset||(this.barset=new v(t.info)),(n=e[8])instanceof Array)for(s=0;s<n.length;s++)r=e[9],a=n[s],l={time:a,open:r,high:r,low:r,close:r,volume:0,updatetime:a},this.barset.add(l,!0),this.isRecalculated&&this.listeners.fire(this.barset);this.barset.add(i,o),this.barset.isBarClosed=o,this.isRecalculated&&this.listeners.fire(this.barset)}},p=function(){this.listeners=[]},p.prototype.listenersCount=function(){return this.listeners.reduce(function(t,e){return t+(e?1:0)},0)},p.prototype.addListener=function(t,e){this.listeners.push({dataListener:t,onErrorCallback:e}),this.barset&&t(this.barset),this.errorMsg&&e(this.errorMsg)},p.prototype.removeListener=function(t){var e,i=this.listeners.filter(function(e){return e.dataListener===t});0!==i.length&&(e=this.listeners.indexOf(i[0]),delete this.listeners[e])},
|
||||
p.prototype.onError=function(t){var e,i,o,n;for(this.errorMsg=t||"unspecified error",e=this.listeners,i=e.length,o=0;o<i;o++)(n=e[o])&&n.onErrorCallback&&n.onErrorCallback(t)},p.prototype.fire=function(t,e){var i,o,n,s;for(e||(this.barset=t),i=this.listeners,o=i.length,n=0;n<o;n++)(s=i[n])&&s.dataListener(t)},{setupFeed:h,parseSymbol:l,unsubscribeUnused:function(){t.instance.removeUnused()}}}();t.exports=s}).call(e,i(57))},function(t,e,i){"use strict";var o=i(56);i(141),JSServer.studyLibrary=JSServer.studyLibrary.concat([{name:"Compare",metainfo:{_metainfoVersion:15,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!0,defaults:{styles:{compare:{linestyle:0,linewidth:2,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#800080"}},precision:4,inputs:{source:"close",symbol:""}},plots:[{id:"compare",type:"line"}],styles:{compare:{title:"Plot",histogramBase:0}},description:"Compare",shortDescription:"Compare",is_price_study:!0,inputs:[{defval:"close",id:"source",name:"Source",options:["open","high","low","close","hl2","hlc3","ohlc4"],type:"text"},{id:"symbol",name:"Symbol",type:"symbol"}],id:"Compare@tv-basicstudies-1"},constructor:function(){this.init=function(t,e){this._context=t,this._context.new_sym(e(1),o.Std.period(this._context),o.Std.period(this._context))},this.main=function(t,e){var i,n,s,r,a;return this._context=t,i=this._context.new_var(this._context.symbol.time),this._context.select_sym(1),n=this._context.new_var(this._context.symbol.time),s=o.Std[e(0)](this._context),r=this._context.new_var(s),this._context.select_sym(0),a=r.adopt(n,i,0),[a]}}},{name:"Overlay",metainfo:{_metainfoVersion:15,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!0,defaults:{styles:{},precision:4,inputs:{}},plots:[{id:"open",type:"line"},{id:"high",type:"line"},{id:"low",type:"line"},{id:"close",type:"line"}],styles:{open:{},high:{},low:{},close:{}},description:"Overlay",shortDescription:"Overlay",is_price_study:!1,inputs:[{id:"symbol",name:"symbol",defval:"",type:"symbol",isHidden:!0}],id:"Overlay@tv-basicstudies-1"},constructor:function(){this.init=function(t,e){this._context=t,this._context.new_sym(e(0),o.Std.period(this._context),o.Std.period(this._context))},this.main=function(t,e){var i,n,s,r,a,l;return this._context=t,i=this._context.new_var(this._context.symbol.time),this._context.select_sym(1),n=this._context.new_var(this._context.symbol.time),s=this._context.new_var(o.Std.open(this._context)),r=this._context.new_var(o.Std.high(this._context)),a=this._context.new_var(o.Std.low(this._context)),l=this._context.new_var(o.Std.close(this._context)),this._context.select_sym(0),[s.adopt(n,i,0),r.adopt(n,i,0),a.adopt(n,i,0),l.adopt(n,i,0)]}}},{name:"Volume",metainfo:{_metainfoVersion:15,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,transparency:65,defaults:{styles:{vol:{linestyle:0,linewidth:1,plottype:5,trackPrice:!1,transparency:65,visible:!0,color:"#000080"},vol_ma:{linestyle:0,linewidth:1,plottype:4,trackPrice:!1,transparency:65,visible:!0,color:"#0496FF"}},precision:0,palettes:{volumePalette:{colors:{0:{
|
||||
color:"#FF0000",width:1,style:0},1:{color:"#008000",width:1,style:0}}}},inputs:{showMA:!1,maLength:20}},plots:[{id:"vol",type:"line"},{id:"volumePalette",palette:"volumePalette",target:"vol",type:"colorer"},{id:"vol_ma",type:"line"}],styles:{vol:{title:"Volume",histogramBase:0},vol_ma:{title:"Volume MA",histogramBase:0}},description:"Volume",shortDescription:"Volume",is_price_study:!1,palettes:{volumePalette:{colors:{0:{name:"Color 0"},1:{name:"Color 1"}}}},inputs:[{id:"showMA",name:"show MA",defval:!1,type:"bool"},{id:"maLength",name:"MA Length",defval:20,type:"integer",min:1,max:2e3}],id:"Volume@tv-basicstudies-1"},constructor:function(){this.f_0=function(t,e){return o.Std.gt(t,e)?0:1},this.f_1=function(t,e){return t?e:o.Std.na()},this.main=function(t,e){var i,n,s,r,a,l,h;return this._context=t,this._input=e,i=this._input(0),n=o.Std.volume(this._context),s=this.f_0(o.Std.open(this._context),o.Std.close(this._context)),r=o.Std.volume(this._context),a=this._context.new_var(r),l=o.Std.sma(a,this._input(1),this._context),h=this.f_1(i,l),[n,s,h]}}},{name:"ZigZag",metainfo:{_metainfoVersion:23,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:2,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008000"}},precision:4,inputs:{in_0:5,in_1:10}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",target:"plot_0",type:"dataoffset"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Zig Zag",shortDescription:"ZigZag",is_price_study:!0,classId:"ScriptWithDataOffset",inputs:[{id:"in_0",name:"deviation",defval:5,type:"integer",min:1,max:100},{id:"in_1",name:"depth",defval:10,type:"integer",min:2,max:1e3}],id:"ZigZag@tv-basicstudies-1"},constructor:function(){this.main=function(t,e){var i,n,s,r,a,l,h,c;return this._context=t,this._input=e,i=this._input(0),n=this._input(1),s=i/100,r=n/2,a=o.Std.zigzag(s,r,this._context),l=o.Std.zigzagbars(s,r,this._context),h=a,c=l,[h,c]}}}])},function(t,e,i){(function(e){"use strict";var o=i(58),n=i(36).Interval,s=function(){function t(t,e){return t}function s(t,e){var i=m.get_timezone(t.timezone),n=new o.Session;return n.init(i,t.session),f.Symbol.newBarBuilder(e,n,n)}function r(e,i,o,n,s,r){var a,l,h,c,d=t(i,o);for(u.hasOwnProperty(d)||(u[d]=[]),a=[],l=0;l<n.length;++l)n[l][1]<0&&(n[l][1]=0),0!==n[l][1]?(h=s.getPointTimeUTC(n[l][0],n[l][1],r),a.push(h)):n[l][0]&&a.push(n[l][0]);c={guid:e,points:a},u[d].push(c)}function a(t){var e,i,o;for(e in u)for(i=u[e],o=0;o<i.length;++o)if(i[o].guid===t)return void i.splice(o,1)}function l(t,e,i,o,n){var s,r,a,l=[];for(s=0;s<t.points.length;++s){if(r=t.points[s],null===(a=c(e,r,i,o,n)))return null;l.push({index:s,value:[a,r]})}return l}function h(e,i,o,n,s,r){var a,h,c,d,p=t(e,i);if(u.hasOwnProperty(p))for(a=u[p].length,h=0;h<a;++h)c=u[p][h],null!==(d=l(c,o,n,s,i))&&r(c.guid,d)}function c(t,e,i,n,r){var a,l;return 1e3*(e=s(n,r).alignTimeIfPossible(1e3*e)/1e3)<t[0].value[0]?-p(n,r,e,t[0].value[0]/1e3,i):(a=o.lower_bound(t,1e3*e,function(t,e){return t.value[0]>e?1:t.value[0]<e?-1:0
|
||||
@@ -544,7 +544,7 @@ i.mouseup(r),e.down.call(o,t,n)})}),this}}(jQuery)},function(t,e){"use strict";!
|
||||
E=$('<a class="button getimage"></a>').append($(i(896)).attr({class:"icon"})).addClass("apply-common-tooltip").attr("title",$.t("Take instant snapshot of your chart. No more Paint or other editors to save screenshots – simply click the button and copy the link of the picture.")+"\n"+I).appendTo(A),A.click(function(t){if(!e.enabled("show_dialog_on_snapshot_ready")){if(E.hasClass("process"))return;E.addClass("process"),c.subscribe("onScreenshotReady",function(t){E.removeClass("process")},null,!0)}f.actions().takeScreenshot.callbacks().fire(),t.preventDefault()})),e.enabled("header_saveload")&&(M=e.enabled("header_saveload_to_the_right")?this._$right:this._$left,y=this.createGroup("save-load",{single:!0,showInNarrowView:!0}).appendTo(M),D=$("<div>").addClass("save-load-buttons").appendTo(y),this._saveLoad=new r(D,a,{popupDirection:"down",popupReverse:!0}),this._saveLoad.onTitleSizeChanged.subscribe(this,this._onInternalResize),TradingView.isOnFeaturePage&&this._saveLoad.hideTitle()),e.enabled("header_widget_dom_node")||$(".header-chart-panel").css("display","none"),f.withModel(this,s.prototype.bindToModel),this._resizerBridge.availWidth.subscribe(this._onAvailSizeChange.bind(this)),this._resizerBridge.availHeight.subscribe(this._onAvailSizeChange.bind(this)),this._onAvailSizeChange(),this._onInternalResize()}var n=i(671),s=i(594),r=i(660),a=i(602),l=i(291),h=i(664),c=i(34),d=i(77),p=i(367).FavoredList,u=i(43),_=i(290);inherit(o,s),o.prototype.saveLoadWidget=function(){return this._saveLoad},o.prototype._onAvailSizeChange=function(){var t=this._resizerBridge.availWidth.value()<=520||this._resizerBridge.availHeight.value()<=250;!!this._compactMode!==t&&(this._compactMode=t,this._$root.toggleClass("header-chart-panel--compact",t),this._onInternalResize())},o.prototype.addButton=function(t,e){(e?this._$left:this._$right).append(t),this._onInternalResize()},o.prototype._createUndoRedoGroup=function(){return this._undoRedo=new n(this._$left,this._chartWidget),this._undoRedo.undoElement().addClass("apply-common-tooltip"),this._undoRedo.redoElement().addClass("apply-common-tooltip"),this.createGroup("undo-redo",{single:!0}).append(this._undoRedo.element())},o.prototype._createFullscreenGroup=function(){this._fullscreen=new a(this._chartWidgetCollection);var t=this.createGroup("fullscreen",{single:!0});return this._fullscreen.element().addClass("apply-common-tooltip").appendTo(t),t},o.prototype._createLayout=function(t,i,o){var n=[];e.enabled("header_chart_type")&&n.push(this._createBarsGroup(i)),e.enabled("header_settings")&&e.enabled("show_chart_property_page")&&n.push(this._createPropertiesGroup(o,t.chartWidgetCollection)),e.enabled("header_indicators")&&n.push(this._createIndicatorsGroup(o)),e.enabled("header_compare")&&n.push(this._createCompareGroup(i,t.chartWidgetCollection,o)),e.enabled("header_undo_redo")&&!this._chartWidget.readOnly()&&n.push(this._createUndoRedoGroup()),e.enabled("header_fullscreen_button")&&n.push(this._createFullscreenGroup()),n.forEach(function(t){t.appendTo(this._$left)},this)},
|
||||
o.prototype._onInternalResize=function(){if(this.hidden)return void this._resizerBridge.negotiateHeight(0);this._onResizeRequested||(this._onResizeRequested=!0,this._resizerBridge.visible.when(function(){var t,i;this._onResizeRequested=!1,e.enabled("caption_buttons_text_if_possible")&&(t=this._$left,i=t.children(".group"),t.addClass("captions"),i.size()>1&&i.last().offset().top>i.first().offset().top+5&&t.removeClass("captions")),this._$content.find("svg").pixelSnap(),this._resizerBridge.negotiateHeight({min:0,max:this._$content.height()})}.bind(this)))},o.prototype._setupCaptionButtons=function(){this._domeButton&&this._domeButton.onResize.subscribe(this,this._onInternalResize),window.studyTemplates&&studyTemplates.onFavoriteListResize.subscribe(this,this._onInternalResize)},o.prototype._createMinimizeButton=function(){var t=this,e=$("<span>",this._$root).addClass("tv-close-panel top").appendTo(this._$root).on("click",function(i){i.isDefaultPrevented()||(t.hidden=!t.hidden,e.toggleClass("top",!t.hidden),e.toggleClass("bottom",t.hidden),i.preventDefault(),c.emit("toggle_header",!t.hidden),t._onInternalResize())})},t.exports=o}).call(e,i(3))},function(t,e,i){(function(e){"use strict";function o(t,e,i){var o,n,s=e.m_model.properties();a.call(this,s,e),o=this._series=e.mainSeries(),this._chart=e.m_model,this._model=e,this._source=i,this._property=s,this._seriesProperty=o.properties(),this._scaleProperty=o.m_priceScale.properties(),this._mainAxisProperty=o.properties().priceAxisProperties,n=null,$.each(e.m_model.panes(),function(t,e){$.each(e.dataSources(),function(t,i){if(i===o)return n=e,!1})}),this._pane=n,this.prepareLayout(),this._themes=[]}var n=i(301),s=(i(53).UndoHistory,i(76)),r=i(5),a=r.PropertyPage,l=r.GreateTransformer,h=r.LessTransformer,c=r.ToIntTransformer,d=r.SimpleStringBinder,p=r.BooleanBinder,u=r.SliderBinder,_=r.ColorBinding,f=r.SimpleComboBinder,m=r.DisabledBinder,g=r.CheckboxWVBinding,v=i(43),y=i(21),b=i(32).addColorPicker,w=i(19).createLineStyleEditor,S=i(13).createLineWidthEditor,T=i(63).bindPopupMenu,C=i(7).DefaultProperty,x=i(161).availableTimezones,P=i(298),L=i(93).createConfirmDialog,k=i(12).getLogger("Chart.PropertyPage");inherit(o,a),inherit(o,n),o.prototype.setScalesOpenTab=function(){this.scalesTab&&this.scalesTab.data("layout-tab-open",s.TAB_OPEN_OVERRIDE)},o.prototype.setTmzOpenTab=function(){this.tmzSessTable&&this.tmzSessTable.data("layout-tab-open",s.TAB_OPEN_OVERRIDE)},o.prototype.prepareLayout=function(){var t,i,o,n,s,r,a,b,T,C,L,k,I,A,E,M,D,O,V,B,R,N,F,z,W,H,U,j,q,Y,G,K,X,Z,J,Q,tt,et,it,ot,nt,st,rt,at,lt,ht,ct,dt,pt,ut,_t,ft,mt,gt,vt,yt,bt,wt,St,Tt,Ct,xt,Pt,Lt,kt,It,At,Et,Mt,Dt,Ot,$t,Vt,Bt,Rt,Nt,Ft,zt,Wt,Ht,Ut,jt,qt,Yt,Gt,Kt,Xt,Zt,Jt,Qt,te,ee,ie,oe,ne,se,re,ae,le,he,ce,de,pe,ue,_e,fe,me,ge,ve,ye,be,we,Se,Te,Ce,xe,Pe,Le,ke,Ie,Ae=this;if(e.enabled("chart_property_page_style")&&(t=$('<table class="property-page" cellspacing="0" cellpadding="2">').data("layout-tab",$.t("Style")),i=$('<table class="property-page" cellspacing="0" cellpadding="2">').data("layout-tab",$.t("Style")),
|
||||
o=$('<table class="property-page" cellspacing="0" cellpadding="2">').data("layout-tab",$.t("Style")),this._prepareSeriesStyleLayout(t,i,o,this._seriesProperty),this._hasSeriesStyleLayout=!0,r=$('<table class="property-page" cellspacing="0" cellpadding="2">').data("layout-tab",$.t("Style")),E=$('<input type="checkbox">'),M=this.addLabeledRow(r,$.t("Price Line"),E),$("<td>").append(E).prependTo(M),this.bindControl(new p(E,this._seriesProperty.showPriceLine,!0,this.model(),"Change Price Price Line")),D=S(),$("<td>").append(D).appendTo(M),this.bindControl(new u(D,this._seriesProperty.priceLineWidth,!0,this.model(),"Change Price Line Width")),a=$('<table class="property-page" cellspacing="0" cellpadding="2">').data("layout-tab",$.t("Style")),O=this.createSeriesMinTickEditor(),V=$("<tr>"),V.appendTo(a),$("<td>"+$.t("Override Min Tick")+"</td>").appendTo(V),$("<td>").append(O).appendTo(V),this.bindControl(new f(O,this._seriesProperty.minTick,null,!0,this.model(),"Change MinTick")),b=$('<table class="property-page" cellspacing="0" cellpadding="2">').data("layout-tab",$.t("Style")),this._pane&&(-1!==this._pane.leftPriceScale().dataSources().indexOf(this._series)?B="left":-1!==this._pane.rightPriceScale().dataSources().indexOf(this._series)?B="right":this._pane.isOverlay(this._series)&&(B="none")),B&&(R={left:$.t("Scale Left"),right:$.t("Scale Right")},Ae._pane.actionNoScaleIsEnabled(Ae._series)&&(R.none=$.t("Screen (No Scale)")),N=this.createKeyCombo(R).val(B).change(function(){switch(this.value){case"left":Ae._model.move(Ae._series,Ae._pane,Ae._pane.leftPriceScale());break;case"right":Ae._model.move(Ae._series,Ae._pane,Ae._pane.rightPriceScale());break;case"none":Ae._model.move(Ae._series,Ae._pane,null)}}),F=this.addRow(b),$("<td>"+$.t("Scale")+"</td>").appendTo(F),$("<td>").appendTo(F).append(N))),e.enabled("chart_property_page_scales")&&(z=$('<table class="property-page" cellspacing="0" cellpadding="2">').data("layout-tab",$.t("Scales")),W=$('<input type="checkbox">').change(function(){this.checked&&setTimeout(function(){Ae._model.m_model.invalidate(new y(y.LIGHT_UPDATE))},0)}),H=this.addLabeledRow(z,$.t("Auto Scale"),W),U=function(t){this._undoModel.setAutoScaleProperty(this._property,t,Ae._series.priceScale(),this._undoText)},$("<td>").append(W).prependTo(H),this.bindControl(new p(W,this._scaleProperty.autoScale,!0,this.model(),"Auto Scale",U)),this.bindControl(new m(W,this._scaleProperty.autoScaleDisabled,!0,this.model(),"Auto Scale")),j=$('<input type="checkbox">'),q=this.addLabeledRow(z,$.t("Percentage"),j),Y=function(t){this._undoModel.setPercentProperty(this._property,t,Ae._series.priceScale(),this._undoText)},$("<td>").append(j).prependTo(q),this.bindControl(new p(j,this._mainAxisProperty.percentage,!0,this.model(),"Scale Percentage",Y)),this.bindControl(new m(j,this._mainAxisProperty.percentageDisabled,!0,this.model(),"Scale Percentage")),G=$('<input type="checkbox">'),K=this.addLabeledRow(z,$.t("Log Scale"),G),X=function(t){this._undoModel.setLogProperty(this._property,t,Ae._series.priceScale(),this._undoText)},
|
||||
$("<td>").append(G).prependTo(K),this.bindControl(new p(G,this._mainAxisProperty.log,!0,this.model(),"Log Scale",X)),this.bindControl(new m(G,this._mainAxisProperty.logDisabled,!0,this.model(),"Log Scale")),Z=$('<input type="checkbox">').change(function(){this.checked&&setTimeout(function(){Ae._model.m_model.invalidate(new y(y.LIGHT_UPDATE))},0)}),J=this.addLabeledRow(z,$.t("Scale Series Only"),Z),$("<td>").append(Z).prependTo(J),this.bindControl(new p(Z,this._property.scalesProperties.scaleSeriesOnly,!0,this.model(),"Scale Series Only")),Q=$("<input type='checkbox'/>"),tt=this.addLabeledRow(z,$.t("Lock scale"),Q),et=function(t){this._undoModel.setLockScaleProperty(this._property,t,Ae._series,this._undoText)},it=function(t){tt.toggle(t.value()===v.STYLE_PNF)},$("<td>").append(Q).prependTo(tt),this.bindControl(new p(Q,this._seriesProperty.lockScale,!0,this.model(),"Change lock scale",et)),this._seriesProperty.style.listeners().subscribe(this,it),ot=$("<input type='checkbox'/>"),nt=this.addLabeledRow(z,$.t("Track time"),ot),$("<td>").append(ot).prependTo(nt),this.bindControl(new g(ot,this._model.trackTime(),null,"Change track time")),st=$('<table class="property-page" cellspacing="0" cellpadding="2">').data("layout-tab",$.t("Scales")),rt=$('<input type="text" class="ticker">'),at=this.addLabeledRow(st,$.t("Top Margin"),rt),$("<td>").appendTo(at).append(rt),$("<td>%</td>").appendTo(at),lt=[c(this._property.paneProperties.topMargin.value())],lt.push(h(25)),lt.push(l(0)),this.bindControl(new d(rt,this._property.paneProperties.topMargin,lt,!0,this.model(),"Top Margin")),ht=$('<input type="text" class="ticker">'),ct=this.addLabeledRow(st,$.t("Bottom Margin"),ht),$("<td>").appendTo(ct).append(ht),$("<td>%</td>").appendTo(ct),dt=[c(this._property.paneProperties.bottomMargin.value())],dt.push(h(25)),dt.push(l(0)),this.bindControl(new d(ht,this._property.paneProperties.bottomMargin,dt,!0,this.model(),"Bottom Margin")),pt=$('<input type="text" class="ticker">'),ut=this.addLabeledRow(st,$.t("Right Margin"),pt),$("<td>").appendTo(ut).append(pt),$("<td>"+$.t("bars",{context:"margin"})+"</td>").appendTo(ut),_t=[c(this._property.timeScale.rightOffset.value())],_t.push(h(~~this._chart.m_timeScale.maxOffset())),_t.push(l(-200)),this.bindControl(new d(pt,this._property.timeScale.rightOffset,_t,!0,this.model(),"Right Margin")),ft=$('<table class="property-page" cellspacing="0" cellpadding="2">').data("layout-tab",$.t("Scales")),mt=$("<input type='checkbox' />"),gt=this.addLabeledRow(ft,$.t("Left Axis"),mt),$("<td>").append(mt).prependTo(gt),setTimeout(function(){this.bindControl(new p(mt,this._property.scalesProperties.showLeftScale,!0,this.model(),"Show Left Axis"))}.bind(this),0),vt=$("<input type='checkbox' />"),yt=this.addLabeledRow(ft,$.t("Right Axis"),vt),$("<td>").append(vt).prependTo(yt),setTimeout(function(){this.bindControl(new p(vt,this._property.scalesProperties.showRightScale,!0,this.model(),"Show Right Axis"))}.bind(this),0),e.enabled("countdown")&&(bt=$("<input type='checkbox'>"),
|
||||
$("<td>").append(G).prependTo(K),this.bindControl(new p(G,this._mainAxisProperty.log,!0,this.model(),"Log Scale",X)),this.bindControl(new m(G,this._mainAxisProperty.logDisabled,!0,this.model(),"Log Scale")),Z=$('<input type="checkbox">').change(function(){this.checked&&setTimeout(function(){Ae._model.m_model.invalidate(new y(y.LIGHT_UPDATE))},0)}),J=this.addLabeledRow(z,$.t("Scale Series Only"),Z),$("<td>").append(Z).prependTo(J),this.bindControl(new p(Z,this._property.scalesProperties.scaleSeriesOnly,!0,this.model(),"Scale Series Only")),Q=$("<input type='checkbox'/>"),tt=this.addLabeledRow(z,$.t("Lock scale"),Q),et=function(t){this._undoModel.setLockScaleProperty(this._property,t,Ae._series,this._undoText)},it=function(t){tt.toggle(t.value()===v.STYLE_PNF)},$("<td>").append(Q).prependTo(tt),this.bindControl(new p(Q,this._seriesProperty.lockScale,!0,this.model(),"Change lock scale",et)),this._seriesProperty.style.listeners().subscribe(this,it),e.enabled("support_multicharts")&&(ot=$("<input type='checkbox'/>"),nt=this.addLabeledRow(z,$.t("Track time"),ot),$("<td>").append(ot).prependTo(nt),this.bindControl(new g(ot,this._model.trackTime(),null,"Change track time"))),st=$('<table class="property-page" cellspacing="0" cellpadding="2">').data("layout-tab",$.t("Scales")),rt=$('<input type="text" class="ticker">'),at=this.addLabeledRow(st,$.t("Top Margin"),rt),$("<td>").appendTo(at).append(rt),$("<td>%</td>").appendTo(at),lt=[c(this._property.paneProperties.topMargin.value())],lt.push(h(25)),lt.push(l(0)),this.bindControl(new d(rt,this._property.paneProperties.topMargin,lt,!0,this.model(),"Top Margin")),ht=$('<input type="text" class="ticker">'),ct=this.addLabeledRow(st,$.t("Bottom Margin"),ht),$("<td>").appendTo(ct).append(ht),$("<td>%</td>").appendTo(ct),dt=[c(this._property.paneProperties.bottomMargin.value())],dt.push(h(25)),dt.push(l(0)),this.bindControl(new d(ht,this._property.paneProperties.bottomMargin,dt,!0,this.model(),"Bottom Margin")),pt=$('<input type="text" class="ticker">'),ut=this.addLabeledRow(st,$.t("Right Margin"),pt),$("<td>").appendTo(ut).append(pt),$("<td>"+$.t("bars",{context:"margin"})+"</td>").appendTo(ut),_t=[c(this._property.timeScale.rightOffset.value())],_t.push(h(~~this._chart.m_timeScale.maxOffset())),_t.push(l(-200)),this.bindControl(new d(pt,this._property.timeScale.rightOffset,_t,!0,this.model(),"Right Margin")),ft=$('<table class="property-page" cellspacing="0" cellpadding="2">').data("layout-tab",$.t("Scales")),mt=$("<input type='checkbox' />"),gt=this.addLabeledRow(ft,$.t("Left Axis"),mt),$("<td>").append(mt).prependTo(gt),setTimeout(function(){this.bindControl(new p(mt,this._property.scalesProperties.showLeftScale,!0,this.model(),"Show Left Axis"))}.bind(this),0),vt=$("<input type='checkbox' />"),yt=this.addLabeledRow(ft,$.t("Right Axis"),vt),$("<td>").append(vt).prependTo(yt),setTimeout(function(){this.bindControl(new p(vt,this._property.scalesProperties.showRightScale,!0,this.model(),"Show Right Axis"))}.bind(this),0),e.enabled("countdown")&&(bt=$("<input type='checkbox'>"),
|
||||
wt=this.addLabeledRow(ft,$.t("Countdown"),bt),$("<td>").append(bt).prependTo(wt),this.bindControl(new p(bt,this._seriesProperty.showCountdown,!0,this.model(),"Change Show Countdown"))),St=$('<input type="checkbox">'),Tt=this.addLabeledRow(ft,$.t("Symbol Last Value"),St),$("<td>").append(St).prependTo(Tt),this.bindControl(new p(St,this._property.scalesProperties.showSeriesLastValue,!0,this.model(),"Change Symbol Last Value Visibility")),Ct=$('<input type="checkbox">'),xt=this.addLabeledRow(ft,$.t("Indicator Last Value"),Ct),$("<td>").append(Ct).prependTo(xt),this.bindControl(new p(Ct,this._property.scalesProperties.showStudyLastValue,!0,this.model(),"Change Indicator Last Value Visibility")),Pt=$('<input type="checkbox">'),Lt=this.addLabeledRow(ft,$.t("Symbol Labels"),Pt),$("<td>").append(Pt).prependTo(Lt),this.bindControl(new p(Pt,this._property.scalesProperties.showSymbolLabels,!0,this.model(),"Show Symbol Labels")),kt=$('<input type="checkbox">'),It=this.addLabeledRow(ft,$.t("Indicator Labels"),kt),$("<td>").append(kt).prependTo(It),this.bindControl(new p(kt,this._property.scalesProperties.showStudyPlotLabels,!0,this.model(),"Show Study Plots Labels")),At=$("<input type='checkbox' />"),Et=this.addLabeledRow(ft,$.t("Precise Labels"),At),$("<td>").append(At).prependTo(Et),this.bindControl(new p(At,this._scaleProperty.alignLabels,!0,this.model(),"Precise Labels")),Mt=$('<div class="property-page-column-2">').append(z).append(st),Dt=$('<div class="property-page-column-2">').append(ft),T=$("<div>").css("min-width","420px").data("layout-tab",$.t("Scales")),T.append(Mt).append(Dt),this.scalesTab=T),e.enabled("chart_property_page_background")&&(Ot=$('<table class="property-page" cellspacing="0" cellpadding="2">'),$t=this.createColorPicker({hideTransparency:!0}),Vt=this.addLabeledRow(Ot,$.t("Background")),$('<td colspan="2">').append($t).appendTo(Vt),this.bindControl(new _($t,this._property.paneProperties.background,!0,this.model(),"Change Chart Background Color")),Bt=this.addLabeledRow(Ot,$.t("Vert Grid Lines")),Rt=this.createColorPicker(),$("<td>").append(Rt).appendTo(Bt),this.bindControl(new _(Rt,this._property.paneProperties.vertGridProperties.color,!0,this.model(),"Change Vert Grid Lines Color")),Nt=w(),$('<td colspan="2">').append(Nt.render()).appendTo(Bt),this.bindControl(new f(Nt,this._property.paneProperties.vertGridProperties.style,parseInt,!0,this.model(),"Change Vert Grid Lines Style")),Ft=this.addLabeledRow(Ot,$.t("Horz Grid Lines")),zt=this.createColorPicker(),$("<td>").append(zt).appendTo(Ft),this.bindControl(new _(zt,this._property.paneProperties.horzGridProperties.color,!0,this.model(),"Change Horz Grid Lines Color")),Wt=w(),$('<td colspan="2">').append(Wt.render()).appendTo(Ft),this.bindControl(new f(Wt,this._property.paneProperties.horzGridProperties.style,parseInt,!0,this.model(),"Change Horz Grid Lines Style")),Ht=this.createColorPicker(),Ut=this.addLabeledRow(Ot,$.t("Scales Text")),$("<td>").append(Ht).appendTo(Ut),
|
||||
this.bindControl(new _(Ht,this._property.scalesProperties.textColor,!0,this.model(),"Change Scales Text Color")),jt=this.createFontSizeEditor(),$("<td>").append(jt).appendTo(Ut),this.bindControl(new f(jt,this._property.scalesProperties.fontSize,parseInt,!0,this.model(),"Change Scales Font Size")),qt=this.createColorPicker(),Yt=this.addLabeledRow(Ot,$.t("Scales Lines")),$('<td colspan="2">').append(qt).appendTo(Yt),this.bindControl(new _(qt,this._property.scalesProperties.lineColor,!0,this.model(),"Change Scales Lines Color")),Gt=this.addLabeledRow(Ot,$.t("Watermark")),Kt=this.createColorPicker(),$("<td>").append(Kt).appendTo(Gt),this.bindControl(new _(Kt,this._property.symbolWatermarkProperties.color,!0,this.model(),"Change Symbol Watermark Color",this._property.symbolWatermarkProperties.transparency)),Xt=this.addLabeledRow(Ot,$.t("Crosshair")),Zt=this.createColorPicker(),$("<td>").append(Zt).appendTo(Xt),this.bindControl(new _(Zt,this._property.paneProperties.crossHairProperties.color,!0,this.model(),"Change Crosshair Color",this._property.paneProperties.crossHairProperties.transparency)),Jt=w(),$("<td>").append(Jt.render()).appendTo(Xt),this.bindControl(new f(Jt,this._property.paneProperties.crossHairProperties.style,parseInt,!0,this.model(),"Change Crosshair Style")),Qt=S(),$("<td>").append(Qt).appendTo(this.addRow(Ot).prepend("<td/><td/>")),this.bindControl(new u(Qt,this._property.paneProperties.crossHairProperties.width,!0,this.model(),"Change Crosshair Width")),te=$('<table class="property-page">'),ee=this.addLabeledRow(te,$.t("Navigation Buttons"),null,!0),ie=[],Object.keys(P.visibilityPropertyAvailableValues).forEach(function(t){ie.push('<option value="',t,'">',P.visibilityPropertyAvailableValues[t],"</option>")}),oe=$("<select>"+ie.join("")+"</select>"),$("<td>").append(oe).appendTo(ee),this.bindControl(new f(oe,P.visibilityProperty,null,!0,this.model(),"Change Navigation Buttons Visibility")),ne=$('<table class="property-page" cellspacing="0" cellpadding="2">'),se=$('<input type="checkbox">'),re=this.addLabeledRow(ne,$.t("Symbol Description"),se),$("<td>").append(se).prependTo(re),this.bindControl(new p(se,this._property.paneProperties.legendProperties.showSeriesTitle,!0,this.model(),"Change Symbol Description Visibility")),ae=$('<input type="checkbox">'),le=this.addLabeledRow(ne,$.t("OHLC Values"),ae),$("<td>").append(ae).prependTo(le),this.bindControl(new p(ae,this._property.paneProperties.legendProperties.showSeriesOHLC,!0,this.model(),"Change OHLC Values Visibility")),he=$('<input type="checkbox">'),ce=this.addLabeledRow(ne,$.t("Indicator Titles"),he),$("<td>").append(he).prependTo(ce),this.bindControl(new p(he,this._property.paneProperties.legendProperties.showStudyTitles,!0,this.model(),"Change Indicator Titles Visibility")),de=$('<input type="checkbox">'),pe=this.addLabeledRow(ne,$.t("Indicator Arguments"),de),ue=function(t){de.prop("disabled",!t.value())},$("<td>").append(de).prependTo(pe),
|
||||
this.bindControl(new p(de,this._property.paneProperties.legendProperties.showStudyArguments,!0,this.model(),"Change Indicator Arguments Visibility")),this._property.paneProperties.legendProperties.showStudyTitles.listeners().subscribe(this,ue),ue(this._property.paneProperties.legendProperties.showStudyTitles),_e=$('<input type="checkbox">'),fe=this.addLabeledRow(ne,$.t("Indicator Values"),_e),$("<td>").append(_e).prependTo(fe),this.bindControl(new p(_e,this._property.paneProperties.legendProperties.showStudyValues,!0,this.model(),"Change Indicator Values Visibility")),me=$('<div class="property-page-column-2">').append(Ot),ge=$('<div class="property-page-column-2">').append(ne),ve=$('<div class="property-page-column-1">').append(te),C=$("<div>").css("min-width","520px").data("layout-tab",$.t("Background")),C.append(me).append(ge).append(ve)),e.enabled("chart_property_page_timezone_sessions")){for(k=$('<table class="property-page" cellspacing="0" cellpadding="2">').data("layout-tab",$.t("Timezone/Sessions")),this.tmzSessTable=k,ut=$("<tr>").appendTo(k),ye=$("<td>").appendTo(ut),be=$('<table cellspacing="0" cellpadding="0">').appendTo(ye),we=$("<tr>"),we.appendTo(be),Se=$("<td>"),Se.appendTo(we),Se.text($.t("Time Zone")),Te=$('<td colspan="2" class="tzeditor">'),Te.appendTo(we),Ce="",xe=0;xe<x.length;xe++)Ce+='<option value="'+x[xe].id+'">'+x[xe].title+"</option>";Pe=$("<select>"+Ce+"</select>"),Pe.appendTo(Te),this.bindControl(new f(Pe,this._property.timezone,null,!0,this.model(),"Change Timezone")),e.enabled("charting_library_base")||(this._series.createSessStudy(),this.createSessTable(k))}Le=e.enabled("chart_property_page_events_alerts")&&!e.enabled("charting_library_base"),Le&&(ke=e.enabled("alerts")?$.t("Events & Alerts"):$.t("Events"),A=$('<table class="property-page" cellspacing="0" cellpadding="2">').data("layout-tab",ke),this.createEventsTable(A)),Ie=e.enabled("trading_options")||e.enabled("chart_property_page_trading"),Ie&&(I=this.createTradingTable()),n=$('<table class="property-page" cellspacing="0" cellpadding="2">'),s=$('<table class="property-page property-page-unpadded" cellspacing="0" cellpadding="0">').css({width:"100%"}).data("layout-separated",!0),L=$('<table class="property-page" cellspacing="0" cellpadding="2">').data("layout-tab",$.t("Drawings")),this._table=$().add(t).add(i).add(o).add(n).add(s).add(r).add(b).add(a).add(T).add(C).add(L).add(k).add(I).add(A),this.loadData()},o.prototype.widget=function(){return this._table},o.prototype.loadData=function(){this.superclass.prototype.loadData.call(this),this.switchStyle()},o.prototype.loadTheme=function(t){var e=this;$.get("/theme/?themeName="+encodeURIComponent(t),function(t){e.applyTheme(JSON.parse(t.content))})},o.prototype.applyTheme=function(t){var e=this._seriesProperty.extendedHours.value();this._model.model().restoreTheme(t),this._seriesProperty.extendedHours.value()!==e&&this._seriesProperty.extendedHours.listeners().fire(this._seriesProperty.extendedHours),this.loadData()},o.prototype.createTemplateButton=function(t){var i,o,n
|
||||
@@ -1,4 +1,4 @@
|
||||
!function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return t[i].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var n,i,r=window.webpackJsonp;window.webpackJsonp=function(o,s){for(var a,l,u=0,c=[];u<o.length;u++)l=o[u],i[l]&&c.push.apply(c,i[l]),i[l]=0;for(a in s)Object.prototype.hasOwnProperty.call(s,a)&&(t[a]=s[a]);for(r&&r(o,s);c.length;)c.shift().call(null,e);if(s[0])return n[0]=0,e(0)},n={},i={1:0},e.e=function(t,n){var r,o;if(0===i[t])return n.call(null,e);void 0!==i[t]?i[t].push(n):(i[t]=[n],r=document.getElementsByTagName("head")[0],o=document.createElement("script"),o.type="text/javascript",o.charset="utf-8",o.async=!0,o.src=e.p+""+({0:"objecttreedialog",3:"ie-fallback-logos",4:"library"}[t]||t)+"."+{0:"b80d27d173fb6f8bb0a3",2:"1241f4b3f95dd7677a3c",3:"01acaeb21cf903de7d89",4:"52f448f933885e5e0fed"}[t]+".js",r.appendChild(o))},e.m=t,e.c=n,e.p="bundles/",e.p=window.WEBPACK_PUBLIC_PATH||e.p,e(0)}([function(t,e,n){n(166),n(914),n(758),n(17),n(286),n(590),n(130),n(30),n(40),n(721),n(566),n(359),n(717),n(718),n(105),n(360),n(714),n(715),n(567),n(384),n(716),n(719),t.exports=n(267)},,,,function(t,e,n){var i=n(20),r=n(96),o=n(84),s=n(99),a=n(74),l="prototype",u=function(t,e,n){var c,h,f,d,p=t&u.F,g=t&u.G,m=t&u.S,y=t&u.P,v=t&u.B,b=g?i:m?i[e]||(i[e]={}):(i[e]||{})[l],_=g?r:r[e]||(r[e]={}),w=_[l]||(_[l]={});g&&(n=e);for(c in n)h=!p&&b&&void 0!==b[c],f=(h?b:n)[c],d=v&&h?a(f,i):y&&"function"==typeof f?a(Function.call,f):f,b&&s(b,c,f,t&u.U),_[c]!=f&&o(_,c,d),y&&w[c]!=f&&(w[c]=f)};i.core=r,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},,,,,,,,,,,,,function(t,e,n){var i,r;!function(o,s){function a(t){var e,n,i=Ce[t]={};for(t=t.split(/\s+/),e=0,n=t.length;e<n;e++)i[t[e]]=!0;return i}function l(t,e,n){if(n===s&&1===t.nodeType){var i="data-"+e.replace(Y,"-$1").toLowerCase();if("string"==typeof(n=t.getAttribute(i))){try{n="true"===n||"false"!==n&&("null"===n?null:Te.isNumeric(n)?+n:H.test(n)?Te.parseJSON(n):n)}catch(t){}Te.data(t,e,n)}else n=s}return n}function u(t){for(var e in t)if(("data"!==e||!Te.isEmptyObject(t[e]))&&"toJSON"!==e)return!1;return!0}function c(t,e,n){var i=e+"defer",r=e+"queue",o=e+"mark",s=Te._data(t,i);!s||"queue"!==n&&Te._data(t,r)||"mark"!==n&&Te._data(t,o)||setTimeout(function(){Te._data(t,r)||Te._data(t,o)||(Te.removeData(t,i,!0),s.fire())},0)}function h(){return!1}function f(){return!0}function d(t){return!t||!t.parentNode||11===t.parentNode.nodeType}function p(t,e,n){if(e=e||0,Te.isFunction(e))return Te.grep(t,function(t,i){return!!e.call(t,i,t)===n});if(e.nodeType)return Te.grep(t,function(t,i){return t===e===n});if("string"==typeof e){var i=Te.grep(t,function(t){return 1===t.nodeType});if(ct.test(e))return Te.filter(e,i,!n);e=Te.filter(e,i)}return Te.grep(t,function(t,i){return Te.inArray(t,e)>=0===n})}function g(t){var e=pt.split("|"),n=t.createDocumentFragment();if(n.createElement)for(;e.length;)n.createElement(e.pop());return n}function m(t,e){
|
||||
!function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return t[i].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var n,i,r=window.webpackJsonp;window.webpackJsonp=function(o,s){for(var a,l,u=0,c=[];u<o.length;u++)l=o[u],i[l]&&c.push.apply(c,i[l]),i[l]=0;for(a in s)Object.prototype.hasOwnProperty.call(s,a)&&(t[a]=s[a]);for(r&&r(o,s);c.length;)c.shift().call(null,e);if(s[0])return n[0]=0,e(0)},n={},i={1:0},e.e=function(t,n){var r,o;if(0===i[t])return n.call(null,e);void 0!==i[t]?i[t].push(n):(i[t]=[n],r=document.getElementsByTagName("head")[0],o=document.createElement("script"),o.type="text/javascript",o.charset="utf-8",o.async=!0,o.src=e.p+""+({0:"objecttreedialog",3:"ie-fallback-logos",4:"library"}[t]||t)+"."+{0:"b80d27d173fb6f8bb0a3",2:"1241f4b3f95dd7677a3c",3:"01acaeb21cf903de7d89",4:"05c8bae2a68bce3d5e6a"}[t]+".js",r.appendChild(o))},e.m=t,e.c=n,e.p="bundles/",e.p=window.WEBPACK_PUBLIC_PATH||e.p,e(0)}([function(t,e,n){n(166),n(914),n(758),n(17),n(286),n(590),n(130),n(30),n(40),n(721),n(566),n(359),n(717),n(718),n(105),n(360),n(714),n(715),n(567),n(384),n(716),n(719),t.exports=n(267)},,,,function(t,e,n){var i=n(20),r=n(96),o=n(84),s=n(99),a=n(74),l="prototype",u=function(t,e,n){var c,h,f,d,p=t&u.F,g=t&u.G,m=t&u.S,y=t&u.P,v=t&u.B,b=g?i:m?i[e]||(i[e]={}):(i[e]||{})[l],_=g?r:r[e]||(r[e]={}),w=_[l]||(_[l]={});g&&(n=e);for(c in n)h=!p&&b&&void 0!==b[c],f=(h?b:n)[c],d=v&&h?a(f,i):y&&"function"==typeof f?a(Function.call,f):f,b&&s(b,c,f,t&u.U),_[c]!=f&&o(_,c,d),y&&w[c]!=f&&(w[c]=f)};i.core=r,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},,,,,,,,,,,,,function(t,e,n){var i,r;!function(o,s){function a(t){var e,n,i=Ce[t]={};for(t=t.split(/\s+/),e=0,n=t.length;e<n;e++)i[t[e]]=!0;return i}function l(t,e,n){if(n===s&&1===t.nodeType){var i="data-"+e.replace(Y,"-$1").toLowerCase();if("string"==typeof(n=t.getAttribute(i))){try{n="true"===n||"false"!==n&&("null"===n?null:Te.isNumeric(n)?+n:H.test(n)?Te.parseJSON(n):n)}catch(t){}Te.data(t,e,n)}else n=s}return n}function u(t){for(var e in t)if(("data"!==e||!Te.isEmptyObject(t[e]))&&"toJSON"!==e)return!1;return!0}function c(t,e,n){var i=e+"defer",r=e+"queue",o=e+"mark",s=Te._data(t,i);!s||"queue"!==n&&Te._data(t,r)||"mark"!==n&&Te._data(t,o)||setTimeout(function(){Te._data(t,r)||Te._data(t,o)||(Te.removeData(t,i,!0),s.fire())},0)}function h(){return!1}function f(){return!0}function d(t){return!t||!t.parentNode||11===t.parentNode.nodeType}function p(t,e,n){if(e=e||0,Te.isFunction(e))return Te.grep(t,function(t,i){return!!e.call(t,i,t)===n});if(e.nodeType)return Te.grep(t,function(t,i){return t===e===n});if("string"==typeof e){var i=Te.grep(t,function(t){return 1===t.nodeType});if(ct.test(e))return Te.filter(e,i,!n);e=Te.filter(e,i)}return Te.grep(t,function(t,i){return Te.inArray(t,e)>=0===n})}function g(t){var e=pt.split("|"),n=t.createDocumentFragment();if(n.createElement)for(;e.length;)n.createElement(e.pop());return n}function m(t,e){
|
||||
return Te.nodeName(t,"table")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function y(t,e){if(1===e.nodeType&&Te.hasData(t)){var n,i,r,o=Te._data(t),s=Te._data(e,o),a=o.events;if(a){delete s.handle,s.events={};for(n in a)for(i=0,r=a[n].length;i<r;i++)Te.event.add(e,n,a[n][i])}s.data&&(s.data=Te.extend({},s.data))}}function v(t,e){var n;1===e.nodeType&&(e.clearAttributes&&e.clearAttributes(),e.mergeAttributes&&e.mergeAttributes(t),n=e.nodeName.toLowerCase(),"object"===n?e.outerHTML=t.outerHTML:"input"!==n||"checkbox"!==t.type&&"radio"!==t.type?"option"===n?e.selected=t.defaultSelected:"input"===n||"textarea"===n?e.defaultValue=t.defaultValue:"script"===n&&e.text!==t.text&&(e.text=t.text):(t.checked&&(e.defaultChecked=e.checked=t.checked),e.value!==t.value&&(e.value=t.value)),e.removeAttribute(Te.expando),e.removeAttribute("_submit_attached"),e.removeAttribute("_change_attached"))}function b(t){return s!==t.getElementsByTagName?t.getElementsByTagName("*"):s!==t.querySelectorAll?t.querySelectorAll("*"):[]}function _(t){"checkbox"!==t.type&&"radio"!==t.type||(t.defaultChecked=t.checked)}function w(t){var e=(t.nodeName||"").toLowerCase();"input"===e?_(t):"script"!==e&&s!==t.getElementsByTagName&&Te.grep(t.getElementsByTagName("input"),_)}function x(t){var e=Se.createElement("div");return Ct.appendChild(e),e.innerHTML=t.outerHTML,e.firstChild}function k(t,e,n){var i="width"===e?t.offsetWidth:t.offsetHeight,r="width"===e?1:0,o=4;if(i>0){if("border"!==n)for(;r<o;r+=2)n||(i-=parseFloat(Te.css(t,"padding"+Ft[r]))||0),"margin"===n?i+=parseFloat(Te.css(t,n+Ft[r]))||0:i-=parseFloat(Te.css(t,"border"+Ft[r]+"Width"))||0;return i+"px"}if(i=Ht(t,e),(i<0||null==i)&&(i=t.style[e]),Lt.test(i))return i;if(i=parseFloat(i)||0,n)for(;r<o;r+=2)i+=parseFloat(Te.css(t,"padding"+Ft[r]))||0,"padding"!==n&&(i+=parseFloat(Te.css(t,"border"+Ft[r]+"Width"))||0),"margin"===n&&(i+=parseFloat(Te.css(t,n+Ft[r]))||0);return i+"px"}function S(t){return function(e,n){if("string"!=typeof e&&(n=e,e="*"),Te.isFunction(n))for(var i,r,o,s=e.toLowerCase().split(Zt),a=0,l=s.length;a<l;a++)i=s[a],o=/^\+/.test(i),o&&(i=i.substr(1)||"*"),r=t[i]=t[i]||[],r[o?"unshift":"push"](n)}}function M(t,e,n,i,r,o){r=r||e.dataTypes[0],o=o||{},o[r]=!0;for(var a,l=t[r],u=0,c=l?l.length:0,h=t===ie;u<c&&(h||!a);u++)"string"==typeof(a=l[u](e,n,i))&&(!h||o[a]?a=s:(e.dataTypes.unshift(a),a=M(t,e,n,i,a,o)));return!h&&a||o["*"]||(a=M(t,e,n,i,"*",o)),a}function D(t,e){var n,i,r=Te.ajaxSettings.flatOptions||{};for(n in e)e[n]!==s&&((r[n]?t:i||(i={}))[n]=e[n]);i&&Te.extend(!0,t,i)}function T(t,e,n,i){if(Te.isArray(e))Te.each(e,function(e,r){n||Wt.test(t)?i(t,r):T(t+"["+("object"==typeof r?e:"")+"]",r,n,i)});else if(n||"object"!==Te.type(e))i(t,e);else for(var r in e)T(t+"["+r+"]",e[r],n,i)}function C(t,e,n){var i,r,o,a,l=t.contents,u=t.dataTypes,c=t.responseFields;for(r in c)r in n&&(e[c[r]]=n[r]);for(;"*"===u[0];)u.shift(),i===s&&(i=t.mimeType||e.getResponseHeader("content-type"));if(i)for(r in l)if(l[r]&&l[r].test(i)){u.unshift(r);break}
|
||||
if(u[0]in n)o=u[0];else{for(r in n){if(!u[0]||t.converters[r+" "+u[0]]){o=r;break}a||(a=r)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}function P(t,e){t.dataFilter&&(e=t.dataFilter(e,t.dataType));var n,i,r,o,a,l,u,c,h=t.dataTypes,f={},d=h.length,p=h[0];for(n=1;n<d;n++){if(1===n)for(i in t.converters)"string"==typeof i&&(f[i.toLowerCase()]=t.converters[i]);if(o=p,"*"===(p=h[n]))p=o;else if("*"!==o&&o!==p){if(a=o+" "+p,!(l=f[a]||f["* "+p])){c=s;for(u in f)if(r=u.split(" "),(r[0]===o||"*"===r[0])&&(c=f[r[1]+" "+p])){u=f[u],!0===u?l=c:!0===c&&(l=u);break}}l||c||Te.error("No conversion from "+a.replace(" "," to ")),!0!==l&&(e=l?l(e):c(u(e)))}}return e}function O(){try{return new o.XMLHttpRequest}catch(t){}}function E(){try{return new o.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function N(){return setTimeout(L,0),_e=Te.now()}function L(){_e=s}function A(t,e){var n={};return Te.each(be.concat.apply([],be.slice(0,e)),function(){n[this]=t}),n}function I(t){if(!de[t]){var e=Se.body,n=Te("<"+t+">").appendTo(e),i=n.css("display");n.remove(),"none"!==i&&""!==i||(pe||(pe=Se.createElement("iframe"),pe.frameBorder=pe.width=pe.height=0),e.appendChild(pe),ge&&pe.createElement||(ge=(pe.contentWindow||pe.contentDocument).document,ge.write((Te.support.boxModel?"<!doctype html>":"")+"<html><body>"),ge.close()),n=ge.createElement(t),ge.body.appendChild(n),i=Te.css(n,"display"),e.removeChild(pe)),de[t]=i}return de[t]}function j(t){return Te.isWindow(t)?t:9===t.nodeType&&(t.defaultView||t.parentWindow)}var F,H,Y,z,R,W,V,B,U,q,$,G,X,K,Q,J,Z,tt,et,nt,it,rt,ot,st,at,lt,ut,ct,ht,ft,dt,pt,gt,mt,yt,vt,bt,_t,wt,xt,kt,St,Mt,Dt,Tt,Ct,Pt,Ot,Et,Nt,Lt,At,It,jt,Ft,Ht,Yt,zt,Rt,Wt,Vt,Bt,Ut,qt,$t,Gt,Xt,Kt,Qt,Jt,Zt,te,ee,ne,ie,re,oe,se,ae,le,ue,ce,he,fe,de,pe,ge,me,ye,ve,be,_e,we,xe,ke,Se=o.document,Me=o.navigator,De=o.location,Te=function(){function t(){if(!a.isReady){try{Se.documentElement.doScroll("left")}catch(e){return void setTimeout(t,1)}a.ready()}}var e,n,i,r,a=function(t,n){return new a.fn.init(t,n,e)},l=o.jQuery,u=o.$,c=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,h=/\S/,f=/^\s+/,d=/\s+$/,p=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,g=/^[\],:{}\s]*$/,m=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,y=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,v=/(?:^|:|,)(?:\s*\[)+/g,b=/(webkit)[ \/]([\w.]+)/,_=/(opera)(?:.*version)?[ \/]([\w.]+)/,w=/(msie) ([\w.]+)/,x=/(mozilla)(?:.*? rv:([\w.]+))?/,k=/-([a-z]|[0-9])/gi,S=/^-ms-/,M=function(t,e){return(e+"").toUpperCase()},D=Me.userAgent,T=Object.prototype.toString,C=Object.prototype.hasOwnProperty,P=Array.prototype.push,O=Array.prototype.slice,E=String.prototype.trim,N=Array.prototype.indexOf,L={};return a.fn=a.prototype={constructor:a,init:function(t,e,n){var i,r,o,l;if(!t)return this;if(t.nodeType)return this.context=this[0]=t,this.length=1,this;if("body"===t&&!e&&Se.body)return this.context=Se,this[0]=Se.body,this.selector=t,this.length=1,this;if("string"==typeof t){
|
||||
if(!(i="<"===t.charAt(0)&&">"===t.charAt(t.length-1)&&t.length>=3?[null,t,null]:c.exec(t))||!i[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(i[1])return e=e instanceof a?e[0]:e,l=e?e.ownerDocument||e:Se,o=p.exec(t),o?a.isPlainObject(e)?(t=[Se.createElement(o[1])],a.fn.attr.call(t,e,!0)):t=[l.createElement(o[1])]:(o=a.buildFragment([i[1]],[l]),t=(o.cacheable?a.clone(o.fragment):o.fragment).childNodes),a.merge(this,t);if((r=Se.getElementById(i[2]))&&r.parentNode){if(r.id!==i[2])return n.find(t);this.length=1,this[0]=r}return this.context=Se,this.selector=t,this}return a.isFunction(t)?n.ready(t):(t.selector!==s&&(this.selector=t.selector,this.context=t.context),a.makeArray(t,this))},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return O.call(this,0)},get:function(t){return null==t?this.toArray():t<0?this[this.length+t]:this[t]},pushStack:function(t,e,n){var i=this.constructor();return a.isArray(t)?P.apply(i,t):a.merge(i,t),i.prevObject=this,i.context=this.context,"find"===e?i.selector=this.selector+(this.selector?" ":"")+n:e&&(i.selector=this.selector+"."+e+"("+n+")"),i},each:function(t,e){return a.each(this,t,e)},ready:function(t){return a.bindReady(),i.add(t),this},eq:function(t){return t=+t,-1===t?this.slice(t):this.slice(t,t+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(O.apply(this,arguments),"slice",O.call(arguments).join(","))},map:function(t){return this.pushStack(a.map(this,function(e,n){return t.call(e,n,e)}))},end:function(){return this.prevObject||this.constructor(null)},push:P,sort:[].sort,splice:[].splice},a.fn.init.prototype=a.fn,a.extend=a.fn.extend=function(){var t,e,n,i,r,o,l=arguments[0]||{},u=1,c=arguments.length,h=!1;for("boolean"==typeof l&&(h=l,l=arguments[1]||{},u=2),"object"==typeof l||a.isFunction(l)||(l={}),c===u&&(l=this,--u);u<c;u++)if(null!=(t=arguments[u]))for(e in t)n=l[e],i=t[e],l!==i&&(h&&i&&(a.isPlainObject(i)||(r=a.isArray(i)))?(r?(r=!1,o=n&&a.isArray(n)?n:[]):o=n&&a.isPlainObject(n)?n:{},l[e]=a.extend(h,o,i)):i!==s&&(l[e]=i));return l},a.extend({noConflict:function(t){return o.$===a&&(o.$=u),t&&o.jQuery===a&&(o.jQuery=l),a},isReady:!1,readyWait:1,holdReady:function(t){t?a.readyWait++:a.ready(!0)},ready:function(t){if(!0===t&&!--a.readyWait||!0!==t&&!a.isReady){if(!Se.body)return setTimeout(a.ready,1);if(a.isReady=!0,!0!==t&&--a.readyWait>0)return;i.fireWith(Se,[a]),a.fn.trigger&&a(Se).trigger("ready").off("ready")}},bindReady:function(){if(!i){if(i=a.Callbacks("once memory"),"complete"===Se.readyState)return setTimeout(a.ready,1);if(Se.addEventListener)Se.addEventListener("DOMContentLoaded",r,!1),o.addEventListener("load",a.ready,!1);else if(Se.attachEvent){Se.attachEvent("onreadystatechange",r),o.attachEvent("onload",a.ready);var e=!1;try{e=null==o.frameElement}catch(t){}Se.documentElement.doScroll&&e&&t()}}},isFunction:function(t){return"function"===a.type(t)},isArray:Array.isArray||function(t){return"array"===a.type(t)},isWindow:function(t){
|
||||
@@ -1 +1 @@
|
||||
<!DOCTYPE html><html><head><meta charset="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=Edge"><link type="text/css" href="bundles/library.2e4e86e4539a260f4a7b69dd55f2595b.css" rel="stylesheet"/></head><body class="chart-page on-widget"><div class="loading-indicator" id="loading-indicator"></div><script src="js/external/spin.min.js"></script><script>var loadingSpinner=new Spinner({lines:17,length:0,width:3,radius:30,scale:1,corners:1,color:"#00A2E2",opacity:0,rotate:0,direction:1,speed:1.5,trail:60,fps:20,zIndex:2000000000,className:"spinner",top:"50%",left:"50%",shadow:false,hwaccel:false}).spin(document.getElementById("loading-indicator"));</script><script>var JSServer={};var __initialEnabledFeaturesets=["charting_library"];</script><script>urlParams=(function(){var e,c=/\+/g,h=/([^&=]+)=?([^&]*)/g,a=function(j){return decodeURIComponent(j.replace(c," ")).replace(/<\/?[^>]+(>|$)/g,"")},f=function(){var k=location.href;var j=k.indexOf("#");if(j>=0){return k.substring(j+1)}else{throw"Unexpected use of this page"}}(),i={};while(e=h.exec(f)){i[a(e[1])]=a(e[2])}var g=window.parent[i.uid];var d=["datafeed","customFormatters","brokerFactory"];for(var b in g){if(b==="tradingController"){window.tradingController=g[b]}else{if(d.indexOf(b)===-1){i[b]=JSON.stringify(g[b])}}}return i})();window.locale=urlParams.locale;window.language=urlParams.locale;</script><script src="bundles/vendors.8c445fe91dc494c5dec6.js"></script><script src="bundles/library.52f448f933885e5e0fed.js"></script></body></html>
|
||||
<!DOCTYPE html><html><head><meta charset="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=Edge"><link type="text/css" href="bundles/library.2e4e86e4539a260f4a7b69dd55f2595b.css" rel="stylesheet"/></head><body class="chart-page on-widget"><div class="loading-indicator" id="loading-indicator"></div><script src="js/external/spin.min.js"></script><script>var loadingSpinner=new Spinner({lines:17,length:0,width:3,radius:30,scale:1,corners:1,color:"#00A2E2",opacity:0,rotate:0,direction:1,speed:1.5,trail:60,fps:20,zIndex:2000000000,className:"spinner",top:"50%",left:"50%",shadow:false,hwaccel:false}).spin(document.getElementById("loading-indicator"));</script><script>var JSServer={};var __initialEnabledFeaturesets=["charting_library"];</script><script>urlParams=(function(){var e,c=/\+/g,h=/([^&=]+)=?([^&]*)/g,a=function(j){return decodeURIComponent(j.replace(c," ")).replace(/<\/?[^>]+(>|$)/g,"")},f=function(){var k=location.href;var j=k.indexOf("#");if(j>=0){return k.substring(j+1)}else{throw"Unexpected use of this page"}}(),i={};while(e=h.exec(f)){i[a(e[1])]=a(e[2])}var g=window.parent[i.uid];var d=["datafeed","customFormatters","brokerFactory"];for(var b in g){if(b==="tradingController"){window.tradingController=g[b]}else{if(d.indexOf(b)===-1){i[b]=JSON.stringify(g[b])}}}return i})();window.locale=urlParams.locale;window.language=urlParams.locale;</script><script src="bundles/vendors.7b89b40661ed8fd3d2ce.js"></script><script src="bundles/library.05c8bae2a68bce3d5e6a.js"></script></body></html>
|
||||
Reference in New Issue
Block a user