mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 14:55:16 +00:00
bbgo: fix emit trade profit
This commit is contained in:
parent
0d0e0039e5
commit
fdf64fd891
|
@ -141,7 +141,7 @@ func (c *TradeCollector) processTrade(trade types.Trade) bool {
|
|||
}
|
||||
|
||||
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