Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maurodelazeri/go-talib
TA-Lib implementation in go (golang) (http://ta-lib.org)
https://github.com/maurodelazeri/go-talib
finance golang statistics ta-lib
Last synced: about 2 months ago
JSON representation
TA-Lib implementation in go (golang) (http://ta-lib.org)
- Host: GitHub
- URL: https://github.com/maurodelazeri/go-talib
- Owner: maurodelazeri
- License: mit
- Created: 2018-01-25T13:53:09.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-09-16T13:59:40.000Z (over 6 years ago)
- Last Synced: 2024-06-20T13:38:56.939Z (6 months ago)
- Topics: finance, golang, statistics, ta-lib
- Language: Go
- Size: 29.3 KB
- Stars: 9
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-talib
[![GoDoc](http://godoc.org/github.com/maurodelazeri/go-talib?status.svg)](http://godoc.org/github.com/maurodelazeri/go-talib)
A pure [Go](http://golang.org/) port of [TA-Lib](http://ta-lib.org)
## Install
Install the package with:
```bash
go get github.com/maurodelazeri/go-talib
```Import it with:
```go
import "github.com/maurodelazeri/go-talib"
```and use `talib` as the package name inside the code.
## Example
```go
package mainimport (
"fmt"
"github.com/maurodelazeri/go-talib"
)// Standard Deviation
func main() {
x := []float64{22.2,22.33,21.22,23.22,21.00}
fmt.Println(talib.StdDev(x, 5, 2))
[0 0 0 0 1.611339815184824]
}
``````
package mainimport (
"fmt"
"github.com/markcheno/go-quote"
"github.com/markcheno/go-talib"
)func main() {
spy, _ := quote.NewQuoteFromYahoo("spy", "2016-01-01", "2016-04-01", quote.Daily, true)
fmt.Print(spy.CSV())
rsi2 := talib.Rsi(spy.Close, 2)
fmt.Println(rsi2)
}
```