finexclub 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/finexclub.gemspec +1 -1
- data/lib/finexclub/chart.rb +1 -4
- data/spec/finexclub/manager_spec.rb +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.3
|
data/finexclub.gemspec
CHANGED
data/lib/finexclub/chart.rb
CHANGED
@@ -29,11 +29,8 @@ module Finexclub
|
|
29
29
|
|
30
30
|
delta = self.timeframe_delta(tf)
|
31
31
|
starts = Time.utc(time.year, time.month, time.day, (time.hour/delta)*delta, 0)
|
32
|
-
expires =
|
32
|
+
expires = starts + delta*60*60
|
33
33
|
|
34
|
-
#c.starts = Time.utc(time.year, time.month, time.day, time.hour, 0).to_i
|
35
|
-
#c.expires = c.starts + 1*60*60
|
36
|
-
|
37
34
|
c = Chart.new(core)
|
38
35
|
c.updated= time.to_i
|
39
36
|
c.symbol= symbol
|
@@ -231,7 +231,7 @@ describe 'Finexclub::Manager' do
|
|
231
231
|
c = @manager.collection.find_one({:symbol => 'eurusd', :timeframe => 'h4'})
|
232
232
|
c["symbol"].should == 'eurusd'
|
233
233
|
c["timeframe"].should == 'h4'
|
234
|
-
c["starts"].should == Time.utc(2010, 12, 27,
|
234
|
+
c["starts"].should == Time.utc(2010, 12, 27, 8, 0).to_i
|
235
235
|
c["expires"].should == Time.utc(2010, 12, 27, 12, 0).to_i
|
236
236
|
c["updated"].should == Time.utc(2010, 12, 27, 11, 5).to_i
|
237
237
|
c["indicators"]["omega"].should == {
|