pikers / piker

(e2e) foss trading for non-tinas
GNU Affero General Public License v3.0
103 stars 17 forks source link

Downsampling sum-type flows data: like vlm #326

Open goodboy opened 2 years ago

goodboy commented 2 years ago

As per #302 we now aggressively leverage the m4 graphics downsampling algo for redic low latency chartingn on massive data sets, however this algo reduces based on maintaining range data on screen; this is not desired for accumulation type sampled data (such as in volume or histogram/bar charts) where we want to simply aggregate (aka sum()) all datums from an uppx range into each horizontal pixel slot.

In other words we need to adjust our implementation to accept additional reduction function(s) besides max()/min() so that when you zoom out on such data sets you see the accumulation of the data in each set of uppx-spanning pixel-bins instead of a lossy range representation as is used for price data.