tsuz/go-pine

View on GitHub
pine/series_dmi.go

Summary

Maintainability
A
2 hrs
Test Coverage

Function DMI has 56 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func DMI(ohlcv OHLCVSeries, len, smoo int) (adx, plus, minus ValueSeries) {
    adxkey := fmt.Sprintf("adx:%s:%d:%d", ohlcv.ID(), len, smoo)
    adx = getCache(adxkey)
    if adx == nil {
        adx = NewValueSeries()
Severity: Minor
Found in pine/series_dmi.go - About 1 hr to fix

    Function DMI has 8 return statements (exceeds 4 allowed).
    Open

    func DMI(ohlcv OHLCVSeries, len, smoo int) (adx, plus, minus ValueSeries) {
        adxkey := fmt.Sprintf("adx:%s:%d:%d", ohlcv.ID(), len, smoo)
        adx = getCache(adxkey)
        if adx == nil {
            adx = NewValueSeries()
    Severity: Major
    Found in pine/series_dmi.go - About 50 mins to fix

      There are no issues that match your filters.

      Category
      Status