mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
add stddev accessor
This commit is contained in:
parent
23c19c5968
commit
04a7c7a2cc
|
@ -54,6 +54,14 @@ func (inc *BOLL) LastDownBand() float64 {
|
|||
return inc.DownBand[len(inc.DownBand)-1]
|
||||
}
|
||||
|
||||
func (inc *BOLL) LastStdDev() float64 {
|
||||
if len(inc.StdDev) == 0 {
|
||||
return 0.0
|
||||
}
|
||||
|
||||
return inc.StdDev[len(inc.StdDev)-1]
|
||||
}
|
||||
|
||||
func (inc *BOLL) LastSMA() float64 {
|
||||
return inc.SMA[len(inc.SMA)-1]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user