Require the package in your go.mod:
require github.com/bozzo/go-talib latest
Import it with:
import "github.com/bozzo/go-talib"
and use talib
as the package name inside the code.
package main
import (
"fmt"
"github.com/markcheno/go-quote"
"github.com/bozzo/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)
}
MIT License - see LICENSE for more details