package.indicators.indicators-all.js Maven / Gradle / Ivy
Show all versions of highcharts Show documentation
!/**
* Highstock JS v11.4.8 (2024-08-29)
*
* All technical indicators for Highcharts Stock
*
* (c) 2010-2024 Pawel Fus
*
* License: www.highcharts.com/license
*/function(e){"object"==typeof module&&module.exports?(e.default=e,module.exports=e):"function"==typeof define&&define.amd?define("highcharts/indicators/indicators-all",["highcharts","highcharts/modules/stock"],function(t){return e(t),e.Highcharts=t,e}):e("undefined"!=typeof Highcharts?Highcharts:void 0)}(function(e){"use strict";var t=e?e._modules:{};function s(t,s,i,o){t.hasOwnProperty(s)||(t[s]=o.apply(null,i),"function"==typeof CustomEvent&&e.win.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:s,module:t[s]}})))}s(t,"Stock/Indicators/SMA/SMAIndicator.js",[t["Core/Chart/Chart.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,t,s){let{line:i}=t.seriesTypes,{addEvent:o,fireEvent:a,error:r,extend:n,isArray:l,merge:p,pick:u,splat:h}=s;class d extends i{destroy(){this.dataEventsToUnbind.forEach(function(e){e()}),super.destroy.apply(this,arguments)}getName(){let e=[],t=this.name;return t||((this.nameComponents||[]).forEach(function(t,s){e.push(this.options.params[t]+u(this.nameSuffixes[s],""))},this),t=(this.nameBase||this.type.toUpperCase())+(this.nameComponents?" ("+e.join(", ")+")":"")),t}getValues(e,t){let s=t.period,i=e.xData,o=e.yData,a=o.length,r=[],n=[],p=[],u,h=-1,d=0,c,g=0;if(!(i.length0&&(a[1]+=g[s-1][1]),g.push(a),y.push(a[0]),m.push(a[1]);return{values:g,xData:y,yData:m}}}}return r.defaultOptions=a(s.defaultOptions,{params:{index:void 0,volumeSeriesID:"volume"}}),o(r.prototype,{nameComponents:!1,nameBase:"Accumulation/Distribution"}),e.registerSeriesType("ad",r),r}),s(t,"Stock/Indicators/AO/AOIndicator.js",[t["Core/Globals.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,t,s){let{noop:i}=e,{column:{prototype:o},sma:a}=t.seriesTypes,{extend:r,merge:n,correctFloat:l,isArray:p}=s;class u extends a{drawGraph(){let e;let t=this.options,s=this.points,i=this.userOptions.color,o=t.greaterBarColor,a=t.lowerBarColor,r=s[0];if(!i&&r)for(e=1,r.color=o;es[e-1].y?s[e].color=o:s[e].y=29&&(m=l(m+d)),y=l(y+d);for(g=33;g{e!==t&&s.push(l(e))}),s}function u(){let e=this,t=e.pointValKey,s=e.linesApiNames,n=e.areaLinesNames,u=e.points,h=e.options,d=e.graph,c={options:{gapSize:h.gapSize}},g=[],y=p(e,t),m=u.length,f;if(y.forEach((e,t)=>{for(g[t]=[];m--;)f=u[m],g[t].push({x:f.x,plotX:f.plotX,plotY:f[e],isNull:!o(f[e])});m=u.length}),e.userOptions.fillColor&&n.length){let t=g[y.indexOf(l(n[0]))],s=1===n.length?u:g[y.indexOf(l(n[1]))],o=e.color;e.points=s,e.nextPoints=t,e.color=e.userOptions.fillColor,e.options=r(u,c),e.graph=e.area,e.fillGraph=!0,i.drawGraph.call(e),e.area=e.graph,delete e.nextPoints,delete e.fillGraph,e.color=o}s.forEach((t,s)=>{g[s]?(e.points=g[s],h[t]?e.options=r(h[t].styles,c):a('Error: "There is no '+t+' in DOCS options declared. Check if linesApiNames are consistent with your DOCS line names."'),e.graph=e["graph"+t],i.drawGraph.call(e),e["graph"+t]=e.graph):a('Error: "'+t+" doesn't have equivalent in pointArrayMap. To many elements in linesApiNames relative to pointArrayMap.\"")}),e.points=u,e.options=h,e.graph=d,i.drawGraph.call(e)}function h(e){let t,s=[],o=[];if(e=e||this.points,this.fillGraph&&this.nextPoints){if((t=i.getGraphPath.call(this,this.nextPoints))&&t.length){t[0][0]="L",s=i.getGraphPath.call(this,e),o=t.slice(0,s.length);for(let e=o.length-1;e>=0;e--)s.push(o[e])}}else s=i.getGraphPath.apply(this,arguments);return s}function d(e){let t=[];return(this.pointArrayMap||[]).forEach(s=>{t.push(e[s])}),t}function c(){let e=this.pointArrayMap,t=[],s;t=p(this),i.translate.apply(this,arguments),this.points.forEach(i=>{e.forEach((e,o)=>{s=i[e],this.dataModify&&(s=this.dataModify.modifyValue(s)),null!==s&&(i[t[o]]=this.yAxis.toPixels(s,!0))})})}e.compose=function(e){let i=e.prototype;return i.linesApiNames=i.linesApiNames||t.slice(),i.pointArrayMap=i.pointArrayMap||s.slice(),i.pointValKey=i.pointValKey||"top",i.areaLinesNames=i.areaLinesNames||n.slice(),i.drawGraph=u,i.getGraphPath=h,i.toYData=d,i.translate=c,e}}(s||(s={})),s}),s(t,"Stock/Indicators/Aroon/AroonIndicator.js",[t["Stock/Indicators/MultipleLinesComposition.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,t,s){let{sma:i}=t.seriesTypes,{extend:o,merge:a,pick:r}=s;function n(e,t){let s=e[0],i=0,o;for(o=1;o=s||"min"===t&&e[o]<=s)&&(s=e[o],i=o);return i}class l extends i{getValues(e,t){let s,i,o,a,l;let p=t.period,u=e.xData,h=e.yData,d=h?h.length:0,c=[],g=[],y=[];for(a=p-1;a● {series.name}
Aroon Up: {point.y}
Aroon Down: {point.aroonDown}
'},aroonDown:{styles:{lineWidth:1,lineColor:void 0}},dataGrouping:{approximation:"averages"}}),o(l.prototype,{areaLinesNames:[],linesApiNames:["aroonDown"],nameBase:"Aroon",pointArrayMap:["y","aroonDown"],pointValKey:"y"}),e.compose(l),t.registerSeriesType("aroon",l),l}),s(t,"Stock/Indicators/AroonOscillator/AroonOscillatorIndicator.js",[t["Stock/Indicators/MultipleLinesComposition.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,t,s){let{aroon:i}=t.seriesTypes,{extend:o,merge:a}=s;class r extends i{getValues(e,t){let s,i;let o=[],a=[],r=[],n=super.getValues.call(this,e,t);for(i=0;i● {series.name}: {point.y}'}}),o(r.prototype,{nameBase:"Aroon Oscillator",linesApiNames:[],pointArrayMap:["y"],pointValKey:"y"}),e.compose(i),t.registerSeriesType("aroonoscillator",r),r}),s(t,"Stock/Indicators/ATR/ATRIndicator.js",[t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,t){let{sma:s}=e.seriesTypes,{isArray:i,merge:o}=t;function a(e,t){return Math.max(e[1]-e[2],void 0===t?0:Math.abs(e[1]-t[3]),void 0===t?0:Math.abs(e[2]-t[3]))}class r extends s{getValues(e,t){let s=t.period,o=e.xData,r=e.yData,n=r?r.length:0,l=[[o[0],r[0]]],p=[],u=[],h=[],d,c,g=0,y=1,m=0;if(!(o.length<=s)&&i(r[0])&&4===r[0].length){for(c=1;c<=n;c++){var f,D;(function(e,t,s,i){let o=t[i],a=s[i];e.push([o,a])})(l,o,r,c),s● {series.name}
Top: {point.top}
Middle: {point.middle}
Bottom: {point.bottom}
'},marker:{enabled:!1},dataGrouping:{approximation:"averages"}}),o(n.prototype,{areaLinesNames:["top","bottom"],linesApiNames:["topLine","bottomLine"],nameComponents:["period","standardDeviation"],pointArrayMap:["top","middle","bottom"],pointValKey:"middle"}),e.compose(n),t.registerSeriesType("bb",n),n}),s(t,"Stock/Indicators/CCI/CCIIndicator.js",[t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,t){let{sma:s}=e.seriesTypes,{isArray:i,merge:o}=t;class a extends s{getValues(e,t){let s=t.period,o=e.xData,a=e.yData,r=a?a.length:0,n=[],l=[],p=[],u=[],h,d,c=[],g,y=1,m,f,D,x;if(!(o.length<=s)&&i(a[0])&&4===a[0].length){for(;y=t.params.period}return!!(s&&i&&a(s)&&a(i)&&o)}getValues(e,t){if(this.isValid())return this.getMoneyFlow(e.xData,e.yData,this.volumeSeries.yData,t.period)}getMoneyFlow(e,t,s,i){let o=t.length,a=[],r=[],n=[],l=[],p,u,h=-1,d=0,c=0;function g(e,t){let s=e[1],i=e[2],o=e[3];return null!==t&&null!==s&&null!==i&&null!==o&&s!==i?(o-i-(s-o))/(s-i)*t:(h=p,null)}if(i>0&&i<=o){for(p=0;p=i&&0!==d?c/d:null),l.push([r[0],n[0]]);p=i?c/d:null],r.push(u[0]),n.push(u[1]),l.push([u[0],u[1]])}return{values:l,xData:r,yData:n}}}return o.defaultOptions=i(s.defaultOptions,{params:{index:void 0,volumeSeriesID:"volume"}}),e.registerSeriesType("cmf",o),o}),s(t,"Stock/Indicators/DMI/DMIIndicator.js",[t["Stock/Indicators/MultipleLinesComposition.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,t,s){let{sma:i}=t.seriesTypes,{correctFloat:o,extend:a,isArray:r,merge:n}=s;class l extends i{calculateDM(e,t,s){let i=e[t][1],a=e[t][2],r=e[t-1][1],n=e[t-1][2];return o(i-r>n-a?s?Math.max(i-r,0):0:s?0:Math.max(n-a,0))}calculateDI(e,t){return e/t*100}calculateDX(e,t){return o(Math.abs(e-t)/Math.abs(e+t)*100)}smoothValues(e,t,s){return o(e-e/s+t)}getTR(e,t){return o(Math.max(e[1]-e[2],t?Math.abs(e[1]-t[3]):0,t?Math.abs(e[2]-t[3]):0))}getValues(e,t){let s=t.period,i=e.xData,o=e.yData,a=o?o.length:0,n=[],l=[],p=[];if(i.length<=s||!r(o[0])||4!==o[0].length)return;let u=0,h=0,d=0,c;for(c=1;c● {series.name}
DX: {point.y}
+DI: {point.plusDI}
-DI: {point.minusDI}
'},plusDILine:{styles:{lineWidth:1,lineColor:"#06b535"}},minusDILine:{styles:{lineWidth:1,lineColor:"#f21313"}},dataGrouping:{approximation:"averages"}}),a(l.prototype,{areaLinesNames:[],nameBase:"DMI",linesApiNames:["plusDILine","minusDILine"],pointArrayMap:["y","plusDI","minusDI"],parallelArrays:["x","y","plusDI","minusDI"],pointValKey:"y"}),e.compose(l),t.registerSeriesType("dmi",l),l}),s(t,"Stock/Indicators/DPO/DPOIndicator.js",[t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,t){let{sma:s}=e.seriesTypes,{extend:i,merge:o,correctFloat:a,pick:r}=t;function n(e,t,s,i,o){let n=r(t[s][i],t[s]);return o?a(e-n):a(e+n)}class l extends s{getValues(e,t){let s=t.period,i=t.index,o=Math.floor(s/2+1),a=s+o,l=e.xData||[],p=e.yData||[],u=p.length,h=[],d=[],c=[],g,y,m,f,D,x=0;if(!(l.length<=a)){for(f=0;fe[h]));let c=0,g=0,y=0,m;for(let e=s;e>0;e--)d[e]>d[e-1]?g+=d[e]-d[e-1]:d[e]0?100*(g-y)/(g+y):0,l.push(o[s]),p.push(m),n.push([o[s],m]),u=s+1;ud[u-1]?g+=d[u]-d[u-1]:d[u]d[u-s-1]?g-=c:y-=c,m=g+y>0?100*(g-y)/(g+y):0,l.push(o[u]),p.push(m),n.push([o[u],m]);return{values:n,xData:l,yData:p}}}return a.defaultOptions=o(s.defaultOptions,{params:{period:20,index:3}}),e.registerSeriesType("cmo",a),a}),s(t,"Stock/Indicators/DEMA/DEMAIndicator.js",[t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,t){let{ema:s}=e.seriesTypes,{correctFloat:i,isArray:o,merge:a}=t;class r extends s{getEMA(e,t,s,i,o,a){return super.calculateEma(a||[],e,void 0===o?1:o,this.EMApercent,t,void 0===i?-1:i,s)}getValues(e,t){let s=t.period,a=[],r=2*s,n=e.xData,l=e.yData,p=l?l.length:0,u=[],h=[],d=[],c=0,g=0,y,m,f,D,x=-1,S,v=0;if(this.EMApercent=2/(s+1),!(p<2*s-1)){for(o(l[0])&&(x=t.index?t.index:0),v=(c=super.accumulatePeriodPoints(s,x,l))/s,c=0,D=s;Dt)return[e[o-3],0!==s.prevLevel3?i(s.level3-s.prevLevel3)/s.prevLevel3*100:null]}}return a.defaultOptions=o(s.defaultOptions),e.registerSeriesType("trix",a),a}),s(t,"Stock/Indicators/APO/APOIndicator.js",[t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,t){let{ema:s}=e.seriesTypes,{extend:i,merge:o,error:a}=t;class r extends s{getValues(e,t){let s,i;let o=t.periods,r=t.index,n=[],l=[],p=[];if(2!==o.length||o[1]<=o[0]){a('Error: "APO requires two periods. Notice, first period should be lower than the second one."');return}let u=super.getValues.call(this,e,{index:r,period:o[0]}),h=super.getValues.call(this,e,{index:r,period:o[1]});if(!u||!h)return;let d=o[1]-o[0];for(i=0;i=0&&u<=1&&h>=0&&h<=1)return{plotX:e.plotX+h*o,plotY:e.plotY+h*a}}}(u.senkouSpanA[e-1],u.senkouSpanA[e],u.senkouSpanB[e-1],u.senkouSpanB[e]);if(t){let s={plotX:t.plotX,plotY:t.plotY,isNull:!1,intersectPoint:!0};u.senkouSpanA.splice(e,0,s),u.senkouSpanB.splice(e,0,s),c.push(e)}}}if(d(u,(t,o)=>{i[o]&&"senkouSpan"!==o&&(e.points=p[v],e.options=h(i[o].styles,n),e.graph=e["graph"+o],e.fillGraph=!1,e.color=a,s.seriesTypes.sma.prototype.drawGraph.call(e),e["graph"+o]=e.graph),v++}),e.graphCollection)for(let t of e.graphCollection)e[t].destroy(),delete e[t];if(e.graphCollection=[],f&&u.senkouSpanA[0]&&u.senkouSpanB[0]){for(c.unshift(0),c.push(u.senkouSpanA.length-1),O=0;O=1){let e=Math.floor(k.length/2);if(k[e].plotY===j[e].plotY){for(R=0,b=0,M=0;RM?0:1]=D[V].concat(k),x[V]=x[V].concat(j)}else D[V=k[e].plotY>j[e].plotY?0:1]=D[V].concat(k),x[V]=x[V].concat(j)}else D[V=k[0].plotY>j[0].plotY?0:1]=D[V].concat(k),x[V]=x[V].concat(j);["graphsenkouSpanColor","graphsenkouSpanNegativeColor"].forEach(function(t,s){D[s].length&&x[s].length&&(L=0===s?m:f,g({indicator:e,points:D[s],nextPoints:x[s],color:L,options:i,gap:n,graph:e[t]}),e[t]=e.graph,e.graphCollection.push(t))})}else g({indicator:e,points:u.senkouSpanB,nextPoints:u.senkouSpanA,color:m,options:i,gap:n,graph:e.graphsenkouSpan}),e.graphsenkouSpan=e.graph;delete e.nextPoints,delete e.fillGraph,e.points=t,e.options=i,e.graph=o,e.color=a}getGraphPath(e){let t=[],i,o=[];if(e=e||this.points,this.fillGraph&&this.nextPoints){if((i=s.seriesTypes.sma.prototype.getGraphPath.call(this,this.nextPoints))&&i.length){i[0][0]="L",t=s.seriesTypes.sma.prototype.getGraphPath.call(this,e),o=i.slice(0,t.length);for(let e=o.length-1;e>=0;e--)t.push(o[e])}}else t=s.seriesTypes.sma.prototype.getGraphPath.apply(this,arguments);return t}getValues(e,t){let s,i,o,a,r,n,p,h,d,g;let y=t.period,m=t.periodTenkan,f=t.periodSenkouSpanB,D=e.xData,x=e.yData,S=e.xAxis,v=x&&x.length||0,C=u(S.series.map(e=>e.xData||[])),A=[],I=[];if(D.length<=y||!l(x[0])||4!==x[0].length)return;let T=D[0]-y*C;for(r=0;r=m&&(n=((i=c(x.slice(r-m,r))).high+i.low)/2),r>=y&&(d=(n+(p=((o=c(x.slice(r-y,r))).high+o.low)/2))/2),r>=f&&(g=((a=c(x.slice(r-f,r))).high+a.low)/2),h=x[r][3],s=D[r],void 0===A[r]&&(A[r]=[]),void 0===A[r+y-1]&&(A[r+y-1]=[]),A[r+y-1][0]=n,A[r+y-1][1]=p,A[r+y-1][2]=void 0,void 0===A[r+1]&&(A[r+1]=[]),A[r+1][2]=h,r<=y&&(A[r+y-1][3]=void 0,A[r+y-1][4]=void 0),void 0===A[r+2*y-2]&&(A[r+2*y-2]=[]),A[r+2*y-2][3]=d,A[r+2*y-2][4]=g,I.push(s);for(r=1;r<=y;r++)I.push(s+r*C);return{values:A,xData:I,yData:A}}}return y.defaultOptions=h(a.defaultOptions,{params:{index:void 0,period:26,periodTenkan:9,periodSenkouSpanB:52},marker:{enabled:!1},tooltip:{pointFormat:'● {series.name}
TENKAN SEN: {point.tenkanSen:.3f}
KIJUN SEN: {point.kijunSen:.3f}
CHIKOU SPAN: {point.chikouSpan:.3f}
SENKOU SPAN A: {point.senkouSpanA:.3f}
SENKOU SPAN B: {point.senkouSpanB:.3f}
'},tenkanLine:{styles:{lineWidth:1,lineColor:void 0}},kijunLine:{styles:{lineWidth:1,lineColor:void 0}},chikouLine:{styles:{lineWidth:1,lineColor:void 0}},senkouSpanA:{styles:{lineWidth:1,lineColor:void 0}},senkouSpanB:{styles:{lineWidth:1,lineColor:void 0}},senkouSpan:{styles:{fill:"rgba(255, 0, 0, 0.5)"}},dataGrouping:{approximation:"ichimoku-averages"}}),n(y.prototype,{pointArrayMap:["tenkanSen","kijunSen","chikouSpan","senkouSpanA","senkouSpanB"],pointValKey:"tenkanSen",nameComponents:["periodSenkouSpanB","period","periodTenkan"]}),e["ichimoku-averages"]=function(){let t;let s=[];return[].forEach.call(arguments,function(i,o){s.push(e.average(i)),t=!t&&void 0===s[o]}),t?void 0:s},s.registerSeriesType("ikh",y),y}),s(t,"Stock/Indicators/KeltnerChannels/KeltnerChannelsIndicator.js",[t["Stock/Indicators/MultipleLinesComposition.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,t,s){let{sma:i}=t.seriesTypes,{correctFloat:o,extend:a,merge:r}=s;class n extends i{init(){t.seriesTypes.sma.prototype.init.apply(this,arguments),this.options=r({topLine:{styles:{lineColor:this.color}},bottomLine:{styles:{lineColor:this.color}}},this.options)}getValues(e,s){let i,a,r,n,l,p,u;let h=s.period,d=s.periodATR,c=s.multiplierATR,g=s.index,y=e.yData,m=y?y.length:0,f=[],D=t.seriesTypes.ema.prototype.getValues(e,{period:h,index:g}),x=t.seriesTypes.atr.prototype.getValues(e,{period:d}),S=[],v=[];if(!(m● {series.name}
Upper Channel: {point.top}
EMA({series.options.params.period}): {point.middle}
Lower Channel: {point.bottom}
'},marker:{enabled:!1},dataGrouping:{approximation:"averages"},lineWidth:1}),a(n.prototype,{nameBase:"Keltner Channels",areaLinesNames:["top","bottom"],nameComponents:["period","periodATR","multiplierATR"],linesApiNames:["topLine","bottomLine"],pointArrayMap:["top","middle","bottom"],pointValKey:"middle"}),e.compose(n),t.registerSeriesType("keltnerchannels",n),n}),s(t,"Stock/Indicators/Klinger/KlingerIndicator.js",[t["Stock/Indicators/MultipleLinesComposition.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,t,s){let{ema:i,sma:o}=t.seriesTypes,{correctFloat:a,error:r,extend:n,isArray:l,merge:p}=s;class u extends o{calculateTrend(e,t){return e[t][1]+e[t][2]+e[t][3]>e[t-1][1]+e[t-1][2]+e[t-1][3]?1:-1}isValidData(e){let t=this.chart,s=this.options,i=this.linkedParent,o=l(e)&&4===e.length,a=this.volumeSeries||(this.volumeSeries=t.get(s.params.volumeSeriesID));return a||r("Series "+s.params.volumeSeriesID+" not found! Check `volumeSeriesID`.",!0,i.chart),!!([i,a].every(function(e){return e&&e.xData&&e.xData.length>=s.params.slowAvgPeriod})&&o)}getCM(e,t,s,i,o){return a(t+(s===i?e:o))}getDM(e,t){return a(e-t)}getVolumeForce(e){let t=[],s=0,i,o=1,a=0,r=e[0][1]-e[0][2],n=0,l;for(;o=t.fastAvgPeriod&&(c=h=this.getEMA(m,c,f,x,0,u,i)[1]),u>=t.slowAvgPeriod&&(g=d=this.getEMA(m,g,D,S,0,u,i)[1],l.push(p=a(h-d)),l.length>=t.signalPeriod&&(y=l.slice(-t.signalPeriod).reduce((e,t)=>e+t)/t.signalPeriod),s.push([i[u],p,y]),r.push(i[u]),n.push([p,y]));return{values:s,xData:r,yData:n}}}return u.defaultOptions=p(o.defaultOptions,{params:{fastAvgPeriod:34,slowAvgPeriod:55,signalPeriod:13,volumeSeriesID:"volume"},signalLine:{styles:{lineWidth:1,lineColor:"#ff0000"}},dataGrouping:{approximation:"averages"},tooltip:{pointFormat:'● {series.name}
Klinger: {point.y}
Signal: {point.signal}
'}}),n(u.prototype,{areaLinesNames:[],linesApiNames:["signalLine"],nameBase:"Klinger",nameComponents:["fastAvgPeriod","slowAvgPeriod"],pointArrayMap:["y","signal"],parallelArrays:["x","y","signal"],pointValKey:"y"}),e.compose(u),t.registerSeriesType("klinger",u),u}),s(t,"Stock/Indicators/MACD/MACDIndicator.js",[t["Core/Globals.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,t,s){let{noop:i}=e,{column:o,sma:a}=t.seriesTypes,{extend:r,correctFloat:n,defined:l,merge:p}=s;class u extends a{init(){t.seriesTypes.sma.prototype.init.apply(this,arguments);let e=this.color;this.options&&(l(this.colorIndex)&&(this.options.signalLine&&this.options.signalLine.styles&&!this.options.signalLine.styles.lineColor&&(this.options.colorIndex=this.colorIndex+1,this.getCyclic("color",void 0,this.chart.options.colors),this.options.signalLine.styles.lineColor=this.color),this.options.macdLine&&this.options.macdLine.styles&&!this.options.macdLine.styles.lineColor&&(this.options.colorIndex=this.colorIndex+1,this.getCyclic("color",void 0,this.chart.options.colors),this.options.macdLine.styles.lineColor=this.color)),this.macdZones={zones:this.options.macdLine.zones,startIndex:0},this.signalZones={zones:this.macdZones.zones.concat(this.options.signalLine.zones),startIndex:this.macdZones.zones.length}),this.color=e}toYData(e){return[e.y,e.signal,e.MACD]}translate(){let t=this,s=["plotSignal","plotMACD"];e.seriesTypes.column.prototype.translate.apply(t),t.points.forEach(function(e){[e.signal,e.MACD].forEach(function(i,o){null!==i&&(e[s[o]]=t.yAxis.toPixels(i,!0))})})}destroy(){this.graph=null,this.graphmacd=this.graphmacd&&this.graphmacd.destroy(),this.graphsignal=this.graphsignal&&this.graphsignal.destroy(),t.seriesTypes.sma.prototype.destroy.apply(this,arguments)}drawGraph(){let e=this,s=e.points,i=e.options,o=e.zones,a={options:{gapSize:i.gapSize}},r=[[],[]],n,u=s.length;for(;u--;)l((n=s[u]).plotMACD)&&r[0].push({plotX:n.plotX,plotY:n.plotMACD,isNull:!l(n.plotMACD)}),l(n.plotSignal)&&r[1].push({plotX:n.plotX,plotY:n.plotSignal,isNull:!l(n.plotMACD)});["macd","signal"].forEach((s,o)=>{e.points=r[o],e.options=p(i[`${s}Line`]?.styles||{},a),e.graph=e[`graph${s}`],e.zones=(e[`${s}Zones`].zones||[]).slice(e[`${s}Zones`].startIndex||0),t.seriesTypes.sma.prototype.drawGraph.call(e),e[`graph${s}`]=e.graph}),e.points=s,e.options=i,e.zones=o}applyZones(){let e=this.zones;this.zones=this.signalZones.zones,t.seriesTypes.sma.prototype.applyZones.call(this),this.graphmacd&&this.options.macdLine.zones.length&&this.graphmacd.hide(),this.zones=e}getValues(e,s){let i=s.longPeriod-s.shortPeriod,o=[],a=[],r=[],p,u,h,d=0,c=[];if(!(e.xData.length=c[0][0]&&(o[h][2]=c[d][1],r[h]=[0,c[d][1],o[h][3]],null===o[h][3]?(o[h][1]=0,r[h][0]=0):(o[h][1]=n(o[h][3]-c[d][1]),r[h][0]=n(o[h][3]-c[d][1])),d++);return{values:o,xData:a,yData:r}}}}return u.defaultOptions=p(a.defaultOptions,{params:{shortPeriod:12,longPeriod:26,signalPeriod:9,period:26},signalLine:{zones:[],styles:{lineWidth:1,lineColor:void 0}},macdLine:{zones:[],styles:{lineWidth:1,lineColor:void 0}},threshold:0,groupPadding:.1,pointPadding:.1,crisp:!1,states:{hover:{halo:{size:0}}},tooltip:{pointFormat:'● {series.name}
Value: {point.MACD}
Signal: {point.signal}
Histogram: {point.y}
'},dataGrouping:{approximation:"averages"},minPointLength:0}),r(u.prototype,{nameComponents:["longPeriod","shortPeriod","signalPeriod"],pointArrayMap:["y","signal","MACD"],parallelArrays:["x","y","signal","MACD"],pointValKey:"y",markerAttribs:i,getColumnMetrics:e.seriesTypes.column.prototype.getColumnMetrics,crispCol:e.seriesTypes.column.prototype.crispCol,drawPoints:e.seriesTypes.column.prototype.drawPoints}),t.registerSeriesType("macd",u),u}),s(t,"Stock/Indicators/MFI/MFIIndicator.js",[t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,t){let{sma:s}=e.seriesTypes,{extend:i,merge:o,error:a,isArray:r}=t;function n(e){return e.reduce(function(e,t){return e+t})}function l(e){return(e[1]+e[2]+e[3])/3}class p extends s{getValues(e,t){let s=t.period,i=e.xData,o=e.yData,p=o?o.length:0,u=t.decimals,h=e.chart.get(t.volumeSeriesID),d=h&&h.yData,c=[],g=[],y=[],m=[],f=[],D,x,S,v,C,A,I=!1,T=1;if(!h){a("Series "+t.volumeSeriesID+" not found! Check `volumeSeriesID`.",!0,e.chart);return}if(!(i.length<=s)&&r(o[0])&&4===o[0].length&&d){for(D=l(o[T]);T=x,S=D*d[T],m.push(I?S:0),f.push(I?0:S),T++;for(A=T-1;AT-1&&(m.shift(),f.shift(),x=D,I=(D=l(o[A]))>x,S=D*d[A],m.push(I?S:0),f.push(I?0:S)),v=n(f),C=parseFloat((100-100/(1+n(m)/v)).toFixed(u)),c.push([i[A],C]),g.push(i[A]),y.push(C);return{values:c,xData:g,yData:y}}}}return p.defaultOptions=o(s.defaultOptions,{params:{index:void 0,volumeSeriesID:"volume",decimals:4}}),i(p.prototype,{nameBase:"Money Flow Index"}),e.registerSeriesType("mfi",p),p}),s(t,"Stock/Indicators/Momentum/MomentumIndicator.js",[t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,t){let{sma:s}=e.seriesTypes,{extend:i,isArray:o,merge:a}=t;function r(e,t,s,i,o){let a=t[s-1][o]-t[s-i-1][o];return[e[s-1],a]}class n extends s{getValues(e,t){let s,i;let a=t.period,n=t.index,l=e.xData,p=e.yData,u=p?p.length:0,h=[],d=[],c=[];if(!(l.length<=a)&&o(p[0])){for(s=a+1;sy?c+f[d]:m===y?c:c-f[d],h=[a[d],g],c=g,y=m,n.push(h),l.push(a[d]),p.push(h[1]);else{o("Series "+t.volumeSeriesID+" not found! Check `volumeSeriesID`.",!0,e.chart);return}return{values:n,xData:l,yData:p}}}return n.defaultOptions=r(s.defaultOptions,{marker:{enabled:!1},params:{index:void 0,period:void 0,volumeSeriesID:"volume"},tooltip:{valueDecimals:0}}),a(n.prototype,{nameComponents:void 0}),e.registerSeriesType("obv",n),n}),s(t,"Stock/Indicators/PivotPoints/PivotPointsPoint.js",[t["Core/Series/SeriesRegistry.js"]],function(e){let t=e.seriesTypes.sma.prototype.pointClass;function s(t,s){let i=t.series.pointArrayMap,o,a=i.length;for(e.seriesTypes.sma.prototype.pointClass.prototype[s].call(t);a--;)t[o="dataLabel"+i[a]]&&t[o].element&&t[o].destroy(),t[o]=null}return class extends t{destroyElements(){s(this,"destroyElements")}destroy(){s(this,"destroyElements")}}}),s(t,"Stock/Indicators/PivotPoints/PivotPointsIndicator.js",[t["Stock/Indicators/PivotPoints/PivotPointsPoint.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,t,s){let{sma:i}=t.seriesTypes,{merge:o,extend:a,defined:r,isArray:n}=s;class l extends i{toYData(e){return[e.P]}translate(){let e=this;super.translate.apply(e),e.points.forEach(function(t){e.pointArrayMap.forEach(function(s){r(t[s])&&(t["plot"+s]=e.yAxis.toPixels(t[s],!0))})}),e.plotEndPoint=e.xAxis.toPixels(e.endPoint,!0)}getGraphPath(e){let t=this,s=[[],[],[],[],[],[],[],[],[]],i=t.pointArrayMap.length,o=t.plotEndPoint,a=[],n,l,p=e.length,u;for(;p--;){for(u=0,l=e[p];u{a=a.concat(super.getGraphPath.call(t,e))}),a}drawDataLabels(){let e,t,s,i;let o=this,a=o.pointArrayMap;o.options.dataLabels.enabled&&(t=o.points.length,a.concat([!1]).forEach((r,n)=>{for(i=t;i--;)s=o.points[i],r?(s.y=s[r],s.pivotLine=r,s.plotY=s["plot"+r],e=s["dataLabel"+r],n&&(s["dataLabel"+a[n-1]]=s.dataLabel),s.dataLabels||(s.dataLabels=[]),s.dataLabels[0]=s.dataLabel=e=e&&e.element?e:null):s["dataLabel"+a[n-1]]=s.dataLabel;super.drawDataLabels.call(o)}))}getValues(e,t){let s,i,o,a,r,l,p;let u=t.period,h=e.xData,d=e.yData,c=d?d.length:0,g=this[t.algorithm+"Placement"],y=[],m=[],f=[];if(!(h.length[Math.min(e[0],i[t]),Math.max(e[1],i[s])],[Number.MAX_VALUE,-Number.MAX_VALUE])}}}),s(t,"Stock/Indicators/PC/PCIndicator.js",[t["Stock/Indicators/ArrayUtilities.js"],t["Stock/Indicators/MultipleLinesComposition.js"],t["Core/Color/Palettes.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,t,s,i,o){let{sma:a}=i.seriesTypes,{merge:r,extend:n}=o;class l extends a{getValues(t,s){let i,o,a,r,n,l,p;let u=s.period,h=t.xData,d=t.yData,c=d?d.length:0,g=[],y=[],m=[];if(!(c● {series.name}
Top: {point.top}
Middle: {point.middle}
Bottom: {point.bottom}
'},params:{period:20,topBand:.1,bottomBand:.1},bottomLine:{styles:{lineWidth:1,lineColor:void 0}},topLine:{styles:{lineWidth:1}},dataGrouping:{approximation:"averages"}}),o(n.prototype,{areaLinesNames:["top","bottom"],linesApiNames:["topLine","bottomLine"],nameComponents:["period","topBand","bottomBand"],nameBase:"Price envelopes",pointArrayMap:["top","middle","bottom"],parallelArrays:["x","y","top","bottom"],pointValKey:"middle"}),e.compose(n),t.registerSeriesType("priceenvelopes",n),n}),s(t,"Stock/Indicators/PSAR/PSARIndicator.js",[t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,t){let{sma:s}=e.seriesTypes,{merge:i}=t;function o(e,t){return parseFloat(e.toFixed(t))}class a extends s{constructor(){super(...arguments),this.nameComponents=void 0}getValues(e,t){let s=e.xData,i=e.yData,a=t.maxAccelerationFactor,r=t.increment,n=t.initialAccelerationFactor,l=t.decimals,p=t.index,u=[],h=[],d=[],c=t.initialAccelerationFactor,g,y=i[0][1],m,f,D,x=1,S,v,C,A,I=i[0][2],T,P,k,j;if(!(p>=i.length)){for(j=0;j
I?1:-1,m=y-I,f=(c=t.initialAccelerationFactor)*m,u.push([s[p],I]),h.push(s[p]),d.push(o(I,l)),j=p+1;jMath.max(A,C)?E+w:Math.max(A,C):B,b=g,M=y,T=1===b?P>M?P:M:kV||-1===L&&P>V?1:-1,N=g,G=y,W=c,f=(c=U===N?1===U&&T>G||-1===U&&Te[g]));y0?d+=f:c+=Math.abs(f),y++;for(D=a(d/(s-1),l),x=a(c/(s-1),l),S=y;S0?(d=f,c=0):(d=0,c=Math.abs(f)),D=a((D*(s-1)+d)/s,l),m=0===(x=a((x*(s-1)+c)/s,l))?100:0===D?0:a(100-100/(1+D/x),l),p.push([o[S],m]),u.push(o[S]),h.push(m);return{values:p,xData:u,yData:h}}}}return r.defaultOptions=o(s.defaultOptions,{params:{decimals:4,index:3}}),e.registerSeriesType("rsi",r),r}),s(t,"Stock/Indicators/Stochastic/StochasticIndicator.js",[t["Stock/Indicators/ArrayUtilities.js"],t["Stock/Indicators/MultipleLinesComposition.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,t,s,i){let{sma:o}=s.seriesTypes,{extend:a,isArray:r,merge:n}=i;class l extends o{init(){super.init.apply(this,arguments),this.options=n({smoothedLine:{styles:{lineColor:this.color}}},this.options)}getValues(t,s){let i=s.periods[0],o=s.periods[1],a=t.xData,n=t.yData,l=n?n.length:0,p=[],u=[],h=[],d,c,g,y=null,m,f;if(l=x+(i-1)+(o-1)&&(y=super.getValues({xData:u.slice(-o),yData:h.slice(-o)},{period:o}).yData[0]),p.push([a[f],g,y]),h[t-1][1]=y}return{values:p,xData:u,yData:h}}}return l.defaultOptions=n(o.defaultOptions,{params:{index:void 0,period:void 0,periods:[14,3]},marker:{enabled:!1},tooltip:{pointFormat:'● {series.name}
%K: {point.y}
%D: {point.smoothed}
'},smoothedLine:{styles:{lineWidth:1,lineColor:void 0}},dataGrouping:{approximation:"averages"}}),a(l.prototype,{areaLinesNames:[],nameComponents:["periods"],nameBase:"Stochastic",pointArrayMap:["y","smoothed"],parallelArrays:["x","y","smoothed"],pointValKey:"y",linesApiNames:["smoothedLine"]}),t.compose(l),s.registerSeriesType("stochastic",l),l}),s(t,"Stock/Indicators/SlowStochastic/SlowStochasticIndicator.js",[t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,t){let{sma:s,stochastic:i}=e.seriesTypes,{extend:o,merge:a}=t;class r extends i{getValues(e,t){let i=t.periods,o=super.getValues.call(this,e,t),a={values:[],xData:[],yData:[]};if(!o)return;a.xData=o.xData.slice(i[1]-1);let r=o.yData.slice(i[1]-1),n=s.prototype.getValues.call(this,{xData:a.xData,yData:r},{index:1,period:i[2]});if(n){for(let e=0,t=a.xData.length;e{if(e.options){let t=e.options,s=e.linkedParent.options;t.cropThreshold=s.cropThreshold-(t.params.period-1)}t()},{order:1})}drawGraph(){let e=this,t=e.options,s=e.linkedParent,o=s?s.points:[],a=e.points,r=e.graph,n=o.length-a.length,h=n>0?n:0,d={options:{gapSize:t.gapSize}},c={top:[],bottom:[],intersect:[]},g={top:{styles:{lineWidth:t.lineWidth,lineColor:t.fallingTrendColor||t.color,dashStyle:t.dashStyle}},bottom:{styles:{lineWidth:t.lineWidth,lineColor:t.risingTrendColor||t.color,dashStyle:t.dashStyle}},intersect:t.changeTrendLine},y,m,f,D,x,S,v,C,A,I=a.length;for(;I--;)y=a[I],m=a[I-1],f=o[I-1+h],D=o[I-2+h],x=o[I+h],S=o[I+h+1],v=y.options.color,C={x:y.x,plotX:y.plotX,plotY:y.plotY,isNull:!1},!D&&f&&s.yData[f.index-1]&&(D=u(s,f.index-1,3)),!S&&x&&s.yData[x.index+1]&&(S=u(s,x.index+1,3)),!f&&D&&s.yData[D.index+1]?f=u(s,D.index+1,3):!f&&x&&s.yData[x.index-1]&&(f=u(s,x.index-1,3)),y&&f&&x&&D&&y.x!==f.x&&(y.x===x.x?(D=f,f=x):y.x===D.x?(f=D,D={close:s.yData[f.index-1][3],x:s.xData[f.index-1]}):S&&y.x===S.x&&(f=S,D=x)),m&&D&&f?(A={x:m.x,plotX:m.plotX,plotY:m.plotY,isNull:!1},y.y>=f.close&&m.y>=D.close?(y.color=v||t.fallingTrendColor||t.color,c.top.push(C)):y.y=f.close&&m.y=D.close&&(y.color=v||t.risingTrendColor||t.color,m.color=v||t.fallingTrendColor||t.color,c.bottom.push(C),c.bottom.push(l(A,{isNull:!0}))))):f&&(y.y>=f.close?(y.color=v||t.fallingTrendColor||t.color,c.top.push(C)):(y.color=v||t.risingTrendColor||t.color,c.bottom.push(C)));p(c,function(t,s){e.points=t,e.options=l(g[s].styles,d),e.graph=e["graph"+s+"Line"],i.prototype.drawGraph.call(e),e["graph"+s+"Line"]=e.graph}),e.points=a,e.options=t,e.graph=r}getValues(e,t){let i=t.period,o=t.multiplier,n=e.xData,l=e.yData,p=[],u=[],h=[],d=0===i?0:i-1,c=[],g=[],y=[],m,f,D,x,S,v,C,A,I;if(!(n.length<=i)&&r(l[0])&&4===l[0].length&&!(i<0)){for(I=0,y=s.prototype.getValues.call(this,e,{period:i}).yData;Ix?c[I]=m:c[I]=x,f>S||C[3]c[I]||v===S&&A[3]>g[I])&&(D=g[I]),p.push([n[d+I],D]),u.push(n[d+I]),h.push(D);return{values:p,xData:u,yData:h}}}}return h.defaultOptions=l(i.defaultOptions,{params:{index:void 0,multiplier:3,period:10},risingTrendColor:"#06b535",fallingTrendColor:"#f21313",changeTrendLine:{styles:{lineWidth:1,lineColor:"#333333",dashStyle:"LongDash"}}}),n(h.prototype,{nameBase:"Supertrend",nameComponents:["multiplier","period"]}),e.registerSeriesType("supertrend",h),h}),s(t,"Stock/Indicators/VBP/VBPPoint.js",[t["Core/Series/SeriesRegistry.js"]],function(e){let{sma:{prototype:{pointClass:t}}}=e.seriesTypes;return class extends t{destroy(){this.negativeGraphic&&(this.negativeGraphic=this.negativeGraphic.destroy()),super.destroy.apply(this,arguments)}}}),s(t,"Stock/Indicators/VBP/VBPIndicator.js",[t["Stock/Indicators/VBP/VBPPoint.js"],t["Core/Animation/AnimationUtilities.js"],t["Core/Globals.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,t,s,i,o){let{animObject:a}=t,{noop:r}=s,{column:{prototype:n},sma:l}=i.seriesTypes,{addEvent:p,arrayMax:u,arrayMin:h,correctFloat:d,defined:c,error:g,extend:y,isArray:m,merge:f}=o,D=Math.abs;class x extends l{init(e,t){let s=this;delete t.data,super.init.apply(s,arguments);let i=p(this.chart.constructor,"afterLinkSeries",function(){if(s.options){let t=s.options.params,i=s.linkedParent,o=e.get(t.volumeSeriesID);s.addCustomEvents(i,o)}i()},{order:1});return s}addCustomEvents(e,t){let s=this,i=()=>{s.chart.redraw(),s.setData([]),s.zoneStarts=[],s.zoneLinesSVG&&(s.zoneLinesSVG=s.zoneLinesSVG.destroy())};return s.dataEventsToUnbind.push(p(e,"remove",function(){i()})),t&&s.dataEventsToUnbind.push(p(t,"remove",function(){i()})),s}animate(e){let t=this,s=t.chart.inverted,i=t.group,o={};if(!e&&i){let e=s?t.yAxis.top:t.xAxis.left;s?(i["forceAnimate:translateY"]=!0,o.translateY=e):(i["forceAnimate:translateX"]=!0,o.translateX=e),i.animate(o,y(a(t.options.animation),{step:function(e,s){t.group.attr({scaleX:Math.max(.001,s.pos)})}}))}}drawPoints(){this.options.volumeDivision.enabled&&(this.posNegVolume(!0,!0),n.drawPoints.apply(this,arguments),this.posNegVolume(!1,!1)),n.drawPoints.apply(this,arguments)}posNegVolume(e,t){let s=t?["positive","negative"]:["negative","positive"],i=this.options.volumeDivision,o=this.points.length,a=[],r=[],n=0,l,p,u,h;for(e?(this.posWidths=a,this.negWidths=r):(a=this.posWidths,r=this.negWidths);ni&&(i=a);return{min:s,max:i}}(s),r=this.zoneStarts=[],n=[],l=a?a.min:h(s),p=a?a.max:u(s),g=0,y=1,m=this.linkedParent;if(!this.options.compareToMain&&m.dataModify&&(l=m.dataModify.modifyValue(l),p=m.dataModify.modifyValue(p)),!c(l)||!c(p))return this.points.length&&(this.setData([]),this.zoneStarts=[],this.zoneLinesSVG&&(this.zoneLinesSVG=this.zoneLinesSVG.destroy())),[];let f=this.rangeStep=d(p-l)/i;for(r.push(l);g=t.end&&t.index===c&&(n=!0),(l>t.start||r)&&(ll?t.negativeVolumeData+=d[p]:t.positiveVolumeData+=d[p])}u.volumeDataArray.push(t.wholeVolumeData)}),t}drawZones(e,t,s,i){let o=e.renderer,a=e.plotWidth,r=e.plotTop,n=this.zoneLinesSVG,l=[],p;s.forEach(function(s){p=t.toPixels(s)-r,l=l.concat(e.renderer.crispLine([["M",0,p],["L",a,p]],i.lineWidth))}),n?n.animate({d:l}):n=this.zoneLinesSVG=o.path(l).attr({"stroke-width":i.lineWidth,stroke:i.color,dashstyle:i.dashStyle,zIndex:this.group.zIndex+.1}).add(this.group)}}return x.defaultOptions=f(l.defaultOptions,{params:{index:void 0,period:void 0,ranges:12,volumeSeriesID:"volume"},zoneLines:{enabled:!0,styles:{color:"#0A9AC9",dashStyle:"LongDash",lineWidth:1}},volumeDivision:{enabled:!0,styles:{positiveColor:"rgba(144, 237, 125, 0.8)",negativeColor:"rgba(244, 91, 91, 0.8)"}},animationLimit:1e3,enableMouseTracking:!1,pointPadding:0,zIndex:-1,crisp:!0,dataGrouping:{enabled:!1},dataLabels:{allowOverlap:!0,enabled:!0,format:"P: {point.volumePos:.2f} | N: {point.volumeNeg:.2f}",padding:0,style:{fontSize:"0.5em"},verticalAlign:"top"}}),y(x.prototype,{nameBase:"Volume by Price",nameComponents:["ranges"],calculateOn:{chart:"render",xAxis:"afterSetExtremes"},pointClass:e,markerAttribs:r,drawGraph:r,getColumnMetrics:n.getColumnMetrics,crispCol:n.crispCol}),i.registerSeriesType("vbp",x),x}),s(t,"Stock/Indicators/VWAP/VWAPIndicator.js",[t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,t){let{sma:s}=e.seriesTypes,{error:i,isArray:o,merge:a}=t;class r extends s{getValues(e,t){let s=e.chart,a=e.xData,r=e.yData,n=t.period,l=!0,p;if(!(p=s.get(t.volumeSeriesID))){i("Series "+t.volumeSeriesID+" not found! Check `volumeSeriesID`.",!0,s);return}return o(r[0])||(l=!1),this.calculateVWAPValues(l,a,r,p,n)}calculateVWAPValues(e,t,s,i,o){let a,r,n,l,p,u;let h=i.yData,d=i.xData.length,c=t.length,g=[],y=[],m=[],f=[],D=[];for(p=0,a=c<=d?c:d,u=0;p=D*a.low&&(p.push([r[0],D]),g=[r[d],n[d][i]],y=!1,m=!0),m&&(u.push(p[0][0]),h.push(p[0][1]),c=d++,d=l);for(d=c;d=g[1]*a.low&&(f=i)):(n[d][i]>=g[1]&&(g=[r[d],n[d][i]]),n[d][s]<=g[1]*a.high&&(f=s)),!1!==f&&(p.push(g),u.push(g[0]),h.push(g[1]),g=[r[d],n[d][f]],y=!y,f=!1);let S=p.length;return 0!==S&&p[S-1][0]0&&(void 0===s||t●{series.name}: {point.y}\xb0
'}}),i(a.prototype,{nameBase:"Linear Regression Angle Indicator"}),e.registerSeriesType("linearRegressionAngle",a),a}),s(t,"Stock/Indicators/ABands/ABandsIndicator.js",[t["Stock/Indicators/MultipleLinesComposition.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,t,s){let{sma:i}=t.seriesTypes,{correctFloat:o,extend:a,merge:r}=s;class n extends i{getValues(e,t){let s,i,a,r,n,l,p,u,h,d,c;let g=t.period,y=t.factor,m=t.index,f=e.xData,D=e.yData,x=D?D.length:0,S=[],v=[],C=[],A=[],I=[];if(!(x=g&&(h=f.slice(c-g,c),d=D.slice(c-g,c),p=super.getValues.call(this,{xData:h,yData:S.slice(c-g,c)},{period:g}),u=super.getValues.call(this,{xData:h,yData:v.slice(c-g,c)},{period:g}),r=(l=super.getValues.call(this,{xData:h,yData:d},{period:g,index:m})).xData[0],i=p.yData[0],a=u.yData[0],s=l.yData[0],C.push([r,i,s,a]),A.push(r),I.push([i,s,a]))}return{values:C,xData:A,yData:I}}}}return n.defaultOptions=r(i.defaultOptions,{params:{period:20,factor:.001,index:3},lineWidth:1,topLine:{styles:{lineWidth:1}},bottomLine:{styles:{lineWidth:1}},dataGrouping:{approximation:"averages"}}),a(n.prototype,{areaLinesNames:["top","bottom"],linesApiNames:["topLine","bottomLine"],nameBase:"Acceleration Bands",nameComponents:["period","factor"],pointArrayMap:["top","middle","bottom"],pointValKey:"middle"}),e.compose(n),t.registerSeriesType("abands",n),n}),s(t,"Stock/Indicators/TrendLine/TrendLineIndicator.js",[t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,t){let{sma:s}=e.seriesTypes,{extend:i,merge:o,isArray:a}=t;class r extends s{constructor(){super(...arguments),this.updateAllPoints=!0}getValues(e,t){let s=e.xData,i=e.yData,o=[],r=[],n=[],l=[],p=t.index,u=0,h=0,d=0,c=0,g=0;for(let e=0;e