mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
bollmaker: improve trailing stop order log
This commit is contained in:
parent
78855d552a
commit
a185f3fdbe
|
@ -136,9 +136,10 @@ func (c *TrailingStopController) Run(ctx context.Context, session *bbgo.Exchange
|
|||
|
||||
marketOrder := c.position.NewClosePositionOrder(c.ClosePosition.Float64())
|
||||
if marketOrder != nil {
|
||||
log.Infof("trailing stop event emitted, submitting market order to stop: %+v", marketOrder)
|
||||
log.Infof("trailing stop event emitted, latest high: %f, closed price: %f, average cost: %f, submitting market order to stop: %+v", c.latestHigh, closePrice, c.averageCost.Float64(), marketOrder)
|
||||
// skip dust order
|
||||
if marketOrder.Quantity*closePrice < c.position.Market.MinNotional {
|
||||
log.Warnf("market order quote quantity %f < min notional %f, skip placing order", marketOrder.Quantity*closePrice, c.position.Market.MinNotional)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user