Page 1 of 1

Improvments for AVWAP

Posted: Wed May 07, 2025 12:31 pm
by hdo
Basic Improvements for AVWAP
  • Make it faster. It works fine for futures, but for thickly traded stocks with 1-2 days of history it becomes too slow. It seems to process too much historical data even when anchoring close to current price action. This problem disappears after Bookmap restart, but we cannot restart Bookmap all the time.
  • Change context menu to allow deletion instead of hide. No clear use case for hide, while delete is frequently necessary due to max limitation and performance.
  • Remove max limit or make it configurable to delete the oldest when reached.
  • Allow batch delete from AVWAP settings of all AVWAPs that do not have an auto-reset schedule configured. Every day we need to delete all except the ETH and RTH VWAPs for each symbol.
  • Make colors cycle a predictable pattern like a rainbow so that it is visually clear in which order AVWAPs where added and how far that swing is away.
More advanced AVWAP features
  • Add an option to calculate a band between AVWAP and volatility-adjusted AVWAP. This is increasingly used to analyze dynamic support and resistance zones.
  • Plot the thickness of the VWAP based on volume at that point. TrendSpider calls this AlphaTrends VbP Ribbons. Very useful, in particular since Bookmap does not have flexible volume profiles.

Re: Improvments for AVWAP

Posted: Wed May 07, 2025 2:45 pm
by ewdmrtxilm
Oh yeah, that would be a great thing. :D

Re: Improvments for AVWAP

Posted: Thu May 08, 2025 5:54 am
by daniel.rueschendorfars
hdo wrote:
Wed May 07, 2025 12:31 pm
Yes that would be great

 

Re: Improvments for AVWAP

Posted: Thu May 08, 2025 9:59 am
by hdo
If you're working with large time series and need to compute AVWAP as fast as possible, Polars is hands down one of the best tools out there. It's built in Rust, runs on Apache Arrow, uses SIMD under the hood, and takes full advantage of multicore CPUs. It’s made for this kind of number-crunching.

There’s no native Java binding for Polars, so using it directly from Java isn’t straightforward. One workaround is to use the nu_plugin_polars (https://github.com/nushell/nushell/tree ... gin_polars) Plugin from Nushell. It wraps Polars and exposes it over a super simple protocol (JSON or MessagePack over stdin/stdout or sockets). You can spin it up as a separate process from Java, talk to it using that protocol, and get full Polars performance without messing with JNI or native code.Basically, you get blazing-fast AVWAP calculations using the real Polars engine, all while staying in Java under very permissive license.

Re: Improvments for AVWAP

Posted: Fri May 09, 2025 11:13 am
by hdo
If not clear what is meant by cycling rainbow colors:
rainbow.jpg
rainbow.jpg (238.49 KiB) Viewed 2264 times