/* Highstock JS v8.2.0 (2020-08-20) Indicator series type for Highstock (c) 2010-2019 Wojciech Chmiel License: www.highcharts.com/license */ (function(c){"object"===typeof module&&module.exports?(c["default"]=c,module.exports=c):"function"===typeof define&&define.amd?define("highcharts/indicators/supertrend",["highcharts","highcharts/modules/stock"],function(l){c(l);c.Highcharts=l;return c}):c("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(c){function l(c,m,B,l){c.hasOwnProperty(m)||(c[m]=l.apply(null,B))}c=c?c._modules:{};l(c,"Stock/Indicators/SupertrendIndicator.js",[c["Core/Globals.js"],c["Core/Utilities.js"]],function(c, m){function l(d,b,n){return{index:b,close:d.yData[b][n],x:d.xData[b]}}var z=m.correctFloat,v=m.merge,C=m.seriesType,D=m.isArray,E=m.objectEach,F=c.seriesTypes.atr,A=c.seriesTypes.sma;C("supertrend","sma",{params:{multiplier:3,period:10},risingTrendColor:"#06B535",fallingTrendColor:"#F21313",changeTrendLine:{styles:{lineWidth:1,lineColor:"#333333",dashStyle:"LongDash"}}},{nameBase:"Supertrend",nameComponents:["multiplier","period"],requiredIndicators:["atr"],init:function(){A.prototype.init.apply(this, arguments);var d=this.options;d.cropThreshold=this.linkedParent.options.cropThreshold-(d.params.period-1)},drawGraph:function(){var d=this,b=d.options,n=d.linkedParent,c=n?n.points:[],y=d.points,m=d.graph,t=y.length,u=c.length-t;u=0=e.close&&h.y>=f.close?(a.color=q||b.fallingTrendColor||b.color,k.top.push(r)):a.y=e.close&&h.y=f.close&&(a.color=q||b.risingTrendColor|| b.color,h.color=q||b.fallingTrendColor||b.color,k.bottom.push(r),k.bottom.push(v(g,{isNull:!0}))))):e&&(a.y>=e.close?(a.color=q||b.fallingTrendColor||b.color,k.top.push(r)):(a.color=q||b.risingTrendColor||b.color,k.bottom.push(r)));E(k,function(a,b){d.points=a;d.options=v(w[b].styles,x);d.graph=d["graph"+b+"Line"];A.prototype.drawGraph.call(d);d["graph"+b+"Line"]=d.graph});d.points=y;d.options=b;d.graph=m},getValues:function(d,b){var c=b.period;b=b.multiplier;var l=d.xData,m=d.yData,v=[],t=[],u=[], x=0===c?0:c-1,k=[],w=[],a;if(!(l.length<=c||!D(m[0])||4!==m[0].length||0>c)){d=F.prototype.getValues.call(this,d,{period:c}).yData;for(a=0;af?c:f;w[a]=q>g||e[3]k[a]||p===g&&h[3]>w[a])r=w[a];v.push([l[x+a],r]);t.push(l[x+a]);u.push(r)}return{values:v,xData:t, yData:u}}}});""});l(c,"masters/indicators/supertrend.src.js",[],function(){})}); //# sourceMappingURL=supertrend.js.map