Class: Indicator::AutoGen::HtDcPhase
- Defined in:
- lib/indicator/auto_gen/ht_dc_phase.rb
Overview
Ta-Lib function mapping class Function: ‘HT_DCPHASE’ Description: ‘Hilbert Transform - Dominant Cycle Phase’ This file has been autogenerated - Do Not Edit.
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
-
.arguments ⇒ Object
The list of arguments.
-
.inputs ⇒ Object
The minimum set of inputs required.
-
.outputs ⇒ Object
The outputs generated by this function.
-
.price_input? ⇒ Boolean
Is price data required as an input.
Instance Method Summary collapse
-
#initialize(*args) ⇒ HtDcPhase
constructor
A new instance of HtDcPhase.
- #run(in_real) ⇒ Object
Methods inherited from Base
Methods included from DataMapper
#default_getter, #default_getter=, #map
Constructor Details
#initialize(*args) ⇒ HtDcPhase
Returns a new instance of HtDcPhase.
7 8 9 10 |
# File 'lib/indicator/auto_gen/ht_dc_phase.rb', line 7 def initialize(*args) @func = TaLib::Function.new("HT_DCPHASE") end |
Class Method Details
.arguments ⇒ Object
The list of arguments
18 19 20 |
# File 'lib/indicator/auto_gen/ht_dc_phase.rb', line 18 def self.arguments [ ] end |
.inputs ⇒ Object
The minimum set of inputs required
23 24 25 |
# File 'lib/indicator/auto_gen/ht_dc_phase.rb', line 23 def self.inputs [ :in_real ] end |
.outputs ⇒ Object
The outputs generated by this function
28 29 30 |
# File 'lib/indicator/auto_gen/ht_dc_phase.rb', line 28 def self.outputs [ :out_real ] end |
.price_input? ⇒ Boolean
Is price data required as an input
13 14 15 |
# File 'lib/indicator/auto_gen/ht_dc_phase.rb', line 13 def self.price_input? false end |
Instance Method Details
#run(in_real) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/indicator/auto_gen/ht_dc_phase.rb', line 32 def run(in_real) len = in_real.length @func.in_real(0, map(in_real)) out_real = Array.new(len) @func.out_real(0, out_real) @func.call(0, len - 1) out_real end |