Ejemplo n.º 1
0
// Make creates a new empty portfolio
func MakeOptions(e *engine.Handle) *OptionsPortfolio {
	return &OptionsPortfolio{
		Portfolio{
			e:         e,
			positions: collection.Make(e),
		},
	}
}
Ejemplo n.º 2
0
// Cleanup removes all positions from portfolio
// and shuts down the market date update loop
func (self *Portfolio) Cleanup() {
	self.mutex.Lock()
	defer self.mutex.Unlock()
	self.positions.Cleanup()
	self.positions = collection.Make(self.e)
}
Ejemplo n.º 3
0
// Make creates a new empty portfolio
func Make(e *engine.Handle) *Portfolio {
	return &Portfolio{
		e:         e,
		positions: collection.Make(e),
	}
}