Esempio n. 1
0
// Make creates a new empty portfolio
func MakeOptions(e *engine.Handle) *OptionsPortfolio {
	return &OptionsPortfolio{
		Portfolio{
			e:         e,
			positions: collection.Make(e),
		},
	}
}
Esempio 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)
}
Esempio n. 3
0
// Make creates a new empty portfolio
func Make(e *engine.Handle) *Portfolio {
	return &Portfolio{
		e:         e,
		positions: collection.Make(e),
	}
}