Amphibiantrading

7 Week Rule

The 7 week rule was shared by Gil Morales in his book “Trade Like an O’Neil Disciple”. The rule is described as: Stocks that have shown a tendency to “obey” or “respect” the 10-day moving average for at least 7 weeks in an uptrend should often be sold once the stock violates the 10-day line. A “violation” is defined as a close below the 10-day moving average followed by a move on the next day below the intraday low of the first day.

This indicator makes using the 7 week rule easy. Once a stock has closed above its selected moving average (10SMA by default) for 35 days the 7 week rule is triggered. Once the stock then “violates” the moving average, a sell signal is printed on the chart.

Indicator Customizations
  • Moving Average Length & Type
  • Show or Hide Moving Average
  • Show Running Count of Days Above Selected MA
  • Highlight When 7 Week Rule Triggers
  • Option to Show First Day Above MA

Indicator is dynamic and will continue the count if no violation occurs.
Release Notes:
Small change to day 1 label placement

Trusted Pine programmer. Send me a message for script development.
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?