{"id":13896395,"url":"https://github.com/azoyan/talua","last_synced_at":"2025-07-17T12:33:21.527Z","repository":{"id":88510078,"uuid":"311037346","full_name":"azoyan/talua","owner":"azoyan","description":"Techincal Analysis and Indicators Lua library","archived":false,"fork":false,"pushed_at":"2023-08-04T13:07:59.000Z","size":99,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-08-07T18:39:28.876Z","etag":null,"topics":["indicators","lua","luajit","techincal-indicators","technical-analysis"],"latest_commit_sha":null,"homepage":"https://azoyan.github.io/talua","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/azoyan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-11-08T10:29:53.000Z","updated_at":"2024-07-16T19:04:42.000Z","dependencies_parsed_at":"2024-02-10T00:12:07.957Z","dependency_job_id":null,"html_url":"https://github.com/azoyan/talua","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azoyan%2Ftalua","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azoyan%2Ftalua/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azoyan%2Ftalua/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azoyan%2Ftalua/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/azoyan","download_url":"https://codeload.github.com/azoyan/talua/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226265521,"owners_count":17597222,"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":["indicators","lua","luajit","techincal-indicators","technical-analysis"],"created_at":"2024-08-06T18:02:53.326Z","updated_at":"2024-11-25T02:30:26.190Z","avatar_url":"https://github.com/azoyan.png","language":"Lua","funding_links":[],"categories":["Lua"],"sub_categories":[],"readme":"![logo](https://i.ibb.co/Xsr4jwQ/untitled-6-1.png)\n[![build status](https://github.com/azoyan/talua/workflows/CI/badge.svg)](https://github.com/azoyan/talua/actions?query=workflow%3ACI)\n[![Travis (.org)](https://img.shields.io/travis/azoyan/talua?logo=travis)](https://travis-ci.org/azoyan/talua)\n[![AppVeyor](https://img.shields.io/appveyor/build/azoyan/talua?logo=appveyor)](https://ci.appveyor.com/project/azoyan/talua)\n[![Coveralls github](https://img.shields.io/coveralls/github/azoyan/talua?color=dark%20green\u0026logo=coveralls)](https://coveralls.io/github/azoyan/talua?branch=main)\n[![codecov](https://codecov.io/gh/azoyan/talua/branch/main/graph/badge.svg?token=NP5G0OBNB3)](https://codecov.io/gh/azoyan/talua)\n[![License](https://img.shields.io/badge/License-MIT-brightgreen.svg)](LICENSE)\n \nTechincal Analysis and Indicators library written in Lua\n\nProvides most popular technical indicators.\n\n## Getting started\n### Install from luarocks\n```sh\nluarocks install talua\n```\n\n## Basic ideas\n\nCommon to the whole API are the functions `add`, `last`, `series` and `reset`.\n\n### `add(...)` \nThe add function is universal and can take a `number`, several numbers, or a table of numbers as arguments, as well as, in most cases, a candlestick (`Candlestick`), several candlesticks, and a table of candlesticks. \n\nThe function returns the `self`, so you can call it multiple times or call another method of the object. Take a look:\n```Lua\nlocal SimpleMovingAverage = require \"SimpleMovingAverage\"\n\nlocal sma = SimpleMovingAverage(4)\n\nsma:add(4.0)\nsma:add(5.0)\nsma:add(6.0)\nsma:add(6.0)\n\n-- it is same as:\nsma:add(4,0, 5.0, 6.0, 6.0)\n-- or\nsma:add{4,0, 5.0, 6.0, 6.0}\n-- or\nsma:add{{4.0, {5.0, {6.0, {6.0 }}}}}\n-- or\nsma:add(4.0):add(5.0):add(6.0):add(6.0)\n```\nYou can combine numbers and Сandlesticks as you like:\n```lua\nlocal Candlestick = require \"Candlestick\"\nlocal candle1 = Candlestick():close(4.0)\nlocal candle2 = Candlestick():close(4.0)\n\nsma:add({candle1, candle2}, {7, 1}):add(Candlestick():close(3)):add(4.0):add{5.0, 5.5}\n```\n\n### `last()`\nReturns last or in other words actual or current value of indicator series:\n```\nlocal last = sma:add{4.0, 5.0, 6.0, 6.0, 6.0, 6.0, 2.0}:last() -- 5.0\n```\n\n### `series()`\nReturns series of indicator values:\n```lua\nlocal sma = SimpleMovingAverage(9)\n\nlocal input = {22.81, 23.09, 22.91, 23.23, 22.83, 23.05, 23.02, 23.29, 23.41, 23.49, 24.60, 24.63, 24.51, 23.73,\n              23.31, 23.53, 23.06, 23.25, 23.12, 22.80, 22.84}\n\nlocal series = sma:add(input):series() -- 23.07, 23.15, 23.31, 23.51, 23.65, 23.75, 23.78, 23.83, 23.81, 23.79, 23.75, 23.55, 23.35\n```\n\nExample:\n```lua\nlocal RelativeStrengthIndex = require \"RelativeStrengthIndex\"\n    \nlocal rsi = RelativeStrengthIndex(14) -- period argument\n\nrsi:add(283.46, 280.69, 285.48, 294.08, 293.90, 299.92, 301.15, 284.45, 294.09, 302.77, 301.97, 306.85,\n        305.02, 301.06, 291.97, 284.18, 286.48, 284.54, 276.82, 284.49, 275.01, 279.07, 277.85, 278.85,\n        283.76, 291.72, 284.73, 291.82, 296.74, 291.13)\n\nlocal last = rsi:last() -- returns last RSI value 54.17\n\n-- To return series of RSI:\nlocal series = rsi:series() -- 55.37, 50.07, 51.55, 50.20, 45.14, 50.48, 44.69, 47.47, 46.71, 47.45, 51.05, 56.29, 51.12, 55.58, 58.41, 54.17\n\nlocal SimpleMovingAverage = require \"SimpleMovingAverage\"\n\nlocal sma = SimpleMovingAverage(4)\n-- Possibly usage:\n sma:add{4.0, 5.0, 6.0, 6.0, 6.0, 6.0, 2.0}:last() -- 5.0\n```\n\n## List of indicators\n\nSo far there are the following indicators available.\n\n* Trend\n  * Exponential Moving Average (EMA)\n  * Simple Moving Average (SMA)\n* Oscillators\n  * Relative Strength Index (RSI)\n  * Fast Stochastic\n  * Slow Stochastic\n  * Moving Average Convergence Divergence (MACD)\n  * Percentage Price Oscillator (PPO)\n  * Money Flow Index (MFI)\n* Other\n  * Minimum\n  * Maximum\n  * True Range\n  * Standard Deviation (SD)\n  * Average True Range (AR)\n  * Efficiency Ratio (ER)\n  * Bollinger Bands (BB)\n  * Chandelier Exit (CE)\n  * Keltner Channel (KC)\n  * Rate of Change (ROC)\n  * On Balance Volume (OBV)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazoyan%2Ftalua","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fazoyan%2Ftalua","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazoyan%2Ftalua/lists"}