{"id":15011636,"url":"https://github.com/Ooples-Finance-LLC/OoplesFinance.StockIndicators","last_synced_at":"2025-12-30T00:03:22.678Z","repository":{"id":43752656,"uuid":"440341534","full_name":"ooples/OoplesFinance.StockIndicators","owner":"ooples","description":"Largest C# stock indicator library with over 750 to choose from and easiest to use with abilities such as making an indicator out of any other indicator or using any moving average with any indicator. ","archived":false,"fork":false,"pushed_at":"2024-09-21T01:46:58.000Z","size":2262,"stargazers_count":228,"open_issues_count":8,"forks_count":63,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-04-03T19:16:31.839Z","etag":null,"topics":["backtesting","finance","indicator","indicators","nuget","nuget-package","stock","stock-analysis","stock-indicators","stock-trading","technical-analysis","technical-indicators"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ooples.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","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,"publiccode":null,"codemeta":null},"funding":{"github":"ooples","patreon":"cheatcountry","open_collective":null,"ko_fi":"cheatcountry","tidelift":null,"community_bridge":null,"liberapay":"cheatcountry","issuehunt":"ooples","otechie":"cheatcountry","custom":["https://www.paypal.me/cheatcountry","https://www.buymeacoffee.com/cheatcountry"]}},"created_at":"2021-12-21T00:15:16.000Z","updated_at":"2025-02-26T04:28:07.000Z","dependencies_parsed_at":"2023-02-09T15:46:21.206Z","dependency_job_id":"ea8116d0-d884-482a-8732-131fbf68abca","html_url":"https://github.com/ooples/OoplesFinance.StockIndicators","commit_stats":{"total_commits":125,"total_committers":5,"mean_commits":25.0,"dds":"0.22399999999999998","last_synced_commit":"c036fae4bc565bb188e1d1c92c5f2e987d072fb5"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ooples%2FOoplesFinance.StockIndicators","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ooples%2FOoplesFinance.StockIndicators/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ooples%2FOoplesFinance.StockIndicators/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ooples%2FOoplesFinance.StockIndicators/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ooples","download_url":"https://codeload.github.com/ooples/OoplesFinance.StockIndicators/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248616023,"owners_count":21133991,"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":["backtesting","finance","indicator","indicators","nuget","nuget-package","stock","stock-analysis","stock-indicators","stock-trading","technical-analysis","technical-indicators"],"created_at":"2024-09-24T19:41:22.448Z","updated_at":"2025-12-30T00:03:22.647Z","avatar_url":"https://github.com/ooples.png","language":"C#","funding_links":["https://github.com/sponsors/ooples","https://patreon.com/cheatcountry","https://ko-fi.com/cheatcountry","https://liberapay.com/cheatcountry","https://issuehunt.io/r/ooples","https://otechie.com/cheatcountry","https://www.paypal.me/cheatcountry","https://www.buymeacoffee.com/cheatcountry"],"categories":[],"sub_categories":[],"readme":"\n![Nuget](https://img.shields.io/nuget/dt/OoplesFinance.StockIndicators?style=plastic)\n![Nuget (with prereleases)](https://img.shields.io/nuget/vpre/OoplesFinance.StockIndicators?style=plastic)\n![GitHub](https://img.shields.io/github/license/ooples/OoplesFinance.StockIndicators?style=plastic)\n\n## .Net Stock Indicator Library\n\nThis is a stock indicator library that is completely open source (Apache 2.0 license) and very easy to use. Current version contains [763 stock indicators](https://ooples.github.io/OoplesFinance.StockIndicators/indicators) and I will add more as I get requests for them!\n\n\n### How to use this library\n\nHere is an example to show how easy it is to create indicators using other indicators\n\n```cs\nvar stockData = new StockData(openPrices, highPrices, lowPrices, closePrices, volumes);\nvar results = stockData.CalculateRelativeStrengthIndex().CalculateMovingAverageConvergenceDivergence();\n```\n\nHere is a simple example calculating default bollinger bands to get you started using the [Alpaca C# Api](https://github.com/alpacahq/alpaca-trade-api-csharp)\n\n```cs\nusing Alpaca.Markets;\nusing OoplesFinance.StockIndicators.Models;\nusing static OoplesFinance.StockIndicators.Calculations;\n\nconst string paperApiKey = \"REPLACEME\";\nconst string paperApiSecret = \"REPLACEME\";\nconst string symbol = \"AAPL\";\nvar startDate = new DateTime(2021, 01, 01);\nvar endDate = new DateTime(2021, 12, 31);\n\nvar client = Environments.Paper.GetAlpacaDataClient(new SecretKey(paperApiKey, paperApiSecret));\nvar bars = (await client.ListHistoricalBarsAsync(new HistoricalBarsRequest(symbol, startDate, endDate, BarTimeFrame.Day)).ConfigureAwait(false)).Items;\nvar stockData = new StockData(bars.Select(x =\u003e x.Open), bars.Select(x =\u003e x.High), bars.Select(x =\u003e x.Low), bars.Select(x =\u003e x.Close), bars.Select(x =\u003e x.Volume), bars.Select(x =\u003e x.TimeUtc));\n\nvar results = stockData.CalculateBollingerBands();\nvar upperBandList = results.OutputValues[\"UpperBand\"];\nvar middleBandList = results.OutputValues[\"MiddleBand\"];\nvar lowerBandList = results.OutputValues[\"LowerBand\"];\n```\n\nHere is a more advanced example showing how to calculate bollinger bands with full customization and using a custom input of high rather than the default close\n```cs\nvar stockData = new StockData(bars.Select(x =\u003e x.Open), bars.Select(x =\u003e x.High), bars.Select(x =\u003e x.Low), \nbars.Select(x =\u003e x.Close), bars.Select(x =\u003e x.Volume), bars.Select(x =\u003e x.TimeUtc), InputName.High);\n\nvar results = stockData.CalculateBollingerBands(MovingAvgType.EhlersMesaAdaptiveMovingAverage, 15, 2.5m);\nvar upperBandList = results.OutputValues[\"UpperBand\"];\nvar middleBandList = results.OutputValues[\"MiddleBand\"];\nvar lowerBandList = results.OutputValues[\"LowerBand\"];\n```\n\nIt is extremely important to remember that if you use the same data source to calculate different indicators without using the chaining method then you need to clear the data in between each call. We have a great example for this below:\n```cs\nvar stockData = new StockData(bars.Select(x =\u003e x.Open), bars.Select(x =\u003e x.High), bars.Select(x =\u003e x.Low), \nbars.Select(x =\u003e x.Close), bars.Select(x =\u003e x.Volume), bars.Select(x =\u003e x.TimeUtc), InputName.High);\n\nvar sma = stockData.CalculateSimpleMovingAverage(14);\n\n// if you don't perform this clear method in between then your ema result will be calculated using the sma results\nstockData.Clear();\n\nvar ema = stockData.CalculateExponentialMovingAverage(14);\n```\n\nFor more detailed Alpaca examples then check out my more advanced [Alpaca example code](https://github.com/alpacahq/alpaca-trade-api-csharp/blob/develop/UsageExamples/IndicatorLibraryExample.cs)\n\n\n### Support This Project\n\nBTC: 36DRmZefJNW82q9pHY1kWYSZhLUWQkpgGq\n\nETH: 0x7D6e58754476189ffF736B63b6159D2647f74f34\n\nUSDC: 0x587Ae0709f45b970992bdD772bF693141D95CAED\n\nDOGE: DF1nsK1nLASzmwHNAfNengBGS4w7bNyJ1e\n\nSHIB: 0xCDe2355212764218355c9393FbE121Ae49B43382\n\nPaypal: [https://www.paypal.me/cheatcountry](https://www.paypal.me/cheatcountry)\n\nPatreon: [https://patreon.com/cheatcountry](https://patreon.com/cheatcountry)\n\n\n### Support or Contact\n\nEmail me at cheatcountry@gmail.com for any help or support or to let me know of ways to further improve this library.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOoples-Finance-LLC%2FOoplesFinance.StockIndicators","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FOoples-Finance-LLC%2FOoplesFinance.StockIndicators","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOoples-Finance-LLC%2FOoplesFinance.StockIndicators/lists"}