Why is volume an []int64 and not []float64 ?
larscom opened this issue · comments
Hi,
Im exploring this lib and kinda new to this stuff, and one thing i don't understand is why the func VolumeWeightedAveragePrice
for example and many other funcs expects a volume of type []int64?
Inside that func the []int64 gets converted to []float64 anyway.
indicator/volume_indicators.go
Line 154 in 3959988
If any one has an answer for me, im pleased ;-)
Thanks!
Hi @larscom, when I started building this project, the data source that I used for the data had the volume as int64, so I followed that convention. However, it is a good point. What data source you are seeing volume as float64? I can certainly make it a float64 moving forward too?
hi @cinar, my data source is binance or bitvavo (crypto). Their volume is always a floating point number. Besides that i think it makes sense to make volume a float64 anyhow.
It is a good point. I can see that it does make sense for crypto data. Let me see if I can change this.
Hi @larscom, please check the fix-126
branch and let me know if it solves the problem for you.
Hi @larscom, please check the
fix-126
branch and let me know if it solves the problem for you.
Looking good to me!
Awesome, please try it with release v1.3.0.