/** * Highstock JS v11.2.0 (2023-10-30) * * (c) 2010-2021 Highsoft AS * Author: Sebastian Domas * * License: www.highcharts.com/license */!function(t){"object"==typeof module&&module.exports?(t.default=t,module.exports=t):"function"==typeof define&&define.amd?define("highcharts/indicators/cmf",["highcharts","highcharts/modules/stock"],function(e){return t(e),t.Highcharts=e,t}):t("undefined"!=typeof Highcharts?Highcharts:void 0)}(function(t){"use strict";var e=t?t._modules:{};function o(t,e,o,n){t.hasOwnProperty(e)||(t[e]=n.apply(null,o),"function"==typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:e,module:t[e]}})))}o(e,"Stock/Indicators/CMF/CMFIndicator.js",[e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e){var o,n=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=t.seriesTypes.sma,r=e.merge,s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.data=void 0,e.options=void 0,e.points=void 0,e.volumeSeries=void 0,e.linkedParent=void 0,e.yData=void 0,e.nameBase="Chaikin Money Flow",e}return n(e,t),e.prototype.isValid=function(){var t=this.chart,e=this.options,o=this.linkedParent,n=this.volumeSeries||(this.volumeSeries=t.get(e.params.volumeSeriesID)),i=o&&o.yData&&4===o.yData[0].length;function r(t){return t.xData&&t.xData.length>=e.params.period}return!!(o&&n&&r(o)&&r(n)&&i)},e.prototype.getValues=function(t,e){if(this.isValid())return this.getMoneyFlow(t.xData,t.yData,this.volumeSeries.yData,e.period)},e.prototype.getMoneyFlow=function(t,e,o,n){var i,r,s=e.length,a=[],u=[],l=[],c=[],p=-1,h=0,f=0;function d(t,e){var o=t[1],n=t[2],r=t[3];return null!==e&&null!==o&&null!==n&&null!==r&&o!==n?(r-n-(o-r))/(o-n)*e:(p=i,null)}if(n>0&&n<=s){for(i=0;i=n&&0!==h?f/h:null),c.push([u[0],l[0]]);i=n?f/h:null],u.push(r[0]),l.push(r[1]),c.push([r[0],r[1]])}return{values:c,xData:u,yData:l}},e.defaultOptions=r(i.defaultOptions,{params:{index:void 0,volumeSeriesID:"volume"}}),e}(i);return t.registerSeriesType("cmf",s),s}),o(e,"masters/indicators/cmf.src.js",[],function(){})});//# sourceMappingURL=cmf.js.map