Here is a demo on how this weighted average is critical to profit in a crypto trading bot. Free trading books https://quantlabs.net/ or learn algo trading https://quantlabs.net/dvd
Learn more about this service here.
https://quantlabs.net/blog/2020/05/weighted-average-is-critical-to-profit-with-a-crypto-trading-bot/