strategy: fix wrong support condition

This commit is contained in:
Andy Cheng 2022-03-29 11:46:01 +08:00
parent 0511a0fde3
commit 934e4aa69f
No known key found for this signature in database
GPG Key ID: 936427CF651A9D28

View File

@ -644,7 +644,7 @@ func (s *Strategy) Run(ctx context.Context, orderExecutor bbgo.OrderExecutor, se
return
}
if s.triggerEMA != nil && closePrice.Float64() < s.triggerEMA.Last() {
if s.triggerEMA != nil && closePrice.Float64() > s.triggerEMA.Last() {
s.Notify("%s: closed price is above the trigger moving average line %f, skipping this support",
s.Symbol,
s.triggerEMA.Last(),