cryptum 0.0.348 → 0.0.350

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2e20c133e6192e9a3487b1e97fc71e0f60cd8283a4a72c77732674ce656e17cb
4
- data.tar.gz: e7f5e45d5285d747ab0eab424e8e0ff46e5426aab1a1cf8f9cec6e9ad38dc86e
3
+ metadata.gz: 07b1c23924235cd1e1e941809b4e6dec5fee5fc75b9f73353a931c22fdc02410
4
+ data.tar.gz: 8a74b80a2366097f40bfc0bf041815864b67ee98ce98f8378cd4a70a29b73abb
5
5
  SHA512:
6
- metadata.gz: ddc551db8524154280752316efeac984db43989c649b07e354f109b9741d9101a1e97bece06bf14669bda4695c17c371d90788e69b9ec659635c94c806f49077
7
- data.tar.gz: c4fcac1f3cc3a536cfb6fb3b8991aad8e3ae4c8fad6dee14a4ecb0bf5013795c6857a9ac8f82ed7f1a7ed88a4e13bc3b4ba5c7aaca4692cd485d6ec6266f965a
6
+ metadata.gz: 92e6b5b3d8bb9c9a30cb5a64ab9316bfcfc245390806d2f01e94d9296dfa547cc126facf7ab7cd77bf95c282c9ec4182d7827b377f15c8e1963ac8b560220339
7
+ data.tar.gz: d413bdd55aba8ad7e40faaf25e5df03ce4eaa6eb7e1e949791ecc9c801a877088040273efbf52e18e197f2b8908924b55be08366717abce51e4f7873930e020f
@@ -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
- # order_difference_out = Cryptum.beautify_large_number(
45
+ # order_difference = Cryptum.beautify_large_number(
46
46
  # value: order_difference
47
47
  # ).to_i
48
- motivation = 'BTD'
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
- indicator_hash[:ui] = "#{motivation} | BUYS UP BY #{order_difference.to_i}"
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
- # order_difference_out = Cryptum.beautify_large_number(
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 = 'TPROF' if event_history.bullish_trend
65
+ motivation = 'PROFITING' if event_history.bullish_trend
66
66
  indicator_hash[:color] = :green
67
67
  end
68
- indicator_hash[:ui] = "#{motivation} | SELLS UP BY #{order_difference.to_i}"
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 = 'WAIT / WATCH'
72
+ motivation = 'FLAT'
73
73
  indicator_hash[:color] = :yellow
74
- indicator_hash[:ui] = "#{motivation} | BUYS == SELLS"
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
- color = indicator_hash[:color]
28
- order_trend_out = indicator_hash[:ui]
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: order_trend_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: order_trend_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: order_trend_color,
66
+ color: market_trend_color,
81
67
  string: ''.ljust(col_just4, ' ')
82
68
  )
83
69
 
@@ -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
- fiat_avail_for_trade = format('%0.2f', fiat_portfolio.first[:available])
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 > fiat_avail_for_trade.to_f
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 = fiat_avail_for_trade.to_f / 1_000_000
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- VERSION = '0.0.348'
4
+ VERSION = '0.0.350'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cryptum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.348
4
+ version: 0.0.350
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.