From eac2842ec579c186adf7986f278a2b1cbfc3ee3e Mon Sep 17 00:00:00 2001 From: Shawn8901 Date: Sat, 6 Jan 2018 10:59:12 +0100 Subject: [PATCH] Console Output adjustment --- commands/trade.js | 6 ++++-- lib/engine.js | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/commands/trade.js b/commands/trade.js index 242fa432c7..e13c71ce5a 100644 --- a/commands/trade.js +++ b/commands/trade.js @@ -386,9 +386,11 @@ module.exports = function container (get, set, clear) { get('db.trades').select(opts, function (err, trades) { if (err) throw err if (!trades.length) { - console.log('------------------------------------------ INITIALIZE OUTPUT ------------------------------------------') + var head = '------------------------------------------ INITIALIZE OUTPUT ------------------------------------------'; + console.log(head) get('lib.output').initializeOutput(s) - console.log('---------------------------- STARTING ' + so.mode.toUpperCase() + ' TRADING ----------------------------') + var minuses = Math.floor((head.length - so.mode.length - 19) / 2) + console.log('-'.repeat(minuses) + ' STARTING ' + so.mode.toUpperCase() + ' TRADING ' + '-'.repeat(minuses + (minuses % 2 == 0 ? 0 : 1))) if (so.mode === 'paper') { console.log('!!! Paper mode enabled. No real trades are performed until you remove --paper from the startup command.') } diff --git a/lib/engine.js b/lib/engine.js index e11f254a02..a945db8f65 100644 --- a/lib/engine.js +++ b/lib/engine.js @@ -698,7 +698,7 @@ module.exports = function container (get, set, clear) { process.stdout.write(z(8, pct(diff), ' ')[diff >= 0 ? 'green' : 'red']) } else { - process.stdout.write(z(8, '', ' ')) + process.stdout.write(z(9, '', ' ')) } var volume_display = s.period.volume > 99999 ? abbreviate(s.period.volume, 2) : n(s.period.volume).format('0') volume_display = z(8, volume_display, ' ') @@ -781,8 +781,8 @@ module.exports = function container (get, set, clear) { z(19, 'DATE', ' ').grey, z(17, 'PRICE', ' ').grey, z(9, 'DIFF', ' ').grey, - z(15, 'VOL', ' ').grey, - z(12, 'RSI', ' ').grey, + z(10, 'VOL', ' ').grey, + z(8, 'RSI', ' ').grey, z(32, 'ACTIONS', ' ').grey, z(25, 'BAL', ' ').grey, z(22, 'PROFIT', ' ').grey