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