Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Commit

Permalink
add targetPrice and targetAmount to sellSideStrategy.go, closes #3
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilsaraf committed Aug 27, 2018
1 parent 23aeefe commit 95c12b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/sellSideStrategy.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ func (s *sellSideStrategy) updateSellLevel(offers []horizon.Offer, index int) *b
priceTrigger := (curPrice > highestPrice) || (curPrice < lowestPrice)
amountTrigger := (curAmount < minAmount) || (curAmount > maxAmount)
if priceTrigger || amountTrigger {
log.Printf("sell,modify,curPrice=%.7f,highPrice=%.7f,lowPrice=%.7f,curAmt=%.7f,minAmt=%.7f,maxAmt=%.7f\n",
curPrice, highestPrice, lowestPrice, curAmount, minAmount, maxAmount)
log.Printf("sell,modify,tp=%.7f,ta=%.7f,curPrice=%.7f,highPrice=%.7f,lowPrice=%.7f,curAmt=%.7f,minAmt=%.7f,maxAmt=%.7f\n",
targetPrice, targetAmount, curPrice, highestPrice, lowestPrice, curAmount, minAmount, maxAmount)
return s.sdex.ModifySellOffer(offers[index], targetPrice, targetAmount)
}
return nil
Expand Down

0 comments on commit 95c12b5

Please sign in to comment.