We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e5ca1aa commit d047b2aCopy full SHA for d047b2a
tests/ama/ama.spec.ts
@@ -3,14 +3,14 @@ import { data } from './data';
3
4
describe('Adaptive Moving Average', () => {
5
const ama = new AMA(15, 2, 30);
6
- const EPSILON = 0.01;
+ const EPSILON = 0.001;
7
8
it('Excel validate', () => {
9
data.forEach((tick, idx) => {
10
const amaValue = ama.nextValue(tick.c);
11
const expected = Number(tick.ama);
12
13
- if (amaValue) {
+ if (amaValue && expected) {
14
expect(Math.abs(amaValue - expected)).toBeLessThan(EPSILON);
15
}
16
0 commit comments