mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-25 16:25:16 +00:00
ref/profitStatsTracker: TradeCollector is move to core pkg
This commit is contained in:
parent
4c1639cf00
commit
2a80d708af
|
@ -2,6 +2,7 @@ package report
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/c9s/bbgo/pkg/bbgo"
|
"github.com/c9s/bbgo/pkg/bbgo"
|
||||||
|
"github.com/c9s/bbgo/pkg/core"
|
||||||
"github.com/c9s/bbgo/pkg/fixedpoint"
|
"github.com/c9s/bbgo/pkg/fixedpoint"
|
||||||
"github.com/c9s/bbgo/pkg/types"
|
"github.com/c9s/bbgo/pkg/types"
|
||||||
)
|
)
|
||||||
|
@ -48,7 +49,7 @@ func (p *ProfitStatsTracker) Init(market types.Market, ts *types.TradeStats) {
|
||||||
p.InitOld(market, &ps, ts)
|
p.InitOld(market, &ps, ts)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *ProfitStatsTracker) Bind(session *bbgo.ExchangeSession, tradeCollector *bbgo.TradeCollector) {
|
func (p *ProfitStatsTracker) Bind(session *bbgo.ExchangeSession, tradeCollector *core.TradeCollector) {
|
||||||
tradeCollector.OnProfit(func(trade types.Trade, profit *types.Profit) {
|
tradeCollector.OnProfit(func(trade types.Trade, profit *types.Profit) {
|
||||||
if profit == nil {
|
if profit == nil {
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue
Block a user