mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 23:05:15 +00:00
Merge pull request #792 from c9s/strategy/pivotshort
This commit is contained in:
commit
cc04d81346
|
@ -78,7 +78,7 @@ func (s *BreakLow) Bind(session *bbgo.ExchangeSession, orderExecutor *bbgo.Gener
|
|||
}
|
||||
|
||||
if len(s.pivotLowPrices) == 0 {
|
||||
log.Infof("currently there is no pivot low prices, skip placing orders...")
|
||||
log.Infof("currently there is no pivot low prices, can not check break low...")
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -64,6 +64,10 @@ func (s *ResistanceShort) Bind(session *bbgo.ExchangeSession, orderExecutor *bbg
|
|||
}
|
||||
|
||||
func (s *ResistanceShort) findNextResistancePriceAndPlaceOrders(closePrice fixedpoint.Value) {
|
||||
// if the close price is still lower than the resistance price, then we don't have to update
|
||||
if closePrice.Compare(s.nextResistancePrice) <= 0 {
|
||||
return
|
||||
}
|
||||
|
||||
minDistance := s.MinDistance.Float64()
|
||||
lows := s.resistancePivot.Lows
|
||||
|
|
Loading…
Reference in New Issue
Block a user