mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 14:55:16 +00:00
bollmaker: call RecordProfit
This commit is contained in:
parent
8fa0e6702c
commit
25f3aeef58
|
@ -568,6 +568,7 @@ func (s *Strategy) Run(ctx context.Context, orderExecutor bbgo.OrderExecutor, se
|
|||
p := s.state.Position.NewProfit(trade, profit, netProfit)
|
||||
p.Strategy = ID
|
||||
p.StrategyInstanceID = instanceID
|
||||
s.Environment.RecordProfit(p)
|
||||
|
||||
s.state.ProfitStats.AddProfit(p)
|
||||
s.Notify(&p)
|
||||
|
|
|
@ -76,7 +76,7 @@ func (p *Position) NewProfit(trade Trade, profit, netProfit fixedpoint.Value) Pr
|
|||
// FeeInUSD: 0,
|
||||
Fee: trade.Fee,
|
||||
FeeCurrency: trade.FeeCurrency,
|
||||
|
||||
|
||||
Exchange: trade.Exchange,
|
||||
IsMargin: trade.IsMargin,
|
||||
IsFutures: trade.IsFutures,
|
||||
|
|
Loading…
Reference in New Issue
Block a user