{"id":24150408,"url":"https://github.com/cinar/indicator","last_synced_at":"2026-02-16T03:14:27.885Z","repository":{"id":36976256,"uuid":"376093856","full_name":"cinar/indicator","owner":"cinar","description":"Indicator Go delivers a rich set of technical analysis indicators, customizable strategies, and a powerful backtesting framework. No dependencies, just pure simplicity. ✨ See how! 👀","archived":false,"fork":false,"pushed_at":"2025-09-27T02:58:43.000Z","size":1038,"stargazers_count":745,"open_issues_count":20,"forks_count":142,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-10-24T21:39:47.703Z","etag":null,"topics":["algorithmic-trading","bollinger-bands","finance","financial-instruments","indicator","indicators","macd","quant","quantative-finance","quantative-trading","quantitative-finance","stock-analysis","stock-market","technical-analysis","technical-analysis-indicators","technical-analysis-library","trading","trading-algorithms","trading-strategies","yahoo-finance"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cinar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":"CLA.md"},"funding":{"github":["cinar"]}},"created_at":"2021-06-11T17:13:04.000Z","updated_at":"2025-10-24T07:34:11.000Z","dependencies_parsed_at":"2024-04-15T15:45:28.531Z","dependency_job_id":"50189b80-5985-4704-98e4-4877e28ce9ec","html_url":"https://github.com/cinar/indicator","commit_stats":null,"previous_names":[],"tags_count":60,"template":false,"template_full_name":null,"purl":"pkg:github/cinar/indicator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cinar%2Findicator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cinar%2Findicator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cinar%2Findicator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cinar%2Findicator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cinar","download_url":"https://codeload.github.com/cinar/indicator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cinar%2Findicator/sbom","scorecard":{"id":282862,"data":{"date":"2025-08-11","repo":{"name":"github.com/cinar/indicator","commit":"8252ac7724806beccbd008ec65fc14e355ff6363"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.1,"checks":[{"name":"Security-Policy","score":4,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Warn: no linked content found","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Maintained","score":3,"reason":"3 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Code-Review","score":1,"reason":"Found 3/30 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql-analysis.yml:22","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql-analysis.yml:23","Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Warn: topLevel 'actions' permission set to 'write': .github/workflows/cla.yml:9","Warn: topLevel 'contents' permission set to 'write': .github/workflows/cla.yml:10","Warn: topLevel 'statuses' permission set to 'write': .github/workflows/cla.yml:12","Warn: no topLevel permission defined: .github/workflows/codeql-analysis.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/cinar/indicator/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/cinar/indicator/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/cinar/indicator/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/cinar/indicator/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/cla.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/cinar/indicator/cla.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/cinar/indicator/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/cinar/indicator/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:50: update your workflow using https://app.stepsecurity.io/secureworkflow/cinar/indicator/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:62: update your workflow using https://app.stepsecurity.io/secureworkflow/cinar/indicator/codeql-analysis.yml/master?enable=pin","Info:   0 out of   7 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: GNU Affero General Public License v3.0: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":9,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","Warn: 25 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T16:22:08.062Z","repository_id":36976256,"created_at":"2025-08-17T16:22:08.062Z","updated_at":"2025-08-17T16:22:08.062Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28419552,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["algorithmic-trading","bollinger-bands","finance","financial-instruments","indicator","indicators","macd","quant","quantative-finance","quantative-trading","quantitative-finance","stock-analysis","stock-market","technical-analysis","technical-analysis-indicators","technical-analysis-library","trading","trading-algorithms","trading-strategies","yahoo-finance"],"created_at":"2025-01-12T09:01:31.867Z","updated_at":"2026-01-14T12:10:18.932Z","avatar_url":"https://github.com/cinar.png","language":"Go","readme":"[![GoDoc](https://godoc.org/github.com/cinar/indicator/v2?status.svg)](https://godoc.org/github.com/cinar/indicator/v2) [![License](https://img.shields.io/badge/License-AGPLv3-blue.svg)](https://opensource.org/licenses/AGPLv3) [![Go Report Card](https://goreportcard.com/badge/github.com/cinar/indicator/v2)](https://goreportcard.com/report/github.com/cinar/indicator/v2) ![Go CI](https://github.com/cinar/indicator/actions/workflows/ci.yml/badge.svg) [![codecov](https://codecov.io/gh/cinar/indicator/graph/badge.svg?token=MB7L69UAWM)](https://codecov.io/gh/cinar/indicator)\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"logo.png\" /\u003e\n\u003c/p\u003e\n\nIndicator Go\n============\n\nIndicator is a Golang module that provides a rich set of technical analysis indicators, strategies, and a framework for backtesting.\n\n### Major improvements in v2:\n\n-\t**Enhanced Code Quality:** A complete rewrite was undertaken to achieve and maintain at least 90% code coverage.\n-\t**Improved Testability:** Each indicator and strategy have dedicated test data in CSV format for easier validation.\n-\t**Streamlined Data Handling:** The library was rewritten to operate on data streams (Go channels) for both inputs and outputs. If you prefer using slices, helper functions like [helper.SliceToChan](helper/README.md#func-slicetochan) and [helper.ChanToSlice](helper/README.md#func-chantoslice) are available. Alternatively, you can still use the [v1 version](https://github.com/cinar/indicator/tree/v1).\n-\t**Configurable Indicators and Strategies:** All indicators and strategies were designed to be fully configurable with no preset values.\n-\t**Generics Support:** The library leverages Golang generics to support various numeric data formats.\n-   **MCP Support:** MCP (Multi-Client Protocol Server) support is integrated into the library, facilitating its use with various AI tools.\n\nI also have a TypeScript version of this module now at [Indicator TS](https://github.com/cinar/indicatorts).\n\n👆 Indicators Provided\n----------------------\n\nThe following list of indicators are currently supported by this package:\n\n### 📈 Trend Indicators\n\n-\t[Absolute Price Oscillator (APO)](trend/README.md#type-apo)\n-\t[Aroon Indicator](trend/README.md#type-aroon)\n-\t[Balance of Power (BoP)](trend/README.md#type-bop)\n-\tChande Forecast Oscillator (CFO)\n-\t[Community Channel Index (CCI)](trend/README.md#type-cci)\n-   [Envelope](trend/README.md#type-envelope)\n-\t[Hull Moving Average (HMA)](trend/README.md#type-hma)\n-   [Detrended Price Oscillator (DPO)](trend/README.md#type-dpo)\n-\t[Double Exponential Moving Average (DEMA)](trend/README.md#type-dema)\n-\t[Exponential Moving Average (EMA)](trend/README.md#type-ema)\n-\t[Kaufman's Adaptive Moving Average (KAMA)](trend/README.md#type-kama)\n-\t[Mass Index (MI)](trend/README.md#type-massindex)\n-\t[Moving Average Convergence Divergence (MACD)](trend/README.md#type-macd)\n-\t[Moving Least Square (MLS)](trend/README.md#type-mls)\n-\t[Moving Linear Regression (MLR)](trend/README.md#type-mlr)\n-\t[Moving Max](trend/README.md#type-movingmax)\n-\t[Moving Min](trend/README.md#type-movingmin)\n-\t[Moving Sum](trend/README.md#type-movingsum)\n-\tParabolic SAR\n-\t[Random Index (KDJ)](trend/README.md#type-kdj)\n-\t[Rolling Moving Average (RMA)](trend/README.md#type-rma)\n-\t[Simple Moving Average (SMA)](trend/README.md#type-sma)\n-\t[Since Change](helper/README.md#func-since)\n-   [Smoothed Moving Average (SMMA)](trend/README.md#type-smma)\n-\t[Triple Exponential Moving Average (TEMA)](trend/README.md#type-tema)\n-\t[Triangular Moving Average (TRIMA)](trend/README.md#type-trima)\n-\t[Triple Exponential Average (TRIX)](trend/README.md#type-trix)\n-\t[True Strength Index (TSI)](trend/README.md#type-tsi)\n-\t[Typical Price](trend/README.md#type-typicalprice)\n-\t[Volume Weighted Moving Average (VWMA)](trend/README.md#type-vwma)\n-\tVortex Indicator\n-   [Weighted Close](trend/README.md#type-weightedclose)\n-\t[Weighted Moving Average (WMA)](trend/README.md#type-wma)\n\n### 🚀 Momentum Indicators\n\n-\t[Awesome Oscillator](momentum/README.md#type-awesomeoscillator)\n-\t[Chaikin Oscillator](momentum/README.md#type-chaikinoscillator)\n-\t[Ichimoku Cloud](momentum/README.md#type-ichimokucloud)\n-\t[Percentage Price Oscillator (PPO)](momentum/README.md#type-ppo)\n-\t[Percentage Volume Oscillator (PVO)](momentum/README.md#type-pvo)\n-   [Martin Pring's Special K](momentum/README.md#PringsSpecialK)\n-\t[Relative Strength Index (RSI)](momentum/README.md#type-rsi)\n-\t[Qstick](momentum/README.md#type-qstick)\n-\t[Stochastic Oscillator](momentum/README.md#type-stochasticoscillator)\n-\t[Stochastic RSI](momentum/README.md#type-stochasticrsi)\n-\t[Williams R](momentum/README.md#type-williamsr)\n\n### 🎢 Volatility Indicators\n\n-   [%B](volatility/README.md#type-percentb)\n-\t[Acceleration Bands](volatility/README.md#type-accelerationbands)\n-\t[Actual True Range (ATR)](volatility/README.md#type-atr)\n-\t[Bollinger Band Width](volatility/README.md#type-bollingerbandwidth)\n-\t[Bollinger Bands](volatility/README.md#type-bollingerbands)\n-\t[Chandelier Exit](volatility/README.md#type-chandelierexit)\n-\t[Donchian Channel (DC)](volatility/README.md#type-donchianchannel)\n-\t[Keltner Channel (KC)](volatility/README.md#type-keltnerchannel)\n-\t[Moving Standard Deviation (Std)](volatility/README.md#type-movingstd)\n-\t[Projection Oscillator (PO)](volatility/README.md#type-po)\n-\t[Super Trend](volatility/README.md#type-supertrend)\n-\t[Ulcer Index (UI)](volatility/README.md#type-ulcerindex)\n\n### 📢 Volume Indicators\n\n-\t[Accumulation/Distribution (A/D)](volume/README.md#type-ad)\n-\t[Chaikin Money Flow (CMF)](volume/README.md#type-cmf)\n-\t[Ease of Movement (EMV)](volume/README.md#type-emv)\n-\t[Force Index (FI)](volume/README.md#type-fi)\n-\t[Money Flow Index (MFI)](volume/README.md#type-mfi)\n-\t[Money Flow Multiplier (MFM)](volume/README.md#type-mfm)\n-\t[Money Flow Volume (MFV)](volume/README.md#type-mfv)\n-\t[Negative Volume Index (NVI)](volume/README.md#type-nvi)\n-\t[On-Balance Volume (OBV)](volume/README.md#type-obv)\n-\t[Volume Price Trend (VPT)](volume/README.md#type-vpt)\n-\t[Volume Weighted Average Price (VWAP)](volume/README.md#type-vwap)\n\n### 💰 Asset Valuation\n-   [Future Value (FV)](valuation/README.md#Fv)\n-   [Net Present Value (NPV)](valuation/README.md#Npv)\n-   [Present Value (PV)](valuation/README.md#Pv)\n\n🧠 Strategies Provided\n----------------------\n\nThe following list of strategies are currently supported by this package:\n\n### ⚖ Base Strategies\n\n-\t[Buy and Hold Strategy](strategy/README.md#type-buyandholdstrategy)\n\n### 📈 Trend Strategies\n\n-   [Alligator Strategy](strategy/trend/README.md#type-alligatorstrategy)\n-\t[Absolute Price Oscillator (APO) Strategy](strategy/trend/README.md#type-apostrategy)\n-\t[Aroon Strategy](strategy/trend/README.md#type-aroonstrategy)\n-\t[Balance of Power (BoP) Strategy](strategy/trend/README.md#type-bopstrategy)\n-\tChande Forecast Oscillator Strategy\n-\t[Community Channel Index (CCI) Strategy](strategy/trend/README.md#type-ccistrategy)\n-\t[Double Exponential Moving Average (DEMA) Strategy](strategy/trend/README.md#type-demastrategy)\n-   [Envelope Strategy](strategy/trend/README.md#type-envelope)\n-\t[Golden Cross Strategy](strategy/trend/README.md#type-goldencrossstrategy)\n-\t[Kaufman's Adaptive Moving Average (KAMA) Strategy](strategy/trend/README.md#type-kamastrategy)\n-\t[Moving Average Convergence Divergence (MACD) Strategy](strategy/trend/README.md#type-macdstrategy)\n-\t[Qstick Strategy](strategy/trend/README.md#type-qstickstrategy)\n-\t[Random Index (KDJ) Strategy](strategy/trend/README.md#type-kdjstrategy)\n-   [Smoothed Moving Average (SMMA) Strategy](strategy/trend/README.md#type-smmastrategy)\n-\t[Triangular Moving Average (TRIMA) Strategy](strategy/trend/README.md#type-trimastrategy)\n-\t[Triple Exponential Average (TRIX) Strategy](strategy/trend/README.md#type-trixstrategy)\n-\t[Triple Moving Average Crossover Strategy](strategy/trend/README.md#type-triplemovingaveragecrossoverstrategy)\n-\t[True Strength Index (TSI) Strategy](strategy/trend/README.md#type-tsistrategy)\n-\t[Volume Weighted Moving Average (VWMA) Strategy](strategy/trend/README.md#type-vwmastrategy)\n-   [Weighted Close Strategy](strategy/trend/README.md#type-weightedclosestrategy)\n\n### 🚀 Momentum Strategies\n\n-\t[Awesome Oscillator Strategy](strategy/momentum/README.md#type-awesomeoscillatorstrategy)\n-\t[RSI Strategy](strategy/momentum/README.md#type-rsistrategy)\n-\t[Stochastic RSI Strategy](strategy/momentum/README.md#type-stochasticrsistrategy)\n-\tWilliams R Strategy\n\n### 🎢 Volatility Strategies\n\n-\t[Bollinger Bands Strategy](strategy/volatility/README.md#type-bollingerbandsstrategy)\n-\tProjection Oscillator Strategy\n\n### 📢 Volume Strategies\n\n-\t[Chaikin Money Flow Strategy](strategy/volume/README.md#type-chaikinmoneyflowstrategy)\n-\t[Ease of Movement Strategy](strategy/volume/README.md#type-easeofmovementstrategy)\n-\t[Force Index Strategy](strategy/volume/README.md#type-forceindexstrategy)\n-\t[Money Flow Index Strategy](strategy/volume/README.md#type-moneyflowindexstrategy)\n-\t[Negative Volume Index Strategy](strategy/volume/README.md#type-negativevolumeindexstrategy)\n-\t[Weighted Average Price Strategy](strategy/volume/README.md#type-weightedaveragepricestrategy)\n\n### 🧪 Compound Strategies\n\nCompound strategies merge multiple strategies to produce integrated recommendations. They combine individual strategies' recommendations using various decision-making logic.\n\n-\t[All Strategy](strategy/README.md#type-allstrategy)\n-\t[Majority Strategy](strategy/README.md#type-majoritystrategy)\n-\t[MACD-RSI Strategy](strategy/compound/README.md#type-macdrsistrategy)\n-\t[Or Strategy](strategy/README.md#type-orstrategy)\n-\t[Split Strategy](strategy/README.md#type-splitstrategy)\n\n### 🎁 Decorator Strategies\n\nDecorator strategies offer a way to alter the recommendations of other strategies.\n\n-   [Inverse Strategy](strategy/decorator/README.md#type-inversestrategy)\n-   [No Loss Strategy](strategy/decorator/README.md#type-nolossstrategy)\n-   [Stop Loss Strategy](strategy/decorator/README.md#type-stoplossstrategy)\n\n🗃 Repositories\n--------------\n\nRepository serves as a centralized storage and retrieval location for [asset snapshots](asset/README.md#type-snapshot).\n\nThe following [repository implementations](asset/README.md#type-repository) are provided.\n\n-\t[File System Repository](asset/README.md#type-filesystemrepository)\n-\t[In Memory Repository](asset/README.md#type-inmemoryrepository)\n-\t[Tiingo Repository](asset/README.md#type-tiingorepository)\n-\t[Alpaca Markets Repository](https://github.com/cinar/indicatoralpaca)\n\nThe [Sync function]() facilitates the synchronization of assets between designated source and target repositories by employing multi-worker concurrency for enhanced efficiency. This function serves the purpose of procuring the most recent snapshots from remote repositories and seamlessly transferring them to local repositories, such as file system repositories.\n\nThe `indicator-sync` command line tool also offers the capability of synchronizing data between the Tiingo Repository and the File System Repository. To illustrate its usage, consider the following example command:\n\n```bash\n$ indicator-sync \\\n    -source-name tiingo \\\n    -source-config $TIINGO_KEY \\\n    -target-name filesystem \\\n    -target-config /home/user/assets \\\n    -days 30\n```\n\nThis command effectively retrieves the most recent snapshots for assets residing within the `/home/user/assets` directory from the Tiingo Repository. In the event that the local asset file is devoid of content, it automatically extends its reach to synchronize 30 days' worth of snapshots, ensuring a comprehensive and up-to-date repository.\n\n⏳ Backtesting\n--------------\n\nThe [Backtest functionality](strategy/README.md#type-backtest), using the [Outcome](strategy/README.md#func-outcome), rigorously evaluates the potential performance of the specified strategies applied to a defined set of assets. It generates comprehensive visual representations for each strategy-asset pairing.\n\n```go\nbacktest := strategy.NewBacktest(repository, outputDir)\nbacktest.Names = append(backtest.Names, \"brk-b\")\nbacktest.Strategies = append(backtest.Strategies, trend.NewApoStrategy())\n\nerr = backtest.Run()\nif err != nil {\n\tt.Fatal(err)\n}\n```\n\nThe `indicator-backtest` command line tool empowers users to conduct comprehensive backtesting of assets residing within a specified repository. This capability encompasses the application of all currently recognized strategies, culminating in the generation of detailed reports within a designated output directory.\n\n```bash\n$ indicator-backtest \\\n    -source-name filesystem \\\n    -source-config /home/user/assets \\\n    -output /home/user/reports \\\n    -workers 1\n```\n\n☁️  MCP Server\n--------------\n\nThe [MCP Server](mcp/README.md) (Multi-Client Protocol Server) provides a robust and scalable solution for serving trading strategies to multiple clients. It enables real-time strategy execution and data processing, making it ideal for applications requiring high-throughput and low-latency interactions with trading algorithms.\n\nUsage\n-----\n\nInstall package.\n\n```bash\ngo get github.com/cinar/indicator/v2\n```\n\nImport indicator.\n\n```Golang\nimport (\n    \"github.com/cinar/indicator/v2\"\n)\n```\n\n💖 Our Sponsors\n---------------\n\nIndicator is a community-supported project. The following companies, organizations, and individuals help make our work possible.  Become [a sponsor](https://github.com/sponsors/cinar) and help us continue to grow!\n\n![Our Sponsors](./sponsors.svg)\n\nContributing to the Project\n---------------------------\n\nAnyone can contribute to Indicator library. Please make sure to read our [Contributor Covenant Code of Conduct](./CODE_OF_CONDUCT.md) guide first. Follow the [How to Contribute to Indicator](./CONTRIBUTING.md) to contribute. Signining a [Contributor Agreement](./CLA.md) is also required to contribute to the project.\n\nDisclaimer\n----------\n\nThe information provided on this project is strictly for informational purposes and is not to be construed as advice or solicitation to buy or sell any security.\n\nLicense\n-------\n\nThe `v2.x.x` and above are dual-licensed under GNU AGPLv3 License and a commercial license. For free use and modifications of the code, you can use the AGPLv3 license. If you require commercial license with different terms, please contact me.\n\n```\nCopyright (c) 2021-2024 Onur Cinar.    \nThe source code is provided under GNU AGPLv3 License.\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU Affero General Public License as published\nby the Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Affero General Public License for more details.\n\nYou should have received a copy of the GNU Affero General Public License\nalong with this program.  If not, see \u003chttps://www.gnu.org/licenses/\u003e.\n```\n\nThe version `v1.x.x` is provided under MIT License.\n\n```\nCopyright (c) 2021-2024 Onur Cinar.\nThe source code is provided under MIT License.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","funding_links":["https://github.com/sponsors/cinar"],"categories":["Golang","Stock data","开发工具\u0026框架","Uncategorized","Financial"],"sub_categories":["Data Visualization","Uncategorized","Search and Analytic Databases"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcinar%2Findicator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcinar%2Findicator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcinar%2Findicator/lists"}