func GetHades(trainer philoctetes.TrainerInt, traders int, from int, collector charont.Int, unitsToUse, samplesToConsiderer, lastOpsToConsider, tradesThatCanPlay, maxSecsToWait int) (hades *Hades) { hades = &Hades{ traders: make([]hermes.Int, philoctetes.TrainersToRun*len(collector.GetCurrencies())), collector: collector, tradesThatCanPlay: tradesThatCanPlay, lastOpsToConsider: lastOpsToConsider, tradersPlaying: make(map[int]hermes.Int), } for i, curr := range collector.GetCurrencies() { for t := 0; t < philoctetes.TrainersToRun; t++ { log.Debug("Launching trader:", curr, "Id:", t, "TotalToLaunch:", len(hades.traders), i*t) hades.traders[i*philoctetes.TrainersToRun+t] = hermes.GetWindowTrader(t, trainer, curr, collector, unitsToUse, samplesToConsiderer, maxSecsToWait) } } go collector.Run() go hades.manageTraders() return }