Multi-Timeframe Momentum [EXCAVO]Five-Timeframe EMA and RSI Alignment with Confluence Detection
The Multi-Timeframe Momentum reads EMA position and RSI level across five
user-configurable timeframes simultaneously, assigning a BULL, NEUT, or BEAR bias
to each. When the required number of timeframes are fully aligned in the same
direction, a confluence condition is active: candles are colored and a labeled
marker appears at the bar where alignment begins. A compact dashboard displays
each timeframe's conditions, alignment counts, and a composite momentum score.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ HOW TO USE
Step 1 → Add the indicator to the price chart. The dashboard appears in the
corner and candles begin coloring as soon as confluence conditions
are met.
Step 2 → Read the dashboard. Each row shows one timeframe: TF label, EMA
direction, RSI value, and BIAS (BULL / NEUT / BEAR). When the
alignment threshold is reached, the Bull Align or Bear Align row
highlights. The Score row shows the composite reading from -10 to +10.
Step 3 → A labeled marker below a bar marks the start of bull confluence -
the first bar where Min Confluence timeframes aligned bullish on close.
The label shows the alignment count (e.g. 4/5 or 5/5). A marker above
the bar marks the start of bear confluence. Candles remain colored
for the entire duration that confluence is active.
Step 4 → Adjust Min Confluence (default 4). At 5, all five timeframes must
agree. At 3, partial alignment is sufficient and conditions become
more frequent.
Step 5 → Set up confluence alerts to receive notifications on bar close.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ HOW IT CALCULATES
◆ EMA Position
For each timeframe, the indicator fetches the previous closed bar's EMA(length) and
close price using request.security() with a offset and barmerge.lookahead_on.
EMA direction is bullish when close is above the EMA, bearish when close is below.
The offset and confirmed-bar gating ensure values do not change after the bar
closes.
◆ RSI Level
RSI(length) is computed on the same confirmed closed bar for each timeframe.
RSI above 50 is treated as bullish momentum; RSI below 50 is bearish. The 50 level
is used as the neutral boundary because it indicates whether average gains exceed
average losses over the lookback period.
◆ Bias Score
Each timeframe receives a score based on the combination of EMA and RSI readings:
BULL (+2) - close above EMA and RSI above 50 (both conditions bullish)
NEUT (0) - close above EMA but RSI below 50, or vice versa (conditions conflict)
BEAR (-2) - close below EMA and RSI below 50 (both conditions bearish)
A score of 0 occurs when EMA and RSI disagree, indicating an ambiguous condition on
that timeframe.
◆ Composite Score
The sum of all five timeframe scores produces a composite reading from -10 to +10.
A score of +10 means every timeframe has both EMA and RSI bullish simultaneously.
A score of 0 indicates a balanced or mixed market across all timeframes. The score
is visible in the dashboard and included in JSON alerts.
◆ Confluence Detection
Bull confluence counts how many of the five timeframes have a BULL score (+2). Bear
confluence counts BEAR scores (-2). When either count reaches or exceeds the Min
Confluence threshold, the condition is active. A confluence marker appears on the
first bar where the count hits the threshold on a confirmed close. Candles remain
colored for every bar that the confluence condition stays active.
◆ Non-Repainting
All timeframe data is sourced via request.security() with expression and
barmerge.lookahead_on. The offset reads the last fully closed bar on each
timeframe, not the forming bar. Confluence markers are drawn only after
barstate.isconfirmed, so no marker appears until the bar closes. No value changes
after a bar is confirmed.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ WHAT MAKES IT DIFFERENT
◆ Dual Filter per Timeframe
Unlike most multi-timeframe panels that display raw RSI values or a single trend
condition, this indicator requires both EMA position and RSI direction to agree
before assigning a bullish or bearish bias. Using two independent filters produces
three distinct states per timeframe rather than two. The NEUT state explicitly
captures the case where trend and momentum disagree, making ambiguity visible in
the dashboard rather than forcing unclear conditions into bull or bear.
◆ Composite Momentum Score
Beyond counting aligned timeframes, the indicator computes a composite score that
weights each timeframe's full EMA+RSI agreement. A reading of +8 distinguishes a
strong four-timeframe alignment where both filters agree from a weaker condition
where only one filter is bullish on each timeframe. Most multi-timeframe indicators
show binary per-row state; the score aggregates across the full five-timeframe stack.
◆ Active Confluence Duration
The labeled marker at the start of a confluence period is paired with candle coloring
that persists for the entire duration confluence remains active. This makes it
immediately visible how long the current alignment has been in effect, not just when
it began.
◆ Adjustable Confluence Threshold
The Min Confluence input directly controls detection sensitivity. At 5, only full
agreement across all five timeframes triggers a condition. At 3, partial alignment is
sufficient. The threshold is explicit and adjustable rather than fixed in code.
◆ Non-Repainting Design
Each timeframe reads the previous confirmed bar's data. No value changes after the
bar closes, and no marker is drawn until barstate.isconfirmed is true. Bar coloring
reflects the current live state, but confluence markers are final once drawn.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ DASHBOARD
Compact panel showing current conditions across all five timeframes:
TF - timeframe label (1m, 5m, 1H, 4H, 1D, etc.)
EMA - direction marker; blue if close is above EMA, red if below
RSI - current RSI value; blue when above 50, red when below
BIAS - BULL (both bullish), NEUT (mixed), or BEAR (both bearish)
Bull Align - count of timeframes with BULL bias; row highlights blue when threshold met
Bear Align - count of timeframes with BEAR bias; row highlights red when threshold met
Score - composite momentum reading from -10 to +10 across all five timeframes
Legend table (bottom left) explains confluence markers, bar coloring, and BIAS labels.
Both panels toggle in Dashboard settings.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ SETTINGS
Timeframes
TF 1 - TF 5 - five configurable timeframes (defaults: 5m, 15m, 1H, 4H, D)
Engine
EMA Length - 20 bars (period for EMA bias calculation)
RSI Length - 14 bars (period for RSI calculation)
Signals
Min Confluence - 4 (minimum aligned timeframes to activate a confluence condition)
Visualization
Bull Color - default blue
Bear Color - default red
Bar Color - ON (colors candles blue during bull confluence, red during bear confluence)
Background Highlight - OFF (subtle tint when confluence is active)
Alerts
JSON Alerts - OFF (enable for bot integration)
Dashboard
Dashboard Position - Top Right
Show Dashboard - ON
Show Legend - ON
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ ALERTS
Bull Confluence - Min Confluence timeframes first aligned bullish on bar close
Bear Confluence - Min Confluence timeframes first aligned bearish on bar close
Confluence Signal - any confluence condition detected on bar close
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Best regards,
EXCAVO
Disclaimer
Trading involves significant risk. This indicator is a technical analysis tool
and does not constitute financial advice, investment recommendations, or a
guarantee of future results. Past indicator behavior does not guarantee future
performance. Always use proper risk management and your own judgment.
Indicador Pine Script®






















