Hacked By AnonymousFox
!/**
* Highstock JS v12.1.2 (2025-01-09)
* @module highcharts/indicators/supertrend
* @requires highcharts
* @requires highcharts/modules/stock
*
* Indicator series type for Highcharts Stock
*
* (c) 2010-2024 Wojciech Chmiel
*
* License: www.highcharts.com/license
*/function(o,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("highcharts"),require("highcharts").SeriesRegistry):"function"==typeof define&&define.amd?define("highcharts/indicators/supertrend",[["highcharts/highcharts"],["highcharts/highcharts","SeriesRegistry"]],t):"object"==typeof exports?exports["highcharts/indicators/supertrend"]=t(require("highcharts"),require("highcharts").SeriesRegistry):o.Highcharts=t(o.Highcharts,o.Highcharts.SeriesRegistry)}(this,function(o,t){return function(){"use strict";var e,r={512:function(o){o.exports=t},944:function(t){t.exports=o}},n={};function i(o){var t=n[o];if(void 0!==t)return t.exports;var e=n[o]={exports:{}};return r[o](e,e.exports,i),e.exports}i.n=function(o){var t=o&&o.__esModule?function(){return o.default}:function(){return o};return i.d(t,{a:t}),t},i.d=function(o,t){for(var e in t)i.o(t,e)&&!i.o(o,e)&&Object.defineProperty(o,e,{enumerable:!0,get:t[e]})},i.o=function(o,t){return Object.prototype.hasOwnProperty.call(o,t)};var s={};i.d(s,{default:function(){return _}});var l=i(944),p=i.n(l),a=i(512),c=i.n(a),h=(e=function(o,t){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(o,t){o.__proto__=t}||function(o,t){for(var e in t)t.hasOwnProperty(e)&&(o[e]=t[e])})(o,t)},function(o,t){function r(){this.constructor=o}e(o,t),o.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),u=c().seriesTypes,d=u.atr,f=u.sma,g=p().addEvent,y=p().correctFloat,x=p().isArray,m=p().isNumber,C=p().extend,v=p().merge,T=p().objectEach;function b(o,t){return{index:t,close:o.getColumn("close")[t],x:o.getColumn("x")[t]}}var S=function(o){function t(){return null!==o&&o.apply(this,arguments)||this}return h(t,o),t.prototype.init=function(){var t=this;o.prototype.init.apply(t,arguments);var e=g(this.chart.constructor,"afterLinkSeries",function(){if(t.options){var o=t.options,r=t.linkedParent.options;o.cropThreshold=r.cropThreshold-(o.params.period-1)}e()},{order:1})},t.prototype.drawGraph=function(){for(var o,t,e,r,n,i,s,l,p,a=this,c=a.options,h=a.linkedParent,u=h.getColumn("x"),d=h?h.points:[],g=a.points,y=a.graph,x=d.length-g.length,C=x>0?x:0,S={options:{gapSize:c.gapSize}},_={top:[],bottom:[],intersect:[]},O={top:{styles:{lineWidth:c.lineWidth,lineColor:c.fallingTrendColor||c.color,dashStyle:c.dashStyle}},bottom:{styles:{lineWidth:c.lineWidth,lineColor:c.risingTrendColor||c.color,dashStyle:c.dashStyle}},intersect:c.changeTrendLine},j=g.length;j--;)o=g[j],t=g[j-1],e=d[j-1+C],r=d[j-2+C],n=d[j+C],i=d[j+C+1],s=o.options.color,l={x:o.x,plotX:o.plotX,plotY:o.plotY,isNull:!1},!r&&e&&m(u[e.index-1])&&(r=b(h,e.index-1)),!i&&n&&m(u[n.index+1])&&(i=b(h,n.index+1)),!e&&r&&m(u[r.index+1])?e=b(h,r.index+1):!e&&n&&m(u[n.index-1])&&(e=b(h,n.index-1)),o&&e&&n&&r&&o.x!==e.x&&(o.x===n.x?(r=e,e=n):o.x===r.x?(e=r,r={close:h.getColumn("close")[e.index-1],x:u[e.index-1]}):i&&o.x===i.x&&(e=i,r=n)),t&&r&&e?(p={x:t.x,plotX:t.plotX,plotY:t.plotY,isNull:!1},o.y>=e.close&&t.y>=r.close?(o.color=s||c.fallingTrendColor||c.color,_.top.push(l)):o.y<e.close&&t.y<r.close?(o.color=s||c.risingTrendColor||c.color,_.bottom.push(l)):(_.intersect.push(l),_.intersect.push(p),_.intersect.push(v(p,{isNull:!0})),o.y>=e.close&&t.y<r.close?(o.color=s||c.fallingTrendColor||c.color,t.color=s||c.risingTrendColor||c.color,_.top.push(l),_.top.push(v(p,{isNull:!0}))):o.y<e.close&&t.y>=r.close&&(o.color=s||c.risingTrendColor||c.color,t.color=s||c.fallingTrendColor||c.color,_.bottom.push(l),_.bottom.push(v(p,{isNull:!0}))))):e&&(o.y>=e.close?(o.color=s||c.fallingTrendColor||c.color,_.top.push(l)):(o.color=s||c.risingTrendColor||c.color,_.bottom.push(l)));T(_,function(o,t){a.points=o,a.options=v(O[t].styles,S),a.graph=a["graph"+t+"Line"],f.prototype.drawGraph.call(a),a["graph"+t+"Line"]=a.graph}),a.points=g,a.options=c,a.graph=y},t.prototype.getValues=function(o,t){var e,r,n,i,s,l,p,a,c,h=t.period,u=t.multiplier,f=o.xData,g=o.yData,m=[],C=[],v=[],T=0===h?0:h-1,b=[],S=[],_=[];if(!(f.length<=h)&&x(g[0])&&4===g[0].length&&!(h<0)){for(c=0,_=d.prototype.getValues.call(this,o,{period:h}).yData;c<_.length;c++)a=g[T+c],p=g[T+c-1]||[],i=b[c-1],s=S[c-1],l=v[c-1],0===c&&(i=s=l=0),e=y((a[1]+a[2])/2+u*_[c]),r=y((a[1]+a[2])/2-u*_[c]),e<i||p[3]>i?b[c]=e:b[c]=i,r>s||p[3]<s?S[c]=r:S[c]=s,l===i&&a[3]<b[c]||l===s&&a[3]<S[c]?n=b[c]:(l===i&&a[3]>b[c]||l===s&&a[3]>S[c])&&(n=S[c]),m.push([f[T+c],n]),C.push(f[T+c]),v.push(n);return{values:m,xData:C,yData:v}}},t.defaultOptions=v(f.defaultOptions,{params:{index:void 0,multiplier:3,period:10},risingTrendColor:"#06b535",fallingTrendColor:"#f21313",changeTrendLine:{styles:{lineWidth:1,lineColor:"#333333",dashStyle:"LongDash"}}}),t}(f);C(S.prototype,{nameBase:"Supertrend",nameComponents:["multiplier","period"]}),c().registerSeriesType("supertrend",S);var _=p();return s.default}()});
Hacked By AnonymousFox1.0, Coded By AnonymousFox