Up Weeks (William O'Neil)

The indicator draws boxes when close to close returns are positive for at least a specified number of bars. The last bar is only included in the box (if positive) after the market is closed, to avoid false positives.

The standard use (by William O'Neil) is on weekly charts, using at least five consecutive up bars to define a box (indicating strong institutional buying activity).

* minimum number of up bars to form a box
* include flat bars (zero return) in the up count
* add labels to top and bottom box levels, as shown in the sample chart
Release Notes:
Added options to disable showing boxes and to enable coloring bars/candles when the box is active

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.


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?