Skip to content

Commit

Permalink
properly log in profitTrader in realtime mode (fix askmike#382)
Browse files Browse the repository at this point in the history
  • Loading branch information
askmike committed Jul 12, 2016
1 parent cc28b82 commit 632cd6e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 19 deletions.
1 change: 0 additions & 1 deletion methods/MACD.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ method.log = function() {
}

method.check = function() {

var macddiff = this.indicators.macd.result;

if(macddiff > settings.thresholds.up) {
Expand Down
8 changes: 4 additions & 4 deletions plugins/profitSimulator.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Logger.prototype.processAdvice = function(advice) {
log.info(`Profit simulator got advice to short\t@ ${time}, selling ${this.current.asset} ${this.asset} \t(${this.current.currency})`);
}

if(this.verbose)
if(mode === 'realtime')
this.report();
}

Expand Down Expand Up @@ -159,7 +159,7 @@ Logger.prototype.report = function(timespan) {

// finish up stats for backtesting
Logger.prototype.finalize = function() {
console.log('')
log.info('')

log.info(
'(PROFIT REPORT)',
Expand All @@ -184,7 +184,7 @@ Logger.prototype.finalize = function() {
'days'
);

console.log();
log.info();

log.info(
'(PROFIT REPORT)',
Expand All @@ -204,7 +204,7 @@ Logger.prototype.finalize = function() {
(this.round(this.endPrice * 100 / this.startPrice) - 100) + '%'
);

console.log();
log.info();

log.info(
'(PROFIT REPORT)',
Expand Down
14 changes: 0 additions & 14 deletions sample-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,6 @@ config.profitSimulator = {
asset: 1,
currency: 100,
},
// only want report after a sell? set to `false`.
verbose: false,
// how much fee in % does each trade cost?
fee: 0.25,
// how much slippage/spread should Gekko assume per trade?
Expand Down Expand Up @@ -260,18 +258,6 @@ config.candleWriter = {
enabled: true
}

config.webserver = {
enabled: false,
http: {
port: 8080,
host: 'localhost'
},
ws: {
port: 8081,
host: 'localhost'
}
}

// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// CONFIGURING ADAPTER
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down

0 comments on commit 632cd6e

Please sign in to comment.