cryptum 0.0.274 → 0.0.275
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bfa0e97a03d33ebdf5f3b3cdf06bc5b80a6315380a25ee3bf472777387e05852
|
4
|
+
data.tar.gz: 7b677b783b0beb34c32f6dd48dc5198c807f5123b30ee741252f16e1f8905221
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8666c51fbc50b5910334fda2c8f0faacf8b636e647f671cf604d28a5b503de97e93708f7a3dae34729a28f4180ee2faf53f767a1bcfb9c98cd6343b0c003d02f
|
7
|
+
data.tar.gz: ab5539626474fc75d0a72eac9d9046697f1dfcdb356a6cd83b6cb1d895151483917624c791e36eadcf58e6a40f9da5ffdaaebad5536892b85149831fe54bb282
|
@@ -72,7 +72,7 @@ module Cryptum
|
|
72
72
|
gross_tpm = bot_conf[:target_profit_margin_percent].to_f
|
73
73
|
|
74
74
|
# Only retain past 24 hours of
|
75
|
-
# order history meta for
|
75
|
+
# order history meta for bought, sold, and expired
|
76
76
|
# keep open limit sell orders indefintely
|
77
77
|
before_twenty_four_hrs_ago = Time.now - 86400
|
78
78
|
order_history = event_history.order_book[:order_history]
|
@@ -81,7 +81,7 @@ module Cryptum
|
|
81
81
|
next unless ohm[:done_at]
|
82
82
|
Time.parse(ohm[:done_at]) < before_twenty_four_hrs_ago &&
|
83
83
|
(
|
84
|
-
ohm[:color].to_sym == :
|
84
|
+
ohm[:color].to_sym == :white ||
|
85
85
|
ohm[:color].to_sym == :green ||
|
86
86
|
ohm[:color].to_sym == :cyan ||
|
87
87
|
ohm[:color].to_sym == :red
|
@@ -95,7 +95,7 @@ module Cryptum
|
|
95
95
|
order_history.find do |oh|
|
96
96
|
oh[:id] == ohm[:buy_order_id] ||
|
97
97
|
oh[:id] == ohm[:sell_order_id] ||
|
98
|
-
ohm[:color].to_sym == :
|
98
|
+
ohm[:color].to_sym == :white ||
|
99
99
|
ohm[:color].to_sym == :green
|
100
100
|
end
|
101
101
|
end
|
@@ -215,7 +215,7 @@ module Cryptum
|
|
215
215
|
oh[:id] == meta[:buy_order_id]
|
216
216
|
end
|
217
217
|
meta[:done_at] = Time.now.strftime('%Y-%m-%d %H:%M:%S.%N%z')
|
218
|
-
meta[:color] = :
|
218
|
+
meta[:color] = :white
|
219
219
|
end
|
220
220
|
end
|
221
221
|
|
@@ -291,7 +291,7 @@ module Cryptum
|
|
291
291
|
|
292
292
|
# Reinitiate GTFO if the previous GTFO Order Expires.
|
293
293
|
terminal_win.key_press_event.key_g = true if meta[:color] == :magenta
|
294
|
-
meta[:color] = :
|
294
|
+
meta[:color] = :white
|
295
295
|
end
|
296
296
|
end
|
297
297
|
|
@@ -332,7 +332,7 @@ module Cryptum
|
|
332
332
|
|
333
333
|
# Snag all expired orders
|
334
334
|
oh_meta_expired_arr = order_history_meta.select do |ohm|
|
335
|
-
ohm[:color].to_sym == :
|
335
|
+
ohm[:color].to_sym == :white && ohm.key?(:done_at)
|
336
336
|
end
|
337
337
|
|
338
338
|
# Snag all expired orders within past 24 hrs
|
@@ -322,10 +322,10 @@ module Cryptum
|
|
322
322
|
)
|
323
323
|
end
|
324
324
|
else
|
325
|
-
|
326
|
-
|
327
|
-
plan_color = :cyan if
|
328
|
-
plan_color = :green if
|
325
|
+
market_trend_color = plan_color = :white
|
326
|
+
market_trend_color = indicator_status.market_trend[:color] if indicator_status.market_trend
|
327
|
+
plan_color = :cyan if market_trend_color == :red
|
328
|
+
plan_color = :green if market_trend_color == :green
|
329
329
|
|
330
330
|
first_row = event_history.order_plan_index_offset
|
331
331
|
last_row = first_row + event_history.order_plan_max_rows_to_display
|
data/lib/cryptum/ui.rb
CHANGED
@@ -129,8 +129,12 @@ module Cryptum
|
|
129
129
|
|
130
130
|
case color
|
131
131
|
when :black
|
132
|
-
|
133
|
-
|
132
|
+
# It's more Gray than Black
|
133
|
+
# color_id = 0
|
134
|
+
# color_fg = Curses::COLOR_BLACK
|
135
|
+
color_id = 256
|
136
|
+
Curses.init_color(color_id, 0, 0, 500)
|
137
|
+
color_fg = color_id
|
134
138
|
color_bg = bg
|
135
139
|
when :red
|
136
140
|
color_id = 1
|
data/lib/cryptum/version.rb
CHANGED