cryptum 0.0.344 → 0.0.345

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: af839b30214ff1f113a0079db70bb6a5965c5836753da812b1d62876668a64de
4
- data.tar.gz: 4fb5d3994323c64f31eb2cd3667bf37a32441d976be614e980254d1250bc7b27
3
+ metadata.gz: 2476e8d459d2cedb77447a65564b2ea564917e82ab806c03c617ed289be1f247
4
+ data.tar.gz: 5e30077ba732f84341c56811acb2613d39f6a244e05a0a3aacf67171a53e9331
5
5
  SHA512:
6
- metadata.gz: 702094f2a21b50f6c829a106bc487f5cc1375a4dfa7d890369e33a0ed2d8dacbf0bd286201001b31127488844f7d9c977c7c842822a572fe1e2d22ab7f95b689
7
- data.tar.gz: 0f9d8e746d200cfca372519ebcc95f4a8db93991caddbce0512079abda9175ae2be822185599332ab759424807fcdb063aa00bba7d45946992cced98cf0b8a4b
6
+ metadata.gz: 2bfa1a93abce00e987a79964d87dbce1a08fb5276b260791820c344a1c4080c4b276f11290029327149fbaf4108d3b6890593bfbd2e08461b6d3555bdd787183
7
+ data.tar.gz: a9609ebc72a394b2368533dacf37a639cb37106c4619c3a9d036b64def573ff8dd35d5c07d406a92708136d91d561bd4d7188932807b1c909663ff982394b579
@@ -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 = 'BUYING THE DIP'
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 = 'GETTING THE F* OUT'
60
+ motivation = 'TAKING PROFITS' 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] = 'BUYS == SELLS'
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} | #{order_trend_out}"
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
- event_history.bullish_trend = false
74
- event_history.time_between_orders = event_history.time_between_orders_reset
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 &&
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- VERSION = '0.0.344'
4
+ VERSION = '0.0.345'
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.344
4
+ version: 0.0.345
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.