sqa-tai 0.1.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,7 +11,7 @@ module SQA
11
11
  check_available!
12
12
  validate_prices!(prices)
13
13
 
14
- TALibFFI.ht_dcperiod(prices)
14
+ Native.ht_dcperiod(prices)
15
15
  end
16
16
 
17
17
  # Hilbert Transform - Trend vs Cycle Mode
@@ -21,7 +21,7 @@ module SQA
21
21
  check_available!
22
22
  validate_prices!(prices)
23
23
 
24
- TALibFFI.ht_trendmode(prices)
24
+ Native.ht_trendmode(prices)
25
25
  end
26
26
 
27
27
  # Hilbert Transform - Dominant Cycle Phase
@@ -31,7 +31,7 @@ module SQA
31
31
  check_available!
32
32
  validate_prices!(prices)
33
33
 
34
- TALibFFI.ht_dcphase(prices)
34
+ Native.ht_dcphase(prices)
35
35
  end
36
36
 
37
37
  # Hilbert Transform - Phasor Components
@@ -41,14 +41,8 @@ module SQA
41
41
  check_available!
42
42
  validate_prices!(prices)
43
43
 
44
- result = TALibFFI.ht_phasor(prices)
45
-
46
- # Handle hash return format from newer ta_lib_ffi versions
47
- if result.is_a?(Hash)
48
- [result[:in_phase], result[:quadrature]]
49
- else
50
- result
51
- end
44
+ result = Native.ht_phasor(prices)
45
+ [result[:in_phase], result[:quadrature]]
52
46
  end
53
47
 
54
48
  # Hilbert Transform - SineWave
@@ -58,14 +52,8 @@ module SQA
58
52
  check_available!
59
53
  validate_prices!(prices)
60
54
 
61
- result = TALibFFI.ht_sine(prices)
62
-
63
- # Handle hash return format from newer ta_lib_ffi versions
64
- if result.is_a?(Hash)
65
- [result[:sine], result[:lead_sine]]
66
- else
67
- result
68
- end
55
+ result = Native.ht_sine(prices)
56
+ [result[:sine], result[:lead_sine]]
69
57
  end
70
58
  end
71
59
  end