mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 08:45:16 +00:00
fix: takeProfitFactor NaN
This commit is contained in:
parent
e34b0c6c30
commit
ba532bd98c
|
@ -405,7 +405,7 @@ func (s *Strategy) initIndicators(kline *types.KLine, priceLines *types.Queue) e
|
|||
s.takeProfitFactor = &indicator.SMA{IntervalWindow: types.IntervalWindow{Interval: s.Interval, Window: s.ProfitFactorWindow}}
|
||||
s.trendLine = &indicator.EWMA{IntervalWindow: types.IntervalWindow{Interval: s.Interval, Window: s.TrendWindow}}
|
||||
|
||||
for i := 0; i < s.ProfitFactorWindow; i++ {
|
||||
for i := 0; i <= s.ProfitFactorWindow; i++ {
|
||||
s.takeProfitFactor.Update(s.TakeProfitFactor)
|
||||
}
|
||||
store, _ := s.Session.MarketDataStore(s.Symbol)
|
||||
|
|
Loading…
Reference in New Issue
Block a user