Beispiel #1
0
func GetWindowTrader(id int, trainer philoctetes.TrainerInt, curr string, collector charont.Int, unitsToUse, samplesToConsiderer, maxSecToWait int) (wt *windowTrader) {
	wt = &windowTrader{
		collector:           collector,
		trainer:             trainer,
		realOps:             false,
		curr:                curr,
		unitsToUse:          unitsToUse,
		samplesToConsiderer: samplesToConsiderer,
		maxSecToWait:        maxSecToWait,
		id:                  id,
		mutex:               new(sync.Mutex),
	}

	collector.AddListerner(curr, wt.NewPrices)

	return
}