OPEN-SOURCE SCRIPT
$$$ EMAS & WEEKLY PIVOTS $$$

EMAS & WEEKLY PIVOTS by PINE DIGGA
A lightweight, no-clutter overlay that pairs three fully customizable EMAs with a clean set of classic weekly pivots. Built as a companion to the GOLD DIGGA suite, it gives you trend context and weekly support/resistance in one indicator — without repainting and without crowding your chart.
What it does
Three EMAs (default 50 / 100 / 200)
Each EMA is independent: its own length, colour, line style (solid / dashed / dotted) and on-off toggle. Use them as a fast/mid/slow stack for trend bias, dynamic support and resistance, or pullback reference. A shared source input and line-width control keep things tidy.
Weekly pivots (PP, R1–R3, S1–S3)
Standard floor-trader pivots calculated from the last completed week's High, Low and Close. Levels are drawn as extending lines into the future with optional price labels, so you always know where the week's key reaction zones sit.
The pivot math is the classic formula set:
PP = (High + Low + Close) / 3
R1 = 2·PP − Low • S1 = 2·PP − High
R2 = PP + (High − Low) • S2 = PP − (High − Low)
R3 = High + 2·(PP − Low) • S3 = Low − 2·(High − PP)
Why it doesn't repaint
The weekly values are pulled with request.security using a one-bar shift and lookahead_off, so the current (still-forming) week never leaks into the calculation. The levels you see are based only on data that has already closed — what prints in real time is what you'd have seen historically.
Notes
This is a charting and analysis tool, not financial advice or a signal service. Always combine it with your own analysis and risk management. Open-source under the Mozilla Public License 2.0 — feel free to study the code.
A lightweight, no-clutter overlay that pairs three fully customizable EMAs with a clean set of classic weekly pivots. Built as a companion to the GOLD DIGGA suite, it gives you trend context and weekly support/resistance in one indicator — without repainting and without crowding your chart.
What it does
Three EMAs (default 50 / 100 / 200)
Each EMA is independent: its own length, colour, line style (solid / dashed / dotted) and on-off toggle. Use them as a fast/mid/slow stack for trend bias, dynamic support and resistance, or pullback reference. A shared source input and line-width control keep things tidy.
Weekly pivots (PP, R1–R3, S1–S3)
Standard floor-trader pivots calculated from the last completed week's High, Low and Close. Levels are drawn as extending lines into the future with optional price labels, so you always know where the week's key reaction zones sit.
The pivot math is the classic formula set:
PP = (High + Low + Close) / 3
R1 = 2·PP − Low • S1 = 2·PP − High
R2 = PP + (High − Low) • S2 = PP − (High − Low)
R3 = High + 2·(PP − Low) • S3 = Low − 2·(High − PP)
Why it doesn't repaint
The weekly values are pulled with request.security using a one-bar shift and lookahead_off, so the current (still-forming) week never leaks into the calculation. The levels you see are based only on data that has already closed — what prints in real time is what you'd have seen historically.
Notes
This is a charting and analysis tool, not financial advice or a signal service. Always combine it with your own analysis and risk management. Open-source under the Mozilla Public License 2.0 — feel free to study the code.
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.
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.