UNPKG

technicalindicators

Version:
1 lines 79.3 kB
(function(e){"use strict";function t(e){return oe[e]}function r(e){var r=t("precision");return r?parseFloat(e.toPrecision(r)):e}function o(e){ae.reverseInputs(e);var t=new se(e).result;return e.reversedInput&&t.reverse(),ae.reverseInputs(e),t}function l(e){ae.reverseInputs(e);var t=new ue(e).result;return e.reversedInput&&t.reverse(),ae.reverseInputs(e),t}function a(e){ae.reverseInputs(e);var t=new pe(e).result;return e.reversedInput&&t.reverse(),ae.reverseInputs(e),t}function n(e){ae.reverseInputs(e);var t=new ie(e).result;return e.reversedInput&&t.reverse(),ae.reverseInputs(e),t}function s(e){ae.reverseInputs(e);var t=new ge(e).result;return e.reversedInput&&t.reverse(),ae.reverseInputs(e),t}function u(e){ae.reverseInputs(e);var t=new ce(e).result;return e.reversedInput&&t.reverse(),ae.reverseInputs(e),t}function p(e){ae.reverseInputs(e);var t=new de(e).result;return e.reversedInput&&t.reverse(),ae.reverseInputs(e),t}function i(e){ae.reverseInputs(e);var t=new me(e).result;return e.reversedInput&&t.reverse(),ae.reverseInputs(e),t}function h(e){ae.reverseInputs(e);var t=new fe(e).result;return e.reversedInput&&t.reverse(),ae.reverseInputs(e),t}function g(e){ae.reverseInputs(e);var t=new ke(e).result;return e.reversedInput&&t.reverse(),ae.reverseInputs(e),t}function v(e){ae.reverseInputs(e);var t=new Ee(e).result;return e.reversedInput&&t.reverse(),ae.reverseInputs(e),t}function c(e){ae.reverseInputs(e);var t=new Ae(e).result;return e.reversedInput&&t.reverse(),ae.reverseInputs(e),t}function _(e){ae.reverseInputs(e);var t=new ze(e).result;return e.reversedInput&&t.reverse(),ae.reverseInputs(e),t}function d(e){ae.reverseInputs(e);var t=new Te(e).result;return e.reversedInput&&t.reverse(),ae.reverseInputs(e),t}function x(e){ae.reverseInputs(e);var t=new Re(e).result;return e.reversedInput&&t.reverse(),ae.reverseInputs(e),t}function m(e){ae.reverseInputs(e);var t=new je(e).result;return e.reversedInput&&t.reverse(),ae.reverseInputs(e),t}function w(e){ae.reverseInputs(e);var t=new We(e).result;return e.reversedInput&&t.reverse(),ae.reverseInputs(e),t}function f(e){ae.reverseInputs(e);var t=new Ue(e).result;return e.reversedInput&&t.reverse(),ae.reverseInputs(e),t}function y(e){ae.reverseInputs(e);var t=new Ne(e).result;return e.reversedInput&&t.reverse(),ae.reverseInputs(e),t}function P(e){ae.reverseInputs(e);var t=new Qe(e).result;return e.reversedInput&&t.reverse(),ae.reverseInputs(e),t}function k(e){ae.reverseInputs(e);var t=new Ze(e).result;return e.reversedInput&&t.reverse(),ae.reverseInputs(e),t}function I(e){ae.reverseInputs(e);var t=new Je(e).result;return e.reversedInput&&t.reverse(),ae.reverseInputs(e),t}function O(e){ae.reverseInputs(e);var t=new tt(e).result;return e.reversedInput&&t.reverse(),ae.reverseInputs(e),t}function V(e){ae.reverseInputs(e);var t=new ot(e).result;return e.reversedInput&&t.reverse(),ae.reverseInputs(e),t}function b(e){ae.reverseInputs(e);var t=new at(e).result;return e.reversedInput&&t.reverse(),ae.reverseInputs(e),t}function C(e,t,r,o){return e<=r&&t>=r||r<=e&&o>=e}function q(e){ae.reverseInputs(e);var t=new st(e).result;return e.reversedInput&&t.reverse(),ae.reverseInputs(e),t}function E(e){ae.reverseInputs(e);var t=new ht(e).result;return e.reversedInput&&t.reverse(),ae.reverseInputs(e),t}function S(e){ae.reverseInputs(e);var t=new vt(e).result;return e.reversedInput&&t.reverse(),ae.reverseInputs(e),t}function H(e){ae.reverseInputs(e);var t=new _t(e).result;return e.reversedInput&&t.reverse(),ae.reverseInputs(e),t}function A(e){ae.reverseInputs(e);var t=new xt(e).result;return e.reversedInput&&t.reverse(),ae.reverseInputs(e),t}function L(e){ae.reverseInputs(e);var t=new wt(e).result;return e.reversedInput&&t.reverse(),ae.reverseInputs(e),t}function z(e){ae.reverseInputs(e);var t=new yt(e).result;return e.reversedInput&&(t.open.reverse(),t.high.reverse(),t.low.reverse(),t.close.reverse(),t.volume.reverse(),t.timestamp.reverse()),ae.reverseInputs(e),t}function B(e){ae.reverseInputs(e);var t=new kt(e).result;return e.reversedInput&&(t.open.reverse(),t.high.reverse(),t.low.reverse(),t.close.reverse(),t.volume.reverse(),t.timestamp.reverse()),ae.reverseInputs(e),t}function T(e){return new zt().hasPattern(e)}function M(e){return new Bt().hasPattern(e)}function R(e){return new Tt().hasPattern(e)}function D(e){return new Mt().hasPattern(e)}function j(e){ae.reverseInputs(e);var t=new hr(e).result;return e.reversedInput&&t.reverse(),ae.reverseInputs(e),t}function F(e){ae.reverseInputs(e);var t=new cr(e).result;return e.reversedInput&&t.reverse(),ae.reverseInputs(e),t}function W(e){ae.reverseInputs(e);var t=new xr(e).result;return e.reversedInput&&t.reverse(),ae.reverseInputs(e),t}function K(){return["sma","ema","wma","wema","macd","rsi","bollingerbands","adx","atr","truerange","roc","kst","psar","stochastic","williamsr","adl","obv","trix","cci","awesomeoscillator","forceindex","vwap","volumeprofile","renko","heikinashi","stochasticrsi","mfi","averagegain","averageloss","highest","lowest","sum","FixedSizeLinkedList","sd","bullish","bearish","abandonedbaby","doji","bearishengulfingpattern","bullishengulfingpattern","darkcloudcover","downsidetasukigap","dragonflydoji","gravestonedoji","bullishharami","bearishharami","bullishharamicross","bearishharamicross","eveningdojistar","eveningstar","morningdojistar","morningstar","bullishmarubozu","bearishmarubozu","piercingline","bullishspinningtop","bearishspinningtop","threeblackcrows","threewhitesoldiers","bullishhammerstick","bearishhammerstick","bullishinvertedhammerstick","bearishinvertedhammerstick","hammerpattern","hammerpatternunconfirmed","hangingman","hangingmanunconfirmed","shootingstar","shootingstarunconfirmed","tweezertop","tweezerbottom","ichimokucloud","keltnerchannels","chandelierexit"]}var U=Math.min,G=Math.max,N=Math.abs,X=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Q=function(){function e(e,t){for(var r,o=0;o<t.length;o++)r=t[o],r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}return function(t,r,o){return r&&e(t.prototype,r),o&&e(t,o),t}}(),Y=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},Z=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e},$=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)},J=function e(t,r,o){X(this,e),this.next=o,o&&(o.prev=this),this.prev=r,r&&(r.next=this),this.data=t},ee=function(){function e(){X(this,e),this._length=0}return Q(e,[{key:"push",value:function(e){this._tail=new J(e,this._tail),0===this._length&&(this._head=this._tail,this._current=this._head,this._next=this._head),this._length++}},{key:"pop",value:function(){var e=this._tail;if(0!==this._length)return(this._length--,0===this._length)?(this._head=this._tail=this._current=this._next=void 0,e.data):(this._tail=e.prev,this._tail.next=void 0,this._current===e&&(this._current=this._tail,this._next=void 0),e.data)}},{key:"shift",value:function(){var e=this._head;if(0!==this._length)return(this._length--,0===this._length)?(this._head=this._tail=this._current=this._next=void 0,e.data):(this._head=this._head.next,this._current===e&&(this._current=this._head,this._next=this._current.next),e.data)}},{key:"unshift",value:function(e){this._head=new J(e,void 0,this._head),0===this._length&&(this._tail=this._head,this._next=this._head),this._length++}},{key:"unshiftCurrent",value:function(){var e=this._current;return e===this._head||2>this._length?e&&e.data:(e===this._tail?(this._tail=e.prev,this._tail.next=void 0,this._current=this._tail):(e.next.prev=e.prev,e.prev.next=e.next,this._current=e.prev),this._next=this._current.next,e.next=this._head,e.prev=void 0,this._head.prev=e,this._head=e,e.data)}},{key:"removeCurrent",value:function(){var e=this._current;if(0!==this._length)return(this._length--,0===this._length)?(this._head=this._tail=this._current=this._next=void 0,e.data):(e===this._tail?(this._tail=e.prev,this._tail.next=void 0,this._current=this._tail):e===this._head?(this._head=e.next,this._head.prev=void 0,this._current=this._head):(e.next.prev=e.prev,e.prev.next=e.next,this._current=e.prev),this._next=this._current.next,e.data)}},{key:"resetCursor",value:function(){return this._current=this._next=this._head,this}},{key:"next",value:function(){var e=this._next;if(void 0!==e)return this._next=e.next,this._current=e,e.data}},{key:"head",get:function(){return this._head&&this._head.data}},{key:"tail",get:function(){return this._tail&&this._tail.data}},{key:"current",get:function(){return this._current&&this._current.data}},{key:"length",get:function(){return this._length}}]),e}(),te=function(e){function t(e,r,o,l){X(this,t);var a=Z(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));if(a.size=e,a.maintainHigh=r,a.maintainLow=o,a.maintainSum=l,a.totalPushed=0,a.periodHigh=0,a.periodLow=Infinity,a.periodSum=0,!e||"number"!=typeof e)throw"Size required and should be a number.";return a._push=a.push,a.push=function(e){this.add(e),this.totalPushed++},a}return Y(t,e),Q(t,[{key:"add",value:function(e){this.length===this.size?(this.lastShift=this.shift(),this._push(e),this.maintainHigh&&this.lastShift==this.periodHigh&&this.calculatePeriodHigh(),this.maintainLow&&this.lastShift==this.periodLow&&this.calculatePeriodLow(),this.maintainSum&&(this.periodSum-=this.lastShift)):this._push(e),this.maintainHigh&&this.periodHigh<=e&&(this.periodHigh=e),this.maintainLow&&this.periodLow>=e&&(this.periodLow=e),this.maintainSum&&(this.periodSum+=e)}},{key:"iterator",value:regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:this.resetCursor();case 1:if(!this.next()){e.next=6;break}return e.next=4,this.current;case 4:e.next=1;break;case 6:case"end":return e.stop();}},e,this)})},{key:"calculatePeriodHigh",value:function(){for(this.resetCursor(),this.next()&&(this.periodHigh=this.current);this.next();)this.periodHigh<=this.current&&(this.periodHigh=this.current)}},{key:"calculatePeriodLow",value:function(){for(this.resetCursor(),this.next()&&(this.periodLow=this.current);this.next();)this.periodLow>=this.current&&(this.periodLow=this.current)}}]),t}(ee),re=function e(){X(this,e),this.open=[],this.high=[],this.low=[],this.close=[],this.volume=[],this.timestamp=[]},oe={},le=function e(){X(this,e)},ae=function(){function e(t){X(this,e),this.format=t.format||r}return Q(e,[{key:"getResult",value:function(){return this.result}}],[{key:"reverseInputs",value:function(e){e.reversedInput&&(e.values?e.values.reverse():void 0,e.open?e.open.reverse():void 0,e.high?e.high.reverse():void 0,e.low?e.low.reverse():void 0,e.close?e.close.reverse():void 0,e.volume?e.volume.reverse():void 0,e.timestamp?e.timestamp.reverse():void 0)}}]),e}(),ne=function(e){function t(e,r){X(this,t);var o=Z(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return o.period=e,o.values=r,o}return Y(t,e),t}(le),se=function(e){function t(e){X(this,t);var r=Z(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));r.period=e.period,r.price=e.values;var o=regeneratorRuntime.mark(function e(t){var r,o,l,a,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=new ee,o=0,l=1,void(e.next=5);case 5:a=e.sent,r.push(0);case 7:return l<t?(l++,r.push(a),o+=a):(o=o-r.shift()+a,n=o/t,r.push(a)),e.next=11,n;case 11:a=e.sent,e.next=7;break;case 14:case"end":return e.stop();}},e,this)});return r.generator=o(r.period),r.generator.next(),r.result=[],r.price.forEach(function(e){var t=r.generator.next(e);void 0!==t.value&&r.result.push(r.format(t.value))}),r}return Y(t,e),Q(t,[{key:"nextValue",value:function(e){var t=this.generator.next(e).value;if(void 0!=t)return this.format(t)}}]),t}(ae);se.calculate=o;var ue=function(e){function t(e){X(this,t);var r,o=Z(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),l=e.period,a=e.values;o.result=[],r=new se({period:l,values:[]});var n=regeneratorRuntime.mark(function e(){var t,o;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return void(e.next=2);case 2:t=e.sent;case 3:if(void 0==o||void 0===t){e.next=11;break}return o=(t-o)*(2/(l+1))+o,e.next=8,o;case 8:t=e.sent,e.next=19;break;case 11:return void(e.next=13);case 13:if(t=e.sent,o=r.nextValue(t),!o){e.next=19;break}return e.next=18,o;case 18:t=e.sent;case 19:e.next=3;break;case 21:case"end":return e.stop();}},e,this)});return o.generator=n(),o.generator.next(),o.generator.next(),a.forEach(function(e){var t=o.generator.next(e);void 0!=t.value&&o.result.push(o.format(t.value))}),o}return Y(t,e),Q(t,[{key:"nextValue",value:function(e){var t=this.generator.next(e).value;if(void 0!=t)return this.format(t)}}]),t}(ae);ue.calculate=l;var pe=function(e){function t(e){X(this,t);var r=Z(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),o=e.period,l=e.values;return r.result=[],r.generator=regeneratorRuntime.mark(function e(){var t,r,l,a,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=new ee,r=o*(o+1)/2;case 2:if(!(t.length<o)){e.next=11;break}return e.t0=t,void(e.next=7);case 7:e.t1=e.sent,e.t0.push.call(e.t0,e.t1),e.next=19;break;case 11:for(t.resetCursor(),l=0,a=1;a<=o;a++)l+=t.next()*a/r;return e.next=16,l;case 16:n=e.sent,t.shift(),t.push(n);case 19:e.next=2;break;case 21:case"end":return e.stop();}},e,this)})(),r.generator.next(),l.forEach(function(e){var t=r.generator.next(e);void 0!=t.value&&r.result.push(r.format(t.value))}),r}return Y(t,e),Q(t,[{key:"nextValue",value:function(e){var t=this.generator.next(e).value;if(void 0!=t)return this.format(t)}}]),t}(ae);pe.calculate=a;var ie=function(e){function t(e){X(this,t);var r,o=Z(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),l=e.period,a=e.values;o.result=[],r=new se({period:l,values:[]});var n=regeneratorRuntime.mark(function e(){var t,o;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return void(e.next=2);case 2:t=e.sent;case 3:if(void 0==o||void 0===t){e.next=11;break}return o=(t-o)*(1/l)+o,e.next=8,o;case 8:t=e.sent,e.next=19;break;case 11:return void(e.next=13);case 13:if(t=e.sent,o=r.nextValue(t),void 0===o){e.next=19;break}return e.next=18,o;case 18:t=e.sent;case 19:e.next=3;break;case 21:case"end":return e.stop();}},e,this)});return o.generator=n(),o.generator.next(),o.generator.next(),a.forEach(function(e){var t=o.generator.next(e);void 0!=t.value&&o.result.push(o.format(t.value))}),o}return Y(t,e),Q(t,[{key:"nextValue",value:function(e){var t=this.generator.next(e).value;if(void 0!=t)return this.format(t)}}]),t}(ae);ie.calculate=n;var he=function(e){function t(e){X(this,t);var r=Z(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.values=e,r.SimpleMAOscillator=!0,r.SimpleMASignal=!0,r}return Y(t,e),t}(le),ge=function(e){function t(e){X(this,t);var r=Z(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),o=e.SimpleMAOscillator?se:ue,l=e.SimpleMASignal?se:ue,a=new o({period:e.fastPeriod,values:[],format:function(e){return e}}),n=new o({period:e.slowPeriod,values:[],format:function(e){return e}}),s=new l({period:e.signalPeriod,values:[],format:function(e){return e}}),u=r.format;return r.result=[],r.generator=regeneratorRuntime.mark(function t(){var r,o,l,p,i,h,g;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:r=0;case 1:if(!(r<e.slowPeriod)){t.next=10;break}return void(t.next=5);case 5:return o=t.sent,h=a.nextValue(o),g=n.nextValue(o),r++,t.abrupt("continue",1);case 10:return h&&g&&(l=h-g,p=s.nextValue(l)),i=l-p,t.next=14,{MACD:u(l),signal:p?u(p):void 0,histogram:isNaN(i)?void 0:u(i)};case 14:o=t.sent,h=a.nextValue(o),g=n.nextValue(o),t.next=1;break;case 19:case"end":return t.stop();}},t,this)})(),r.generator.next(),e.values.forEach(function(e){var t=r.generator.next(e);void 0!=t.value&&r.result.push(t.value)}),r}return Y(t,e),Q(t,[{key:"nextValue",value:function(e){var t=this.generator.next(e).value;return t}}]),t}(ae);ge.calculate=s;var ve=function(e){function t(){return X(this,t),Z(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Y(t,e),t}(le),ce=function(e){function t(e){X(this,t);var r=Z(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),o=e.values,l=e.period,a=r.format;return r.generator=regeneratorRuntime.mark(function e(t){var r,o,l,n,s,u;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return void(e.next=2);case 2:return r=e.sent,o=1,l=0,u=r,void(e.next=8);case 8:r=e.sent;case 9:return s=r-u,s=0<s?s:0,0<s&&(l+=s),o<t?o++:void 0==n?n=l/t:n=(n*(t-1)+s)/t,u=r,n=void 0===n?void 0:a(n),e.next=18,n;case 18:r=e.sent,e.next=9;break;case 21:case"end":return e.stop();}},e,this)})(l),r.generator.next(),r.result=[],o.forEach(function(e){var t=r.generator.next(e);void 0!==t.value&&r.result.push(t.value)}),r}return Y(t,e),Q(t,[{key:"nextValue",value:function(e){return this.generator.next(e).value}}]),t}(ae);ce.calculate=u;var _e=function(e){function t(){return X(this,t),Z(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Y(t,e),t}(le),de=function(e){function t(e){X(this,t);var r=Z(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),o=e.values,l=e.period,a=r.format;return r.generator=regeneratorRuntime.mark(function e(t){var r,o,l,n,s,u;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return void(e.next=2);case 2:return r=e.sent,o=1,l=0,u=r,void(e.next=8);case 8:r=e.sent;case 9:return s=u-r,s=0<s?s:0,0<s&&(l+=s),o<t?o++:void 0==n?n=l/t:n=(n*(t-1)+s)/t,u=r,n=void 0===n?void 0:a(n),e.next=18,n;case 18:r=e.sent,e.next=9;break;case 21:case"end":return e.stop();}},e,this)})(l),r.generator.next(),r.result=[],o.forEach(function(e){var t=r.generator.next(e);void 0!==t.value&&r.result.push(t.value)}),r}return Y(t,e),Q(t,[{key:"nextValue",value:function(e){return this.generator.next(e).value}}]),t}(ae);de.calculate=p;var xe=function(e){function t(){return X(this,t),Z(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Y(t,e),t}(le),me=function(e){function t(e){X(this,t);var r=Z(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),o=e.period,l=e.values,a=new ce({period:o,values:[]}),n=new de({period:o,values:[]}),s=1;return r.generator=regeneratorRuntime.mark(function e(){var t,r,o,l,u;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return void(e.next=2);case 2:t=e.sent;case 3:return r=a.nextValue(t),o=n.nextValue(t),void 0!==r&&void 0!==o&&(0===o?u=100:0===r?u=0:(l=r/o,l=isNaN(l)?0:l,u=parseFloat((100-100/(1+l)).toFixed(2)))),s++,e.next=10,u;case 10:t=e.sent,e.next=3;break;case 13:case"end":return e.stop();}},e,this)})(o),r.generator.next(),r.result=[],l.forEach(function(e){var t=r.generator.next(e);void 0!==t.value&&r.result.push(t.value)}),r}return Y(t,e),Q(t,[{key:"nextValue",value:function(e){return this.generator.next(e).value}}]),t}(ae);me.calculate=i;var we=function(e){function t(){return X(this,t),Z(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Y(t,e),t}(le),fe=function(e){function t(e){X(this,t);var r=Z(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),o=e.period,l=e.values,a=new se({period:o,values:[],format:function(e){return e}});return r.result=[],r.generator=regeneratorRuntime.mark(function e(){var t,r,l,n,s,u,p,i,h,g,v;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:l=new te(o);;return void(e.next=4);case 4:t=e.sent;case 5:if(l.push(t),r=a.nextValue(t),!r){e.next=30;break}for(s=0,u=!0,p=!1,i=void 0,e.prev=13,h=l.iterator()[Symbol.iterator]();!(u=(g=h.next()).done);u=!0)v=g.value,s+=Math.pow(v-r,2);e.next=21;break;case 17:e.prev=17,e.t0=e["catch"](13),p=!0,i=e.t0;case 21:e.prev=21,e.prev=22,!u&&h.return&&h.return();case 24:if(e.prev=24,!p){e.next=27;break}throw i;case 27:return e.finish(24);case 28:return e.finish(21);case 29:n=Math.sqrt(s/o);case 30:return e.next=32,n;case 32:t=e.sent,e.next=5;break;case 35:case"end":return e.stop();}},e,this,[[13,17,21,29],[22,,24,28]])})(),r.generator.next(),l.forEach(function(e){var t=r.generator.next(e);void 0!=t.value&&r.result.push(r.format(t.value))}),r}return Y(t,e),Q(t,[{key:"nextValue",value:function(e){var t=this.generator.next(e);if(void 0!=t.value)return this.format(t.value)}}]),t}(ae);fe.calculate=h;var ye=function(e){function t(){return X(this,t),Z(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Y(t,e),t}(le),Pe=function(e){function t(){return X(this,t),Z(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Y(t,e),t}(le),ke=function(e){function t(e){X(this,t);var r,o,l=Z(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),a=e.period,n=e.values,s=e.stdDev,u=l.format;return l.result=[],r=new se({period:a,values:[],format:function(e){return e}}),o=new fe({period:a,values:[],format:function(e){return e}}),l.generator=regeneratorRuntime.mark(function e(){var t,l,a,n,p,i,h,g;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return void(e.next=2);case 2:l=e.sent;case 3:return a=r.nextValue(l),n=o.nextValue(l),a&&(p=u(a),i=u(a+n*s),h=u(a-n*s),g=u((l-h)/(i-h)),t={middle:p,upper:i,lower:h,pb:g}),e.next=9,t;case 9:l=e.sent,e.next=3;break;case 12:case"end":return e.stop();}},e,this)})(),l.generator.next(),n.forEach(function(e){var t=l.generator.next(e);void 0!=t.value&&l.result.push(t.value)}),l}return Y(t,e),Q(t,[{key:"nextValue",value:function(e){return this.generator.next(e).value}}]),t}(ae);ke.calculate=g;var Ie=function(e){function t(e){X(this,t);var r=Z(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));r.period=e.period,r.price=e.values;var o=regeneratorRuntime.mark(function e(t){var r,o,l,a,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=new ee,o=0,l=1,void(e.next=5);case 5:a=e.sent,n=0;case 7:return l<t?(l++,o+=a,n=void 0):l==t?(l++,o+=a,n=o):n=n-n/t+a,e.next=11,n;case 11:a=e.sent,e.next=7;break;case 14:case"end":return e.stop();}},e,this)});return r.generator=o(r.period),r.generator.next(),r.result=[],r.price.forEach(function(e){var t=r.generator.next(e);void 0!=t.value&&r.result.push(r.format(t.value))}),r}return Y(t,e),Q(t,[{key:"nextValue",value:function(e){var t=this.generator.next(e).value;if(void 0!=t)return this.format(t)}}]),t}(ae);Ie.calculate=function(e){ae.reverseInputs(e);var t=new Ie(e).result;return e.reversedInput&&t.reverse(),ae.reverseInputs(e),t};var Oe=function(e){function t(){return X(this,t),Z(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Y(t,e),t}(le),Ve=function(e){function t(e){X(this,t);var r=Z(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),o=e.low,l=e.high,a=r.format;if(o.length!=l.length)throw"Inputs(low,high) not of equal size";return r.result=[],r.generator=regeneratorRuntime.mark(function e(){var t,r,o,l,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return void(e.next=2);case 2:r=e.sent;case 3:return o&&(l=r.high-o.high,n=o.low-r.low,t=a(n>l&&0<n?n:0)),o=r,e.next=8,t;case 8:r=e.sent,e.next=3;break;case 11:case"end":return e.stop();}},e,this)})(),r.generator.next(),o.forEach(function(e,t){var a=r.generator.next({high:l[t],low:o[t]});void 0!==a.value&&r.result.push(a.value)}),r}return Y(t,e),Q(t,[{key:"nextValue",value:function(e){return this.generator.next(e).value}}],[{key:"calculate",value:function(e){ae.reverseInputs(e);var r=new t(e).result;return e.reversedInput&&r.reverse(),ae.reverseInputs(e),r}}]),t}(ae),be=function(e){function t(){return X(this,t),Z(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Y(t,e),t}(le),Ce=function(e){function t(e){X(this,t);var r=Z(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),o=e.low,l=e.high,a=r.format;if(o.length!=l.length)throw"Inputs(low,high) not of equal size";return r.result=[],r.generator=regeneratorRuntime.mark(function e(){var t,r,o,l,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return void(e.next=2);case 2:r=e.sent;case 3:return o&&(l=r.high-o.high,n=o.low-r.low,t=a(l>n&&0<l?l:0)),o=r,e.next=8,t;case 8:r=e.sent,e.next=3;break;case 11:case"end":return e.stop();}},e,this)})(),r.generator.next(),o.forEach(function(e,t){var a=r.generator.next({high:l[t],low:o[t]});void 0!==a.value&&r.result.push(a.value)}),r}return Y(t,e),Q(t,[{key:"nextValue",value:function(e){return this.generator.next(e).value}}],[{key:"calculate",value:function(e){ae.reverseInputs(e);var r=new t(e).result;return e.reversedInput&&r.reverse(),ae.reverseInputs(e),r}}]),t}(ae),qe=function(e){function t(){return X(this,t),Z(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Y(t,e),t}(le),Ee=function(e){function t(e){X(this,t);var r=Z(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),o=e.low,l=e.high,a=e.close,n=r.format;if(o.length!=l.length)throw"Inputs(low,high) not of equal size";return r.result=[],r.generator=regeneratorRuntime.mark(function e(){var t,r,o;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return void(e.next=2);case 2:t=e.sent;case 3:if(void 0!=r){e.next=9;break}return r=t.close,e.next=8,o;case 8:t=e.sent;case 9:return o=G(t.high-t.low,isNaN(N(t.high-r))?0:N(t.high-r),isNaN(N(t.low-r))?0:N(t.low-r)),r=t.close,void 0!=o&&(o=n(o)),e.next=14,o;case 14:t=e.sent,e.next=3;break;case 17:case"end":return e.stop();}},e,this)})(),r.generator.next(),o.forEach(function(e,t){var n=r.generator.next({high:l[t],low:o[t],close:a[t]});void 0!=n.value&&r.result.push(n.value)}),r}return Y(t,e),Q(t,[{key:"nextValue",value:function(e){return this.generator.next(e).value}}]),t}(ae);Ee.calculate=v;var Se=function(e){function t(){return X(this,t),Z(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Y(t,e),t}(le),He=function(e){function t(){return X(this,t),Z(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Y(t,e),t}(le),Ae=function(e){function t(e){X(this,t);var r=Z(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),o=e.low,l=e.high,a=e.close,n=e.period,s=r.format,u=new Ce({high:[],low:[]}),p=new Ve({high:[],low:[]}),i=new Ie({period:n,values:[],format:function(e){return e}}),h=new Ie({period:n,values:[],format:function(e){return e}}),g=new Ie({period:n,values:[],format:function(e){return e}}),v=new ie({period:n,values:[],format:function(e){return e}}),c=new Ee({low:[],high:[],close:[]});if(o.length!==l.length||l.length!==a.length)throw"Inputs(low,high, close) not of equal size";return r.result=[],He,r.generator=regeneratorRuntime.mark(function e(){var t,r,o,l,a,n,s,_,d,x,m,w,f,y,P,k,I;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return void(e.next=2);case 2:t=e.sent,r=0,o=0,l=0,a=0;case 7:if(x=c.nextValue(t),m=u.nextValue(t),w=p.nextValue(t),void 0!==x){e.next=16;break}return void(e.next=14);case 14:return t=e.sent,e.abrupt("continue",7);case 16:return f=g.nextValue(x),y=i.nextValue(m),P=h.nextValue(w),void 0!=f&&void 0!=y&&void 0!=P&&(n=100*y/f,s=100*P/f,k=N(n-s),I=n+s,_=100*(k/I),d=v.nextValue(_)),e.next=22,{adx:d,pdi:n,mdi:s};case 22:t=e.sent,e.next=7;break;case 25:case"end":return e.stop();}},e,this)})(),r.generator.next(),o.forEach(function(e,t){var n=r.generator.next({high:l[t],low:o[t],close:a[t]});void 0!=n.value&&void 0!=n.value.adx&&r.result.push({adx:s(n.value.adx),pdi:s(n.value.pdi),mdi:s(n.value.mdi)})}),r}return Y(t,e),Q(t,[{key:"nextValue",value:function(e){var t=this.generator.next(e).value;if(void 0!=t&&void 0!=t.adx)return{adx:this.format(t.adx),pdi:this.format(t.pdi),mdi:this.format(t.mdi)}}}]),t}(ae);Ae.calculate=c;var Le=function(e){function t(){return X(this,t),Z(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Y(t,e),t}(le),ze=function(e){function t(e){X(this,t);var r=Z(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),o=e.low,l=e.high,a=e.close,n=e.period,s=r.format;if(o.length!==l.length||l.length!==a.length)throw"Inputs(low,high, close) not of equal size";var u=new Ee({low:[],high:[],close:[]}),p=new ie({period:n,values:[],format:function(e){return e}});return r.result=[],r.generator=regeneratorRuntime.mark(function e(){var t,r,o;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return void(e.next=2);case 2:t=e.sent;;case 4:return o=u.nextValue({low:t.low,high:t.high,close:t.close}),r=void 0===o?void 0:p.nextValue(o),e.next=9,r;case 9:t=e.sent,e.next=4;break;case 12:case"end":return e.stop();}},e,this)})(),r.generator.next(),o.forEach(function(e,t){var n=r.generator.next({high:l[t],low:o[t],close:a[t]});void 0!==n.value&&r.result.push(s(n.value))}),r}return Y(t,e),Q(t,[{key:"nextValue",value:function(e){return this.generator.next(e).value}}]),t}(ae);ze.calculate=_;var Be=function(e){function t(){return X(this,t),Z(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Y(t,e),t}(le),Te=function(e){function t(e){X(this,t);var r=Z(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),o=e.period,l=e.values;return r.result=[],r.generator=regeneratorRuntime.mark(function e(){var t,r,l,a;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=1,r=new te(o);;return void(e.next=5);case 5:l=e.sent;case 6:return r.push(l),t<o?t++:a=100*((l-r.lastShift)/r.lastShift),e.next=11,a;case 11:l=e.sent,e.next=6;break;case 14:case"end":return e.stop();}},e,this)})(),r.generator.next(),l.forEach(function(e){var t=r.generator.next(e);void 0==t.value||isNaN(t.value)||r.result.push(r.format(t.value))}),r}return Y(t,e),Q(t,[{key:"nextValue",value:function(e){var t=this.generator.next(e);if(void 0!=t.value&&!isNaN(t.value))return this.format(t.value)}}]),t}(ae);Te.calculate=d;var Me=function(e){function t(){return X(this,t),Z(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Y(t,e),t}(le),Re=function(e){function t(e){X(this,t);var r=Z(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),o=e.values,l=e.ROCPer1,a=e.ROCPer2,n=e.ROCPer3,s=e.ROCPer4,u=e.SMAROCPer1,p=e.SMAROCPer2,i=e.SMAROCPer3,h=e.SMAROCPer4,g=e.signalPeriod,v=new Te({period:l,values:[]}),c=new Te({period:a,values:[]}),_=new Te({period:n,values:[]}),d=new Te({period:s,values:[]}),x=new se({period:u,values:[],format:function(e){return e}}),m=new se({period:p,values:[],format:function(e){return e}}),w=new se({period:i,values:[],format:function(e){return e}}),f=new se({period:h,values:[],format:function(e){return e}}),y=new se({period:g,values:[],format:function(e){return e}}),P=r.format;r.result=[];var k=G(l+u,a+p,n+i,s+h);return r.generator=regeneratorRuntime.mark(function e(){var t,r,o,l,a,n,s,u,p,i,h,g,I;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=1,void(e.next=3);case 3:r=e.sent,o=void 0,l=void 0,a=void 0,n=void 0,s=void 0,u=void 0,p=void 0;case 6:return i=v.nextValue(r),h=c.nextValue(r),g=_.nextValue(r),I=d.nextValue(r),l=void 0===i?void 0:x.nextValue(i),a=void 0===h?void 0:m.nextValue(h),n=void 0===g?void 0:w.nextValue(g),s=void 0===I?void 0:f.nextValue(I),t<k?t++:o=1*l+2*a+3*n+4*s,u=void 0===o?void 0:y.nextValue(o),p=void 0===o?void 0:{kst:P(o),signal:u?P(u):void 0},e.next=20,p;case 20:r=e.sent,e.next=6;break;case 23:case"end":return e.stop();}},e,this)})(),r.generator.next(),o.forEach(function(e){var t=r.generator.next(e);void 0!=t.value&&r.result.push(t.value)}),r}return Y(t,e),Q(t,[{key:"nextValue",value:function(e){var t=this.generator.next(e);if(void 0!=t.value)return t.value}}]),t}(ae);Re.calculate=x;var De=function(e){function t(){return X(this,t),Z(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Y(t,e),t}(le),je=function(e){function t(e){X(this,t);var r=Z(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),o=e.high||[],l=e.low||[],a=regeneratorRuntime.mark(function e(t,r){var o,l,a,n,s,u,p;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=void 0,l=void 0,a=void 0,n=void 0,s=!0,u=t,void(e.next=5);case 5:p=e.sent;case 6:return o?(a+=u*(l-a),s?(a=U(a,n.low,p.low),o.high>l&&(l=o.high,u=U(u+t,r))):(a=G(a,n.high,p.high),o.low<l&&(l=o.low,u=U(u+t,r))),(s&&o.low<a||!s&&o.high>a)&&(u=t,a=l,s=!s,l=s?o.high:o.low)):(a=p.low,l=p.high),n=p,o&&(p=o),e.next=12,a;case 12:o=e.sent,e.next=6;break;case 15:case"end":return e.stop();}},e,this)});return r.result=[],r.generator=a(e.step,e.max),r.generator.next(),l.forEach(function(e,t){var a=r.generator.next({high:o[t],low:l[t]});void 0!==a.value&&r.result.push(a.value)}),r}return Y(t,e),Q(t,[{key:"nextValue",value:function(e){var t=this.generator.next(e);if(void 0!==t.value)return t.value}}]),t}(ae);je.calculate=m;var Fe=function(e){function t(){return X(this,t),Z(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Y(t,e),t}(le),We=function(e){function t(e){X(this,t);var r=Z(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),o=e.low,l=e.high,a=e.close,n=e.period,s=e.signalPeriod,u=r.format;if(o.length!==l.length||l.length!==a.length)throw"Inputs(low,high, close) not of equal size";return r.result=[],r.generator=regeneratorRuntime.mark(function e(){var t,r,o,l,a,p,i,h;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=1,r=new te(n,!0,!1),o=new te(n,!1,!0),l=new se({period:s,values:[],format:function(e){return e}}),a=void 0,p=void 0,void(e.next=7);case 7:i=e.sent;case 8:if(r.push(i.high),o.push(i.low),!(t<n)){e.next=17;break}return t++,void(e.next=15);case 15:return i=e.sent,e.abrupt("continue",8);case 17:return h=o.periodLow,a=100*((i.close-h)/(r.periodHigh-h)),a=isNaN(a)?0:a,p=l.nextValue(a),e.next=23,{k:u(a),d:void 0===p?void 0:u(p)};case 23:i=e.sent,e.next=8;break;case 26:case"end":return e.stop();}},e,this)})(),r.generator.next(),o.forEach(function(e,t){var n=r.generator.next({high:l[t],low:o[t],close:a[t]});void 0!==n.value&&r.result.push(n.value)}),r}return Y(t,e),Q(t,[{key:"nextValue",value:function(e){var t=this.generator.next(e);if(void 0!==t.value)return t.value}}]),t}(ae);We.calculate=w;var Ke=function(e){function t(){return X(this,t),Z(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Y(t,e),t}(le),Ue=function(e){function t(e){X(this,t);var r=Z(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),o=e.low,l=e.high,a=e.close,n=e.period,s=r.format;if(o.length!==l.length||l.length!==a.length)throw"Inputs(low,high, close) not of equal size";return r.result=[],r.generator=regeneratorRuntime.mark(function e(){var t,r,o,l,a,u,p;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=1,r=new te(n,!0,!1),o=new te(n,!1,!0),l=void 0,a=void 0,void(e.next=7);case 7:u=e.sent,p=void 0;case 9:if(r.push(u.high),o.push(u.low),!(t<n)){e.next=18;break}return t++,void(e.next=16);case 16:return u=e.sent,e.abrupt("continue",9);case 18:return l=o.periodLow,a=r.periodHigh,p=s(-100*((a-u.close)/(a-l))),e.next=23,p;case 23:u=e.sent,e.next=9;break;case 26:case"end":return e.stop();}},e,this)})(),r.generator.next(),o.forEach(function(e,t){var n=r.generator.next({high:l[t],low:o[t],close:a[t]});void 0!==n.value&&r.result.push(n.value)}),r}return Y(t,e),Q(t,[{key:"nextValue",value:function(e){var t=this.generator.next(e);if(void 0!=t.value)return this.format(t.value)}}]),t}(ae);Ue.calculate=f;var Ge=function(e){function t(){return X(this,t),Z(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Y(t,e),t}(le),Ne=function(e){function t(e){X(this,t);var r=Z(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),o=e.high,l=e.low,a=e.close,n=e.volume;if(l.length!==o.length||o.length!==a.length||o.length!==n.length)throw"Inputs(low,high, close, volumes) not of equal size";return r.result=[],r.generator=regeneratorRuntime.mark(function e(){var t,r,o,l;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=0,void(e.next=3);case 3:r=e.sent;case 4:return o=(r.close-r.low-(r.high-r.close))/(r.high-r.low),o=isNaN(o)?1:o,l=o*r.volume,t+=l,e.next=11,Math.round(t);case 11:r=e.sent,e.next=4;break;case 14:case"end":return e.stop();}},e,this)})(),r.generator.next(),o.forEach(function(e,t){var o={high:e,low:l[t],close:a[t],volume:n[t]},s=r.generator.next(o);void 0!=s.value&&r.result.push(s.value)}),r}return Y(t,e),Q(t,[{key:"nextValue",value:function(e){return this.generator.next(e).value}}]),t}(ae);Ne.calculate=y;var Xe=function(e){function t(){return X(this,t),Z(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Y(t,e),t}(le),Qe=function(e){function t(e){X(this,t);var r=Z(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),o=e.close,l=e.volume;return r.result=[],r.generator=regeneratorRuntime.mark(function e(){var t,r,o;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=0,void(e.next=3);case 3:if(r=e.sent,!(r.close&&"number"==typeof r.close)){e.next=9;break}return o=r.close,void(e.next=8);case 8:r=e.sent;case 9:return o<r.close?t+=r.volume:r.close<o&&(t-=r.volume),o=r.close,e.next=14,t;case 14:r=e.sent,e.next=9;break;case 17:case"end":return e.stop();}},e,this)})(),r.generator.next(),o.forEach(function(e,t){var a={close:o[t],volume:l[t]},n=r.generator.next(a);void 0!=n.value&&r.result.push(n.value)}),r}return Y(t,e),Q(t,[{key:"nextValue",value:function(e){return this.generator.next(e).value}}]),t}(ae);Qe.calculate=P;var Ye=function(e){function t(){return X(this,t),Z(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Y(t,e),t}(le),Ze=function(e){function t(e){X(this,t);var r=Z(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),o=e.values,l=e.period,a=r.format,n=new ue({period:l,values:[],format:function(e){return e}}),s=new ue({period:l,values:[],format:function(e){return e}}),u=new ue({period:l,values:[],format:function(e){return e}}),p=new Te({period:1,values:[],format:function(e){return e}});return r.result=[],r.generator=regeneratorRuntime.mark(function e(){var t,r,o,l,i;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return void(e.next=2);case 2:t=e.sent;case 3:return r=n.nextValue(t),o=r?s.nextValue(r):void 0,l=o?u.nextValue(o):void 0,i=l?p.nextValue(l):void 0,e.next=10,i?a(i):void 0;case 10:t=e.sent,e.next=3;break;case 13:case"end":return e.stop();}},e,this)})(),r.generator.next(),o.forEach(function(e){var t=r.generator.next(e);void 0!==t.value&&r.result.push(t.value)}),r}return Y(t,e),Q(t,[{key:"nextValue",value:function(e){var t=this.generator.next(e);if(void 0!==t.value)return t.value}}]),t}(ae);Ze.calculate=k;var $e=function(e){function t(){X(this,t);var e=Z(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.period=1,e}return Y(t,e),t}(le),Je=function(e){function t(e){X(this,t);var r=Z(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),o=e.close,l=e.volume,a=e.period||1;if(l.length!==o.length)throw"Inputs(volume, close) not of equal size";var n=new ue({values:[],period:a});return r.result=[],r.generator=regeneratorRuntime.mark(function e(){var t,r,o;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return void(e.next=2);case 2:return t=e.sent,void(e.next=5);case 5:r=e.sent,o=void 0;case 7:return o=(r.close-t.close)*r.volume,t=r,e.next=12,n.nextValue(o);case 12:r=e.sent,e.next=7;break;case 15:case"end":return e.stop();}},e,this)})(),r.generator.next(),l.forEach(function(e,t){var a=r.generator.next({close:o[t],volume:l[t]});void 0!=a.value&&r.result.push(a.value)}),r}return Y(t,e),Q(t,[{key:"nextValue",value:function(e){var t=this.generator.next(e).value;if(void 0!=t)return t}}]),t}(ae);Je.calculate=I;var et=function(e){function t(){return X(this,t),Z(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Y(t,e),t}(le),tt=function(e){function t(e){X(this,t);var r=Z(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),o=e.low,l=e.high,a=e.close,n=e.period,s=r.format,u=new te(n),p=new se({period:n,values:[],format:function(e){return e}});if(o.length!==l.length||l.length!==a.length)throw"Inputs(low,high, close) not of equal size";return r.result=[],r.generator=regeneratorRuntime.mark(function e(){var t,r,o,l,a,s,i,h,g,v,c,_;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return void(e.next=2);case 2:t=e.sent;case 3:if(r=(t.high+t.low+t.close)/3,u.push(r),o=p.nextValue(r),l=null,a=void 0,s=0,void 0==o){e.next=32;break}for(i=!0,h=!1,g=void 0,e.prev=14,v=u.iterator()[Symbol.iterator]();!(i=(c=v.next()).done);i=!0)_=c.value,s+=N(_-o);e.next=22;break;case 18:e.prev=18,e.t0=e["catch"](14),h=!0,g=e.t0;case 22:e.prev=22,e.prev=23,!i&&v.return&&v.return();case 25:if(e.prev=25,!h){e.next=28;break}throw g;case 28:return e.finish(25);case 29:return e.finish(22);case 30:l=s/n,a=(r-o)/(.015*l);case 32:return e.next=34,a;case 34:t=e.sent,e.next=3;break;case 37:case"end":return e.stop();}},e,this,[[14,18,22,30],[23,,25,29]])})(),r.generator.next(),o.forEach(function(e,t){var n=r.generator.next({high:l[t],low:o[t],close:a[t]});void 0!=n.value&&r.result.push(n.value)}),r}return Y(t,e),Q(t,[{key:"nextValue",value:function(e){var t=this.generator.next(e).value;if(void 0!=t)return t}}]),t}(ae);tt.calculate=O;var rt=function(e){function t(){return X(this,t),Z(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Y(t,e),t}(le),ot=function(e){function t(e){X(this,t);var r=Z(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),o=e.high,l=e.low,a=e.fastPeriod,n=e.slowPeriod,s=new se({values:[],period:n}),u=new se({values:[],period:a});return r.result=[],r.generator=regeneratorRuntime.mark(function e(){var t,r,o,l,a;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return void(e.next=2);case 2:r=e.sent;case 3:return o=(r.high+r.low)/2,l=s.nextValue(o),a=u.nextValue(o),void 0!==l&&void 0!==a&&(t=a-l),e.next=10,t;case 10:r=e.sent,e.next=3;break;case 13:case"end":return e.stop();}},e,this)})(),r.generator.next(),o.forEach(function(e,t){var o={high:e,low:l[t]},a=r.generator.next(o);void 0!=a.value&&r.result.push(r.format(a.value))}),r}return Y(t,e),Q(t,[{key:"nextValue",value:function(e){var t=this.generator.next(e);if(void 0!=t.value)return this.format(t.value)}}]),t}(ae);ot.calculate=V;var lt=function(e){function t(){return X(this,t),Z(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Y(t,e),t}(le),at=function(e){function t(e){X(this,t);var r=Z(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),o=e.low,l=e.high,a=e.close,n=e.volume,s=r.format;if(o.length!==l.length||l.length!==a.length)throw"Inputs(low,high, close) not of equal size";return r.result=[],r.generator=regeneratorRuntime.mark(function e(){var t,r,o,l,a;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return void(e.next=2);case 2:t=e.sent,r=0,o=0;case 5:return l=(t.high+t.low+t.close)/3,a=t.volume*l,r+=a,o+=t.volume,e.next=12,r/o;case 12:t=e.sent;;e.next=5;break;case 16:case"end":return e.stop();}},e,this)})(),r.generator.next(),o.forEach(function(e,t){var s=r.generator.next({high:l[t],low:o[t],close:a[t],volume:n[t]});void 0!=s.value&&r.result.push(s.value)}),r}return Y(t,e),Q(t,[{key:"nextValue",value:function(e){var t=this.generator.next(e).value;if(void 0!=t)return t}}]),t}(ae);at.calculate=b;var nt=function(e){function t(){return X(this,t),Z(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Y(t,e),t}(le),st=function(e){function t(e){X(this,t);var r=Z(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),o=e.high,l=e.low,a=e.close,n=e.open,s=e.volume,u=e.noOfBars;if(l.length!==o.length||o.length!==a.length||o.length!==s.length)throw"Inputs(low,high, close, volumes) not of equal size";r.result=[];for(var p=G.apply(Math,$(o).concat($(l),$(a),$(n))),h=U.apply(Math,$(o).concat($(l),$(a),$(n))),g=h,v=0;v<u;v++){var i=g,c=i+(p-h)/u;g=c;for(var _=0,d=0,x=0,m=0;m<o.length;m++){var w=l[m],f=o[m],y=n[m],P=a[m],k=s[m];C(i,c,w,f)&&(x+=k,y>P?d+=k:_+=k)}r.result.push({rangeStart:i,rangeEnd:c,bullishVolume:_,bearishVolume:d,totalVolume:x})}return r}return Y(t,e),Q(t,[{key:"nextValue",value:function(){throw"Next value not supported for volume profile"}}]),t}(ae);st.calculate=q;var ut=function(e){function t(){return X(this,t),Z(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Y(t,e),t}(le),pt=function(e){function t(e){X(this,t);var r=Z(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.result=[],r.generator=regeneratorRuntime.mark(function e(){var t;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return void(e.next=2);case 2:t=e.sent;case 3:return e.next=6,(t.high+t.low+t.close)/3;case 6:t=e.sent,e.next=3;break;case 9:case"end":return e.stop();}},e,this)})(),r.generator.next(),e.low.forEach(function(t,o){var l=r.generator.next({high:e.high[o],low:e.low[o],close:e.close[o]});r.result.push(l.value)}),r}return Y(t,e),Q(t,[{key:"nextValue",value:function(e){var t=this.generator.next(e).value;return t}}]),t}(ae);pt.calculate=function(e){ae.reverseInputs(e);var t=new pt(e).result;return e.reversedInput&&t.reverse(),ae.reverseInputs(e),t};var it=function(e){function t(){return X(this,t),Z(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Y(t,e),t}(le),ht=function(e){function t(e){X(this,t);var r=Z(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),o=e.high,l=e.low,a=e.close,n=e.volume,s=e.period,u=new pt({low:[],high:[],close:[]}),p=new te(s,!1,!1,!0),i=new te(s,!1,!1,!0);if(l.length!==o.length||o.length!==a.length||o.length!==n.length)throw"Inputs(low,high, close, volumes) not of equal size";return r.result=[],r.generator=regeneratorRuntime.mark(function e(){var t,r,o,l,a,n,h,g,v,c,_,d,x,m,w,f;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=0,g=null,v=null,void(e.next=5);case 5:return r=e.sent,o=r.close,void(e.next=9);case 9:r=e.sent;case 10:return c=r,_=c.high,d=c.low,x=c.close,m=c.volume,w=0,f=0,g=u.nextValue({high:_,low:d,close:x}),a=g*m,null!=g&&null!=v&&(g>v?w=a:f=a,p.push(w),i.push(f),l=p.periodSum,h=i.periodSum,p.totalPushed>=s&&p.totalPushed>=s&&(n=l/h,t=100-100/(1+n))),v=g,e.next=20,t;case 20:r=e.sent,e.next=10;break;case 23:case"end":return e.stop();}},e,this)})(),r.generator.next(),o.forEach(function(e,t){var o={high:e,low:l[t],close:a[t],volume:n[t]},s=r.generator.next(o);void 0!=s.value&&r.result.push(parseFloat(s.value.toFixed(2)))}),r}return Y(t,e),Q(t,[{key:"nextValue",value:function(e){var t=this.generator.next(e);if(void 0!=t.value)return parseFloat(t.value.toFixed(2))}}]),t}(ae);ht.calculate=E;var gt=function(e){function t(){return X(this,t),Z(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Y(t,e),t}(le),vt=function(e){function t(e){X(this,t);var r=Z(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),o=e.values,l=e.rsiPeriod,a=e.stochasticPeriod,n=e.kPeriod,s=e.dPeriod,u=r.format;return r.result=[],r.generator=regeneratorRuntime.mark(function e(){var t,r,o,u,p,i,h,g,v,c;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=1,r=new me({period:l,values:[]}),o=new We({period:a,high:[],low:[],close:[],signalPeriod:n}),u=new se({period:s,values:[],format:function(e){return e}}),p=void 0,i=void 0,h=void 0,g=void 0,void(e.next=7);case 7:v=e.sent;case 8:return p=r.nextValue(v),void 0!==p&&(c={high:p,low:p,close:p},i=o.nextValue(c),void 0!==i&&void 0!==i.d&&(h=u.nextValue(i.d),void 0!==h&&(g={stochRSI:i.k,k:i.d,d:h}))),e.next=13,g;case 13:v=e.sent,e.next=8;break;case 16:case"end":return e.stop();}},e,this)})(),r.generator.next(),o.forEach(function(e){var t=r.generator.next(e);void 0!==t.value&&r.result.push(t.value)}),r}return Y(t,e),Q(t,[{key:"nextValue",value:function(e){var t=this.generator.next(e);if(void 0!==t.value)return t.value}}]),t}(ae);vt.calculate=S;var ct=function(e){function t(){return X(this,t),Z(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Y(t,e),t}(le),_t=function(e){function t(e){X(this,t);var r=Z(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),o=e.values,l=e.period;r.result=[];var a=new te(l,!0,!1,!1);return r.generator=regeneratorRuntime.mark(function e(){var t,r;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return void(e.next=2);case 2:t=e.sent;case 3:return a.push(t),a.totalPushed>=l&&(r=a.periodHigh),e.next=8,r;case 8:t=e.sent,e.next=3;break;case 11:case"end":return e.stop();}},e,this)})(),r.generator.next(),o.forEach(function(e){var t=r.generator.next(e);void 0!=t.value&&r.result.push(t.value)}),r}return Y(t,e),Q(t,[{key:"nextValue",value:function(e){var t=this.generator.next(e);if(void 0!=t.value)return t.value}}]),t}(ae);_t.calculate=H;var dt=function(e){function t(){return X(this,t),Z(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Y(t,e),t}(le),xt=function(e){function t(e){X(this,t);var r=Z(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),o=e.values,l=e.period;r.result=[];var a=new te(l,!1,!0,!1);return r.generator=regeneratorRuntime.mark(function e(){var t,r;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return void(e.next=2);case 2:t=e.sent;case 3:return a.push(t),a.totalPushed>=l&&(r=a.periodLow),e.next=8,r;case 8:t=e.sent,e.next=3;break;case 11:case"end":return e.stop();}},e,this)})(),r.generator.next(),o.forEach(function(e){var t=r.generator.next(e);void 0!=t.value&&r.result.push(t.value)}),r}return Y(t,