UnknownUnicorn508364

Double Bars

This is a very simple script... it does not necessarily create signals. It only provides useful feedback via statistics & probability.

There will be a green background if there are two green bars in a row, and it will stay green until two red bars show up (in which it switches color to red until two green bars show up again).

The fuchsia arrows show the double greens, and the blue arrows show the double reds, as to emphasize the color continuation.

The main drawback is that even though this shows the most common bar color, it does not show the *significance* of each bar. Therefore, use for statistical analysis only unless you complicate the formula by adding significance and/or volatility.

The last bar *does* repaint. If anyone figures out how to not show the values (background and arrow) for the last bar only, add a comment! I would like to show the last bar as a "projection" bar (dimmed with transparency, so it appears as less meaningful due to it not being completed yet).
Release Notes:
Added input options for type of "source".
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?