OPEN-SOURCE SCRIPT

TWAP Trend

By jaggedsoft
Here we are experimenting with using TWAP for trend analysis. It appears to work better than VWAP on lower timeframes.

TWAP is a tool used by algorithm based traders that allows them to distribute their orders throughout the day without disturbing price or having their positions known to rival traders in the market. It's similar to VWAP and serves the same function, except it lacks the volume aspect. This can be an issue when position entry/exit may be affected by slippage.

The main benefit of TWAP is deciding how to distribute orders throughout the chosen timeframe. However, just like the VWAP traders will normally use it as a moving average or target for price action to pull into.
There is an option to change the timeframe that TWAP is calculated from.

Originally by NeoButane:
Time Weighted Average Price (TWAP)

Trend Analysistwap
jaggedsoft

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer