cryptum 0.0.399 → 0.0.401
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/README.md +20 -20
- data/lib/cryptum/event/pane.rb +10 -4
- data/lib/cryptum/log.rb +8 -6
- data/lib/cryptum/option/input_validation.rb +26 -20
- data/lib/cryptum/option/parser.rb +6 -6
- data/lib/cryptum/ui/matrix.rb +95 -99
- data/lib/cryptum/ui/order/execute.rb +2 -28
- data/lib/cryptum/ui/order/plan.rb +1 -42
- data/lib/cryptum/ui/signal_engine.rb +1 -10
- data/lib/cryptum/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0e8b9a02dddfb1118d13518d0ebf16703f0a988f563ff6556090a055b67f82d0
|
|
4
|
+
data.tar.gz: ba8469969bd9f73d0df3abe8c233bcdf7aa128b8cc1442d94daaca15c8adbf91
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dac3148c7e98d46d05581021fb6d0df376fcc738913ec329f3511ab3e4ca5f8afe02387e2b42ccc21598734ecf01919e36722bc74f101d2de6adf1babc141692
|
|
7
|
+
data.tar.gz: 806f4873cdc8e57262f62c3ad8bd54568434222848f0905b7431ca3d1dacef00555d683c6d6ff1ef60f0856678dde6089c836c6d8ca02d9aa38c3bbabad332dc
|
data/Gemfile
CHANGED
|
@@ -11,7 +11,7 @@ gemspec
|
|
|
11
11
|
# In some circumstances custom flags are passed to gems in order
|
|
12
12
|
# to build appropriately. Defer to ./reinstall_coinbot_gemset.sh
|
|
13
13
|
# to review these custom flags
|
|
14
|
-
gem 'addressable', '2.8.
|
|
14
|
+
gem 'addressable', '2.8.3'
|
|
15
15
|
gem 'bundler', '>=2.4.10'
|
|
16
16
|
gem 'bundler-audit', '0.9.1'
|
|
17
17
|
gem 'curses', '1.4.4'
|
data/README.md
CHANGED
|
@@ -68,38 +68,38 @@ USAGE: cryptum [opts]
|
|
|
68
68
|
-R, --[no-]reset-trend-countdown <Optional - Reset Market Trend Countdown at Session Init (Defaults to false)>
|
|
69
69
|
-r, --session-root=PATH <Optional - Directory with etc && order_books (Defaults to ~/cryptum)>
|
|
70
70
|
-S, --[no-]sandbox <Optional - Use Coinbase Sandbox Environment for Testing Ideas>
|
|
71
|
-
-t, --trend-reset-time=
|
|
71
|
+
-t, --trend-reset-time=TIME <Optional - Time Between Market Trend Reset (Default 1D)>
|
|
72
72
|
```
|
|
73
73
|
|
|
74
74
|
Example usage to trade on weekly instead of default daily:
|
|
75
75
|
```
|
|
76
76
|
$ cryptum --symbol btc-usd \
|
|
77
77
|
--session-root ~/cryptum \
|
|
78
|
-
--trend-reset-time
|
|
78
|
+
--trend-reset-time 1W
|
|
79
79
|
```
|
|
80
80
|
|
|
81
81
|
By default, cryptum resets the market trend (i.e. number of buys vs number of sells) every day (i.e. 86400 seconds). As Maker & Taker fees drop in value, it may be useful to change the market trend reset value to something lower (e.g. 4 hours):
|
|
82
82
|
```
|
|
83
83
|
$ cryptum --symbol btc-usd \
|
|
84
84
|
--session-root ~/cryptum \
|
|
85
|
-
--trend-reset-time
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
Possible values for `--trend-reset-time` reside in the
|
|
89
|
-
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
85
|
+
--trend-reset-time 4h
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Possible values for `--trend-reset-time` reside in the UI Label column:
|
|
89
|
+
|Description|UI Label |
|
|
90
|
+
|-----------|----------|
|
|
91
|
+
|1 week |`1W` |
|
|
92
|
+
|1 day |`1D` |
|
|
93
|
+
|4 hours |`4h` |
|
|
94
|
+
|3 hours |`3h` |
|
|
95
|
+
|2 hours |`2h` |
|
|
96
|
+
|1 hour |`1h` |
|
|
97
|
+
|5 minutes |`45m` |
|
|
98
|
+
|30 minutes |`30m` |
|
|
99
|
+
|15 minutes |`15m` |
|
|
100
|
+
|5 minutes |`5m` |
|
|
101
|
+
|3 minutes |`3m` |
|
|
102
|
+
|1 minute |`1m` |
|
|
103
103
|
|
|
104
104
|
If you choose a lower value than the default, the target profit margin's (i.e. TPM) will also be reduced (assuming the TPM is still higher than Maker + Taker fees). This may be desireable - although TPM is reduced, trading volume should increase resulting in better Maker & Taker fee tiers (i.e. lower cost / trade).
|
|
105
105
|
|
data/lib/cryptum/event/pane.rb
CHANGED
|
@@ -37,12 +37,18 @@ module Cryptum
|
|
|
37
37
|
|
|
38
38
|
if event_history.order_plan_win_active
|
|
39
39
|
unless event_history.red_pill
|
|
40
|
-
event_history.order_plan_details_win_active =
|
|
41
|
-
|
|
40
|
+
event_history.order_plan_details_win_active = if event_history.order_plan_details_win_active
|
|
41
|
+
false
|
|
42
|
+
else
|
|
43
|
+
true
|
|
44
|
+
end
|
|
42
45
|
end
|
|
43
46
|
elsif event_history.order_execute_win_active
|
|
44
|
-
event_history.order_execute_details_win_active =
|
|
45
|
-
|
|
47
|
+
event_history.order_execute_details_win_active = if event_history.order_execute_details_win_active
|
|
48
|
+
false
|
|
49
|
+
else
|
|
50
|
+
true
|
|
51
|
+
end
|
|
46
52
|
end
|
|
47
53
|
rescue Interrupt, StandardError => e
|
|
48
54
|
Cryptum::Log.append(level: :error, msg: e, which_self: self, event_history: event_history)
|
data/lib/cryptum/log.rb
CHANGED
|
@@ -33,11 +33,10 @@ module Cryptum
|
|
|
33
33
|
exit_gracefully = true
|
|
34
34
|
logger.level = Logger::ERROR
|
|
35
35
|
when :fatal
|
|
36
|
-
# This is reserved for
|
|
37
|
-
#
|
|
38
|
-
#
|
|
39
|
-
#
|
|
40
|
-
# to log to file and exit.
|
|
36
|
+
# This is reserved for the Cryptum::UI::Exit module
|
|
37
|
+
# if the Interrupt or StandardError exceptions are
|
|
38
|
+
# triggered. This prevents infintely attempting to
|
|
39
|
+
# exit if something in the module fails.
|
|
41
40
|
logger.level = Logger::FATAL
|
|
42
41
|
when :unknown
|
|
43
42
|
logger.level = Logger::UNKNOWN
|
|
@@ -46,7 +45,9 @@ module Cryptum
|
|
|
46
45
|
when :info
|
|
47
46
|
logger.level = Logger::INFO
|
|
48
47
|
else
|
|
49
|
-
|
|
48
|
+
level_error = "ERROR: Invalid log level. Valid options are:\n"
|
|
49
|
+
level_error += ":info\n:warn\n:unknown\n:fatal\n:error\n:debug"
|
|
50
|
+
raise level_error
|
|
50
51
|
end
|
|
51
52
|
|
|
52
53
|
logger.datetime_format = '%Y-%m-%d %H:%M:%S.%N'
|
|
@@ -62,6 +63,7 @@ module Cryptum
|
|
|
62
63
|
exit_gracefully = true
|
|
63
64
|
else
|
|
64
65
|
log_event += " => #{msg}"
|
|
66
|
+
log_event += " => #{msg.backtrace}" if msg.respond_to?('backtrace')
|
|
65
67
|
end
|
|
66
68
|
|
|
67
69
|
logger.add(logger.level, log_event, which_self)
|
|
@@ -22,38 +22,44 @@ module Cryptum
|
|
|
22
22
|
reason = :session_root
|
|
23
23
|
end
|
|
24
24
|
|
|
25
|
-
option_choice.market_trend_reset =
|
|
26
|
-
unless option_choice.market_trend_reset.to_i >= 60 &&
|
|
27
|
-
option_choice.market_trend_reset <= 604_800
|
|
28
|
-
usage = true
|
|
29
|
-
reason = :market_trend_reset
|
|
30
|
-
end
|
|
31
|
-
|
|
25
|
+
option_choice.market_trend_reset = '1D' if option_choice.market_trend_reset.nil?
|
|
32
26
|
case option_choice.market_trend_reset
|
|
33
|
-
when
|
|
27
|
+
when '1W'
|
|
34
28
|
option_choice.market_trend_reset_label = '1W'
|
|
35
|
-
|
|
29
|
+
option_choice.market_trend_reset = 604_800
|
|
30
|
+
when '1D'
|
|
36
31
|
option_choice.market_trend_reset_label = '1D'
|
|
37
|
-
|
|
32
|
+
option_choice.market_trend_reset = 86_400
|
|
33
|
+
when '4h'
|
|
38
34
|
option_choice.market_trend_reset_label = '4h'
|
|
39
|
-
|
|
35
|
+
option_choice.market_trend_reset = 14_400
|
|
36
|
+
when '3h'
|
|
40
37
|
option_choice.market_trend_reset_label = '3h'
|
|
41
|
-
|
|
38
|
+
option_choice.market_trend_reset = 10_800
|
|
39
|
+
when '2h'
|
|
42
40
|
option_choice.market_trend_reset_label = '2h'
|
|
43
|
-
|
|
41
|
+
option_choice.market_trend_reset = 7_200
|
|
42
|
+
when '1h'
|
|
44
43
|
option_choice.market_trend_reset_label = '1h'
|
|
45
|
-
|
|
44
|
+
option_choice.market_trend_reset = 3_600
|
|
45
|
+
when '45m'
|
|
46
46
|
option_choice.market_trend_reset_label = '45m'
|
|
47
|
-
|
|
47
|
+
option_choice.market_trend_reset = 2_700
|
|
48
|
+
when '30m'
|
|
48
49
|
option_choice.market_trend_reset_label = '30m'
|
|
49
|
-
|
|
50
|
+
option_choice.market_trend_reset = 1_800
|
|
51
|
+
when '15m'
|
|
50
52
|
option_choice.market_trend_reset_label = '15m'
|
|
51
|
-
|
|
53
|
+
option_choice.market_trend_reset = 900
|
|
54
|
+
when '5m'
|
|
52
55
|
option_choice.market_trend_reset_label = '5m'
|
|
53
|
-
|
|
56
|
+
option_choice.market_trend_reset = 300
|
|
57
|
+
when '3m'
|
|
54
58
|
option_choice.market_trend_reset_label = '3m'
|
|
55
|
-
|
|
59
|
+
option_choice.market_trend_reset = 180
|
|
60
|
+
when '1m'
|
|
56
61
|
option_choice.market_trend_reset_label = '1m'
|
|
62
|
+
option_choice.market_trend_reset = 60
|
|
57
63
|
else
|
|
58
64
|
usage = true
|
|
59
65
|
reason = :market_trend_reset
|
|
@@ -66,7 +72,7 @@ module Cryptum
|
|
|
66
72
|
when :session_root
|
|
67
73
|
puts "ERROR: #{option_choice.session_root} does not exist.\n\n"
|
|
68
74
|
when :market_trend_reset
|
|
69
|
-
puts "ERROR: #{option_choice.market_trend_reset} - Possible values are:
|
|
75
|
+
puts "ERROR: #{option_choice.market_trend_reset} - Possible values are: 1W, 1D, 4h, 3h, 2h, 1h, 45m, 30m, 15m, 5m, 3m, 1m\n\n"
|
|
70
76
|
end
|
|
71
77
|
|
|
72
78
|
puts `#{option_choice.driver_name} --help`
|
|
@@ -35,7 +35,7 @@ module Cryptum
|
|
|
35
35
|
'-R',
|
|
36
36
|
'--[no-]reset-trend-countdown',
|
|
37
37
|
'<Optional - Reset Market Trend Countdown at Session Init (Defaults to false)>'
|
|
38
|
-
) { |
|
|
38
|
+
) { |r| option_choice.reset_session_countdown = r }
|
|
39
39
|
|
|
40
40
|
options.on(
|
|
41
41
|
'-rPATH',
|
|
@@ -47,13 +47,13 @@ module Cryptum
|
|
|
47
47
|
'-S',
|
|
48
48
|
'--[no-]sandbox',
|
|
49
49
|
'<Optional - Use Coinbase Sandbox Environment for Testing Ideas>'
|
|
50
|
-
) { |
|
|
50
|
+
) { |s| option_choice.sandbox = s }
|
|
51
51
|
|
|
52
52
|
options.on(
|
|
53
|
-
'-
|
|
54
|
-
'--trend-reset-time=
|
|
55
|
-
'<Optional -
|
|
56
|
-
) { |t| option_choice.market_trend_reset = t
|
|
53
|
+
'-tTIME',
|
|
54
|
+
'--trend-reset-time=TIME',
|
|
55
|
+
'<Optional - Time Between Market Trend Reset (Default 1D)>'
|
|
56
|
+
) { |t| option_choice.market_trend_reset = t }
|
|
57
57
|
end.parse!
|
|
58
58
|
|
|
59
59
|
Cryptum::Option::InputValidation.check(option_choice: option_choice)
|
data/lib/cryptum/ui/matrix.rb
CHANGED
|
@@ -16,101 +16,101 @@ module Cryptum
|
|
|
16
16
|
cols = opts[:cols].to_i
|
|
17
17
|
|
|
18
18
|
matrix_arr = [
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
19
|
+
"\u30a0",
|
|
20
|
+
"\u30a1",
|
|
21
|
+
"\u30a2",
|
|
22
|
+
"\u30a3",
|
|
23
|
+
"\u30a4",
|
|
24
|
+
"\u30a5",
|
|
25
|
+
"\u30a6",
|
|
26
|
+
"\u30a7",
|
|
27
|
+
"\u30a8",
|
|
28
|
+
"\u30a9",
|
|
29
|
+
"\u30aa",
|
|
30
|
+
"\u30ab",
|
|
31
|
+
"\u30ac",
|
|
32
|
+
"\u30ad",
|
|
33
|
+
"\u30ae",
|
|
34
|
+
"\u30af",
|
|
35
|
+
"\u30b0",
|
|
36
|
+
"\u30b1",
|
|
37
|
+
"\u30b2",
|
|
38
|
+
"\u30b3",
|
|
39
|
+
"\u30b4",
|
|
40
|
+
"\u30b5",
|
|
41
|
+
"\u30b6",
|
|
42
|
+
"\u30b7",
|
|
43
|
+
"\u30b8",
|
|
44
|
+
"\u30b9",
|
|
45
|
+
"\u30ba",
|
|
46
|
+
"\u30bb",
|
|
47
|
+
"\u30bc",
|
|
48
|
+
"\u30bd",
|
|
49
|
+
"\u30be",
|
|
50
|
+
"\u30bf",
|
|
51
|
+
"\u30c0",
|
|
52
|
+
"\u30c1",
|
|
53
|
+
"\u30c2",
|
|
54
|
+
"\u30c3",
|
|
55
|
+
"\u30c4",
|
|
56
|
+
"\u30c5",
|
|
57
|
+
"\u30c6",
|
|
58
|
+
"\u30c7",
|
|
59
|
+
"\u30c8",
|
|
60
|
+
"\u30c9",
|
|
61
|
+
"\u30ca",
|
|
62
|
+
"\u30cb",
|
|
63
|
+
"\u30cc",
|
|
64
|
+
"\u30cd",
|
|
65
|
+
"\u30ce",
|
|
66
|
+
"\u30cf",
|
|
67
|
+
"\u30d0",
|
|
68
|
+
"\u30d1",
|
|
69
|
+
"\u30d2",
|
|
70
|
+
"\u30d3",
|
|
71
|
+
"\u30d4",
|
|
72
|
+
"\u30d5",
|
|
73
|
+
"\u30d6",
|
|
74
|
+
"\u30d7",
|
|
75
|
+
"\u30d8",
|
|
76
|
+
"\u30d9",
|
|
77
|
+
"\u30da",
|
|
78
|
+
"\u30db",
|
|
79
|
+
"\u30dc",
|
|
80
|
+
"\u30dd",
|
|
81
|
+
"\u30de",
|
|
82
|
+
"\u30df",
|
|
83
|
+
"\u30e0",
|
|
84
|
+
"\u30e1",
|
|
85
|
+
"\u30e2",
|
|
86
|
+
"\u30e3",
|
|
87
|
+
"\u30e4",
|
|
88
|
+
"\u30e5",
|
|
89
|
+
"\u30e6",
|
|
90
|
+
"\u30e7",
|
|
91
|
+
"\u30e8",
|
|
92
|
+
"\u30e9",
|
|
93
|
+
"\u30ea",
|
|
94
|
+
"\u30eb",
|
|
95
|
+
"\u30ec",
|
|
96
|
+
"\u30ed",
|
|
97
|
+
"\u30ee",
|
|
98
|
+
"\u30ef",
|
|
99
|
+
"\u30f0",
|
|
100
|
+
"\u30f1",
|
|
101
|
+
"\u30f2",
|
|
102
|
+
"\u30f3",
|
|
103
|
+
"\u30f4",
|
|
104
|
+
"\u30f5",
|
|
105
|
+
"\u30f6",
|
|
106
|
+
"\u30f7",
|
|
107
|
+
"\u30f8",
|
|
108
|
+
"\u30f9",
|
|
109
|
+
"\u30fa",
|
|
110
|
+
"\u30fb",
|
|
111
|
+
"\u30fc",
|
|
112
|
+
"\u30fd",
|
|
113
|
+
"\u30fe",
|
|
114
114
|
'0 ',
|
|
115
115
|
'1 ',
|
|
116
116
|
'2 ',
|
|
@@ -159,15 +159,11 @@ module Cryptum
|
|
|
159
159
|
', '
|
|
160
160
|
]
|
|
161
161
|
|
|
162
|
-
# last_index = matrix_arr.length - 1
|
|
163
|
-
|
|
164
162
|
matrix_row = ''
|
|
165
163
|
most_cols = cols - 1
|
|
166
164
|
most_cols.times.each do
|
|
167
|
-
# matrix_row += "#{matrix_arr[Random.rand(0..last_index)]} "
|
|
168
165
|
matrix_row += "#{matrix_arr.sample} "
|
|
169
166
|
end
|
|
170
|
-
# matrix_row += matrix_arr[Random.rand(0..last_index)]
|
|
171
167
|
matrix_row += matrix_arr.sample
|
|
172
168
|
rescue Interrupt, StandardError => e
|
|
173
169
|
Cryptum::Log.append(level: :error, msg: e, which_self: self)
|
|
@@ -330,8 +330,7 @@ module Cryptum
|
|
|
330
330
|
# TODO: Everything Above this Line Needs to be Indicators ^
|
|
331
331
|
|
|
332
332
|
# UI
|
|
333
|
-
col_just1 =
|
|
334
|
-
col_just4 = Curses.cols - Cryptum::UI.col_fourth
|
|
333
|
+
col_just1 = Curses.cols - Cryptum::UI.col_first
|
|
335
334
|
|
|
336
335
|
# ROW 1
|
|
337
336
|
out_line_no = 0
|
|
@@ -375,19 +374,10 @@ module Cryptum
|
|
|
375
374
|
string: header_str
|
|
376
375
|
)
|
|
377
376
|
|
|
378
|
-
order_execute_win.setpos(out_line_no, Cryptum::UI.col_fourth)
|
|
379
|
-
order_execute_win.clrtoeol
|
|
380
|
-
Cryptum::UI.colorize(
|
|
381
|
-
ui_win: order_execute_win,
|
|
382
|
-
color: header_color,
|
|
383
|
-
style: header_style,
|
|
384
|
-
string: ''.ljust(col_just4, ' ')
|
|
385
|
-
)
|
|
386
|
-
|
|
387
377
|
# ROWS 3-10
|
|
388
378
|
remaining_blank_rows = 0
|
|
389
|
-
remaining_blank_rows = max_rows_to_display if order_history_meta.empty?
|
|
390
379
|
max_rows_to_display = event_history.order_execute_max_rows_to_display
|
|
380
|
+
remaining_blank_rows = max_rows_to_display if order_history_meta.empty?
|
|
391
381
|
first_row = event_history.order_execute_index_offset
|
|
392
382
|
last_row = first_row + max_rows_to_display
|
|
393
383
|
if last_row >= order_history_meta.length
|
|
@@ -453,13 +443,6 @@ module Cryptum
|
|
|
453
443
|
style: style,
|
|
454
444
|
string: order_exec_ln.ljust(col_just1, '.')
|
|
455
445
|
)
|
|
456
|
-
|
|
457
|
-
Cryptum::UI.colorize(
|
|
458
|
-
ui_win: order_execute_win,
|
|
459
|
-
color: meta[:color],
|
|
460
|
-
style: style,
|
|
461
|
-
string: ''.ljust(col_just4, ' ')
|
|
462
|
-
)
|
|
463
446
|
end
|
|
464
447
|
event_history.order_execute_selected_data = selected_order
|
|
465
448
|
end
|
|
@@ -510,15 +493,6 @@ module Cryptum
|
|
|
510
493
|
string: header_str
|
|
511
494
|
)
|
|
512
495
|
|
|
513
|
-
# order_execute_win.setpos(out_line_no, Cryptum::UI.col_fourth)
|
|
514
|
-
# order_execute_win.clrtoeol
|
|
515
|
-
# Cryptum::UI.colorize(
|
|
516
|
-
# ui_win: order_execute_win,
|
|
517
|
-
# color: header_color,
|
|
518
|
-
# style: header_style,
|
|
519
|
-
# string: ''.ljust(col_just4, ' ')
|
|
520
|
-
# )
|
|
521
|
-
|
|
522
496
|
# ROW 11
|
|
523
497
|
out_line_no += 1
|
|
524
498
|
Cryptum::UI.line(
|
|
@@ -189,7 +189,6 @@ module Cryptum
|
|
|
189
189
|
|
|
190
190
|
if event_history.red_pill
|
|
191
191
|
order_plan_prefix = '--'
|
|
192
|
-
# max_order_plan_slices = '0'
|
|
193
192
|
order_plan_volume_out = '0.00'
|
|
194
193
|
order_plan_profit_sum_out = '0.00'
|
|
195
194
|
order_plan_exec_percent = '0.00'
|
|
@@ -224,8 +223,7 @@ module Cryptum
|
|
|
224
223
|
# TODO: Everything Above this Line Needs to be Indicators ^
|
|
225
224
|
|
|
226
225
|
# UI
|
|
227
|
-
col_just1 =
|
|
228
|
-
col_just4 = Curses.cols - Cryptum::UI.col_fourth
|
|
226
|
+
col_just1 = Curses.cols - Cryptum::UI.col_first
|
|
229
227
|
|
|
230
228
|
# ROW 1
|
|
231
229
|
out_line_no = 0
|
|
@@ -270,14 +268,6 @@ module Cryptum
|
|
|
270
268
|
string: header_str
|
|
271
269
|
)
|
|
272
270
|
|
|
273
|
-
order_plan_win.setpos(out_line_no, Cryptum::UI.col_fourth)
|
|
274
|
-
Cryptum::UI.colorize(
|
|
275
|
-
ui_win: order_plan_win,
|
|
276
|
-
color: header_color,
|
|
277
|
-
style: header_style,
|
|
278
|
-
string: ''.ljust(col_just4, ' ')
|
|
279
|
-
)
|
|
280
|
-
|
|
281
271
|
# ROWS 3-10
|
|
282
272
|
remaining_blank_rows = 0
|
|
283
273
|
max_rows_to_display = event_history.order_plan_max_rows_to_display
|
|
@@ -305,14 +295,6 @@ module Cryptum
|
|
|
305
295
|
string: red_pill_alert
|
|
306
296
|
)
|
|
307
297
|
|
|
308
|
-
order_plan_win.setpos(out_line_no, Cryptum::UI.col_fourth)
|
|
309
|
-
Cryptum::UI.colorize(
|
|
310
|
-
ui_win: order_plan_win,
|
|
311
|
-
color: :red,
|
|
312
|
-
style: :highlight,
|
|
313
|
-
string: ''.ljust(col_just4, ' ')
|
|
314
|
-
)
|
|
315
|
-
|
|
316
298
|
out_line_no += 1
|
|
317
299
|
order_plan_win.setpos(out_line_no, Cryptum::UI.col_first)
|
|
318
300
|
order_plan_win.clrtoeol
|
|
@@ -334,13 +316,6 @@ module Cryptum
|
|
|
334
316
|
string: red_pill_msg
|
|
335
317
|
)
|
|
336
318
|
|
|
337
|
-
order_plan_win.setpos(out_line_no, Cryptum::UI.col_fourth)
|
|
338
|
-
Cryptum::UI.colorize(
|
|
339
|
-
ui_win: order_plan_win,
|
|
340
|
-
color: :yellow,
|
|
341
|
-
string: ''.ljust(col_just4, ' ')
|
|
342
|
-
)
|
|
343
|
-
|
|
344
319
|
max_rows_to_display.times.each do
|
|
345
320
|
out_line_no += 1
|
|
346
321
|
this_matrix_row = Cryptum::UI::Matrix.generate(cols: Curses.cols)
|
|
@@ -425,13 +400,6 @@ module Cryptum
|
|
|
425
400
|
style: style,
|
|
426
401
|
string: "#{order_plan_invest}#{order_plan_return}".ljust(col_just1, '.')
|
|
427
402
|
)
|
|
428
|
-
|
|
429
|
-
Cryptum::UI.colorize(
|
|
430
|
-
ui_win: order_plan_win,
|
|
431
|
-
color: plan_color,
|
|
432
|
-
style: style,
|
|
433
|
-
string: ''.ljust(col_just4, ' ')
|
|
434
|
-
)
|
|
435
403
|
end
|
|
436
404
|
event_history.order_plan_selected_data = selected_order
|
|
437
405
|
|
|
@@ -479,15 +447,6 @@ module Cryptum
|
|
|
479
447
|
style: header_style,
|
|
480
448
|
string: header_str
|
|
481
449
|
)
|
|
482
|
-
|
|
483
|
-
# order_plan_win.setpos(out_line_no, Cryptum::UI.col_fourth)
|
|
484
|
-
# order_plan_win.clrtoeol
|
|
485
|
-
# Cryptum::UI.colorize(
|
|
486
|
-
# ui_win: order_plan_win,
|
|
487
|
-
# color: header_color,
|
|
488
|
-
# style: header_style,
|
|
489
|
-
# string: ''.ljust(col_just4, ' ')
|
|
490
|
-
# )
|
|
491
450
|
end
|
|
492
451
|
|
|
493
452
|
# ROW 11
|
|
@@ -40,8 +40,7 @@ module Cryptum
|
|
|
40
40
|
# TODO: Everything Above this Line Needs to be Indicators ^
|
|
41
41
|
|
|
42
42
|
# UI
|
|
43
|
-
col_just1 =
|
|
44
|
-
col_just4 = Curses.cols - Cryptum::UI.col_fourth
|
|
43
|
+
col_just1 = Curses.cols - Cryptum::UI.col_first
|
|
45
44
|
|
|
46
45
|
# ROW 1
|
|
47
46
|
out_line_no = 0
|
|
@@ -74,14 +73,6 @@ module Cryptum
|
|
|
74
73
|
string: action_signal_out
|
|
75
74
|
)
|
|
76
75
|
|
|
77
|
-
signal_engine_win.setpos(out_line_no, Cryptum::UI.col_fourth)
|
|
78
|
-
Cryptum::UI.colorize(
|
|
79
|
-
ui_win: signal_engine_win,
|
|
80
|
-
color: signal_color,
|
|
81
|
-
style: :reverse,
|
|
82
|
-
string: ''.ljust(col_just4, ' ')
|
|
83
|
-
)
|
|
84
|
-
|
|
85
76
|
signal_engine_win.refresh
|
|
86
77
|
|
|
87
78
|
indicator_status.action_signal = action_signal
|
data/lib/cryptum/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cryptum
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.401
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- 0day Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-04-
|
|
11
|
+
date: 2023-04-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: addressable
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - '='
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 2.8.
|
|
19
|
+
version: 2.8.3
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - '='
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: 2.8.
|
|
26
|
+
version: 2.8.3
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: bundler
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|