mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-25 16:25:16 +00:00
strategy: bollmaker: fix nil pointer
This commit is contained in:
parent
f05e1d1da6
commit
a2ab9db4eb
|
@ -429,6 +429,9 @@ func (s *Strategy) hasShortSet() bool {
|
|||
}
|
||||
|
||||
func (s *Strategy) Run(ctx context.Context, orderExecutor bbgo.OrderExecutor, session *bbgo.ExchangeSession) error {
|
||||
// initial required information
|
||||
s.session = session
|
||||
|
||||
// StrategyController
|
||||
s.Status = types.StrategyStatusRunning
|
||||
|
||||
|
@ -460,9 +463,6 @@ func (s *Strategy) Run(ctx context.Context, orderExecutor bbgo.OrderExecutor, se
|
|||
s.ShadowProtectionRatio = fixedpoint.NewFromFloat(0.01)
|
||||
}
|
||||
|
||||
// initial required information
|
||||
s.session = session
|
||||
|
||||
s.neutralBoll = s.StandardIndicatorSet.BOLL(s.NeutralBollinger.IntervalWindow, s.NeutralBollinger.BandWidth)
|
||||
s.defaultBoll = s.StandardIndicatorSet.BOLL(s.DefaultBollinger.IntervalWindow, s.DefaultBollinger.BandWidth)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user