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 +4 -4
- data/lib/cryptum/event.rb +0 -13
- data/lib/cryptum/option.rb +0 -1
- data/lib/cryptum/order_book/generate.rb +1 -0
- data/lib/cryptum/order_book.rb +0 -5
- data/lib/cryptum/portfolio.rb +0 -1
- data/lib/cryptum/ui/order_execution.rb +15 -12
- data/lib/cryptum/ui/order_plan.rb +18 -24
- data/lib/cryptum/ui.rb +0 -13
- data/lib/cryptum/version.rb +1 -1
- data/lib/cryptum/web_sock.rb +0 -3
- data/lib/cryptum.rb +0 -13
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 198cefce702d824cf08884303792c044e47e371254b4f0a8ee57080a481d4b2c
|
4
|
+
data.tar.gz: 22952150819ac8b4f5e51eee655daead31f743baeba36c5c6220348ec4b0657d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/cryptum/option.rb
CHANGED
@@ -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(
|
data/lib/cryptum/order_book.rb
CHANGED
@@ -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
|
data/lib/cryptum/portfolio.rb
CHANGED
@@ -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 =
|
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
|
-
|
489
|
-
|
490
|
-
out_line_no
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
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] =
|
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
|
-
|
437
|
-
|
438
|
-
out_line_no
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
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 |
|
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
|
data/lib/cryptum/version.rb
CHANGED
data/lib/cryptum/web_sock.rb
CHANGED
@@ -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
|