bing_CountLibrary "Count"
method comparisonCheck(value1, op, value2)
Namespace types: series int, simple int, input int, const int
Parameters:
value1 (int)
op (string)
value2 (int)
Indicateurs et stratégies
libSchedulerTLDR: This is a lightweight, easy-to-use way to throttle sections of Pinescript v6 scripts, the same as you'd use barstate.isconfirmed or barstate.islast. You can use this for enormous efficiency gains, provided you design your script to handle updates on differing intervals rather than computing everything on each cycle. Usage is easy:
```
import showmethegrail/libScheduler/1 as libScheduler
i_tf_fetch = input.enum(libScheduler.Timeframes.C, "Fetch Interval",
tooltip="Do things just once every interval, default=once per chart timeframe.")
var scheduler = libScheduler.Scheduler.new().init()
if scheduler.every(i_tf_fetch)
// Do stuff
```
That's it. If you need to know more, the code is well-commented.
Combine this with sensible caching, and you can right-size the compute-heavy sections of your script, for better stability and managed use of Pinescript compute quotas. You'll need to know the proper use of var and varip to make the most of this, but I found this effectively replaced a lot of boilerplate in throttling my own scripts.
Sound software engineering, made Pinescript-level easy. That's all.
CVD Flow Labels for Sessions Ranges [AMT Edition]CVD Flow Labels for Session Ranges
Description:
This script provides a session-aware Cumulative Volume Delta (CVD) analysis designed to enhance the “Session Ranges ” framework by combining price extremes with detailed volume flow dynamics. Unlike generic trend or scalping indicators, this tool focuses on identifying aggressive buying and selling pressure, distinguishing between absorption (failed auctions where aggressive flows are rejected) and acceptance (confirmed continuation of flows).
How it works:
CVD Calculation: The script calculates delta for each bar using a choice of Total, Periodic, or EMA-based cumulative methods. Delta represents the net difference between estimated buying and selling volume per bar.
Normalization: By normalizing delta relative to recent volatility, it highlights extreme flows that are statistically significant, making large shifts in market sentiment easier to spot.
Session-Specific Analysis: The indicator separates Asia, London, and New York sessions to allow context-sensitive interpretation of price and volume interactions. Each session’s extremes are monitored, and flow labels are plotted relative to these extremes.
Flow Labels: Bullish and bearish absorption (“ABS”) and acceptance (“ACC WEAK/STRONG”) labels provide immediate visual cues about whether aggressive flows are being absorbed or accepted at key price levels.
Alerts: Configurable alerts trigger when absorption or acceptance occurs, supporting active trading or strategy automation.
Originality & Usefulness:
This script is original because it integrates volume-based auction theory with session-specific market structure, rather than simply showing trend or scalping signals. By combining CVD dynamics with session extreme levels from the “Session Ranges ” script, traders can:
Identify where price is likely to be accepted or rejected.
Confirm aggressive buying or selling flows before entering trades.
Time entries near session extremes with higher probability setups.
How to use:
Apply the “Session Ranges ” to see session highs, lows, and interaction lines.
Use this CVD Flow Labels script to visualize absorption and acceptance at these session levels.
Enter trades based on alignment of session extremes and flow signals:
Absorption at a session extreme may indicate a potential reversal.
Acceptance suggests continuation in the direction of the flow.
Alerts can help manage trades without constant screen monitoring.
This tool is designed to give traders a structured, session-based view of market auctions, providing actionable insights that go beyond typical trend-following or scalping methods. It emphasizes flow analysis and statistical extremes, enabling traders to make more informed decisions grounded in market microstructure.
Cosmic Volume Analyzer [JOAT]
Cosmic Volume Analyzer - Astrophysics Edition
Overview
Cosmic Volume Analyzer is an open-source oscillator indicator that applies astrophysics-inspired concepts to volume analysis. It classifies volume into buy/sell categories, calculates volume flow, detects accumulation/distribution phases, identifies climax volume events, and uses gravitational and stellar mass analogies to visualize volume dynamics.
What This Indicator Does
The indicator calculates and displays:
Volume Classification - Categorizes each bar as CLIMAX_BUY, CLIMAX_SELL, HIGH_BUY, HIGH_SELL, NORMAL_BUY, or NORMAL_SELL
Volume Flow - Percentage showing buy vs sell pressure over a lookback period
Buy/Sell Volume - Separated volume based on candle direction
Accumulation/Distribution - Phase detection using Money Flow Multiplier
Volume Oscillator - Fast vs slow volume EMA comparison
Gravitational Pull - Volume-weighted price attraction metric
Stellar Mass Index - Volume ratio combined with price momentum
Black Hole Detection - Identifies extremely low volume periods (liquidity voids)
Supernova Events - Detects extreme volume with extreme price movement
Orbital Cycles - Sine-wave based cyclical visualization
How It Works
Volume classification uses volume ratio and candle direction:
classifyVolume(series float vol, series float close, series float open) =>
float avgVol = ta.sma(vol, 20)
float volRatio = avgVol > 0 ? vol / avgVol : 1.0
if volRatio > 1.5
if close > open
classification := "CLIMAX_BUY"
else
classification := "CLIMAX_SELL"
else if volRatio > 1.2
// HIGH_BUY or HIGH_SELL
else
// NORMAL_BUY or NORMAL_SELL
Volume flow separates buy and sell volume over a period:
calculateVolumeFlow(series float vol, series float close, simple int period) =>
float currentBuyVol = close > open ? vol : 0.0
float currentSellVol = close < open ? vol : 0.0
// Accumulate in buffers
float flow = (buyVolume - sellVolume) / totalVol * 100
Accumulation/Distribution uses the Money Flow Multiplier:
float mfm = ((close - low) - (high - close)) / (high - low)
float mfv = mfm * vol
float adLine = ta.cum(mfv)
if adLine > adEMA and ta.rising(adLine, 3)
phase := "ACCUMULATION"
else if adLine < adEMA and ta.falling(adLine, 3)
phase := "DISTRIBUTION"
Gravitational pull uses volume-weighted price distance:
gravitationalPull(series float vol, series float price, simple int period) =>
float massCenter = ta.vwma(price, period)
float distance = math.abs(price - massCenter)
float mass = vol / ta.sma(vol, period)
float gravity = distance > 0 ? mass / (distance * distance) : 0.0
Signal Generation
Signals are generated based on volume conditions:
Buy Climax: Volume exceeds 2 standard deviations above average on bullish candle
Sell Climax: Volume exceeds 2 standard deviations above average on bearish candle
Strong Buy Flow: Volume flow exceeds positive threshold (default 45%)
Strong Sell Flow: Volume flow exceeds negative threshold (default -45%)
Supernova: Volume 3x average AND price change 3x average
Black Hole: Volume 2 standard deviations below average
Dashboard Panel (Top-Right)
Volume Class - Current volume classification
Volume Flow - Buy/sell flow percentage
Buy Volume - Accumulated buy volume
Sell Volume - Accumulated sell volume
A/D Phase - ACCUMULATION/DISTRIBUTION/NEUTRAL
Volume Strength - Normalized volume strength
Gravity Pull - Current gravitational metric
Stellar Mass - Current stellar mass index
Cosmic Field - Combined cosmic field strength
Black Hole - Detection status and void strength
Signal - Current actionable status
Visual Elements
Volume Ratio Columns - Colored bars showing normalized volume
Volume Flow Line - Main oscillator showing flow direction
Flow EMA - Smoothed flow for trend reference
Volume Oscillator - Area plot showing fast/slow comparison
Gravity Field - Area plot showing gravitational pull
Orbital Cycle - Circle plots showing cyclical pattern
Stellar Mass Line - Line showing mass index
Climax Markers - Fire emoji for buy climax, snowflake for sell climax
Supernova Markers - Diamond shapes for extreme events
Black Hole Markers - X-cross for liquidity voids
A/D Phase Background - Subtle background color based on phase
Input Parameters
Volume Period (default: 20) - Period for volume calculations
Distribution Levels (default: 5) - Granularity of distribution analysis
Flow Threshold (default: 1.5) - Multiplier for flow significance
Accumulation Period (default: 14) - Period for A/D calculation
Gravitational Analysis (default: true) - Enable gravity metrics
Black Hole Detection (default: true) - Enable void detection
Stellar Mass Calculation (default: true) - Enable mass index
Orbital Cycles (default: true) - Enable cyclical visualization
Supernova Detection (default: true) - Enable extreme event detection
Suggested Use Cases
Identify accumulation phases for potential long entries
Watch for distribution phases as potential exit signals
Use climax volume as potential exhaustion indicators
Monitor volume flow for directional bias
Avoid trading during black hole (low liquidity) periods
Watch for supernova events as potential trend acceleration
Timeframe Recommendations
Best on 15m to Daily charts. Volume analysis requires sufficient trading activity for meaningful readings.
Limitations
Volume data quality varies by exchange and instrument
Buy/sell separation is based on candle direction, not actual order flow
Astrophysics concepts are analogies, not literal physics
A/D phase detection may lag during rapid transitions
Open-Source and Disclaimer
This script is published as open-source under the Mozilla Public License 2.0 for educational purposes. It does not constitute financial advice. Past performance does not guarantee future results. Always use proper risk management.
- Made with passion by officialjackofalltrades
Session Anchored OIWAP [Arjo]The Session Anchored OIWAP (Open Interest Weighted Average Price) indicator shows you a weighted average price that uses Open Interest (OI) changes during different trading sessions . It divides the day into four clear sessions: Opening Hour , Morning Session , Mid-Day Session , and Closing Session .
For each session , it calculates a weighted average price using both market price and open interest data from futures . This line updates as the session progresses and resets when a new session starts .
You can also see optional deviation bands that you visually compare to how far the market price is moving away from the session’s weighted average. This indicator also helps you watch how Open Interest changes connect with price movements during specific market hours.
Concepts
This tool works on a few simple ideas:
Session anchoring
Each session starts fresh. The indicator resets and begins a new calculation when a new time block begins. This allows users to visually study each session independently.
Open-interest weighting
Instead of treating all price moves equally, price changes linked to higher open-interest activity have more influence on the OIWAP. This gives a weighted reflection of where the market has been trading during the session.
Averaging and smoothing
The OIWAP line blends many price data points into one smooth curve, making it easier to follow than raw price movement.
Volatility display with bands
The upper and lower bands are placed at ±0.5 standard deviation from the OIWAP line. These bands simply help you see when price stretches further away than usual from the session average.
Features
Four Independent Session Calculations: Shows separate OIWAP lines for Opening Hour (default: 09:15-10:15), Morning (10:15-11:30), Mid-Day (11:30-14:00), and Closing (14:00-15:30) sessions
Open Interest Weighting: Uses absolute OI change as the weight instead of traditional volume
Customizable Session Times: You can change the time ranges for each session to match your market or what you need
Optional Deviation Bands: You can turn ±0.5 standard deviation bands on or off around each OIWAP line
Color-Coded Sessions: Each session has its own color so you can tell them apart easily
Selective Display: You can turn individual sessions and bands on or off
Data Availability Check: Shows you a notification when Open Interest data isn't available for your symbol
Adjustable Position Timeframe: You can calculate OI changes on different timeframes (Chart, Daily, 15min, 30min, 60min, 120min)
How to use
Add this indicator to a chart of any symbol that has Open Interest data ( from futures or derivatives contracts). Once you add it, you'll see colored lines showing the OIWAP for each session you enable, along with optional deviation bands.
Adjusting Settings:
Turn individual sessions on or off using the checkboxes in the " Sessions " section
Change session colors to match your chart or what looks good to you
Turn deviation bands on or off using the " Show Bands " option in the Display settings
Change session time ranges in the " Session Times " section to match your market hours or what you want to analyze
Change the Position Timeframe if you want to see OI changes calculated on a different time period
Visual Interpretation:
Each OIWAP line shows you the OI-weighted average price for that session
The deviation bands show you how much prices spread out, weighted by OI changes
You can watch how price interacts with these levels to see where significant OI activity happened
Different sessions may show different OIWAP levels, showing you how the OI-price relationship changes throughout the trading day
Note:
This indicator needs Open Interest data to work. If OI data isn't available for your symbol, you'll see a message in the center of your chart. This indicator works only with derivatives markets like futures and options in the Indian Market where OI data is publicly available.
Conclusion
The Session Anchored OIWAP indicator is designed to support structured market observation by combining price, open interest, and session anchoring into a clear visual format. It helps users study market behavior during different parts of the day without generating trading instructions or outcomes.
Disclaimer
This indicator is for educational and visual-analysis purposes only. It does not provide trading signals , financial advice, or guaranteed outcomes . You should perform your own research and consult a licensed financial professional when needed. All trading decisions are solely the responsibility of the user.
Happy Trading
Zero Lag Moving Average Convergence Divergence (ZLMACD) [EVAI]Zero Lag Moving Average Convergence Divergence (ZLMACD)
ZLMACD is a MACD-style momentum oscillator that keeps the standard MACD structure while adding a practical “zero-lag” option through ZLEMA. It is intended for traders who like the familiar MACD workflow but want an oscillator that can respond earlier during transitions without turning into an overly noisy trigger.
The indicator plots the MACD line, the signal line, and the histogram around a zero baseline. If you already understand MACD, you already understand how to read this. The difference is that you can choose whether the oscillator and signal are driven by EMA, SMA, or ZLEMA, which changes the responsiveness and smoothness of the indicator.
Default behavior
This script defaults to the preset mode “ZLEMA osc + EMA signal.” In this configuration, the fast and slow oscillator averages are computed using ZLEMA, while the signal line remains an EMA of the MACD line. The reason for this mix is simple: ZLEMA tends to reduce lag in the oscillator, while EMA on the signal line helps keep crossovers readable and avoids excessive micro-signals.
In practice, this default preset often behaves like a “faster MACD” that still feels like MACD. It can highlight momentum turns earlier than a traditional EMA MACD while keeping the signal line stable enough to use for timing and confirmation.
Custom mode and MA selection
If you switch Mode to “Custom,” the indicator will use your selected moving average types for both the oscillator and the signal line. In Custom mode, the oscillator type applies to both fast and slow averages, and the signal type applies to the smoothing of the MACD line.
If you are in the default preset mode, the custom MA dropdowns will not change the calculations. This is intentional: the preset locks the MA types so the default behavior remains consistent and reproducible across charts and users.
Reading the indicator
The histogram reflects the distance between the MACD line and the signal line. When the histogram is above zero, the MACD line is above the signal line and momentum is biased upward; when it is below zero, the MACD line is below the signal line and momentum is biased downward. Changes in histogram height help visualize strengthening versus weakening momentum, while the zero baseline provides regime context by indicating whether the fast average is above or below the slow average.
Crossovers between MACD and signal behave exactly as they do in standard MACD, but the timing and “feel” will vary depending on the MA choices. ZLEMA on the oscillator typically makes turns appear earlier; SMA typically smooths more but can be slower; EMA tends to be the balanced baseline.
Alerts
Two alert conditions are included to detect histogram polarity shifts. One triggers when the histogram switches from non-negative to negative, and the other triggers when it switches from non-positive to positive. These are useful if you want simple notifications for momentum regime flips without staring at the chart continuously.
Notes
This indicator is provided for informational and educational purposes only and is not financial advice. Always test settings per instrument and timeframe and use risk management.
Power Hour Trendlines [LuxAlgo]The Power Hour Trendlines indicator is based on Power Hours detection, and includes up to three displayed trendlines derived from the closing prices of all the bars within the last user-selected Power Hours.
Users can edit the time of Power Hours, choose how many sessions to take into account, enable or disable any trendlines, and change their colors.
🔶 USAGE
The Power Hour is defined as the last hour of the trading session and is set by default from 3:00 p.m. to 4:00 p.m. New York time. During this period, volume and volatility enter the market. Traders using higher timeframes may use this period to enter or exit positions by placing MOC (Market on Close) orders.
This tool works under the hypothesis that prices made during power hours (periods with high trading activity) are more relevant when used for the construction of trendlines.
An initial trendline is fit using linear regression; prices from power hours located above this initial fit are used for the upper trendline, while the ones below the fit are used for the lower one.
As with any trendline, traders can analyze the slope to determine the market's direction:
Positive slope: The market is trending up.
Negative slope: The market is trending down.
No slope: The market is trending sideways.
As we can see in the image, Nasdaq and Bitcoin are clearly in downtrends, gold is clearly in an uptrend, and the euro/U.S. dollar is in a sideways market over the last visible sessions.
As you can see, the trend lines may or may not be parallel to each other. The wider the area, the more volatile the data. The narrower the area, the less volatile the data. Let's look at an example.
In the image, the Dow30 and the euro/U.S. dollar have opposite behaviors. The volatility above the middle trendline is growing in the first case but shrinking in the second. In both cases, the volatility in the bottom area seems steady, so there are no big surprises there.
Traders can adjust the number of sessions for calculations, making the tool ideal for analyzing price behavior over different time frames.
As the image shows, we can clearly see how the market behaves over different time periods. XLY has been moving down over the last 10, 20, and 40 sessions, with a steeper decline over shorter periods. However, it has been moving sideways over the last 70 sessions.
One of the main uses of trendlines is to provide key support and resistance. In the image, SPY is shown with trendlines over the last 20 sessions. These lines provide excellent reference points for trading and observing price behavior in those areas, such as whether prices are accepted or rejected, which may trigger a response from other traders.
🔹 Not Allowed Timeframes
For obvious reasons, timeframes larger than 1H are not allowed. The Power Hour is defined as the last hour of the trading session. The tool will display a warning message if the timeframe is longer than 60 minutes.
🔶 SETTINGS
Power Hour (NY Time): Choose a custom Power Hour in New York time
Sessions Memory: Select how many Power Hours to take into account for calculations.
🔹 Style
Top: Enable or disable the top line and choose the line and background colors.
Middle: Enable or disable the middle line and choose the line color.
Bottom: Enable or disable the bottom line and choose the line and background colors.
Background: Enable or disable the background color for top and bottom lines.
FX Rate Bias US vs EU 2YFX Rate Bias – US vs EU (2Y)
This indicator provides a macro bias framework for FX markets by tracking the 2-year government bond yield differential between the United States and Germany.
Rather than displaying the spread as a raw calculation, the script translates interest-rate expectations into a clear directional bias, helping traders understand which currency currently holds a rate advantage.
The 2Y segment of the yield curve is highly sensitive to:
Central bank expectations
Forward guidance
Shifts in short-term monetary policy outlook
How to use
Positive spread → USD rate advantage
Negative spread → EUR rate advantage
Designed to be used as a contextual macro tool, this indicator helps align technical setups with broader monetary conditions.
It is not intended as a standalone entry or signal generator.
CME Gap Tracker [captainua]CME Gap Tracker - Advanced Gap Detection & Tracking System
Overview
This indicator provides comprehensive gap detection and tracking capabilities for both consecutive bar gaps and weekly CME trading session gaps. It automatically detects gaps, tracks their fill progress in real-time, provides detailed statistics, and includes backtesting features to validate gap trading strategies. The script is optimized for CME futures trading but works with any instrument, automatically handling ticker conversion between CME futures and spot markets.
Gap Detection Types
Consecutive Bar Gaps:
Detects gaps between any two consecutive bars on the current timeframe. Two detection modes are available:
- High/Low Mode: Detects gaps when current bar's low > previous bar's high (gap up) or current bar's high < previous bar's low (gap down). This is more sensitive and detects more gaps.
- Close/Open Mode: Detects gaps when current bar's open > previous bar's close (gap up) or current bar's open < previous bar's close (gap down). This is more conservative.
Weekly CME Gaps:
Detects gaps between weekly trading sessions, specifically designed for CME futures markets. The script automatically detects the first bar of each new week and compares the current week's open with the previous week's close/high/low. This is particularly useful for tracking weekend gaps in CME futures markets where price can gap significantly between Friday close and Monday open.
Smart Ticker Detection
The script automatically converts between CME futures tickers (e.g., BTC1!, ETH1!) and spot tickers (e.g., BTCUSDT, ETHUSDT). When viewing a CME futures chart, it can automatically detect and use the corresponding spot ticker for gap analysis, and vice versa. This allows traders to:
- View CME futures but track spot market gaps
- View spot markets but track CME futures gaps
- Manually override with custom ticker specification
The ticker validation system uses caching to prevent race conditions during initial script load, ensuring reliable ticker resolution.
Gap Filtering & Tolerance
Static Tolerance:
Set minimum and maximum gap sizes as percentages (default: show only gaps > 0.333% and < 100%). This filters out noise and focuses on significant gaps.
Dynamic Tolerance:
When enabled, tolerance is calculated dynamically based on ATR (Average True Range). The formula: Dynamic Tolerance = (ATR × ATR Multiplier / Close Price) × 100%. This adapts to market volatility - in volatile markets, only larger gaps are shown; in calm markets, smaller gaps are displayed. This is particularly useful for instruments with varying volatility.
Absolute Size Filtering:
In addition to percentage filtering, gaps can be filtered by absolute price size (e.g., show only gaps > $100). This is useful for instruments where percentage alone doesn't capture significance (e.g., high-priced stocks).
Fill Confirmation System
To reduce false gap closure signals, the script requires multiple consecutive bars to confirm gap closure. The default is 2 bars, but can be adjusted from 1-10 bars. Lower values (1) confirm faster but may produce false signals from temporary wicks. Higher values (3-5) reduce false fill signals but delay confirmation. This prevents temporary price spikes from triggering false gap closure alerts.
Gap Fill Tracking
The script tracks gap fill progress in real-time:
- Fill Percentage: How much of the gap has been filled (0-100%)
- Fill Speed: Whether fill is accelerating, decelerating, or constant
- Time to Fill: For closed gaps, how many bars it took to fill
- Fill Status: Unfilled, partially filled, or fully filled
Visual Features
Heatmap Colors:
Gap colors can be adjusted based on gap size, with larger gaps appearing more intense and smaller gaps more faded.
Adaptive Line Width:
Line thickness automatically adjusts based on gap size, making larger gaps more prominent.
Age-Based Coloring:
Gaps can be color-coded by age, with newer gaps appearing brighter and older gaps more faded.
Confluence Zones:
Areas where multiple gaps overlap are highlighted with enhanced visuals, indicating stronger support/resistance zones.
Gap Statistics
A comprehensive statistics table provides:
- Total gaps created, open, and closed
- Fill rates by direction (up vs down) and size category (small, medium, large)
- Average fill time, fastest fill, slowest fill
- Oldest gap and oldest unfilled gap
- Backtesting results: success rate, reversal rate, average move after fill
- CME gap expiration statistics: Gaps expired unfilled (for Weekly CME gaps only)
Statistics can be filtered by period (All Time, Last 100/500/1000/5000 bars) and can be reset via toggle button.
Backtesting
When enabled, the script tracks price movement after gap fills:
- Price after fill: Captures price when gap closes
- Move after fill: Percentage price movement after closure
- Success/Reversal tracking: Determines if price continued in fill direction or reversed
- Success rate: Percentage of gaps where price continued in fill direction
This data helps validate gap trading strategies and understand gap fill behavior.
Gap Re-opening Detection
When enabled, the script detects when a previously filled gap reopens (price gaps back through the filled gap zone). This is useful for identifying when support/resistance levels break and can signal trend reversals.
CME-Specific Features
Monday Opening Volume Analysis:
For Weekly CME gaps detected on Monday openings, the script tracks Monday opening volume relative to average volume. Higher Monday volume ratios indicate stronger gap significance. This ratio is integrated into gap strength calculations and can be displayed in gap labels. Gaps with Monday volume > 1.5x average receive priority score boosts.
CME Gap Expiration Tracking:
Weekly CME gaps that remain unfilled beyond a configurable threshold (default 1000 bars) are automatically marked as "expired" and tracked separately in statistics. This helps identify gaps that act as strong support/resistance levels and never fill. Expired gaps are displayed with special labeling and counted in the "Gaps Expired (CME)" statistic.
CME Gap Priority Scoring Enhancement:
The priority scoring system includes special boosts for CME gaps:
- Monday gaps: +10 points (gaps detected on Monday openings)
- High Monday volume gaps: +15 points (Monday volume ratio > 1.5x average)
- Gaps at key weekly levels: +10 points (gaps aligning with previous week's high, low, or close within 0.5% tolerance)
These enhancements help prioritize the most significant CME gaps for trading decisions.
Custom Gap Zones
Traders can manually mark custom gap zones by specifying top and bottom levels. These zones are tracked like automatically detected gaps, allowing traders to:
- Mark historical gaps that weren't detected
- Create support/resistance zones based on other analysis
- Track specific price levels of interest
Multi-Timeframe Support
The script can detect gaps on higher timeframes simultaneously. For example, when viewing a 1-hour chart, it can also detect and display gaps from the weekly timeframe. This provides multi-timeframe context for gap analysis.
Alert System
Comprehensive alert system with multiple trigger types:
- Gap Creation: Alert when new gaps are detected
- Gap Closure: Alert when gaps are fully filled
- Partial Fill: Alert when gaps reach specific fill percentages (e.g., 25%, 50%, 75%, 90%)
- Approaching Closure: Alert when gaps reach high fill levels (e.g., 90%, 95%) before closing
- Gap Re-opening: Alert when previously filled gaps reopen
Alerts can be filtered to trigger only on Mondays (useful for CME weekly gaps) or any day.
Filtering Options
Gaps can be filtered by:
- Fill Status: Show all, unfilled only, partially filled only, or fully filled only
- Fill Percentage Range: Show gaps within specific fill percentage ranges
- Gap Age: Show only gaps within specific age ranges (bars)
- Gap Expiration: Automatically remove gaps older than specified number of bars (for Weekly CME gaps, uses separate CME expiration threshold)
Performance & Safety
The script includes several safety features:
- Safe array operations to prevent index out-of-bounds errors
- Memory leak prevention through proper visual object cleanup
- Ticker validation caching to prevent race conditions
- Week boundary detection for accurate CME gap identification
- Fill confirmation system to reduce false signals
- Monday opening volume analysis for CME gap strength assessment
- CME gap expiration tracking with configurable thresholds
- Priority scoring enhancement for Monday gaps, high Monday volume, and key weekly levels
Usage Recommendations
For CME Weekly Gaps:
1. Set "Gap Detection Type" to "Weekly CME"
2. View a CME futures chart (e.g., BTC1!) or enable auto-detect spot ticker
3. Set tolerance to filter gap size (default 0.333%)
4. Enable statistics to track fill rates
5. Configure alerts for gap creation/closure
For Consecutive Bar Gaps:
1. Set "Gap Detection Type" to "Consecutive Bars"
2. Choose "High/Low" for more gaps or "Close/Open" for fewer gaps
3. Adjust tolerance based on instrument volatility
4. Enable fill confirmation (2-3 bars) for more reliable signals
5. Use filtering to focus on specific gap types
For Gap Trading Strategies:
1. Enable backtesting to validate strategy performance
2. Review statistics to understand gap fill patterns
3. Use confluence zones to identify strong support/resistance
4. Configure alerts for gap events matching your strategy
5. Use custom zones to mark important levels
Technical Details:
• Pine Script v6 | Overlay indicator
• Safe array operations with index validation
• Memory leak prevention through proper object cleanup
• Ticker validation caching for reliable ticker resolution
• Works on all timeframes and instruments
• Comprehensive edge case handling
• Week boundary detection using ta.change(weekofyear)
• Fill confirmation system with configurable bars
For detailed documentation and usage instructions, see the script comments.
Gammastrike Greek Neutrals by WWfor Gammastrike users:
Fill the SPX or SPXW fields with the four neutrals from the dashboard page separated by commas and no spaces:
xxxx,xxxx,xxxx,xxxx
up to two decimal places and/or a mix of whole numbers, one or two decimal places are supported:
xxxx.x,xxxx.x,xxxx.x,xxxx.x
xxxx.xx,xxxx.xx,xxxx.xx,xxxx.xx
xxxx.x,xxxx,xxxx.xx,xxxx
Explore other settings to tailor to your liking.
Enjoy!
[PickMyTrade] Trend strategy for LongThis strategy detects descending trend resistance using pivot-based trendlines and enters long positions when price confirms a breakout above a validated trendline. It is designed to capture bullish trend reversals with strict risk control and flexible exit management.
The system focuses on structural market behavior rather than indicators, making it suitable for traders who prefer price-action-based decision making.
USAGE
This strategy automatically builds trendlines from confirmed pivot highs. A trendline is considered valid only when price has interacted with it a user-defined number of times, ensuring that trades are taken only from well-formed market structures.
A trade is triggered when price closes above a validated descending trendline while optional session and position limits are respected.
All risk and position sizing are calculated automatically based on the selected risk amount and stop-loss distance.
HOW IT WORKS
The strategy identifies swing highs using pivot logic and connects them into descending trendlines. Each trendline must meet a minimum number of touch confirmations before becoming eligible for trading.
When price closes above a valid trendline, the strategy calculates:
Stop-loss placement below the most recent pivot low
Position size based on fixed monetary risk
Profit targets based on the selected exit method
EXIT METHODS
Three exit models are supported:
Risk–Reward Ratio
Uses a fixed multiple of the defined risk distance to set the take-profit level.
Lookback Candle Exit
Exits trades when price shows structural reversal behavior based on recent candles.
Fibonacci Targets
Uses Fibonacci extensions derived from recent swing structure to trail profits dynamically.
An optional trailing stop can also be enabled to protect open profits.
FEATURES
Automatic pivot-based trendline detection
Multi-trendline or single-trendline operation
Dynamic position sizing based on monetary risk
Pivot-based stop-loss placement
Multiple exit methodologies
Optional trailing stop
Optional trading session filter
Fully visualized trendlines, stop levels, and profit targets
SETTINGS
Trend Detection
Pivot Length for Trend
Touch Number
Validation Percentage
Optional Pivot-to-Pivot Confirmation
Risk Management
Fixed Risk Amount
Default Contract Size Option
Stop-Loss Buffer
Trailing Stop Toggle
Take-Profit
Exit Method Selection
Risk-Reward Ratio
Lookback Candle Length
Fibonacci Extension Levels
Session Filter
Enable/Disable Session Trading
Trading Session Time Window
Supertrend BUY Only - Optimized for Gold M15 TimeframeOverview
The Supertrend BUY Only - Production Optimized is a high-performance trend-following indicator specifically tuned for XAUUSD (Gold) on the 15-minute timeframe. Unlike standard Supertrend scripts, this version focuses exclusively on bullish cycles to align with long-term upward bias and uses parameters discovered through deep data analysis of over 20,000 bars of historical market data.
Key Features
Data-Optimized Parameters: Defaults are set to ATR Period 7 and Multiplier 2.1, which backtesting has shown to provide a superior balance between sensitivity and noise reduction for Gold.
Production-Ready Alerts: Includes built-in alertcondition triggers for both BUY (Trend Flip) and STOP BUY (Trend Exit), complete with dynamic messages that include price and interval.
Trailing Support Band: Uses a trailing logic that locks in support levels during upward moves, preventing the band from dropping until the trend officially reverses.
Clean Visuals: Focuses on chart clarity by only plotting the support line during active uptrends and utilizing clean shape labels for entries and exits.
How to Use
Entry (BUY): When the Supertrend line flips from Red to Green and a "BUY" label appears. This indicates bullish momentum has overcome recent volatility.
Exit (STOP BUY): When the price closes below the Green support line. The indicator will plot a red "X" and clear the green background.
Setting Alerts: * Click the Alerts icon in TradingView.
Select this indicator under "Condition."
Choose "BUY Signal" for entries and "STOP BUY / EXIT" for managing your trade or taking profit.
Technical Details
The script allows users to toggle between the TradingView (RMA) ATR calculation and the Standard (SMA) method. For production and live trading, the RMA method is recommended as it provides a smoother response to volatility spikes common in the Gold market.
Ultimate 20x MA Hub [MTF/SMA/EMA]Ultimate 20x MA Hub
This is an all-in-one Moving Average aggregator designed to overcome the indicator limit and keep your chart clean. It allows you to plot up to 20 different Moving Averages within a single indicator instance, with full Multi-Timeframe (MTF) support.
Key Features:
20 Lines in 1 Script: Manage all your MAs in one place.
Multi-Timeframe (MTF): Each line can have its own independent timeframe. For example, you can view a Daily 200 SMA while trading on a 15-minute chart.
SMA & EMA Support: Freely switch between Simple and Exponential Moving Averages for each line.
No Repainting: The MTF logic uses barmerge.gaps_on to ensure historical data does not repaint, providing a realistic backtest view.
Custom Styling: Supports different line widths and styles (e.g., dotted lines (circles) for specific MAs).
Default Configuration (Trend Setup):
MA 1: Daily (1D) 30 SMA — Blue Line (Short-term daily trend)
MA 2: Weekly (1W) 50 SMA — White Dotted Line (Medium-term weekly support/resistance)
MA 3: Weekly (1W) 200 SMA — Red Thick Line (Major long-term bull/bear divider)
MA 4 to MA 20 are disabled by default but can be enabled in the settings.
How to use: Go to the indicator settings to enable more lines, change periods, or select different timeframes (e.g., "D" for Daily, "W" for Weekly).
Planetary Retrograde Periods█ PLANETARY RETROGRADE PERIODS
Visualize when planets appear to move backward through the zodiac. This indicator detects and displays retrograde motion for all 8 planets that exhibit apparent retrograde motion from Earth's perspective: Mercury, Venus, Mars, Jupiter, Saturn, Uranus, Neptune, and Pluto.
Powered by the BlueprintResearch lib_ephemeris library.
█ FEATURES
• 8 Planets Supported — Mercury, Venus, Mars, Jupiter, Saturn, Uranus, Neptune, and Pluto
• Two-Phase Visualization — Distinguishes first half (speed increasing in retrograde direction) from second half (speed decreasing toward direct motion) with different transparency levels
• Future Projections — Projects upcoming retrograde periods up to 500 bars ahead on any timeframe
• Station Markers — Clear labels for Station Retrograde (℞), Midpoint (½), and Station Direct (D)
• Timezone-Aware Labels — Future date/time labels display in your selected timezone
• Alert Conditions — Set alerts for station retrograde, station direct, or any station point
• Per-Planet Colors — Customize colors for each planet individually
• Speed-Based Detection — More accurate than longitude-based methods
█ HOW TO USE
1. Select a Planet — Choose which planet to track from the dropdown (Mercury through Pluto)
2. Enable Two-Phase Display — Toggle "Show Retrograde Halves" to see first half vs. second half shading
3. Configure Future Projections — Set how many bars ahead to scan (1-500) and enable/disable date labels
4. Set Your Timezone — Choose your timezone for accurate future date/time display
5. Customize Colors — Adjust planet colors, transparency levels, and label text color to match your chart theme
6. Create Alerts — Use TradingView's alert system with the built-in conditions for station points
█ UNDERSTANDING THE DISPLAY
Background Colors:
• First Half of the Planet’s retrograde (lighter shade)
• Second Half of the Planet’s retrograde period (darker shade)
Future Projection Lines:
• ℞ (Station Retrograde) — Yellow dotted line marking when the planet will station retrograde
• ½ (Midpoint) — Shorter line in planet color marking the halfway point of the retrograde period
• D (Station Direct) — Green dotted line marking when the planet will station direct
Labels:
• Top label shows planet symbol and station type
• Bottom label shows projected date and time (optional)
█ ACCURACY
This indicator uses speed-based detection
Timing Accuracy:
• All planets (Mercury through Pluto): Within hours to ±1 day
• Future projections maintain accuracy up to 500 bars on any timeframe
• Spot tested on Daily and Weekly charts with excellent results
For Critical Applications:
Cross-reference with professional ephemeris tools such as JPL Horizons or Swiss Ephemeris for mission-critical timing.
█ TECHNICAL DETAILS
Theory: VSOP87 (Mercury through Neptune), Meeus algorithms (Pluto)
█ REFERENCES
• Meeus, Jean. "Astronomical Algorithms" (2nd Edition, 1998)
• Bretagnon & Francou. "VSOP87 Solutions" — Astronomy and Astrophysics 202 (1988)
ADR%, LoD Price, RS RatingGet the Values of ADR%, LoD Price, RS Rating on Daily Charts.
For RS Ratings, Benchmark Symbol and look back period need to be adjusted manually as per your requirement.
MADZ - Moving Average Deviation Z-ScoreMADZ - Moving Average Deviation Z-Score
MADZ is a powerful valuation oscillator that measures how far the current price has deviated from a user-selected moving average, expressed in statistical terms as a Z-Score. This normalization makes it easier to identify overvalued and undervalued conditions across different assets, timeframes, and market environments.
Overview
The indicator works by:
Calculating the percentage deviation of price from a customizable moving average (SMA, EMA, WMA, VWMA, HMA, or RMA).
Applying a Z-Score transformation to this deviation over a chosen lookback period — showing how many standard deviations the current deviation is from its historical average. Smoothing the result for a clean, responsive oscillator centered around zero.
Positive values indicate price is trading above the moving average (potentially overvalued), while negative values suggest price is below (potentially undervalued). The further from zero, the greater the relative valuation extreme.
Key Features
Customizable base moving average (type and length)
Z-Score normalization for statistically meaningful readings
Final smoothing for reduced noise
Static overbought/oversold levels (default ±1.5) — line changes color when crossed (red above, green below)
Dynamic extreme bands (±3σ) — optional display of bands calculated from the oscillator’s own volatility over a user-defined period
Extreme zone highlighting — background shading activates only during truly rare valuation events
Extreme Zone Highlighting Explained
The highlighted extreme zones (background shading) are not based on the fixed static levels. Instead, they signal statistically significant outliers using dynamic bands:
Overbought extreme zone (red background): Triggered when MADZ rises above the upper dynamic band (+3 standard deviations of the MADZ line itself over the dynamic length period).
Oversold extreme zone (green background): Triggered when MADZ falls below the lower dynamic band (-3 standard deviations).
These ±3σ bands adapt to the recent behavior of the oscillator. Because they represent three standard deviations from the mean of MADZ, crossings are rare and often precede major reversals or trend accelerations — making them valuable for spotting potential turning points in valuation extremes.
How to Use
Use zero-line crosses for trend changes or mean-reversion setups.
Watch static level crossings (±1.5 default) for early overbought/oversold warnings.
Pay special attention to extreme zone shading — these highlight high-conviction valuation dislocations that may offer superior risk/reward opportunities.
Designed on the BTC chart, but can be used on other assets.
Settings
Moving Average Settings: Type, length, source
Z-Score & Smoothing: Lookback period and smoothing length
Threshold Levels: Static overbought/oversold thresholds
Display Options: Toggle dynamic bands and extreme background highlighting
This is an educational tool designed to aid in valuation analysis. The information provided is not financial advice. Always conduct your own research and consider multiple factors before making trading decisions. Trade at your own risk.
SMA Crossover (20 & 200)I use this simple strategy consisting on 20 and 200 SMA crossover to indicate a shift in direction of price depending on the overall trend , i hope you guys can test it and maybe also improve it. thank you.
Fibonacci Level-2 + Level-3 StrategyFibonacci Level-2 + Level-3 Strategy - Complete Guide
Winner from 1-Year Backtest: +5.09% Total PnL
📊 Strategy Overview
This is a SHORT-only Fibonacci projection breakdown strategy that combines two entry levels for optimal trade frequency and profitability.
Core Concept
Detect swing highs and lows
Calculate Fibonacci projections (0.618, fibb2, 1.272 extension)
Enter SHORT when price breaks key levels
Target the 1.272 Fibonacci extension
Use strict trend, volume, and delta filters
🎯 Entry Rules
Level-2 Entry (62% of trades)
Trigger: Price breaks below fibb2 (second Fibonacci projection)
Target: 1.272 extension
Win Rate: 51.0%
Avg Win: +2.13%
Contribution: +5.39% PnL
Level-3 Entry (38% of trades)
Trigger: Price breaks below swing low
Target: 1.272 extension
Win Rate: 74.2%
Avg Win: +0.44%
Contribution: -0.30% PnL
Stop Loss
Fixed: 2% above entry price
Hit rate: 36.6% of trades
🔍 Filters (Must Pass All)
Trend Filter: EMA50 < EMA200 (bearish trend required)
Volume Filter: Current volume > 1.0x 20-period average
Delta Filter: Swing delta < 30% bullish (not too much buy pressure)
📈 1-Year Backtest Results
Period: Dec 31, 2024 - Dec 31, 2025 (364 days) Data: BTC/USDT 15-minute candles from Binance
Overall Performance
Total Trades: 82 (6.8 per month)
Win Rate: 59.8%
Total PnL: +5.09%
Profit Factor: 1.08
Avg Win: +1.34%
Avg Loss: -1.83%
Largest Win: +6.33%
Largest Loss: -2.00%
Avg Trade Duration: 21.3 hours (0.9 days)
Monthly Breakdown
Month Trades L2 L3 Win% PnL Best Trade
Jan 2025 3 1 2 66.7% -1.43% +0.57%
Feb 2025 7 4 3 57.1% +6.21% ✅ +4.74%
Mar 2025 9 4 5 66.7% +7.47% ✅ +6.33%
Apr 2025 8 6 2 25.0% -10.20% ❌ +1.53%
May 2025 4 3 1 25.0% -5.54% ❌ +0.46%
Jun 2025 7 4 3 42.9% -3.41% +1.34%
Jul 2025 7 2 5 71.4% -1.08% +1.22%
Aug 2025 8 5 3 75.0% +1.31% +1.70%
Sep 2025 5 3 2 80.0% +0.63% +1.42%
Oct 2025 7 6 1 85.7% +7.48% ✅ +2.77%
Nov 2025 9 7 2 77.8% +10.60% ✅✅ +4.38%
Dec 2025 8 6 2 37.5% -6.95% ❌ +1.30%
Profitable Months: 6/12 (50%) Best Month: November (+10.60%) Worst Month: April (-10.20%)
🎲 Expected Performance
Conservative (50th Percentile)
Monthly trades: 6-7
Monthly PnL: +0.5% to +2%
Annual return: ~20-30%
Aggressive (75th Percentile - Good Months)
Monthly trades: 8-9
Monthly PnL: +5% to +10%
Annual return: ~80-200%
Reality Check
Expect 6 profitable and 6 unprofitable months
Worst months can be -10%
Best months can be +10%
Net annual: +5-15% with proper risk management
📋 Implementation Checklist
Setup
Use BTC/USDT on 15-minute timeframe
Set up swing detection (100-period rolling high/low)
Calculate EMAs (50 and 200)
Track volume MA (20-period)
Monitor taker buy/sell volume for delta
Entry Signals
Identify swing high and swing low
Calculate Fibonacci levels (0.618, fibb2, 1.272)
Watch for Level-2 breakdown (price < fibb2)
Watch for Level-3 breakdown (price < swing low)
Validate ALL filters before entry
Position Management
Enter SHORT at current price
Set stop loss at entry + 2%
Set take profit at 1.272 extension
Monitor position continuously
Close at TP, SL, or manually if needed
💰 Risk Management
Position Sizing
Account Size: $10,000
Risk per trade: 2% = $200
Entry: $90,000
Stop Loss: 2% = $91,800
Position Size: $200 / ($1,800 / $90,000) = $10,000
With 10x leverage: Use $1,000 margin
Rules
Never risk more than 2% per trade
Daily loss limit: -4% (stop trading for the day)
Weekly loss limit: -10% (review strategy)
Maximum 3 open positions at once
📊 Trade Log Template
Track every trade:
Date & Time
Level (Level-2 or Level-3)
Entry Price
Stop Loss Price
Target Price
Swing Range %
Filters Passed (trend, volume, delta)
Exit Price
PnL %
Exit Reason
Notes
🚀 Going Live
Week 1-2: Paper Trading
Set up alerts on TradingView
Track all signals
Don't take real trades
Verify strategy logic
Target: 6-8 paper trades
Week 3-4: Live (Small Size)
Start with $500-1000 positions
Risk only 1% per trade (not 2%)
Take 5-8 trades
Compare actual vs backtest
Month 2+: Scale Up
If win rate >55% and monthly PnL >0%:
Increase to 2% risk per trade
Use full position sizes
If win rate <50%:
Stay at 1% risk
Review and refine
📁 Files
Production Script
File: fibonacci_level2_level3_strategy.py
Run backtest:
python3 fibonacci_level2_level3_strategy.py
Output:
Comprehensive performance report
Monthly breakdown
Level-by-level analysis
Trade log CSV file
Trade Log
Latest: fibonacci_level2_level3_20251231_114019.csv
Contains all 82 trades with:
Entry/exit times and prices
PnL percentages
Level names (Level-2 or Level-3)
Swing characteristics
Exit reasons
Filter validations
🎯 Key Success Factors
What Makes This Work
Level-2 provides the profit (+5.39% contribution)
Decent win rate (51%)
Good avg wins (+2.13%)
Most trades come from Level-2
Level-3 adds volume (31 trades, 74% WR)
High win rate but small wins
Provides trading opportunities
Diversifies entry points
Combo smooths performance
6.8 trades/month (manageable)
Mix of consistent (L2) and high-WR (L3)
Better than either alone
What Can Go Wrong
Bad months happen (50% of months unprofitable)
April: -10.20%
May: -5.54%
Don't overtrade to recover
Small wins on Level-3
Avg +0.44% doesn't move the needle
Need Level-2 for profitability
Stop losses hit frequently (36.6%)
2% SL hits often
Must accept losses as part of strategy
🔬 Advanced Optimizations
Potential Improvements (Not Tested)
Add session filters
Only trade London (9AM-12PM Thailand)
Only trade NY AM (4:30PM-6PM Thailand)
May improve win rate
Add RSI filter
Only short when RSI < 40
Avoid shorting oversold conditions
Dynamic stop loss
Use ATR-based stops
May reduce SL hit rate
Partial exits
Close 50% at 1% profit
Let 50% run to target
Locks in some profit
⚠️ Test any changes thoroughly before going live!
📞 Support
Questions or issues? Review:
The backtest code in fibonacci_level2_level3_strategy.py
Trade logs in CSV files
Monthly breakdown for pattern analysis
✅ Final Checklist Before Live Trading
Understand both Level-2 and Level-3 entry logic
Can calculate Fibonacci levels manually
Verified all filters (trend, volume, delta)
Practiced paper trading for 2 weeks
Set up proper position sizing (2% risk max)
Defined daily/weekly loss limits
Ready to accept losses as part of trading
Won't revenge trade after losses
Will track every trade in journal
Strategy Proven: +5.09% on 1 year real data (82 trades) Ready to Trade: Yes, with proper risk management Recommended Capital: Minimum $5,000 Time Commitment: Check charts 2-3x per day
Good luck! 🚀
4Nov_2BarDC+3of4MA Trend +NeutralAlertsThis indicator is a **trend-context and early-reversal tool** built using **Donchian Channel structure**, **multi-EMA momentum**, and **MACD neutrality detection**.
It helps identify **trend starts, counter-trend pressure, and compression zones** with **non-repainting, bar-close confirmed logic**.
### Key Features
* **Donchian Channel (20)** with dynamic coloring
* 🟢 Bullish pressure
* 🟧 Bearish pressure
* ⚪ Neutral / balance state
* **Early reversal detection** using bars-since-DC-change logic
* **Multi-EMA framework**: 5 / 9 / 30 / 187 with smoothed validation
* **EMA-187 trend filter** for higher-timeframe bias
* **Hidden MACD engine** to detect low-momentum and compression zones
* **Directional triangle markers** for trend starts and counter moves
* **Neutral gray signals** to highlight balance and transition phases
* **Automatic recent high/low reference levels**
Notes
This is not a buy/sell system by itself.
Best used as a context + confirmation tool alongside price action and risk management.
All logic is bar-close confirmed to avoid repainting.
### Alerts
All alerts trigger **once per confirmed bar**:
* Bullish / Bearish reversals
* Bull Start / Bear Start
* Neutral Up / Down
* Neutral Compression Zone
### Usage Notes
* Designed for **intraday and swing trading**
* Works best as a **context + confirmation indicator**
* Not a standalone buy/sell system — combine with price action and risk management
---
If you want, I can also create:
* an **ultra-short 8–10 line version**
* or a **“How to read signals” cheat sheet** for the public page
FIBOtomgoodcar v1Fibonacci Levels, Code Names, Usage Strategies, Colors
78.6% (fib_786_buy) 💰 Buy Trap (78.6%) A very important entry point (Buy Trap). Considered the deepest level of the consolidation before the uptrend continues. Blue
61.8% (fib_618_buy) 💰 Buy Trap (61.8%) The most common entry point (Buy Trap). When the price consolidates in an uptrend: Green
50.0% 50.00% Mid-trend consolidation level. Yellow
127.2% (fib_1272_sell) 🎯 127.2% target (sell trap) Profit target (Target/Sell Trap) for uptrend trading after the price breaks through the previous High. Orange
161.8% (fib_1618_sell) 🎯 161.8% target (sell trap) Profit target (Target/Sell Trap) The most important and popular for Fibonacci extensions. Red
I created this indicator to help traders who know nothing about trading. It might be worthless if you don't use it. Only 200 baht for this amazing indicator.
Box BO signals v1Box Breakout Direction Flip Signals is a smart price‐action tool designed to identify clean directional shifts using consolidation boxes and breakout logic.
The indicator draws dynamic high–low range boxes and generates Buy (B) and Sell (S) signals only when direction flips, avoiding repeated noise signals during trending moves.
✔ First breakout after box marks direction (Buy or Sell)
✔ Signals alternate: S → B → S → B, never repeating
✔ No signals while price simply continues in same direction
✔ Labels are spaced away from candles for clean visibility
✔ Works best on lower timeframes (1m, 3m, 5m) for scalping / intraday
🎯 How It Works
1️⃣ A consolidation zone forms automatically using candle high–low
2️⃣ Breakout above the box → Buy label → new box begins
3️⃣ Breakout below the box → Sell label → new box begins
4️⃣ Signals print only on actual directional change (flip)
5️⃣ Boxes extend dynamically until breakout occurs
ORB W/ Custom time FramesRelease Notes: Simplified ORB (Opening Range Breakout)
This indicator is a streamlined, high-performance tool designed to identify the Opening Range—one of the most widely used concepts by professional floor traders and institutional scalpers. It marks the high, low, and midpoint of the initial balance of the market, providing you with a "map" for the rest of the trading session.
Key Features
Customizable Timeframes: Define your opening range window (e.g., the first 5, 15, or 30 minutes) regardless of what timeframe you are currently viewing.
Custom Session Support: Choose between standard market hours (09:30–16:00) or define your own custom window (e.g., the London Open or the first hour of "Power Hour").
Real-Time Midpoint Calculation: Automatically plots the 50% Equilibrium level between the high and low, serving as a pivot point for intraday bias.
Dynamic Updating: During the ORB window, the lines adjust in real-time as new highs or lows are set. Once the window expires, the levels lock in place to act as support and resistance.
Clean Visuals: Utilizes a lightweight line drawing system that is easy on your GPU and keeps the chart clutter-free.
Why This is Essential for Scalping
Scalpers rely on volatility and clear "lines in the sand." The Opening Range Breakout (ORB) provides exactly that:
The "Opening Drive": If price breaks the ORB High with high volume, scalpers look for quick "long" momentum plays. Conversely, a break below the ORB Low signals a bearish trend.
The Midpoint Pivot: The 50% level (Mid) is often treated as the "Fair Value" of the morning. If price is above the mid, the bias is bullish; if below, the bias is bearish.
Stop Loss / Take Profit Anchor: The ORB High and Low act as natural areas for placing stops or targets. A failed breakout that returns inside the range often targets the opposite side of the box.






















