OPEN-SOURCE SCRIPT

$$$ EMAS & WEEKLY PIVOTS $$$

281
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.

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน