Multi Rate of Change (ROC) - 3 LinesMulti Rate of Change (ROC) - 3 Lines
This custom indicator displays three Rate of Change (ROC) lines, each with independently adjustable lookback periods (default: 7, 30, and 100 days). It allows you to quickly compare short-, mid-, and long-term price momentum on the same chart.
All ROC lines show the percent change of the close price compared to N bars ago.
The color, thickness, and style (solid, dotted, dashed) of each ROC line can be customized in the settings.
A zero reference line is included and can also be customized.
Suitable for momentum analysis and identifying trend acceleration or deceleration at multiple timeframes.
Designed for easy use: simply add the indicator to your chart and adjust the settings as needed.
How to use:
Add the indicator to your chart.
Set each ROC period (e.g., 7, 30, 100 days) as desired.
Adjust colors, line widths, and styles for better visibility.
Interpret positive ROC values as upward momentum, negative values as downward momentum.
No repainting. All calculations use close prices only.
If you need more ROC lines or additional features, let me know!
指標和策略
Trigonometric StochasticTrigonometric Stochastic - Mathematical Smoothing Oscillator
Overview
A revolutionary approach to stochastic oscillation using sine wave mathematical smoothing. This indicator transforms traditional stochastic calculations through trigonometric functions, creating an ultra-smooth oscillator that reduces noise while maintaining sensitivity to price changes.
Mathematical Foundation
Unlike standard stochastic oscillators, this version applies sine wave smoothing:
• Raw Stochastic: (close - lowest_low) / (highest_high - lowest_low) × 100
• Trigonometric Smoothing: 50 + 50 × sin(2π × raw_stochastic / 100)
• Result: Naturally smooth oscillator with mathematical precision
Key Features
Advanced Smoothing Technology
• Sine Wave Filter: Eliminates choppy movements while preserving signal integrity
• Natural Boundaries: Mathematically constrained between 0-100
• Reduced False Signals: Trigonometric smoothing filters market noise effectively
Traditional Stochastic Levels
• Overbought Zone: 80 level (dashed line)
• Oversold Zone: 20 level (dashed line)
• Midline: 50 level (dotted line) - equilibrium point
• Visual Clarity: Clean oscillator panel with clear level markings
Smart Signal Generation
• Anti-Repaint Logic: Uses confirmed previous bar values
• Buy Signals: Generated when crossing above 30 from oversold territory
• Sell Signals: Generated when crossing below 70 from overbought territory
• Crossover Detection: Precise entry/exit timing
Professional Presentation
• Separate Panel: Dedicated oscillator window (overlay=false)
• Price Format: Formatted as price indicator with 2-decimal precision
• Theme Adaptive: Automatically matches your chart color scheme
Parameters
• Cycle Length (5-200): Period for highest/lowest calculations
- Shorter periods = more sensitive, more signals
- Longer periods = smoother, fewer but stronger signals
Trading Applications
Momentum Analysis
• Overbought/Oversold: Clear visual identification of extreme levels
• Momentum Shifts: Early detection of momentum changes
• Trend Strength: Monitor oscillator position relative to midline
Signal Trading
• Long Entries: Buy when crossing above 30 (oversold bounce)
• Short Entries: Sell when crossing below 70 (overbought rejection)
• Confirmation Tool: Use with trend indicators for higher probability trades
Divergence Detection
• Bullish Divergence: Price makes lower lows, oscillator makes higher lows
• Bearish Divergence: Price makes higher highs, oscillator makes lower highs
• Early Warning: Spot potential trend reversals before they occur
Trading Strategies
Scalping (5-15min timeframes)
• Use cycle length 10-14 for quick signals
• Focus on 20/80 level bounces
• Combine with price action confirmation
Swing Trading (1H-4H timeframes)
• Use cycle length 20-30 for reliable signals
• Wait for clear crossovers with momentum
• Monitor divergences for reversal setups
Position Trading (Daily+ timeframes)
• Use cycle length 50+ for major signals
• Focus on extreme readings (below 10, above 90)
• Combine with fundamental analysis
Advantages Over Standard Stochastic
1. Smoother Action: Sine wave smoothing reduces whipsaws
2. Mathematical Precision: Trigonometric functions provide consistent behavior
3. Maintained Sensitivity: Smoothing doesn't compromise signal quality
4. Reduced Noise: Cleaner signals in volatile markets
5. Visual Appeal: More aesthetically pleasing oscillator movement
Best Practices
• Market Context: Consider overall trend direction
• Multiple Timeframe: Confirm signals on higher timeframes
• Risk Management: Always use proper position sizing
• Backtesting: Test parameters on your preferred instruments
• Combination: Works excellently with trend-following indicators
Built-in Alerts
• Buy Alert: Trigonometric stochastic oversold crossover
• Sell Alert: Trigonometric stochastic overbought crossunder
Technical Specifications
• Pine Script Version: v6
• Panel: Separate oscillator window
• Format: Price indicator with 2-decimal precision
• Performance: Optimized for all timeframes
• Compatibility: Works with all instruments
Free and open-source indicator. Modify, improve, and share with the community!
Educational Value: Perfect for traders wanting to understand how mathematical smoothing improves oscillators and trigonometric applications in technical analysis.
Trigonometric Sine Cosine WavesTrigonometric Sine Cosine Waves - Advanced Cyclical Analysis
Overview
This innovative indicator applies trigonometric mathematics to market analysis, generating dynamic sine and cosine waves that adapt to price movement and volatility. Unlike traditional oscillators, this tool visualizes market cycles directly on your chart using mathematical wave functions.
How It Works
The indicator calculates phase-based waves using:
• Phase Calculation: 2π × bar_index / cycle_length
• Adaptive Amplitude: EMA-based price + ATR volatility scaling
• Sine Wave: avgPrice + volatility × sin(phase)
• Cosine Wave: avgPrice + volatility × cos(phase)
Key Features
Dynamic Wave Generation
• Sine Wave: Primary cycle indicator with smooth transitions
• Cosine Wave: Leading indicator (90° phase difference from sine)
• Adaptive Amplitude: Automatically adjusts to market volatility using ATR
Turning Point Detection
• Anti-Repaint Signals: Uses confirmed values from previous bars
• Sine Bottom: Potential buy zones when wave transitions from down to up
• Sine Top: Potential sell zones when wave transitions from up to down
Advanced Analytics
• Price Correlation Angle: Shows relationship between price movement and cycle
• Phase Information: Current position in the mathematical cycle
• Real-time Values: Live sine/cosine values and phase degrees
Visual Enhancement
• Background Coloring: Changes based on sine wave position (above/below zero)
• Clean Overlay: Waves plot directly on price chart without cluttering
Parameters
• Cycle Length (5-200): Controls wave frequency - shorter = more sensitive
• Amplitude Multiplier (0.1-5.0): Adjusts wave height relative to volatility
• Display Options : Toggle sine wave, cosine wave, and correlation table
• Show Correlation : Optional table showing mathematical values
Trading Applications
Cycle Analysis
• Identify market rhythm and timing
• Spot potential reversal zones
• Understand price-to-cycle relationships
Entry/Exit Timing
• Buy Signals: Sine wave bottoms (cycle lows)
• Sell Signals: Sine wave tops (cycle highs)
• Confirmation: Use with other indicators for higher probability setups
Market Structure
• Visualize underlying market cycles
• Identify periods of high/low cyclical activity
• Track phase relationships between price and mathematical cycles
Pro Tips
1. Longer cycles (50-100) work better for swing trading
2. Shorter cycles (10-20) suitable for scalping
3. Combine with volume for stronger signal confirmation
4. Monitor correlation angle for trend strength assessment
5. Use background color as quick visual cycle reference
Important Notes
• Signals are anti-repaint using confirmed previous bar values
• Best used in trending or cyclical markets
• Consider market context when interpreting signals
• Mathematical approach - not based on traditional TA concepts
Alerts Included
• Sine Wave Buy Signal: Triggered on wave bottom detection
• Sine Wave Sell Signal: Triggered on wave top detection
Technical Requirements
• Pine Script v6
• Works on all timeframes
• No external dependencies
• Optimized for performance
This is a free, open-source indicator. Feel free to modify and improve according to your trading needs!
Educational Value: Perfect for understanding how mathematical functions can be applied to market analysis and cycle detection.
NY/LDN/TOK Stock Exchange Opening HoursThis indicator displays vertical dotted lines marking the exact opening times of the three major global stock exchanges: New York (NYSE), London (LSE), and Tokyo (TSE). Perfect for traders who need to track market opening sessions across different time zones.
Features:
New York Stock Exchange (NYSE): 9:30 AM EST/EDT
London Stock Exchange (LSE): 8:00 AM GMT/BST
Tokyo Stock Exchange (TSE): 9:00 AM JST
Key Highlights:
✓ Automatic daylight saving time adjustments for NY and London
✓ Individual color customization for each market
✓ Toggle on/off functionality for each exchange
✓ Clean vertical dotted lines (1-pixel width) that extend across the entire chart
✓ Interactive legend in bottom-right corner showing active markets
✓ Weekdays only (Monday-Friday) - no weekend lines
✓ Uses official local time zones for accurate timing
Customizable Settings:
Enable/disable individual exchanges
Custom color selection for each market line
Dynamic legend that shows only enabled markets
Time Zone Handling:
The indicator automatically handles daylight saving time transitions using official time zones:
America/New_York (EST/EDT)
Europe/London (GMT/BST)
Asia/Tokyo (JST - no DST)
Perfect for:
Multi-market traders
Session overlap analysis
Global market timing coordination
Institutional trading schedules
Simply add to your chart and customize colors/visibility in the indicator settings. The legend will automatically update to show your active markets in their respective colors.
AlphaEdge SR Modulentroducing AlphaEdge SR Module – a powerful tool that combines:
🔹 Clean S/R Zones (Daily & 4H)
🔹 EMA Trend Filters
🔹 RSI OB/OS Highlighting
🔹 Reversal Candle Detection (Engulfing, Pin Bar, Doji)
🔹 Volume Spike Highlighting
🔹 Smart Signal Labels with EMA, RSI, and Volume
Optimized for Gold (XAUUSD), Forex, and Crypto on 1H+ timeframes.
Use it for trend reversals, breakouts, or S/R scalping.
🎯 Public & Free – Search “AlphaEdge SR Module” under Community Scripts.
Supertrend & MACD with 60 EMA Signalsthis is a great way to understand market without getting biased ...excellent for intraday entry
MR.Z Stoch RSI %K Reversal Signals🟢 K Strategy Description
The K Strategy is a momentum-based trading technique using the %K line from the Stochastic Oscillator. It is designed to detect potential reversal points in price trends by identifying extreme conditions of overbought and oversold levels.
✅ Core Logic:
The strategy monitors the %K line (a smoothed form of RSI momentum).
A Buy Signal is triggered when:
The %K line dips to or below a defined lower threshold (commonly 30 or less).
This suggests the asset is oversold and may soon reverse upward.
A Sell Signal is triggered when:
The %K line peaks above an upper threshold (commonly 70 or more).
This suggests the asset is overbought and may reverse downward.
⚙️ Adjustable Parameters:
K Length: The sensitivity of the %K calculation (affects how fast it responds).
Buy Level: Set your oversold trigger (e.g., 20–40).
Sell Level: Set your overbought trigger (e.g., 60–100).
Signal Smoothing (optional): Helps reduce noise and avoid false triggers.
📈 Use Case:
This strategy is effective in ranging markets where prices frequently oscillate. It can also be used with other indicators (like EMA, volume filters, or price action confirmation) to increase accuracy in trending conditions.
Enhanced Predator Suite🎯 Simple Predator Suite Guide - What You See on Your Chart
📍 What to Look For RIGHT NOW on Your BTC Chart
1. BAR COLORS (Most Important)
Look at the color of each price bar:
🟢 BRIGHT GREEN = BUY SIGNAL (Bull Strong)
🟢 LIGHT GREEN = Weak buy (be careful)
🟠 ORANGE = Weak sell (take profits)
🔴 RED = SELL SIGNAL (Bear Strong)
⚫ GRAY = DON'T TRADE (choppy market)
2. TRIANGLE SIGNALS
These are your entry points:
▲ GREEN TRIANGLE UP = Enter LONG (buy) on next bar
▼ RED TRIANGLE DOWN = Enter SHORT (sell) on next bar
3. TRAILING STOP LINES
🟢 GREEN LINE = Exit your long trades if price hits this
🔴 RED LINE = Exit your short trades if price hits this
🚀 SUPER SIMPLE TRADING METHOD
FOR LONG TRADES (BUYING)
Wait for a green triangle ▲ to appear
Buy on the next candle
Set stop loss below the green line
Take profit when bars turn orange or red
FOR SHORT TRADES (SELLING)
Wait for a red triangle ▼ to appear
Sell on the next candle
Set stop loss above the red line
Take profit when bars turn light green or bright green
WHEN TO STAY OUT
Gray bars = Market is confused, don't trade
No triangles = No clear entry signal
Price far from lines = You missed the move
🚫 COMMON MISTAKES TO AVOID
DON'T Do These Things:
❌ Trade during gray bars (choppy market)
❌ Enter without seeing a triangle signal
❌ Ignore the trailing stop lines
❌ Trade with big position sizes at first
❌ Chase price if you missed the triangle
DO These Instead:
✅ Wait patiently for clear triangle signals
✅ Always use the stop loss lines
✅ Start with tiny position sizes
✅ Take profits when bar colors change
✅ Stay out during gray bar periods
New Rsi For Entry FiltrationThis indicator, which is based on the RSI indicator, is written to prevent you from entering the wrong trade. Its operation is very simple. Enter a long trade when both the main area and the lower ribbon are green. Also, for a short trade, both the main area and the lower ribbon are red. The purple line also shows the stop loss level based on ATR. It is not advisable to enter the trade at the points indicated by R because the candlestick length is long.
COT Comm OsciDescription
The COT Comm Osci is a sentiment oscillator based on net positions from the weekly Commitments of Traders (COT) report.
It transforms net positions of Commercials, Noncommercials, or Nonreportables into a 0–100 index.
A value of 100 = highest net position within the selected timeframe.
A value of 0 = lowest net position.
You can define three historical intervals (e.g. 26/ 52 / 156 weeks).
Tip
To improve your analysis, it's recommended to add a separate COT indicator that visualizes raw Long/Short or net positions directly. This helps interpret the oscillator in context.
This script is based on “Commercial Index–Buschi” by MagicEins and has been extended with new features and error handling.
Features
Select between Commercial, Noncommercial, or Nonreportable trader groups
Proper handling of HG Futures (Copper)
Displays a warning if the root code is invalid (unsupported market symbol)
Zig Zag with HHLLThis powerful tool calculates and displays two Zig Zag patterns simultaneously while dynamically identifying key market structure points—Higher Highs (HH), Lower Lows (LL), Higher Lows (HL), and Lower Highs (LH).
Because the script is dynamic, the most recent HH, HL, LL, or LH can update in real-time as price action evolves. For example, if the price continues to rise, a previously marked HL may be reclassified as an LL. Likewise, a falling LH may later turn into a HH if the market reverses.
This script is versatile and can be applied to various trading strategies, including trend analysis, support and resistance identification, breakout setups, and more.
Added a new input parameter decimals that allows you to control the decimal precision:
Set to -1 (default) for automatic detection based on the symbol's minimum tick size
Set to 0-8 for a specific number of decimal places.
How it works:
Auto mode (decimals = -1): The script automatically determines how many decimal places to show based on the instrument's minimum tick size. For example:
Forex pairs (0.00001) → 5 decimals
Stocks ($0.01) → 2 decimals
Crypto (0.00000001) → 8 decimals
Manual mode (decimals = 0-8): You can force a specific number of decimal places if needed
6FG Plan Checklist & Alerts - Final Version🧠 SCRIPT OVERVIEW: "6FG A+ SETUP - Simplified"
This script is designed to identify high-probability A+ trade setups in alignment with your personal 6FG trading plan, based on:
H1 Break of Structure (required)
4H trend confirmation
15M candle confirmation
Session filter
A+ Label & Visual Table Checklist
✅ KEY COMPONENTS
1. Toggle Inputs
These allow you to customize your view and filters without changing the code:
showSession: Only allow alerts inside Asian or NY sessions
show4hTrend: Include or ignore 4H directional bias
show15mConfirm: Include or ignore confirmation from 15M candles
showTable: Display checklist table on chart
showLabel: Display the “✅ A+” label on qualifying bars
2. Session Filter
Defines valid timeframes for trading (Asian or New York)
Helps avoid setups during low-liquidity hours
Controlled by showSession
3. 4H Trend (Confirmation Only)
Uses a 20-period SMA on 4H to detect general bias:
Bullish = Price above SMA
Bearish = Price below SMA
This trend is not mandatory for an alert if toggle is off
4. H1 Break of Structure (REQUIRED)
Looks at the highest high and lowest low of the last 10 candles on the 1H timeframe
Detects either:
Bullish BOS = Current close > highest high
Bearish BOS = Current close < lowest low
This is the core trigger for the A+ setup
If BOS doesn't happen, no entry is valid
5. 15M Confirmation Candles
(Optional - controlled by show15mConfirm)
Checks for one of three confirmation patterns:
Bullish Engulfing
Bearish Engulfing
Pin Bar
This adds confidence but can be toggled off
6. Entry Conditions (A+ Setup)
All the following must be true for entryOK = true:
✅ H1 BOS (required)
✅ Session is valid (if toggle is on)
✅ 15M confirmation pattern (if toggle is on)
✅ 4H trend (if toggle is on)
7. Visual Output
If entryOK = true:
✅ A green "A+" label appears below price
✅ A checklist table on the top-right shows:
Session status ✔️❌
4H bullish/bearish ✔️❌
H1 BOS ✔️❌
15M confirmation ✔️❌
Final Direction: Bullish / Bearish / —
A+ Setup: ✔️❌
8. Alerts
You will receive a TradingView alert when an A+ Setup is detected:
OB/OS adaptative v1.1# OB/OS Adaptative v1.1 - Multi-Timeframe Adaptive Overbought/Oversold Indicator
## Overview
The `tradingview_indicator_emas.pine` script is a sophisticated multi-timeframe indicator designed to identify dynamic overbought and oversold levels in financial markets. It combines EMA (Exponential Moving Average) crossovers and Bollinger Bands across monthly, weekly, and daily timeframes to create adaptive support and resistance levels that adjust to changing market conditions.
## Core Functionality
### Multi-Timeframe Analysis
The indicator analyzes three timeframes simultaneously:
- **Monthly (M)**: Long-term trend identification
- **Weekly (W)**: Intermediate-term trend identification
- **Daily (D)**: Short-term volatility measurement
### Technical Indicators Used
- **EMA 9 and EMA 20**: For trend identification and momentum assessment
- **Bollinger Bands (20-period)**: For volatility measurement and extreme level identification
- **Price action**: For confirmation of level validity and signal generation
## Key Features
### Adaptive Level Calculation
The indicator dynamically determines overbought and oversold levels based on market structure and trend bias:
#### Monthly Level Logic
- **Bullish Bias** (when monthly open > EMA20):
- Oversold = lower of EMA9 or EMA20
- Overbought = upper of EMA9 or Bollinger Upper Band
- **Bearish/Neutral Bias** (when monthly open ≤ EMA20):
- Oversold = Bollinger Lower Band
- Overbought = upper of EMA20 or EMA9
#### Weekly Level Logic
- **Bullish Bias** (when weekly open > EMA20):
- Oversold = lower of EMA9 or EMA20
- Overbought = Bollinger Upper Band
- **Bearish/Neutral Bias** (when weekly open ≤ EMA20):
- Oversold = Bollinger Lower Band
- Overbought = upper of EMA20 or EMA9
#### Daily Level Logic
- Simple Bollinger Bands:
- Oversold = Bollinger Lower Band
- Overbought = Bollinger Upper Band
### Final Level Determination
The indicator combines all three timeframes through a weighted averaging process:
1. Calculates initial values as the average of monthly, weekly, and daily levels
2. Ensures mathematical consistency by enforcing overbought_final ≥ oversold_final using min/max functions
3. Calculates a midpoint average level as the center of the range
### Visual Elements
- **Dynamic Lines**: Draws horizontal lines for current and previous period overbought, oversold, and average levels
- **Labels**: Places clear textual labels at the start of each period
- **Color Coding**:
- Red for overbought levels (resistance)
- Green for oversold levels (support)
- Blue for average levels (pivot point)
- **Transparency**: Previous period lines use semi-transparent colors to distinguish between current and historical levels
### Update Mechanism
- **Calculation Day**: User-defined day of the week (default: Monday)
- On the specified calculation day, the indicator:
- Updates all levels based on previous bar's data
- Draws new lines extending forward for a user-defined number of days
- Maintains previous period lines for comparison and trend analysis
- Automatically deletes and recreates lines to ensure clean visualization
### Proximity Detection
- Alerts when price approaches overbought/oversold levels (configurable distance in percentage)
- Helps identify potential reversal zones before actual crossovers occur
- Distance thresholds are user-configurable for both overbought and oversold conditions
### Alert Conditions
The indicator provides four distinct alert types:
1. **Cross below oversold**: Triggered when price crosses below the oversold level
2. **Cross above overbought**: Triggered when price crosses above the overbought level
3. **Near oversold**: Triggered when price approaches the oversold level within the configured distance
4. **Near overbought**: Triggered when price approaches the overbought level within the configured distance
### Debug Mode
When enabled, displays comprehensive debug information including:
- Current values for all levels (oversold, overbought, average)
- Timeframe-specific calculations and raw data points
- System status information (current day, calculation day, etc.)
- Lines existence and timing information
- Organized in multiple labels at different price levels to avoid overlap
## Configuration Parameters
| Parameter | Default Value | Description |
|---------|---------------|-------------|
| Short EMA (9) | 9 | Length for short-term EMA calculation |
| Long EMA (20) | 20 | Length for long-term EMA calculation |
| BB Length | 20 | Period for Bollinger Bands calculation |
| Std Dev | 2.0 | Standard deviation multiplier for Bollinger Bands |
| Distance to overbought (%) | 0.5 | Percentage threshold for "near overbought" alerts |
| Distance to oversold (%) | 0.5 | Percentage threshold for "near oversold" alerts |
| Calculation day | Monday | Day of week when levels are recalculated |
| Lookback days | 7 | Number of days to extend previous period lines backward |
| Forward days | 7 | Number of days to extend current period lines forward |
| Show Debug Labels | false | Toggle for comprehensive debug information display |
## Trading Applications
### Primary Use Cases
1. **Reversal Trading**: Identify potential reversal zones when price approaches overbought/oversold levels
2. **Trend Confirmation**: Use the adaptive nature of levels to confirm trend strength and direction
3. **Position Sizing**: Adjust position size based on distance from key levels
4. **Stop Placement**: Use opposite levels as dynamic stop-loss references
### Strategic Advantages
- **Adaptive Nature**: Levels adjust to changing market volatility and trend structure
- **Multi-Timeframe Confirmation**: Signals are validated across multiple timeframes
- **Visual Clarity**: Clear color-coded lines and labels enhance decision-making
- **Proactive Alerts**: "Near" conditions provide early warnings before crossovers
## Implementation Details
### Data Security
Uses `request.security()` function to fetch data from higher timeframes (monthly, weekly) while maintaining proper bar indexing with ` ` offset for open prices.
### Performance Optimization
- Uses `var` keyword to declare persistent variables that maintain state across bars
- Efficient line and label management with proper deletion before recreation
- Conditional execution of debug code to minimize performance impact
### Error Handling
- Comprehensive NA (not available) checks throughout the code
- Graceful degradation when data is unavailable for higher timeframes
- Mathematical safeguards to prevent invalid level calculations
## Conclusion
The OB/OS Adaptative v1.1 indicator represents a sophisticated approach to identifying market extremes by combining multiple technical analysis concepts. Its adaptive nature makes it particularly useful in trending markets where static levels may be less effective. The multi-timeframe approach provides a comprehensive view of market structure, while the visual elements and alert system enhance its practical utility for active traders.
Nifty Buy/Sell Signals with RSI & Fisheruy Signal when:
RSI crosses above 40 from below.
Fisher Transform crosses above its signal line (bullish crossover).
Sell Signal when:
RSI crosses below 60 from above.
Fisher Transform crosses below its signal line (bearish crossover).
15Min Volume x3 Spikeit show high power candels to conferm breakouts to hekp traders understand market better
50-Candle Look-Back MarkerIt simply redraws one vertical dotted line that always sits exactly 50 bars behind the current bar, so you can check at a glance that any trend-line you draw has at least 50 candles of data to the right of it.
FVG + IFVG Gap (ULTRA) by Aditya NejeThis Indicator shows Fair Value Gap and Inverse Fair Value gaps
100-Candle Look-Back MarkerIt simply redraws one vertical dotted line that always sits exactly 100 bars behind the current bar, so you can check at a glance that any trend-line you draw has at least 100 candles of data to the right of it.
Hawkes Volatility Exit IndicatorOverview
The Hawkes Volatility Exit Indicator is a powerful tool designed to help traders capitalize on volatility breakouts and exit positions when momentum fades. Built on the Hawkes process, it models volatility clustering to identify optimal entry points after quiet periods and exit signals during volatility cooling. Designed to be helpful for swing traders and trend followers across markets like stocks, forex, and crypto.
Key Features Volatility-Based Entries: Detects breakouts when volatility spikes above the 95th percentile (adjustable) after quiet periods (below 5th percentile).
This indicator is probably better on exits than entries.
Smart Exit Signals: Triggers exits when volatility drops below a customizable threshold (default: 30th percentile) after a minimum hold period.
Hawkes Process: Uses a decay-based model (kappa) to capture volatility clustering, making it responsive to market dynamics.
Visual Clarity: Includes a volatility line, exit threshold, percentile bands, and intuitive markers (triangles for entries, X for exits).
Status Table: Displays real-time data on position (LONG/SHORT/FLAT), volatility regime (HIGH/LOW/NORMAL), bars held, and exit readiness.
Customizable Alerts: Set alerts for breakouts and exits to stay on top of trading opportunities.
How It Works Quiet Periods: Identifies low volatility (below 5th percentile) that often precede significant moves.
Breakout Entries: Signals bullish (triangle up) or bearish (triangle down) entries when volatility spikes post-quiet period.
Exit Signals: Suggests exiting when volatility cools below the exit threshold after a minimum hold (default: 3 bars).
Visuals & Table: Tracks volatility, position status, and signals via lines, shaded zones, and a detailed status table.
Settings
Hawkes Kappa (0.1): Adjusts volatility decay (lower = smoother, higher = more sensitive).
Volatility Lookback (168): Sets the period for percentile calculations.
ATR Periods (14): Normalizes volatility using Average True Range.
Breakout Threshold (95%): Volatility percentile for entries.
Exit Threshold (30%): Volatility percentile for exits.
Quiet Threshold (5%): Defines quiet periods.
Minimum Hold Bars (3): Ensures positions are held before exiting.
Alerts: Enable/disable breakout and exit alerts.
How to Use
Entries: Look for triangle markers (up for long, down for short) and confirm with the status table showing "ENTRY" and "LONG"/"SHORT."
Exits: Exit on X cross markers when the status table shows "EXIT" and "Exit Ready: YES."
Monitoring: Use the status table to track position, bars held, and volatility regime (HIGH/LOW/NORMAL).
Combine: Pair with price action, support/resistance, or other indicators for better context.
Tips : Adjust thresholds for your market: lower breakout thresholds for more signals, higher exit thresholds for earlier exits.
Test on your asset to ensure compatibility (best for markets with volatility clustering).
Use alerts to automate signal detection.
Limitations Requires sufficient data (default: 168 bars) for reliable signals. Check "Data Status" in the table.
Focuses on volatility, not price direction—combine with trend tools.
May lag slightly due to the smoothing nature of the Hawkes process.
Why Use It?
The Hawkes Volatility Exit Indicator offers a unique, data-driven approach to timing trades based on volatility dynamics. Its clear visuals, customizable settings, and real-time status table make it a valuable addition to any trader’s toolkit. Try it to catch breakouts and exit with precision!
This indicator is based on neurotrader888's python repo. All credit to him. All mistakes mine.
This conversion published for wider attention to the Hawkes method.
Weekly 8 EMA Horizontal Linethis will automatically track the WEEKLY 8EMA on your chart so you can know where the Weekly 8EMA is on lower timeframes
Fibonacci Range Detector ║ BullVision🔬 Overview
The Fibonacci Range Mapper is a dynamic technical tool designed to identify, track, and visualize price ranges using Fibonacci levels. Whether you're trading manually or prefer automated structure recognition, this indicator helps you contextualize market moves and locate key price zones with precision.
⚙️ Core Logic
🔍 Range Detection (Auto & Manual Modes)
In Auto mode, the indicator uses an advanced ZigZag system based on ATR or percentage thresholds to confirm market swings and construct Fibonacci-based ranges.
In Manual mode, traders can define their own swing low and high to generate precise custom ranges.
📐 Fibonacci Mapping
Each detected range is automatically plotted with key Fibonacci retracement levels — 0%, 25%, 50%, 75%, 100% — along with optional extensions (127.2% and 161.8%) to anticipate price continuations or reversals.
📋 Live Data Table
An integrated info panel dynamically displays crucial metrics:
• Range size
• Current price zone (Discount / Mid / Premium)
• Position within range (%)
• Distance to range extremes
• Range status (Pending or Confirmed)
🕰️ Historical Memory
Up to 20 past ranges can be stored and visualized simultaneously, helping traders recognize repeated price behaviors and contextual support/resistance levels.
🎨 Visual Highlights
Zones of interest (0–25% = Discount, 75–100% = Premium) are color-coded with custom transparency, and labels can be toggled for clarity. The current active range updates in real time as structure evolves.
🔧 User Customization
• Detection Method: Choose between ATR or % ZigZag for automated swing identification
• Confirmation Delay: Set how many bars to wait before confirming a new high
• Manual Overrides: Select exact price levels when you want full control
• Extensions & Labels: Toggle additional lines and info to suit your charting style
• Visual Table Position: Customize where the data table appears on screen
• Color Scheme: Define your own zone gradients for better visual interpretation
📈 Use Cases
This indicator is ideal for traders who want to:
• Identify value zones within local or macro price structures
• Plan trades around Fibonacci retracement and extension levels
• Detect shifts in market structure using an adaptive ZigZag logic
• Track recurring price ranges and historical reaction points
• Enhance technical confluence with clean, visual price mapping
⚠️ Important Notes
This tool is not a buy/sell signal generator — it is a visual framework for structure-based analysis.
Use it in conjunction with your existing strategy and risk management process.
Always confirm with broader context and multi-timeframe alignment.
Hypothesis TF Strategy EvaluationThis script provides a statistical evaluation framework for trend-following strategies by examining whether mean returns (measured here as 1-period Rate of Change, ROC) differ significantly across different price quantile groups.
Specifically, it:
Calculates rolling 25th (Q1) and 75th (Q3) percentile levels of price over a user-defined window.
Classifies returns into three groups based on whether price is above Q3, between Q1 and Q3, or below Q1.
Computes mean returns and sample sizes for each group.
Performs Welch's t-tests (which account for unequal variances) between groups to assess if their mean returns differ significantly.
Displays results in two tables:
Summary Table: Shows mean ROC and number of observations for each group.
Hypothesis Testing Table: Shows pairwise t-statistics with significance stars for 95% and 99% confidence levels.
Key Features
Rolling quantile calculations: Captures local price distributions dynamically.
Robust hypothesis testing: Welch's t-test allows for heteroskedasticity between groups.
Significance indicators: Easy visual interpretation with "*" (95%) and "**" (99%) significance levels.
Visual aids: Plots Q1 and Q3 levels on the price chart for intuitive understanding.
Extensible and transparent: Fully commented code that emphasizes the evaluation process rather than trading signals.
Important Notes
Not a trading strategy: This script is intended as a tool for research and validation, not as a standalone trading system.
Look-ahead bias caution: The calculation carefully avoids look-ahead bias by computing quantiles and ROC values only on past data at each point.
Users must ensure look-ahead bias is removed when applying this or similar methods, as look-ahead bias would artificially inflate performance and statistical significance.
The statistical tests rely on the assumption of independent samples, which might not fully hold in financial time series but still provide useful insights
Usage Suggestions
Use this evaluation framework to validate hypotheses about the behavior of returns under different price regimes.
Integrate with your strategy development workflow to test whether certain market conditions produce statistically distinct return distributions.
Example
In this example, the script was run with a quantile length of 20 bars and a lookback of 500 bars for ROC classification.
We consider a simple hypothetical "strategy":
Go long if the previous bar closed above Q3 the 75th percentile).
Go short if the previous bar closed below Q1 (the 25th percentile).
Stay in cash if the previous close was between Q1 and Q3.
The screenshot below demonstrates the results of this evaluation. Surprisingly, the "long" group shows a negative average return, while the "short" group has a positive average return, indicating mean reversion rather than trend following.
The hypothesis testing table confirms that the only statistically significant difference (at 95% or higher confidence) is between the above Q3 and below Q1 groups, suggesting a meaningful divergence in their return behavior.
This highlights how this framework can help validate or challenge intuitive assumptions about strategy performance through rigorous statistical testing.