Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
33 lines (27 sloc) 576 Bytes
package gobacktest
// Direction defines which direction a signal indicates
type Direction int
// different types of order directions
const (
// Buy
BOT Direction = iota // 0
// Sell
// Hold
// Exit
// Signal declares a basic signal event
type Signal struct {
direction Direction // long, short, exit or hold
// Direction returns the Direction of a Signal
func (s Signal) Direction() Direction {
return s.direction
// SetDirection sets the Directions field of a Signal
func (s *Signal) SetDirection(dir Direction) {
s.direction = dir
You can’t perform that action at this time.