Example #1
0
// ReceiveDOHLCVTick consumes a source data DOHLCV price tick
func (ind *AvgPriceWithoutStorage) ReceiveDOHLCVTick(tickData gotrade.DOHLCV, streamBarIndex int) {

	result := (tickData.O() + tickData.H() + tickData.L() + tickData.C()) / float64(4.0)

	ind.UpdateIndicatorWithNewValue(result, streamBarIndex)
}