fixing sigma calc on empty period.
This commit is contained in:
parent
6afff9b23b
commit
f3a6eb0960
1 changed files with 1 additions and 1 deletions
|
@ -45,7 +45,7 @@ func (ema EMASeries) Len() int {
|
||||||
|
|
||||||
// GetSigma returns the smoothing factor for the serise.
|
// GetSigma returns the smoothing factor for the serise.
|
||||||
func (ema EMASeries) GetSigma() float64 {
|
func (ema EMASeries) GetSigma() float64 {
|
||||||
return 2.0 / (float64(ema.Period) + 1)
|
return 2.0 / (float64(ema.GetPeriod()) + 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetValue gets a value at a given index.
|
// GetValue gets a value at a given index.
|
||||||
|
|
Loading…
Reference in a new issue