mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 00:35:15 +00:00
pivotshort: add total quantity to the notification
This commit is contained in:
parent
b067c02cf0
commit
9b35c789ee
|
@ -109,10 +109,8 @@ func (s *ResistanceShort) updateResistanceOrders(closePrice fixedpoint.Value) {
|
|||
ctx := context.Background()
|
||||
resistanceUpdated := s.updateCurrentResistancePrice(closePrice)
|
||||
if resistanceUpdated {
|
||||
bbgo.Notify("Found next %s resistance price at %f, updating resistance orders...", s.Symbol, s.currentResistancePrice.Float64())
|
||||
s.placeResistanceOrders(ctx, s.currentResistancePrice)
|
||||
} else if s.activeOrders.NumOfOrders() == 0 && !s.currentResistancePrice.IsZero() {
|
||||
bbgo.Notify("There is no %s resistance open order, re-placing resistance orders at %f...", s.Symbol, s.currentResistancePrice.Float64())
|
||||
s.placeResistanceOrders(ctx, s.currentResistancePrice)
|
||||
}
|
||||
}
|
||||
|
@ -127,6 +125,8 @@ func (s *ResistanceShort) placeResistanceOrders(ctx context.Context, resistanceP
|
|||
return
|
||||
}
|
||||
|
||||
bbgo.Notify("Next %s resistance price at %f, updating resistance orders with total quantity...", s.Symbol, s.currentResistancePrice.Float64(), totalQuantity.Float64())
|
||||
|
||||
numLayers := s.NumLayers
|
||||
if numLayers == 0 {
|
||||
numLayers = 1
|
||||
|
|
Loading…
Reference in New Issue
Block a user