mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 16:55:15 +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 := s.state.Position.NewProfit(trade, profit, netProfit)
|
||||||
p.Strategy = ID
|
p.Strategy = ID
|
||||||
p.StrategyInstanceID = instanceID
|
p.StrategyInstanceID = instanceID
|
||||||
|
s.Environment.RecordProfit(p)
|
||||||
|
|
||||||
s.state.ProfitStats.AddProfit(p)
|
s.state.ProfitStats.AddProfit(p)
|
||||||
s.Notify(&p)
|
s.Notify(&p)
|
||||||
|
|
|
@ -76,7 +76,7 @@ func (p *Position) NewProfit(trade Trade, profit, netProfit fixedpoint.Value) Pr
|
||||||
// FeeInUSD: 0,
|
// FeeInUSD: 0,
|
||||||
Fee: trade.Fee,
|
Fee: trade.Fee,
|
||||||
FeeCurrency: trade.FeeCurrency,
|
FeeCurrency: trade.FeeCurrency,
|
||||||
|
|
||||||
Exchange: trade.Exchange,
|
Exchange: trade.Exchange,
|
||||||
IsMargin: trade.IsMargin,
|
IsMargin: trade.IsMargin,
|
||||||
IsFutures: trade.IsFutures,
|
IsFutures: trade.IsFutures,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user