cryptum 0.0.348 → 0.0.349
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/lib/cryptum/order_book/market_trend.rb +9 -8
- data/lib/cryptum/ui/market_trend.rb +5 -19
- data/lib/cryptum/version.rb +1 -1
- 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: c0c000f85fb12c1e336e3cecf43e6f0c115adb8318509159f7c7da386af96039
|
4
|
+
data.tar.gz: 582a40ad9d1251912f95560db88a4a91cc83f8815c723470e0161a6c887651bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7746a9725be9fec5bf6e27b69695d772c1ebeca5d69c18ff8d924fff34c321938c90547bc6548386db1f1a67dc2fa2298c335f0e7c97dae30ffb394ab6568937
|
7
|
+
data.tar.gz: 5e4bdb60efca76cc53d4ba81df2dcacd49e5175075e61e36668dd82cc62903156ce0f13174d7e6e370ca906dc8a23bbb601204f6db322d714c4f2aa50a5001dd
|
@@ -42,38 +42,39 @@ module Cryptum
|
|
42
42
|
if buy_total > sell_total
|
43
43
|
order_difference = buy_total - sell_total
|
44
44
|
# Too Expensive
|
45
|
-
#
|
45
|
+
# order_difference = Cryptum.beautify_large_number(
|
46
46
|
# value: order_difference
|
47
47
|
# ).to_i
|
48
|
-
motivation = '
|
48
|
+
motivation = 'BUYING DIP'
|
49
49
|
indicator_hash[:color] = :red
|
50
50
|
if event_history.bullish_trend
|
51
51
|
motivation = 'FOMO' if event_history.bullish_trend
|
52
52
|
indicator_hash[:color] = :green
|
53
53
|
end
|
54
|
-
|
54
|
+
trend = "BUYS #{Cryptum.up_arrow} BY #{order_difference.to_i}"
|
55
55
|
indicator_hash[:status] = "B#{Cryptum.up_arrow}"
|
56
56
|
elsif buy_total < sell_total
|
57
57
|
order_difference = sell_total - buy_total
|
58
58
|
# Too Expensive
|
59
|
-
#
|
59
|
+
# order_difference = Cryptum.beautify_large_number(
|
60
60
|
# value: order_difference
|
61
61
|
# ).to_i
|
62
62
|
motivation = 'REKT'
|
63
63
|
indicator_hash[:color] = :red
|
64
64
|
if event_history.bullish_trend
|
65
|
-
motivation = '
|
65
|
+
motivation = 'PROFITING' if event_history.bullish_trend
|
66
66
|
indicator_hash[:color] = :green
|
67
67
|
end
|
68
|
-
|
68
|
+
trend = "SELLS #{Cryptum.up_arrow} BY #{order_difference.to_i}"
|
69
69
|
indicator_hash[:status] = "S#{Cryptum.up_arrow}"
|
70
70
|
else
|
71
71
|
# This Condition is Met When candle_buy_tot == candle_sell_tot
|
72
|
-
motivation = '
|
72
|
+
motivation = 'FLAT'
|
73
73
|
indicator_hash[:color] = :yellow
|
74
|
-
|
74
|
+
trend = 'BUYS == SELLS'
|
75
75
|
indicator_hash[:status] = "F#{Cryptum.up_arrow}"
|
76
76
|
end
|
77
|
+
indicator_hash[:ui] = "Market is #{motivation} | #{trend}"
|
77
78
|
|
78
79
|
indicator_status.market_trend = indicator_hash
|
79
80
|
rescue StandardError => e
|
@@ -24,22 +24,8 @@ module Cryptum
|
|
24
24
|
indicator_status: indicator_status
|
25
25
|
)
|
26
26
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
case color
|
31
|
-
when :green
|
32
|
-
order_trend_color = :green
|
33
|
-
trend_arrow = Cryptum.up_arrow
|
34
|
-
when :yellow
|
35
|
-
order_trend_color = :yellow
|
36
|
-
trend_arrow = Cryptum.flat_arrow
|
37
|
-
when :red
|
38
|
-
order_trend_color = :red
|
39
|
-
trend_arrow = Cryptum.down_arrow
|
40
|
-
end
|
41
|
-
|
42
|
-
market_trend_out = "Market Trend #{trend_arrow} #{order_trend_out}"
|
27
|
+
market_trend_color = indicator_hash[:color]
|
28
|
+
market_trend_out = indicator_hash[:ui]
|
43
29
|
|
44
30
|
# UI
|
45
31
|
col_just1 = (Curses.cols - Cryptum::UI.col_first) - 1
|
@@ -59,7 +45,7 @@ module Cryptum
|
|
59
45
|
|
60
46
|
Cryptum::UI.colorize(
|
61
47
|
ui_win: market_trend_win,
|
62
|
-
color:
|
48
|
+
color: market_trend_color,
|
63
49
|
string: ''.ljust(col_just1, ' ')
|
64
50
|
)
|
65
51
|
|
@@ -69,7 +55,7 @@ module Cryptum
|
|
69
55
|
)
|
70
56
|
Cryptum::UI.colorize(
|
71
57
|
ui_win: market_trend_win,
|
72
|
-
color:
|
58
|
+
color: market_trend_color,
|
73
59
|
style: :bold,
|
74
60
|
string: market_trend_out
|
75
61
|
)
|
@@ -77,7 +63,7 @@ module Cryptum
|
|
77
63
|
market_trend_win.setpos(out_line_no, Cryptum::UI.col_fourth)
|
78
64
|
Cryptum::UI.colorize(
|
79
65
|
ui_win: market_trend_win,
|
80
|
-
color:
|
66
|
+
color: market_trend_color,
|
81
67
|
string: ''.ljust(col_just4, ' ')
|
82
68
|
)
|
83
69
|
|
data/lib/cryptum/version.rb
CHANGED