OPEN-SOURCE SCRIPT
Actualizado Weekly Stochastic

Color of candles depended on the trend. when K crosses over candles are green. when k crosses under candles are red
Notas de prensa
**Weekly Stochastic Trend Tracker**This indicator is designed to identify and highlight major macro trends by using a custom Weekly Stochastic oscillator (19, 4, 4) overlaid onto your current chart. It filters out market noise by applying a strict 4-step state machine to color your candles, ensuring you only see trend signals when momentum is fully confirmed.
**How it Works:**
The indicator calculates a Weekly Stochastic and colors the chart candles based on the following cycle:
* **Gray (Neutral/Shift):** Occurs immediately when the Stochastic `%K` crosses over or under `%D`, signaling a potential momentum shift.
* **Green (Confirmed Uptrend):** After a bullish cross, if `%K` holds above the 32 level for 3 consecutive bars, the candles turn Green to signal a strong uptrend.
* **Red (Confirmed Downtrend):** After a bearish cross, if `%K` stays below 80 and below `%D` for 3 consecutive bars, the candles turn Red to signal a strong downtrend.
**Features:**
* **Multi-Timeframe (MTF):** Operates on weekly data regardless of your chart's timeframe.
* **Non-Repainting Logic:** By default, it waits for the weekly candle to close before locking in signals.
* **Visual Smoothing:** Includes an interpolation toggle to display smooth, straight lines connecting the weekly data points instead of jagged steps on lower timeframes.
* **Custom Smoothing Types:** Allows you to change the Stochastic smoothing calculation (SMA, EMA, WMA, RMA) to fit your preference.
This tool is ideal for swing traders and trend followers looking to stay on the right side of the weekly momentum.
Notas de prensa
I fixed a couple bugs with the grey barsScript de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.