ta-indicator 0.0.4 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +200 -196
- data/examples/mapping.rb +15 -0
- data/lib/indicator/auto_gen.rb +158 -158
- data/lib/indicator/auto_gen/ad.rb +2 -2
- data/lib/indicator/auto_gen/ad_osc.rb +2 -2
- data/lib/indicator/auto_gen/adx.rb +2 -2
- data/lib/indicator/auto_gen/adxr.rb +2 -2
- data/lib/indicator/auto_gen/aroon.rb +2 -2
- data/lib/indicator/auto_gen/aroon_osc.rb +2 -2
- data/lib/indicator/auto_gen/atr.rb +2 -2
- data/lib/indicator/auto_gen/avg_price.rb +1 -1
- data/lib/indicator/auto_gen/bop.rb +1 -1
- data/lib/indicator/auto_gen/cci.rb +2 -2
- data/lib/indicator/auto_gen/cdl2_crows.rb +1 -1
- data/lib/indicator/auto_gen/cdl3_black_crows.rb +1 -1
- data/lib/indicator/auto_gen/cdl3_inside.rb +1 -1
- data/lib/indicator/auto_gen/cdl3_line_strike.rb +1 -1
- data/lib/indicator/auto_gen/cdl3_outside.rb +1 -1
- data/lib/indicator/auto_gen/cdl3_stars_in_south.rb +1 -1
- data/lib/indicator/auto_gen/cdl3_white_soldiers.rb +1 -1
- data/lib/indicator/auto_gen/cdl_abandoned_baby.rb +1 -1
- data/lib/indicator/auto_gen/cdl_advance_block.rb +1 -1
- data/lib/indicator/auto_gen/cdl_belt_hold.rb +1 -1
- data/lib/indicator/auto_gen/cdl_breakaway.rb +1 -1
- data/lib/indicator/auto_gen/cdl_closing_marubozu.rb +1 -1
- data/lib/indicator/auto_gen/cdl_conceal_babys_wall.rb +1 -1
- data/lib/indicator/auto_gen/cdl_counter_attack.rb +1 -1
- data/lib/indicator/auto_gen/cdl_dark_cloud_cover.rb +1 -1
- data/lib/indicator/auto_gen/cdl_doji.rb +1 -1
- data/lib/indicator/auto_gen/cdl_doji_star.rb +1 -1
- data/lib/indicator/auto_gen/cdl_dragonfly_doji.rb +1 -1
- data/lib/indicator/auto_gen/cdl_engulfing.rb +1 -1
- data/lib/indicator/auto_gen/cdl_evening_doji_star.rb +1 -1
- data/lib/indicator/auto_gen/cdl_evening_star.rb +1 -1
- data/lib/indicator/auto_gen/cdl_gap_side_side_white.rb +1 -1
- data/lib/indicator/auto_gen/cdl_gravestone_doji.rb +1 -1
- data/lib/indicator/auto_gen/cdl_hammer.rb +1 -1
- data/lib/indicator/auto_gen/cdl_hanging_man.rb +1 -1
- data/lib/indicator/auto_gen/cdl_harami.rb +1 -1
- data/lib/indicator/auto_gen/cdl_harami_cross.rb +1 -1
- data/lib/indicator/auto_gen/cdl_hign_wave.rb +1 -1
- data/lib/indicator/auto_gen/cdl_hikkake.rb +1 -1
- data/lib/indicator/auto_gen/cdl_hikkake_mod.rb +1 -1
- data/lib/indicator/auto_gen/cdl_homing_pigeon.rb +1 -1
- data/lib/indicator/auto_gen/cdl_identical3_crows.rb +1 -1
- data/lib/indicator/auto_gen/cdl_in_neck.rb +1 -1
- data/lib/indicator/auto_gen/cdl_inverted_hammer.rb +1 -1
- data/lib/indicator/auto_gen/cdl_kicking.rb +1 -1
- data/lib/indicator/auto_gen/cdl_kicking_by_length.rb +1 -1
- data/lib/indicator/auto_gen/cdl_ladder_bottom.rb +1 -1
- data/lib/indicator/auto_gen/cdl_long_legged_doji.rb +1 -1
- data/lib/indicator/auto_gen/cdl_long_line.rb +1 -1
- data/lib/indicator/auto_gen/cdl_marubozu.rb +1 -1
- data/lib/indicator/auto_gen/cdl_mat_hold.rb +1 -1
- data/lib/indicator/auto_gen/cdl_matching_low.rb +1 -1
- data/lib/indicator/auto_gen/cdl_morning_doji_star.rb +1 -1
- data/lib/indicator/auto_gen/cdl_morning_star.rb +1 -1
- data/lib/indicator/auto_gen/cdl_on_neck.rb +1 -1
- data/lib/indicator/auto_gen/cdl_piercing.rb +1 -1
- data/lib/indicator/auto_gen/cdl_rickshaw_man.rb +1 -1
- data/lib/indicator/auto_gen/cdl_rise_fall3_methods.rb +1 -1
- data/lib/indicator/auto_gen/cdl_seperating_lines.rb +1 -1
- data/lib/indicator/auto_gen/cdl_shooting_star.rb +1 -1
- data/lib/indicator/auto_gen/cdl_short_line.rb +1 -1
- data/lib/indicator/auto_gen/cdl_spinning_top.rb +1 -1
- data/lib/indicator/auto_gen/cdl_stalled_pattern.rb +1 -1
- data/lib/indicator/auto_gen/cdl_stick_sandwhich.rb +1 -1
- data/lib/indicator/auto_gen/cdl_takuri.rb +1 -1
- data/lib/indicator/auto_gen/cdl_tasuki_gap.rb +1 -1
- data/lib/indicator/auto_gen/cdl_thrusting.rb +1 -1
- data/lib/indicator/auto_gen/cdl_tristar.rb +1 -1
- data/lib/indicator/auto_gen/cdl_unique3_river.rb +1 -1
- data/lib/indicator/auto_gen/cdl_upside_gap2_crows.rb +1 -1
- data/lib/indicator/auto_gen/cdl_x_side_gap3_methods.rb +1 -1
- data/lib/indicator/auto_gen/dx.rb +2 -2
- data/lib/indicator/auto_gen/med_price.rb +2 -2
- data/lib/indicator/auto_gen/mfi.rb +2 -2
- data/lib/indicator/auto_gen/mid_price.rb +2 -2
- data/lib/indicator/auto_gen/minus_di.rb +2 -2
- data/lib/indicator/auto_gen/minus_dm.rb +2 -2
- data/lib/indicator/auto_gen/natr.rb +2 -2
- data/lib/indicator/auto_gen/obv.rb +6 -5
- data/lib/indicator/auto_gen/plus_di.rb +2 -2
- data/lib/indicator/auto_gen/plus_dm.rb +2 -2
- data/lib/indicator/auto_gen/sar.rb +2 -2
- data/lib/indicator/auto_gen/sar_ext.rb +2 -2
- data/lib/indicator/auto_gen/stoch.rb +2 -2
- data/lib/indicator/auto_gen/stoch_f.rb +2 -2
- data/lib/indicator/auto_gen/true_range.rb +2 -2
- data/lib/indicator/auto_gen/typ_price.rb +2 -2
- data/lib/indicator/auto_gen/ult_osc.rb +2 -2
- data/lib/indicator/auto_gen/wcl_price.rb +2 -2
- data/lib/indicator/auto_gen/will_r.rb +2 -2
- data/lib/indicator/base.rb +18 -0
- data/lib/indicator/data_mapper.rb +0 -20
- data/lib/indicator/version.rb +1 -1
- metadata +4 -4
@@ -21,7 +21,7 @@ class Indicator::AutoGen::Ad < Indicator::Base
|
|
21
21
|
|
22
22
|
# The minimum set of inputs required
|
23
23
|
def self.inputs
|
24
|
-
[ :
|
24
|
+
[ :high, :low, :close, :volume ]
|
25
25
|
end
|
26
26
|
|
27
27
|
# The outputs generated by this function
|
@@ -30,7 +30,7 @@ class Indicator::AutoGen::Ad < Indicator::Base
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def run(*args)
|
33
|
-
o, h, l, c, v, len = map_ohlcv(
|
33
|
+
o, h, l, c, v, len = map_ohlcv(self.class.inputs, *args)
|
34
34
|
@func.in_price(0, o, h, l, c, v, nil)
|
35
35
|
|
36
36
|
|
@@ -33,7 +33,7 @@ class Indicator::AutoGen::AdOsc < Indicator::Base
|
|
33
33
|
|
34
34
|
# The minimum set of inputs required
|
35
35
|
def self.inputs
|
36
|
-
[ :
|
36
|
+
[ :high, :low, :close, :volume ]
|
37
37
|
end
|
38
38
|
|
39
39
|
# The outputs generated by this function
|
@@ -42,7 +42,7 @@ class Indicator::AutoGen::AdOsc < Indicator::Base
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def run(*args)
|
45
|
-
o, h, l, c, v, len = map_ohlcv(
|
45
|
+
o, h, l, c, v, len = map_ohlcv(self.class.inputs, *args)
|
46
46
|
@func.in_price(0, o, h, l, c, v, nil)
|
47
47
|
|
48
48
|
@func.opt_int(0, @fast_period)
|
@@ -29,7 +29,7 @@ class Indicator::AutoGen::Adx < Indicator::Base
|
|
29
29
|
|
30
30
|
# The minimum set of inputs required
|
31
31
|
def self.inputs
|
32
|
-
[ :
|
32
|
+
[ :high, :low, :close ]
|
33
33
|
end
|
34
34
|
|
35
35
|
# The outputs generated by this function
|
@@ -38,7 +38,7 @@ class Indicator::AutoGen::Adx < Indicator::Base
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def run(*args)
|
41
|
-
o, h, l, c, v, len = map_ohlcv(
|
41
|
+
o, h, l, c, v, len = map_ohlcv(self.class.inputs, *args)
|
42
42
|
@func.in_price(0, o, h, l, c, v, nil)
|
43
43
|
|
44
44
|
@func.opt_int(0, @time_period)
|
@@ -29,7 +29,7 @@ class Indicator::AutoGen::Adxr < Indicator::Base
|
|
29
29
|
|
30
30
|
# The minimum set of inputs required
|
31
31
|
def self.inputs
|
32
|
-
[ :
|
32
|
+
[ :high, :low, :close ]
|
33
33
|
end
|
34
34
|
|
35
35
|
# The outputs generated by this function
|
@@ -38,7 +38,7 @@ class Indicator::AutoGen::Adxr < Indicator::Base
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def run(*args)
|
41
|
-
o, h, l, c, v, len = map_ohlcv(
|
41
|
+
o, h, l, c, v, len = map_ohlcv(self.class.inputs, *args)
|
42
42
|
@func.in_price(0, o, h, l, c, v, nil)
|
43
43
|
|
44
44
|
@func.opt_int(0, @time_period)
|
@@ -29,7 +29,7 @@ class Indicator::AutoGen::Aroon < Indicator::Base
|
|
29
29
|
|
30
30
|
# The minimum set of inputs required
|
31
31
|
def self.inputs
|
32
|
-
[ :
|
32
|
+
[ :high, :low ]
|
33
33
|
end
|
34
34
|
|
35
35
|
# The outputs generated by this function
|
@@ -38,7 +38,7 @@ class Indicator::AutoGen::Aroon < Indicator::Base
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def run(*args)
|
41
|
-
o, h, l, c, v, len = map_ohlcv(
|
41
|
+
o, h, l, c, v, len = map_ohlcv(self.class.inputs, *args)
|
42
42
|
@func.in_price(0, o, h, l, c, v, nil)
|
43
43
|
|
44
44
|
@func.opt_int(0, @time_period)
|
@@ -29,7 +29,7 @@ class Indicator::AutoGen::AroonOsc < Indicator::Base
|
|
29
29
|
|
30
30
|
# The minimum set of inputs required
|
31
31
|
def self.inputs
|
32
|
-
[ :
|
32
|
+
[ :high, :low ]
|
33
33
|
end
|
34
34
|
|
35
35
|
# The outputs generated by this function
|
@@ -38,7 +38,7 @@ class Indicator::AutoGen::AroonOsc < Indicator::Base
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def run(*args)
|
41
|
-
o, h, l, c, v, len = map_ohlcv(
|
41
|
+
o, h, l, c, v, len = map_ohlcv(self.class.inputs, *args)
|
42
42
|
@func.in_price(0, o, h, l, c, v, nil)
|
43
43
|
|
44
44
|
@func.opt_int(0, @time_period)
|
@@ -29,7 +29,7 @@ class Indicator::AutoGen::Atr < Indicator::Base
|
|
29
29
|
|
30
30
|
# The minimum set of inputs required
|
31
31
|
def self.inputs
|
32
|
-
[ :
|
32
|
+
[ :high, :low, :close ]
|
33
33
|
end
|
34
34
|
|
35
35
|
# The outputs generated by this function
|
@@ -38,7 +38,7 @@ class Indicator::AutoGen::Atr < Indicator::Base
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def run(*args)
|
41
|
-
o, h, l, c, v, len = map_ohlcv(
|
41
|
+
o, h, l, c, v, len = map_ohlcv(self.class.inputs, *args)
|
42
42
|
@func.in_price(0, o, h, l, c, v, nil)
|
43
43
|
|
44
44
|
@func.opt_int(0, @time_period)
|
@@ -29,7 +29,7 @@ class Indicator::AutoGen::Cci < Indicator::Base
|
|
29
29
|
|
30
30
|
# The minimum set of inputs required
|
31
31
|
def self.inputs
|
32
|
-
[ :
|
32
|
+
[ :high, :low, :close ]
|
33
33
|
end
|
34
34
|
|
35
35
|
# The outputs generated by this function
|
@@ -38,7 +38,7 @@ class Indicator::AutoGen::Cci < Indicator::Base
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def run(*args)
|
41
|
-
o, h, l, c, v, len = map_ohlcv(
|
41
|
+
o, h, l, c, v, len = map_ohlcv(self.class.inputs, *args)
|
42
42
|
@func.in_price(0, o, h, l, c, v, nil)
|
43
43
|
|
44
44
|
@func.opt_int(0, @time_period)
|
@@ -38,7 +38,7 @@ class Indicator::AutoGen::CdlAbandonedBaby < Indicator::Base
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def run(*args)
|
41
|
-
o, h, l, c, v, len = map_ohlcv(
|
41
|
+
o, h, l, c, v, len = map_ohlcv(self.class.inputs, *args)
|
42
42
|
@func.in_price(0, o, h, l, c, v, nil)
|
43
43
|
|
44
44
|
@func.opt_real(0, @penetration)
|
@@ -38,7 +38,7 @@ class Indicator::AutoGen::CdlDarkCloudCover < Indicator::Base
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def run(*args)
|
41
|
-
o, h, l, c, v, len = map_ohlcv(
|
41
|
+
o, h, l, c, v, len = map_ohlcv(self.class.inputs, *args)
|
42
42
|
@func.in_price(0, o, h, l, c, v, nil)
|
43
43
|
|
44
44
|
@func.opt_real(0, @penetration)
|
@@ -38,7 +38,7 @@ class Indicator::AutoGen::CdlEveningDojiStar < Indicator::Base
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def run(*args)
|
41
|
-
o, h, l, c, v, len = map_ohlcv(
|
41
|
+
o, h, l, c, v, len = map_ohlcv(self.class.inputs, *args)
|
42
42
|
@func.in_price(0, o, h, l, c, v, nil)
|
43
43
|
|
44
44
|
@func.opt_real(0, @penetration)
|
@@ -38,7 +38,7 @@ class Indicator::AutoGen::CdlEveningStar < Indicator::Base
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def run(*args)
|
41
|
-
o, h, l, c, v, len = map_ohlcv(
|
41
|
+
o, h, l, c, v, len = map_ohlcv(self.class.inputs, *args)
|
42
42
|
@func.in_price(0, o, h, l, c, v, nil)
|
43
43
|
|
44
44
|
@func.opt_real(0, @penetration)
|