package.indicators.tema.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of highcharts Show documentation
Show all versions of highcharts Show documentation
JavaScript charting framework
The newest version!
!/**
* Highstock JS v11.4.8 (2024-08-29)
*
* Indicator series type for Highcharts Stock
*
* (c) 2010-2024 Rafal Sebestjanski
*
* 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/tema",["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 l(t,l,s,i){t.hasOwnProperty(l)||(t[l]=i.apply(null,s),"function"==typeof CustomEvent&&e.win.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:l,module:t[l]}})))}l(t,"Stock/Indicators/TEMA/TEMAIndicator.js",[t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,t){let{ema:l}=e.seriesTypes,{correctFloat:s,isArray:i,merge:r}=t;class n extends l{getEMA(e,t,l,s,i,r){return super.calculateEma(r||[],e,void 0===i?1:i,this.EMApercent,t,void 0===s?-1:s,l)}getTemaPoint(e,t,l,i){return[e[i-3],s(3*l.level1-3*l.level2+l.level3)]}getValues(e,t){let l=t.period,s=2*l,r=3*l,n=e.xData,o=e.yData,a=o?o.length:0,u=[],h=[],v=[],c=[],d=[],p={},f=-1,g=0,m=0,E,y,M,A;if(this.EMApercent=2/(l+1),!(a<3*l-2)){for(i(o[0])&&(f=t.index?t.index:0),m=(g=super.accumulatePeriodPoints(l,f,o))/l,g=0,M=l;M