cotcube-indicators 0.1.10 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/VERSION +1 -1
- data/lib/cotcube-indicators/ema.rb +2 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 11f1af1cbae6dfbd31c7ab543801a6b71d6add09dd157f823a380d16d0cc3354
|
4
|
+
data.tar.gz: f5012e6bffd26cb739260d17efad7a7deff8725d3c02e9ec6994798f0462ebb0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 826229e58f828396cb60fe6af1f86a92b4894f1f34e1d61eef3b65cada0e743679465e1a183a2723f82e480d18e3964608ac8299c9ed492a8f0fe8123df68b81
|
7
|
+
data.tar.gz: 50e7d157baa972a579cd78ec662544f70ef9af48297fe22f9c45d2fbe338cb512cea6beb363d9020cb518994bd7bfb520968470d5aa4ed2b7224c5aa19f66840
|
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.11
|
@@ -3,9 +3,8 @@
|
|
3
3
|
module Cotcube
|
4
4
|
module Indicators
|
5
5
|
# the classic exponential moving average
|
6
|
-
def ema(key:, length:, smoothing:)
|
7
|
-
raise 'Missing parameter, need :length'
|
8
|
-
raise 'Missing parameter, need :key' if key.nil?
|
6
|
+
def ema(key:, length:, smoothing: nil)
|
7
|
+
raise 'Missing parameter, need :length' unless length.is_a? Integer
|
9
8
|
|
10
9
|
smoothing ||= (2 / (length - 1).to_f.round(2))
|
11
10
|
carrier = Carrier.new(length)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cotcube-indicators
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Benjamin L. Tischendorf
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-12-
|
11
|
+
date: 2020-12-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|