mirror of
https://github.com/c9s/bbgo.git
synced 2024-09-20 08:11:08 +00:00
bollmaker: fix MinNotional adjustment
This commit is contained in:
parent
eec26663c5
commit
f49b7165d8
|
@ -74,18 +74,6 @@ exchangeStrategies:
|
|||
# THe short here means you might sell some of your existing inventory.
|
||||
disableShort: true
|
||||
|
||||
# strongUptrendSkew is the order quantity skew for strong uptrend band.
|
||||
# when the bollinger band detect a strong uptrend, what's the order quantity skew we want to use.
|
||||
# greater than 1.0 means when placing buy order, place sell order with less quantity
|
||||
# less than 1.0 means when placing sell order, place buy order with less quantity
|
||||
strongUptrendSkew: 0.3
|
||||
|
||||
# strongDowntrendSkew is the order quantity skew for strong downtrend band.
|
||||
# when the bollinger band detect a strong downtrend, what's the order quantity skew we want to use.
|
||||
# greater than 1.0 means when placing buy order, place sell order with less quantity
|
||||
# less than 1.0 means when placing sell order, place buy order with less quantity
|
||||
strongDowntrendSkew: 2.0
|
||||
|
||||
# uptrendSkew, like the strongUptrendSkew, but the price is still in the default band.
|
||||
uptrendSkew: 0.8
|
||||
|
||||
|
|
|
@ -461,7 +461,7 @@ func (s *Strategy) detectPriceTrend(inc *indicator.BOLL, price float64) PriceTre
|
|||
|
||||
func (s *Strategy) adjustOrderQuantity(submitOrder types.SubmitOrder) types.SubmitOrder {
|
||||
if submitOrder.Quantity*submitOrder.Price < s.market.MinNotional {
|
||||
submitOrder.Quantity = bbgo.AdjustFloatQuantityByMinAmount(submitOrder.Quantity, submitOrder.Price, s.market.MinNotional)
|
||||
submitOrder.Quantity = bbgo.AdjustFloatQuantityByMinAmount(submitOrder.Quantity, submitOrder.Price, s.market.MinNotional * 1.1)
|
||||
}
|
||||
|
||||
if submitOrder.Quantity < s.market.MinQuantity {
|
||||
|
|
Loading…
Reference in New Issue
Block a user