Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
askmike authored Nov 16, 2017
1 parent f0c00c8 commit 1af7ef8
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions plugins/tradingAdvisor/baseTradingMethod.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,14 @@ var indicatorsPath = dirs.methods + 'indicators/';
var indicatorFiles = fs.readdirSync(indicatorsPath);
var Indicators = {};

_.each(indicatorFiles, function(indicator){

var indicatorName = indicator.split('.')[0];
if (indicatorName[0] != '_')
try {
Indicators[indicatorName] = require(indicatorsPath + indicator);
}
catch(e) {
log.error('Failed to load indicator', indicatorName);
}
_.each(indicatorFiles, function(indicator) {
const indicatorName = indicator.split(".")[0];
if (indicatorName[0] != "_")
try {
Indicators[indicatorName] = require(indicatorsPath + indicator);
} catch (e) {
log.error("Failed to load indicator", indicatorName);
}
});

var allowedIndicators = _.keys(Indicators);
Expand Down

0 comments on commit 1af7ef8

Please sign in to comment.