cryptum 0.0.349 → 0.0.351
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/lib/cryptum/order_book/market_trend.rb +2 -2
- data/lib/cryptum/ui/market_trend.rb +6 -6
- data/lib/cryptum/ui/order_execution.rb +3 -3
- data/lib/cryptum/ui/order_plan.rb +1 -2
- 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: 3a85e99c74d3dbff0f751b0f084757f5bfecd1f5e7ddb34f1c7e4076d0e3b682
|
4
|
+
data.tar.gz: bd4568f1d5885a8d347c12eed92b037be8f258282971e9542e6166e2e61318cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e238c1e4b347da6443ea83a6bc0663fd016cfeff846811635b71f7b6fdfa01db2a5f0e814ab9f643dac321608252dc1e6ae55663323f93a011ca9204d546365
|
7
|
+
data.tar.gz: 34b0254dfdbec6850d6aaa1b57d9b7efc551ab2c75d4f870a3726a7695202cffdde0211c96c700d680770c7e2a1883ab76e880bda3146cdfc7e70c953d9ac28a
|
data/Gemfile
CHANGED
@@ -45,7 +45,7 @@ module Cryptum
|
|
45
45
|
# order_difference = Cryptum.beautify_large_number(
|
46
46
|
# value: order_difference
|
47
47
|
# ).to_i
|
48
|
-
motivation = 'BUYING DIP'
|
48
|
+
motivation = 'BUYING THE DIP'
|
49
49
|
indicator_hash[:color] = :red
|
50
50
|
if event_history.bullish_trend
|
51
51
|
motivation = 'FOMO' if event_history.bullish_trend
|
@@ -62,7 +62,7 @@ module Cryptum
|
|
62
62
|
motivation = 'REKT'
|
63
63
|
indicator_hash[:color] = :red
|
64
64
|
if event_history.bullish_trend
|
65
|
-
motivation = '
|
65
|
+
motivation = 'TAKING PROFITS' 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}"
|
@@ -28,7 +28,7 @@ module Cryptum
|
|
28
28
|
market_trend_out = indicator_hash[:ui]
|
29
29
|
|
30
30
|
# UI
|
31
|
-
col_just1 = (Curses.cols - Cryptum::UI.col_first) - 1
|
31
|
+
# col_just1 = (Curses.cols - Cryptum::UI.col_first) - 1
|
32
32
|
col_just4 = Curses.cols - Cryptum::UI.col_fourth
|
33
33
|
|
34
34
|
# ROW 1
|
@@ -43,11 +43,11 @@ module Cryptum
|
|
43
43
|
market_trend_win.setpos(out_line_no, Cryptum::UI.col_first)
|
44
44
|
market_trend_win.clrtoeol
|
45
45
|
|
46
|
-
Cryptum::UI.colorize(
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
)
|
46
|
+
# Cryptum::UI.colorize(
|
47
|
+
# ui_win: market_trend_win,
|
48
|
+
# color: market_trend_color,
|
49
|
+
# string: ''.ljust(col_just1, ' ')
|
50
|
+
# )
|
51
51
|
|
52
52
|
market_trend_win.setpos(
|
53
53
|
out_line_no,
|
@@ -103,9 +103,9 @@ module Cryptum
|
|
103
103
|
fiat_invested_this_order = size.to_f * price.to_f
|
104
104
|
|
105
105
|
fiat_portfolio = event_history.order_book[:fiat_portfolio]
|
106
|
-
|
106
|
+
fiat_avail_to_trade = format('%0.2f', fiat_portfolio.first[:available])
|
107
107
|
|
108
|
-
event_history.red_pill = true if fiat_invested_this_order >
|
108
|
+
event_history.red_pill = true if fiat_invested_this_order > fiat_avail_to_trade.to_f
|
109
109
|
|
110
110
|
unless event_history.red_pill
|
111
111
|
event_history = Cryptum::API.submit_limit_order(
|
@@ -152,7 +152,7 @@ module Cryptum
|
|
152
152
|
dynamic_time_increment = cast_margin_to_sec * -1
|
153
153
|
|
154
154
|
# Lets also take balance into play
|
155
|
-
balance_as_arbitrary_float =
|
155
|
+
balance_as_arbitrary_float = fiat_avail_to_trade.to_f / 1_000_000
|
156
156
|
tbo = dynamic_time_increment - balance_as_arbitrary_float
|
157
157
|
|
158
158
|
event_history.time_between_orders += tbo
|
@@ -62,8 +62,7 @@ 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
|
66
|
-
fiat_budget > min_market_funds.to_f
|
65
|
+
event_history.red_pill = true if crypto_invested_percent.to_f > autotrade_percent
|
67
66
|
|
68
67
|
# SAUCE 2
|
69
68
|
# Generating and/or recalculating order plan
|
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.351
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 0day Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-12-
|
11
|
+
date: 2022-12-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -226,14 +226,14 @@ dependencies:
|
|
226
226
|
requirements:
|
227
227
|
- - '='
|
228
228
|
- !ruby/object:Gem::Version
|
229
|
-
version: 1.
|
229
|
+
version: 1.41.0
|
230
230
|
type: :runtime
|
231
231
|
prerelease: false
|
232
232
|
version_requirements: !ruby/object:Gem::Requirement
|
233
233
|
requirements:
|
234
234
|
- - '='
|
235
235
|
- !ruby/object:Gem::Version
|
236
|
-
version: 1.
|
236
|
+
version: 1.41.0
|
237
237
|
- !ruby/object:Gem::Dependency
|
238
238
|
name: rubocop-rake
|
239
239
|
requirement: !ruby/object:Gem::Requirement
|