{"id":13420500,"url":"https://github.com/rivella50/talib-ruby","last_synced_at":"2025-03-15T06:33:18.505Z","repository":{"id":59157268,"uuid":"444658","full_name":"rivella50/talib-ruby","owner":"rivella50","description":"Ruby Wrapper for the Technical Analysis Library ta-lib","archived":false,"fork":false,"pushed_at":"2014-01-01T09:52:12.000Z","size":538,"stargazers_count":56,"open_issues_count":4,"forks_count":33,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-03-15T01:40:09.936Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rivella50.png","metadata":{"files":{"readme":"README.textile","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2009-12-21T13:32:00.000Z","updated_at":"2024-10-11T00:45:06.000Z","dependencies_parsed_at":"2022-09-13T17:51:03.572Z","dependency_job_id":null,"html_url":"https://github.com/rivella50/talib-ruby","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rivella50%2Ftalib-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rivella50%2Ftalib-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rivella50%2Ftalib-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rivella50%2Ftalib-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rivella50","download_url":"https://codeload.github.com/rivella50/talib-ruby/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243695465,"owners_count":20332622,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T22:01:34.957Z","updated_at":"2025-03-15T06:33:18.213Z","avatar_url":"https://github.com/rivella50.png","language":"C","readme":"h2. talib-ruby\n\nRuby Wrapper for \"ta-lib\":http://ta-lib.org/\n\nThis project has been started by Timur Adigamov on \"Rubyforge\":http://rubyforge.org/projects/talib-ruby/,\nbut since it didn't build on my machine and wasn't complete i modified it slightly, et voila.\n\nh4. Important note for commit id \"11277315208a8bfcfd2a3211e10b5732d6705fc7\":https://github.com/rivella50/talib-ruby/commit/11277315208a8bfcfd2a3211e10b5732d6705fc7 and gem version 1.0.6\n\nFrom now on all returned lists from talib_ruby now correspond to what ta-lib returns, i.e. there will be no longer leading nil values in any outXYZ lists.\nThe nil values will now be trailing nil values if your inserted outXYZ lists are too large (let's say you always insert out arrays with the same length as the inXYZ lists).\nTherefore the returned value outBegIdx is no more relevant for the outXYZ lists, since the first calculated value can be found right at index 0 in the outXYZ lists.\nAll calculated values are still the same, it's only a shifting issue which has been corrected now.\nThanks go to Masayuki Yamamoto who showed me this.\n\nh3. Install and build instructions\n\nh4. Install ta-lib:\n\nInstall ta-lib from \"MacPorts\":http://www.macports.org/ports.php?by=name\u0026substr=ta-lib:\n\nbc. sudo port install ta-lib\n\nOr install ta-lib from \"Homebrew\":https://github.com/mxcl/homebrew/blob/master/Library/Formula/ta-lib.rb:\n\nbc. sudo brew install ta-lib\n\nIf you want to compile ta-lib from the sources (\"ta-lib.org\":http://www.ta-lib.org/hdr_dw.html) you have to use the following statements (thanks to rmldj):\n\nbc. ./configure LDFLAGS=\"-lm\"\nmake\nsudo make install\n\nh4. Install the ruby wrapper talib_ruby:\n\nbc. sudo env ARCHFLAGS=\"-arch PLATFORM\" gem install talib_ruby -- --with-talib-include=ABSOLUTE_PATH_TO_TALIB_HEADERS  --with-talib-lib=ABSOLUTE_PATH_TO_TALIB_LIBS\n\n* PLATFORM = [i386 | x86_64 | ...]\n* ABSOLUTE_PATH_TO_TALIB_HEADERS = The path to the ta-lib header files\n** e.g. for Port: /opt/local/var/macports/software/ta-lib/0.4.0_0/opt/local/include\n** e.g. for Homebrew: /usr/local/Cellar/ta-lib/0.4.0/include\n* ABSOLUTE_PATH_TO_TALIB_LIBS = The path to the ta-lib lib files\n** e.g. fo Port: /opt/local/var/macports/software/ta-lib/0.4.0_0/opt/local/lib\n** e.g. fo Homebrew: /usr/local/Cellar/ta-lib/0.4.0/lib\n\nNow ta-lib can be used by using _require 'talib_ruby'_\nNeeds at least Mac OSX 10.5. Has not been tested on Windows, but works there too what i've heard.\nTested with Ruby 1.8.7, 1.9.3 and 2.0.0.\n\nh3. Example\n\nCalculation of Moving Average (MA):\n\nbc.. require 'rubygems'\nrequire 'talib_ruby'\n\n# init input data\na = Array.new\n10.times { |i| a.push i.to_f }\n\n10.times do |k|\n    b = Array.new(10)\n    l = TaLib::Function.new(\"MA\")\n    # setup input parameter\n    l.in_real(0,a)\n    # setup optional parameter\n    l.opt_int(0,k+2)\n    # setup output parameter\n    l.out_real(0,b)\n    lookback = l.lookback\n    l.call(0,9)\n    p \"k=#{k+2}\"\n    p b\nend\n\nh3. Useful links\n\n* \"TA-Lib Forum\":http://www.tadoc.org/forum/index.php?board=9.0\n* \"XML explanation\":http://ta-lib.svn.sourceforge.net/viewvc/ta-lib/trunk/ta-lib/ta_func_api.xml?view=markup of all supported Functions\n* \"C/C++ API Documentation\":http://ta-lib.org/d_api/d_api.html\n\nh3. Donate\n\nIf you think this library is useful i would be grateful for a donation.\n!https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif!:https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=NCX9EKVWBTBBJ\n\nh3. License\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nCopyright (c) 2013 by Valentin Treu, released under the MIT license.","funding_links":["https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif!:https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=NCX9EKVWBTBBJ"],"categories":["TODO scan for Android support in followings"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frivella50%2Ftalib-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frivella50%2Ftalib-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frivella50%2Ftalib-ruby/lists"}