mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
bbgo: session log error
This commit is contained in:
parent
9a64acedc9
commit
93d71b5300
|
@ -96,7 +96,7 @@ func (trader *Trader) DisableLogging() {
|
|||
// Single exchange strategy is the default behavior.
|
||||
func (trader *Trader) AttachStrategyOn(session string, strategies ...SingleExchangeStrategy) *Trader {
|
||||
if _, ok := trader.environment.sessions[session]; !ok {
|
||||
log.Panicf("Session %s is not defined", session)
|
||||
log.Panicf("session %s is not defined", session)
|
||||
}
|
||||
|
||||
for _, s := range strategies {
|
||||
|
@ -153,7 +153,6 @@ func (trader *Trader) Run(ctx context.Context) error {
|
|||
session.Stream.OnTradeUpdate(baseOrderExecutor.EmitTradeUpdate)
|
||||
session.Stream.OnOrderUpdate(baseOrderExecutor.EmitOrderUpdate)
|
||||
|
||||
|
||||
// default to base order executor
|
||||
var orderExecutor OrderExecutor = baseOrderExecutor
|
||||
|
||||
|
@ -302,4 +301,3 @@ func (trader *Trader) Run(ctx context.Context) error {
|
|||
func (trader *Trader) ReportPnL() *PnLReporterManager {
|
||||
return NewPnLReporter(&trader.environment.Notifiability)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user