mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 08:45:16 +00:00
xfunding: comment unused code
This commit is contained in:
parent
c176e2df5f
commit
5c21445b15
|
@ -4,7 +4,6 @@ import (
|
|||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
|
@ -187,31 +186,29 @@ func (s *Strategy) InstanceID() string {
|
|||
}
|
||||
|
||||
func (s *Strategy) Run(ctx context.Context, orderExecutor bbgo.OrderExecutor, session *bbgo.ExchangeSession) error {
|
||||
standardIndicatorSet := session.StandardIndicatorSet(s.Symbol)
|
||||
|
||||
var ma types.Float64Indicator
|
||||
for _, detection := range s.SupportDetection {
|
||||
|
||||
switch strings.ToLower(detection.MovingAverageType) {
|
||||
case "sma":
|
||||
ma = standardIndicatorSet.SMA(types.IntervalWindow{
|
||||
Interval: detection.MovingAverageIntervalWindow.Interval,
|
||||
Window: detection.MovingAverageIntervalWindow.Window,
|
||||
})
|
||||
case "ema", "ewma":
|
||||
ma = standardIndicatorSet.EWMA(types.IntervalWindow{
|
||||
Interval: detection.MovingAverageIntervalWindow.Interval,
|
||||
Window: detection.MovingAverageIntervalWindow.Window,
|
||||
})
|
||||
default:
|
||||
ma = standardIndicatorSet.EWMA(types.IntervalWindow{
|
||||
Interval: detection.MovingAverageIntervalWindow.Interval,
|
||||
Window: detection.MovingAverageIntervalWindow.Window,
|
||||
})
|
||||
// standardIndicatorSet := session.StandardIndicatorSet(s.Symbol)
|
||||
/*
|
||||
var ma types.Float64Indicator
|
||||
for _, detection := range s.SupportDetection {
|
||||
switch strings.ToLower(detection.MovingAverageType) {
|
||||
case "sma":
|
||||
ma = standardIndicatorSet.SMA(types.IntervalWindow{
|
||||
Interval: detection.MovingAverageIntervalWindow.Interval,
|
||||
Window: detection.MovingAverageIntervalWindow.Window,
|
||||
})
|
||||
case "ema", "ewma":
|
||||
ma = standardIndicatorSet.EWMA(types.IntervalWindow{
|
||||
Interval: detection.MovingAverageIntervalWindow.Interval,
|
||||
Window: detection.MovingAverageIntervalWindow.Window,
|
||||
})
|
||||
default:
|
||||
ma = standardIndicatorSet.EWMA(types.IntervalWindow{
|
||||
Interval: detection.MovingAverageIntervalWindow.Interval,
|
||||
Window: detection.MovingAverageIntervalWindow.Window,
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
_ = ma
|
||||
|
||||
*/
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user