Class: RubyTechnicalAnalysis::PivotPoints

Inherits:
Indicator
  • Object
show all
Defined in:
lib/ruby_technical_analysis/indicators/pivot_points.rb

Overview

Instance Attribute Summary

Attributes inherited from Indicator

#series

Instance Method Summary collapse

Methods inherited from Indicator

call, #initialize

Constructor Details

This class inherits a constructor from RubyTechnicalAnalysis::Indicator

Instance Method Details

#callArray

Returns An array containing the current S3, S2, S1, pivot, R1, R2, and R3 values.

Returns:

  • (Array)

    An array containing the current S3, S2, S1, pivot, R1, R2, and R3 values



12
13
14
# File 'lib/ruby_technical_analysis/indicators/pivot_points.rb', line 12

def call
  calculate_pivot_points
end

#valid?Boolean

Returns Whether or not the object is valid.

Returns:

  • (Boolean)

    Whether or not the object is valid



17
18
19
# File 'lib/ruby_technical_analysis/indicators/pivot_points.rb', line 17

def valid?
  series.length == 3
end