Skip to content

Commit

Permalink
prettier formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
BusinessDuck committed Dec 4, 2021
1 parent 7c8c1ca commit 688f7d1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/atr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export class ATR {

this.prevClose = close;

if(!trueRange) {
if (!trueRange) {
return;
}

Expand All @@ -52,7 +52,7 @@ export class ATR {
momentValue(high: number, low: number) {
const trueRange = this.getTrueRange(high, low);

if(!trueRange) {
if (!trueRange) {
return;
}

Expand Down
6 changes: 3 additions & 3 deletions tests/atr/atr.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ describe('ATR', () => {
const atr = new ATR(period);
const atr2 = new ATR2({ period, high: [], low: [], close: [] });

const local = []
const cross = []
const local = [];
const cross = [];

ohlc.forEach((tick) => {
local.push(atr.nextValue(tick.h, tick.l, tick.c));
cross.push(atr2.nextValue({ high: tick.h, low: tick.l, close: tick.c }));
});

expect(local).toEqual(cross)
expect(local).toEqual(cross);
});
});

0 comments on commit 688f7d1

Please sign in to comment.