mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 14:55:16 +00:00
support: set default s.triggerEMA
This commit is contained in:
parent
b56e988fc9
commit
b26141ac1f
|
@ -289,6 +289,11 @@ func (s *Strategy) Run(ctx context.Context, orderExecutor bbgo.OrderExecutor, se
|
||||||
|
|
||||||
if s.TriggerMovingAverage != zeroiw {
|
if s.TriggerMovingAverage != zeroiw {
|
||||||
s.triggerEMA = standardIndicatorSet.EWMA(s.TriggerMovingAverage)
|
s.triggerEMA = standardIndicatorSet.EWMA(s.TriggerMovingAverage)
|
||||||
|
} else {
|
||||||
|
s.triggerEMA = standardIndicatorSet.EWMA(types.IntervalWindow{
|
||||||
|
Interval: s.Interval,
|
||||||
|
Window: 99, // default window
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if s.LongTermMovingAverage != zeroiw {
|
if s.LongTermMovingAverage != zeroiw {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user