From 4291591c49b90b054145ed77df6daaaa930993ce Mon Sep 17 00:00:00 2001 From: Robert Mariano Schwindaman Date: Tue, 21 Apr 2020 13:58:50 -0600 Subject: [PATCH] FeelsDirtyMan | Removed @fomobro/talib-fomo usage from modules/fomobot --- .circleci/config.yml | 4 +--- modules/fomobot/lib/ta_ultosc.js | 38 ++++++++++++++++---------------- 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7bd6068..4fa33dc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -63,9 +63,7 @@ jobs: shell: bash.exe name: NPM Install (fomo-native) - run: - command: mkdir modules/talib-fomo/build - && mkdir modules/talib-fomo/build/Release - && cp -a apps/fomo-native/bin/talib.node modules/talib-fomo/build/Release + command: cp -a apps/fomo-native/bin/talib.node modules/talib-fomo/build/Release shell: bash.exe name: Copy Precompiled talib.node to modules/talib-fomo - run: diff --git a/modules/fomobot/lib/ta_ultosc.js b/modules/fomobot/lib/ta_ultosc.js index ad4b3f9..60ee9ef 100644 --- a/modules/fomobot/lib/ta_ultosc.js +++ b/modules/fomobot/lib/ta_ultosc.js @@ -1,4 +1,4 @@ -var talib = require('@fomobro/talib-fomo') +// var talib = require('@fomobro/talib-fomo') module.exports = function ultosc(s, min_periods, timeperiod1, timeperiod2, timeperiod3) { return new Promise(function(resolve, reject) { @@ -29,24 +29,24 @@ module.exports = function ultosc(s, min_periods, timeperiod1, timeperiod2, timep let tmpClose = s.marketData.close.slice() tmpClose.push(s.period.close) - talib.execute({ - name: 'ULTOSC', - startIdx: 0, - endIdx: tmpHigh.length -1, - high: tmpHigh, - low: tmpLow, - close: tmpClose, - optInTimePeriod1: timeperiod1, - optInTimePeriod2: timeperiod2, - optInTimePeriod3: timeperiod3, - }, function (err, result) { - if (err) { - reject(err, result) - return - } - - resolve(result.result.outReal[(result.nbElement - 1)]) - }) + // talib.execute({ + // name: 'ULTOSC', + // startIdx: 0, + // endIdx: tmpHigh.length -1, + // high: tmpHigh, + // low: tmpLow, + // close: tmpClose, + // optInTimePeriod1: timeperiod1, + // optInTimePeriod2: timeperiod2, + // optInTimePeriod3: timeperiod3, + // }, function (err, result) { + // if (err) { + // reject(err, result) + // return + // } + // + // resolve(result.result.outReal[(result.nbElement - 1)]) + // }) }) }