Class: Indicator::AutoGen::CdlMorningDojiStar
- Defined in:
- lib/indicator/auto_gen/cdl_morning_doji_star.rb
Overview
Ta-Lib function mapping class Function: ‘CDLMORNINGDOJISTAR’ Description: ‘Morning Doji Star’ This file has been autogenerated - Do Not Edit.
Instance Attribute Summary collapse
-
#penetration ⇒ Object
Penetration <Double>.
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) ⇒ CdlMorningDojiStar
constructor
A new instance of CdlMorningDojiStar.
- #run(*args) ⇒ Object
Methods inherited from Base
Methods included from DataMapper
#default_getter, #default_getter=, #map
Constructor Details
#initialize(*args) ⇒ CdlMorningDojiStar
Returns a new instance of CdlMorningDojiStar.
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/indicator/auto_gen/cdl_morning_doji_star.rb', line 9 def initialize(*args) if args.first.is_a? Hash h = args.first @penetration = h[:penetration] || 3.000000e-1 else @penetration = args[0] || 3.000000e-1 end @func = TaLib::Function.new("CDLMORNINGDOJISTAR") end |
Instance Attribute Details
#penetration ⇒ Object
Penetration <Double>
7 8 9 |
# File 'lib/indicator/auto_gen/cdl_morning_doji_star.rb', line 7 def penetration @penetration end |
Class Method Details
.arguments ⇒ Object
The list of arguments
26 27 28 |
# File 'lib/indicator/auto_gen/cdl_morning_doji_star.rb', line 26 def self.arguments [ :penetration ] end |
.inputs ⇒ Object
The minimum set of inputs required
31 32 33 |
# File 'lib/indicator/auto_gen/cdl_morning_doji_star.rb', line 31 def self.inputs [ :open, :high, :low, :close ] end |
.outputs ⇒ Object
The outputs generated by this function
36 37 38 |
# File 'lib/indicator/auto_gen/cdl_morning_doji_star.rb', line 36 def self.outputs [ :out_integer ] end |
.price_input? ⇒ Boolean
Is price data required as an input
21 22 23 |
# File 'lib/indicator/auto_gen/cdl_morning_doji_star.rb', line 21 def self.price_input? true end |
Instance Method Details
#run(*args) ⇒ Object
40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/indicator/auto_gen/cdl_morning_doji_star.rb', line 40 def run(*args) o, h, l, c, v, len = map_ohlcv(self.class.inputs, *args) @func.in_price(0, o, h, l, c, v, nil) @func.opt_real(0, @penetration) out_integer = Array.new(len) @func.out_int(0, out_integer) @func.call(0, len - 1) out_integer end |