mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 23:05:15 +00:00
pivotshort: fix findNextResistancePriceAndPlaceOrders
This commit is contained in:
parent
f1867b02c3
commit
004e6b0e0b
|
@ -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