PROTECTED SOURCE SCRIPT

Malama's PRE-Market Box

35
Overview
Malama's PM Box is a clean, professional pre-market range indicator that tracks the entire pre-market session (default 04:00–09:30 EST), draws a dynamic box during pre-market hours, and automatically extends clean high/low reference lines into the regular trading session. Upon breakout of these levels during regular hours, it optionally displays clear "BREAK" labels and fires alerts — making it ideal for day traders focusing on pre-market range breakouts.
Key Features

Dynamic Pre-Market Box: A real-time updating box that visually represents the developing pre-market high and low range, with customizable fill color, border, and transparency.
Extended Support & Resistance Lines: At the start of regular trading hours (09:30), the final pre-market high (resistance) and low (support) are locked in and extended as horizontal lines across the chart for the entire day.
Breakout Signals: Optional on-chart "BREAK" labels (green upward for bullish, red downward for bearish) when price closes beyond the pre-market high or low during regular hours.
Alerts: Built-in alert conditions for bullish breakouts (above PM high) and bearish breakdowns (below PM low).
Clean & Efficient Drawing: Uses Pine Script boxes and lines for smooth visuals and performance; lines extend automatically until the next trading day.

Major Differences & Improvements from the Older "Malama's KAYCAP Pre-Market Box"
The older script focused on isolating a single specific candle (default 4:00 AM) and plotting its body and wick levels separately. This new version represents a complete evolution into a full pre-market range tool with the following key upgrades:

Full Session Range vs. Single Candle:
Old: Captured only one user-defined minute/candle (e.g., exactly 4:00).
New: Tracks the entire pre-market session (default 04:00–09:30) and continuously updates the true session high/low.
Visual Presentation:
Old: Four separate plots (body top/bottom, high/low) with basic fill.
New: Single professional box with customizable fill/transparency/border during pre-market, plus clean extended horizontal lines after market open.
Extension & Persistence:
Old: Static plots that did not extend or update dynamically.
New: Lines automatically extend rightward throughout the regular session and reset cleanly each day.
Breakout Detection & Signaling:
Old: No breakout logic or alerts.
New: Detects true breakout/breakdown candles during regular hours, with optional visual labels and dedicated alert conditions.
User Experience:
Old: Required manual configuration of exact minute and separate pre-market session inputs (unused in logic).
New: Simplified session input using TradingView's built-in session string, fewer inputs overall, and more intuitive grouping.

In essence, the older version was a niche tool for analyzing one specific pre-market candle's structure, while PM Box (Visual Pro) is a modern, practical day-trading utility focused on the classic pre-market high/low range strategy with superior visuals, automation, and breakout signaling.
How to Use

Apply to 1-minute or 5-minute charts on US stocks or indices with pre-market data.
Default session (04:00–09:30) captures standard US pre-market; adjust if your broker uses a different timezone.
Watch the box develop live during pre-market.
Once regular hours begin, use the extended high (resistance) and low (support) lines as key levels.
Trade breakouts/breakdowns when price closes beyond these lines (confirmed by labels and alerts).
Combine with volume, trend filters, or other confluence for higher-probability setups.

Disclaimer
This indicator is for educational and informational purposes only. It is not financial advice. Past performance does not guarantee future results. Always use proper risk management and combine with your own analysis. Trading involves substantial risk of loss.

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

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