mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 06:53:52 +00:00
fix emit trade
This commit is contained in:
parent
5db4e11167
commit
5567ef5676
|
@ -108,7 +108,7 @@ func (c *TradeCollector) Process() bool {
|
|||
if c.orderStore.Exists(trade.OrderID) {
|
||||
c.doneTrades[key] = struct{}{}
|
||||
if profit, netProfit, madeProfit := c.position.AddTrade(trade); madeProfit {
|
||||
c.EmitTrade(trade, fixedpoint.Zero, fixedpoint.Zero)
|
||||
c.EmitTrade(trade, profit, netProfit)
|
||||
c.EmitProfit(trade, profit, netProfit)
|
||||
} else {
|
||||
c.EmitTrade(trade, fixedpoint.Zero, fixedpoint.Zero)
|
||||
|
|
Loading…
Reference in New Issue
Block a user