Sha256: 1e6fbb26f687e510f1c32bee8c13940ad0632b4643eaf232a7a3317916df3efa

Contents?: true

Size: 522 Bytes

Versions: 1

Compression:

Stored size: 522 Bytes

Contents

require 'minitest/autorun'

$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$LOAD_PATH.unshift(File.dirname(__FILE__))
require 'signal_tools'

def data_for_tests(period)
  repeat = 5
  historical_data = []
  (0...SignalTools::StockData::Extra_Days+period).each do |i|
    seed = i % repeat + 1
    historical_data << [
      (Date.today-i).to_s,
      (seed * 0.8).to_s, #Open
      (seed * 1.5).to_s, #High
      (seed * 0.5).to_s, #Low
      (seed * 0.9).to_s  #Close
    ]
  end
  historical_data
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
signal_tools-0.3.1 test/test_helper.rb