From 39615c8981720486d759bfd2be07c98785fc2962 Mon Sep 17 00:00:00 2001 From: Andy Cheng Date: Wed, 1 Jun 2022 11:37:27 +0800 Subject: [PATCH] indicator: get supertrend signal --- pkg/indicator/supertrend.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/indicator/supertrend.go b/pkg/indicator/supertrend.go index 0822218d1..3c0503870 100644 --- a/pkg/indicator/supertrend.go +++ b/pkg/indicator/supertrend.go @@ -107,6 +107,10 @@ func (inc *Supertrend) Update(highPrice, lowPrice, closePrice float64) { } } +func (inc *Supertrend) GetSignal() types.Direction { + return inc.tradeSignal +} + var _ types.Series = &Supertrend{} func (inc *Supertrend) calculateAndUpdate(kLines []types.KLine) {