func (macd MACDSeries) Validate() error {
	var err error
	if macd.signal != nil {
		err = macd.signal.Validate()
	}
	if err != nil {
		return err
	}
	if macd.macdl != nil {
		err = macd.macdl.Validate()
	}
	if err != nil {
		return err
	}
	return nil
}
Validate validates the series.
package chart
import "fmt"
const (
	DefaultMACDPeriodPrimary = 26
	DefaultMACDPeriodSecondary = 12
	DefaultMACDSignalPeriod = 9
)
type MACDSeries struct {
	Name        string
	Style       Style
	YAxis       YAxisType
	InnerSeries ValuesProvider
	PrimaryPeriod   int
	SecondaryPeriod int
	SignalPeriod    int
	signal *MACDSignalSeries
	macdl  *MACDLineSeries
}