gobacktest: github.com/dirkolbrich/gobacktest/strategy Index | Files

package strategy

import "github.com/dirkolbrich/gobacktest/strategy"


Package Files

buy-and-hold.go ma-cross.go

func BuyAndHold Uses

func BuyAndHold() *gbt.Strategy

BuyAndHold is a basic strategy, which creates a buy signal on every year change

func MovingAverageCross Uses

func MovingAverageCross(short, long int) *gbt.Strategy

MovingAverageCross is a test strategy, which interprets the SMA on a series of data events specified by ShortWindow (SW) and LongWindow (LW). If SW bigger tha LW and there is not already an invested BOT position, the strategy creates a buy signal. If SW falls below LW and there is an invested BOT position, the strategy creates an exit signal.

Package strategy imports 2 packages (graph). Updated 2018-08-03. Refresh now. Tools for package owners.