Strategy

Indicator

RSI Varmetric Plus Sistema# RSI + Nube
*Inspirado en BITMAN COIN*
---
## ESPAÑOL
### Qué es
Un RSI acompañado de una nube que marca su tendencia, con tres señales independientes y un medidor de rentabilidad teórica que calcula, en el propio gráfico, cuánto habría ganado cada una de esas señales sobre el histórico visible.
No es un RSI de sobrecompra y sobreventa. Con longitudes largas el RSI deja de oscilar entre extremos y se convierte en un indicador de tendencia: es así como está pensado aquí.
### En qué se basa
**La nube.** Dos medias exponenciales del propio RSI. Cuando la rápida va por encima de la lenta, la nube es verde; cuando va por debajo, roja. El color no depende del precio sino de la aceleración del RSI.
**Las bolitas.** Un círculo cada vez que la nube cambia de color. Es la señal más directa y también la más frecuente.
**El nivel.** El RSI por encima de un umbral, 50 por defecto. Filtra la zona neutra, donde el indicador cambia de dirección sin que el mercado se mueva.
Las tres se pueden usar sueltas o combinadas. La combinación que mejor ha funcionado en las pruebas es exigir **nube verde y RSI por encima de 50** a la vez.
### Qué se puede configurar
- **Longitud del RSI** y fuente del precio.
- **Cuatro construcciones de nube:** el RSI contra su media, dos medias entre sí, máximo y mínimo del RSI, o una banda de desviaciones. Cambian el aspecto, no la señal.
- **Suavizado independiente** de la línea que se dibuja y de la base con la que se calcula la nube. Subir el suavizado de la base reduce el número de bolitas sin tocar la línea.
- **Zona muerta:** ignorar los giros que ocurren dentro de una banda central, para evitar vaivenes cuando el RSI ronda el 50.
- **Colores y transparencias** de todos los elementos.
### El medidor de rentabilidad
La tabla lleva dos capitales en paralelo, con su drawdown y su número de operaciones:
- El de las **bolitas**: entrar en el giro verde, salir en el rojo.
- El del **nivel**: dentro mientras el RSI supere el umbral.
Se calcula con comisión configurable. Cambias un parámetro y ves inmediatamente qué le pasa a cada regla, sin exportar datos ni montar un backtest aparte.
### Lo que se ha medido
Sobre Bitcoin, con comisión del 0,06% por operación:
| Configuración | Sharpe | Caída máxima |
|---|---|---|
| **4h · RSI(89), nube 9/21, nivel 50** | **1,37** | **−33%** |
| 4h · solo la nube, sin nivel | 1,11 | −55% |
| 1h · RSI(500), nube 36/84, nivel 50 | 1,23 | −39% |
| 1h · RSI(21), nube 5/13 | −0,63 | −95% |
**Los ajustes de fábrica solo funcionan en la temporalidad para la que se pensaron.** Al cambiar de marco hay que escalar las longitudes proporcionalmente, o deja de ser el mismo indicador. Es el error más común y el más caro.
### Advertencias
La ventaja frente a una media móvil simple no es estadísticamente distinguible: con ocho años de datos, el margen de error de una diferencia de Sharpe ronda ±0,3. Lo que sí se mide con fiabilidad es la caída máxima y el número de operaciones.
La regla clásica de sobrecompra y sobreventa (70/30) rindió peor que no hacer nada en todas las pruebas. Los umbrales están dibujados como referencia visual, no como señal.
Material educativo. No es asesoramiento de inversión. Los resultados provienen de datos históricos y no anticipan comportamientos futuros.
---
## ENGLISH
### What it is
An RSI paired with a cloud that marks its trend, with three independent signals and a built-in profitability meter that calculates, on the chart itself, how much each of those signals would have made over the visible history.
This is not an overbought/oversold RSI. With long lengths the RSI stops swinging between extremes and becomes a trend indicator — that is how it is meant to be used here.
### What it is based on
**The cloud.** Two exponential averages of the RSI itself. When the fast one is above the slow one the cloud is green; below, red. The colour depends on the RSI's acceleration, not on price.
**The dots.** A circle every time the cloud changes colour. The most direct signal, and also the most frequent.
**The level.** The RSI above a threshold, 50 by default. It filters out the neutral zone, where the indicator changes direction without the market actually moving.
The three can be used alone or combined. The combination that tested best is requiring **a green cloud and an RSI above 50** at the same time.
### What can be configured
- **RSI length** and price source.
- **Four cloud constructions:** the RSI against its average, two averages against each other, highest and lowest of the RSI, or a standard-deviation band. These change the look, not the signal.
- **Independent smoothing** for the plotted line and for the base used to compute the cloud. Raising the base smoothing reduces the number of dots without touching the line.
- **Dead zone:** ignore flips that occur inside a central band, to avoid churn when the RSI hovers around 50.
- **Colours and transparencies** for every element.
### The profitability meter
The table runs two capital curves in parallel, each with its drawdown and trade count:
- The **dots** rule: enter on the green flip, exit on the red one.
- The **level** rule: in the market while the RSI stays above the threshold.
Commission is configurable. Change a parameter and you immediately see what happens to each rule — no data export, no separate backtest.
### What has been measured
On Bitcoin, with 0.06% commission per trade:
| Setup | Sharpe | Max drawdown |
|---|---|---|
| **4h · RSI(89), cloud 9/21, level 50** | **1.37** | **−33%** |
| 4h · cloud only, no level | 1.11 | −55% |
| 1h · RSI(500), cloud 36/84, level 50 | 1.23 | −39% |
| 1h · RSI(21), cloud 5/13 | −0.63 | −95% |
**Factory settings only work on the timeframe they were designed for.** When you change timeframe you must scale the lengths proportionally, or it stops being the same indicator. This is the most common and most expensive mistake.
### Caveats
The edge over a plain moving average is not statistically distinguishable: with eight years of data, the margin of error on a Sharpe difference is around ±0.3. What *is* measured reliably is maximum drawdown and trade count.
The classic overbought/oversold rule (70/30) performed worse than doing nothing in every test. Those thresholds are drawn as a visual reference, not as a signal.
Educational material. Not investment advice. Results come from historical data and do not predict future behaviour. Strategy

Indicator

RSI+MACD Trend StrategyStrategy description
Concept
A long-only swing strategy for US equities that is built around one idea: the exit should be driven by trend invalidation, not by distance from the price peak. Trailing stops cut large moves short and shake you out on ordinary pullbacks. This strategy replaces them entirely — it holds through drawdowns inside a healthy trend and lets go only when the weekly trend structure actually breaks.
The edge, if there is one, lives in the exit architecture, not in the choice of indicator. RSI and MACD are ordinary; the way they are combined across two timeframes is the point.
How it works
The strategy runs on two timeframes at once:
Weekly — permission and invalidation. MACD(12, 26, 9) on weekly closes decides whether trading is allowed at all, and it is the only thing that can close the remaining position.
Daily — timing and execution. RSI(14) picks the moment to enter inside an already-established weekly uptrend.
A trade unfolds in three stages:
Entry. While the weekly MACD line is above zero (trend is ON), a daily RSI(14) cross up through 45 triggers a buy at the next day's open. RSI 45 is deliberately not an oversold level — it marks a pullback inside a trend that has resumed, not a bottom-fishing attempt.
Scale-out. The first 2 × ATR(14) of profit takes 50 % off the table via a resting limit order. This banks part of the move and halves the exposure of what remains.
Runner exit. The rest is held — through pullbacks, through consolidations, with no trailing stop — until the weekly MACD line crosses below its signal line. That closes everything at the next day's open.
If the position is stopped out or shaken out and the weekly trend is still ON, the same entry rule fires again. Re-entry is a feature, not an accident — it is the designed answer to false breaks, and it is why no trailing stop is needed.
Risk model
There is no conventional stop-loss in the core design. Position risk is governed by three things instead:
Fixed cash per position (default $2 000). This is the real loss limiter — each ticker is an independent sleeve, so a $10 000 account can run five names.
The scale-out, which removes half the exposure once the trade is working.
An optional disaster stop (default ON, 4 × ATR below entry, fixed — not trailing). It is intentionally far away: it should stay silent in the vast majority of trades and only catch the tail, where the weekly MACD is too slow.
Execution model — no repainting
Every signal is computed on closed bars only:
The weekly MACD is read as the previous completed weekly bar, so a forming week never influences a decision — in history or in real time.
All entry/exit logic is gated behind barstate.isconfirmed, so nothing flickers inside an unfinished daily bar.
A signal on a bar's close is executed at the next bar's open, matching how the backtest is computed and how you would actually trade it.
This means the alerts are tradable: what you see on history is what you get live.
What to expect (honestly)
Trend-following gives back a meaningful part of the open profit at the end of every trend. That is the cost of capturing the full move, not a defect.
The weekly MACD exit is slow. Sharp bear legs produce the worst trades, and that is exactly what the disaster stop is there for.
The win rate is misleading. The scale-out is a separate closed trade that by construction only fires in profit, so it mechanically inflates win %. Judge the strategy by profit factor, max drawdown and worst trade instead.
One parameter set is meant to work across all tickers. Per-ticker tuning is overfitting and is explicitly out of scope. Strategy

RSI Varmetric Plus# RSI + Nube
*Inspirado en BITMAN COIN*
---
## ESPAÑOL
### Qué es
Un RSI acompañado de una nube que marca su tendencia, con tres señales independientes y un medidor de rentabilidad teórica que calcula, en el propio gráfico, cuánto habría ganado cada una de esas señales sobre el histórico visible.
No es un RSI de sobrecompra y sobreventa. Con longitudes largas el RSI deja de oscilar entre extremos y se convierte en un indicador de tendencia: es así como está pensado aquí.
### En qué se basa
**La nube.** Dos medias exponenciales del propio RSI. Cuando la rápida va por encima de la lenta, la nube es verde; cuando va por debajo, roja. El color no depende del precio sino de la aceleración del RSI.
**Las bolitas.** Un círculo cada vez que la nube cambia de color. Es la señal más directa y también la más frecuente.
**El nivel.** El RSI por encima de un umbral, 50 por defecto. Filtra la zona neutra, donde el indicador cambia de dirección sin que el mercado se mueva.
Las tres se pueden usar sueltas o combinadas. La combinación que mejor ha funcionado en las pruebas es exigir **nube verde y RSI por encima de 50** a la vez.
### Qué se puede configurar
- **Longitud del RSI** y fuente del precio.
- **Cuatro construcciones de nube:** el RSI contra su media, dos medias entre sí, máximo y mínimo del RSI, o una banda de desviaciones. Cambian el aspecto, no la señal.
- **Suavizado independiente** de la línea que se dibuja y de la base con la que se calcula la nube. Subir el suavizado de la base reduce el número de bolitas sin tocar la línea.
- **Zona muerta:** ignorar los giros que ocurren dentro de una banda central, para evitar vaivenes cuando el RSI ronda el 50.
- **Colores y transparencias** de todos los elementos.
### El medidor de rentabilidad
La tabla lleva dos capitales en paralelo, con su drawdown y su número de operaciones:
- El de las **bolitas**: entrar en el giro verde, salir en el rojo.
- El del **nivel**: dentro mientras el RSI supere el umbral.
Se calcula con comisión configurable. Cambias un parámetro y ves inmediatamente qué le pasa a cada regla, sin exportar datos ni montar un backtest aparte.
### Lo que se ha medido
Sobre Bitcoin, con comisión del 0,06% por operación:
| Configuración | Sharpe | Caída máxima |
|---|---|---|
| **4h · RSI(89), nube 9/21, nivel 50** | **1,37** | **−33%** |
| 4h · solo la nube, sin nivel | 1,11 | −55% |
| 1h · RSI(500), nube 36/84, nivel 50 | 1,23 | −39% |
| 1h · RSI(21), nube 5/13 | −0,63 | −95% |
**Los ajustes de fábrica solo funcionan en la temporalidad para la que se pensaron.** Al cambiar de marco hay que escalar las longitudes proporcionalmente, o deja de ser el mismo indicador. Es el error más común y el más caro.
### Advertencias
La ventaja frente a una media móvil simple no es estadísticamente distinguible: con ocho años de datos, el margen de error de una diferencia de Sharpe ronda ±0,3. Lo que sí se mide con fiabilidad es la caída máxima y el número de operaciones.
La regla clásica de sobrecompra y sobreventa (70/30) rindió peor que no hacer nada en todas las pruebas. Los umbrales están dibujados como referencia visual, no como señal.
Material educativo. No es asesoramiento de inversión. Los resultados provienen de datos históricos y no anticipan comportamientos futuros.
---
## ENGLISH
### What it is
An RSI paired with a cloud that marks its trend, with three independent signals and a built-in profitability meter that calculates, on the chart itself, how much each of those signals would have made over the visible history.
This is not an overbought/oversold RSI. With long lengths the RSI stops swinging between extremes and becomes a trend indicator — that is how it is meant to be used here.
### What it is based on
**The cloud.** Two exponential averages of the RSI itself. When the fast one is above the slow one the cloud is green; below, red. The colour depends on the RSI's acceleration, not on price.
**The dots.** A circle every time the cloud changes colour. The most direct signal, and also the most frequent.
**The level.** The RSI above a threshold, 50 by default. It filters out the neutral zone, where the indicator changes direction without the market actually moving.
The three can be used alone or combined. The combination that tested best is requiring **a green cloud and an RSI above 50** at the same time.
### What can be configured
- **RSI length** and price source.
- **Four cloud constructions:** the RSI against its average, two averages against each other, highest and lowest of the RSI, or a standard-deviation band. These change the look, not the signal.
- **Independent smoothing** for the plotted line and for the base used to compute the cloud. Raising the base smoothing reduces the number of dots without touching the line.
- **Dead zone:** ignore flips that occur inside a central band, to avoid churn when the RSI hovers around 50.
- **Colours and transparencies** for every element.
### The profitability meter
The table runs two capital curves in parallel, each with its drawdown and trade count:
- The **dots** rule: enter on the green flip, exit on the red one.
- The **level** rule: in the market while the RSI stays above the threshold.
Commission is configurable. Change a parameter and you immediately see what happens to each rule — no data export, no separate backtest.
### What has been measured
On Bitcoin, with 0.06% commission per trade:
| Setup | Sharpe | Max drawdown |
|---|---|---|
| **4h · RSI(89), cloud 9/21, level 50** | **1.37** | **−33%** |
| 4h · cloud only, no level | 1.11 | −55% |
| 1h · RSI(500), cloud 36/84, level 50 | 1.23 | −39% |
| 1h · RSI(21), cloud 5/13 | −0.63 | −95% |
**Factory settings only work on the timeframe they were designed for.** When you change timeframe you must scale the lengths proportionally, or it stops being the same indicator. This is the most common and most expensive mistake.
### Caveats
The edge over a plain moving average is not statistically distinguishable: with eight years of data, the margin of error on a Sharpe difference is around ±0.3. What *is* measured reliably is maximum drawdown and trade count.
The classic overbought/oversold rule (70/30) performed worse than doing nothing in every test. Those thresholds are drawn as a visual reference, not as a signal.
Educational material. Not investment advice. Results come from historical data and do not predict future behaviour. Indicator

Adaptive Cycle Momentum Oscillator [ZurvanEG]⯁ Adaptive Cycle Momentum Oscillator
◇ Overview
MOM is a cycle-adaptive momentum oscillator built to present market direction, strength, fatigue, volatility compression and saturation within one coherent framework.
Unlike conventional momentum oscillators that apply the same lookback to every market condition, MOM can adjust its momentum window to the market’s active rhythm. This allows its response to become faster or slower as market behaviour changes, while a fixed-length mode remains available for users who require consistent settings.
Beyond measuring momentum, MOM adds context to the reading. It distinguishes strengthening movement from fading pressure, reduces the influence of momentum formed during volatility compression, identifies statistically unusual momentum zones, and detects confirmed divergence structures.
The objective is not to produce more signals or predict every reversal. It is to provide a cleaner and more informative view of momentum—showing not only its direction, but also the conditions under which it is developing.
◈ Key Features
◇ Adaptive Momentum
Automatically adjusts the momentum lookback as market rhythm changes. Fixed mode can be selected whenever a constant length is preferred.
◇ Momentum Regime
Classifies momentum as bullish, bearish or neutral. Separate entry and exit levels reduce unstable regime switching around the dead zone.
◇ Strength & Fatigue
The line gradient shows direction and magnitude, while color strength distinguishes expanding momentum from momentum fading toward zero.
◇ Volatility Squeeze
Detects compressed volatility and reduces momentum produced inside quiet conditions. Squeeze intensity can also be displayed as a variable background.
◇ Saturation Bands
Adaptive upper and lower bands identify momentum readings that are extreme relative to the oscillator’s own recent behavior. They should be treated as saturation zones, not automatic reversal signals.
◇ Divergence
Detects confirmed regular and hidden bullish or bearish divergence. Signals can optionally be restricted to pivots occurring beyond the saturation bands to filter weaker mid-range structures.
◇ Visuals & Information
Optional candle coloring transfers the oscillator’s momentum gradient to the main chart. A compact table displays the current regime, momentum value and slope state, with optional cycle, length, squeeze and divergence diagnostics.
◇ Alerts
Independent alerts are available for:
⬦ Bullish and bearish regime shifts
⬦ Upper and lower saturation contacts
⬦ Squeeze entry and release
⬦ Confirmed bullish and bearish divergence
◈ Interpretation
Adaptive Cycle Momentum Oscillator helps answer:
⬦ Is momentum bullish, bearish or neutral?
⬦ Is the current move strengthening or fading?
⬦ Was momentum produced during expansion or compression?
⬦ Is the reading unusually saturated for this market?
⬦ Has a meaningful divergence been confirmed?
◈ Notes
⬦ Adaptive mode requires sufficient historical data for cycle estimation.
⬦ Divergences appear after pivot confirmation and are therefore delayed by design.
⬦ Saturation does not guarantee reversal, especially during strong trends.
⬦ Squeeze attenuation provides context; it does not predict breakout direction.
◈ Conclusion
Adaptive Cycle Momentum Oscillator is designed as a complete momentum-analysis framework rather than a simple oscillator or signal generator. It combines adaptive measurement, stable directional regimes, strength and fatigue colouring, volatility context, dynamic saturation bands and confirmed divergence in a single visual system.
By adapting to market rhythm and evaluating momentum within its surrounding conditions, MOM helps separate meaningful directional pressure from weak movement produced inside noise or compression. Its visual structure is intended to make changes in direction, intensity and exhaustion recognizable without requiring several overlapping indicators.
MOM does not attempt to replace price structure, risk management or trading confirmation. Its role is to provide a clearer and more consistent momentum perspective that can support trend analysis, pullback evaluation, saturation monitoring and divergence assessment across different instruments and timeframes.
Indicator

SuperTrend MTF Percentiles & Distances v2.1🌌 SuperTrend MTF Percentiles & Distances v2.1
A multi‑timeframe market tension radar built on the SuperTrend.
🎯 1. Vision & Purpose
SuperTrend MTF Percentiles & Distances v2.1 elevates the classic SuperTrend into a statistical, multi‑dimensional market scanner.
Instead of simply telling you “trend up or trend down”, it answers a far more valuable question:
How compressed, stretched, or extreme is the price relative to the SuperTrend — and across how many timeframes simultaneously?
To achieve this, the indicator:
computes SuperTrend across 8 timeframes (1m → Monthly),
measures the signed % distance between price and ST,
converts this distance into a historical percentile (0–100),
detects rare multi‑TF alignments,
displays visual signals (emojis),
generates smart dynamic alerts.
It is a market tension radar, designed for traders who want to understand the internal structure of price, not just its direction.
📐 2. Internal Logic (clear & educational)
2.1 Multi‑Timeframe SuperTrend
The indicator computes a full SuperTrend on:
1m
15m
1h
2h
4h
Daily
Weekly
Monthly
With customizable:
MA type (EMA, SMA, HULL, T3 Tillson, etc.)
ATR period
ATR method
ATR multiplier
2.2 Signed Distance (%)
For each timeframe, it measures:
positive distance when price is above ST,
negative distance when price is below ST,
the exact amplitude in %.
These distances are then smoothed with an EMA‑20 to reveal the underlying trend of compression or expansion.
2.3 Historical Percentiles
Each distance is stored in a rolling historical array (up to 20,000 bars).
The indicator computes the percentile rank of the current distance:
5% → extreme compression
50% → neutral
95% → extreme stretch
This transforms raw distance into statistical meaning.
🎨 3. Visual Display (colors, EMAs, structure)
3.1 Timeframe Colors
Each timeframe has a dedicated color for instant recognition:
1m → white
15m → grey
1h → aqua
2h → blue
4h → purple
Daily → green
Weekly → yellow
Monthly → red
Colors are intentionally soft and semi‑transparent to avoid clutter.
3.2 EMA‑20 Trend Lines
Each TF has a bold EMA‑20 line:
more opaque,
thicker,
visually dominant.
It shows the directional bias of the percentile or distance.
3.3 Horizontal Statistical Levels
The indicator includes key percentile reference lines:
0 / 5 / 10% → compression zones
50% → median
90 / 95 / 100% → stretch zones
These levels make percentile interpretation immediate.
🔥 4. Heatmap & Summary Table
A built‑in table displays for each timeframe:
the distance %,
the percentile,
a heatmap color:
Percentile Color Meaning
≥ 80 red overextension / overheating
≤ 20 lime compression / rare zone
20–80 grey neutral
This table acts as a multi‑TF tension dashboard.
🟩🟥 5. Dynamic Chart Background (Daily pivot)
The Daily percentile is treated as the market climate indicator:
pD ≥ 50 → green background (bullish tension)
pD < 50 → red background (bearish tension)
Two micro‑signals refine this:
SupED → pD > EMA‑20 → green dot
InfED → pD < EMA‑20 → red dot
These dots mark regime shifts in Daily structure.
🧿 6. Emoji‑Based Signals (instant visual cues)
The indicator uses emojis to highlight rare multi‑TF alignments. When the following occur and does not exist in n+1:
🟢 Compression Signals
⚓ Midas → strong compression (15m → Daily)
🚢 Osimandias → extreme compression (15m → Daily)
🐋 Cyrus → long‑term compression (4h → Weekly)
🔜 Flash2 → ultra‑short‑term compression (1m → 240m)
🔴 Overextension Signals
🏸 Houston → strong stretch (15m → Daily)
🏏 Leica → extreme stretch (15m → Daily)
🛰️ Spoutnik → long‑term stretch (4h → Weekly)
Placement:
above bars for stretch signals,
below bars for compression signals,
top/bottom of chart for structural signals.
🚨 7. Dynamic Alert System (unique & intelligent)
Instead of multiple alerts, the indicator uses one unified alert that dynamically lists all active conditions.
7.1 Alert Trigger
The alert fires when ANY of the following occur and does not exist in n+1:
Midas
Osimandias
Houston
Leica
Spoutnik
Cyrus
Flash2
7.2 Dynamic Message Example
ST MTF Condition Active:
You instantly know:
which signal triggered,
whether it’s compression or stretch,
which timeframes are involved,
whether it’s short‑term or structural.
🎯 8. How to Use the Indicator
8.1 Scalping
Look for:
Flash2
Midas
Osimandias
Goal:
catch micro‑compressions before explosive moves.
8.2 Swing Trading
Focus on:
Midas / Osimandias (compression 15m→Daily)
Houston / Leica (stretch 15m→Daily)
Goal:
anticipate reversals, expansions, or trend shifts.
8.3 Macro / Position Trading
Watch:
Spoutnik (stretch 4h→Weekly)
Cyrus (compression 4h→Weekly)
Goal:
identify structural tension zones.
Indicator

SHK CCI 6 MA BOLLINGER BANDS RSI DUAL DIVERGENCE
SHK CCI 6 MA BOLLINGER BANDS RSI DUAL DIVERGENCE
A dual-oscillator divergence engine that runs CCI and RSI side-by-side in the same pane, cross-confirms divergence signals between them, and wraps the CCI line in an adaptive Bollinger Band for volatility context.
What it does
This indicator plots three things in one pane:
CCI (Commodity Channel Index), colored by trend state and filtered through a selectable signal moving average
RSI (Relative Strength Index), colored by 50-midline bias
A Bollinger Band envelope around the CCI line for spotting volatility expansion/contraction
On top of that, it independently scans both CCI and RSI for regular bullish/bearish divergence against price, and flags the bars where both oscillators agree — a higher-confidence signal than either alone.
How the signal engine works
CCI = (source − SMA(source)) / (0.015 × mean deviation), using HLC3 by default
Signal MA: the CCI line is compared against a moving average of itself to determine trend bias (CCI ≥ MA = bullish tint, CCI < MA = bearish tint). Choose from six MA types: SMA, EMA, ALMA, DEMA, QEMA, DWMA
DEMA/QEMA/DWMA are custom-built (not native to Pine) — DEMA is a double-smoothed EMA, QEMA is a quadruple-nested EMA, DWMA is a double-smoothed WMA. Higher smoothing = fewer whipsaws, more lag
RSI runs on its own independent length setting (separate from the CCI length), so you can tune sensitivity for each oscillator without them fighting each other
Divergence detection uses pivot highs/lows on both CCI and RSI, checked against price action within a configurable bar-distance window (so old, stale pivots don't get matched against fresh ones)
CCI Bollinger Bands: a standard basis ± multiplier × standard deviation envelope calculated on either the raw CCI value or the Signal MA (your choice), letting you see when CCI is stretching outside its normal range
How to read the chart
Element What it means
CCI line color Green/teal shades = CCI above its Signal MA (bullish bias); red/pink shades = CCI below (bearish bias). Deeper/brighter shade = also above/below the zero line, i.e. stronger confluence
Signal MA line Green when the underlying Heikin-Ashi candle is bullish, red when bearish
RSI line Blue above 50, orange below 50
Purple bands around CCI Bollinger envelope — CCI pushing outside the bands signals unusually strong momentum for the current length setting
Fill between CCI and Signal MA Green fill = CCI trending above MA, red fill = CCI trending below
White dashed lines (OB/OS) Customizable overbought/oversold reference levels for CCI (defaults: +100 / −200)
White solid line at 35 Fixed RSI reference level
Labels — how to identify each signal
"C" (aqua, pointing up) — CCI regular bullish divergence: price makes a lower low, CCI makes a higher low
"C" (orange, pointing down) — CCI regular bearish divergence: price makes a higher high, CCI makes a lower high
"R" (green, pointing up) — RSI regular bullish divergence
"R" (red, pointing down) — RSI regular bearish divergence
"D" (lime, larger, pointing up) — Dual confirmation: CCI and RSI both show bullish divergence on the same swing — the strongest bullish signal this script produces
"D" (red, larger, pointing down) — Dual confirmation bearish — the strongest bearish signal this script produces
The "D" labels are the ones to weight most heavily; the standalone "C"/"R" labels are useful context but are single-oscillator signals and appear more frequently.
Inputs, grouped as they appear in settings
CCI Settings — CCI length, source, Signal MA type, Signal MA length
RSI Settings — RSI length (independent of CCI length)
MA Params — ALMA offset/sigma (only relevant if Signal MA Type = ALMA)
Levels — Overbought/Oversold reference lines for CCI
Features — toggle divergence detection on/off entirely
Bollinger Bands - CCI — show/hide, length, multiplier, and whether the band wraps the raw CCI value or the Signal MA
Divergence — pivot lookback (left/right bars) and min/max bar distance between pivots used to validate a divergence
Suggested use
Use the "D" dual-confirmation labels as your primary trigger, and the individual "C"/"R" labels as early warning / confluence-building context
Widen the CCI Bollinger Band multiplier on choppier instruments to reduce noise; tighten it on trending instruments to catch momentum extremes earlier
Try DEMA/QEMA/DWMA as the Signal MA type if you find the default ALMA too reactive or too laggy for your timeframe — each trades off responsiveness against whipsaw filtering differently
Works on any timeframe and instrument; divergence-based tools generally perform best combined with a higher-timeframe trend filter or support/resistance context rather than in isolation
Notes
This is a visual/analytical tool, not a standalone buy/sell signal generator — treat divergence as one input among several in your decision process, not a mechanical trigger
Divergence signals are confirmed only after the right-side pivot lookback bars have closed, so labels appear with a small lag by design (this avoids repainting on the pivot itself)
Disclaimer
This script is for educational and informational purposes only and does not constitute financial advice. It is not a recommendation to buy or sell any security or instrument. Trading and investing involve substantial risk of loss and are not suitable for every investor. Past performance, including any backtested or simulated results, is not indicative of future results.
Always analyze the indicator's behavior across different market conditions and backtest thoroughly on your own instruments and timeframes before using it in live trading. Trade at your own risk — you are solely responsible for your own trading decisions. Indicator

True Strength Index Ribbon
True Strength Index Ribbon: A new way to visualize momentum
Most TSI indicators answer a simple question:
"Is momentum bullish or bearish?"
The True Strength Index Gradient Ribbon was designed to answer a much more useful question:
"How committed is momentum to that direction?"
Instead of displaying two ordinary oscillator lines that constantly cross and overlap, this indicator transforms the relationship between the TSI and its signal line into a continuously expanding and contracting gradient ribbon.
The result is an oscillator that allows traders to recognize momentum shifts almost instantly while dramatically reducing the visual clutter common to traditional TSI implementations.
Why a ribbon?
Momentum isn't simply bullish or bearish.
It has strength.
It has conviction.
It accelerates.
It weakens.
It compresses before expanding again.
The width of the ribbon naturally visualizes the distance between the TSI and its signal line.
A widening ribbon suggests increasing directional commitment.
A narrowing ribbon often indicates weakening momentum or an approaching transition.
Instead of mentally measuring the distance between two moving lines, your eyes recognize it immediately.
Designed for mean reversion and trend trading
While the indicator performs well as a traditional trend-following oscillator, it was specifically developed with mean reversion trading in mind.
Markets spend surprisingly little time at statistically stretched levels.
By combining directional momentum with configurable extension zones, traders can quickly identify when momentum is beginning to reverse after reaching unusually extended conditions.
The indicator intentionally avoids telling traders what to buy or sell.
Instead, it provides objective information that can be combined with price action, structure, moving averages, VWAP, volume, or any existing trading methodology.
Key Features
• Innovative gradient ribbon visualization
• Multiple signal moving average options:
EMA
SMA
WMA
RMA
HMA
VWMA
ALMA
• Higher-timeframe smoothing without changing your chart timeframe
• Four display modes:
Ribbon Only
Signal Line Only
Solid Signal Line Only
Ribbon + Signal Line
• Customizable bullish, bearish, neutral, and extreme colors
• Configurable extension levels for progressively stretched market conditions
• Optional extension-zone shading
• Live Extension Grade panel showing:
Direction
Degree of extension
Current TSI value
• Bullish and bearish crossover alerts
• Extension alerts for every major threshold
Timeframe smoothing
One of the more unique capabilities of this indicator is timeframe-based smoothing.
Instead of requiring traders to constantly switch chart timeframes, the script can internally scale its smoothing calculations to approximate the behavior of a higher timeframe while remaining on the current chart.
This produces cleaner momentum structure while preserving the convenience of lower-timeframe execution.
Extension Grades
Rather than treating all overbought and oversold conditions equally, this indicator classifies momentum into progressively stronger extension levels.
Examples include:
• Moderately Extended
• Extended
• Very Extended
• Extremely Extended
The goal isn't to predict reversals simply because a market reaches an extreme.
Instead, these classifications provide context so traders can better judge when momentum has become unusually stretched.
Built for customization
Every trader sees momentum differently.
Nearly every visual element can be customized, including:
Colors
Signal moving average
Signal smoothing
Ribbon visibility
Timeframe smoothing
Extension thresholds
Zone shading
Signal line appearance
This allows the indicator to adapt to different markets, different trading styles, and different visual preferences.
Design Philosophy
The best indicators don't make trading decisions.
They improve the trader's ability to understand market behavior.
The True Strength Index Ribbon was built around one simple objective:
Transform momentum from something you calculate...
into something you can immediately see.
If this script helps your trading, consider leaving a Like and sharing your feedback. Suggestions for future improvements are always welcome.
Disclaimer
This indicator is provided for educational and informational purposes only. It is designed to assist with market analysis and should not be considered financial or investment advice. No indicator can predict future market movements or guarantee profitable trades. Always conduct your own research, use appropriate risk management, and consider multiple factors before making any trading decisions. Indicator

MAD Z [SigmaSeven]MAD Z
WHAT IT DOES
MAD Z is a regime oscillator that measures how far price has deviated from its recent median, using the Modified Z-Score, a robust statistical method based on the Median Absolute Deviation (MAD) instead of the classical mean/standard deviation. It classifies the market into three persistent states: Risk-On, Risk-Off, and Hold, and colors the oscillator and (optionally) the price bars accordingly.
WHY MAD INSTEAD OF A CLASSICAL Z-SCORE
A classical z-score uses the mean and standard deviation. Both are heavily distorted by outliers: a single large candle (news spike, liquidation wick) inflates the standard deviation and compresses the score exactly when you need it most. The Modified Z-Score replaces:
- the mean with the rolling median (robust location estimate), and
- the standard deviation with the Median Absolute Deviation (robust scale estimate).
The formula is:
z = 0.6745 * (price - median) / MAD
where MAD = median( |price - median| ) over the lookback window. The constant 0.6745 rescales MAD so the output is comparable to a standard z-score under a normal distribution (0.6745 is the 75th percentile of the standard normal). The practical effect: the score reacts to genuine directional displacement but is far less distorted by single-bar outliers than a standard-deviation-based z-score.
HOW THE STATE LOGIC WORKS
The raw score alone would flip constantly around zero. MAD Z therefore uses a hysteresis state machine with two asymmetric thresholds:
- Score crosses ABOVE the Long Threshold (default +1.30) → state switches to Risk-On and stays there.
- Score crosses BELOW the Short Threshold (default -0.20) → state switches to Risk-Off and stays there.
- Between the thresholds, the last state is held (Hold Zone, shaded band).
The asymmetry (a high bar for entering Risk-On, a much closer bar for exiting into Risk-Off) is deliberate: it demands strong statistical displacement before calling a bullish regime, but exits early when the displacement fades. Both thresholds are fully adjustable, so the behavior can be inverted or symmetrized.
HOW TO READ IT
- Oscillator line: the Modified Z-Score of the selected source (default hlcc4) over the Baseline Length (default 50 bars). Colored by current state.
- Threshold lines and shaded Hold Zone: the hysteresis band described above.
- Gradient fills: visual emphasis of displacement above/below zero.
- Bar Coloring (optional): paints price candles in the current regime color so the state is visible on the main chart without reading the pane.
Typical use: as a regime filter for other strategies (only take longs while Risk-On), or as a standalone mean-displacement gauge on higher timeframes. It is NOT a complete trading system and issues no entries or exits by itself.
SETTINGS
- Source: input series (default hlcc4)
- Baseline Length: lookback for median and MAD (default 50)
- Smoothing / Smoothing (EMA): optional EMA smoothing of the raw score (off by default)
- Long / Short Threshold: hysteresis levels (defaults +1.30 / -0.20)
- Color Mode: 8 preset palettes, or custom Risk-On/Risk-Off colors
- Bar Coloring: toggle candle coloring on the main chart
LIMITATIONS
- The score is computed on the current bar's value and can change until the bar closes; the state can therefore also change intrabar. For confirmed signals, evaluate on bar close.
- The median/MAD baseline needs the full lookback window; the first "Baseline Length" bars show no score.
- Like any displacement measure, it is descriptive of the recent window, not predictive. In prolonged low-volatility ranges MAD becomes small and the score can appear exaggerated.
- Default thresholds were chosen as reasonable general-purpose values, not optimized per market. Adjust them to your instrument and timeframe.
The calculation uses no higher-timeframe requests and no lookahead; it does not repaint past bars.
Indicator

Indicator

Indicator

Key_TDI📊 General Overview
The Key_TDI indicator combines the assessment of market momentum and dynamic volatility. The main operational elements of the algorithm are the fast signal line and the volatility channel (outer blue bands).
The tool is designed for:
Identifying price exhaustion zones
Detecting consolidation phases
Spotting reversal points
The interaction of the signal line with the dynamic channel allows for evaluating the market condition without being strictly tied to static overbought and oversold levels.
🎯 Level Formation and Subsequent Action
The initial formation of a key level is identified when the indicator's signal line aggressively breaks outside the blue volatility channel. Such a deviation indicates the culmination of the current impulse.
Further action relies on waiting for the price to return to this range. The mathematical confirmation and decision-making trigger is the retest — the moment when, as the price returns to the zone, the signal line touches the channel boundaries or confidently moves back inside it.
🔄 Working with Mirror Levels
When a trading level changes its status (support becomes resistance or vice versa), the indicator acts as a filter to validate the true reaction. A repeated price approach to the broken level must be accompanied by an appropriate reaction on the oscillator.
If, during the test of a mirror level, the signal line bounces off the indicator's central axis or tests the opposite channel boundary without breaking it, it confirms that the level has successfully flipped its polarity.
📦 Working with Accumulation
During periods of market consolidation, the volatility channel boundaries (blue lines) narrow as much as possible. This mathematically confirms the market's transition into an accumulation phase — activity drops, and the range squeezes.
The key signal that accumulation is ending is the exit of the indicator's fast lines from this narrow corridor. The expansion of the channel boundaries after a squeeze serves as a trigger, indicating the inception of a new impulsive movement.
🔍 Working with Divergences
Identifying discrepancies (divergences) between the price chart and the oscillator helps spot trend exhaustion at an early stage:
Bearish divergence: The price makes higher highs, but the Key_TDI signal line forms a lower peak. This indicates a hidden exhaustion of buying activity.
Bullish divergence: The price forms a lower low, but the indicator shows rising values. This signals a weakness in selling pressure and a high probability of a bullish reversal.
Indicator

Multi-Confluence Signal Engine [MarkitTick]💡 A confluence-weighted signal engine that scores trend, momentum, volume, and market-structure conditions independently, then blends them into two composite 0–100 readings — a Bull Score and a Bear Score — to identify moments where multiple independent forces align in the same direction. Rather than reacting to one indicator crossing one line, this script asks four different questions about price behavior at once and only flags a signal when the weight of evidence clears a threshold you control.
✨ Originality and Utility
Most confluence or "confirmation" scripts on PulseWire work by checking a fixed list of conditions and requiring all of them, or a majority of them, to be true — a rigid AND/OR gate. This script instead builds four independent sub-scores (Trend, Momentum, Volume, Structure), each internally weighted by the relative importance of its own components, and then combines those four legs using user-defined percentage weights into a single continuous score. The practical difference is that a trader can decide, for example, that market structure matters twice as much as volume for their instrument, and the engine will respect that priority mathematically rather than treating every condition as equally binary.
The engine does not stop at "yes/no." Each leg produces a 0–100 magnitude, visible individually on the dashboard, so a trader can see not just that a signal fired but which of the four legs was doing the heavy lifting. A signal driven primarily by Structure (a break of a swing high with rising highs and lows) has a different character than one driven primarily by Volume (a spike on an up-close candle), even if both produce the same final score. This decomposition is what separates the tool from a simple scoring checklist: the score is diagnostic, not just directional.
On top of scoring, the script layers a full trade-management shell: ATR-based stop placement, three R:R-defined take-profit levels, a minimum-bar-gap cooldown to prevent signal clustering, a minimum score-gap requirement between the bull and bear reading to avoid firing on a coin-flip, an optional higher-timeframe trend filter, and an optional ATR-based volatility filter to suppress signals during dead, choppy conditions. This turns a scoring model into a usable end-to-end signal-and-management framework rather than a standalone oscillator.
🔬 Methodology and Concepts
• Trend Leg
The trend component is built from three EMAs — Fast, Slow, and Macro — calculated with a manual recursive EMA function rather than the built-in, giving explicit control over the smoothing seed. Four conditions are checked: whether the Fast EMA sits above (or below) the Slow EMA, whether price trades above (or below) the Macro EMA, and whether the Fast and Slow EMA slopes (measured as simple rate-of-change over a lookback window) are rising or falling. Each condition contributes a fixed point value toward either the bullish or bearish trend sub-score, weighted so that the Fast/Slow EMA relationship and the price-vs-Macro relationship carry the most influence, with slope direction acting as a secondary confirmation.
• Momentum Leg
Momentum blends RSI positioning relative to a configurable midline, MACD line-vs-signal crossover state, and MACD histogram direction (rising or falling versus the prior bar). Each of the three contributes roughly a third of the momentum sub-score, meaning momentum only reads as strongly bullish or bearish when oscillator position, trigger-line relationship, and histogram acceleration all agree.
• Volume Leg
Volume scoring looks for two things: whether current volume exceeds a multiple of its moving average (a "spike") occurring on a candle that closed in the corresponding direction, and whether volume is simply expanding bar-over-bar in that same direction. A volume spike on a directional candle carries the larger weight, since an expanding-but-unspiked volume reading is a weaker signal of conviction than an outright surge.
• Structure Leg
This is a swing-based market-structure read. Pivot highs and lows are detected with a symmetric lookback window (a bar must be the extreme point within a window of bars on both sides to qualify), and the script tracks the two most recent pivot highs and two most recent pivot lows. A bullish structure state requires both the pivot highs and pivot lows to be printing progressively higher (higher highs, higher lows); a bearish state requires the mirror condition. Separately, the script tracks a "break of structure" — price closing beyond the last confirmed pivot high or low in a direction that differs from the currently tracked structural bias — as an additional, heavier-weighted structural signal.
• Composite Scoring
The four leg scores are combined using a weighted average, where the weights (Trend / Momentum / Volume / Structure) are fully configurable and normalized against their own sum, so the four percentages do not need to add to exactly 100 to remain internally consistent. The result is a Bull Score and a Bear Score, each independently ranging from 0–100, which are then bucketed into Strong, Medium, Weak, or None tiers based on two adjustable thresholds.
• Signal Confirmation Logic
A raw long or short condition requires the relevant score to clear the Medium threshold, the gap between the bull and bear scores to exceed a minimum separation (preventing signals when both sides are nearly tied), an optional higher-timeframe trend agreement check, an optional minimum-volatility check using ATR as a percentage of price, and a minimum bar-count since the last signal in that direction. Signals are only confirmed on a closed bar (barstate.isconfirmed), so the plotted signal state does not repaint on the current, still-forming bar.
• Higher-Timeframe Filter
When enabled, the script requests the prior, fully closed value of price and a slow EMA from a higher timeframe using an offset lookback, which is the standard non-repainting method for pulling higher-timeframe context — it deliberately reads the last confirmed HTF bar rather than the in-progress one, so this filter does not introduce forward-looking bias.
🎨 Visual Guide
• Heatmap Candles
When enabled, candle bodies, wicks, and borders are recolored using the Bull/Bear/Neutral color inputs based on which composite score currently leads and whether it clears the Medium tier — teal-family for a leading bull score at or above Medium, red-family for a leading bear score at or above Medium, and gray for anything below that threshold on both sides.
• EMA Lines
Three plotted lines track the Fast EMA (blue by default), Slow EMA (orange by default), and Macro EMA (purple by default). Their relative position and slope are the visual counterpart of the Trend Leg's underlying math.
• Score Labels
When a long signal fires, a label appears below that bar showing the rounded Bull Score. When a short signal fires, a label appears above that bar showing the rounded Bear Score. These give an at-a-glance read of how strong the triggering signal was without opening the dashboard.
• Trade Levels
On a confirmed signal, the script draws a full set of horizontal levels: a Stop-Loss line (red, with an "✕ SL" label), an Entry line (blue dashed, "▶ Entry" label), and three Take-Profit lines at increasing R:R multiples (teal dashed, "◆ TP1", "✦ TP2", "◆ TP3" labels, with opacity increasing from TP1 to TP3). Shaded fills connect Entry-to-Stop (risk zone) and Entry-to-TP3 (reward zone) so the risk/reward geometry is visible at a glance. These levels extend forward automatically as new bars form and are replaced whenever a fresh signal fires, unless the Lock Signal input is enabled, in which case the current level set is frozen and new signals are suppressed from redrawing them.
• Dashboard
An optional on-chart table (position configurable to any corner) summarizes, per bar: the current lock state, the Bull Score and Bear Score as filled progress bars with a percentage, the Bull Tier and Bear Tier classification, each of the four leg scores as its own progress bar, the current volume ratio versus its moving average, and the current ATR as a percentage of price. The progress bars use a three-color scale (teal / amber / red) based on how far the underlying reading sits from its maximum, giving a quick visual read of leg strength without needing to interpret raw numbers.
📖 How to Use
A long condition is flagged only when the Bull Score clears the Medium threshold, leads the Bear Score by at least the configured minimum gap, and passes whichever optional filters (HTF trend, volatility) are enabled — the mirror logic applies to short conditions. The dashboard's per-leg bars are useful for judging signal quality beyond the headline score: a Strong-tier signal backed by all four legs reading high is generally a more complete confluence than one where the composite score is inflated mostly by a single leg such as Volume.
The Lock Signal input is intended for reviewing a specific historical signal's levels without them being overwritten as price continues to move — enable it to freeze the current Entry/SL/TP level set in place, and disable it to resume normal level updates on the next fresh signal.
Because trade levels are geometric projections from ATR and R:R inputs at the moment of signal, not a guarantee of price reaching those levels, they should be read as a structured reference for planning position size and exits rather than a forecast.
⚙️ Inputs and Settings
• Core Settings
Strong and Medium thresholds define the score tiers; the Minimum Bars Gap enforces a cooldown between signals in the same direction; the Minimum Score Gap requires clear separation between Bull and Bear scores before either can fire; the four Leg Weight inputs control how much each of Trend, Momentum, Volume, and Structure contributes to the composite score.
• Trend Leg
Fast, Slow, and Macro EMA lengths, plus the lookback window used to measure EMA slope direction.
• Momentum Leg
RSI length and midline, plus MACD fast/slow/signal lengths.
• Volume Leg
The moving-average length volume is compared against, and the multiplier that defines a "spike."
• Structure Leg
The symmetric lookback window used to confirm a swing pivot high or low.
• Filters
Optional higher-timeframe trend agreement filter (with selectable timeframe) and an optional ATR-based minimum-volatility filter, each of which can independently suppress signals that would otherwise fire.
• Trade Tools
ATR multiplier for stop distance, R:R multiples for the three take-profit levels, a toggle to show or hide the drawn levels, and the Lock Signal toggle to freeze the current level set.
• Visuals
Toggles for heatmap candle coloring, EMA line visibility, and score labels on signals.
• Dashboard
Toggle to show or hide the on-chart summary table and a dropdown to choose which corner it docks to.
• Alerts
Custom text strings for the long, short, close-long, and close-short alert JSON payloads, letting the alert output be adapted to match the syntax expected by an external webhook or automation endpoint.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
• Trend-Following Theory
The EMA-based trend leg draws on the long-standing empirical observation, formalized in academic momentum and trend-following literature, that asset prices exhibit serial correlation over intermediate horizons — trends, once established, have historically had a higher-than-random probability of persisting over the following period. Dual and triple moving-average crossover systems are among the earliest systematized expressions of this idea, and the slope-of-the-average component reflects the concept of trend "velocity" used in later technical and quantitative trend-strength research.
• Oscillator and Convergence-Divergence Theory
RSI, developed by J. Welles Wilder, is grounded in the idea that the ratio of average gains to average losses over a lookback window reflects the relative strength of buying versus selling pressure, oscillating within bounds that can indicate overbought/oversold conditions or, as used here, simple directional bias relative to a midline. MACD, developed by Gerald Appel, formalizes convergence and divergence between two exponential averages of differing sensitivity; the histogram (the difference between the MACD line and its own signal line) captures acceleration or deceleration in that relationship, which is the specific behavior this script isolates when checking histogram direction.
• Volume-Price Confirmation Theory
The volume leg reflects classical Dow Theory and later volume-price-analysis principles holding that price moves accompanied by above-average volume carry more conviction than moves on thin volume, since volume is treated as a proxy for the degree of market participation and consensus behind a price change.
• Market Structure and Price-Action Theory
The structure leg operationalizes the concept of market structure as used in classical Dow Theory (a sequence of higher highs and higher lows defining an uptrend, and the reverse for a downtrend) and its more recent "break of structure" formalization in price-action and smart-money-concept methodologies, where a close beyond a prior swing point is treated as evidence of a shift in the controlling side of the market.
• Weighted Multi-Factor Aggregation
Combining independently normalized sub-scores via user-adjustable weights mirrors the logic of multi-factor models in quantitative finance, where distinct signal families (trend, momentum, volume, structure/mean-reversion) are each scored on a common scale and then blended, rather than relying on any single factor in isolation — the underlying premise being that signal families with low correlation to one another produce more robust composite readings than any single family alone.
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. We expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion. Indicator

Indicator

RSI VarmetricRSI + NUBE · con OPTIMIZADOR INTEGRADO
// Prueba 54 configuraciones: 6 longitudes de RSI x 3 nubes x 3 niveles.
// Para cada una lleva su propia equity con comision, y en la ultima barra
// ordena las diez mejores por rentabilidad ajustada al riesgo.
//
// LIMITE TECNICO IMPORTANTE: en Pine la longitud de ta.rsi y ta.ema tiene que
// ser una constante, no puede venir de una variable. Por eso la rejilla esta
// escrita a mano y es fija: no se puede ampliar desde los ajustes.
//
// COMO LEER EL RESULTADO. El optimizador te dice cual fue la mejor
// configuracion EN ESTE HISTORICO CONCRETO. Eso NO es lo mismo que decirte
// cual sera la mejor de aqui en adelante: midiendo esto mismo sobre BTC, la
// configuracion que ganaba en 2018-2022 quedaba por debajo de la media en
// 2022-2026 en la mayoria de los casos. Usalo para ver la FORMA del mapa
// (si hay una meseta ancha o un pico solitario), no para copiar el numero uno.
// Si toda la rejilla ronda el mismo valor, cualquier celda vale. Si solo una
// destaca, desconfia de ella.
RSI + CLOUD · with INTEGRATED OPTIMIZER
// Test 54 configurations: 6 RSI lengths x 3 cloud lengths x 3 levels.
// Each one carries its own equity with commission, and on the last bar,
// it ranks the ten best by risk-adjusted return.
// IMPORTANT TECHNICAL LIMIT: In Pine, the length of ta.rsi and ta.ema must
// be a constant; it cannot be derived from a variable. Therefore, the grid is
// handwritten and fixed: it cannot be expanded from the settings.
// HOW TO READ THE RESULT. The optimizer tells you which was the best
// configuration IN THIS SPECIFIC HISTORICAL TIMELINE. That's NOT the same as telling you
// which will be the best going forward: measuring this same thing on BTC, the
// configuration that was winning in 2018-2022 fell below the average in
// 2022-2026 in most cases. Use it to see the SHAPE of the map
// (if there's a wide plateau or a lone peak), not to copy number one.
// If the entire grid hovers around the same value, any cell is valid. If only one
// stands out, be wary of it. Indicator

Alpha Reversion Pro v2.3 - Safi EditionAlpha Reversion Pro v2.3 - Safi Edition is a regime-aware mean-reversion strategy built around controlled aggression.
The idea is simple:
Do not buy every dip.
Buy selected dips only when the broader market regime is supportive.
This strategy uses a macro regime filter, defaulted to QQQ versus its 200-period SMA on the daily timeframe. When the macro regime is favorable, the script allows staged dip entries on the chart symbol. When the regime turns defensive, the system stops buying and can exit the position.
This is my Safi-style trading workflow:
Wait for fear.
Buy controlled pullbacks.
Scale in with predefined account exposure.
Exit when the mean-reversion move matures.
Respect cash as a position.
Core features:
1. Macro regime filter
The strategy checks whether the selected macro symbol is above or below its 200-period SMA.
2. Bullish and inverse instrument modes
Use Bullish instrument mode for QQQ, SPY, TQQQ, SOXL, NVDA, AMD, and similar bullish instruments.
Use Inverse instrument mode for SQQQ, SOXS, and other inverse ETF tests.
3. Deep dip entries
The deep dip model uses a short RSI to identify aggressive downside exhaustion.
4. Shallow trend-pullback entries
The shallow pullback model allows entries while price remains above a trend filter.
5. 25% staged allocation
The default setup buys 25% of account value per signal, with up to four total buys. This allows the system to reach a 100% maximum account position in four planned steps.
6. Clean BUY and SELL markers
BUY markers show the buy signal, the share price, and the percentage of account value currently in the trade.
SELL markers show the sell signal, the share price, trade P/L percentage, remaining account percentage still in the trade, and cash percentage.
7. Compact trading summary
The trading summary shows position state, account percentage in trade, cash percentage, buy slots used, macro regime, action, average entry, stop/risk, open P/L, win rate, profit factor, return/drawdown, closed trades, and average bars held.
8. Risk controls
The strategy includes a configurable hard stop and optional macro-regime exit.
Suggested use cases:
- QQQ daily swing testing
- TQQQ daily or 4H aggressive leveraged ETF swing testing
- SOXL daily or 4H semiconductor pullback testing
- SPY daily or weekly mean-reversion testing
- SQQQ or SOXS bearish-regime testing using Inverse instrument mode
Suggested starting settings:
For TQQQ:
- Chart timeframe: Daily or 4H
- Instrument Mode: Bullish instrument
- Macro Regime Symbol: QQQ
- Macro Regime Timeframe: D
- Allocation Per Buy: 25%
- Maximum Total Buys: 4
- Maximum Account Exposure: 100%
- Hard Stop: 6% to 10%
For SOXL:
- Chart timeframe: Daily or 4H
- Instrument Mode: Bullish instrument
- Macro Regime Symbol: SMH
- Macro Regime Timeframe: D
- Allocation Per Buy: 10% to 25%
- Maximum Total Buys: 2 to 4
- Hard Stop: 8% to 12%
For SQQQ:
- Chart timeframe: Daily or 4H
- Instrument Mode: Inverse instrument
- Macro Regime Symbol: QQQ
- Macro Regime Timeframe: D
For SOXS:
- Chart timeframe: Daily or 4H
- Instrument Mode: Inverse instrument
- Macro Regime Symbol: SMH
- Macro Regime Timeframe: D
The chart is intentionally clean by default. Only BUY/SELL markers and the trading summary box are shown. Optional stop, exit SMA, and trend SMA plots can be turned on in settings.
Important notes:
- This script is for education, research, backtesting, and paper-trading.
- It is not financial advice.
- Historical results do not guarantee future performance.
- Strategy results depend on symbol, timeframe, slippage, spread, commission, liquidity, and settings.
- Leveraged ETFs such as TQQQ, SQQQ, SOXL, and SOXS can move quickly and may experience large drawdowns.
- Always test the script on your own symbol, timeframe, and cost assumptions.
- Use regular candles for Strategy Tester results. Non-standard candles can distort backtests.
Signature:
Built by Safi for controlled-aggression mean reversion.
QQQ is the traffic light. Risk comes first. Cash is a position.
Release Notes - v2.3
- Converted the strategy to Pine Script v6.
- Preserved the original Alpha Reversion Pro regime-aware dip-buying concept.
- Added 25% per-buy allocation as the default.
- Added four-buy maximum structure for up to 100% account exposure.
- Added Maximum Account Exposure input.
- Updated BUY markers to show only buy price and total account percentage currently in the trade.
- Updated SELL markers to show sell price, P/L percentage, remaining percentage in the trade, and cash percentage.
- Removed dollar cost from markers.
- Added Bullish instrument and Inverse instrument modes.
- Added fail-safe auto-sized trading summary table.
- Added table controls for position, text size, colors, transparency, and displayed sections.
- Kept the chart clean by default with only BUY/SELL markers and the trading summary box visible.
- Kept optional stop line, exit SMA, and trend SMA plots off by default.
- Added alert conditions for BUY dip, SELL setup, and hard-stop touch. Strategy

EMA RSI MACD Confluence Strategy Hybrid ATR ExitA role-based confluence strategy for crypto swing trading, validated on 4H charts of liquid majors (BTC, ETH, SOL).
Why "role-based"? Most multi-indicator scripts stack three oscillators and fire when they agree — three lagging versions of the same information. Here, each component has one distinct job:
EMA (21/50) — trend regime. The master filter. Longs only while fast EMA is above slow EMA (optionally with rising slope); shorts in the mirror condition.
MACD (12/26/9) — entry trigger. A signal-line cross fires the entry, only in the direction the regime allows.
RSI (14) — confirmation and guardrail. Momentum must agree (above/below the 50 midline), and entries chasing into overbought/oversold extremes are blocked.
ATR (14) — risk engine. Stops, targets, and the trail all scale with volatility.
The hybrid exit (what makes this version different). The initial stop and take-profit are anchored to the ATR captured at entry, so the risk-per-trade sizing stays honest even when volatility expands mid-trade. The trailing stop, however, deliberately uses live ATR — it widens as volatility expands, which lets winners run in accelerating trends. In testing, freezing the trail at entry ATR destroyed the edge; adapting it restored it. Both behaviours are documented in the input tooltips.
Higher-timeframe regime filter. An optional daily-EMA filter permits longs only in a higher-TF uptrend and shorts only in a downtrend — the single biggest chop filter in testing.
Non-repainting by construction: all logic uses closed-bar values, orders process on bar close, the HTF filter requests the last closed daily bar with lookahead off, and alerts fire on bar close matching the backtest exactly.
Risk management: each trade is sized so a full stop-out loses a fixed % of equity (default 1%); a hard leverage cap (default 1.0 = none) prevents notional from exceeding equity; commission (0.05%) and slippage (2 ticks) are included so results reflect realistic costs.
Honest usage notes: this is a trend-following system — expect a low win rate with larger winners, and flat-to-negative stretches in ranging markets. It is validated on 4H; on 5m/15m, trading costs typically consume the edge. Adjust commission/slippage to your venue and forward-test before trading anything live.
Open-source so you can audit every line. Feedback welcome in the comments.
Past performance does not guarantee future results. This script is a tool, not financial advice. Strategy

Kaizen Momentum PlusKaizen Momentum Plus is a professional momentum engine designed to measure direction , strength , and acceleration — with a focus on signal quality, non-repainting logic, and consistent behaviour across assets and timeframes.
Built for traders who operate across crypto, stocks .
---
What It Does
Kaizen Momentum Plus transforms price into a normalized momentum reading:
- Momentum — smoothed, z-scored momentum that adapts across assets and regimes
- Acceleration — the rate of change of momentum (impulse rising or fading)
- Equilibrium reference — the zero baseline separating bullish and bearish momentum
Together, they answer three questions:
1. Is momentum "bullish" or "bearish"?
2. Is it "accelerating" or "losing force"?
3. Is the move "building" — or starting to "exhaust"?
---
Multi-Market / Multi-Timeframe
Works across:
Crypto, Stocks & ETFs 15min,30min,1H,4H,12H, 1D , 1W
Same logic. Same interpretation. Consistent across your entire workspace.
---
How to Read It
Bullish momentum
Momentum above zero with rising acceleration → bullish pressure building.
**Bearish momentum**
Momentum below zero with falling acceleration → bearish pressure building.
Acceleration flip
Momentum still extended, but acceleration reverses → impulse is fading (watch for exhaustion / mean reversion).
Near equilibrium
Low-conviction zone — wait for a clear push rather than forcing trades.
---
## Core Features
- Log-return momentum with adaptive z-score normalization
- Direction hysteresis + neutral deadband to reduce false flips
- Optional bar-close confirmation for live trading
- Exhaustion detection available via alerts
- Alertconditions for direction flips, strong momentum, and exhaustion
Non-repainting design :causal calculations only — no lookahead, no pivoting tricks.
---
Alerts Included
- Momentum → Bull
- Momentum → Bear
- Strong Bull Momentum
- Strong Bear Momentum
- Bull Exhaustion
- Bear Exhaustion
---
Suggested Use
1. Identify higher-timeframe bias with Kaizen Momentum Plus
2. Drop to your execution timeframe for entries
3. Use acceleration flips as early warning for exits or fades
4. Combine with your existing Kaizen systems (entries, gates, risk) for full confluence
This is a **momentum decision layer** — not a standalone system. Use it as the pulse of the market inside a complete process.
---
About Kaizen Kyoto Capital
**Kaizen Kyoto Capital** builds precision trading tools with one principle:
> Clarity over noise. Process over prediction. Edge over emotion.
Kaizen Momentum Plus is part of the Kaizen toolkit — engineered for serious traders who value robust logic and multi market consistency.
---
Disclaimer
This indicator is for educational and informational purposes only.
It does not constitute financial advice. Trading involves risk. Past behaviour of any signal does not guarantee future results. Always manage risk and do your own research.
Indicator

Indicator

Indicator

MACD Momentum Matrix [MTF]# MACD Multi-Timeframe Confirmation — v1
A MACD confirmation tool that only signals when your chart timeframe and a
higher timeframe agree — built to demonstrate reliable, non-repainting
multi-timeframe logic.
## What it does
- Standard MACD (configurable fast/slow/signal lengths) on your chart's
timeframe
- Reads MACD trend state from a higher timeframe you choose
- Fires a confirmed signal only when both timeframes align (optional —
can be turned off to use chart-timeframe crosses alone)
- Clean triangle markers on the price chart at confirmed signals
- Live status table showing chart-timeframe state, higher-timeframe state,
and whether they're currently aligned
- Separate bullish/bearish alerts
## What it deliberately leaves out (v1 scope)
- Multiple stacked higher timeframes
- Alternate MACD variants (zero-line cross, histogram slope, etc.)
- Backtesting or strategy logic
Those become a separate "MACD Pro" build so this stays a fast, dependable
confluence tool.
## Design principles
- **Non-repainting multi-timeframe data.** Higher-timeframe MACD is pulled
with lookahead = barmerge.lookahead_off, the standard safe pattern for
MTF requests in Pine Script — no future data leaks into historical bars.
- **Confirmed on close.** Signals are based on a completed MACD line/signal
line cross, not intrabar movement.
- **Readable code.** Organized into clearly commented sections so a client
can follow exactly what triggers a signal.
## Ideal use cases
- Traders who use MACD for trend confirmation and want to filter out
lower-timeframe noise automatically
- A building block for custom strategies that need a reliable "is the
bigger picture agreeing with this move" filter
- Anyone who's been burned by repainting MTF indicators and wants one that
behaves the same live as in backtest
---
*Built by Pedro Silva — Pine Script v6 development for custom indicators,
alert systems, and backtesting tools. Open for custom work: .* fix it
MACD Momentum Matrix
MACD Momentum Matrix is a multi-timeframe momentum confirmation tool designed to filter lower-timeframe MACD signals through broader market context.
Instead of treating every MACD crossover as an actionable event, the indicator evaluates three layers:
Chart-timeframe MACD for signal timing
Completed 5-minute MACD data for immediate momentum
Completed 15-minute MACD data for directional bias
A signal appears only when the enabled momentum, trend, candle, session, and signal-management conditions agree.
How it works
Chart-timeframe trigger
The chart-timeframe MACD crossover provides the initial bullish or bearish trigger. Signals are evaluated only after the chart candle closes.
Five-minute momentum
The completed 5-minute MACD histogram determines whether immediate momentum supports the potential signal.
Three confirmation modes are available:
Directional
Directional and Strengthening
Directional or Strengthening
Fifteen-minute bias
The completed 15-minute MACD histogram provides the broader directional context. Users may optionally require that this higher-timeframe momentum is also strengthening.
Price confirmation
Optional trend filters can require price to be positioned correctly relative to:
Session VWAP
A configurable EMA
Both VWAP and EMA
Neither filter
An additional candle-direction filter can require bullish signals to close above their open and bearish signals to close below their open.
Signal management
The indicator includes controls designed to reduce clustered or repetitive signals:
Configurable cooldown between signals
One signal per momentum leg
Optional session restriction
Confirmed-close evaluation
Independent bullish and bearish alerts
These features do not predict reversals or guarantee profitable entries. They organize MACD confirmation into a more selective multi-timeframe framework.
Non-repainting higher-timeframe logic
The 5-minute and 15-minute calculations use values from completed higher-timeframe candles.
The script requests historically confirmed values using an offset expression with barmerge.lookahead_on. This prevents an unfinished higher-timeframe candle from changing the imported momentum state while the current chart candle is developing.
Signal markers are also gated by confirmed chart-bar closes.
This means historical signals are evaluated using the same completed-candle information available during live operation.
Momentum Matrix dashboard
The compact dashboard summarizes:
Chart-timeframe trigger state
Five-minute momentum state
Fifteen-minute directional bias
Current bullish or bearish context
Filter readiness
Most recent confirmed signal
The dashboard is intended to show why a setup is active, blocked, or still waiting without covering the chart with unnecessary information.
Customization
Users can configure:
MACD fast, slow, and signal lengths
Momentum and bias timeframes
Five-minute confirmation method
Fifteen-minute bias requirements
VWAP and EMA filtering
EMA length
Candle-direction confirmation
Signal cooldown
One-signal-per-leg behavior
Signal session and timezone
Marker visibility and colors
Dashboard visibility and position
Alerts
Separate alert conditions are included for:
Bullish multi-timeframe MACD confirmation
Bearish multi-timeframe MACD confirmation
Create PulseWire alerts from either condition after applying the indicator to a chart.
Recommended starting configuration
The default structure is intended primarily for short-term intraday charts:
Chart timeframe: 1 minute
Momentum timeframe: 5 minutes
Bias timeframe: 15 minutes
Trend filter: VWAP
Confirmed candle direction: Enabled
One signal per momentum leg: Enabled
Signal cooldown: 10 chart bars
These are starting values, not universal trading rules. Settings should be adjusted for the instrument, session, and trading style being evaluated.
Intended use
MACD Momentum Matrix can be used as:
An intraday momentum-confirmation tool
A filter for lower-timeframe MACD noise
A visual multi-timeframe market-state dashboard
An alert framework for discretionary traders
A foundation for custom strategy development and testing
Scope
This version does not include:
Automated order execution
Stop-loss or profit-target calculations
Position sizing
Backtesting statistics
Support and resistance detection
Reversal prediction
It is a confirmation indicator, not a complete trading system. Signals should be evaluated alongside market structure, meaningful price levels, risk management, and the user’s own tested trading plan.
Built by Pedro Silva in Pine Script v6. Available for custom indicators, alert systems, backtesting tools, and Pine Script development. Indicator
