galenwoods

Consecutive Up and Down Bars

OVERVIEW

Identify price thrusts made up of at least three consecutive bars that conform to specific criteria. (E.g., consecutive higher closes)

Depending on the context, these powerful thrusts can indicate emerging momentum or exhaustion. This indicator helps to mark these thrusts for further analysis.

CONCEPTS

As mentioned, these consecutive bar thrusts can indicate:

  • Momentum in the direction of the thrust; or
  • Exhaustion, implying possible short-term reversal or sideways action.

In the first case, we can track these patterns and their followthrough to determine changes in the market trend.

In the latter case, we can consider an entry by fading the pattern or use it for profit-taking. Price patterns like the Three-Bar Pullback are based on such premises.

There are different conditions used when looking for such consecutive bars. Hence, it's helpful to toggle the conditions while studying this pattern to see which ones work well with your trading approach. This is the primary purpose of this indicator.

This indicator looks for three consecutive bars that conform to the selected condition(s).

These are the conditions you can toggle in this study:

1. Bullish or Bearish Bars


2. Rising or Falling Closing Prices

  • This condition compares each closing price to the previous closing price.

3. Up or Down Bars

  • An up bar has a higher high and higher low compared to the previous bar.
  • A down bar has a lower high and lower low compared to the previous bar.

HOW TO USE

Display
The display is oriented towards traders who are looking to fade these consecutive bars.

  • Consecutive bars that push higher are marked with a down arrow above the bar.
  • Consecutive bars that push lower are marked with an up arrow below the bar.

In this implementation, as we are looking for at least three consecutive bars, the arrow marking starts from the third bar of the pattern.

Parameters
Toggle the different conditions that apply when marking consecutive bars. (Conditions as explained above)

  • Current Close vs. Current Open
  • Current Close vs. Previous Close
  • Current High and Low vs. Previous High and Low

You can select one or more of the conditions. By default, all are selected. (If all are unselected, it will mark every single bar and render the study useless.)

Protected script
This script is published closed-source and you may use it freely. You can favorite it to use it on a chart. You cannot view or modify its source code.
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?