Fibonacci Entry Bands [AlgoAlpha]OVERVIEW
This script plots Fibonacci Entry Bands, a trend-following and mean-reversion hybrid system built around dynamic volatility-adjusted bands scaled using key Fibonacci levels. It calculates a smoothed basis line and overlays multiple bands at fixed Fibonacci multipliers of either ATR or standard deviation. Depending on the trend direction, specific upper or lower bands become active, offering a clear framework for entry timing, trend identification, and profit-taking zones.
CONCEPTS
The core idea is to use Fibonacci levels—0.618, 1.0, 1.618, and 2.618—as multipliers on a volatility measure to form layered price bands around a trend-following moving average. Trends are defined by whether the basis is rising or falling. The trend determines which side of the bands is emphasized: upper bands for downtrends, lower bands for uptrends. This approach captures both directional bias and extreme price extensions. Take-profit logic is built in via crossovers relative to the outermost bands, scaled by user-selected aggressiveness.
FEATURES
Basis Line – A double EMA smoothing of the source defines trend direction and acts as the central mean.
Volatility Bands – Four levels per side (based on selected ATR or stdev) mark the Fibonacci bands. These become visible only when trend direction matches the side (e.g., only lower bands plot in an uptrend).
Bar Coloring – Bars are shaded with adjustable transparency depending on distance from the basis, with color intensity helping gauge overextension.
Entry Arrows – A trend shift triggers either a long or short signal, with a marker at the outermost band with ▲/▼ signs.
Take-Profit Crosses – If price rejects near the outer band (based on aggressiveness setting), a cross appears marking potential profit-taking.
Bounce Signals – Minor pullbacks that respect the basis line are marked with triangle arrows, hinting at continuation setups.
Customization – Users can toggle bar coloring, signal markers, and select between ATR/stdev as well as take-profit aggressiveness.
Alerts – All major signals, including entries, take-profits, and bounces, are available as alert conditions.
USAGE
To use this tool, load it on your chart, adjust the inputs for volatility method and aggressiveness, and wait for entries to form on trend changes. Use TP crosses and bounce arrows as potential exit or scale-in signals.
Ketidakstabilan
SPX Weekly Expected Moves# SPX Weekly Expected Moves Indicator
A professional Pine Script indicator for TradingView that displays weekly expected move levels for SPX based on real options data, with integrated Fibonacci retracement analysis and intelligent alerting system.
## Overview
This indicator helps options and equity traders visualize weekly expected move ranges for the S&P 500 Index (SPX) by plotting historical and current week expected move boundaries derived from weekly options pricing. Unlike theoretical volatility calculations, this indicator uses actual market-based expected move data that you provide from options platforms.
## Key Features
### 📈 **Expected Move Visualization**
- **Historical Lines**: Display past weeks' expected moves with configurable history (10, 26, or 52 weeks)
- **Current Week Focus**: Highlighted current week with extended lines to present time
- **Friday Close Reference**: Orange baseline showing the previous Friday's close price
- **Timeframe Independent**: Works consistently across all chart timeframes (1m to 1D)
### 🎯 **Fibonacci Integration**
- **Five Fibonacci Levels**: 23.6%, 38.2%, 50%, 61.8%, 76.4% between Friday close and expected move boundaries
- **Color-Coded Levels**:
- Red: 23.6% & 76.4% (outer levels)
- Blue: 38.2% & 61.8% (golden ratio levels)
- Black: 50% (midpoint - most critical level)
- **Current Week Only**: Fibonacci levels shown only for active trading week to reduce clutter
### 📊 **Real-Time Information Table**
- **Current SPX Price**: Live market price
- **Expected Move**: ±EM value for current week
- **Previous Close**: Friday close price (baseline for calculations)
- **100% EM Levels**: Exact upper and lower boundary prices
- **Current Location**: Real-time position within the EM structure (e.g., "Above 38.2% Fib (upper zone)")
### 🚨 **Intelligent Alert System**
- **Zone-Aware Alerts**: Separate alerts for upper and lower zones
- **Key Level Breaches**: Alerts for 23.6% and 76.4% Fibonacci level crossings
- **Bar Close Based**: Alerts trigger on confirmed bar closes, not tick-by-tick
- **Customizable**: Enable/disable alerts through settings
## How It Works
### Data Input Method
The indicator uses a **manual data entry approach** where you input actual expected move values obtained from options platforms:
```pinescript
// Add entries using the options expiration Friday date
map.put(expected_moves, 20250613, 91.244) // Week ending June 13, 2025
map.put(expected_moves, 20250620, 95.150) // Week ending June 20, 2025
```
### Weekly Structure
- **Monday 9:30 AM ET**: Week begins
- **Friday 4:00 PM ET**: Week ends
- **Lines Extend**: From Monday open to Friday close (historical) or current time + 5 bars (current week)
- **Timezone Handling**: Uses "America/New_York" for proper DST handling
### Calculation Logic
1. **Base Price**: Previous Friday's SPX close price
2. **Expected Move**: Market-derived ±EM value from weekly options
3. **Upper Boundary**: Friday Close + Expected Move
4. **Lower Boundary**: Friday Close - Expected Move
5. **Fibonacci Levels**: Proportional levels between Friday close and EM boundaries
## Setup Instructions
### 1. Data Collection
Obtain weekly expected move values from options platforms such as:
- **ThinkOrSwim**: Use thinkBack feature to look up weekly expected moves
- **Tastyworks**: Check weekly options expected move data
- **CBOE**: Reference SPX weekly options data
- **Manual Calculation**: (ATM Call Premium + ATM Put Premium) × 0.85
### 2. Data Entry
After each Friday close, update the indicator with the next week's expected move:
```pinescript
// Example: On Friday June 7, 2025, add data for week ending June 13
map.put(expected_moves, 20250613, 91.244) // Actual EM value from your platform
```
### 3. Configuration
Customize the indicator through the settings panel:
#### Visual Settings
- **Show Current Week EM**: Toggle current week display
- **Show Past Weeks**: Toggle historical weeks display
- **Max Weeks History**: Choose 10, 26, or 52 weeks of history
- **Show Fibonacci Levels**: Toggle Fibonacci retracement levels
- **Label Controls**: Customize which labels to display
#### Colors
- **Current Week EM**: Default yellow for active week
- **Past Weeks EM**: Default gray for historical weeks
- **Friday Close**: Default orange for baseline
- **Fibonacci Levels**: Customizable colors for each level type
#### Alerts
- **Enable EM Breach Alerts**: Master toggle for all alerts
- **Specific Alerts**: Four alert types for Fibonacci level breaches
## Trading Applications
### Options Trading
- **Straddle/Strangle Positioning**: Visualize breakeven levels for neutral strategies
- **Directional Plays**: Assess probability of reaching target levels
- **Earnings Plays**: Compare actual vs. expected move outcomes
### Equity Trading
- **Support/Resistance**: Use EM boundaries and Fibonacci levels as key levels
- **Breakout Trading**: Monitor for moves beyond expected ranges
- **Mean Reversion**: Look for reversals at extreme Fibonacci levels
### Risk Management
- **Position Sizing**: Gauge likely price ranges for the week
- **Stop Placement**: Use Fibonacci levels for logical stop locations
- **Profit Targets**: Set targets based on EM structure probabilities
## Technical Implementation
### Performance Features
- **Memory Managed**: Configurable history limits prevent memory issues
- **Timeframe Independent**: Uses timestamp-based calculations for consistency
- **Object Management**: Automatic cleanup of drawing objects prevents duplicates
- **Error Handling**: Robust bounds checking and NA value handling
### Pine Script Best Practices
- **v6 Compliance**: Uses latest Pine Script version features
- **User Defined Types**: Structured data management with WeeklyEM type
- **Efficient Drawing**: Smart line/label creation and deletion
- **Professional Standards**: Clean code organization and comprehensive documentation
## Customization Guide
### Adding New Weeks
```pinescript
// Add after market close each Friday
map.put(expected_moves, YYYYMMDD, EM_VALUE)
```
### Color Schemes
Customize colors for different trading styles:
- **Dark Theme**: Use bright colors for visibility
- **Light Theme**: Use contrasting dark colors
- **Minimalist**: Use single color with transparency
### Label Management
Control label density:
- **Show Current Week Labels Only**: Reduce clutter for active trading
- **Show All Labels**: Full information for analysis
- **Selective Display**: Choose specific label types
## Troubleshooting
### Common Issues
1. **No Lines Appearing**: Check that expected move data is entered for current/recent weeks
2. **Wrong Time Display**: Ensure "America/New_York" timezone is properly handled
3. **Duplicate Lines**: Restart indicator if drawing objects appear duplicated
4. **Missing Fibonacci Levels**: Verify "Show Fibonacci Levels" is enabled
### Data Validation
- **Expected Move Format**: Use positive numbers (e.g., 91.244, not ±91.244)
- **Date Format**: Use YYYYMMDD format (e.g., 20250613)
- **Reasonable Values**: Verify EM values are realistic (typically 50-200 for SPX)
## Version History
### Current Version
- **Pine Script v6**: Latest version compatibility
- **Fibonacci Integration**: Five-level retracement analysis
- **Zone-Aware Alerts**: Upper/lower zone differentiation
- **Dynamic Line Management**: Smart current week extension
- **Professional UI**: Comprehensive information table
### Future Enhancements
- **Multiple Symbols**: Extend beyond SPX to other indices
- **Automated Data**: Integration with options data APIs
- **Statistical Analysis**: Success rate tracking for EM predictions
- **Additional Levels**: Custom percentage levels beyond Fibonacci
## License & Usage
This indicator is designed for educational and trading purposes. Users are responsible for:
- **Data Accuracy**: Ensuring correct expected move values
- **Risk Management**: Proper position sizing and risk controls
- **Market Understanding**: Comprehending options-based expected move concepts
## Support
For questions, issues, or feature requests related to this indicator, please refer to the code comments and documentation within the Pine Script file.
---
**Disclaimer**: This indicator is for informational purposes only. Trading involves substantial risk of loss and is not suitable for all investors. Past performance does not guarantee future results.
Multi TF Oscillators Screener [TradingFinder] RSI / ATR / Stoch🔵 Introduction
The oscillator screener is designed to simplify multi-timeframe analysis by allowing traders and analysts to monitor one or multiple symbols across their preferred timeframes—all at the same time. Users can track a single symbol through various timeframes simultaneously or follow multiple symbols in selected intervals. This flexibility makes the tool highly effective for analyzing diverse markets concurrently.
At the core of this screener lie two essential oscillators: RSI (Relative Strength Index) and the Stochastic Oscillator. The RSI measures the speed and magnitude of recent price movements and helps identify overbought or oversold conditions.
It's one of the most reliable indicators for spotting potential reversals. The Stochastic Oscillator, on the other hand, compares the current price to recent highs and lows to detect momentum strength and potential trend shifts. It’s especially effective in identifying divergences and short-term reversal signals.
In addition to these two primary indicators, the screener also displays helpful supplementary data such as the dominant candlestick type (Bullish, Bearish, or Doji), market volatility indicators like ATR and TR, and the four key OHLC prices (Open, High, Low, Close) for each symbol and timeframe. This combination of data gives users a comprehensive technical view and allows for quick, side-by-side comparison of symbols and timeframes.
🔵 How to Use
This tool is built for users who want to view the behavior of a single symbol across several timeframes simultaneously. Instead of jumping between charts, users can quickly grasp the state of a symbol like gold or Bitcoin across the 15-minute, 1-hour, and daily timeframes at a glance. This is particularly useful for traders who rely on multi-timeframe confirmation to strengthen their analysis and decision-making.
The tool also supports simultaneous monitoring of multiple symbols. Users can select and track various assets based on the timeframes that matter most to them. For example, if you’re looking for entry opportunities, the screener allows you to compare setups across several markets side by side—making it easier to choose the most favorable trade. Whether you’re a scalper focused on low timeframes or a swing trader using higher ones, the tool adapts to your workflow.
The screener utilizes the widely-used RSI indicator, which ranges from 0 to 100 and highlights market exhaustion levels. Readings above 70 typically indicate potential pullbacks, while values below 30 may suggest bullish reversals. Viewing RSI across timeframes can reveal meaningful divergences or alignments that improve signal quality.
Another key indicator in the screener is the Stochastic Oscillator, which analyzes the closing price relative to its recent high-low range. When the %K and %D lines converge and cross within the overbought or oversold zones, it often signals a momentum reversal. This oscillator is especially responsive in lower timeframes, making it ideal for spotting quick entries or exits.
Beyond these oscillators, the table includes other valuable data such as candlestick type (bullish, bearish, or doji), volatility measures like ATR and TR, and complete OHLC pricing. This layered approach helps users understand both market momentum and structure at a glance.
Ultimately, this screener allows analysts and traders to gain a full market overview with just one look—empowering faster, more informed, and lower-risk decision-making. It not only saves time but also enhances the precision and clarity of technical analysis.
🔵 Settings
🟣 Display Settings
Table Size : Lets you adjust the table’s visual size with options such as: auto, tiny, small, normal, large, huge.
Table Position : Sets the screen location of the table. Choose from 9 possible positions, combining vertical (top, middle, bottom) and horizontal (left, center, right) alignments.
🟣 Symbol Settings
Each of the 10 symbol slots comes with a full set of customizable parameters :
Enable Symbol : A checkbox to activate or hide each symbol from the table.
Symbol : Define or select the asset (e.g., XAUUSD, BTCUSD, EURUSD, etc.).
Timeframe : Set your desired timeframe for each symbol (e.g., 15, 60, 240, 1D).
RSI Length : Defines the period used in RSI calculation (default is 14).
Stochastic Length : Sets the period for the Stochastic Oscillator.
ATR Length : Sets the length used to calculate the Average True Range, a key volatility metric.
🔵 Conclusion
By combining powerful oscillators like RSI and Stochastic with full customization over symbols and timeframes, this tool provides a fast, flexible solution for technical analysts. Users can instantly monitor one or several assets across multiple timeframes without opening separate charts.
Individual configuration for each symbol, along with the inclusion of key metrics like candlestick type, ATR/TR, and OHLC prices, makes the tool suitable for a wide range of trading styles—from scalping to swing and position trading.
In summary, this screener enables traders to gain a clear, high-level view of various markets in seconds and make quicker, smarter, and lower-risk decisions. It saves time, streamlines analysis, and boosts overall efficiency and confidence in trading strategies.
[Top] Consolidation Detector Consolidation Detector
Overview
This indicator identifies and visualizes price consolidation zones in real-time, drawing boxes around periods of reduced volatility and tight price ranges. While optimized for Gold futures (GC) on 1-minute timeframes, it can be adapted for other instruments by adjusting the parameters.
How It Works
The indicator combines three methods to detect consolidation:
Dollar Range Analysis - Identifies when price movement stays within a defined dollar range
ATR (Average True Range) Comparison - Confirms low volatility relative to recent price action
Rate of Change Filter (Optional) - Additional confirmation using momentum analysis
Visual Output
Purple Boxes - Completed consolidation zones that met the minimum bar requirement
Dashed Boxes - Current consolidation in progress (when enabled)
Green Background - Debug mode showing when consolidation conditions are met
Key Features
Real-time consolidation detection
Customizable visual appearance
Debug mode for parameter optimization
Alert conditions for consolidation start/end
Limited to 50 most recent boxes to maintain chart clarity
Input Parameters
Primary Settings:
Lookback Period (4) - Number of bars to analyze for range calculation
ATR Length (20) - Period for ATR calculation
ATR Multiplier (2.5) - Sensitivity threshold for ATR-based detection
Minimum Bars (3) - Required duration for valid consolidation
Max Range in Dollars (15.0) - Maximum price range for consolidation
Visual Settings:
Box Color/Border - Customize appearance
Show Current Consolidation - Display in-progress consolidations
Show Debug Info - Enable visual debugging aids
Alternative Method (Optional):
ROC Length - Period for rate of change calculation
Use ROC Method - Enable additional momentum filter
ROC Threshold % - Maximum rate of change for consolidation
Usage Tips
Start with default settings for Gold futures (GC) on 1-minute charts
Enable "Show Debug Info" to see when conditions are triggered
Adjust "Max Range in Dollars" based on your instrument's typical range
Use lower timeframes (1-5 min) for best results
Adjusting for Other Instruments
Forex: Reduce Max Range to 0.001-0.01
Stocks: Adjust based on price and volatility (typically 0.5-2.0)
Crypto: Increase range for higher volatility
Other Futures: Scale according to tick size and typical movement
Important Notes
This indicator identifies consolidation patterns but does not predict breakout direction
Best used in conjunction with other analysis methods
Consolidation zones often precede significant price movements
Not all consolidations lead to profitable breakouts
Alerts
Two alert conditions are available:
Consolidation Started - New consolidation zone detected
Consolidation Ended - Consolidation period completed
The indicator is designed as a technical analysis tool to help identify periods of price compression. It should be used as part of a comprehensive trading strategy and not as a standalone buy/sell signal generator.
Multi-Period Performance TableHello friends,
I'm returning to the fascinating world of TradingView publications. Over time, I've accumulated many unpublished ideas — both open- and closed-source — that I now plan to share, alternating between the two. It felt like a shame to let so much valuable work remain unseen. The story isn't over yet — so today, we kick off a new series of invite-only scripts, starting with this indicator.
🛠️ How It Works
The script analyzes your selected number of years of price data, calculating returns for each month, quarter, and season
Advanced algorithms compute comprehensive statistics, including the mean, median, standard deviation, and extremes for each period
Data is presented in an intuitive table with optional heatmap coloring that makes patterns immediately stand out
Sorting of any column allows you to quickly identify the best and worst performing periods
🔥 Key Features
Pine Script V6 – leverages the latest version for better performance
Custom number of years to aggregate statistics
Complete breakdown for all 12 months (Jan-Dec)
Quarter (Q1, Q2, Q3, Q4) statistics
Season (Winter, Spring, Summer, Fall) statistics
Year/Year-to-Date (YTD) statistics
Enable/disable Right-side statistics for each row
Enable/disable Bottom statistics for each column
Heatmap mode with 10 palettes
Sortable columns
Customizable table
Optimized performance - efficient calculations for smooth operation
Universal compatibility – runs smoothly across all assets, timeframes, and market conditions — from euphoric peaks to capitulation lows
📸 Visual Examples
Monthly view
Quarterly view
Seasonal view
Clean table mode - without heatmaps
Default heatmap palette
June column sorted in descending order to quickly identify best/worst years
Turbo palette - high contrast
Spectral palette - professional look
Red/Yellow/Blue palette - classic style
My similar indicators that are also worth paying attention to
Still here? Unlock the full potential of multi-period market analysis — and take your trading to the next level today! 🚀
👋Good luck!
Normalized Volume & True RangeThis indicator solves a fundamental challenge that traders face when trying to analyze volume and volatility together on their charts. Traditionally, volume and price volatility exist on completely different scales, making direct comparison nearly impossible. Volume might range from thousands to millions of shares, while volatility percentages typically stay within single digits. This indicator brings both measurements onto a unified scale from 0 to 100 percent, allowing you to see their relationship clearly for the first time.
The core innovation lies in the normalization process, which automatically calculates appropriate scaling factors for both volume and volatility based on their historical statistical properties. Rather than using arbitrary fixed scales that might work for one stock but fail for another, this system adapts to each instrument's unique characteristics. The indicator establishes baseline averages for both measurements and then uses statistical analysis to determine reasonable maximum values, ensuring that extreme outliers don't distort the overall picture.
You can choose from three different volatility calculation methods depending on your analytical preferences. The "Body" option measures the distance between opening and closing prices, focusing on the actual trading range that matters most for price action. The "High/Low" method captures the full daily range including wicks and shadows, giving you a complete picture of intraday volatility. The "Close/Close" approach compares consecutive closing prices, which can be particularly useful for identifying gaps and overnight price movements.
The indicator displays volume as colored columns that match your candlestick colors, making it intuitive to see whether high volume occurred during up moves or down moves. Volatility appears as a gray histogram, providing a clean background reference that doesn't interfere with volume interpretation. Both measurements are clipped at 100 percent, which represents their calculated maximum normal values, so any readings near this level indicate unusually high activity in either volume or volatility.
The baseline reference line shows you what "normal" volume looks like for the current instrument, helping you quickly identify when trading activity is above or below average. Optional moving averages for both volume and volatility are available if you prefer smoothed trend analysis over raw daily values. The entire system updates in real-time as new data arrives, continuously refining its statistical calculations to maintain accuracy as market conditions evolve.
This two-in-one indicator provides a straightforward way to examine how price movements relate to trading volume by presenting both measurements on the same normalized scale, making it easier to spot patterns and relationships that might otherwise remain hidden when analyzing these metrics separately.
BB Oscillator - Price Relative to Bollinger BandsThis Bollinger Band Oscillator visualizes where the current price sits relative to its Bollinger Bands, scaled between 0 and 100. It helps identify overbought and oversold conditions based on the price’s position within the bands and provides dynamic signals when momentum shifts occur.
Features
Price Relative to Bollinger Bands
The main oscillator plots the price’s relative position within the Bollinger Bands on a scale from 0 (lower band) to 100 (upper band), giving an intuitive view of where price stands.
Customizable Moving Average Overlay
An optional moving average (SMA or EMA) smooths the oscillator for trend analysis, with adjustable length and color options.
Crossover & Crossunder Signals
Alerts and background highlights trigger when the oscillator crosses over or under its moving average, signaling potential momentum shifts or trend changes.
Fully Customizable Colors
Choose your preferred colors for the oscillator line, moving average and crossover signals to match your charting style.
This tool offers a unique oscillator view of Bollinger Bands, combining volatility context with momentum signals for clearer decision-making.
Toolbar-FrenToolbar-Fren is a comprehensive, data-rich toolbar designed to present a wide array of key metrics in a compact and intuitive format. The core philosophy of this indicator is to maximize the amount of relevant, actionable data available to the trader while occupying minimal chart space. It leverages a dynamic color-coded system to provide at-a-glance insights into market conditions, instantly highlighting positive/negative values, trend strength, and proximity to important technical levels.
Features and Data Displayed
The toolbar displays a vertical column of critical data points, primarily calculated on the Daily timeframe to give a broader market context. Each cell is color-coded for quick interpretation.
DAY:
The percentage change of the current price compared to the previous day's close. The cell is colored green for a positive change and red for a negative one.
LOD:
The current price's percentage distance from the Low of the Day.
HOD
The current price's percentage distance from the High of the Day.
MA Distances (9/21 or 10/20, 50, 200)
These cells show how far the current price is from key Daily moving averages (MAs).
The values are displayed either as a percentage distance or as a multiple of the Average Daily Range (ADR), which can be toggled in the settings.
The cells are colored green if the price is above the corresponding MA (bullish) and red if it is below (bearish).
ADR
Shows the 14-period Average Daily Range as a percentage of the current price. The cell background uses a smooth gradient from green (low volatility) to red (high volatility) to visualize the current daily range expansion.
ADR%/50: A unique metric showing the distance from the Daily 50 SMA, measured in multiples of the 14-period Average True Range (ATR). This helps quantify how extended the price is from its mean. The cell is color-coded from green (close to the mean) to red (highly extended).
RSI
The standard 14-period Relative Strength Index calculated on the Daily timeframe. The background color changes to indicate potentially overbought (orange/red) or oversold (green) conditions.
ADX
The 14-period Average Directional Index (ADX) from the Daily timeframe, which measures trend strength. The cell is colored to reflect the strength of the trend (e.g., green for a strong trend, red for a weak/non-trending market). An arrow (▲/▼) is also displayed to indicate if the ADX value is sloping up or down.
User Customization
The indicator offers several options for personalization to fit your trading style and visual preferences:
MA Type
Choose between using Exponential Moving Averages (EMA 9/21) or Simple Moving Averages (SMA 10/20) for the primary MA calculations.
MA Distance Display
Toggle the display of moving average distances between standard percentage values and multiples of the Average Daily Range (ADR).
Display Settings
Fully customize the on-chart appearance by selecting the table's position (e.g., Top Right, Bottom Left) and the text size. An option for a larger top margin is also available.
Colors
Personalize the core Green, Yellow, Orange, and Red colors used throughout the indicator to match your chart's theme.
Technical Parameters
Fine-tune the length settings for the ADX and DI calculations.
Stock Beta vs NIFTY 50# Stock Beta vs NIFTY 50
## Overview
This indicator calculates and displays the Beta coefficient of any stock relative to the NIFTY 50 index, providing traders and investors with a real-time measure of systematic risk and market correlation.
## What is Beta?
Beta measures how much a stock's price moves relative to the overall market (NIFTY 50 in this case):
- **β = 1**: Stock moves in line with the market
- **β > 1**: Stock is more volatile than the market (amplified movements)
- **β < 1**: Stock is less volatile than the market (dampened movements)
- **β = 0**: No correlation with market movements
- **Negative β**: Stock moves opposite to the market
## Key Features
- **Real-time Beta calculation** using logarithmic returns for statistical accuracy
- **Customizable lookback period** (default: 90 bars) to adjust sensitivity
- **Visual reference lines** at Beta = 0 and Beta = 1 for quick interpretation
- **Dynamic labels** showing current Beta value as percentage every 20 bars
- **Clean subplot display** that doesn't overlay on price charts
## How to Use
1. Apply the indicator to any NSE-listed stock
2. Adjust the lookback period based on your analysis timeframe:
- Shorter periods (30-60 bars): More responsive to recent price action
- Longer periods (90-250 bars): More stable, long-term correlation measure
3. Interpret the Beta line:
- Rising Beta: Stock becoming more correlated/volatile relative to NIFTY
- Falling Beta: Stock becoming less correlated/volatile relative to NIFTY
## Technical Implementation
- Uses logarithmic returns for more accurate statistical calculation
- Implements proper covariance and variance calculations
- Handles edge cases with built-in error checking
- Optimized for NSE stocks with NIFTY 50 as benchmark
## Best Practices
- Use on daily or higher timeframes for meaningful results
- Consider market conditions when interpreting Beta values
- Combine with other risk metrics for comprehensive analysis
- Monitor Beta changes over time to identify trend shifts
*Note: This indicator is designed specifically for NSE-listed stocks and uses NIFTY 50 as the market benchmark. Beta values should be interpreted within the context of current market conditions and individual stock fundamentals.*
Circuit Marker# Circuit Marker
## Overview
The Circuit Marker indicator identifies and visually marks price circuit breaker events on your chart. Circuit breakers are significant price movements that trigger trading halts or restrictions in various markets, particularly in Indian stock exchanges.
## What it does
This indicator automatically detects when a security hits upper or lower circuit limits by identifying price movements of exactly 5%, 10%, or 20% from the previous day's close, combined with the stock closing at its daily high (upper circuit) or daily low (lower circuit).
## Key Features
- **Automatic Detection**: Identifies circuit breaker events with high precision using a 0.01% tolerance
- **Visual Markers**: Places green triangular markers above bars for upper circuits and red triangular markers below bars for lower circuits
- **Historical Analysis**: Shows circuit events for the last 252 trading days (approximately 1 year)
- **Clean Interface**: Simple, non-cluttering visual indicators with "UC" and "LC" labels
## How to Use
1. Add the indicator to any stock chart
2. Green triangles with "UC" appear above bars when upper circuit conditions are met
3. Red triangles with "LC" appear below bars when lower circuit conditions are met
4. Use these markers to identify periods of extreme price movement and potential trading opportunities or risk management points
## Technical Details
- **Detection Logic**: Combines exact percentage movements (5%, 10%, or 20%) with daily high/low closures
- **Precision**: Uses 0.0001 tolerance for accurate circuit detection
- **Timeframe**: Works on daily charts and higher timeframes
- **Overlay**: Plots directly on the price chart without creating a separate pane
*Note: This indicator is designed primarily for markets with circuit breaker mechanisms like Indian stock exchanges. Results may vary on other markets without similar price limit systems.*
Circuit Counter (1Y)# Circuit Counter (1Y) - Pine Script Indicator
## Overview
The Circuit Counter (1Y) is a comprehensive technical analysis tool designed to track and count circuit breaker events over a rolling 12-month period (252 trading bars). This indicator helps traders identify stocks or securities that frequently hit upper or lower circuit limits, providing valuable insights into price volatility patterns and market behavior.
## Key Features
### Circuit Detection Algorithm
- **Precision Tracking**: Monitors exact 5%, 10%, and 20% price movements with high accuracy (0.01% tolerance)
- **Upper Circuit Detection**: Identifies when closing price equals daily high AND represents a 5%, 10%, or 20% gain
- **Lower Circuit Detection**: Identifies when closing price equals daily low AND represents a 5%, 10%, or 20% loss
- **Real-time Analysis**: Continuously updates circuit counts as new bars form
### Visual Display
- **Clean Table Interface**: Displays circuit counts in an organized table positioned at bottom-right of chart
- **Color-coded Results**: Green background for upper circuits, red background for lower circuits
- **Professional Formatting**: White text on colored backgrounds for optimal readability
- **Non-intrusive Design**: Overlay indicator that doesn't interfere with price action analysis
### Customization Options
- **Adjustable Lookback Period**: Default 252 bars (1 trading year) with flexibility to modify based on analysis needs
- **Minimum Value Protection**: Input validation ensures lookback period cannot be set below 1 bar
## Technical Specifications
- **Version**: Pine Script v5
- **Chart Type**: Overlay indicator
- **Performance**: Optimized loop structure for efficient historical data processing
- **Compatibility**: Works on all timeframes and asset classes
- **Memory Management**: Uses variable declarations for optimal performance
*This indicator is designed for educational and analytical purposes. Past circuit breaker activity does not guarantee future performance or price movements.*
VWAP %BVWAP %B - Volume Weighted Average Price Percent B
The VWAP %B indicator combines the reliability of VWAP (Volume Weighted Average Price) with the analytical power of %B oscillators, similar to Bollinger Bands %B but using volume-weighted statistics.
## How It Works
This indicator calculates where the current price sits relative to VWAP-based standard deviation bands, expressed as a percentage from 0 to 1:
• **VWAP Calculation**: Uses volume-weighted average price as the center line
• **Standard Deviation Bands**: Creates upper and lower bands using standard deviation around VWAP
• **%B Formula**: %B = (Price - Lower Band) / (Upper Band - Lower Band)
## Key Levels & Interpretation
• **Above 1.0**: Price is trading above the upper VWAP band (strong bullish momentum)
• **0.8 - 1.0**: Overbought territory, potential resistance
• **0.5**: Price exactly at VWAP (equilibrium)
• **0.2 - 0.0**: Oversold territory, potential support
• **Below 0.0**: Price is trading below the lower VWAP band (strong bearish momentum)
## Trading Applications
**Trend Following**: During strong trends, breaks above 1.0 or below 0.0 often signal continuation rather than reversal.
**Mean Reversion**: In ranging markets, extreme readings (>0.8 or <0.2) may indicate potential reversal points.
**Volume Context**: Unlike traditional %B, this incorporates volume weighting, making it more reliable during high-volume periods.
## Parameters
• **Length (20)**: Period for standard deviation calculation
• **Standard Deviation Multiplier (2.0)**: Controls band width
• **Source (close)**: Price input for calculations
## Visual Features
• Reference lines at key levels (0, 0.2, 0.5, 0.8, 1.0)
• Background highlighting for extreme breaks
• Real-time values table
• Clean oscillator format below price chart
Perfect for intraday traders and swing traders who want to combine volume analysis with momentum oscillators.
Approximate Entropy Zones [PhenLabs]Version: PineScript™ v6
Description
This indicator identifies periods of market complexity and randomness by calculating the Approximate Entropy (ApEn) of price action. As the movement of the market becomes complex, it means the current trend is losing steam and a reversal or consolidation is likely near. The indicator plots high-entropy periods as zones on your chart, providing a graphical suggestion to anticipate a potential market direction change. This indicator is designed to help traders identify favorable times to get in or out of a trade by highlighting when the market is in a state of disarray.
Points of Innovation
Advanced Complexity Analysis: Instead of relying on traditional momentum or trend indicators, this tool uses Approximate Entropy to quantify the unpredictability of price movements.
Dynamic Zone Creation: It automatically plots zones on the chart during periods of high entropy, providing a clear and intuitive visual guide.
Customizable Sensitivity: Users can fine-tune the ‘Entropy Threshold’ to adjust how frequently zones appear, allowing for calibration to different assets and timeframes.
Time-Based Zone Expiration: Zones can be set to expire after a specific time, keeping the chart clean and relevant.
Built-in Zone Size Filter: Excludes zones that form on excessively large candles, filtering out noise from extreme volatility events.
On-Chart Calibration Guide: A persistent note on the chart provides simple instructions for adjusting the entropy threshold, making it easy for users to optimize the indicator’s performance.
Core Components
Approximate Entropy (ApEn) Calculation: The core of the indicator, which measures the complexity or randomness of the price data.
Zone Plotting: Creates visual boxes on the chart when the calculated ApEn value exceeds a user-defined threshold.
Dynamic Zone Management: Manages the lifecycle of the zones, from creation to expiration, ensuring the chart remains uncluttered.
Customizable Settings: A comprehensive set of inputs that allow users to control the indicator’s sensitivity, appearance, and time-based behavior.
Key Features
Identifies Potential Reversals: The high-entropy zones can signal that a trend is nearing its end, giving traders an early warning.
Works on Any Timeframe: The indicator can be applied to any chart timeframe, from minutes to days.
Customizable Appearance: Users can change the color and transparency of the zones to match their chart’s theme.
Informative Labels: Each zone can display the calculated entropy value and the direction of the candle on which it formed.
Visualization
Entropy Zones: Shaded boxes that appear on the chart, highlighting candles with high complexity.
Zone Labels: Text within each zone that displays the ApEn value and a directional arrow (e.g., “0.525 ↑”).
Calibration Note: A small table in the top-right corner of the chart with instructions for adjusting the indicator’s sensitivity.
Usage Guidelines
Entropy Analysis
Source: The price data used for the ApEn calculation. (Default: close)
Lookback Length: The number of bars used in the ApEn calculation. (Default: 20, Range: 10-50)
Embedding Dimension (m): The length of patterns to be compared; a standard value for financial data. (Default: 2)
Tolerance Multiplier (r): Adjusts the tolerance for pattern matching; a larger value makes matching more lenient. (Default: 0.2)
Entropy Threshold: The ApEn value that must be exceeded to plot a zone. Increase this if too many zones appear; decrease it if too few appear. (Default: 0.525)
Time Settings
Analysis Timeframe: How long a zone remains on the chart after it forms. (Default: 1D)
Custom Period (Bars): The zone’s lifespan in bars if “Analysis Timeframe” is set to “Custom”. (Default: 1000)
Zone Settings
Zone Fill Color: The color of the entropy zones. (Default: #21f38a with 80% transparency)
Maximum Zone Size %: Filters out zones on candles that are larger than this percentage of their low price. (Default: 0.5)
Display Options
Show Entropy Label: Toggles the visibility of the text label inside each zone. (Default: true)
Label Text Position: The horizontal alignment of the text label. (Default: Right)
Show Calibration Note: Toggles the visibility of the calibration note in the corner of the chart. (Default: true)
Best Use Cases
Trend Reversal Trading: Identifying when a strong trend is likely to reverse or pause.
Breakout Confirmation: Using the absence of high entropy to confirm the strength of a breakout.
Ranging Market Identification: Periods of high entropy can indicate that a market is transitioning into a sideways or choppy phase.
Limitations
Not a Standalone Signal: This indicator should be used in conjunction with other forms of analysis to confirm trading signals.
Lagging Nature: Like all indicators based on historical data, ApEn is a lagging measure and does not predict future price movements with certainty.
Calibration Required: The effectiveness of the indicator is highly dependent on the “Entropy Threshold” setting, which needs to be adjusted for different assets and timeframes.
What Makes This Unique
Quantifies Complexity: It provides a numerical measure of market complexity, offering a different perspective than traditional indicators.
Clear Visual Cues: The zones make it easy to see when the market is in a state of high unpredictability.
User-Friendly Design: With features like the on-chart calibration note, the indicator is designed to be easy to use and optimize.
How It Works
Calculate Standard Deviation: The indicator first calculates the standard deviation of the source price data over a specified lookback period.
Calculate Phi: It then calculates a value called “phi” for two different pattern lengths (embedding dimensions ‘m’ and ‘m+1’). This involves comparing sequences of data points to see how many are “similar” within a certain tolerance (determined by the standard deviation and the ‘r’ multiplier).
Calculate ApEn: The Approximate Entropy is the difference between the two phi values. A higher ApEn value indicates greater irregularity and unpredictability in the data.
Plot Zones: If the calculated ApEn exceeds the user-defined ‘Entropy Threshold’, a zone is plotted on the chart.
Note: The “Entropy Threshold” is the most important setting to adjust. If you see too many zones, increase the threshold. If you see too few, decrease it.
ADR Pivot LevelsThe ADR (Average Daily Range) indicator shows the average range of price movement over a trading day. The ADR is used to estimate volatility and to determine target levels. It helps to set Take-Profit and Stop-Loss orders. It is suitable for intraday trading on lower time frames.
The “ADR Pivot Levels” produces a sequence of horizontal line levels above and below the Center Line (reference level). They are sized based on the instrument's volatility, representing the average historical price movement on a selected higher timeframe using the average daily range (ADR) indicator.
RSI MSB | QuantMAC📊 RSI MSB | QuantMAC
🎯 Overview
The RSI MSB (Momentum Shifting Bands) represents a groundbreaking fusion of traditional RSI analysis with advanced momentum dynamics and adaptive volatility bands. This sophisticated indicator combines RSI smoothing , relative momentum calculations , and dynamic standard deviation bands to create a powerful oscillator that automatically adapts to changing market conditions, providing superior signal accuracy across different trading environments.
🔧 Key Features
Hybrid RSI-Momentum Engine : Proprietary combination of smoothed RSI with relative momentum analysis
Dynamic Adaptive Bands : Self-adjusting volatility bands that respond to indicator strength
Dual Trading Modes : Flexible Long/Short or Long/Cash strategies for different risk preferences
Advanced Performance Analytics : Comprehensive metrics including Sharpe, Sortino, and Omega ratios
Smart Visual System : Dynamic color coding with 9 professional color schemes
Precision Backtesting : Date range filtering with detailed historical performance analysis
Real-time Signal Generation : Clear entry/exit signals with customizable threshold sensitivity
Position Sizing Intelligence : Half Kelly criterion for optimal risk management
📈 How The MSB Technology Work
The Momentum Shifting Bands technology is built on a revolutionary approach that combines multiple signal sources into one cohesive system:
RSI Foundation : 💪
Calculate traditional RSI using customizable length and source
Apply exponential smoothing to reduce noise and false signals
Normalize values for consistent performance across different timeframes
Momentum Analysis Engine : ⚡
Compute fast and slow momentum using rate of change calculations
Calculate relative momentum by comparing fast vs slow momentum
Normalize momentum values to 0-100 scale for consistency
Apply smoothing to create stable momentum readings
Dynamic Combination : 🔄
The genius of MSB lies in its weighted combination of RSI and momentum signals. The momentum weight parameter allows traders to adjust the balance between RSI stability and momentum responsiveness, creating a hybrid indicator that captures both trend continuation and reversal signals.
Adaptive Band System : 🎯
Calculate dynamic standard deviation multiplier based on indicator strength
Generate upper and lower bands that expand during high volatility periods
Create normalized oscillator that scales between band boundaries
Provide visual reference for overbought/oversold conditions
⚙️ Comprehensive Parameter Control
RSI Settings : 📊
RSI Length: Controls the period for RSI calculation (default: 21)
Source: Price input selection (close, open, high, low, etc.)
RSI Smoothing: Reduces noise in RSI calculations (default: 20)
Momentum Settings : 🔥
Fast Momentum Length: Short-term momentum period (default: 19)
Slow Momentum Length: Long-term momentum period (default: 21)
Momentum Weight: Balance between RSI and momentum (default: 0.6)
Oscillator Settings : ⚙️
Base Length: Foundation moving average for band calculations (default: 40)
Standard Deviation Length: Period for volatility measurement (default: 53)
SD Multiplier: Base band width adjustment (default: 0.7)
Oscillator Multiplier: Scaling factor for oscillator values (default: 100)
Signal Thresholds : 🎯
Long Threshold: Bullish signal trigger level (default: 93)
Short Threshold: Bearish signal trigger level (default: 53)
🎨 Advanced Visual System
Main Chart Elements : 📈
Dynamic Shifting Bands: Upper and lower bands with intelligent transparency
Adaptive Fill Zone: Color-coded area between bands showing current market state
Basis Line: Moving average foundation displayed as subtle reference points
Smart Bar Coloring: Candles change color based on oscillator state for instant visual feedback
Oscillator Pane : 📊
Normalized MSB Oscillator: Main signal line with dynamic coloring based on market state
Threshold Lines: Horizontal reference lines for entry/exit levels
Zero Line: Central reference for oscillator neutrality
Color State Indication: Line colors change based on bullish/bearish conditions
📊 Professional Performance Metrics
The built-in analytics suite provides institutional-grade performance measurement:
Net Profit % : Total strategy return percentage
Maximum Drawdown % : Worst peak-to-trough decline
Win Rate % : Percentage of profitable trades
Profit Factor : Ratio of gross profits to gross losses
Sharpe Ratio : Risk-adjusted return measurement
Sortino Ratio : Downside-focused risk adjustment
Omega Ratio : Probability-weighted performance ratio
Half Kelly % : Optimal position sizing recommendation
Total Trades : Complete transaction count
🎯 Strategic Trading Applications
Long/Short Mode : ⚡
Maximizes profit potential by capturing both upward and downward price movements. The MSB technology helps identify when momentum is building in either direction, allowing for optimal position switches between long and short positions.
Long/Cash Mode : 🛡️
Conservative approach ideal for retirement accounts or risk-averse traders. The indicator's adaptive nature helps identify the best times to be invested versus sitting in cash, protecting capital during adverse market conditions.
🚀 Unique Advantages
Traditional Indicators vs RSI MSB :
Static vs Dynamic: While most indicators use fixed parameters, MSB bands adapt based on indicator strength
Single Signal vs Multi-Signal: Combines RSI reliability with momentum responsiveness
Lagging vs Balanced: Optimized balance between signal speed and accuracy
Simple vs Intelligent: Advanced momentum analysis provides superior market insight
💡 Professional Setup Guide
For Day Trading (Short-term) : 📱
RSI Length: 14-18
RSI Smoothing: 12-15
Momentum Weight: 0.7-0.8
Thresholds: Long 90, Short 55
For Swing Trading (Medium-term) : 📊
RSI Length: 21-25 (default range)
RSI Smoothing: 18-22
Momentum Weight: 0.5-0.7
Thresholds: Long 93, Short 53 (defaults)
For Position Trading (Long-term) : 📈
RSI Length: 25-30
RSI Smoothing: 25-30
Momentum Weight: 0.4-0.6
Thresholds: Long 95, Short 50
🧠 Advanced Trading Techniques
MSB Divergence Analysis : 🔍
Watch for divergences between price action and MSB readings. When price makes new highs/lows but the oscillator doesn't confirm, it often signals upcoming reversals or momentum shifts.
Band Width Interpretation : 📏
Expanding Bands: Increasing volatility, expect larger price moves
Contracting Bands: Decreasing volatility, prepare for potential breakouts
Band Touches: Price touching outer bands often signals reversal opportunities
Multi-Timeframe Analysis : ⏰
Use MSB on higher timeframes for trend direction and lower timeframes for precise entry timing. The momentum component makes it particularly effective for timing entries within established trends.
⚠️ Important Risk Disclaimers
Critical Risk Factors :
Market Conditions: No indicator performs equally well in all market environments
Backtesting Limitations: Historical performance may not reflect future market behavior
Parameter Sensitivity: Different settings may produce significantly different results
Volatility Risk: Momentum-based indicators can be sensitive to extreme market conditions
Capital Risk: Always use appropriate position sizing and stop-loss protection
📚 Educational Benefits
This indicator provides exceptional learning opportunities for understanding:
Advanced RSI analysis and momentum integration techniques
Adaptive indicator design and dynamic band calculations
The relationship between momentum shifts and price movements
Professional risk management using Kelly Criterion principles
Modern oscillator interpretation and multi-signal analysis
🔍 Market Applications
The RSI MSB works effectively across various markets:
Forex : Excellent for currency pair momentum analysis
Stocks : Individual equity and index trading with momentum confirmation
Commodities : Adaptive to commodity market momentum cycles
Cryptocurrencies : Handles extreme volatility with momentum filtering
Futures : Professional derivatives trading applications
🔧 Technical Innovation
The RSI MSB represents advanced research into multi-signal technical analysis. The proprietary momentum-RSI combination has been optimized for:
Computational Efficiency : Fast calculation even on high-frequency data
Signal Clarity : Clear, actionable trading signals with reduced noise
Market Adaptability : Automatic adjustment to changing momentum conditions
Parameter Flexibility : Wide range of customization options for different trading styles
🔔 Updates and Evolution
The RSI MSB | QuantMAC continues to evolve with regular updates incorporating the latest research in momentum-based technical analysis. The comprehensive parameter set allows for extensive customization and optimization across different market conditions.
Past Performance Disclaimer : Past performance results shown by this indicator are hypothetical and not indicative of future results. Market conditions change continuously, and no trading system or methodology can guarantee profits or prevent losses. Historical backtesting may not reflect actual trading conditions including market liquidity, slippage, and fees that would affect real trading results.
Master The Markets With Multi-Signal Intelligence! 🎯📈
TitanGrid L/S SuperEngineTitanGrid L/S SuperEngine
Experimental Trend-Aligned Grid Signal Engine for Long & Short Execution
🔹 Overview
TitanGrid is an advanced, real-time signal engine built around a tactical grid structure.
It manages Long and Short trades using trend-aligned entries, layered scaling, and partial exits.
Unlike traditional strategy() -based scripts, TitanGrid runs as an indicator() , but includes its own full internal simulation engine.
This allows it to track capital, equity, PnL, risk exposure, and trade performance bar-by-bar — effectively simulating a custom backtest, while remaining compatible with real-time alert-based execution systems.
The concept was born from the fusion of two prior systems:
Assassin’s Grid (grid-based execution and structure) + Super 8 (trend-filtering, smart capital logic), both developed under the AssassinsGrid framework.
🔹 Disclaimer
This is an experimental tool intended for research, testing, and educational use.
It does not provide guaranteed outcomes and should not be interpreted as financial advice.
Use with demo or simulated accounts before considering live deployment.
🔹 Execution Logic
Trend direction is filtered through a custom SuperTrend engine. Once confirmed:
• Long entries trigger on pullbacks, exiting progressively as price moves up
• Short entries trigger on rallies, exiting as price declines
Grid levels are spaced by configurable percentage width, and entries scale dynamically.
🔹 Stop Loss Mechanism
TitanGrid uses a dual-layer stop system:
• A static stop per entry, placed at a fixed percentage distance matching the grid width
• A trend reversal exit that closes the entire position if price crosses the SuperTrend in the opposite direction
Stops are triggered once per cycle, ensuring predictable and capital-aware behavior.
🔹 Key Features
• Dual-side grid logic (Long-only, Short-only, or Both)
• SuperTrend filtering to enforce directional bias
• Adjustable grid spacing, scaling, and sizing
• Static and dynamic stop-loss logic
• Partial exits and reset conditions
• Webhook-ready alerts (browser-based automation compatible)
• Internal simulation of equity, PnL, fees, and liquidation levels
• Real-time dashboard for full transparency
🔹 Best Use Cases
TitanGrid performs best in structured or mean-reverting environments.
It is especially well-suited to assets with the behavioral profile of ETH — reactive, trend-intraday, and prone to clean pullback formations.
While adaptable to multiple timeframes, it shows strongest performance on the 15-minute chart , offering a balance of signal frequency and directional clarity.
🔹 License
Published under the Mozilla Public License 2.0 .
You are free to study, adapt, and extend this script.
🔹 Panel Reference
The real-time dashboard displays performance metrics, capital state, and position behavior:
• Asset Type – Automatically detects the instrument class (e.g., Crypto, Stock, Forex) from symbol metadata
• Equity – Total simulated capital: realized PnL + floating PnL + remaining cash
• Available Cash – Capital not currently allocated to any position
• Used Margin – Capital locked in open trades, based on position size and leverage
• Net Profit – Realized gain/loss after commissions and fees
• Raw Net Profit – Gross result before trading costs
• Floating PnL – Unrealized profit or loss from active positions
• ROI – Return on initial capital, including realized and floating PnL. Leverage directly impacts this metric, amplifying both gains and losses relative to account size.
• Long/Short Size & Avg Price – Open position sizes and volume-weighted average entry prices
• Leverage & Liquidation – Simulated effective leverage and projected liquidation level
• Hold – Best-performing hold side (Long or Short) over the session
• Hold Efficiency – Performance efficiency during holding phases, relative to capital used
• Profit Factor – Ratio of gross profits to gross losses (realized)
• Payoff Ratio – Average profit per win / average loss per loss
• Win Rate – Percent of profitable closes (including partial exits)
• Expectancy – Net average result per closed trade
• Max Drawdown – Largest recorded drop in equity during the session
• Commission Paid – Simulated trading costs: maker, taker, funding
• Long / Short Trades – Count of entry signals per side
• Time Trading – Number of bars spent in active positions
• Volume / Month – Extrapolated 30-day trading volume estimate
• Min Capital – Lowest equity level recorded during the session
🔹 Reference Ranges by Strategy Type
Use the following metrics as reference depending on the trading style:
Grid / Mean Reversion
• Profit Factor: 1.2 – 2.0
• Payoff Ratio: 0.5 – 1.2
• Win Rate: 50% – 70% (based on partial exits)
• Expectancy: 0.05% – 0.25%
• Drawdown: Moderate to high
• Commission Impact: High
Trend-Following
• Profit Factor: 1.5 – 3.0
• Payoff Ratio: 1.5 – 3.5
• Win Rate: 30% – 50%
• Expectancy: 0.3% – 1.0%
• Drawdown: Low to moderate
Scalping / High-Frequency
• Profit Factor: 1.1 – 1.6
• Payoff Ratio: 0.3 – 0.8
• Win Rate: 80% – 95%
• Expectancy: 0.01% – 0.05%
• Volume / Month: Very high
Breakout Strategies
• Profit Factor: 1.4 – 2.2
• Payoff Ratio: 1.2 – 2.0
• Win Rate: 35% – 60%
• Expectancy: 0.2% – 0.6%
• Drawdown: Can be sharp after failed breakouts
🔹 Note on Performance Simulation
TitanGrid includes internal accounting of fees, slippage, and funding costs.
While its logic is designed for precision and capital efficiency, performance is naturally affected by exchange commissions.
In frictionless environments (e.g., zero-fee simulation), its high-frequency logic could — in theory — extract substantial micro-edges from the market.
However, real-world conditions introduce limits, and all results should be interpreted accordingly.
COV Bands ~ C H I P ACOV Bands ~ C H I P A is a custom volatility and trend identification tool designed to capture directional shifts using the Coefficient of Variation (COV), calculated from standard deviation relative to a mean price baseline.
Key features include:
A configurable SMA-based mean baseline to anchor volatility measurements clearly.
Adjustable upper and lower band multipliers to independently calibrate sensitivity and responsiveness for bullish or bearish breakouts.
Dynamic bands derived from price-relative volatility (COV), enabling adaptive identification of significant price deviations.
User-controlled standard deviation length to manage sensitivity and smoothness of volatility signals.
Direct candle coloring, providing immediate visual feedback using vibrant electric blue for bullish momentum and bright red for bearish momentum.
This indicator is particularly useful for detecting meaningful price movements, breakout signals, and potential reversals when the market moves significantly beyond its typical volatility boundaries.
Note: This indicator has not undergone formal robustness or optimization testing. Therefore, future performance in live trading environments isn't guaranteed.
Stocks ATR V2 📘 Description — Stocks AT SL V2
“Stocks AT SL V2” is a risk management indicator designed to help traders define dynamic stop-loss levels based on actual market volatility and advanced statistical analysis of price movements.
⸻
🎯 Purpose
This tool provides a rational and adaptive framework for stop-loss placement, taking into account:
Market volatility, measured by the Average True Range (ATR),
And a statistical safety buffer, based on the 95th percentile of historical price retracements.
⸻
⚙️ Methodology
ATR Calculation:
The indicator uses a 14-period ATR to measure recent average volatility.
Safety Factor (k) Estimation:
The script computes a set of ratios between the candle’s minimal retracement (relative to the previous close) and the current ATR.
The 95th percentile of these ratios is extracted to define a multiplicative factor k, representing common price extremes.
Final Stop-Loss:
The stop-loss is set at a distance of k × ATR below (or above) the entry price.
This helps reduce false stop-outs while allowing room for natural market movement—even in volatile conditions.
⸻
✅ Benefits
Automatically adapts to volatility.
Reflects real candlestick structure (not just arbitrary distances).
Standardizes risk across different stocks or currency pairs.
Gabriel's Squeeze Momentum PRO📌 Gabriel’s Squeeze Momentum PRO
A full-spectrum market compression, momentum, and seasonality suite engineered for cycle-aware traders.
🚀 What Is It?
Gabriel’s Squeeze Momentum PRO is an advanced trading indicator that detects volatility compression, calculates adaptive momentum, and reveals hidden seasonal opportunities. It builds on and transcends the traditional SQZMOM by incorporating spectral filters (Ehlers/MESA), Goertzel transforms, Pivot reversal logic, and optional seasonality overlays based on rolling-year returns. The script adapts to all timeframes and asset classes—stocks, futures, crypto, and forex.
🔍 Key Modules
🔸 1. Dynamic Squeeze Detection (RAFA Framework)
Identifies 5 squeeze types: Wide (🟠), Normal (🔴), Narrow (🟡), Very Narrow (🟣), and Fired (🟢).
Uses adaptive Bollinger Band and Keltner Channel thresholds unique to each timeframe (15m to 1M).
BB multiplier is adjusted dynamically via Goertzel and RMS-volatility signals.
Comes with RAFA alerts: Ready (compression), Aim (Jurik trigger), and Fire (breakout).
🔸 2. Adaptive Momentum Engine
Core momentum line: Linear regression of mid-price deviation from SMA + highest/lowest mean.
Signal line: Jurik Moving Average (JMA) with adaptive phasing and power smoothing.
Multiple normalization modes:
Unbounded (raw)
Min-Max (0–100)
RSX-based (centered -50 * 2)
Standard Deviations (via Butterworth/EMA RMS)
Optional Directional Momentum Mode: highlights histogram slope/angle with four-tier color coding.
🔸 3. MESA-Based Dynamic Bands
Calculates dominant fast and slow cycles via Maximum Entropy Spectral Analysis.
Computes a composite cyclic memory and percentile-based overbought/oversold levels.
Enables dynamic OS/OB bands that adjust with the market rhythm.
🔸 4. Multi-Timeframe MA Ribbon
Fully customizable ribbon with 5 MA slots per timeframe.
Supports 10 MA types: SMA, EMA, WMA, VWMA, RMA, DEMA, TEMA, LSMA, KAMA, TRAMA.
Includes Symmetrical MA smoothing via ta.swma() for visual consistency across volatile markets.
Optional trend coloring and ribbon overlays.
🔸 5. Goertzel + RMS-Filtered ROC
Rate of change line for momentum differentials with scaling multiplier.
Option to use Goertzel frequency detection to dynamically adjust the adaptive length.
📈 Additional Features
🔹 Williams VIX Fix Integration
Includes both standard and Inverse WVF for top/bottom detection.
Highlights both Aggressive (AE) and Filtered (FE) entry/exit zones.
Alerts and optional OBV-based squeeze dots included.
Useful for spotting reversals, early volatility expansions, and sentiment shifts.
🔹 Grab Bar System
Inspired by Michael Covel's trend-following logic.
Colors bars based on EMA(34) or RMA(28) channels to visually identify entry zones.
Overlayed trend direction markers on bar close.
🔹 Reversal Signal Lines
Plots DM-style pivot projections on momentum crossovers with configurable MA length.
Color-coded bullish and bearish setups.
🧠 Seasonality Toolkit (Seasonax Mode)
📅 Year-Based Return Modeling
Aggregates historical price returns per calendar year.
Supports 4 independent lookback periods (e.g., 5y, 10y, 15y, 30y).
Automatically filters outliers via IQR method (customizable factor setting).
📉 Detrending Options
Choose from:
Off: Raw seasonal trend
Linear: Removes regression slope
MA: Removes centered moving average
🎯 Entry/Exit Highlights
Highlights the most bullish/bearish seasonal windows using rolling return ranges.
Labels best seasonal entry and exit points on the chart.
🧰 Visual Grid & Legend
Clean grid overlay with monthly divisions.
Inline legend with custom line styles, sizes, and colors for each year set.
⚙️ Customization Highlights
Feature Options / Notes
Normalization Unbounded, Min-Max, RSX, Standard Deviation
MA Ribbon Enable/disable, Symmetry smoothing, full color & type customization
Momentum Direction Mode Directional histogram vs. baseline coloring
Reversal Logic Toggle per timeframe with custom JMA length
Cauchy Smoothing Gamma adjustable (0.1–6), optionally volume-weighted
Goertzel Filtering For adaptive momentum length and rate of change signal scaling
Timeframe Logic Fully adapts thresholds, lengths, and styles based on current chart timeframe
Seasonality Mode Custom lookbacks, overlays, trend removal, best/worst windows
📊 Alerts Included
🔔 Momentum Crossovers: Bullish/Bearish Reversals
🔔 Squeeze States: Wide, Normal, Narrow, Very Narrow, and Fired
🔔 WVF Events: Raw, Aggressive, Filtered, Inverted (Top Detection)
🔔 New Month + EOM Warnings: Seasonality-aware shift alerts
✅ Use Cases
Use Case How It Helps
🔹 Squeeze Breakout Trader Detects compression zones and high-probability breakouts
🔹 Cycle-Based Swing Trader Uses MESA filters + band dynamics to time pullbacks and mean reversion
🔹 Volatility Strategist Tracks multi-tier squeeze states across intraday to monthly charts
🔹 Seasonal Analyst Highlights best/worst periods using historical seasonality and anomaly logic
🔹 Reversal Sniper Uses signal cross + DM-pivots for precise reversal line placement
🎓 Advanced Math Behind It
Spectral Analysis: MESA (John Ehlers), Goertzel Transform
High/Low-Pass Filtering: 2-pole Butterworth + Super Smoother
Momentum Deviation: Linear regression + SMA + Cauchy-weighted midlines
Cyclic Band Percentiles: Rolling histograms, percentile mapping
Seasonal Aggregation: Rolling years + IQR outlier pruning
Volatility Proxy: RMS + adaptive deviation = signal-agnostic band precision
Mark Friday the 13thMarks all Friday the 13th days on the chart.
Could be used to see if Friday the 13th has any impact on the market.
Candle Range % vs 8-Candle AvgCandle % Indicator – Measure Candle Strength by Range %
**Overview:**
The *Candle % Indicator* helps traders visually and analytically gauge the strength or significance of a price candle relative to its recent historical context. This is particularly useful for detecting breakout moves, volatility shifts, or overextended candles that may signal exhaustion.
**What It Does:**
* Calculates the **percentage range** of the current candle compared to the **average range of the past N candles**.
* Highlights candles that exceed a user-defined threshold (e.g., 150% of the average range).
* Useful for **filtering out extreme candles** that might represent anomalies or unsustainable moves.
* Can be combined with other strategies (like EMA crossovers, support/resistance breaks, etc.) to improve signal quality.
**Use Case Examples:**
***Filter out fakeouts** in breakout strategies by ignoring candles that are overly large and may revert.
***Volatility control**: Avoid entries when market conditions are erratic.
**Confluence**: Combine with EMA or RSI signals for refined entries.
**How to Read:**
* If a candle is larger than the average range by more than the set percentage (default 150%), it's flagged (e.g., no entry signal or optional visual marker).
* Ideal for intraday, swing, or algorithmic trading setups.
**Customizable Inputs:**
**Lookback Period**: Number of previous candles to calculate the average range.
**% Threshold**: Maximum percentage a candle can exceed the average before being filtered or marked.
RSI Shifting Band Oscillator | QuantMAC📊 RSI Shifting Band Oscillator | QuantMAC
🎯 Overview
The RSI Shifting Band Oscillator represents a breakthrough in adaptive technical analysis, combining the innovative dual-stage RSI processing with dynamic volatility bands to create an oscillator that automatically adjusts to changing market momentum conditions. This cutting-edge indicator goes beyond traditional static approaches by using smoothed RSI to dynamically shift band width based on momentum transitions, providing superior signal accuracy across different market regimes.
🔧 Key Features
Revolutionary Dual RSI Technology: Proprietary two-stage RSI calculation with exponential smoothing that measures momentum transitions in real-time
Dynamic Adaptive Bands: Self-adjusting volatility bands that expand and contract based on RSI distance from equilibrium
Dual Trading Modes: Flexible Long/Short or Long/Cash strategies for different trading preferences
Advanced Performance Analytics: Comprehensive metrics including Sharpe, Sortino, and Omega ratios
Smart Visual System: Dynamic color coding with 9 professional color schemes
Precision Backtesting: Date range filtering with detailed historical performance analysis
Real-time Signal Generation: Clear entry/exit signals with customizable threshold sensitivity
Position Sizing Intelligence: Half Kelly criterion for optimal risk management
📈 How The Dual RSI Technology Works
The Dual RSI system is the heart of this indicator's innovation. Unlike traditional RSI implementations, this approach analyzes the smoothed momentum transitions between different RSI states, providing early warning signals for momentum regime changes.
RSI Calculation Process:
Calculate traditional RSI using specified length and price source
Apply exponential moving average smoothing to reduce noise
Measure RSI distance from neutral 50 level to determine momentum strength
Use RSI deviation to dynamically adjust standard deviation multipliers
Create adaptive bands that respond to momentum conditions
Generate normalized oscillator values for clear signal interpretation
The genius of this dual RSI approach lies in its ability to detect when markets are transitioning between momentum and consolidation periods before traditional indicators catch up. This provides traders with a significant edge in timing entries and exits.
⚙️ Comprehensive Parameter Control
RSI Settings:
RSI Length: Controls the lookback period for momentum analysis (default: 14)
RSI Smoothing: Reduces noise in RSI calculations using EMA (default: 20)
Source: Price input selection (close, open, high, low, etc.)
Oscillator Settings:
Base Length: Foundation moving average for band calculations (default: 40)
Standard Deviation Length: Period for volatility measurement (default: 26)
SD Multiplier: Base band width adjustment (default: 2.7)
Oscillator Multiplier: Scaling factor for oscillator values (default: 100)
Signal Thresholds:
Long Threshold: Bullish signal trigger level (default: 90)
Short Threshold: Bearish signal trigger level (default: 56)
🎨 Advanced Visual System
Main Chart Elements:
Dynamic Shifting Bands: Upper and lower bands that automatically adjust width based on RSI momentum
Adaptive Fill Zone: Color-coded area between bands showing current market state
Basis Line: Moving average foundation displayed as subtle reference points
Smart Bar Coloring: Candles change color based on oscillator state for instant visual feedback
Oscillator Pane:
Normalized RSI Oscillator: Main signal line centered around zero with dynamic coloring
Threshold Lines: Horizontal reference lines for entry/exit levels
Zero Line: Central reference for oscillator neutrality
Color State Indication: Line colors change based on bullish/bearish conditions
📊 Professional Performance Metrics
The built-in analytics suite provides institutional-grade performance measurement:
Net Profit %: Total strategy return percentage
Maximum Drawdown %: Worst peak-to-trough decline
Win Rate %: Percentage of profitable trades
Profit Factor: Ratio of gross profits to gross losses
Sharpe Ratio: Risk-adjusted return measurement
Sortino Ratio: Downside-focused risk adjustment
Omega Ratio: Probability-weighted performance ratio
Half Kelly %: Optimal position sizing recommendation
Total Trades: Complete transaction count
🎯 Strategic Trading Applications
Long/Short Mode: ⚡
Maximizes profit potential by capturing both upward and downward price movements. The dual RSI technology helps identify when momentum is strengthening or weakening, allowing for optimal position switches between long and short.
Long/Cash Mode: 🛡️
Conservative approach ideal for retirement accounts or risk-averse traders. The indicator's adaptive nature helps identify the best times to be invested versus sitting in cash, protecting capital during adverse market conditions.
🚀 Unique Advantages
Traditional Indicators vs RSI Shifting Bands:
Static vs Dynamic: While most indicators use fixed parameters, RSI bands adapt in real-time
Lagging vs Leading: Dual RSI detects momentum transitions before they fully manifest
One-Size vs Adaptive: The same settings work across different market conditions
Simple vs Intelligent: Advanced momentum analysis provides superior market insight
💡 Professional Setup Guide
For Day Trading (Short-term):
RSI Length: 10-12
RSI Smoothing: 15-18
Base Length: 25-30
Thresholds: Long 85, Short 60
For Swing Trading (Medium-term):
RSI Length: 14-16 (default range)
RSI Smoothing: 20-25
Base Length: 40-50
Thresholds: Long 90, Short 56 (defaults)
For Position Trading (Long-term):
RSI Length: 18-21
RSI Smoothing: 25-30
Base Length: 60-80
Thresholds: Long 92, Short 50
🧠 Advanced Trading Techniques
RSI Divergence Analysis:
Watch for divergences between price action and smoothed RSI readings. When price makes new highs/lows but RSI doesn't confirm, it often signals upcoming reversals.
Band Width Interpretation:
Expanding Bands: Increasing momentum, expect larger price moves
Contracting Bands: Decreasing momentum, prepare for potential breakouts
Band Touches: Price touching outer bands often signals reversal opportunities
Multi-Timeframe Analysis:
Use RSI oscillator on higher timeframes for trend direction and lower timeframes for precise entry timing.
⚠️ Important Risk Disclaimers
Past performance is not indicative of future results. This indicator represents advanced technical analysis but should never be used as the sole basis for trading decisions.
Critical Risk Factors:
Market Conditions: No indicator performs equally well in all market environments
Backtesting Limitations: Historical performance may not reflect future market behavior
Momentum Risk: Adaptive indicators can be sensitive to extreme momentum conditions
Parameter Sensitivity: Different settings may produce significantly different results
Capital Risk: Always use appropriate position sizing and stop-loss protection
📚 Educational Benefits
This indicator provides exceptional learning opportunities for understanding:
Advanced RSI analysis and momentum measurement techniques
Adaptive indicator design and implementation
The relationship between momentum transitions and price movements
Professional risk management using Kelly Criterion principles
Modern oscillator interpretation and signal generation
🔍 Market Applications
The RSI Shifting Band Oscillator works across various markets:
Forex: Excellent for currency pair momentum analysis
Stocks: Individual equity and index trading
Commodities: Adaptive to commodity market momentum cycles
Cryptocurrencies: Handles extreme momentum variations effectively
Futures: Professional derivatives trading applications
🔧 Technical Innovation
The RSI Shifting Band Oscillator represents years of research into adaptive technical analysis. The proprietary dual RSI calculation method has been optimized for:
Computational Efficiency: Fast calculation even on high-frequency data
Noise Reduction: Advanced smoothing without excessive lag
Market Adaptability: Automatic adjustment to changing conditions
Signal Clarity: Clear, actionable trading signals
🔔 Updates and Evolution
The RSI Shifting Band Oscillator | QuantMAC continues to evolve with regular updates incorporating the latest research in adaptive technical analysis. The code is thoroughly documented for transparency and educational purposes.
Trading Notice: Financial markets involve substantial risk of loss. The RSI Shifting Band Oscillator is a sophisticated technical analysis tool designed to assist in trading decisions but cannot guarantee profitable outcomes.
---
Master The Markets With Adaptive Intelligence! 🎯📈
ATR RopeATR Rope is inspired by DonovanWall's "Range Filter". It implements a similar concept of filtering out smaller market movements and adjusting only for larger moves. In addition, this indicator goes one step deeper by producing actionable zones to determine market state. (Trend vs. Consolidation)
> Background
When reading up on the Range Filter indicator, it reminded me exactly of a Rope stabilization drawing tool in a program I use frequently. Rope stabilization essentially attaches a fixed length "rope" to your cursor and an anchor point (Brush). As you move your cursor, you are pulling the brush behind it. The cursor (of course) will not pull the brush until the rope is fully extended, this behavior filters out jittery movements and is used to produce smoother drawing curves.
If compared visually side-by-side, you will notice that this indicator bears striking resemblance to its inspiration.
> Goal
Other than simply distinguishing price movements between meaningful and noise, this indicator strives to create a rigid structure to frame market movements and lack-there-of, such as when to anticipate trend, and when to suspect consolidation.
Since the indicator works based on an ATR range, the resulting ATR Channel does well to get reactions from price at its extremes. Naturally, when consolidating, price will remain within the channel, neither pushing the channel significantly up or down. Likewise, when trending, price will continue to push the channel in a single direction.
With the goal of keeping it quick and simple, this indicator does not do any smoothing of data feeds, and is simply based on the deviation of price from the central rope. Adjusting the rope when price extends past the threshold created by +/- ATR from the rope.
> Features & Behaviors
- ATR Rope
ATR Rope is displayed as a 3 color single line.
This can be considered the center line, or the directional line, whichever you'd prefer.
The main point of the Rope display is to indicate direction, however it also is factually the center of the current working range.
- ATR Rope Color
When the rope's value moves up, it changes to green (uptrend), when down, red (downtrend).
When the source crosses the rope, it turns blue (flat).
With these simple rules, we've formed a structure to view market movements.
- Consolidation Zones
Consolidation Zones generate from "Flat" areas, and extend into subsequent trend areas. Consolidation is simply areas where price has crossed the Rope and remains inside the range. Over these periods, the upper and lower values are accumulated and averaged together to form the "Consolidation Zone" values. These zones are draw live, so values are averaged as the flat areas progress and don't repaint, so all values seen historically are as they would appear live.
- ATR Channel
ATR Channel displays the upper and lower bounds of the working range.
When the source moves beyond this range, the rope is adjusted based on the distance from the source to the channel. This range can be extremely useful to view, but by default it is hidden.
> Application
This indicator is not created to provide signals, or serve as a "complete" system.
(People who didn't read this far will still comment for signals. :) )
This is created to be used alongside manual interpretation and intuition. This indicator is not meant to constrain any users into a box, and I would actually encourage an open mind and idea generation, as the application of this indicator can take various forms.
> Examples
As you would probably already know, price movement can be fast impulses, and movement can be slow bleeds. In the screenshot below, we are using movements from and to consolidation zones to classify weak trend and strong trend. As you can see, there are also areas of consolidation which get broken out of and confirmed for the larger moves.
Author's Note: In each of these examples, I have outlined the start and end of each session. These examples come from 1 Min Future charts, and have specifically been framed with day trading in mind.
"Breakout Retest" or "Support/Resistance Flips" or "Structure Retests" are all generally the same thing, with different traders referring to them by different names, all of which can be seen throughout these examples.
In the next example, we have a day which started with an early reversal leading into long, slow, trend. Notice how each area throughout the trend essentially moves slightly higher, then consolidates while holding support of the previous zone. This day had a few sharp movements, however there was a large amount of neutrality throughout this day with continuous higher lows.
In contrast to the previous example, next up, we have a very choppy day. Throughout which we see a significant amount of retests before fast directional movements. We also see a few examples of places where previous zones remained relevant into the future. While the zones only display into the resulting trend area, they do not become immediately meaningless once they stop drawing.
> Abstract
In the screenshot below, I have stacked 2 of these indicators, using the high as the source for one and the low as the source for the other. I've hidden lines of the high and low channels to create a 4 lined channel based on the wicks of price.
This is not necessary to use the indicator, but should help provide an idea of creative ways the simple indicator could be used to produce more complicated analysis.
If you've made it this far, I would hope it's clear to you how this indicator could provide value to your trading.
Thank you to DonovonWall for the inspiration.
Enjoy!