Giter Site home page Giter Site logo

gotrade's Introduction

gotrade

Golang stock market technical analysis library

Build Status

Stories in Ready

GoTrade is in early design and development

Below is a look at the basic API so far

	csvFeed := feeds.NewCSVFileFeedWithDOHLCVFormat("../github.com/thetruetrade/gotrade/testdata/JSETOPI.2013.data",
		feeds.DashedYearDayMonthDateParserForLocation(time.Local))

	priceStream := gotrade.NewDailyDOHLCVStream()
	sma, _ := indicators.NewSMAForStream(priceStream, 20, gotrade.UseClosePrice)
	ema, _ := indicators.NewEMAForStream(priceStream, 20, gotrade.UseClosePrice)
	bb, _ := indicators.NewBollingerBandsForStream(priceStream, 20, gotrade.UseClosePrice)

	csvFeed.FillDOHLCVStream(priceStream)

	fmt.Println("price stream has data of length: ", len(priceStream.Data))
	fmt.Println("price stream has min date: ", priceStream.MinDate())
	fmt.Println("price stream has max date: ", priceStream.MaxDate())

	fmt.Println("sma has data of length: ", len(sma.Data))
	fmt.Println("sma is valid from price stream bar number: ", sma.ValidFromBar())
	fmt.Println("sma max: ", sma.MaxValue(), " sma min: ", sma.MinValue())

	fmt.Println("ema has data of length: ", len(ema.Data))
	fmt.Println("ema is valid from price stream bar number: ", ema.ValidFromBar())
	fmt.Println("ema max: ", ema.MaxValue(), " ema min: ", ema.MinValue())

	fmt.Println("bollinger bands has data of length: ", len(bb.Data))
	fmt.Println("bollinger bands is valid from price stream bar number: ", bb.ValidFromBar())
	fmt.Println("bollinger bands max: ", bb.MaxValue(), " sma min: ", bb.MinValue())

Tasks for the near future include:

  • Complete a basic set of indicators
  • Add point and figure price streams
  • Basic pattern matching
    • Candlesticks
    • Point and figure patterns
  • Visualisation in gotrade-plot
  • Operator support like Crosses etc.
  • Script engine in gotrade-script

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.