cryptum 0.0.342 → 0.0.343
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 +4 -11
- 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: 02c2b62902a2b501d2c85af3dd61def11d0b1e28e89787a4da96540323f6b32d
|
4
|
+
data.tar.gz: 32db0b748869532f2e7a5662cec1c9eaa3d5dcdd3d2db57ea50468056669a769
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 170b724a61be52c129c3b37a54e193ed166e83c19511197acede93898cc7597f4fb13a1e49501a562f3b9b84000b982c990f0b41831fc28ab3b3a6111fd1da6d
|
7
|
+
data.tar.gz: 6f404de1535cebc08cbea75d9a0f32b402e8814b4ebe2aa0bf4b7470705ceb87560259396c42057a4624a5022191b1ea498a5c8ff9baef37e62c92e62b77e602
|
@@ -26,17 +26,10 @@ module Cryptum
|
|
26
26
|
# end
|
27
27
|
|
28
28
|
# Compatible w/ l2update_batch websocket channel
|
29
|
-
event[:changes].
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
event_history.order_book[:market_trend][:buy] += 1
|
34
|
-
when :sell
|
35
|
-
event_history.order_book[:market_trend][:sell] += 1
|
36
|
-
else
|
37
|
-
raise "UNKNOWN Value in event[:changes] => #{buy_or_sell}"
|
38
|
-
end
|
39
|
-
end
|
29
|
+
buy_count = event[:changes].select { |change| change.first == 'buy' }.length
|
30
|
+
sell_count = event[:changes].select { |change| change.first == 'sell' }.length
|
31
|
+
event_history.order_book[:market_trend][:buy] += buy_count
|
32
|
+
event_history.order_book[:market_trend][:sell] += sell_count
|
40
33
|
|
41
34
|
indicator_hash = {}
|
42
35
|
buy_total = event_history.order_book[:market_trend][:buy].to_i
|
data/lib/cryptum/version.rb
CHANGED