PROTECTED SOURCE SCRIPT
Güncellendi

Premarket Levels

271
This indicator tracks premarket high and low levels for day trading, providing statistical analysis on how often these levels get touched during regular trading hours (9:30 AM-4:00 PM EST). It combines real-time level tracking with historical probability analysis and precise timing statistics to help traders make data-driven decisions. I use 4:00 - 9:30 AM on SPY/QQQ etc and 18:00 - 9:30 on Futures ES/NQ etc

Core Features
1. Premarket Level Tracking

Automatically identifies and plots premarket high and low levels
Displays levels with customizable colors and line styles
Shows optional midpoint and percentage/fibonacci retracement levels
Tracks when levels are set during premarket session

2. Historical Touch Analysis

Calculates probability of PM high/low being touched during regular hours
Tracks "Both Levels" touched rate (how often both get hit same day)
Tracks "Either Level" touched rate (how often at least one gets hit)
Adjustable lookback period (1-250 days) for statistical analysis

3. Timing Intelligence

Average time when levels get touched
Earliest and latest touch times in historical data
Four customizable time buckets showing touch distribution throughout the day
First touch time displayed for current session

4. Range Analysis

Current PM range vs historical average (adjustable period)
Range percentile ranking (where today ranks in historical distribution)
Min/Max historical ranges for context
Large/small range detection with customizable thresholds
Background highlighting for unusual range days

5. Smart Signals & Alerts

Buy/Sell signals on level breakouts (adjustable sensitivity)
Level rejection detection (failed breakout patterns)
Proximity alerts when approaching levels
Touch markers (diamond shapes) when levels are tested
Multiple alert conditions for various scenarios

6. Risk Management Tools

Automatic stop loss suggestions (ATR-based, percentage-based, or fixed points)
Target projections based on range extension
Position tracking relative to PM range
Distance calculations to both levels

How To Use
For Day Traders:

Check the "Either Level" percentage - if 90%+, at least one level will likely be touched
Review time bucket statistics - most touches happen 9:30-10:00 AM
Monitor "Both Levels" rate - typically only 20-30%, meaning round trips are rare
Use range percentile to gauge if expansion or mean reversion is likely

For Scalpers:

Enable touch markers to see exact level tests
Use proximity alerts to prepare for potential bounces
Monitor first touch times - early touches often lead to continuations
Check rejection signals for quick reversal trades

For Swing Position Sizing:

Use historical touch rates to assess probability of level tests
Review range size vs average for stop placement guidance
Check timing analysis to avoid holding through low-probability windows
Use target projections for realistic profit targets

Settings Overview
Basic Settings:

Premarket session time (default 4:00-7:30 AM EST)
Signal sensitivity for breakout detection
Timezone selection for accurate time labels

Historical Analysis:

Lookback period for statistics (default 20 days, max 250)
Toggle touch tracking and markers
Enable/disable daily statistics display

Range Analysis:

Adjustable average period (default 20 days)
Large/small range threshold customization
Range percentile display toggle

Timing Analysis:

Three customizable time buckets (default: 10:00, 11:00, 12:00)
Fourth bucket automatically covers afternoon (12:00-4:00 PM)
Toggle time bucket statistics display

Visual Features:

Midpoint line display
Percentage (25%, 75%) or Fibonacci (23.6%, 38.2%, 61.8%, 78.6%) levels
Table position and size customization
Comprehensive color scheme customization (background, text, headers)

Smart Alerts:

Proximity alerts with adjustable threshold
Level rejection detection
Failed breakout detector
Time-of-day filter to avoid lunch chop

Risk Management:

Stop loss method selection (ATR, PM Range %, Fixed Points)
Adjustable ATR multiplier
Target projection display

Statistics Explained
Touch Rates:

Percentage of days where level was touched during RTH
Based only on FIRST touch per day (not multiple re-tests)
Binary metric: Yes/No for each day

Timing Stats:

All based on timestamp of FIRST touch each day
Average, Earliest, Latest provide distribution context
Time buckets show concentration of first touches

Range Metrics:

Current range compared to historical average
Percentile shows where today ranks (0-100%)
Min/Max provide extreme boundaries from history

Important Notes

First Touch Only: All statistics track only the first time a level is touched each day, not subsequent re-tests
RTH Focus: Touch tracking occurs only during regular trading hours (9:30 AM-4:00 PM EST)
Data Accumulation: Historical statistics build over time as indicator runs; requires specified lookback period to populate
Chart Timeframe: Works on any timeframe but recommended 3-5 minute charts for best premarket level precision
Memory Reset: Each new premarket session resets tracking for fresh daily analysis

Best Practices

Use 60-100 day lookback for statistical significance
Combine high touch rates (80%+) with time bucket data for highest probability setups
Small ranges (< 50% of average) often lead to expansion moves
Large ranges (> 150% of average) often consolidate or mean-revert
First 30 minutes typically contains 50%+ of all level touches
After 12:00 PM, probability of untouched levels being hit drops significantly

Performance Considerations

Optimized for real-time calculation with minimal lag
Uses efficient array management for historical data
Table updates only on bar close for performance
Maximum lookback of 250 days to prevent memory issues

This indicator is for educational and informational purposes only. It is NOT financial advice.

The buy/sell signals are algorithmic suggestions based on historical patterns and should NOT be followed blindly
Past performance and historical statistics do NOT guarantee future results
All trading involves substantial risk of loss
You are solely responsible for your own trading decisions
Always perform your own analysis and risk assessment before entering any trade
The creator of this indicator is not responsible for any trading losses incurred from its use
No representation is being made that any account will or is likely to achieve profits or losses similar to those discussed in the indicator statistics

By using this indicator, you acknowledge that you understand these risks and accept full responsibility for your trading decisions.
Sürüm Notları
Overview
Tracks premarket high/low levels with statistical analysis on touch rates during regular trading hours. Combines real-time level tracking with historical probability analysis, timing statistics, and range context for data-driven premarket trading decisions.
What Makes This Unique
Statistical Touch Tracking: Calculates historical probability of PM high/low being touched during RTH (9:30 AM - 4:00 PM EST) with adjustable lookback periods (1-250 days). Tracks "Both Levels" rate (how often both get hit same day) versus "Either Level" rate (at least one touched), plus first-touch-only methodology to avoid duplicate counting.
Timing Intelligence: Records exact timestamps of first touches to generate average touch times, earliest/latest historical touches, and distribution across four customizable time buckets throughout the trading day. Enables identification of high-probability time windows for level tests.
Range Context Analysis: Compares current PM range to historical averages with percentile ranking, min/max boundaries, and large/small range detection. Background highlighting flags unusual range days that often precede expansion or mean reversion moves.
Multi-Timeframe Compatibility: Works on stocks (SPY/QQQ with 4:00-9:30 AM premarket) and futures (ES/NQ with 18:00-9:30 AM session) with timezone-aware calculations for accurate level identification.
How It Works
Premarket Level Detection:
PM session = user-defined times (default 4:00-7:30 AM EST)
During PM session:
PM_High = highest(high)
PM_Low = lowest(low)
PM_Midpoint = (PM_High + PM_Low) / 2
PM_Range = PM_High - PM_Low
Touch Rate Calculation:
For each day in lookback period:
IF high >= PM_High during RTH THEN High_Touch = true (first touch only)
IF low <= PM_Low during RTH THEN Low_Touch = true (first touch only)

Touch_Rate_High = count(High_Touch) / lookback_days × 100
Touch_Rate_Low = count(Low_Touch) / lookback_days × 100
Both_Levels = count(High_Touch AND Low_Touch) / lookback_days × 100
Either_Level = count(High_Touch OR Low_Touch) / lookback_days × 100
Timing Statistics:
On first touch:
Store timestamp in array
Calculate minutes_since_930 = (hour - 9) × 60 + (minute - 30)

Average_Time = mean(all_touch_timestamps)
Earliest = min(all_touch_timestamps)
Latest = max(all_touch_timestamps)

Time buckets count touches in windows (customizable):
Bucket 1: 9:30 - bucket_1_end
Bucket 2: bucket_1_end - bucket_2_end
Bucket 3: bucket_2_end - bucket_3_end
Bucket 4: bucket_3_end - 4:00 PM
Range Analysis:
Current_Range = PM_High - PM_Low
Historical_Avg = mean(last_N_ranges)
Percentile = count(historical_ranges < current) / total × 100
Large_Range = current > (avg × large_threshold)
Small_Range = current < (avg × small_threshold)
Breakout Detection:
Sensitivity_Amount = PM_Range × (sensitivity% / 100)
Buy_Signal = close < (PM_Low - Sensitivity_Amount)
Sell_Signal = close > (PM_High + Sensitivity_Amount)
Rejection = high >= PM_High AND close < (PM_High - approach_threshold)
How to Use
Probability Assessment: "Either Level" percentages 80%+ indicate high likelihood at least one level gets touched. "Both Levels" rates typically 20-30%, meaning full round trips are rare. Use touch rates to assess trade probability.
Timing Windows: Review time bucket statistics - typically 50%+ of touches occur in first 30 minutes (9:30-10:00 AM). After 12:00 PM, probability of untouched levels being hit drops significantly.
Range Context: Small ranges (<50% of average) often precede expansion moves. Large ranges (>150% of average) often consolidate or mean-revert. Range percentile provides volatility expectations.
Level Interaction: Touch markers (diamonds) show exact level tests. Proximity alerts prepare for potential reactions. Rejection signals indicate failed breakout patterns.
Key Settings
Premarket Session: Default 4:00-7:30 AM EST for stocks, adjust to 18:00-9:30 AM for futures
Lookback Period (20 days): Adjustable 1-250 days. Recommend 60-100 for statistical significance.
Time Buckets: Three customizable windows (default 10:00, 11:00, 12:00) with automatic fourth bucket covering afternoon
Range Thresholds: Large range multiplier (1.5×), small range multiplier (0.5×) for unusual range detection
Visual Options: Midpoint, percentage levels (25%/75%), Fibonacci levels (23.6%/38.2%/61.8%/78.6%), table position/size
Stop Loss Methods: ATR-based, PM Range percentage, or fixed points
Why Protected Source
The statistical aggregation methodology combining first-touch-only tracking with timestamp analysis, multi-timeframe time bucket distribution algorithms, percentile-based range ranking with memory-efficient array management, and integrated proximity/rejection detection logic represent proprietary analytical methods developed for premarket range analysis.
Technical Notes
Recommended Timeframes: 3-5 minute charts for best PM level precision
Data Requirements: Requires premarket data availability for your instrument
Memory Management: Maximum 250-day lookback to prevent performance issues
Session Detection: Timezone-aware using time() function with user-specified timezone
Important Disclaimers
Not Financial Advice. Educational tool only. Does not provide trading recommendations.
Signal Interpretation. Buy/sell signals are algorithmic pattern detections, not trade recommendations. Always combine with your own analysis.
Statistical Limitations. Past touch rates don't guarantee future results. Market regime changes can invalidate historical patterns.
Sample Size. Lower lookback periods (<20 days) provide less reliable statistics. Check sample size before acting on data.
First Touch Only. All statistics track only the first touch per day to avoid statistical inflation from multiple re-tests.
Always use proper risk management and position sizing. This indicator provides statistical context, not trade signals.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.