OPEN-SOURCE SCRIPT

Granville 8-Rule Engine — v6

46
Description:
The Granville 8-Rule Engine systematically implements Joseph Granville's eight original trading rules, which provide a comprehensive framework for interpreting price action relative to a moving average to identify genuine trend changes and avoid false signals.
Granville's methodology focuses on the critical relationship between price movement and the direction of the moving average, recognizing that valid trend changes and continuations exhibit specific behavioral patterns while false breakouts and reversals show characteristic divergences.
The indicator evaluates all eight of Granville's rules and assigns a composite score based on their fulfillment:
Bullish Rules:

Rule 1: Price crosses above a rising moving average (+3 points)
Rule 2: Price remains above a rising moving average after testing support (+2 points)
Rule 3: Price remains above a rising moving average after penetrating below it (+1 point)
Rule 4: Moving average changes from declining to rising (+1 point)

Bearish Rules:

Rule 5: Price crosses below a declining moving average (-3 points)
Rule 6: Price remains below a declining moving average after testing resistance (-2 points)
Rule 7: Price remains below a declining moving average after penetrating above it (-1 point)

The indicator incorporates volume confirmation by adding or subtracting additional points when significant volume accompanies the fulfillment of bullish or bearish rules, respectively.
A buy signal is generated when the composite score reaches +4 or higher, indicating multiple bullish rules are simultaneously satisfied. A sell signal is generated when the score reaches -4 or lower, indicating multiple bearish rules are in effect.
This systematic approach filters out many false breakout and whipsaw signals by requiring multiple confirmatory conditions rather than relying on simple moving average crossovers. The scoring mechanism provides a quantitative measure of the strength of the prevailing trend relationship, enabling traders to distinguish between genuine trend development and deceptive price movements that fail to confirm with the moving average direction.
The Granville 8-Rule Engine provides a disciplined, rule-based method for determining whether price movements represent valid trend continuation, genuine trend reversal, or potentially misleading counter-trend activity that is likely to fail. By requiring multiple confirmatory conditions from Granville's established rules, the indicator helps traders avoid premature entries and provides higher-probability signals for participating in sustained trend movements.

Отказ от ответственности

Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.