mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 23:05:15 +00:00
use RecordPosition
This commit is contained in:
parent
322f31a56a
commit
d67b800e7e
|
@ -568,7 +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.Environment.RecordPosition(s.state.Position, trade, p)
|
||||||
|
|
||||||
s.state.ProfitStats.AddProfit(p)
|
s.state.ProfitStats.AddProfit(p)
|
||||||
s.Notify(&p)
|
s.Notify(&p)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user