cryptum 0.0.330 → 0.0.332

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d3a2741d859d2027bad2166baa33bf51cf3110e1926378dcd1a3280a95fd4a97
4
- data.tar.gz: e611c452d7016a663b098f24ebfc66d163649cf6c8968362aa71b39a0700486d
3
+ metadata.gz: 198cefce702d824cf08884303792c044e47e371254b4f0a8ee57080a481d4b2c
4
+ data.tar.gz: 22952150819ac8b4f5e51eee655daead31f743baeba36c5c6220348ec4b0657d
5
5
  SHA512:
6
- metadata.gz: 116600bd6e3e8ed4f4f6da284cc1e29d8b55a891d64aaa47a7e9fed1e32343ae6aa2b99f2badee7e32b06e6117ee5b8201312ddaaeaf300f97f88042cfdfeef0
7
- data.tar.gz: 93ae969032e900b3acfad8964f11c5dde7694e83ae692fc699822e844b3101eada07386f0dd8453ee7580ccd84de3d9fdb34d2a7749d41e802a65406578373f6
6
+ metadata.gz: 8dd41bd3b906e1a7615b5935943ad7aa8b56393e5deb5f2c0523497433f91fb81cef2e77e92e3e246635b9545cb692ee0a20653530b4ba5dfd378841db77009b
7
+ data.tar.gz: 1f6f23ec65c6e94a14fc8f14726d25e2d0df2dbcfae8a77b5e0c840bf40969062de43782e6483a643cbf8f1077d3eb6592d054e404e64b7beaca49a9d913f154
data/lib/cryptum/event.rb CHANGED
@@ -18,19 +18,6 @@ module Cryptum
18
18
  require 'cryptum/event/scroll'
19
19
  require 'cryptum/event/sell'
20
20
 
21
- # autoload :BotConf, 'cryptum/event/bot_conf'
22
- # autoload :Buy, 'cryptum/event/buy'
23
- # autoload :Cancel, 'cryptum/event/cancel'
24
- # autoload :Exit, 'cryptum/event/exit'
25
- # autoload :GTFO, 'cryptum/event/gtfo'
26
- # autoload :History, 'cryptum/event/history'
27
- # autoload :KeyPress, 'cryptum/event/key_press'
28
- # autoload :OrderBook, 'cryptum/event/order_book'
29
- # autoload :Pane, 'cryptum/event/pane'
30
- # autoload :Parse, 'cryptum/event/parse'
31
- # autoload :Scroll, 'cryptum/event/scroll'
32
- # autoload :Sell, 'cryptum/event/sell'
33
-
34
21
  # Display Usage for this Module
35
22
 
36
23
  public_class_method def self.help
@@ -8,7 +8,6 @@ module Cryptum
8
8
  # Cryptum Curses Interface
9
9
  module Option
10
10
  require 'cryptum/option/choice'
11
- # autoload :Choice, 'cryptum/option/choice'
12
11
 
13
12
  # Options for cryptum Driver
14
13
  public_class_method def self.parser(opts = {})
@@ -83,6 +83,7 @@ module Cryptum
83
83
 
84
84
  event_history.order_book = order_book
85
85
  if option_choice.reset_session_countdown
86
+ event_history.order_book[:order_plan] = []
86
87
  event_history.order_book[:market_trend][:buy] = 0
87
88
  event_history.order_book[:market_trend][:sell] = 0
88
89
  event_history.order_book[:last_trend_reset] = Time.now.strftime(
@@ -11,11 +11,6 @@ module Cryptum
11
11
  require 'cryptum/order_book/market_trend'
12
12
  require 'cryptum/order_book/profit_margin'
13
13
 
14
- # autoload :Generate, 'cryptum/order_book/generate'
15
- # autoload :Indicator, 'cryptum/order_book/indicator'
16
- # autoload :MarketTrend, 'cryptum/order_book/market_trend'
17
- # autoload :ProfitMargin, 'cryptum/order_book/profit_margin'
18
-
19
14
  # Display Usage for this Module
20
15
  public_class_method def self.help
21
16
  constants.sort
@@ -6,7 +6,6 @@ module Cryptum
6
6
  # This plugin is used to instantiate a Cryptum logger with a custom message format
7
7
  module Portfolio
8
8
  require 'cryptum/portfolio/balance'
9
- # autoload :Balance, 'cryptum/portfolio/balance'
10
9
 
11
10
  # Display Usage for this Module
12
11
  public_class_method def self.help
@@ -413,7 +413,7 @@ module Cryptum
413
413
  event_history.order_execute_max_records_available_to_display = last_row if last_row < max_rows_to_display
414
414
  first_row = last_row - event_history.order_execute_max_records_available_to_display
415
415
  event_history.order_execute_index_offset = first_row
416
- remaining_blank_rows = (max_rows_to_display - last_row) + 1
416
+ remaining_blank_rows = max_rows_to_display - last_row
417
417
  end
418
418
 
419
419
  if order_history_meta.any?
@@ -485,17 +485,20 @@ module Cryptum
485
485
  # Clear to SUMMARY
486
486
  # (Only Applicable if order_book[:order_history_meta] < max_rows_to_display)
487
487
  # out_line_no += 1
488
- rows_to_blank = out_line_no + remaining_blank_rows - 1
489
- (out_line_no..rows_to_blank).each do |clr_line|
490
- out_line_no = clr_line
491
- order_execute_win.setpos(clr_line, Cryptum::UI.col_first)
492
- order_execute_win.clrtoeol
493
- Cryptum::UI.colorize(
494
- ui_win: order_execute_win,
495
- color: :white,
496
- style: :normal,
497
- string: ''.ljust(col_just1, ' ')
498
- )
488
+ if remaining_blank_rows.positive?
489
+ rows_to_blank = out_line_no + remaining_blank_rows
490
+ out_line_no += 1
491
+ (out_line_no..rows_to_blank).each do |clr_line|
492
+ out_line_no = clr_line
493
+ order_execute_win.setpos(clr_line, Cryptum::UI.col_first)
494
+ order_execute_win.clrtoeol
495
+ Cryptum::UI.colorize(
496
+ ui_win: order_execute_win,
497
+ color: :white,
498
+ style: :normal,
499
+ string: ''.ljust(col_just1, ' ')
500
+ )
501
+ end
499
502
  end
500
503
 
501
504
  # ROW 10
@@ -158,13 +158,14 @@ module Cryptum
158
158
  order_slice[:tpm] = tpm
159
159
  order_slice[:autotrade_percent] = autotrade_percent
160
160
  order_slice[:color] = plan_color
161
- order_slice[:last_slice] = last_slice_detected
161
+ order_slice[:last_slice] = false
162
162
 
163
163
  order_plan.push(order_slice) unless event_history.recalculate_order_plan
164
164
  fiat_budget -= fiat_investing
165
165
  previous_slice_fiat_investing = fiat_investing
166
166
  plan_no_slice += 1
167
167
  end
168
+ order_plan.last[:last_slice] = true
168
169
  event_history.order_book[:order_plan] = order_plan
169
170
  end
170
171
 
@@ -174,7 +175,7 @@ module Cryptum
174
175
 
175
176
  if event_history.red_pill
176
177
  order_plan_prefix = '--'
177
- max_order_plan_slices = '0'
178
+ # max_order_plan_slices = '0'
178
179
  order_plan_volume_out = '0.00'
179
180
  order_plan_profit_sum_out = '0.00'
180
181
  order_plan_exec_percent = '0.00'
@@ -353,7 +354,6 @@ module Cryptum
353
354
  first_row = last_row - event_history.order_plan_max_records_available_to_display
354
355
  event_history.order_plan_index_offset = first_row
355
356
  remaining_blank_rows = max_rows_to_display - last_row
356
- remaining_blank_rows = max_rows_to_display - last_row - 1 if last_row < max_rows_to_display
357
357
  end
358
358
 
359
359
  selected_order = event_history.order_plan_selected_data
@@ -421,29 +421,23 @@ module Cryptum
421
421
  end
422
422
  event_history.order_plan_selected_data = selected_order
423
423
 
424
- if order_plan.length < 9
425
- lines_to_clear = 9 - order_plan.length
426
- (1..lines_to_clear).each do |_line|
427
- out_line_no += 1
428
- order_plan_win.setpos(out_line_no, Cryptum::UI.col_first)
429
- order_plan_win.clrtoeol
430
- end
431
- end
432
-
433
424
  # Clear to SUMMARY
434
425
  # (Only Applicable if order_book[:order_plan] < max_rows_to_display)
435
426
  # out_line_no += 1
436
- rows_to_blank = (out_line_no + remaining_blank_rows) - 1
437
- (out_line_no..rows_to_blank).each do |clr_line|
438
- out_line_no = clr_line
439
- order_plan_win.setpos(clr_line, Cryptum::UI.col_first)
440
- order_plan_win.clrtoeol
441
- Cryptum::UI.colorize(
442
- ui_win: order_plan_win,
443
- color: :white,
444
- style: :normal,
445
- string: ''.ljust(col_just1, ' ')
446
- )
427
+ if remaining_blank_rows.positive?
428
+ rows_to_blank = (out_line_no + remaining_blank_rows)
429
+ out_line_no += 1
430
+ (out_line_no..rows_to_blank).each do |clr_line|
431
+ out_line_no = clr_line
432
+ order_plan_win.setpos(clr_line, Cryptum::UI.col_first)
433
+ order_plan_win.clrtoeol
434
+ Cryptum::UI.colorize(
435
+ ui_win: order_plan_win,
436
+ color: :white,
437
+ style: :normal,
438
+ string: ''.ljust(col_just1, ' ')
439
+ )
440
+ end
447
441
  end
448
442
 
449
443
  # ROW 10
@@ -457,7 +451,7 @@ module Cryptum
457
451
  string: ''.ljust(col_just1, ' ')
458
452
  )
459
453
 
460
- header_str = "CYCLE SUMMARY | Slices: #{max_order_plan_slices} | Risk Allocated: $#{order_plan_volume_out} | Profit: $#{order_plan_profit_sum_out} | #{order_plan_exec_percent}% Done"
454
+ header_str = "CYCLE SUMMARY | Risk Allocated: $#{order_plan_volume_out} | Profit: $#{order_plan_profit_sum_out} | #{order_plan_exec_percent}% Done"
461
455
  order_plan_win.setpos(
462
456
  out_line_no,
463
457
  Cryptum::UI.col_center(str: header_str)
data/lib/cryptum/ui.rb CHANGED
@@ -20,19 +20,6 @@ module Cryptum
20
20
  require 'cryptum/ui/order_execute_details'
21
21
  require 'cryptum/ui/command'
22
22
 
23
- # autoload :KeyPressEvent, 'cryptum/ui/key_press_event'
24
- # autoload :TerminalWindow, 'cryptum/ui/terminal_window'
25
- # autoload :Ticker, 'cryptum/ui/ticker'
26
- # autoload :Portfolio, 'cryptum/ui/portfolio'
27
- # autoload :OrderPlan, 'cryptum/ui/order_plan'
28
- # autoload :OrderPlanDetails, 'cryptum/ui/order_plan_details'
29
- # autoload :OrderTimer, 'cryptum/ui/order_timer'
30
- # autoload :MarketTrend, 'cryptum/ui/market_trend'
31
- # autoload :SignalEngine, 'cryptum/ui/signal_engine'
32
- # autoload :OrderExecution, 'cryptum/ui/order_execution'
33
- # autoload :OrderExecuteDetails, 'cryptum/ui/order_execute_details'
34
- # autoload :Command, 'cryptum/ui/command'
35
-
36
23
  # Initialize the UI
37
24
  public_class_method def self.init
38
25
  # Initialize curses Screen
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- VERSION = '0.0.330'
4
+ VERSION = '0.0.332'
5
5
  end
@@ -7,9 +7,6 @@ module Cryptum
7
7
  require 'cryptum/web_sock/coinbase'
8
8
  require 'cryptum/web_sock/event_machine'
9
9
 
10
- # autoload :Coinbase, 'cryptum/web_sock/coinbase'
11
- # autoload :EventMachine, 'cryptum/web_sock/event_machine'
12
-
13
10
  # Display Usage for this Module
14
11
 
15
12
  public_class_method def self.help
data/lib/cryptum.rb CHANGED
@@ -22,19 +22,6 @@ module Cryptum
22
22
  require 'cryptum/version'
23
23
  require 'cryptum/web_sock'
24
24
 
25
- # autoload :API, 'cryptum/api'
26
- # autoload :BotConf, 'cryptum/bot_conf'
27
- # autoload :Event, 'cryptum/event'
28
- # autoload :Indicator, 'cryptum/indicator'
29
- # autoload :Log, 'cryptum/log'
30
- # autoload :Matrix, 'cryptum/matrix'
31
- # autoload :Option, 'cryptum/option'
32
- # autoload :OrderBook, 'cryptum/order_book'
33
- # autoload :Portfolio, 'cryptum/portfolio'
34
- # autoload :ProbabilityEngine, 'cryptum/probability_engine'
35
- # autoload :UI, 'cryptum/ui'
36
- # autoload :WebSock, 'cryptum/web_sock'
37
-
38
25
  public_class_method def self.bin
39
26
  File.join root, 'bin'
40
27
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cryptum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.330
4
+ version: 0.0.332
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.