changing ema defaults.
This commit is contained in:
parent
2377467059
commit
034bef0118
|
@ -1,8 +1,8 @@
|
||||||
package chart
|
package chart
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// DefaultEMASigma is the default exponential smoothing factor.
|
// DefaultEMAPeriod is the default EMA period used in the sigma calculation.
|
||||||
DefaultEMASigma = 0.25
|
DefaultEMAPeriod = 12
|
||||||
)
|
)
|
||||||
|
|
||||||
// EMASeries is a computed series.
|
// EMASeries is a computed series.
|
||||||
|
@ -36,7 +36,7 @@ func (ema EMASeries) GetPeriod(defaults ...int) int {
|
||||||
if len(defaults) > 0 {
|
if len(defaults) > 0 {
|
||||||
return defaults[0]
|
return defaults[0]
|
||||||
}
|
}
|
||||||
return ema.InnerSeries.Len()
|
return DefaultEMAPeriod
|
||||||
}
|
}
|
||||||
return ema.Period
|
return ema.Period
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user