@@ -269,7 +269,7 @@ func (s *Strategy) getCurrentAllowedExposurePosition(bandPercentage float64) (fi
269
269
return s .MaxExposurePosition , nil
270
270
}
271
271
272
- func (s * Strategy ) placeOrders (ctx context.Context , orderExecutor bbgo. OrderExecutor , midPrice fixedpoint.Value , kline * types.KLine ) {
272
+ func (s * Strategy ) placeOrders (ctx context.Context , midPrice fixedpoint.Value , kline * types.KLine ) {
273
273
bidSpread := s .Spread
274
274
if s .BidSpread .Sign () > 0 {
275
275
bidSpread = s .BidSpread
@@ -598,10 +598,10 @@ func (s *Strategy) Run(ctx context.Context, orderExecutor bbgo.OrderExecutor, se
598
598
}
599
599
600
600
midPrice := ticker .Buy .Add (ticker .Sell ).Div (two )
601
- s .placeOrders (ctx , orderExecutor , midPrice , nil )
601
+ s .placeOrders (ctx , midPrice , nil )
602
602
} else {
603
603
if price , ok := session .LastPrice (s .Symbol ); ok {
604
- s .placeOrders (ctx , orderExecutor , price , nil )
604
+ s .placeOrders (ctx , price , nil )
605
605
}
606
606
}
607
607
})
@@ -641,9 +641,9 @@ func (s *Strategy) Run(ctx context.Context, orderExecutor bbgo.OrderExecutor, se
641
641
642
642
midPrice := ticker .Buy .Add (ticker .Sell ).Div (two )
643
643
log .Infof ("using ticker price: bid %v / ask %v, mid price %v" , ticker .Buy , ticker .Sell , midPrice )
644
- s .placeOrders (ctx , orderExecutor , midPrice , & kline )
644
+ s .placeOrders (ctx , midPrice , & kline )
645
645
} else {
646
- s .placeOrders (ctx , orderExecutor , kline .Close , & kline )
646
+ s .placeOrders (ctx , kline .Close , & kline )
647
647
}
648
648
})
649
649
0 commit comments