@sunrise1002/tats
Version:
Techincal Indicators written in javascript
25 lines (24 loc) • 784 B
JavaScript
import { format as nf } from '../Utils/NumberFormatter';
export class IndicatorInput {
}
export class AllInputs {
}
export class Indicator {
constructor(input) {
this.format = input.format || nf;
}
static reverseInputs(input) {
if (input.reversedInput) {
input.values ? input.values.reverse() : undefined;
input.open ? input.open.reverse() : undefined;
input.high ? input.high.reverse() : undefined;
input.low ? input.low.reverse() : undefined;
input.close ? input.close.reverse() : undefined;
input.volume ? input.volume.reverse() : undefined;
input.timestamp ? input.timestamp.reverse() : undefined;
}
}
getResult() {
return this.result;
}
}