Class: Finexclub::Signals::Alpha
- Inherits:
-
Finexclub::Signal
- Object
- Finexclub::Signal
- Finexclub::Signals::Alpha
- Defined in:
- lib/finexclub/signals/alpha.rb
Instance Attribute Summary
Attributes inherited from Finexclub::Signal
Instance Method Summary collapse
Methods inherited from Finexclub::Signal
build, handler_for, #initialize
Methods included from Document
Constructor Details
This class inherits a constructor from Finexclub::Signal
Instance Method Details
#stability ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/finexclub/signals/alpha.rb', line 17 def stability case index when 100 then :confirmed when 90..99 then :high when 80..89 then :medium when 70..79 then :low else :unstable end end |
#trend ⇒ Object
13 14 15 |
# File 'lib/finexclub/signals/alpha.rb', line 13 def trend direction == 1 ? :bullish : :bearish end |