UNPKG

igniteui-react-charts

Version:

Ignite UI React charting components for building rich data visualizations using TypeScript APIs.

59 lines (58 loc) 2.81 kB
/* THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE: https://www.infragistics.com/legal/license/igultimate-la https://www.infragistics.com/legal/license/igultimate-eula GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company. */ import { __extends } from "tslib"; import { IndicatorCalculationStrategy } from "./IndicatorCalculationStrategy"; import { String_$type, Number_$type, markType, getEnumerator } from "igniteui-react-core"; import { List$1 } from "igniteui-react-core"; /** * @hidden */ var UltimateOscillatorIndicatorCalculationStrategy = /** @class */ /*@__PURE__*/ (function (_super) { __extends(UltimateOscillatorIndicatorCalculationStrategy, _super); function UltimateOscillatorIndicatorCalculationStrategy() { return _super !== null && _super.apply(this, arguments) || this; } UltimateOscillatorIndicatorCalculationStrategy.prototype.b = function (a, b) { var c = new List$1(String_$type, 0); c.o(a.trueLow.basedOn); c.add("CloseColumn"); c.o(a.trueRange.basedOn); c.o(b.b.c); return c; }; UltimateOscillatorIndicatorCalculationStrategy.prototype.c = function (a) { var b = 0; var c = new List$1(Number_$type, 0); var d = a.trueLow.getEnumerator(); while (d.moveNext()) { c.add(a.closeColumn.item(b) - d.current); b++; } return c; }; UltimateOscillatorIndicatorCalculationStrategy.prototype.a = function (a, b) { var c = this.c(a); var d = a.trueRange; var e = getEnumerator(b.b.b(c, 7)); var f = getEnumerator(b.b.b(d, 7)); var g = getEnumerator(b.b.b(c, 14)); var h = getEnumerator(b.b.b(d, 14)); var i = getEnumerator(b.b.b(c, 28)); var j = getEnumerator(b.b.b(d, 28)); var k = 0; while (e.moveNext() && f.moveNext() && g.moveNext() && h.moveNext() && i.moveNext() && j.moveNext()) { var l = b.i(4 * (e.current / f.current) + 2 * (g.current / h.current) + (i.current / j.current)); var m = (l / (4 + 2 + 1)) * 100; a.indicatorColumn.item(k, m); k++; } return true; }; UltimateOscillatorIndicatorCalculationStrategy.$t = markType(UltimateOscillatorIndicatorCalculationStrategy, 'UltimateOscillatorIndicatorCalculationStrategy', IndicatorCalculationStrategy.$); return UltimateOscillatorIndicatorCalculationStrategy; }(IndicatorCalculationStrategy)); export { UltimateOscillatorIndicatorCalculationStrategy };