UNPKG

igniteui-react-charts

Version:

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

55 lines (54 loc) 2.5 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 { IndicatorCalculationStrategy } from "./IndicatorCalculationStrategy"; import { String_$type, Number_$type, markType, getEnumerator } from "igniteui-react-core"; import { List$1 } from "igniteui-react-core"; /** * @hidden */ export let UltimateOscillatorIndicatorCalculationStrategy = /*@__PURE__*/ (() => { class UltimateOscillatorIndicatorCalculationStrategy extends IndicatorCalculationStrategy { b(a, b) { let 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; } c(a) { let b = 0; let c = new List$1(Number_$type, 0); let d = a.trueLow.getEnumerator(); while (d.moveNext()) { c.add(a.closeColumn.item(b) - d.current); b++; } return c; } a(a, b) { let c = this.c(a); let d = a.trueRange; let e = getEnumerator(b.b.b(c, 7)); let f = getEnumerator(b.b.b(d, 7)); let g = getEnumerator(b.b.b(c, 14)); let h = getEnumerator(b.b.b(d, 14)); let i = getEnumerator(b.b.b(c, 28)); let j = getEnumerator(b.b.b(d, 28)); let k = 0; while (e.moveNext() && f.moveNext() && g.moveNext() && h.moveNext() && i.moveNext() && j.moveNext()) { let l = b.i(4 * (e.current / f.current) + 2 * (g.current / h.current) + (i.current / j.current)); let m = (l / (4 + 2 + 1)) * 100; a.indicatorColumn.item(k, m); k++; } return true; } } UltimateOscillatorIndicatorCalculationStrategy.$t = /*@__PURE__*/ markType(UltimateOscillatorIndicatorCalculationStrategy, 'UltimateOscillatorIndicatorCalculationStrategy', IndicatorCalculationStrategy.$); return UltimateOscillatorIndicatorCalculationStrategy; })();