UnknownUnicorn508364

Average Bar Direction

This script shows the average count of 'up bars' vs. 'down bars'. It is intended for statistic and probability purposes only. It does not include high or low price in the calculation - only the open and close prices are used.

Under settings, click "show difference" to see the difference between the two averages. This can also be called positive/negative drift. Switch to weekly/monthly S&P 500 to witness positive drift. The general direction over longer time span is up, while shorter time span is more random (like a coin flip).
Release Notes:
Corrected formula so that doji bars do not affect the averaging.
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 a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?