Enhanced BTC Order Block IndicatorThe script you provided is an "Enhanced BTC Order Block Indicator" written in Pine Script v5 for TradingView. It is designed to identify and visually mark Order Blocks (OBs) on a Bitcoin (BTC) price chart, specifically tailored for a high-frequency scalping strategy on the 5-minute (M5) timeframe. Order Blocks are key price zones where institutional traders are likely to have placed significant buy or sell orders, making them high-probability areas for reversals or continuations. The script incorporates customizable filters, visual indicators, and alert functionality to assist traders in executing the strategy outlined earlier.
Key Features and Functionality
Purpose:
The indicator detects bullish Order Blocks (buy zones) and bearish Order Blocks (sell zones) based on a predefined percentage price movement (default 0.5–1%) and volume confirmation.
It marks these zones on the chart with colored boxes and provides alerts when an OB is detected.
User-Configurable Inputs:
Price Move Range: minMovePercent (default 0.5%) and maxMovePercent (default 1.0%) define the acceptable price movement range for identifying OBs.
Volume Threshold: volumeThreshold (default 1.5x average volume) ensures OB detection is backed by significant trading activity.
Lookback Period: lookback (default 10 candles) determines how many previous candles are analyzed to find the last candle before a strong move.
Wick/Body Option: useWick (default false) allows users to choose whether the OB zone is based on the candle’s wick or body.
Colors: bullishOBColor (default green) and bearishOBColor (default red) set the visual appearance of OB boxes.
Box Extension: boxExtension (default 100 bars) controls how far the OB box extends to the right on the chart.
RSI Filter: useRSI (default true) enables an RSI filter, with rsiLength (default 14), rsiBullishThreshold (default 50), and rsiBearishThreshold (default 50) for trend confirmation.
M15 Support/Resistance: useSR (default true) and srLookback (default 20) integrate M15 timeframe swing highs and lows for additional OB validation.
Core Logic:
Bullish OB Detection: Identifies a strong upward move (0.5–1%) with volume above the threshold. It then looks back to the last bearish candle before the move to define the OB zone. RSI > 50 and proximity to M15 support/resistance (optional) enhance confirmation.
Bearish OB Detection: Identifies a strong downward move (0.5–1%) with volume confirmation, tracing back to the last bullish candle. RSI < 50 and M15 resistance proximity (optional) add validation.
The OB zone is drawn as a rectangle from the high to low of the identified candle, extended rightward.
Visual Output:
Boxes: Uses box.new to draw OB zones, with left set to the previous bar (bar_index ), right extended by boxExtension, top and bottom defined by the OB’s high and low prices. Each box includes a text label ("Bullish OB" or "Bearish OB") and is semi-transparent.
Colors distinguish between bullish (green) and bearish (red) OBs.
Alerts:
Global alertcondition definitions trigger notifications for "Bullish OB Detected" and "Bearish OB Detected" when the respective conditions are met, displaying the current close price in the message.
Helper Functions:
f_priceChangePercent: Calculates the percentage price change between open and close prices.
isNearSR: Checks if the price is within 0.2% of M15 swing highs or lows for support/resistance confluence.
How It Works
The script runs on each candle, evaluating the current price action against the user-defined criteria.
When a bullish or bearish move is detected (meeting the percentage, volume, RSI, and S/R conditions), it identifies the preceding candle to define the OB zone.
The OB is then visualized on the chart, and an alert is triggered if configured in TradingView.
Use Case
This indicator is tailored for your BTC scalping strategy, where trades last 1–15 minutes targeting 0.3–0.5% gains. It helps traders spot institutional order zones on the M5 chart, confirmed by secondary M1 analysis, and integrates with your use of EMAs, RSI, and volume. The customizable settings allow adaptation to varying market conditions or personal preferences.
Limitations
The M15 S/R detection is simplified (using swing highs/lows), which may not always align perfectly with manual support/resistance levels.
Alerts depend on TradingView’s alert system and require manual setup.
Performance may vary with high volatility or low-volume periods, necessitating parameter adjustments.
Indicators and strategies
Candle Range DetectorCandle Range Detector
// Pine Script v6
// Detects candle-based ranges, mitigations, and sweeps with advanced logic
Overview
This indicator automatically detects price ranges based on candle containment, then tracks when those ranges are mitigated (broken) and when a sweep occurs. It is designed for traders who want to identify liquidity events and range breaks with precision.
How It Works
- Range Detection: A range is formed when a candle is fully contained within the previous candle (its high is lower and its low is higher). This marks a potential area of price balance or liquidity.
- Mitigation: A range is considered mitigated when price closes beyond its extension levels (configurable by normal or Fibonacci logic). This signals that the range has been invalidated or "taken out" by price action.
- Sweep Detection: After mitigation, the script watches for a sweep event: a candle that both trades through the range extreme and closes decisively beyond the log-mid of the candle itself. This is a strong sign of a liquidity grab or stop run.
- Alerts & Visuals: You can enable alerts and on-chart labels for sweeps. Only the most recent mitigated range can be swept, and each range can only be swept once.
- Timeframe Sensitivity: On weekly or monthly charts, a candle can both mitigate and sweep a range on the same bar. On lower timeframes, only one event can occur per bar.
Why It Works
- Candle containment is a robust way to identify natural price ranges and liquidity pools, as it reflects where price is consolidating or being absorbed.
- Mitigation marks the moment when a range is no longer defended, often leading to new directional moves.
- Sweeps are powerful signals of stop hunts or liquidity grabs, especially when confirmed by a close beyond the log-mid of the candle, indicating strong intent.
Visual Explanation
Tip: Use this tool to spot high-probability reversal or continuation zones, and to get alerted to key liquidity events in real time.
Triple Exponential Moving Average (TEMA)The Triple Exponential Moving Average (TEMA) is an advanced technical indicator designed to significantly reduce the lag inherent in traditional moving averages while maintaining signal quality. Developed by Patrick Mulloy in 1994 as an extension of his DEMA concept, TEMA employs a sophisticated triple-stage calculation process to provide exceptionally responsive market signals.
TEMA's mathematical approach goes beyond standard smoothing techniques by using a triple-cascade architecture with optimized coefficients. This makes it particularly valuable for traders who need earlier identification of trend changes without sacrificing reliability. Since its introduction, TEMA has become a key component in many algorithmic trading systems and professional trading platforms.
▶️ **Core Concepts**
Triple-stage lag reduction: TEMA uses a three-level EMA calculation with optimized coefficients (3, -3, 1) to dramatically minimize the delay in signal generation
Enhanced responsiveness: Provides significantly faster reaction to price changes than standard EMA or even DEMA, while maintaining reasonable smoothness
Strategic signal processing: Employs mathematical techniques to extract the underlying trend while filtering random price fluctuations
Timeframe effectiveness: Performs well across multiple timeframes, though particularly valued in short to medium-term trading
TEMA achieves its enhanced responsiveness through an innovative triple-cascade architecture that strategically combines three levels of exponential moving averages. This approach effectively removes the lag component inherent in EMA calculations while preserving the essential smoothing benefits.
▶️ **Common Settings and Parameters**
Length: Default: 12 | Controls sensitivity/smoothness | When to Adjust: Increase in choppy markets, decrease in strongly trending markets
Source: Default: Close | Data point used for calculation | When to Adjust: Change to HL2/HLC3 for more balanced price representation
Corrected: Default: false | Adjusts internal EMA smoothing factors for potentially faster response | When to Adjust: Set to true for a modified TEMA that may react quicker to price changes. false uses standard TEMA calculation
Visualization: Default: Line | Display format on charts | When to Adjust: Use filled cloud to see divergence from price more clearly
Pro Tip: For optimal trade signals, many professional traders use two TEMAs (e.g., 8 and 21 periods) and look for crossovers, which often provide earlier signals than traditional moving average pairs.
▶️ **Calculation and Mathematical Foundation**
Simplified explanation:
TEMA calculates three levels of EMAs, then combines them using a special formula that amplifies recent price action while reducing lag. This triple-processing approach effectively eliminates much of the delay found in traditional moving averages.
Technical formula:
TEMA = 3 × EMA₁ - 3 × EMA₂ + EMA₃
Where:
EMA₁ = EMA(source, α₁)
EMA₂ = EMA(EMA₁, α₂)
EMA₃ = EMA(EMA₂, α₃)
The smoothing factors (α₁, α₂, α₃) are determined as follows:
Let α_base = 2/(length + 1)
α₁ = α_base
If corrected is false:
α₂ = α_base
α₃ = α_base
If corrected is true:
Let r = (1/α_base)^(1/3)
α₂ = α_base * r
α₃ = α_base * r * r = α_base * r²
The corrected = true option implements a variation that uses progressively smaller alpha values for the subsequent EMA calculations. This approach aims to optimize the filter's frequency response and phase lag.
Alpha Calculation for corrected = true:
α₁ (alpha_base) = 2/(length + 1)
r = (1/α₁)^(1/3) (cube root relationship)
α₂ = α₁ * r = α₁^(2/3)
α₃ = α₂ * r = α₁^(1/3)
Mathematical Rationale for Corrected Alphas:
1. Frequency Response Balance:
The standard TEMA (where α₁ = α₂ = α₃) can lead to an uneven frequency response, potentially over-smoothing high frequencies or creating resonance artifacts. The geometric progression of alphas (α₁ > α₁^(2/3) > α₁^(1/3)) in the corrected version aims to create a more balanced filter cascade. Each stage contributes more proportionally to the overall frequency response.
2. Phase Lag Optimization:
The cube root relationship between the alphas is designed to minimize cumulative phase lag while maintaining smoothing effectiveness. Each subsequent EMA stage has a progressively smaller impact on phase distortion.
3. Mathematical Stability:
The geometric progression (α₁, α₁^(2/3), α₁^(1/3)) can enhance numerical stability due to constant ratios between consecutive alphas. This helps prevent the accumulation of rounding errors and maintains consistent convergence properties.
Practical Impact of corrected = true:
This modification aims to achieve:
Potentially better lag reduction for a similar level of smoothing
A more uniform frequency response across different market cycles
Reduced overshoot or undershoot in trending conditions
Improved signal-to-noise ratio preservation
Essentially, the cube root relationship in the corrected TEMA attempts to optimize the trade-off between responsiveness and smoothness that can be a challenge with uniform alpha values.
🔍 Technical Note: Advanced implementations apply compensation techniques to all three EMA stages, ensuring TEMA values are valid from the first bar without requiring a warm-up period. This compensation corrects initialization bias and prevents calculation errors from compounding through the cascade.
▶️ **Interpretation Details**
TEMA excels at identifying trend changes significantly earlier than traditional moving averages, making it valuable for both entry and exit signals:
When price crosses above TEMA, it often signals the beginning of an uptrend
When price crosses below TEMA, it often signals the beginning of a downtrend
The slope of TEMA provides insight into trend strength and momentum
TEMA crossovers with price tend to occur earlier than with standard EMAs
When multiple-period TEMAs cross each other, they confirm significant trend shifts
TEMA works exceptionally well as a dynamic support/resistance level in trending markets
For optimal results, traders often use TEMA in combination with momentum indicators or volume analysis to confirm signals and reduce false positives.
▶️ **Limitations and Considerations**
Market conditions: The high responsiveness can generate false signals during highly choppy, sideways markets
Overshooting: More aggressive lag reduction leads to more pronounced overshooting during sharp reversals
Parameter sensitivity: Changes in length have more dramatic effects than in simpler moving averages
Calculation complexity: Triple cascaded EMAs make behavior less predictable and more resource-intensive
Complementary tools: Should be used with confirmation tools like RSI, MACD or volume indicators
▶️ **References**
Mulloy, P. (1994). "Smoothing Data with Less Lag," Technical Analysis of Stocks & Commodities .
Mulloy, P. (1995). "Comparing Digital Filters," Technical Analysis of Stocks & Commodities .
SMA Backtest Optimizer [Mr_Rakun]The SMA Backtest Optimizer is a powerful Pine Script tool designed to systematically analyze and compare various Simple Moving Average (SMA) periods to identify the most profitable configuration for trading strategies. This indicator tests multiple SMA periods (from 10 to 100) using a crossover strategy where buys occur when price crosses above the SMA and sells when price crosses below it.
Key Features:
Tests 10 different SMA periods to determine optimal settings
Calculates profit/loss based on a defined starting capital
Tracks total profit and number of trades for each period
Visually highlights the best performing SMA on your chart
Displays comprehensive results in an easy-to-read table
Labels the chart with key performance metrics
This code serves as a core framework that traders can customize for their specific needs. You can easily modify the strategy parameters, test different technical indicators, adjust capital settings, or implement more complex entry/exit rules. The optimization methodology can be applied to virtually any trading approach you wish to evaluate.
Feel free to adapt this framework to test your own trading ideas and discover which parameters work best in different market conditions.
Long Wick Detector [LuxAlgo]The Long Wick Detector tool allows traders to identify candle wicks longer than a user-defined volatility threshold. This makes it useful for spotting zones with high supply or demand.
The tool displays mitigated and unmitigated levels and changes the color of the candles based on wick size and level breakouts.
🔶 USAGE
By default, the tool displays long mitigated and unmitigated candle wicks, with a maximum duration for an unmitigated long wick of 1,000 bars. What does all this mean?
🔹 Wick Threshold
Traders can adjust the volatility threshold to identify long wicks, with a higher threshold detecting more significant wicks.
As we can see in the image above, the tool detects more wicks with a smaller threshold compared to a higher one.
🔹 Level %
Traders can choose the percentage of the wick at which the level is located. By default, the level is displayed at the extremes of the wick. This parameter accepts values between 0 and 100.
100: extreme of the wick
50: middle of the wick
0: start of the wick
🔹 Max Duration
This parameter allows traders to specify the number of bars for the levels. The tool will only display mitigated or unmitigated levels up to the specified number of bars.
As shown in the above image, a longer duration allows more room for mitigation, displaying more levels.
🔹 Colored Candles
The tool allows for color customization using two parameters from the settings panel. The chart shows the different outputs.
The setting "Wick-Based Transparency" makes candles with smaller wicks less visible and candles with longer wicks more visible.
On the other hand, "Breakout-Based Color" changes the base color of the candles based on the mitigation of long wicks. When the price breaks above a detected top wick, the bullish color is used. When the price breaks below a detected bottom wick, the bearish color is used.
🔶 SETTINGS
Wick Threshold: The volatility threshold for wick detection. Use a smaller value to detect smaller wicks.
Level %: Placement of the plotted level relative to the wick.
Max Duration: The maximum duration in bars of mitigated wicks.
Mitigated Wicks: Enable or disable mitigated wicks.
🔹 Style
Wick Based Transparency: Make candles with smaller wicks more transparent and candles with longer wicks more solid.
Breakout Based Color: Change the base color based on wick mitigation.
Bullish & Bearish Colors
Relative Volume Indicator (RVOL)Relative Volume Indicator (RVOL) is a powerful tool designed for intraday traders who want to quickly identify key areas of interest based on relative volume activity.
This indicator compares the current candle’s volume with the historical average volume over a customizable lookback period (default is 20). It highlights when volume is:
🔴 Below average
🟡 Average
🟢 Above average
🟣 Extremely high
⚙️ Customizable Settings:
Lookback period for average volume
Volume thresholds (average, above average, extreme)
Custom colors for each volume zone
🎯 Best suited for:
Scalping strategies
Breakout confirmation
Volume-based entries at key support/resistance levels
Spotting unusual or algorithmic trading activity
📈 Works across all timeframes.
🎨 Fully customizable from the settings panel.
🔔 Alerts coming in future versions.
Stochastic RSI with Alerts# Stochastic RSI with Alerts - User Manual
## 1. Overview
This enhanced Stochastic RSI indicator identifies overbought/oversold conditions with visual signals and customizable alerts. It features:
- Dual-line Stoch RSI (K & D)
- Threshold-based buy/sell signals
- Configurable alert system
- Customizable parameters
## 2. Installation
1. Open TradingView chart
2. Open Pine Editor (📈 icon at bottom)
3. Copy/paste the full code
4. Click "Add to Chart"
## 3. Input Parameters
### 3.1 Core Settings
| Parameter | Default | Description |
|-----------|---------|-------------|
| K | 3 | Smoothing period for %K line |
| D | 3 | Smoothing period for %D line |
| RSI Length | 14 | RSI calculation period |
| Stochastic Length | 14 | Lookback period for Stoch calculation |
| RSI Source | Close | Price source for RSI calculation |
### 3.2 Signal Thresholds
| Parameter | Default | Description |
|-----------|---------|-------------|
| Upper Limit | 80 | Sell signal threshold (overbought) |
| Lower Limit | 20 | Buy signal threshold (oversold) |
### 3.3 Alert Settings
| Parameter | Default | Description |
|-----------|---------|-------------|
| Enable Buy Alerts | True | Toggle buy notifications |
| Enable Sell Alerts | True | Toggle sell notifications |
| Custom Alert Message | Empty | Additional text for alerts |
## 4. Signal Logic
### 4.1 Buy Signal (Green ▲)
Triggers when:
\text{%K crossover %D} \quad AND \quad (\text{%K ≤ Lower Limit} \quad OR \quad \text{%D ≤ Lower Limit})
### 4.2 Sell Signal (Red ▼)
Triggers when:
\text{%K crossunder %D} \quad AND \quad (\text{%K ≥ Upper Limit} \quad OR \quad \text{%D ≥ Upper Limit})
## 5. Alert System
### 5.1 Auto-Generated Alerts
The script automatically creates these alert conditions:
- **Buy Signal Alert**: Triggers on valid buy signals
- **Sell Signal Alert**: Triggers on valid sell signals
Alert messages include:
- Signal type (Buy/Sell)
- Current %K and %D values
- Custom message (if configured)
### 5.2 Alert Configuration
**Method 1: Script-Generated Alerts**
1. Hover over any signal marker
2. Click the 🔔 icon
3. Select trigger conditions:
- "Buy Signal Alert"
- "Sell Signal Alert"
**Method 2: Manual Setup**
1. Open Alert creation window
2. Condition: Select "Stoch RSI Alerts"
3. Choose:
- "Buy Signal Alert" for long entries
- "Sell Signal Alert" for exits/shorts
## 6. Customization Tips
### 6.1 Threshold Adjustment
// For day trading (tighter ranges)
upperLimit = 75
lowerLimit = 25
// For swing trading (wider ranges)
upperLimit = 85
lowerLimit = 15
### 6.2 Visual Modifications
Change signal markers via:
- `style=` : Try `shape.labelup`, `shape.flag`, etc.
- `color=` : Use hex codes (#FF00FF) or named colors
- `size=` : `size.tiny` to `size.huge`
## 7. Recommended Use Cases
1. **Mean Reversion Strategies**: Pair with support/resistance levels
2. **Trend Confirmation**: Filter with 200EMA direction
3. **Divergence Trading**: Compare with price action
## 8. Limitations
- Works best in ranging markets
- Combine with volume analysis for confirmation
- Not recommended as standalone strategy
---
This documentation follows technical writing best practices with:
- Clear parameter tables
- Mathematical signal logic
- Visual hierarchy
- Practical examples
- Usage recommendations
Premarket High/Low (Horizontal Rays)=== Script Description ===
This TradingView script automatically detects and displays the high and low prices
during the premarket session (04:00–09:30 Eastern Time) for the current trading day.
It draws horizontal rays that extend across the chart and labels them as "PM High" and "PM Low".
These markers are refreshed daily and only apply to today's session.
The script also provides full customization for:
- Line color, width, and style (solid, dotted, dashed)
- Label text color, background color, size, and style (left, right, up, down)
Time note: This script assumes data aligned with U.S. market hours.
ZenAlgo - DominatorThis indicator provides a structured multi-ticker overview of market momentum and relative strength by analyzing short-term price behavior across selected assets in comparison with broader crypto dominance and Bitcoin/ETH performance.
Ticker and Market Data Handling
The script accepts up to 9 user-defined symbols (tickers) along with BTCUSD and ETHUSD. For each symbol:
It retrieves the current price.
It also requests the daily opening price from the "D" timeframe to compute intraday percentage change.
For BTC, ETH, and dominance (sum of BTC, USDT, and USDC dominance), daily change is calculated using this same method.
This comparison enables tracking relative performance from the daily open, which provides meaningful insight into intraday strength or weakness among different assets.
Dominance Logic
The indicator aggregates dominance data from BTC , USDT , and USDC using TradingView’s CRYPTOCAP indices. This combined dominance is used as a reference in directional and status calculations. ETH dominance is also analyzed independently.
Changes in dominance are used to infer whether market attention is shifting toward Bitcoin/stablecoins (typically indicating risk-off sentiment) or away from them (typically risk-on behavior, benefiting altcoins).
Price Direction Estimation
The script estimates directional bias using an EMA-based deviation technique:
A short EMA (user-defined lookback , default 4 bars) is calculated.
The current close is compared to the EMA to assess directional bias.
Recent candle changes are also inspected to confirm a consistent short-term trend (e.g., 3 consecutive higher closes for "up").
A small threshold is used to avoid classifying flat movements as trends.
This directionality logic is applied separately to:
The selected ticker's price
BTC price
Combined dominance
This allows the script to contextualize the movement of each asset within broader market conditions.
Market Status Evaluation
A custom function analyzes ETH and BTC dominance trends along with their relative strength to define the overall market regime:
Altseason is identified when BTC dominance is declining, ETH dominance rising, and ETH outperforms BTC.
BTC Season occurs when BTC dominance is rising, ETH dominance falling, and BTC outperforms ETH.
If neither condition is met, the state is Neutral .
This classification is shown alongside each ticker's row in the table and helps traders assess whether market conditions favor Bitcoin, Ethereum, or altcoins in general.
Ticker Status Classification
Each ticker is analyzed independently using the earlier directional logic. Its status is then determined as follows:
Full Bull : Ticker is trending up while dominance is declining or BTC is also rising.
Bullish : Ticker is trending up but not supported by broader bullish context.
Bearish : Ticker is trending down but without broader confirmation.
Full Bear : Ticker is trending down while dominance rises or BTC falls.
Neutral : No strong directional bias or conflicting context.
This classification reflects short-term momentum and macro alignment and is color-coded in the results table.
Table Display and Plotting
A configurable table is shown on the chart, which:
Displays the name and status of each selected ticker.
Optionally includes BTC, ETH, and market state.
Uses color-coding for intuitive interpretation.
Additionally, price changes from the daily open are plotted for each selected ticker, BTC, ETH, and combined dominance. These values are also labeled directly on the chart.
Labeling and UX Enhancements
Labels next to the current candle display price and percent change for each active ticker and for BTC, ETH, and combined dominance.
Labels update each bar, and old labels are deleted to avoid clutter.
Ticker names are dynamically shortened by stripping exchange prefixes.
How to Use This Indicator
This tool helps traders:
Spot early rotations between Bitcoin and altcoins.
Identify intraday momentum leaders or laggards.
Monitor which tickers align with or diverge from broader market trends.
Detect possible sentiment shifts based on dominance trends.
It is best used on lower to mid timeframes (15m–4h) to capture intraday to short-term shifts. Users should cross-reference with longer-term trend tools or structural indicators when making directional decisions.
Interpretation of Values
% Change : Measures intraday move from daily open. Strong positive/negative values may indicate breakouts or reversals.
Status : Describes directional strength relative to market conditions.
Market State : Gives a general bias toward BTC dominance, ETH strength, or altcoin momentum.
Limitations & Considerations
The indicator does not analyze liquidity or volume directly.
All logic is based on short-term movements and may produce false signals in ranging or low-volume environments.
Dominance calculations rely on external CRYPTOCAP indices, which may differ from exchange-specific flows.
Added Value Over Other Free Tools
Unlike basic % change tables or price overlays, this indicator:
Integrates dominance-based macro context into ticker evaluation.
Dynamically classifies market regimes (BTC season / Altseason).
Uses multi-factor logic to determine ticker bias, avoiding single-metric interpretation.
Displays consolidated information in a table and chart overlays for rapid assessment.
MetaPlanet USD Prices + Cheapest/Expensive SummaryThis custom TradingView indicator tracks and compares the real-time USD-equivalent prices of MetaPlanet Inc. (Ticker 3350) across three different global exchanges:
🇯🇵 TSE:3350 (Tokyo Stock Exchange, JPY)
🇩🇪 FWB:DN3 (Frankfurt/Xetra Exchange, EUR)
🇺🇸 OTC:MTPLF (US Over-the-Counter, USD)
It converts all prices into USD using live forex rates (USDJPY and EURUSD via OANDA) and plots them together for easy visual comparison.
Ultimate Scalping Tool[BullByte]Overview
The Ultimate Scalping Tool is an open-source TradingView indicator built for scalpers and short-term traders released under the Mozilla Public License 2.0. It uses a custom Quantum Flux Candle (QFC) oscillator to combine multiple market forces into one visual signal. In plain terms, the script reads momentum, trend strength, volatility, and volume together and plots a special “candlestick” each bar (the QFC) that reflects the overall market bias. This unified view makes it easier to spot entries and exits: the tool labels signals as Strong Buy/Sell, Pullback (a brief retracement in a trend), Early Entry, or Exit Warning . It also provides color-coded alerts and a small dashboard of metrics. In practice, traders see green/red oscillator bars and symbols on the chart when conditions align, helping them scalp or trend-follow without reading multiple separate indicators.
Core Components
Quantum Flux Candle (QFC) Construction
The QFC is the heart of the indicator. Rather than using raw price, it creates a candlestick-like bar from the underlying oscillator values. Each QFC bar has an “open,” “high/low,” and “close” derived from calculated momentum and volatility inputs for that period . In effect, this turns the oscillator into intuitive candle patterns so traders can recognize momentum shifts visually. (For comparison, note that Heikin-Ashi candles “have a smoother look because take an average of the movement”. The QFC instead represents exact oscillator readings, so it reflects true momentum changes without hiding price action.) Colors of QFC bars change dynamically (e.g. green for bullish momentum, red for bearish) to highlight shifts. This is the first open-source QFC oscillator that dynamically weights four non-correlated indicators with moving thresholds, which makes it a unique indicator on its own.
Oscillator Normalization & Adaptive Weights
The script normalizes its oscillator to a fixed scale (for example, a 0–100 range much like the RSI) so that various inputs can be compared fairly. It then applies adaptive weighting: the relative influence of trend, momentum, volatility or volume signals is automatically adjusted based on current market conditions. For instance, in very volatile markets the script might weight volatility more heavily, or in a strong trend it might give extra weight to trend direction. Normalizing data and adjusting weights helps keep the QFC sensitive but stable (normalization ensures all inputs fit a common scale).
Trend/Momentum/Volume/Volatility Fusion
Unlike a typical single-factor oscillator, the QFC oscillator fuses four aspects at once. It may compute, for example, a trend indicator (such as an ADX or moving average slope), a momentum measure (like RSI or Rate-of-Change), a volume-based pressure (similar to MFI/OBV), and a volatility measure (like ATR) . These different values are combined into one composite oscillator. This “multi-dimensional” approach follows best practices of using non-correlated indicators (trend, momentum, volume, volatility) for confirmation. By encoding all these signals in one line, a high QFC reading means that trend, momentum, and volume are all aligned, whereas a neutral reading might mean mixed conditions. This gives traders a comprehensive picture of market strength.
Signal Classification
The script interprets the QFC oscillator to label trades. For example:
• Strong Buy/Sell : Triggered when the oscillator crosses a high-confidence threshold (e.g. breaks clearly above zero with strong slope), indicating a well-confirmed move. This is like seeing a big green/red QFC candle aligned with the trend.
• Pullbacks : Identified when the trend is up but momentum dips briefly. A Pullback Buy appears if the overall trend is bullish but the oscillator has a short retracement – a typical buying opportunity in an uptrend. (A pullback is “a brief decline or pause in a generally upward price trend”.)
• Early Buy/Sell : Marks an initial swing in the oscillator suggesting a possible new trend, before it is fully confirmed. It’s a hint of momentum building (an early-warning signal), not as strong as the confirmed “Strong” signal.
• Exit Warnings : Issued when momentum peaks or reverses. For instance, if the QFC bars reach a high and start turning red/green opposite, the indicator warns that the move may be ending. In other words, a Momentum Peak is the point of maximum strength after which weakness may follow.
These categories correspond to typical trading concepts: Pullback (temporary reversal in an uptrend), Early Buy (an initial bullish cross), Strong Buy (confirmed bullish momentum), and Momentum Peak (peak oscillator value suggesting exhaustion).
Filters (DI Reversal, Dynamic Thresholds, HTF EMA/ADX)
Extra filters help avoid bad trades. A DI Reversal filter uses the +DI/–DI lines (from the ADX system) to require that the trend direction confirms the signal . For example, it might ignore a buy signal if the +DI is still below –DI. Dynamic Thresholds adjust signal levels on-the-fly: rather than fixed “overbought” lines, they move with volatility so signals happen under appropriate market stress. An optional High-Timeframe EMA or ADX filter adds a check against a larger timeframe trend: for instance, only taking a trade if price is above the weekly EMA or if weekly ADX shows a strong trend. (Notably, the ADX is “a technical indicator used by traders to determine the strength of a price trend”, so requiring a high-timeframe ADX avoids trading against the bigger trend.)
Dashboard Metrics & Color Logic
The Dashboard in the Ultimate Scalping Tool (UST) serves as a centralized information hub, providing traders with real-time insights into market conditions, trend strength, momentum, volume pressure, and trade signals. It is highly customizable, allowing users to adjust its appearance and content based on their preferences.
1. Dashboard Layout & Customization
Short vs. Extended Mode : Users can toggle between a compact view (9 rows) and an extended view (13 rows) via the `Short Dashboard` input.
Text Size Options : The dashboard supports three text sizes— Tiny, Small, and Normal —adjustable via the `Dashboard Text Size` input.
Positioning : The dashboard is positioned in the top-right corner by default but can be moved if modified in the script.
2. Key Metrics Displayed
The dashboard presents critical trading metrics in a structured table format:
Trend (TF) : Indicates the current trend direction (Strong Bullish, Moderate Bullish, Sideways, Moderate Bearish, Strong Bearish) based on normalized trend strength (normTrend) .
Momentum (TF) : Displays momentum status (Strong Bullish/Bearish or Neutral) derived from the oscillator's position relative to dynamic thresholds.
Volume (CMF) : Shows buying/selling pressure levels (Very High Buying, High Selling, Neutral, etc.) based on the Chaikin Money Flow (CMF) indicator.
Basic & Advanced Signals:
Basic Signal : Provides simple trade signals (Strong Buy, Strong Sell, Pullback Buy, Pullback Sell, No Trade).
Advanced Signal : Offers nuanced signals (Early Buy/Sell, Momentum Peak, Weakening Momentum, etc.) with color-coded alerts.
RSI : Displays the Relative Strength Index (RSI) value, colored based on overbought (>70), oversold (<30), or neutral conditions.
HTF Filter : Indicates the higher timeframe trend status (Bullish, Bearish, Neutral) when using the Leading HTF Filter.
VWAP : Shows the V olume-Weighted Average Price and whether the current price is above (bullish) or below (bearish) it.
ADX : Displays the Average Directional Index (ADX) value, with color highlighting whether it is rising (green) or falling (red).
Market Mode : Shows the selected market type (Crypto, Stocks, Options, Forex, Custom).
Regime : Indicates volatility conditions (High, Low, Moderate) based on the **ATR ratio**.
3. Filters Status Panel
A secondary panel displays the status of active filters, helping traders quickly assess which conditions are influencing signals:
- DI Reversal Filter: On/Off (confirms reversals before generating signals).
- Dynamic Thresholds: On/Off (adjusts buy/sell thresholds based on volatility).
- Adaptive Weighting: On/Off (auto-adjusts oscillator weights for trend/momentum/volatility).
- Early Signal: On/Off (enables early momentum-based signals).
- Leading HTF Filter: On/Off (applies higher timeframe trend confirmation).
4. Visual Enhancements
Color-Coded Cells : Each metric is color-coded (green for bullish, red for bearish, gray for neutral) for quick interpretation.
Dynamic Background : The dashboard background adapts to market conditions (bullish/bearish/neutral) based on ADX and DI trends.
Customizable Reference Lines : Users can enable/disable fixed reference lines for the oscillator.
How It(QFC) Differs from Traditional Indicators
Quantum Flux Candle (QFC) Versus Heikin-Ashi
Heikin-Ashi candles smooth price by averaging (HA’s open/close use averages) so they show trend clearly but hide true price (the current HA bar’s close is not the real price). QFC candles are different: they are oscillator values, not price averages . A Heikin-Ashi chart “has a smoother look because it is essentially taking an average of the movement”, which can cause lag. The QFC instead shows the raw combined momentum each bar, allowing faster recognition of shifts. In short, HA is a smoothed price chart; QFC is a momentum-based chart.
Versus Standard Oscillators
Common oscillators like RSI or MACD use fixed formulas on price (or price+volume). For example, RSI “compares gains and losses and normalizes this value on a scale from 0 to 100”, reflecting pure price momentum. MFI is similar but adds volume. These indicators each show one dimension: momentum or volume. The Ultimate Scalping Tool’s QFC goes further by integrating trend strength and volatility too. In practice, this means a move that looks strong on RSI might be downplayed by low volume or weak trend in QFC. As one source notes, using multiple non-correlated indicators (trend, momentum, volume, volatility) provides a more complete market picture. The QFC’s multi-factor fusion is unique – it is effectively a multi-dimensional oscillator rather than a traditional single-input one.
Signal Style
Traditional oscillators often use crossovers (RSI crossing 50) or fixed zones (MACD above zero) for signals. The Ultimate Scalping Tool’s signals are custom-classified: it explicitly labels pullbacks, early entries, and strong moves. These terms go beyond a typical indicator’s generic “buy”/“sell.” In other words, it packages a strategy around the oscillator, which traders can backtest or observe without reading code.
Key Term Definitions
• Pullback : A short-term dip or consolidation in an uptrend. In this script, a Pullback Buy appears when price is generally rising but shows a brief retracement. (As defined by Investopedia, a pullback is “a brief decline or pause in a generally upward price trend”.)
• Early Buy/Sell : An initial or tentative entry signal. It means the oscillator first starts turning positive (or negative) before a full trend has developed. It’s an early indication that a trend might be starting.
• Strong Buy/Sell : A confident entry signal when multiple conditions align. This label is used when momentum is already strong and confirmed by trend/volume filters, offering a higher-probability trade.
• Momentum Peak : The point where bullish (or bearish) momentum reaches its maximum before weakening. When the oscillator value stops rising (or falling) and begins to reverse, the script flags it as a peak – signaling that the current move could be overextended.
What is the Flux MA?
The Flux MA (Moving Average) is an Exponential Moving Average (EMA) applied to a normalized oscillator, referred to as FM . Its purpose is to smooth out the fluctuations of the oscillator, providing a clearer picture of the underlying trend direction and strength. Think of it as a dynamic baseline that the oscillator moves above or below, helping you determine whether the market is trending bullish or bearish.
How it’s calculated (Flux MA):
1.The oscillator is normalized (scaled to a range, typically between 0 and 1, using a default scale factor of 100.0).
2.An EMA is applied to this normalized value (FM) over a user-defined period (default is 10 periods).
3.The result is rescaled back to the oscillator’s original range for plotting.
Why it matters : The Flux MA acts like a support or resistance level for the oscillator, making it easier to spot trend shifts.
Color of the Flux Candle
The Quantum Flux Candle visualizes the normalized oscillator (FM) as candlesticks, with colors that indicate specific market conditions based on the relationship between the FM and the Flux MA. Here’s what each color means:
• Green : The FM is above the Flux MA, signaling bullish momentum. This suggests the market is trending upward.
• Red : The FM is below the Flux MA, signaling bearish momentum. This suggests the market is trending downward.
• Yellow : Indicates strong buy conditions (e.g., a "Strong Buy" signal combined with a positive trend). This is a high-confidence signal to go long.
• Purple : Indicates strong sell conditions (e.g., a "Strong Sell" signal combined with a negative trend). This is a high-confidence signal to go short.
The candle mode shows the oscillator’s open, high, low, and close values for each period, similar to price candlesticks, but it’s the color that provides the quick visual cue for trading decisions.
How to Trade the Flux MA with Respect to the Candle
Trading with the Flux MA and Quantum Flux Candle involves using the MA as a trend indicator and the candle colors as entry and exit signals. Here’s a step-by-step guide:
1. Identify the Trend Direction
• Bullish Trend : The Flux Candle is green and positioned above the Flux MA. This indicates upward momentum.
• Bearish Trend : The Flux Candle is red and positioned below the Flux MA. This indicates downward momentum.
The Flux MA serves as the reference line—candles above it suggest buying pressure, while candles below it suggest selling pressure.
2. Interpret Candle Colors for Trade Signals
• Green Candle : General bullish momentum. Consider entering or holding a long position.
• Red Candle : General bearish momentum. Consider entering or holding a short position.
• Yellow Candle : A strong buy signal. This is an ideal time to enter a long trade.
• Purple Candle : A strong sell signal. This is an ideal time to enter a short trade.
3. Enter Trades Based on Crossovers and Colors
• Long Entry : Enter a buy position when the Flux Candle turns green and crosses above the Flux MA. If it turns yellow, this is an even stronger signal to go long.
• Short Entry : Enter a sell position when the Flux Candle turns red and crosses below the Flux MA. If it turns purple, this is an even stronger signal to go short.
4. Exit Trades
• Exit Long : Close your buy position when the Flux Candle turns red or crosses below the Flux MA, indicating the bullish trend may be reversing.
• Exit Short : Close your sell position when the Flux Candle turns green or crosses above the Flux MA, indicating the bearish trend may be reversing.
•You might also exit a long trade if the candle changes from yellow to green (weakening strong buy signal) or a short trade from purple to red (weakening strong sell signal).
5. Use Additional Confirmation
To avoid false signals, combine the Flux MA and candle signals with other indicators or dashboard metrics (e.g., trend strength, momentum, or volume pressure). For example:
•A yellow candle with a " Strong Bullish " trend and high buying volume is a robust long signal.
•A red candle with a " Moderate Bearish " trend and neutral momentum might need more confirmation before shorting.
Practical Example
Imagine you’re scalping a cryptocurrency:
• Long Trade : The Flux Candle turns yellow and is above the Flux MA, with the dashboard showing "Strong Buy" and high buying volume. You enter a long position. You exit when the candle turns red and dips below the Flux MA.
• Short Trade : The Flux Candle turns purple and crosses below the Flux MA, with a "Strong Sell" signal on the dashboard. You enter a short position. You exit when the candle turns green and crosses above the Flux MA.
Market Presets and Adaptation
This indicator is designed to work on any market with candlestick price data (stocks, crypto, forex, indices, etc.). To handle different behavior, it provides presets for major asset classes. Selecting a “Stocks,” “Crypto,” “Forex,” or “Options” preset automatically loads a set of parameter values optimized for that market . For example, a crypto preset might use a shorter lookback or higher sensitivity to account for crypto’s high volatility, while a stocks preset might use slightly longer smoothing since stocks often trend more slowly. In practice, this means the same core QFC logic applies across markets, but the thresholds and smoothing adjust so signals remain relevant for each asset type.
Usage Guidelines
• Recommended Timeframes : Optimized for 1 minute to 15 minute intraday charts. Can also be used on higher timeframes for short term swings.
• Market Types : Select “Crypto,” “Stocks,” “Forex,” or “Options” to auto tune periods, thresholds and weights. Use “Custom” to manually adjust all inputs.
• Interpreting Signals : Always confirm a signal by checking that trend, volume, and VWAP agree on the dashboard. A green “Strong Buy” arrow with green trend, green volume, and price > VWAP is highest probability.
• Adjusting Sensitivity : To reduce false signals in fast markets, enable DI Reversal Confirmation and Dynamic Thresholds. For more frequent entries in trending environments, enable Early Entry Trigger.
• Risk Management : This tool does not plot stop loss or take profit levels. Users should define their own risk parameters based on support/resistance or volatility bands.
Background Shading
To give you an at-a-glance sense of market regime without reading numbers, the indicator automatically tints the chart background in three modes—neutral, bullish and bearish—with two levels of intensity (light vs. dark):
Neutral (Gray)
When ADX is below 20 the market is considered “no trend” or too weak to trade. The background fills with a light gray (high transparency) so you know to sit on your hands.
Bullish (Green)
As soon as ADX rises above 20 and +DI exceeds –DI, the background turns a semi-transparent green, signaling an emerging uptrend. When ADX climbs above 30 (strong trend), the green becomes more opaque—reminding you that trend-following signals (Strong Buy, Pullback) carry extra weight.
Bearish (Red)
Similarly, if –DI exceeds +DI with ADX >20, you get a light red tint for a developing downtrend, and a darker, more solid red once ADX surpasses 30.
By dynamically varying both hue (green vs. red vs. gray) and opacity (light vs. dark), the background instantly communicates trend strength and direction—so you always know whether to favor breakout-style entries (in a strong trend) or stay flat during choppy, low-ADX conditions.
The setup shown in the above chart snapshot is BTCUSD 15 min chart : Binance for reference.
Disclaimer
No indicator guarantees profits. Backtest or paper trade this tool to understand its behavior in your market. Always use proper position sizing and stop loss orders.
Good luck!
- BullByte
MARibbonMARibbon インジケーターについて
この「MARibbon」は、3本の移動平均線(MA1、MA2、MA3)を描画し、特にMA2とMA3の関係性に注目して、背景色でトレンドの強弱や転換のサインを視覚的に分かりやすく表示するインジケーターです。
主な特徴
3種類の移動平均線を表示可能
MA1(白色、期間40、太さ2)
MA2(水色、期間200、太さ4)
MA3(ピンク色、期間800、太さ4)
各MAの期間・種類(SMA、EMA、WMA、RMA)・タイムフレームは自由に設定可能。
MA2とMA3の関係性に応じて、チャート背景に色付きのリボン(帯)を表示。
背景リボンの意味
MA2 > MA3(ゴールデンクロス状況)
→ 背景を薄い緑色にして、上昇トレンドの可能性を示唆。
MA3 > MA2(デッドクロス状況)
→ 背景を薄い赤色にして、下降トレンドの可能性を示唆。
それ以外(等しい場合など)は背景色なし(透明)で表示。
入力可能な設定
各移動平均線の期間
各移動平均線の種類(SMA、EMA、WMA、RMA)
各移動平均線のタイムフレーム(デフォルトはチャートと同じ)
使い方
任意の銘柄・時間足のチャートにインジケーターを適用。
必要に応じて、3本の移動平均の期間・種類・時間足を調整。
MA2とMA3の位置関係によって、チャート背景の色が変わり、トレンドの強弱を直感的に把握可能。
MARibbon is a custom indicator that plots three moving averages (MA1, MA2, MA3) and visually fills the space between MA2 and MA3 with color bands to indicate trend strength and direction.
Each MA supports custom type (SMA / EMA / WMA / RMA), length, and timeframe.
A green band appears when MA2 is above MA3.
A red band appears when MA3 is above MA2.
This clean and minimal design helps traders easily visualize overlapping trends and potential crossovers.
💡 Use Cases:
Visually confirm confluence of long- and short-term trends
Identify ribbon-like zones of trend strength
Support for MA cross strategy analysis
10 Monday's 1H Avg Range + 30-Day Daily RangeWhat This Script Does
This indicator is designed for traders who want to monitor volatility and range behavior at the start of the trading week . It focuses specifically on the first four 15-minute candles of each Monday and tracks their combined high-low range over time.
How It Works
Monday 1H Range Detection:
Each week, it automatically detects and highlights the first 4 candles of Monday on a 15-minute chart (1 hour total). It calculates the range between the highest high and lowest low of these candles.
10-Week Average of Monday 1H Ranges:
It stores and averages the last 10 such ranges, displaying this average in a table for weekly comparison.
30-Day Daily Range Average:
Separately, it calculates the average daily range (high – low) of the last 30 daily candles. This value helps put the Monday 1H range into broader context and can guide Stop Loss or TP planning.
Dynamic Labeling & Visual Highlights:
The script visually highlights the first 4 candles of Monday and places a label showing the pip range once the 4 candles have completed. It also updates a small table with the two averages described above.
How to Use It
Use it on the 15-minute timeframe to activate the Monday 1H logic.
Compare the current week’s Monday range to the 10-week average to see if volatility is increasing or decreasing.
Use the 30-day daily range to determine if the Monday opening movement is unusually large or small.
Consider adjusting trade entries, stops, or targets if the Monday range is disproportionately large compared to recent historical behavior.
What Makes It Original?
This is not a typical volatility indicator like ATR or standard deviation. Instead, it’s a purpose-built tool combining:
Time-specific behavior (first hour of the week),
Historical contextualization (10-week average tracking),
A dual-timeframe analysis (15-min + daily),
A user-friendly table and visual interface.
This script helps intraday or swing traders spot abnormal volatility early in the week and adjust their strategies accordingly—especially in fast-moving Forex or Index markets.
YB Academy SNRThe YB Academy SNR indicator is a complete swing-based Support & Resistance mapping tool with powerful built-in entry/exit signals. Designed for traders who want to identify high-probability reaction zones and get real-time alerts for the best buy and sell opportunities, this script helps you trade with structure, confidence, and discipline—on any time frame.
How It Works
1. Automatic Support & Resistance Detection
The indicator automatically scans for major swing highs and swing lows on your chart using a sensitivity parameter.
Every time a new swing high/low forms, a horizontal SNR line is drawn at that price level.
Both support and resistance lines automatically extend to the right of your chart, providing a persistent map of key levels for future entries and exits.
You can control how many recent zones are shown (max_snrs), keeping your chart clean and focused.
2. Smart Buy/Sell Signal Generation
Buy signals (“YB Buy”): Trigger when price touches or bounces off a support line, with trend/momentum/freshness filters:
Price is above the EMA50 (trend filter)
MACD is bullish (momentum)
RSI confirms no overbought
Sell signals (“YB Sell”): Trigger when price hits resistance, with strict confirmation:
Price is below EMA50
MACD is bearish
RSI not oversold
Both signals are shown as clear up/down triangle arrows directly on your chart.
3. Powerful Alerts
Never miss a trade: Real-time alerts fire as soon as a valid buy or sell condition appears.
Use with TradingView app, web, or SMS for 24/7 notification—no chart-watching needed.
4. Fully Customizable
Change sensitivity for tighter/looser SNR mapping.
Control the look and feel: colors for SNR, signals, number of zones, extension distance.
Works on any market: gold, forex, indices, crypto, stocks.
5. Clean Visuals, Zero Clutter
SNR lines are automatically managed—older zones are removed as new ones appear.
Only the latest/best buy/sell signals are shown, so you can act quickly and decisively.
Perfect For:
Scalpers, Day Traders, Swing Traders
Anyone who wants to trade using clean price action levels, NOT lagging indicators
Traders looking for rule-based, mechanical entries and exits
What Makes This Unique?
Precision: Uses swing structure, not arbitrary pivots or moving averages, for SNR.
Multi-Filter Entries: Combines trend, momentum, and overbought/oversold logic for high-probability signals.
Alerts & Automation: Built-in, with no need for manual chart watching.
Simple to Use: Add to any TradingView chart, adjust settings, and go.
Upgrade your trading with the YB Academy SNR!
Get alerted to the real opportunities—right at the key price zones, with all the discipline of a professional.
Filtered DTR Table📊 Filtered Daily True Range (DTR) Indicator
This indicator calculates and displays a filtered version of the Daily True Range (DTR) over the last 14 trading days, using high and low prices of each day.
It filters out extreme values by excluding any daily range that is:
Less than 0.5× the average range
Greater than 2× the average range
The indicator shows a table in the bottom-right corner of the main chart, containing:
Filtered ATR – The average of valid (filtered) daily ranges over the past 14 days, based on the high-low difference.
Current Day's Range – The high-low range of the current trading day.
% of ATR – How much of the filtered ATR has been covered by today's range, expressed as a whole number percentage.
StochRSI Context EngineThe StochRSI Context Engine is a premium, logic-driven indicator built to provide comprehensive intraday momentum context using multi-timeframe Stochastic RSI analysis. Rather than issuing direct buy or sell signals, the tool is designed to give traders enhanced clarity on trend posture, overbought/oversold conditions, volatility states, and potential momentum reversals. It combines multiple layers of signal processing to deliver an intelligent overview of market conditions in real time.
What it does:
The indicator performs a multi-timeframe evaluation of the Stochastic RSI, sampling values from four customizable timeframes (default: 5m, 15m, 1h, 4h). These values are blended and processed through a series of analytical engines to provide the following:
1. StochRSI Multi-Timeframe Engine
* Computes a smoothed Stochastic RSI value on each selected timeframe.
* Applies user-defined smoothing (SMA, EMA, RMA, or WMA).
* Aggregates these into an average (sRSIavg) for further analysis.
2. Trend and Volatility Engine
* Uses EMA stacking logic (8, 21, 50) to determine directional alignment.
* Calculates linear regression slope for directional bias.
* Assesses volatility using ATR relative to price.
* Derives a trendScore based on EMA alignment, price position, and slope strength.
3. Bias and Slope Analysis
* Measures fast/slow EMA slope differentials to detect bias direction and strength.
* Computes slope deltas and volatility-weighted stacking to score bias conditions.
* Outputs a classification such as strong bullish, moderate bearish, or neutral.
4. Dynamic OB/OS Zone Detection
* Adapts overbought and oversold thresholds based on volatility and trend regime.
* Adjusts the zone boundaries if in a trending or high-volatility environment.
5. Microzone Proximity Detection
* Tracks whether the average StochRSI is approaching key OB/OS thresholds.
* Flags conditions like “Near Overbought,” “Near Oversold,” or “Mid Range.”
6. Velocity and Acceleration Detection
* Measures how quickly StochRSI values are changing.
* Uses delta calculations to gauge the momentum’s thrust or decay.
* Classifies shifts in RSI movement (e.g., flat, slow, fast, or thrusting).
7. Range Expansion / Compression Engine
* Evaluates whether StochRSI values across timeframes are diverging or compressing.
* Identifies regime changes in momentum coherence.
8. Momentum Scoring System
* Calculates a composite score based on bias, slope strength, volatility, and range.
* Labels momentum phases from dormant to full-throttle.
9. Confluence Detection
* Tallies how many of the 4 timeframes are currently overbought or oversold.
* High confluence increases the probability of valid reversal or continuation zones.
10. Support and Resistance Zone Memory
* Tracks and plots previous areas where StochRSI bounced or rejected near zones.
* Stores and updates these zones over time, acting as momentum-based S/R levels.
* Includes a proximity check to cluster zones that are close in value.
11. Divergence Detection Engine
* Detects classic bullish or bearish divergence between price and the aggregated StochRSI.
* Draws lines to show divergence structure and triggers real-time alerts.
12. Smart Background Highlighting
* Shades the background based on whether current StochRSI is in an overbought, oversold, or
neutral zone.
13. Real-Time Dashboard
* Displays trend, bias, confluence count, velocity, divergence state, momentum score, and
more.
* Dynamically updates and is optimized for top-right screen positioning with compact
formatting.
14. Smart Alerts
* Issues alerts for divergence detection and high-confluence reversal conditions.
15. Real-Time Labels on Curves
* Shows the selected timeframes alongside each plotted StochRSI line to clarify source data.
What it’s based on:
* Stochastic RSI as the core input signal, providing normalized momentum across timeframes.
* EMA stacking logic, adapted from institutional trend-following models.
* Volatility normalization using ATR to adapt thresholds in high vs. low volatility environments.
* Slope forecasting using linear regression to infer directional conviction.
* Bias analysis modeled on a composite of EMA distance, alignment, and directional thrust.
* Support/resistance zone memory derived from repeated interaction with dynamic OB/OS thresholds.
* Divergence logic based on localized price and oscillator peaks/troughs.
* Multi-factor confidence scoring, aggregating up to 6 inputs to rate market clarity.
This script is for educational and informational purposes only. It does not generate trade signals or provide financial advice. It is not intended to be used as a standalone system for trading or investment decisions. Use at your own discretion. Always confirm with your broader strategy and risk management practices.
RSI Divergence Indicator - Trading VidhyalayaThis indicator automatically identifies RSI-based bullish and bearish divergences and visually marks them directly on the candlestick chart, making it easier for traders to spot potential reversals.
✅ Key Features:
Bullish Divergence
When the price makes a lower low, but the RSI makes a higher low, the indicator highlights the candle with a green arrow or label to signal potential upward reversal.
Bearish Divergence
When the price makes a higher high, but the RSI forms a lower high, the indicator marks the candle with a red arrow or label to indicate a possible downside move.
Real-time Detection
Divergences are plotted in real-time, helping traders react quickly to changing market conditions.
Candlestick Overlay
Signals are shown directly on the chart, rather than below in a separate panel, allowing for faster and clearer decision-making.
📊 Benefits:
Helps in identifying early trend reversals
Works well with other indicators like MACD, Moving Averages, or Volume
Great for both beginners and advanced traders
Saves time by automating divergence spotting, reducing manual errors
Simple Buy/Sell SignalsThe code works by continuously monitoring the relationship between two moving averages (MAs) on live price data — a fast MA (shorter period) and a slow MA (longer period). These MAs smooth out price action to help identify trends. Here's how it functions step-by-step:
Inputs: The user selects the MA type (SMA or EMA) and the lengths (periods) for the fast and slow MAs.
Calculation: The script calculates the chosen MAs using real-time closing prices.
Signal Logic: It detects a Buy signal when the fast MA crosses above the slow MA (crossover) and a Sell signal when the fast MA crosses below the slow MA (crossunder).
Plotting: When a signal occurs, the script plots a green "BUY" arrow below the candle or a red "SELL" arrow above it.
Alerts: It includes alert conditions so users can receive notifications when a buy or sell condition is met.
RTH Session Range Position (0-100) with EMAA Pine Script indicator designed to help traders understand where the current price is located within the Regular Trading Hours (RTH) session range, from 0 (session low) to 100 (session high). It also plots a smoothed EMA of this position to provide insight into momentum or trend during the RTH session.
What the Indicator Does
Defines RTH (Regular Trading Hours):
Start: 9:30 AM
End: 4:00 PM
These are typical US equity market hours.
Tracks the session's high and low during RTH:
sessionHigh and sessionLow update only during RTH.
Calculates position of the current price within the RTH range:
Formula: ((close - sessionLow) / (sessionHigh - sessionLow)) * 100
Result is a percentage:
0 = at session low
100 = at session high
50 = middle of session range
Calculates an EMA of that position (posEMA):
Smooths out the raw position to help visualize momentum within the range.
Plots and table:
Plots pos and posEMA on a separate chart pane.
Adds horizontal lines at key levels (0, 30, 50, 70, 100).
Table shows current values for Position, EMA, and Range.
Visual cues:
bgcolor highlights when pos crosses over or under the EMA — potential momentum shifts.
Alerts:
Cross above/below 50 (session midpoint).
Cross above/below EMA.
How to Use It Effectively
1. Session Strength & Momentum
Position above 70: Price is near session highs — strong upward momentum.
Position below 30: Price is near session lows — strong downward momentum.
Use the EMA of position to filter out noise and identify trends.
2. Breakout or Reversal Detection
Cross above EMA: Momentum may be turning bullish.
Cross below EMA: Momentum may be turning bearish.
These crosses (especially near mid-levels like 50) can hint at session trend shifts.
3. Range Context for Entries
If you're a mean-reversion trader, look for:
Price > 70 + turning down below EMA → possible short.
Price < 30 + turning up above EMA → possible long.
For breakout traders, you might wait for:
Crosses above 70 with EMA support.
Crosses below 30 with EMA resistance.
4. Confirmation Tool
Use this indicator alongside others to confirm:
Whether price action has strength within the day.
Whether breakouts have real momentum or are extended already.
Open-Based Percentage Levelsv2
This is an updated version of my original script.
Changes:
I took off the displacement levels since there served no purpose on this script.
I also fixed it to where the percentage level lines are visible continually throughout the entire trading day. Old version had these lines disappearing.
I also updated the name to better reflect its purpose.
Now only works on 30 min and below as the higher time frames are meaningless. The older version allow higher time frames and the code is open source to adjust as desired
RTH Session Highs & LowsA Pine Script indicator designed to track and plot the Regular Trading Hours (RTH) session highs and lows on a chart, typically for U.S. equity markets (e.g., S&P 500, Nasdaq, etc.), which operate from 9:30 AM to 4:00 PM Eastern Time.
Session High & Low Lines:
During the RTH session, the indicator draws green and red horizontal lines that represent the highest and lowest price seen so far within that trading session.
These levels help traders identify intraday support (low) and resistance (high) levels.
New High/Low Markers:
Small triangle markers are placed:
Above the bar when a new intraday high is made (green triangle).
Below the bar when a new intraday low is made (red triangle).
This visually flags when momentum may be building or reversing.
Intraday Strategy Support:
Use the session high/low as dynamic support/resistance for scalping or breakout strategies.
For example:
Breakouts above session highs may indicate bullish strength.
Breakdowns below session lows may suggest bearish momentum.
Mean Reversion Tactics:
Prices approaching these lines and then rejecting can be used for mean reversion setups.
Combine with volume or candlestick patterns for confirmation.
Risk Management:
Set stops or targets relative to session highs/lows.
For instance, use session high as a stop-loss level in a short position.
Volatility Gauge:
Tracking how frequently new highs/lows are formed can help assess intraday volatility or range expansion.
Complement with Indicators:
Combine this with our "McGinley Dynamic Channel with Directional Shading" indicator or our "EMA Crossover with Shading" indicator to add context to breakouts or rejections.
Open-Based Adjustable LevelsThis indicator gives signals for levels where the buy or sell volume is above adjustable levels (ex, volume at 100,000). And these levels will only signal after the price has gone above/below a certain 'adjustable' percentage of the stocks opening price.
Example: Signal sell when the price action is 0.7% above market opening price and when sell volume is above 120,000
or
Signal buy when buy volume is above 80,000 and the price is 0.5% below market opening price.
Great for day trading and detecting potential swings in the market. Above image is on a 3min chart.
Doesn't work as well on daily time frames or above.
Should be combined with other indicators like buy/sell channels, for the best confirmations
Key Open LevelsThis Pine Script indicator (Key Open Levels) allows users to highlight up to six specific open prices from different times of the trading day as horizontal lines on the chart.
Each line can be customized with user-defined style, width, and color settings.
Users also have the option to display price labels directly on the lines for added clarity.
The indicator is designed to work seamlessly across all intraday timeframes, including seconds, minutes, and hourly intervals, making it versatile for various trading strategies that rely on key intraday price levels.
This indicator has proved to be a key indicator especially for people studying Futures market reaction around Key Open Levels.