mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 14:55:16 +00:00
fix struct composition
This commit is contained in:
parent
19b600bb35
commit
5f45d18ae2
|
@ -26,11 +26,11 @@ func NewStandardIndicatorSet(symbol string, store *MarketDataStore) *StandardInd
|
||||||
// let us pre-defined commonly used intervals
|
// let us pre-defined commonly used intervals
|
||||||
for interval := range types.SupportedIntervals {
|
for interval := range types.SupportedIntervals {
|
||||||
for _, window := range []int{7, 25, 99} {
|
for _, window := range []int{7, 25, 99} {
|
||||||
iw := types.IntervalWindow{interval, window}
|
iw := types.IntervalWindow{Interval: interval, Window: window}
|
||||||
set.SMA[iw] = &indicator.SMA{Interval: interval, Window: window}
|
set.SMA[iw] = &indicator.SMA{IntervalWindow: iw}
|
||||||
set.SMA[iw].Bind(store)
|
set.SMA[iw].Bind(store)
|
||||||
|
|
||||||
set.EWMA[iw] = &indicator.EWMA{Interval: interval, Window: window}
|
set.EWMA[iw] = &indicator.EWMA{IntervalWindow: iw}
|
||||||
set.EWMA[iw].Bind(store)
|
set.EWMA[iw].Bind(store)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user