Nic SMA 9, SMA 200, 9 count📈 ESSENTIAL TREND & MOMENTUM OVERLAY INDICATOR
This powerful overlay indicator combines moving averages and the 9 count pattern on your main chart, giving you critical trend and reversal signals without cluttering your screen.
🎯 USE AS A PACKAGE:
For optimal trading analysis, use this indicator together with "Nic RSI top + MACD bottom" which combines RSI and MACD into a single pane. Together, these two indicators give you a complete technical analysis setup while staying within the 2-3 indicator limit for free TradingView accounts.
📈 WHAT'S INCLUDED:
✅ SMA 9 (9-day Simple Moving Average):
• Default red line for short-term trend identification
• Fully customizable period and color
• Perfect for identifying quick momentum shifts
✅ SMA 200 (200-day Simple Moving Average):
• Default white line for long-term trend direction
• Fully customizable period and color
• Classic indicator for major support/resistance levels
✅ The 9 Count Pattern:
• Displays numbers 7, 8, and 9 when the pattern completes
• Buy signals (teal/cyan labels) appear below price when downtrend exhausts
• Sell signals (red labels) appear above price when uptrend exhausts
• Helps identify potential trend reversals and exhaustion points
• Only shows the critical final three counts for clarity
• Customizable label colors
⚙️ CUSTOMIZATION OPTIONS:
• Adjust SMA 9 length and color
• Adjust SMA 200 length and color
• Toggle the 9 count display on/off
• Customize buy and sell label colors
• All components can be independently controlled
💡 WHY USE THIS?
• Combines 3 essential tools into one overlay indicator
• Clean chart layout - no separate panes needed
• Classic moving averages you're already familiar with
• Powerful reversal pattern identification
• Perfect for swing trading and position trading
• Saves indicator slots for free account users
📋 RECOMMENDED SETUP:
1. Add this "Nic SMA 9, SMA 200, 9 count" indicator to your main chart
2. Add "Nic RSI top + MACD bottom" indicator (published separately)
3. Optionally add Volume indicator if you have a slot available
This gives you moving averages, the 9 count pattern, RSI, and MACD - everything you need for comprehensive technical analysis!
🔔 WORKS WITH FREE ACCOUNTS:
Both indicators in the Nic package are designed to maximize your analysis capabilities within TradingView's indicator limits.
📊 HOW TO USE:
• When price is above SMA 200, focus on long opportunities
• When price is below SMA 200, focus on short opportunities
• SMA 9 crossovers with SMA 200 signal potential trend changes
• The 9 count appearing suggests the current trend may be exhausting
• Combine with RSI and MACD for confirmation
#MovingAverages #SMA #TrendAnalysis #ReversalPattern #FreeIndicators #TechnicalAnalysis
Ketidakstabilan
The Machine – Smart Zones PRO The Machine – Smart Zones PRO
Overview
The Machine – Smart Zones PRO is a multi-component analytical indicator that identifies key market structure zones, trend alignments, and potential confluence areas using a weighted probability model. It’s designed to map price behavior around support and resistance pivots while integrating higher-timeframe trend and volatility data for confirmation.
Core Logic
The indicator combines four analytical modules to generate its visualization and probability metrics:
Trend Analysis
Calculates short-term trend using a moving-average filter (SMA) and ATR-based volatility structure.
Confirms directional bias from a user-selected higher timeframe for multi-timeframe alignment.
Volatility and Confirmation
Detects volume spikes relative to the moving average of volume to confirm activity strength.
Generates bar-confirmed buy/sell signals when local and higher-timeframe trends align with volatility expansion.
Smart Zone Mapping
Uses pivot-based detection on the selected timeframe to locate reaction highs and lows.
Converts those pivots into adaptive “Smart Zones” (highlighted boxes) extended forward in time to represent potential support/resistance regions.
Old zones are automatically cleared to keep the chart optimized.
Confluence Logic
Calculates the proximity of price to existing Smart Zones and scores confluence strength.
When trend, volatility, and zone alignment agree, the system marks a “Buy” or “Sell” confluence marker.
Scoring and Probabilities
Each signal and zone evaluation is expressed as a weighted probability. The model blends four weighted components:
Local trend (wTrend)
Higher-timeframe alignment (wHTF)
Volume confirmation (wVol)
Proximity to Smart Zones (wZone)
These weights produce two probability values — Buy Probability and Sell Probability — that update in real time and can be visualized as continuous plot lines.
Visual Elements
Smart Zones: Dynamic colored boxes marking pivot-based support and resistance regions.
Trendlines: Optional horizontal extensions from local pivots.
Signal Markers: Buy/Sell labels appear only after confirmed bar closes.
Confluence Markers: Triangular symbols when price interacts with significant zones during aligned trend conditions.
Dashboard Panel: Displays the latest signal, probability score, active trend direction, and potential next directional bias.
Use Case
This indicator helps visualize market structure shifts, identify high-probability confluence areas, and monitor how price interacts with statistically significant zones. It can be applied to any timeframe or instrument for structural confirmation or bias observation.
Disclaimer
This script is for technical analysis and educational purposes only. It does not provide trade recommendations or financial advice.
The Machine – Session Map PRO (final)The Machine – Session Map
Overview
The Machine – Session Map is a session-based analytical indicator that divides the trading day into the three main global sessions — Asia, London, and New York — and maps their price behavior using structured logic. It’s designed for traders who study intraday cycles, session liquidity behavior, and inter-session relationships.
Core Logic
The indicator identifies the start and end times of each major trading session based on user-defined session times. For every session, it:
Captures session range by recording the high, low, and close between session start and end.
Stores previous session data and projects key levels (previous session high, low, and midpoint) into the next day as reference support/resistance zones.
Computes pip range and volatility metrics per session to measure strength and expansion.
Determines directional bias by comparing the session’s close relative to its open and prior session range (expansion above or below prior structure defines bias).
Detects accumulation and distribution zones using session overlap logic and range compression/expansion criteria.
Labels session structures with automatic annotations such as “Expansion,” “Retracement,” or “Reversal” when volatility or bias conditions are met.
Visual Elements
Session Boxes: Colored regions that visually segment the chart into the three sessions.
High/Low Lines: Dynamic lines showing real-time session highs and lows as price develops.
Previous Session Levels: Optional projection of previous highs/lows/midpoints as structural zones.
Bias Labels: Text markers summarizing session direction and volatility conditions.
Dashboard Panel: Displays current session time, range in pips, and directional bias summary.
Use Case
This tool is useful for identifying intraday structure shifts, comparing session volatility, and observing how price behaves relative to prior session levels. It can support strategies involving session-based liquidity cycles, accumulation/manipulation/distribution behavior, or time-based confluence.
Disclaimer
This indicator is designed for technical and educational analysis. It does not generate buy/sell signals or provide financial advice.
VWAP Reversion (Sequential Stats + Profit/Loss Points)First time posting. This is my attempt to evaluate the effectiveness of VWAP reversion. I decided to make this an indicator with its own integrated stats.
If you set the session length to lets say 100, but choose a 1 minute timeframe, it will only load as many sessions as the chart will allow for that timeframe. increasing the timeframe will allow you to go back further with more sessions.
I plan to implement more and more as I refine it. I just wanted to get my working copy out into the universe. I'd like to add some method of "scaling in". Perhaps if the price goes further and further away from the original entry, say for each additional std. deviation band further, it could add another entry signal.
My trading journey is just beginning, I've never coded before, and this was made entirely through the fusion of my attempt to communicate the ideas in my head for ChatGPT to turn into code!
Ultimate RSI Suite [BigBeluga]🔵 OVERVIEW
The Ultimate RSI Suite elevates the classic RSI into a full professional trading system.
It combines momentum analysis, advanced divergence detection, volatility-based RSI channels, multi-timeframe signals, deviation tracking, and reversal alerts into one powerful tool.
This is no ordinary RSI — it’s a complete momentum intelligence engine designed to identify trend strength, exhaustion, breakout conditions, and reliable reversal points with high precision.
⚠️ Note:
This suite enhances RSI with MTF dashboards, dynamic channels, deviation logic, and smart alerting — ideal for scalpers, swing traders, and institutional-style trend followers.
🔵 CONCEPTS
Measures market momentum to detect overbought/oversold zones and trend health
Tracks RSI behavior relative to dynamic channels (BB/Keltner/Donchian)
Identifies regular bullish & bearish divergences
Detects deviation moves after divergence to confirm trend continuation or exhaustion
Multi-timeframe RSI conditions reveal higher-timeframe confluence
Reversal triggers confirm early momentum shifts
Overbought/oversold gradients visually highlight exhaustion zones
🔵 FEATURES
Classic + Enhanced RSI with configurable lookback & price source
RSI-Channel System (Bollinger, Keltner, Donchian) for volatility-adaptive trend structure
RSI-Smoothing MA for trend direction filters
RSI Reversal Signals for early trend inflection detection
RSI Reversal Signals Deviation Levels +1 / +2 for advanced continuation confirmation
Overbought/Oversold Gradient Zones at 35/65 or user-defined levels
Divergence Engine for bullish & bearish momentum exhaustion signals
On-Chart Divergence & Signals (full overlay capability)
Divergence Engine Deviation Levels +1 / +2 for advanced continuation confirmation
Multi-Timeframe Dashboard (RSI OB/OS, signals, divergences, channel breaks)
• Hover your mouse over any signal cell to see how many bars ago it was triggered
• Signals automatically expire after 50 bars
Smart Alerts for divergence, reversals, channel breaks, and deviation triggers
🔵 HOW TO USE
Enter long when RSI reverses from oversold & prints bullish divergence or a ▲ signal
Enter short when RSI reverses from overbought & prints bearish divergence or ▼
Use channel breaks to confirm momentum expansions or trend shifts
Look for deviation crosses (+1 / +2) for strong confirmation after divergence
Track MTF table — more timeframe agreement = stronger conviction
Avoid trading against MTF RSI extremes (OB/OS stacked zones)
Combine with market structure or volume-based tools for maximum precision
🔵 ALERTS
Includes full automation suite:
Bullish / Bearish divergence
Reversal signals (▲ / ▼)
Channel breakouts (Up/Down)
Deviation +1 / +2 confirmation triggers
Extra RSI signal deviation alerts for precision continuation reads
Great for automated systems, confirmation models, and high-probability intraday/swing entries.
🔵 CONCLUSION
The Ultimate RSI Suite transforms RSI into a smart momentum-analysis system.
With multi-timeframe logic, dynamic channels, advanced divergence/deviation systems, and powerful visual cues, it offers institutional-grade trend, exhaustion, and reversal detection.
If you rely on RSI, this toolkit provides superior clarity, deeper context, and stronger execution timing — making it an elite upgrade for professional traders.
Skrip berbayar
NSR - Dynamic Linear Regression ChannelOverview
The NSR - Dynamic Linear Regression Channel is a powerful overlay indicator that plots a dynamic regression-based channel around price action. Unlike static channels, this tool continuously recalculates the linear regression trendline from a user-defined starting point and builds upper and lower boundaries using a combination of standard deviation and maximum price deviations (highs/lows).
It visually separates "Premium" (overvalued) and "Discount" (undervalued) zones relative to the regression trend — ideal for mean-reversion, breakout, or trend-following strategies.
Key Features
Dynamic Regression Line Calculates slope, intercept, and average using full lookback from a reset point.
Adaptive Channel Width Combines standard deviation of residuals with max high/low deviations for robust boundaries.
Auto-Reset on Breakout Channel resets when price closes beyond upper/lower band twice in direction of trend .
Visual Zones Blue shaded = Premium (resistance zone)
Red shaded = Discount (support zone)
Real-Time Updates Live channel extends with each bar; historical channels preserved on reset.
How It Works
Regression Calculation
Uses all bars since last reset to compute the best-fit line:
y = intercept + slope × bar_position
Deviation Bands
Statistical : Standard deviation of price from regression line
Structural : Maximum distance from highs to line (upper) and lows to line (lower)
Final band = Regression Line ± (Deviation Input × StdDev)
Channel Reset Logic
Resets when:
Price closes above upper band twice in an uptrend (slope > 0)
OR closes below lower band twice in a downtrend (slope < 0)
Prevents overextension and adapts to new trends.
Visual Output
Active channel updates in real-time
Completed channels saved as historical reference (up to 500 lines/boxes)
Input Parameters
Deviation (2.0) - Multiplier for standard deviation to set channel width
Premium Color - blue color for upper (resistance) zone
Discount Color - red color for lower (support) zone
Best Use Cases
Mean Reversion - Buy near lower band in uptrend, sell near upper band
Breakout Trading - Enter on confirmed close beyond band + volume
Trend Confirmation - Use slope direction + price position in channel
Stop Loss / Take Profit - Place stops beyond opposite band
Pro Tips
Use on higher timeframes (4H, Daily) for cleaner regression fits
Combine with volume or momentum to filter false breakouts
Lower Deviation (e.g., 1.5) for tighter, more responsive channels
Watch channel resets — they often mark significant trend shifts
Why Use DLRC?
"Most channels are static. This one evolves with the market."
The NSR-DLRC gives you a mathematically sound, visually intuitive way to see:
Where price should be (regression)
Where it has been (deviation extremes)
When the trend is breaking structure
Perfect for traders who want regression-based precision without rigid assumptions.
Add to chart → Watch price dance within the evolving trend corridor.
MIG and MC 发布简介(中文)
MIG and MC 指标帮助日内交易者快速识别微型缺口(Micro Gap)与微型通道(Micro Channel)。脚本支持过滤开盘跳空、合并连续缺口,并自动绘制
FPL(Fair Price Line)延伸线,既可追踪缺口是否被填补,也能直观标注潜在的趋势结构。为了确保跨周期一致性,最新版本对开盘前后和跨日场景做了专门处理
主要特性
- 自动检测并显示看涨/看跌微型缺口,支持按需合并连续缺口。
- 自定义是否忽略开盘缺口、缺口显示范围与 FPL 样式。
- FPL 触及后即停止延伸,辅助研判缺口是否真正回补。
- 内置强收盘与缺口过滤的微型通道识别,可选多种严格程度。
- 适用于 1/5/9 分钟等日内周期,也适用于更长周期。
Recommended English Description
The MIG and MC indicator highlights Micro Gaps and Micro Channels so you can track true intraday imbalances without noise. It merges
consecutive gaps, projects Fair Price Lines (FPL) that stop once touched, and offers a full intraday-ready opening-gap filter so your
early bars stay clean. The latest update refines cross-session handling, giving reliable gap plots on 1-, 5-, and 9-minute charts as well as higher time frames.
Key Features
- Detects bullish and bearish micro gaps with optional gap merging.
- Toggle opening-gap filters and configure look back, visibility, and FPL style.
- FPL lines stop as soon as price revisits the gap, making gap closure obvious.
- Micro Channel mode uses strong-close and gap filters to mark high-quality trend legs.
- Consistent behavior across intraday and higher time frames.
Kalman Adaptive Score Overlay [BackQuant]Kalman Adaptive Score Overlay
A powerful indicator that uses adaptive scoring to assess market conditions and trends, utilizing advanced filtering techniques to smooth price data, enhance trend-following precision, and predict future price movements based on past data. It is ideal for traders who need a dynamic and responsive trend analysis tool that adjusts to market fluctuations.
What is Adaptive Scoring?
Adaptive scoring is a technique that adjusts the weight or importance of certain price movements over time based on an ongoing assessment of market behavior. This indicator uses dynamic scoring to assess the strength and direction of price movements, providing insight into whether a trend is likely to continue or reverse. The score is recalculated continuously to reflect the most up-to-date market conditions, offering a responsive approach to trend-following.
How It Works
The core of this indicator is built on advanced filtering methods that smooth price data, adjusting the response to recent price changes. The filtering mechanism incorporates a Kalman filter to reduce noise and improve the accuracy of price signals. Combined with adaptive scoring, this creates a robust framework that automatically adjusts to both short-term fluctuations and long-term trends.
The indicator also uses a dynamic trend-following component that updates its analysis based on the direction of the market, with the option to visualize it through colored candles. When a strong trend is identified, the candles are painted to reflect the prevailing trend, helping traders quickly identify whether the market is in a bullish or bearish state.
Why Adaptive Scoring Is Important
Dynamic Response: Adaptive scoring allows the indicator to respond to changing market conditions. By adjusting its sensitivity to price fluctuations, it ensures that trends are captured accurately, without being overly influenced by short-term noise.
Trend Precision: By combining Kalman filtering with adaptive scoring, the indicator offers a precise and smooth trend-following mechanism. It helps traders stay aligned with the market direction and avoid false signals.
Versatility: The indicator works across multiple timeframes, making it adaptable to different trading strategies, from scalping to long-term trend-following.
Confidence in Market Moves: The adaptive scoring component provides traders with confidence in the strength of the trend, helping them determine when to enter or exit positions with greater certainty.
How Traders Use It
Trend-Following Strategy: Traders can use this indicator to confirm trends and refine their entries and exits. The colored candles and adaptive scoring offer a visual cue of trend strength and direction, making it easier to follow the prevailing market movement.
Multi-Timeframe Analysis: The script supports multi-timeframe analysis, allowing traders to analyze trends and scores across different timeframes (e.g., 1m, 5m, 15m, 30m, 1h, 4h, 12h). This is useful for traders who want to confirm trends on both short and long-term charts before making a trade.
Refining Entry Points: By utilizing the adaptive scoring, traders can identify potential entry points where the score indicates a high probability of trend continuation. Higher scores signal stronger trends, guiding decision-making.
Managing Risk: Traders can use the adaptive scoring system to assess trend stability and adjust their risk management strategies accordingly. For example, higher confidence in the trend allows for larger positions, while lower confidence may require smaller, more cautious trades.
Key Features and Benefits
Kalman Filter for Noise Reduction: The Kalman filter helps to smooth out market noise and allows for a clearer understanding of the underlying price movements. This is particularly useful in volatile markets where short-term fluctuations can cloud trend analysis.
Adaptive Scoring for Flexibility: Adaptive scoring ensures that the indicator remains responsive to changing market conditions. It automatically adjusts to the strength of price movements, enabling better detection of trends and reversals.
Visual Trend Signals: The indicator provides visual signals through candle coloring, making it easier to identify whether the market is in a bullish, neutral, or bearish phase.
Multi-Timeframe Display: The indicator’s multi-timeframe feature allows traders to see the trend and adaptive score on different timeframes simultaneously, providing a comprehensive view of the market.
Customizable Settings: Traders can customize the indicator’s settings, such as the filter parameters, scoring thresholds, and visualization options, tailoring it to their specific trading style and strategy.
Why This is Important for Traders
Improved Decision Making: The adaptive nature of the scoring system allows traders to make more informed decisions based on real-time market data, without being influenced by past volatility.
Market Clarity: By smoothing out price movements and scoring trends adaptively, the indicator provides a clearer picture of market behavior, which is essential for effective trend-following and timing entries and exits.
Increased Confidence in Signals: Adaptive scoring ensures that signals are based on the current market structure, reducing the likelihood of false positives. This boosts traders' confidence when acting on signals.
Conclusion
The Kalman Adaptive Score Overlay offers a dynamic and responsive trend-following tool that integrates Kalman filtering with adaptive scoring. By adjusting to market fluctuations in real time, it allows traders to identify and follow trends with greater precision. Whether you are trading on short or long timeframes, this tool helps you stay aligned with market momentum, ensuring that your entries and exits are based on the most up-to-date and reliable data available.
7D Historical Volatility (Regimes + Stats) - ChrrizzyHere’s what that indicator does—at a glance:
### Core idea
It computes **7-day Historical Volatility (HV)** from **daily** log returns (annualized), then shows:
* the **HV line** and its **30-day average**,
* colored **volatility regimes** (Low / Normal / High / Extreme) with thresholds you set,
* a compact **status panel** (top-right, nudged left) with current stats and time-in-zone.
### Calculations
* **HV (7D)**: `stdev(log(close/close ), 7) * sqrt(365) * 100`, always from **daily data** via `request.security`, so it’s consistent on any chart timeframe.
* **Regimes** (defaults):
Low < 25% • Normal 25–50% • High 50–70% • Extreme > 70% (all editable).
* **30-day avg**: SMA of HV.
* **Time in zone (% over window)**: SMA of boolean flags (e.g., in Low=1 else 0) over `statsWin` days (default 300).
* **Rolling median HV**: 50th percentile over `statsWin`.
### What you see on the chart
* **HV line** (bold) + **30-day HV** (lighter).
* **Horizontal dashed lines** at your regime thresholds.
* **Background shading** that changes with the current regime (green/blue/orange/red).
### Panel (top-right)
Shows:
* BTC Price (daily close)
* Current HV
* 30-day Avg HV
* Median HV (over window)
* Current **Regime**
* A two-line summary: **% of time spent** in Low / Normal / High / Extreme over the chosen window.
The panel is shifted slightly left using a hidden spacer column; tweak the **“Panel right padding (chars)”** input to move it.
### Alerts (ready to use)
* **HV crossed up Low**
* **HV crossed down Low**
* **HV crossed up High**
* **HV crossed up Extreme**
### Inputs you can tune
* `HV Lookback (days)` (default 7)
* `Average HV (days)` (default 30)
* Thresholds: Low/High/Extreme
* `Stats Window (days)` (default 300)
* Panel padding, toggle table/zones on/off.
### How to use it
* **Context**: quickly see if BTC is in **compressed** (Low) or **stressed** (High/Extreme) volatility.
* **Regime cross alerts**: get notified when volatility **expands** from Low (potential breakout conditions) or pushes into High/Extreme (risk increases).
* **Stats/median**: compare today’s HV to its typical level over your lookback window.
If you want, I can add an **HV percentile rank** (e.g., “Current HV is at the 38th percentile over 300d”) or mirror the **low-vol breakout signal** from Script A into this panel.
Machine Learning Moving Average [BackQuant]Machine Learning Moving Average
A powerful tool combining clustering, pseudo-machine learning, and adaptive prediction, enabling traders to understand and react to price behavior across multiple market regimes (Bullish, Neutral, Bearish). This script uses a dynamic clustering approach based on percentile thresholds and calculates an adaptive moving average, ideal for forecasting price movements with enhanced confidence levels.
What is Percentile Clustering?
Percentile clustering is a method that sorts and categorizes data into distinct groups based on its statistical distribution. In this script, the clustering process relies on the percentile values of a composite feature (based on technical indicators like RSI, CCI, ATR, etc.). By identifying key thresholds (lower and upper percentiles), the script assigns each data point (price movement) to a cluster (Bullish, Neutral, or Bearish), based on its proximity to these thresholds.
This approach mimics aspects of machine learning, where we “train” the model on past price behavior to predict future movements. The key difference is that this is not true machine learning; rather, it uses data-driven statistical techniques to "cluster" the market into patterns.
Why Percentile Clustering is Useful
Clustering price data into meaningful patterns (Bullish, Neutral, Bearish) helps traders visualize how price behavior can be grouped over time.
By leveraging past price behavior and technical indicators, percentile clustering adapts dynamically to evolving market conditions.
It helps you understand whether price behavior today aligns with past bullish or bearish trends, improving market context.
Clusters can be used to predict upcoming market conditions by identifying regimes with high confidence, improving entry/exit timing.
What This Script Does
Clustering Based on Percentiles : The script uses historical price data and various technical features to compute a "composite feature" for each bar. This feature is then sorted and clustered based on predefined percentile thresholds (e.g., 10th percentile for lower, 90th percentile for upper).
Cluster-Based Prediction : Once clustered, the script uses a weighted average, cluster momentum, or regime transition model to predict future price behavior over a specified number of bars.
Dynamic Moving Average : The script calculates a machine-learning-inspired moving average (MLMA) based on the current cluster, adjusting its behavior according to the cluster regime (Bullish, Neutral, Bearish).
Adaptive Confidence Levels : Confidence in the predicted return is calculated based on the distance between the current value and the other clusters. The further it is from the next closest cluster, the higher the confidence.
Visual Cluster Mapping : The script visually highlights different clusters on the chart with distinct colors for Bullish, Neutral, and Bearish regimes, and plots the MLMA line.
Prediction Output : It projects the predicted price based on the selected method and shows both predicted price and confidence percentage for each prediction horizon.
Trend Identification : Using the clustering output, the script colors the bars based on the current cluster to reflect whether the market is trending Bullish (green), Bearish (red), or is Neutral (gray).
How Traders Use It
Predicting Price Movements : The script provides traders with an idea of where prices might go based on past market behavior. Traders can use this forecast for short-term and long-term predictions, guiding their trades.
Clustering for Regime Analysis : Traders can identify whether the market is in a Bullish, Neutral, or Bearish regime, using that information to adjust trading strategies.
Adaptive Moving Average for Trend Following : The adaptive moving average can be used as a trend-following indicator, helping traders stay in the market when it’s aligned with the current trend (Bullish or Bearish).
Entry/Exit Strategy : By understanding the current cluster and its associated trend, traders can time entries and exits with higher precision, taking advantage of favorable conditions when the confidence in the predicted price is high.
Confidence for Risk Management : The confidence level associated with the predicted returns allows traders to manage risk better. Higher confidence levels indicate stronger market conditions, which can lead to higher position sizes.
Pseudo Machine Learning Aspect
While the script does not use conventional machine learning models (e.g., neural networks or decision trees), it mimics certain aspects of machine learning in its approach. By using clustering and the dynamic adjustment of a moving average, the model learns from historical data to adjust predictions for future price behavior. The "learning" comes from how the script uses past price data (and technical indicators) to create patterns (clusters) and predict future market movements based on those patterns.
Why This Is Important for Traders
Understanding market regimes helps to adjust trading strategies in a way that adapts to current market conditions.
Forecasting price behavior provides an additional edge, enabling traders to time entries and exits based on predicted price movements.
By leveraging the clustering technique, traders can separate noise from signal, improving the reliability of trading signals.
The combination of clustering and predictive modeling in one tool reduces the complexity for traders, allowing them to focus on actionable insights rather than manual analysis.
How to Interpret the Output
Bullish (Green) Zone : When the price behavior clusters into the Bullish zone, expect upward price movement. The MLMA line will help confirm if the trend remains upward.
Bearish (Red) Zone : When the price behavior clusters into the Bearish zone, expect downward price movement. The MLMA line will assist in tracking any downward trends.
Neutral (Gray) Zone : A neutral market condition signals indecision or range-bound behavior. The MLMA line can help track any potential breakouts or trend reversals.
Predicted Price : The projected price is shown on the chart, based on the cluster's predicted behavior. This provides a useful reference for where the price might move in the near future.
Prediction Confidence : The confidence percentage helps you gauge the reliability of the predicted price. A higher percentage indicates stronger market confidence in the forecasted move.
Tips for Use
Combining with Other Indicators : Use the output of this indicator in combination with your existing strategy (e.g., RSI, MACD, or moving averages) to enhance signal accuracy.
Position Sizing with Confidence : Increase position size when the prediction confidence is high, and decrease size when it’s low, based on the confidence interval.
Regime-Based Strategy : Consider developing a multi-strategy approach where you use this tool for Bullish or Bearish regimes and a separate strategy for Neutral markets.
Optimization : Adjust the lookback period and percentile settings to optimize the clustering algorithm based on your asset’s characteristics.
Conclusion
The Machine Learning Moving Average offers a novel approach to price prediction by leveraging percentile clustering and a dynamically adapting moving average. While not a traditional machine learning model, this tool mimics the adaptive behavior of machine learning by adjusting to evolving market conditions, helping traders predict price movements and identify trends with improved confidence and accuracy.
Twisted Analytics ATR Model ProThe Trend Spotter Indicator is a sophisticated technical analysis tool engineered to identify high-probability trend formations across all timeframes and asset classes. Built with proprietary algorithms, this indicator combines multiple technical methodologies to deliver clear, actionable signals for traders at all experience levels.
What Makes It Unique
Unlike basic moving average systems, the Trend Spotter employs a multi-layered approach that validates trends through:
Multi-Timeframe Analysis: Confirms signals across higher timeframes to filter false positives
Adaptive Volatility Filtering: Adjusts thresholds based on ATR to optimize for both ranging and trending markets
Momentum Confirmation: Validates trend strength using proprietary oscillators before generating signals
Dynamic Trend Strength Measurement: Real-time assessment of trend intensity and potential exhaustion
Key Features
✅ Universal Compatibility: Works seamlessly on crypto, stocks, forex, commodities, and indices
✅ No Repainting: Signals remain fixed once generated - reliable for backtesting and live trading
✅ Customizable Alerts: Set up notifications for trend reversals, breakouts, and momentum shifts
✅ Visual Clarity: Color-coded signals with adjustable display settings
✅ Smart Noise Filtering: Advanced algorithms eliminate market noise and focus on genuine trends
✅ Support/Resistance Detection: Automatically identifies key levels based on trend structure
How It Works
The indicator analyzes price action through four independent validation layers:
Trend Identification: Detects higher highs/lows (uptrend) or lower highs/lows (downtrend)
Momentum Confirmation: Ensures signals align with prevailing momentum
Volatility Analysis: Adapts to changing market conditions using ATR-based thresholds
Signal Validation: Cross-references multiple factors before generating final signals
This multi-factor approach significantly reduces false signals by requiring confirmation from multiple independent analysis methods.
Best Use Cases
Trend Following: Ride major trends from early entry to exhaustion
Breakout Trading: Catch strong momentum moves out of consolidation
Reversal Trading: Identify trend exhaustion and potential reversals
Multi-Timeframe Strategies: Confirm lower timeframe entries with higher timeframe trends
Who Should Use This
Day traders seeking reliable trend signals on intraday charts
Swing traders looking for multi-day trend opportunities
Position traders wanting to identify major trend changes
Both beginner and professional traders who value data-driven decision making
Configuration Flexibility
The indicator offers extensive customization options:
Trend Period: Adjust sensitivity from 5 to 200 bars
Signal Sensitivity: Choose Low/Medium/High based on trading style
Trend Strength Threshold: Filter weak trends (0-100 scale)
Multi-Timeframe Mode: Enable/disable higher timeframe confirmation
Visual Settings: Customize colors, signal size, and labels
Trading Strategy Examples
Trend Following: Enter on initial signal, add on pullbacks, exit on reversal
Breakout Strategy: Wait for consolidation, enter on trend signal breakout
Reversal Strategy: Identify exhaustion, enter on first opposite signal
Scalping: Use high sensitivity on 1-15 min charts for quick trades
Risk Management Note
While the Trend Spotter provides high-probability signals, no indicator guarantees profits. Always use proper risk management:
Risk only 1-2% of capital per trade
Set stop-losses based on technical levels
Combine with volume analysis and support/resistance
Backtest settings on historical data before live trading
What You Get
Professional-grade trend detection algorithm
Real-time signal generation with no lag
Comprehensive parameter customization
Visual clarity with intuitive color coding
Compatible with all TradingView account types
Ongoing updates and improvements
Technical Specifications
Calculation Method: Proprietary multi-factor analysis
Signal Type: Non-repainting trend direction and strength
Overlay: Yes - displays directly on price chart
Alerts: Fully customizable alert conditions
Timeframes: All timeframes from 1-minute to monthly
Asset Classes: Universal - works on all tradable instruments
Support
Published by Twisted Analytics - Professional trading tools built by traders, for traders.
RSI Overbought/Oversold + Divergence Indicator (new)//@version=5
indicator('CryptoSignalScanner - RSI Overbought/Oversold + Divergence Indicator (new)',
//---------------------------------------------------------------------------------------------------------------------------------
//--- Define Colors ---------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------
vWhite = #FFFFFF
vViolet = #C77DF3
vIndigo = #8A2BE2
vBlue = #009CDF
vGreen = #5EBD3E
vYellow = #FFB900
vRed = #E23838
longColor = color.green
shortColor = color.red
textColor = color.white
bullishColor = color.rgb(38,166,154,0) //Used in the display table
bearishColor = color.rgb(239,83,79,0) //Used in the display table
nomatchColor = color.silver //Used in the display table
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
//--- Functions--------------------------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
TF2txt(TF) =>
switch TF
"S" => "RSI 1s:"
"5S" => "RSI 5s:"
"10S" => "RSI 10s:"
"15S" => "RSI 15s:"
"30S" => "RSI 30s"
"1" => "RSI 1m:"
"3" => "RSI 3m:"
"5" => "RSI 5m:"
"15" => "RSI 15m:"
"30" => "RSI 30m"
"45" => "RSI 45m"
"60" => "RSI 1h:"
"120" => "RSI 2h:"
"180" => "RSI 3h:"
"240" => "RSI 4h:"
"480" => "RSI 8h:"
"D" => "RSI 1D:"
"1D" => "RSI 1D:"
"2D" => "RSI 2D:"
"3D" => "RSI 2D:"
"3D" => "RSI 3W:"
"W" => "RSI 1W:"
"1W" => "RSI 1W:"
"M" => "RSI 1M:"
"1M" => "RSI 1M:"
"3M" => "RSI 3M:"
"6M" => "RSI 6M:"
"12M" => "RSI 12M:"
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
//--- Show/Hide Settings ----------------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
rsiShowInput = input(true, title='Show RSI', group='Show/Hide Settings')
maShowInput = input(false, title='Show MA', group='Show/Hide Settings')
showRSIMAInput = input(true, title='Show RSIMA Cloud', group='Show/Hide Settings')
rsiBandShowInput = input(true, title='Show Oversold/Overbought Lines', group='Show/Hide Settings')
rsiBandExtShowInput = input(true, title='Show Oversold/Overbought Extended Lines', group='Show/Hide Settings')
rsiHighlightShowInput = input(true, title='Show Oversold/Overbought Highlight Lines', group='Show/Hide Settings')
DivergenceShowInput = input(true, title='Show RSI Divergence Labels', group='Show/Hide Settings')
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
//--- Table Settings --------------------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
rsiShowTable = input(true, title='Show RSI Table Information box', group="RSI Table Settings")
rsiTablePosition = input.string(title='Location', defval='middle_right', options= , group="RSI Table Settings", inline='1')
rsiTextSize = input.string(title=' Size', defval='small', options= , group="RSI Table Settings", inline='1')
rsiShowTF1 = input(true, title='Show TimeFrame1', group="RSI Table Settings", inline='tf1')
rsiTF1 = input.timeframe("15", title=" Time", group="RSI Table Settings", inline='tf1')
rsiShowTF2 = input(true, title='Show TimeFrame2', group="RSI Table Settings", inline='tf2')
rsiTF2 = input.timeframe("60", title=" Time", group="RSI Table Settings", inline='tf2')
rsiShowTF3 = input(true, title='Show TimeFrame3', group="RSI Table Settings", inline='tf3')
rsiTF3 = input.timeframe("240", title=" Time", group="RSI Table Settings", inline='tf3')
rsiShowTF4 = input(true, title='Show TimeFrame4', group="RSI Table Settings", inline='tf4')
rsiTF4 = input.timeframe("D", title=" Time", group="RSI Table Settings", inline='tf4')
rsiShowHist = input(true, title='Show RSI Historical Columns', group="RSI Table Settings", tooltip='Show the information of the 2 previous closed candles')
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
//--- RSI Input Settings ----------------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
rsiSourceInput = input.source(close, 'Source', group='RSI Settings')
rsiLengthInput = input.int(14, minval=1, title='RSI Length', group='RSI Settings', tooltip='Here we set the RSI lenght')
rsiColorInput = input.color(#26a69a, title="RSI Color", group='RSI Settings')
rsimaColorInput = input.color(#ef534f, title="RSIMA Color", group='RSI Settings')
rsiBandColorInput = input.color(#787B86, title="RSI Band Color", group='RSI Settings')
rsiUpperBandExtInput = input.int(title='RSI Overbought Extended Line', defval=80, minval=50, maxval=100, group='RSI Settings')
rsiUpperBandInput = input.int(title='RSI Overbought Line', defval=70, minval=50, maxval=100, group='RSI Settings')
rsiLowerBandInput = input.int(title='RSI Oversold Line', defval=30, minval=0, maxval=50, group='RSI Settings')
rsiLowerBandExtInput = input.int(title='RSI Oversold Extended Line', defval=20, minval=0, maxval=50, group='RSI Settings')
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
//--- MA Input Settings -----------------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
maTypeInput = input.string("EMA", title="MA Type", options= , group="MA Settings")
maLengthInput = input.int(14, title="MA Length", group="MA Settings")
maColorInput = input.color(color.yellow, title="MA Color", group='MA Settings') //#7E57C2
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
//--- Divergence Input Settings ---------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
lbrInput = input(title="Pivot Lookback Right", defval=2, group='RSI Divergence Settings')
lblInput = input(title="Pivot Lookback Left", defval=2, group='RSI Divergence Settings')
lbRangeMaxInput = input(title="Max of Lookback Range", defval=10, group='RSI Divergence Settings')
lbRangeMinInput = input(title="Min of Lookback Range", defval=2, group='RSI Divergence Settings')
plotBullInput = input(title="Plot Bullish", defval=true, group='RSI Divergence Settings')
plotHiddenBullInput = input(title="Plot Hidden Bullish", defval=true, group='RSI Divergence Settings')
plotBearInput = input(title="Plot Bearish", defval=true, group='RSI Divergence Settings')
plotHiddenBearInput = input(title="Plot Hidden Bearish", defval=true, group='RSI Divergence Settings')
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
//--- RSI Calculation -------------------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
rsi = ta.rsi(rsiSourceInput, rsiLengthInput)
rsiprevious = rsi
= request.security(syminfo.tickerid, rsiTF1, [rsi, rsi , rsi ], lookahead=barmerge.lookahead_on)
= request.security(syminfo.tickerid, rsiTF2, [rsi, rsi , rsi ], lookahead=barmerge.lookahead_on)
= request.security(syminfo.tickerid, rsiTF3, [rsi, rsi , rsi ], lookahead=barmerge.lookahead_on)
= request.security(syminfo.tickerid, rsiTF4, [rsi, rsi , rsi ], lookahead=barmerge.lookahead_on)
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
//--- MA Calculation -------------------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
ma(source, length, type) =>
switch type
"SMA" => ta.sma(source, length)
"Bollinger Bands" => ta.sma(source, length)
"EMA" => ta.ema(source, length)
"SMMA (RMA)" => ta.rma(source, length)
"WMA" => ta.wma(source, length)
"VWMA" => ta.vwma(source, length)
rsiMA = ma(rsi, maLengthInput, maTypeInput)
rsiMAPrevious = rsiMA
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
//--- Stoch RSI Settings + Calculation --------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
showStochRSI = input(false, title="Show Stochastic RSI", group='Stochastic RSI Settings')
smoothK = input.int(title="Stochastic K", defval=3, minval=1, maxval=10, group='Stochastic RSI Settings')
smoothD = input.int(title="Stochastic D", defval=4, minval=1, maxval=10, group='Stochastic RSI Settings')
lengthRSI = input.int(title="Stochastic RSI Lenght", defval=14, minval=1, group='Stochastic RSI Settings')
lengthStoch = input.int(title="Stochastic Lenght", defval=14, minval=1, group='Stochastic RSI Settings')
colorK = input.color(color.rgb(41,98,255,0), title="K Color", group='Stochastic RSI Settings', inline="1")
colorD = input.color(color.rgb(205,109,0,0), title="D Color", group='Stochastic RSI Settings', inline="1")
StochRSI = ta.rsi(rsiSourceInput, lengthRSI)
k = ta.sma(ta.stoch(StochRSI, StochRSI, StochRSI, lengthStoch), smoothK) //Blue Line
d = ta.sma(k, smoothD) //Red Line
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
//--- Divergence Settings ------------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
bearColor = color.red
bullColor = color.green
hiddenBullColor = color.new(color.green, 50)
hiddenBearColor = color.new(color.red, 50)
//textColor = color.white
noneColor = color.new(color.white, 100)
osc = rsi
plFound = na(ta.pivotlow(osc, lblInput, lbrInput)) ? false : true
phFound = na(ta.pivothigh(osc, lblInput, lbrInput)) ? false : true
_inRange(cond) =>
bars = ta.barssince(cond == true)
lbRangeMinInput <= bars and bars <= lbRangeMaxInput
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
//--- Define Plot & Line Colors ---------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
rsiColor = rsi >= rsiMA ? rsiColorInput : rsimaColorInput
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
//--- Plot Lines ------------------------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
// Create a horizontal line at a specific price level
myLine = line.new(bar_index , 75, bar_index, 75, color = color.rgb(187, 14, 14), width = 2)
bottom = line.new(bar_index , 50, bar_index, 50, color = color.rgb(223, 226, 28), width = 2)
mymainLine = line.new(bar_index , 60, bar_index, 60, color = color.rgb(13, 154, 10), width = 3)
hline(50, title='RSI Baseline', color=color.new(rsiBandColorInput, 50), linestyle=hline.style_solid, editable=false)
hline(rsiBandExtShowInput ? rsiUpperBandExtInput : na, title='RSI Upper Band', color=color.new(rsiBandColorInput, 10), linestyle=hline.style_dashed, editable=false)
hline(rsiBandShowInput ? rsiUpperBandInput : na, title='RSI Upper Band', color=color.new(rsiBandColorInput, 10), linestyle=hline.style_dashed, editable=false)
hline(rsiBandShowInput ? rsiLowerBandInput : na, title='RSI Upper Band', color=color.new(rsiBandColorInput, 10), linestyle=hline.style_dashed, editable=false)
hline(rsiBandExtShowInput ? rsiLowerBandExtInput : na, title='RSI Upper Band', color=color.new(rsiBandColorInput, 10), linestyle=hline.style_dashed, editable=false)
bgcolor(rsiHighlightShowInput ? rsi >= rsiUpperBandExtInput ? color.new(rsiColorInput, 70) : na : na, title="Show Extended Oversold Highlight", editable=false)
bgcolor(rsiHighlightShowInput ? rsi >= rsiUpperBandInput ? rsi < rsiUpperBandExtInput ? color.new(#64ffda, 90) : na : na: na, title="Show Overbought Highlight", editable=false)
bgcolor(rsiHighlightShowInput ? rsi <= rsiLowerBandInput ? rsi > rsiLowerBandExtInput ? color.new(#F43E32, 90) : na : na : na, title="Show Extended Oversold Highlight", editable=false)
bgcolor(rsiHighlightShowInput ? rsi <= rsiLowerBandInput ? color.new(rsimaColorInput, 70) : na : na, title="Show Oversold Highlight", editable=false)
maPlot = plot(maShowInput ? rsiMA : na, title='MA', color=color.new(maColorInput,0), linewidth=1)
rsiMAPlot = plot(showRSIMAInput ? rsiMA : na, title="RSI EMA", color=color.new(rsimaColorInput,0), editable=false, display=display.none)
rsiPlot = plot(rsiShowInput ? rsi : na, title='RSI', color=color.new(rsiColor,0), linewidth=1)
fill(rsiPlot, rsiMAPlot, color=color.new(rsiColor, 60), title="RSIMA Cloud")
plot(showStochRSI ? k : na, title='Stochastic K', color=colorK, linewidth=1)
plot(showStochRSI ? d : na, title='Stochastic D', color=colorD, linewidth=1)
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
//--- Plot Divergence -------------------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
// Regular Bullish
// Osc: Higher Low
oscHL = osc > ta.valuewhen(plFound, osc , 1) and _inRange(plFound )
// Price: Lower Low
priceLL = low < ta.valuewhen(plFound, low , 1)
bullCond = plotBullInput and priceLL and oscHL and plFound
plot(
plFound ? osc : na,
offset=-lbrInput,
title="Regular Bullish",
linewidth=2,
color=(bullCond ? bullColor : noneColor)
)
plotshape(
DivergenceShowInput ? bullCond ? osc : na : na,
offset=-lbrInput,
title="Regular Bullish Label",
text=" Bull ",
style=shape.labelup,
location=location.absolute,
color=bullColor,
textcolor=textColor
)
//------------------------------------------------------------------------------
// Hidden Bullish
// Osc: Lower Low
oscLL = osc < ta.valuewhen(plFound, osc , 1) and _inRange(plFound )
// Price: Higher Low
priceHL = low > ta.valuewhen(plFound, low , 1)
hiddenBullCond = plotHiddenBullInput and priceHL and oscLL and plFound
plot(
plFound ? osc : na,
offset=-lbrInput,
title="Hidden Bullish",
linewidth=2,
color=(hiddenBullCond ? hiddenBullColor : noneColor)
)
plotshape(
DivergenceShowInput ? hiddenBullCond ? osc : na : na,
offset=-lbrInput,
title="Hidden Bullish Label",
text=" H Bull ",
style=shape.labelup,
location=location.absolute,
color=bullColor,
textcolor=textColor
)
//------------------------------------------------------------------------------
// Regular Bearish
// Osc: Lower High
oscLH = osc < ta.valuewhen(phFound, osc , 1) and _inRange(phFound )
// Price: Higher High
priceHH = high > ta.valuewhen(phFound, high , 1)
bearCond = plotBearInput and priceHH and oscLH and phFound
plot(
phFound ? osc : na,
offset=-lbrInput,
title="Regular Bearish",
linewidth=2,
color=(bearCond ? bearColor : noneColor)
)
plotshape(
DivergenceShowInput ? bearCond ? osc : na : na,
offset=-lbrInput,
title="Regular Bearish Label",
text=" Bear ",
style=shape.labeldown,
location=location.absolute,
color=bearColor,
textcolor=textColor
)
//------------------------------------------------------------------------------
// Hidden Bearish
// Osc: Higher High
oscHH = osc > ta.valuewhen(phFound, osc , 1) and _inRange(phFound )
// Price: Lower High
priceLH = high < ta.valuewhen(phFound, high , 1)
hiddenBearCond = plotHiddenBearInput and priceLH and oscHH and phFound
plot(
phFound ? osc : na,
offset=-lbrInput,
title="Hidden Bearish",
linewidth=2,
color=(hiddenBearCond ? hiddenBearColor : noneColor)
)
plotshape(
DivergenceShowInput ? hiddenBearCond ? osc : na : na,
offset=-lbrInput,
title="Hidden Bearish Label",
text=" H Bear ",
style=shape.labeldown,
location=location.absolute,
color=bearColor,
textcolor=textColor
)
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
//--- Check RSI Lineup ------------------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
bullTF = rsi > rsi and rsi > rsi
bearTF = rsi < rsi and rsi < rsi
bullTF1 = rsi1 > rsi1_1 and rsi1_1 > rsi1_2
bearTF1 = rsi1 < rsi1_1 and rsi1_1 < rsi1_2
bullTF2 = rsi2 > rsi2_1 and rsi2_1 > rsi2_2
bearTF2 = rsi2 < rsi2_1 and rsi2_1 < rsi2_2
bullTF3 = rsi3 > rsi3_1 and rsi3_1 > rsi3_2
bearTF3 = rsi3 < rsi3_1 and rsi3_1 < rsi3_2
bullTF4 = rsi4 > rsi4_1 and rsi4_1 > rsi4_2
bearTF4 = rsi4 < rsi4_1 and rsi4_1 < rsi4_2
bbTxt(bull,bear) =>
bull ? "BULLISH" : bear ? "BEARISCH" : 'NO LINEUP'
bbColor(bull,bear) =>
bull ? bullishColor : bear ? bearishColor : nomatchColor
newTC(tBox, col, row, txt, width, txtColor, bgColor, txtHA, txtSize) =>
table.cell(table_id=tBox,column=col, row=row, text=txt, width=width,text_color=txtColor,bgcolor=bgColor, text_halign=txtHA, text_size=txtSize)
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
//--- Define RSI Table Setting ----------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
width_c0 = 0
width_c1 = 0
if rsiShowTable
var tBox = table.new(position=rsiTablePosition, columns=5, rows=6, bgcolor=color.rgb(18,22,33,50), frame_color=color.black, frame_width=1, border_color=color.black, border_width=1)
newTC(tBox, 0,1,"RSI Current",width_c0,color.orange,color.rgb(0,0,0,100),'right',rsiTextSize)
newTC(tBox, 1,1,str.format(" {0,number,#.##} ", rsi),width_c0,vWhite,rsi < 50 ? bearishColor:bullishColor,'left',rsiTextSize)
newTC(tBox, 4,1,bbTxt(bullTF, bearTF),width_c0,vWhite,bbColor(bullTF, bearTF),'center',rsiTextSize)
if rsiShowHist
newTC(tBox, 2,1,str.format(" {0,number,#.##} ", rsi ),width_c0,vWhite,rsi < 50 ? bearishColor:bullishColor,'left',rsiTextSize)
newTC(tBox, 3,1,str.format(" {0,number,#.##} ", rsi ),width_c0,vWhite,rsi < 50 ? bearishColor:bullishColor,'left',rsiTextSize)
if rsiShowTF1
newTC(tBox, 0,2,TF2txt(rsiTF1),width_c0,vWhite,color.rgb(0,0,0,100),'right',rsiTextSize)
newTC(tBox, 1,2,str.format(" {0,number,#.##} ", rsi1),width_c0,vWhite,rsi1 < 50 ? bearishColor:bullishColor,'left',rsiTextSize)
newTC(tBox, 4,2,bbTxt(bullTF1, bearTF1),width_c0,vWhite,bbColor(bullTF1,bearTF1),'center',rsiTextSize)
if rsiShowHist
newTC(tBox, 2,2,str.format(" {0,number,#.##} ", rsi1_1),width_c0,vWhite,rsi1_1 < 50 ? bearishColor:bullishColor,'left',rsiTextSize)
newTC(tBox, 3,2,str.format(" {0,number,#.##} ", rsi1_2),width_c0,vWhite,rsi1_2 < 50 ? bearishColor:bullishColor,'left',rsiTextSize)
if rsiShowTF2
newTC(tBox, 0,3,TF2txt(rsiTF2),width_c0,vWhite,color.rgb(0,0,0,100),'right',rsiTextSize)
newTC(tBox, 1,3,str.format(" {0,number,#.##} ", rsi2),width_c0,vWhite,rsi2 < 50 ? bearishColor:bullishColor,'left',rsiTextSize)
newTC(tBox, 4,3,bbTxt(bullTF2, bearTF2),width_c0,vWhite,bbColor(bullTF2,bearTF2),'center',rsiTextSize)
if rsiShowHist
newTC(tBox, 2,3,str.format(" {0,number,#.##} ", rsi2_1),width_c0,vWhite,rsi2_1 < 50 ? bearishColor:bullishColor,'left',rsiTextSize)
newTC(tBox, 3,3,str.format(" {0,number,#.##} ", rsi2_2),width_c0,vWhite,rsi2_2 < 50 ? bearishColor:bullishColor,'left',rsiTextSize)
if rsiShowTF3
newTC(tBox, 0,4,TF2txt(rsiTF3),width_c0,vWhite,color.rgb(0,0,0,100),'right',rsiTextSize)
newTC(tBox, 1,4,str.format(" {0,number,#.##} ", rsi3),width_c0,vWhite,rsi3 < 50 ? bearishColor:bullishColor,'left',rsiTextSize)
newTC(tBox, 4,4,bbTxt(bullTF3, bearTF3),width_c0,vWhite,bbColor(bullTF3,bearTF3),'center',rsiTextSize)
if rsiShowHist
newTC(tBox, 2,4,str.format(" {0,number,#.##} ", rsi3_1),width_c0,vWhite,rsi3_1 < 50 ? bearishColor:bullishColor,'left',rsiTextSize)
newTC(tBox, 3,4,str.format(" {0,number,#.##} ", rsi3_2),width_c0,vWhite,rsi3_2 < 50 ? bearishColor:bullishColor,'left',rsiTextSize)
if rsiShowTF4
newTC(tBox, 0,5,TF2txt(rsiTF4),width_c0,vWhite,color.rgb(0,0,0,100),'right',rsiTextSize)
newTC(tBox, 1,5,str.format(" {0,number,#.##} ", rsi4),width_c0,vWhite,rsi4 < 50 ? bearishColor:bullishColor,'left',rsiTextSize)
newTC(tBox, 4,5,bbTxt(bullTF4, bearTF4),width_c0,vWhite,bbColor(bullTF4,bearTF4),'center',rsiTextSize)
if rsiShowHist
newTC(tBox, 2,5,str.format(" {0,number,#.##} ", rsi4_1),width_c0,vWhite,rsi4_1 < 50 ? bearishColor:bullishColor,'left',rsiTextSize)
newTC(tBox, 3,5,str.format(" {0,number,#.##} ", rsi4_2),width_c0,vWhite,rsi4_2 < 50 ? bearishColor:bullishColor,'left',rsiTextSize)
//------------------------------------------------------
//--- Alerts -------------------------------------------
//------------------------------------------------------
Fair Value Levels H4 — Institutional Balance ZonesDescription:
This indicator automatically plots the Fair Value (50%) of every 4-hour candle, highlighting the institutional balance zones in price.
Each level represents the midpoint between the high and low of the H4 block — a common area where price seeks equilibrium before continuing its trend.
📌 Main Features:
• Displays all historical H4 Fair Values automatically.
• Option to extend lines infinitely or only until the next H4 block.
• Real-time Fair Value line for the current H4 candle.
• Fully customizable colors, widths, and number of displayed levels.
• Works on any market (indices, forex, gold, crypto, stocks).
⚙️ Use Cases:
• Identify institutional balance points within market structure.
• Validate premium/discount areas in Smart Money Concepts (SMC).
• Confluence tool for price action and structure-based strategies.
💡 Recommended for: traders focusing on institutional concepts, market structure, or equilibrium zones.
5mn London-Newyork best entry by Profitcosmos)This indicator is engineered for scalpers and day traders who trade during the London and New York sessions — the most volatile and liquid market hours.
It automatically detects high-probability breakout structures, filters false moves using ATR-based volatility logic, and dynamically projects Entry, Stop Loss (SL), and Take Profit (TP) levels directly on the chart.
⚙️ Core Features
🧠 Smart Market Structure Detection:
Automatically identifies bullish and bearish structure shifts using swing highs/lows.
📊 ATR Volatility Filter:
Uses an adaptive ATR multiplier to confirm genuine breakouts and filter noise.
🕒 Session Filter (Optional):
Restrict signals to your chosen trading hours — ideal for London and New York overlap.
🎯 Auto Entry / SL / TP Projection:
SL: Placed below (for BUY) or above (for SELL) the two previous candle extremes.
TP: Automatically calculated at 3× the distance from Entry to SL.
Projection: Visual lines and labels extend 100 bars into the future, clearly marking your trade levels.
🔁 Alternating Signal Logic:
Prevents consecutive duplicate signals to keep the chart clean and trades logical.
📈 Visual Clarity:
Each trade setup is plotted with colored lines (Entry, SL, TP) and labels pointing left for easy visibility.
🔔 Alerts Ready:
Built-in alerts for both BUY and SELL signals to automate or notify your entries.
🪙 Why you will Love It
This tool helps identify the cleanest momentum-based entries in the 5-minute chart during high-volume hours.
It’s especially effective for XAUUSD, NAS100, and major Forex pairs, where breakout structure shifts happen fast and decisively.
🧭 Recommended Settings
Timeframe: 5 minutes
Sessions: London (3–10 AM EST) & New York (8 AM–4 PM EST)
ATR Multiplier: 1.2–1.5 (adjust for volatility)
Intraday Perpetual Premium & Z-ScoreThis indicator measures the real-time premium of a perpetual futures contract relative to its spot market and interprets it through a statistical lens.
It helps traders detect when funding pressure is building, when leverage is being unwound, and when crowding in the futures market may precede volatility.
How it works
• Premium (%) = (Perp – Spot) ÷ Spot × 100
The script fetches both spot and perpetual prices and calculates their percentage difference each minute.
• Rolling Mean & Z-Score
Over a 4-hour look-back, it computes the average premium and standard deviation to derive a Z-Score, showing how stretched current sentiment is.
• Dynamic ±2σ Bands highlight statistically extreme premiums or discounts.
• Rate of Change (ROC) over one hour gauges the short-term directional acceleration of funding flows.
Colour & Label Interpretation
Visual cue Meaning Trading Implication
🟢 Green bars + “BULL Pressure” Premium rising faster than mean Leverage inflows → momentum strengthening
🔴 Red bars + “BEAR Pressure” Premium shrinking Leverage unwind → pull-back or consolidation
⚠️ Orange “EXTREME Premium/Discount” Crowded trade → heightened reversal risk
⚪ Grey bars Neutral Balanced conditions
Alerts
• Bull Pressure Alert → funding & premium rising (momentum building)
• Bear Pressure Alert → premium falling (deleveraging)
• Extreme Premium Alert → crowded longs; potential top
• Extreme Discount Alert → capitulation; possible bottom
Use case
Combine this indicator with your Heikin-Ashi, RSI, and MACD confluence rules:
• Enter only when your oscillators are low → curling up and Bull Pressure triggers.
• Trim or exit when Bear Pressure or Extreme Premium appears.
• Watch for Extreme Discount during flushes as an early bottoming clue.
Momentum Pro [FluxQuant]Momentum Pro — Adaptive Momentum & Regime Filter
Overview
Momentum Pro is a next-generation oscillator that combines rate-of-change (ROC), relative-strength (RSI), and stochastic-momentum frameworks into a unified adaptive model. It dynamically filters momentum through volatility, directional-movement, and trend-strength conditions to highlight only qualified signals in changing market regimes.
🔹 Key Features
Selectable Core Algorithm: Choose between ROC, RSI, or Stochastic momentum engines
Adaptive Signal System: Cross-based entries gated by volatility and trend filters
Quality Filters: Volatility, momentum intensity, and directional bias validation
Overbought / Oversold Zones: Automatic detection with background visualization
Multi-Timeframe Sync: Confirm intraday signals with higher-timeframe momentum
Divergence Scanner: Pivot-based detection of regular bullish / bearish divergences
Smart Dashboard: Real-time summary of market state, momentum strength, and filter status
Dynamic Visual Themes: Gradient, Premium, and Glassmorphism histogram modes
🧠 How It Works
Momentum Pro calculates normalized momentum using your selected algorithm and applies layered filters to ensure that only statistically significant moves are emphasized.
The volatility filter measures current vs. average ATR to confirm expansion.
The trend filter assesses DI +/ DI – differentials for directional bias.
The momentum gate suppresses signals during consolidation or low-range conditions.
Optional higher-timeframe data aligns local momentum with broader bias for cleaner entries.
When these filters agree, momentum crossovers or divergences are visually highlighted as potential study points — not trade instructions.
📈 Interpreting the Dashboard
Field Meaning
Market State Identifies current regime (Bullish, Bearish, Overbought, Oversold, Ranging)
Momentum Current oscillator value (0–100 normalized scale)
Change Recent acceleration / deceleration in momentum
Filter Whether volatility and trend criteria are satisfied
Signal Active cross or directional alignment
Trend / Vol / Intensity Strength metrics (Elite mode)
HTF Sync Confirms alignment with higher-timeframe momentum bias
Use the dashboard as a contextual overlay — not as a mechanical signal generator.
🧩 Configuration Guide
Algorithm: Select ROC for reactive speed, RSI for balanced smoothness, or Stochastic for cyclical range focus.
Signal Line: Enable to visualize crossovers. “Glow” style enhances contrast for clarity.
Filters: Keep “Enable Filter” active to limit noise. Adjust Volatility & Trend thresholds for sensitivity.
Zones: Use background fills to mark overbought / oversold regions and regime shifts.
Divergence: Turn on for automatic pivot-based divergence marking.
Multi-Timeframe: Enable HTF confirmation to study alignment with larger trend context.
Dashboard: Choose Minimal → Elite modes depending on information density preference.
🧭 Best Practices
Works on all markets — equities, futures, crypto, FX
Ideal for 15 m – 4 h – Daily timeframes
Pairs well with structure or liquidity analysis for confirmation
Use filters to isolate expansion phases; avoid trading during neutral states
⚠️ Disclaimer
Momentum Pro is an educational and analytical tool intended for research and visualization only.
It does not provide financial advice, trade signals, or guaranteed outcomes.
Always conduct independent analysis and risk assessment before making trading decisions.
🛠 Release Notes
v 1.0 — Initial Public Release
Multi-algorithm momentum core (ROC / RSI / Stochastic)
Volatility + trend quality filter system
Multi-timeframe synchronization and ribbon overlay
Divergence scanner and contextual dashboard
Dynamic visualization modes
Simulated Fear & Greed (CNN-calibrated v2)🧭 Fear & Greed Index — TradingView Version (Simulated CNN Model)
🔍 Purpose
The Fear & Greed Index is a sentiment indicator that quantifies market emotion on a scale from 0 to 100, where:
0 represents Extreme Fear (capitulation, oversold conditions), and
100 represents Extreme Greed (euphoria, overbought conditions).
It helps traders assess whether the market is driven by fear (risk aversion) or greed (risk appetite) — giving a high-level view of potential turning points in market sentiment.
⚙️ How It Works in TradingView
Because TradingView cannot directly access CNN’s or alternative external sentiment feeds, this indicator simulates the Fear & Greed Index by analyzing in-chart technical data that reflect investor psychology.
It uses a multi-factor model, converting price and volume signals into a composite sentiment score.
🧩 Components Used (Simulated Metrics)
Category Metric Emotional Interpretation
Volatility ATR (Average True Range) High ATR = Fear, Low ATR = Greed
Momentum RSI + MACD Histogram Rising momentum = Greed, Falling = Fear
Volume Activity Volume Z-Score High positive deviation = Greed, Low = Fear
Trend Context SMA Regime Bias (50/200) Downtrend adds Fear penalty, Uptrend supports Greed
These elements are normalized into a 0–100 scale using percentile ranks (like statistical scoring) and then combined using user-adjustable weights.
⚖️ CNN-Style Calibration
The script follows CNN’s five sentiment bands for clarity:
Range Zone Colour Description
0–25 Extreme Fear 🔴 Red Panic, forced selling, capitulation risk
25–45 Fear 🟠 Orange Uncertainty, hesitation, early accumulation phase
45–55 Neutral ⚪ Gray Balanced sentiment, indecision
55–75 Greed 🟢 Light Green Optimism, trend continuation
75–100 Extreme Greed 💚 Bright Green Euphoria, risk of reversal
This structure aligns visually with CNN’s public gauge, making it easy to interpret.
EZ-TRADEZ PROEZ-TRADEZ PRO gives optimized buy/sell signals for Forex, Stocks, and Crypto. It includes stop loss and take profit levels, backtested non-repainting signals, and adjustable volatility filters
EZ-TRADEZ CRYPTOEZ-TRADEZ CRYPTO gives optimized buy/sell signals for stocks. It includes stop loss and take profit levels, backtested non-repainting signals, and adjustable volatility filters
EZ-TRADES STOCKSEZ-TRADEZ STOCKS gives optimized buy/sell signals for stocks. It includes stop loss and take profit levels, backtested non-repainting signals, and adjustable volatility filters
EZ-TRADEZ FOREX)EZ-TRADEZ FOREX gives optimized buy/sell signals for Forex. It includes stop loss and take profit levels, backtested non-repainting signals, and adjustable volatility filters
HTF Ranges - AWR/AMR/AYR [bilal]📊 Overview
Professional higher timeframe range indicator for swing and position traders. Calculate Average Weekly Range (AWR), Average Monthly Range (AMR), and Average Yearly Range (AYR) with precision projection levels.
✨ Key Features
📅 Three Timeframe Modes
AWR (Average Weekly Range): Weekly swing targets - Default 4 weeks
AMR (Average Monthly Range): Monthly position targets - Default 6 months
AYR (Average Yearly Range): Yearly extremes - Default 9 years
🎯 Dual Anchor Options
Period Open: Week/Month/Year opening price
RTH Open: First RTH session (09:30 NY) of the period
📐 Projection Levels
100% Range Levels: Upper and lower targets from anchor
Fractional Levels: 33% and 66% zones for partial targets
Custom Mirrored Levels: Set any percentage (0-200%) with automatic mirroring
Example: 25% shows both 25% and 75%
Example: 150% shows both 150% and -50%
📊 Information Table
Active range type (AWR/AMR/AYR)
Average range value for selected period
Current period range and percentage used
Distance remaining to targets (up/down)
Color-coded progress (green/orange/red)
🎨 Fully Customizable
Orange theme by default (differentiates from daily indicators)
Line colors, styles (solid/dashed/dotted), and widths
Toggle labels on/off
Adjustable lookback periods for each timeframe
Independent settings for each range type
⚡ Smart Features
Lines start at actual period open (not fixed lookback)
Automatically tracks current period high/low
Works on any chart timeframe
Real-time range tracking
Alert conditions when targets reached or exceeded
🎯 Use Cases
AWR (Weekly Ranges):
Swing trade targets (3-7 day holds)
Weekly support/resistance zones
Identify weekly trend vs rotation
Compare daily moves to weekly context
AMR (Monthly Ranges):
Position trade targets (2-4 week holds)
Monthly breakout levels
Institutional-level zones
Earnings play targets
AYR (Yearly Ranges):
Major reversal zones
Long-term support/resistance
Identify macro trend strength
Annual high/low projections
💡 Trading Strategies
AWR Strategy (Swing Trading):
Week opens near AWR lower level = potential long setup
Target AWR 66% and 100% levels
Week hits AWR upper in first 2 days = watch for reversal
Use fractional levels as scale-in/scale-out points
AMR Strategy (Position Trading):
Month opens near AMR extremes = fade setup
Month breaks AMR in week 1 = expansion (trend) month
Target opposite AMR extreme for swing positions
Use 33%/66% for partial profit taking
AYR Strategy (Long-term Context):
Price near AYR extremes = major reversal zones
Breaking AYR levels = historic moves (rare)
Use for macro trend confirmation
Great for yearly forecasting and planning
📊 Range Interpretation
<33% Range Used: Early in period, room for expansion
33-66% Range Used: Normal progression
66-100% Range Used: Extended, approaching extremes
>100% Range Used: Expansion period - trending or high volatility
⚙️ Settings Guide
Lookback Periods:
AWR: 4 weeks (standard) - adjust to 8-12 for smoother average
AMR: 6 months (standard) - seasonal patterns
AYR: 9 years (standard) - captures full cycles
Anchor Type:
Period Open: Use for clean week/month/year open reference
RTH Open: Use if you only trade day session, ignores overnight gaps
Custom Levels:
25% = quartile targets
75% = three-quarter targets
80% = "danger zone" for reversals
111% = extended breakout target
🔄 Combine with ADR Indicator
Run both indicators together for complete multi-timeframe analysis:
ADR for intraday precision
AWR/AMR/AYR for swing/position context
See if today's ADR move is significant in weekly/monthly context
Multi-timeframe confluence = highest probability setups
💼 Ideal For
Swing Traders: Use AWR for 3-10 day holds
Position Traders: Use AMR for 2-8 week holds
Long-term Investors: Use AYR for macro context
Index Futures Traders: ES, NQ, YM, RTY
Multi-timeframe Analysis: Combine with daily ADR
Advanced ICT ADR Projections [bilal]📊 Overview
Professional ADR indicator designed specifically for index futures traders. Calculate and visualize Average Daily Range with multiple session options, fractional levels, and higher timeframe context.
✨ Key Features
🎯 Multiple Session Types
Full Day: Standard calendar day calculation
Midnight: Anchored to 00:00 NY time open
RTH (Regular Trading Hours): 09:30-16:00 NY session
Custom: Define your own session hours and anchor point
📐 Projection Levels
100% ADR Levels: Upper and lower range targets from anchor
Fractional Levels: 33% and 66% zones for partial targets
Custom Mirrored Levels: Set any percentage (0-200%) with automatic mirroring
Example: 25% shows both 25% and 75%
Example: 111% shows both 111% and -11%
📅 Higher Timeframe Context (Optional)
AWR: Average Weekly Range overlay
AMR: Average Monthly Range overlay
AYR: Average Yearly Range overlay
All HTF ranges use same anchor as daily session
📊 Information Table
Current session type and anchor time
ADR value for selected period
Current range and percentage used
Distance remaining to ADR targets (up/down)
Color-coded range percentage (green/orange/red)
🎨 Fully Customizable
Line colors, styles (solid/dashed/dotted), and widths
Toggle labels on/off
Adjustable ADR lookback period (1-100 days)
All HTF periods customizable
⚡ Smart Features
Lines start at actual session open (not fixed lookback)
Works on any timeframe
Real-time range tracking
Alert conditions when ADR reached or exceeded
🎯 Use Cases
For Day Traders:
Set profit targets at ADR extremes
Identify range expansion vs rotation days
Know when you've used 75%+ of daily range (possible reversal)
Compare RTH vs full day ranges
For Swing Traders:
Use AWR/AMR for weekly/monthly targets
Understand if today's move is significant in weekly context
Multi-timeframe confluence
Risk Management:
Size positions based on % of ADR remaining
Avoid trading when ADR exhausted (>100%)
Better stop placement using fractional levels
💡 Trading Tips
<50% ADR used = Room to run (continuation trades)
50-75% ADR used = Getting extended (scale out)
75-100% ADR used = Near extremes (reversal setups)
>100% ADR = Expansion day (trend day or volatility spike)
Use fractional levels (33%, 66%) as:
Partial profit targets
Re-entry zones on pullbacks
Confluence with other support/resistance
Compare RTH vs Full Day ADR to see if overnight or day session drives volatility.
⚙️ Settings Guide
ADR Period: 5 days is standard, adjust for different market regimes
Session Types:
Use Midnight for crypto or 24hr markets
Use RTH for pure day session analysis
Use Custom for specific session times (London, Asia, etc.)
Custom Levels:
Set 25% for quartile levels
Set 111% for extended targets beyond ADR
Experiment with 50%, 75%, 80% for your strategy
Perfect for ES, NQ, YM, RTY futures traders who need precise intraday range analysis with higher timeframe context!






















