Skip to content

Commit

Permalink
adding comment on price functions
Browse files Browse the repository at this point in the history
  • Loading branch information
victorl2 committed Apr 22, 2021
1 parent e92df40 commit 814a18e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions kate/prices.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,27 @@ type OHLCV interface {
Volume() float64
}

//Open is the starting price for a candlestick
func (candle DataPoint) Open() float64 {
return candle.open
}

//High is the highest price reached between the time a candlestick is open and closed
func (candle DataPoint) High() float64 {
return candle.high
}

//Low is the lowest price reached between the time a candlestick is open and closed
func (candle DataPoint) Low() float64 {
return candle.low
}

//Close is the finish price when a candlestick has concluded
func (candle DataPoint) Close() float64 {
return candle.close
}

//Volume is the amount of assets traded in the timeframe for the current candlestick
func (candle DataPoint) Volume() float64 {
return candle.volume
}

0 comments on commit 814a18e

Please sign in to comment.