mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
set exchange fee to position
This commit is contained in:
parent
adab6ea434
commit
d326494d57
|
@ -551,6 +551,7 @@ func (s *Strategy) Run(ctx context.Context, orderExecutor bbgo.OrderExecutor, se
|
||||||
|
|
||||||
// initial required information
|
// initial required information
|
||||||
s.session = session
|
s.session = session
|
||||||
|
|
||||||
s.neutralBoll = s.StandardIndicatorSet.BOLL(s.NeutralBollinger.IntervalWindow, s.NeutralBollinger.BandWidth)
|
s.neutralBoll = s.StandardIndicatorSet.BOLL(s.NeutralBollinger.IntervalWindow, s.NeutralBollinger.BandWidth)
|
||||||
s.defaultBoll = s.StandardIndicatorSet.BOLL(s.DefaultBollinger.IntervalWindow, s.DefaultBollinger.BandWidth)
|
s.defaultBoll = s.StandardIndicatorSet.BOLL(s.DefaultBollinger.IntervalWindow, s.DefaultBollinger.BandWidth)
|
||||||
|
|
||||||
|
@ -573,6 +574,13 @@ func (s *Strategy) Run(ctx context.Context, orderExecutor bbgo.OrderExecutor, se
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if s.session.MakerFeeRate.Sign() > 0 || s.session.TakerFeeRate.Sign() > 0 {
|
||||||
|
s.Position.SetExchangeFeeRate(s.session.ExchangeName, types.ExchangeFee{
|
||||||
|
MakerFeeRate: s.session.MakerFeeRate,
|
||||||
|
TakerFeeRate: s.session.TakerFeeRate,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
if s.ProfitStats == nil {
|
if s.ProfitStats == nil {
|
||||||
if s.state != nil {
|
if s.state != nil {
|
||||||
// copy profit stats
|
// copy profit stats
|
||||||
|
|
Loading…
Reference in New Issue
Block a user