Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

Commit

Permalink
Console Output adjustment (#1055)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shawn8901 authored and DeviaVir committed Jan 6, 2018
1 parent 738246f commit 06d6c33
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions commands/trade.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.')
}
Expand Down
6 changes: 3 additions & 3 deletions lib/engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, ' ')
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 06d6c33

Please sign in to comment.