cryptum 0.0.344 → 0.0.346
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cryptum/order_book/market_trend.rb +8 -3
- data/lib/cryptum/ui/market_trend.rb +1 -1
- data/lib/cryptum/ui/order_execution.rb +11 -13
- data/lib/cryptum/ui/order_plan.rb +2 -1
- 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: 6c8e769004838120d15391c00d30c41ab9a3ef020ce7931d02b2d477c07c1cb2
|
4
|
+
data.tar.gz: dd678a5767766785897b8b840cbf9e17e8bf4ff54322aae8abbecf751c22b878
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6323485d55400a92e0a4e14a40d9d9df6b66d7bd9380cedae39e02fab047f844907cbad8408570c763efed2e96c765f2a337c6cfc973918e5e179291d03d7d68
|
7
|
+
data.tar.gz: d909abc09d62af06b310f1ac211b8bd3025e3fe06d0ab59720e0664f2abbd569719e2415ca901b584e67adca2f8701fd7a33f798bbd21444890baa1f41bfb3a3
|
@@ -45,8 +45,10 @@ module Cryptum
|
|
45
45
|
# order_difference_out = Cryptum.beautify_large_number(
|
46
46
|
# value: order_difference
|
47
47
|
# ).to_i
|
48
|
+
motivation = 'BTD'
|
49
|
+
motivation = 'FOMO' if event_history.bullish_trend
|
48
50
|
indicator_hash[:color] = :green
|
49
|
-
indicator_hash[:ui] = "BUYS UP BY #{order_difference.to_i}"
|
51
|
+
indicator_hash[:ui] = "#{motivation} | BUYS UP BY #{order_difference.to_i}"
|
50
52
|
indicator_hash[:status] = "B#{Cryptum.up_arrow}"
|
51
53
|
elsif buy_total < sell_total
|
52
54
|
order_difference = sell_total - buy_total
|
@@ -54,13 +56,16 @@ module Cryptum
|
|
54
56
|
# order_difference_out = Cryptum.beautify_large_number(
|
55
57
|
# value: order_difference
|
56
58
|
# ).to_i
|
59
|
+
motivation = 'GTFO'
|
60
|
+
motivation = 'TPROF' if event_history.bullish_trend
|
57
61
|
indicator_hash[:color] = :red
|
58
|
-
indicator_hash[:ui] = "SELLS UP BY #{order_difference.to_i}"
|
62
|
+
indicator_hash[:ui] = "#{motivation} | SELLS UP BY #{order_difference.to_i}"
|
59
63
|
indicator_hash[:status] = "S#{Cryptum.up_arrow}"
|
60
64
|
else
|
61
65
|
# This Condition is Met When candle_buy_tot == candle_sell_tot
|
66
|
+
motivation = 'WAIT / WATCH'
|
62
67
|
indicator_hash[:color] = :yellow
|
63
|
-
indicator_hash[:ui] =
|
68
|
+
indicator_hash[:ui] = "#{motivation} | BUYS == SELLS"
|
64
69
|
indicator_hash[:status] = "F#{Cryptum.up_arrow}"
|
65
70
|
end
|
66
71
|
|
@@ -39,7 +39,7 @@ module Cryptum
|
|
39
39
|
trend_arrow = Cryptum.down_arrow
|
40
40
|
end
|
41
41
|
|
42
|
-
market_trend_out = "Market Trend #{trend_arrow}
|
42
|
+
market_trend_out = "Market Trend #{trend_arrow} #{order_trend_out}"
|
43
43
|
|
44
44
|
# UI
|
45
45
|
col_just1 = (Curses.cols - Cryptum::UI.col_first) - 1
|
@@ -49,6 +49,14 @@ module Cryptum
|
|
49
49
|
order_history_meta = event_history.order_book[:order_history_meta]
|
50
50
|
order_history = event_history.order_book[:order_history] if option_choice.autotrade
|
51
51
|
|
52
|
+
margin_percent_open_24h = (1 - (open_24h / ticker_price)) * 100
|
53
|
+
cast_margin_to_sec = margin_percent_open_24h * 0.1
|
54
|
+
|
55
|
+
# Reset times to max or default depending on
|
56
|
+
# BULL or BEAR market trend
|
57
|
+
event_history.bullish_trend = true if cast_margin_to_sec.positive?
|
58
|
+
event_history.bullish_trend = false if cast_margin_to_sec.negative?
|
59
|
+
|
52
60
|
if event_history.order_book[:order_plan].length.positive?
|
53
61
|
if event_history.order_ready
|
54
62
|
event_history.order_book[:last_order_exec] = Time.now.strftime(
|
@@ -57,22 +65,12 @@ module Cryptum
|
|
57
65
|
end
|
58
66
|
|
59
67
|
# BUY
|
60
|
-
margin_percent_open_24h = (1 - (open_24h / ticker_price)) * 100
|
61
|
-
cast_margin_to_sec = margin_percent_open_24h * 0.1
|
62
|
-
|
63
68
|
# Reset times to max or default depending on
|
64
69
|
# BULL or BEAR market trend
|
65
|
-
if cast_margin_to_sec.positive?
|
66
|
-
event_history.bullish_trend = true
|
67
|
-
event_history.time_between_orders = event_history.time_between_orders_max
|
68
|
-
end
|
69
|
-
|
70
|
-
if cast_margin_to_sec.negative? &&
|
71
|
-
event_history.bullish_trend
|
70
|
+
event_history.time_between_orders = event_history.time_between_orders_max if cast_margin_to_sec.positive?
|
72
71
|
|
73
|
-
|
74
|
-
|
75
|
-
end
|
72
|
+
event_history.time_between_orders = event_history.time_between_orders_reset if cast_margin_to_sec.negative? &&
|
73
|
+
event_history.bullish_trend
|
76
74
|
|
77
75
|
if event_history.order_ready &&
|
78
76
|
indicator_status.action_signal == :buy &&
|
@@ -62,7 +62,8 @@ module Cryptum
|
|
62
62
|
current_crypto_fiat_value.to_f.fdiv(total_holdings.to_f) * 100
|
63
63
|
)
|
64
64
|
|
65
|
-
event_history.red_pill = true if crypto_invested_percent.to_f > autotrade_percent
|
65
|
+
event_history.red_pill = true if crypto_invested_percent.to_f > autotrade_percent ||
|
66
|
+
fiat_budget > min_market_funds.to_f
|
66
67
|
|
67
68
|
# SAUCE 2
|
68
69
|
# Generating and/or recalculating order plan
|
data/lib/cryptum/version.rb
CHANGED