xmaker: add more info into the signal logs

This commit is contained in:
c9s 2024-10-09 12:47:53 +08:00
parent 49e949dbc9
commit 6b54c90a53
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -69,7 +69,13 @@ func (s *OrderBookBestPriceVolumeSignal) CalculateSignal(ctx context.Context) (f
signal = -numerator.Div(denominator).Float64()
}
log.Infof("[OrderBookBestPriceVolumeSignal] %f bid/ask = %f/%f", signal, bid.Volume.Float64(), ask.Volume.Float64())
log.Infof("[OrderBookBestPriceVolumeSignal] %f bid/ask = %f/%f, bid ratio = %f, ratio threshold = %f",
signal,
bid.Volume.Float64(),
ask.Volume.Float64(),
bidRatio.Float64(),
s.RatioThreshold.Float64(),
)
orderBookSignalMetrics.WithLabelValues(s.symbol).Set(signal)
return signal, nil