Pullback or Breakout Alert (LONG + SHORT)📌 Pullback or Breakout Alert (LONG + SHORT)
This script is designed to identify two key trading scenarios:
Pullbacks within a trending market (both bullish and bearish)
Breakouts beyond Bollinger Bands (both upward and downward)
It provides real-time alerts and visual markers on the chart for both setups, supporting long and short-side opportunities.
🔍 How it works:
✅ Pullback signals:
Long Pullback: Price is above the 200 SMA and RSI drops below a user-defined oversold level.
Short Pullback: Price is below the 200 SMA and RSI rises above a user-defined overbought level.
🚨 Breakout signals:
Breakout Up: Price closes above the upper Bollinger Band.
Breakout Down: Price closes below the lower Bollinger Band.
⚙️ Inputs & Customization:
200-period SMA (trend filter)
RSI length and thresholds for overbought/oversold
Bollinger Bands settings (length and deviation)
Optional Heikin Ashi candle source for smoothing
📈 Visual Aids:
SMA and Bollinger Bands are plotted on chart.
Signal markers:
🔼 Green triangle below bar = Long pullback
🔽 Red triangle above bar = Short pullback
🟧 Orange labels = Breakout up/down
🔔 Alerts:
4 separate alerts can be created:
Pullback LONG
Pullback SHORT
Breakout UP
Breakout DOWN
Each alert is triggered once per bar close for precision and noise reduction.
Indicators and strategies
true macrosTweaked version of ICT Algorithmic Macro Tracker° (Open-Source) by toodegrees.
The source code of this Macro Tracker is all @toodegrees work and all credit regarding the code is his.
This tweak consists in changing up the macro time from xx:50 - xx:10 to xx:45 - xx:15
The Φ Indicator is a powerful tool designed to enhance your trading experience by clearly and efficiently plotting tweaked ICT Macro Times on your chart.
Based on the teachings of the Inner Circle Trader , these Time windows correspond to periods when the Interbank Price Delivery Algorithm undergoes a series of checks (Macros) and is probable to move towards Liquidity.
The indicator allows traders to visualize and analyze these crucial moments in the charts:
- xx:45 to xx:15
By providing a clean and clutter-free representation of ICT Macros, this indicator empowers traders to make more informed decisions, optimize and build their strategies based on Time.
This publication is only made by request of friends that want to use it and share it with the trading community and I have no intention to profit/sell or take credit off this.
All credits go to @toodegrees , thank you for making your script open source.
AI Buy/Sell Indicator1st try buy sell 1 indicator, i.e. ai based yet to try and update as required later on., although i don't know its superb success or failiure one. let see and check this out
SMA 22 with Color ChangeThis TradingView indicator plots a 22-period Simple Moving Average (SMA) with dynamic color changes based on its slope direction:
Green when the SMA is rising.
Red when the SMA is falling.
💡 Key Features:
Customizable SMA length (default: 22).
Visual color feedback to easily identify uptrends and downtrends.
Ideal for spotting momentum shifts and trend direction at a glance.
👉 This script enhances the default SMA indicator by adding color-coded slope visualization, making it easier to interpret price trends.
Angel Signal proAngel Signal Pro is a comprehensive technical analysis tool that integrates multiple indicators for a structured market assessment.
RSI, MACD, and ADX — evaluate trend strength and identify potential entry and exit points.
Momentum and ATR — measure price acceleration and volatility, assisting in risk management.
Stochastic Oscillator — detects overbought and oversold conditions.
SMA (50, 100, 200) — tracks key moving averages with the option to enable all at once.
Cryptocurrency price display — select and monitor real-time prices of any cryptocurrency available on the BINANCE exchange.
Automatic trend detection— classifies trends as bullish, bearish, or neutral based on RSI and MACD signals.
Customizable table — presents key indicator values in a structured and convenient format. The table also provides automatic trend detection across different timeframes (TF), allowing you to assess the current market situation more accurately on various levels.
Automatic gap detection — identifies market gaps, helping to spot potential trading opportunities.
Buy and sell signals — the system generates buy and sell signals based on the analysis of five key indicator values, allowing traders to respond quickly to market changes.
Bollinger Bands — helps assess market volatility and identify support and resistance levels, as well as potential reversal points, by detecting when prices move outside of normal volatility ranges.
Customization settings — in Angel Signal Pro, you can select which indicators and features you want to display. All elements can be turned on or off according to your preferences. There is also the ability to change colors and the appearance of each element, allowing you to tailor the interface to your personal preferences and make the tool more convenient to use.
Angel Signal Pro is suitable for traders of all experience levels and helps navigate market conditions with confidence.
ACCURATE TREND LEVELS - TABLE PSv6.1Accurate Trend Level Indicator
Description:
The "Accurate Trend Level" indicator is a powerful tool designed to identify market trends and potential reversals with precision. Built on the concept (foundation) of Swing Highs and Swing Lows, this indicator easily detects uptrends and downtrends, providing traders with clear signals for trend continuation or reversal. Whether you are a swing trader or a trend follower, this indicator offers customization options to suit your trading style.
Key Features:
Trend Identification: Accurately identifies uptrends and downtrends based on Swing High and Swing Low points. This indicator provides signals for Up after Down and Down after Up.
Percentage Adjustment: Includes a customizable percentage factor that reduces false signals and helps identify accurate and strong trends.
Trend Table: Displays essential data in a table, such as:
Last and running Trend Position (Uptrend/Downtrend)
Date and Time of the last and running trend change
Reversal Level (price level for the next potential trend change)
Max. Run-up feature is also provided, which shows how much the market has moved according to the trend.
How It Works:
The indicator analyzes price action using Swing Highs and Lows to determine the current trend direction. A user-defined percentage threshold filters out minor fluctuations, ensuring only significant trends are highlighted. The table provides a quick snapshot of the latest trend data, while reversal levels help traders anticipate the next move.
Cumulative Histogram TickThis script is designed to create a cumulative histogram based on tick data from a specific financial instrument. The histogram resets at the start of each trading session, which is defined by a fixed time.
Key Components:
Tick Data Retrieval:
The script fetches the closing tick values from the specified instrument using request.security("TICK.NY", timeframe.period, close). This line ensures that the script works with the tick data for each bar on the chart.
Session Start and End Detection:
Start Hour: The script checks if the current bar's time is 9:30 AM (hour == 9 and minute == 30). This is used to reset the cumulative value at the beginning of each trading session.
End Hour: It also checks if the current bar's time is 4:00 PM (hour == 16). However, this condition is used to prevent further accumulation after the session ends.
Cumulative Value Management:
Reset: When the start hour condition is met (startHour), the cumulative value (cumulative) is reset to zero. This ensures that each trading session starts with a clean slate.
Accumulation: For all bars that are not at the end hour (not endHour), the tick value is added to the cumulative total. This process continues until the end of the trading session.
Histogram Visualization:
The cumulative value is plotted as a histogram using plot.style_histogram. The color of the histogram changes based on whether the cumulative value is positive (green) or negative (red).
Usage
This script is useful for analyzing intraday market activity by visualizing the accumulation of tick data over a trading session. It helps traders identify trends or patterns within each session, which can be valuable for making informed trading decisions.
VIX Implied MovesKey Features:
Three Timeframe Bands:
Daily: Blue bands showing ±1σ expected move
Weekly: Green bands showing ±1σ expected move
30-Day: Red bands showing ±1σ expected move
Calculation Methodology:
Uses VIX's annualized volatility converted to specific timeframes using square root of time rule
Trading day convention (252 days/year)
Band width = Price × (VIX/100) ÷ √(number of periods)
Visual Features:
Colored semi-transparent backgrounds between bands
Progressive line thickness (thinner for shorter timeframes)
Real-time updates as VIX and ES prices change
Example Calculation (VIX=20, ES=5000):
Daily move = 5000 × (20/100)/√252 ≈ ±63 points
Weekly move = 5000 × (20/100)/√50 ≈ ±141 points
Monthly move = 5000 × (20/100)/√21 ≈ ±218 points
This indicator helps visualize expected price ranges based on current volatility conditions, with wider bands indicating higher market uncertainty. The probabilistic ranges represent 68% confidence levels (1 standard deviation) derived from options pricing.
Overextension Oscillator [by MR_LUCAS_01]The Overextension Oscillator is a custom TradingView indicator designed to detect market overextension by analyzing swing highs/lows, price distance from swings, and momentum shifts. It helps traders identify potential reversal zones where price is likely to retrace after an overextended move.
---
Key Features:
✅ Swing High/Low Detection – Identifies key pivot points to measure market extension.
✅ Overextension Calculation – Measures how far price has moved from recent swings.
✅ Oscillator with Smoothing – Uses EMA-based smoothing to generate reliable signals.
✅ Buy & Sell Signals – Highlights potential entry points when price reaches extreme zones.
✅ Color-Coded Candle Plotting – Enhances visibility of bullish and bearish zones.
✅ Threshold-Based Alerts – Notifies traders when price extends beyond a calculated limit.
---
How It Works:
1. Swing Point Detection:
Detects pivot highs/lows over a defined number of bars.
Measures the percentage difference between recent swing highs and lows.
2. Overextension Calculation:
Determines how far price has moved from the last significant swing.
Compares this movement to historical averages to assess overextension.
3. Oscillator Processing:
Creates an oscillator with smoothing to filter noise.
Highlights when price moves too far from equilibrium.
4. Buy & Sell Signal Generation:
Buy Signal: Price falls below a threshold relative to the last swing low.
Sell Signal: Price rises above a threshold relative to the last swing high.
Includes a cooldown period to avoid rapid repeated signals.
---
Visualization:
Bullish & Bearish Candles:
Green candles indicate bullish overextensions (potential reversals up).
Red candles indicate bearish overextensions (potential reversals down).
Signal Line (Neutral Color):
Plots a smoothed oscillator to track overextension movements.
Reference Levels:
0 Line: Center equilibrium.
+20 & -20 Bands: Indicate potential reversal zones.
Buy & Sell Signal Markers:
Green circles (Buy Signals) at oversold conditions.
Red circles (Sell Signals) at overbought conditions.
---
Customization Options:
Swing Detection Lengths – Adjust bar lookback periods for pivots.
Oscillator Smoothing – Modify EMA lengths for signal clarity.
Threshold Sensitivity – Fine-tune overextension criteria.
Cooldown Period – Prevent excessive signals in rapid moves.
---
Use Cases:
✔ Reversal Traders – Identify overextended price action for mean reversion trades.
✔ Trend Traders – Use as a filter to confirm pullback entries in trends.
✔ Scalpers & Swing Traders – Find quick reversals in volatile markets.
---
Conclusion:
The Overextension Oscillator is a powerful tool that helps traders identify extreme price movements and anticipate potential reversals. By combining swing analysis, distance measurements, and smoothed oscillations, it provides clear buy/sell signals in overextended markets.
[blackcat] L3 Composite Trading System with ControlOVERVIEW
This indicator combines three distinct trading strategies into a unified decision-making framework. Utilizing KDJ oscillators, MACD divergence analysis, and adaptive signal filtering techniques, it provides actionable buy/sell signals validated against multi-period momentum trends and structural support/resistance levels.
FEATURES
Integrated KDJ oscillator with weighted moving average smoothing
Dynamic MACD difference visualization normalized against price volatility
Multi-layered confirmation process: • Momentum convergence/divergence tracking
• Candle pattern recognition (Yellow/Fuchsia flags)
• SMAs cross-validation (20/60-day thresholds)
Adaptive risk controls via tunable α parameter adjustment
HOW TO USE
Set Alpha Period parameter matching market cycle characteristics
Monitor primary trend direction via candle coloring (green/red zones)
Confirm directional bias using: ▪️ KDJ-J line position relative to zero axis ▪️ MACD histogram slope persistence (>3 bar validation)
Execute trades only when: • Buy/Sell labels align across both oscillator panels • Coincide with candle flag transitions (e.g., red→yellow) • Validate against concurrent SMA breakout conditions
LIMITATIONS
Lag inherent in EMA-based components during rapid reversals
Requires minimum 60-bar history for full functionality
Sensitive to fractal scaling due to normalization methods
Does not account for liquidity/volume dynamics
NOTES
• Yellow/Fuchsia flags reflect relative strength changes vs prior session
• SMA crossover validations have 16-bar lookback memory retention
Enhanced Fuzzy SMA Analyzer (Multi-Output Proxy) [FibonacciFlux]EFzSMA: Decode Trend Quality, Conviction & Risk Beyond Simple Averages
Stop Relying on Lagging Averages Alone. Gain a Multi-Dimensional Edge.
The Challenge: Simple Moving Averages (SMAs) tell you where the price was , but they fail to capture the true quality, conviction, and sustainability of a trend. Relying solely on price crossing an average often leads to chasing weak moves, getting caught in choppy markets, or missing critical signs of trend exhaustion. Advanced traders need a more sophisticated lens to navigate complex market dynamics.
The Solution: Enhanced Fuzzy SMA Analyzer (EFzSMA)
EFzSMA is engineered to address these limitations head-on. It moves beyond simple price-average comparisons by employing a sophisticated Fuzzy Inference System (FIS) that intelligently integrates multiple critical market factors:
Price deviation from the SMA ( adaptively normalized for market volatility)
Momentum (Rate of Change - ROC)
Market Sentiment/Overheat (Relative Strength Index - RSI)
Market Volatility Context (Average True Range - ATR, optional)
Volume Dynamics (Volume relative to its MA, optional)
Instead of just a line on a chart, EFzSMA delivers a multi-dimensional assessment designed to give you deeper insights and a quantifiable edge.
Why EFzSMA? Gain Deeper Market Insights
EFzSMA empowers you to make more informed decisions by providing insights that simple averages cannot:
Assess True Trend Quality, Not Just Location: Is the price above the SMA simply because of a temporary spike, or is it supported by strong momentum, confirming volume, and stable volatility? EFzSMA's core fuzzyTrendScore (-1 to +1) evaluates the health of the trend, helping you distinguish robust moves from noise.
Quantify Signal Conviction: How reliable is the current trend signal? The Conviction Proxy (0 to 1) measures the internal consistency among the different market factors analyzed by the FIS. High conviction suggests factors are aligned, boosting confidence in the trend signal. Low conviction warns of conflicting signals, uncertainty, or potential consolidation – acting as a powerful filter against chasing weak moves.
// Simplified Concept: Conviction reflects agreement vs. conflict among fuzzy inputs
bullStrength = strength_SB + strength_WB
bearStrength = strength_SBe + strength_WBe
dominantStrength = max(bullStrength, bearStrength)
conflictingStrength = min(bullStrength, bearStrength) + strength_N
convictionProxy := (dominantStrength - conflictingStrength) / (dominantStrength + conflictingStrength + 1e-10)
// Modifiers (Volatility/Volume) applied...
Anticipate Potential Reversals: Trends don't last forever. The Reversal Risk Proxy (0 to 1) synthesizes multiple warning signs – like extreme RSI readings, surging volatility, or diverging volume – into a single, actionable metric. High reversal risk flags conditions often associated with trend exhaustion, providing early warnings to protect profits or consider counter-trend opportunities.
Adapt to Changing Market Regimes: Markets shift between high and low volatility. EFzSMA's unique Adaptive Deviation Normalization adjusts how it perceives price deviations based on recent market behavior (percentile rank). This ensures more consistent analysis whether the market is quiet or chaotic.
// Core Idea: Normalize deviation by recent volatility (percentile)
diff_abs_percentile = ta.percentile_linear_interpolation(abs(raw_diff), normLookback, percRank) + 1e-10
normalized_diff := raw_diff / diff_abs_percentile
// Fuzzy sets for 'normalized_diff' are thus adaptive to volatility
Integrate Complexity, Output Clarity: EFzSMA distills complex, multi-factor analysis into clear, interpretable outputs, helping you cut through market noise and focus on what truly matters for your decision-making process.
Interpreting the Multi-Dimensional Output
The true power of EFzSMA lies in analyzing its outputs together:
A high Trend Score (+0.8) is significant, but its reliability is amplified by high Conviction (0.9) and low Reversal Risk (0.2) . This indicates a strong, well-supported trend.
Conversely, the same high Trend Score (+0.8) coupled with low Conviction (0.3) and high Reversal Risk (0.7) signals caution – the trend might look strong superficially, but internal factors suggest weakness or impending exhaustion.
Use these combined insights to:
Filter Entry Signals: Require minimum Trend Score and Conviction levels.
Manage Risk: Consider reducing exposure or tightening stops when Reversal Risk climbs significantly, especially if Conviction drops.
Time Exits: Use rising Reversal Risk and falling Conviction as potential signals to take profits.
Identify Regime Shifts: Monitor how the relationship between the outputs changes over time.
Core Technology (Briefly)
EFzSMA leverages a Mamdani-style Fuzzy Inference System. Crisp inputs (normalized deviation, ROC, RSI, ATR%, Vol Ratio) are mapped to linguistic fuzzy sets ("Low", "High", "Positive", etc.). A rules engine evaluates combinations (e.g., "IF Deviation is LargePositive AND Momentum is StrongPositive THEN Trend is StrongBullish"). Modifiers based on Volatility and Volume context adjust rule strengths. Finally, the system aggregates these and defuzzifies them into the Trend Score, Conviction Proxy, and Reversal Risk Proxy. The key is the system's ability to handle ambiguity and combine multiple, potentially conflicting factors in a nuanced way, much like human expert reasoning.
Customization
While designed with robust defaults, EFzSMA offers granular control:
Adjust SMA, ROC, RSI, ATR, Volume MA lengths.
Fine-tune Normalization parameters (lookback, percentile). Note: Fuzzy set definitions for deviation are tuned for the normalized range.
Configure Volatility and Volume thresholds for fuzzy sets. Tuning these is crucial for specific assets/timeframes.
Toggle visual elements (Proxies, BG Color, Risk Shapes, Volatility-based Transparency).
Recommended Use & Caveats
EFzSMA is a sophisticated analytical tool, not a standalone "buy/sell" signal generator.
Use it to complement your existing strategy and analysis.
Always validate signals with price action, market structure, and other confirming factors.
Thorough backtesting and forward testing are essential to understand its behavior and tune parameters for your specific instruments and timeframes.
Fuzzy logic parameters (membership functions, rules) are based on general heuristics and may require optimization for specific market niches.
Disclaimer
Trading involves substantial risk. EFzSMA is provided for informational and analytical purposes only and does not constitute financial advice. No guarantee of profit is made or implied. Past performance is not indicative of future results. Use rigorous risk management practices.
4-day vs 20-day Volume Screenerits a suddenvolumechecker that checks if the 4 day volume is greater than or equal to 20days average volume to check if the stock is getting active
Fuzzy SMA with DCTI Confirmation[FibonacciFlux]FibonacciFlux: Advanced Fuzzy Logic System with Donchian Trend Confirmation
Institutional-grade trend analysis combining adaptive Fuzzy Logic with Donchian Channel Trend Intensity for superior signal quality
Conceptual Framework & Research Foundation
FibonacciFlux represents a significant advancement in quantitative technical analysis, merging two powerful analytical methodologies: normalized fuzzy logic systems and Donchian Channel Trend Intensity (DCTI). This sophisticated indicator addresses a fundamental challenge in market analysis – the inherent imprecision of trend identification in dynamic, multi-dimensional market environments.
While traditional indicators often produce simplistic binary signals, markets exist in states of continuous, graduated transition. FibonacciFlux embraces this complexity through its implementation of fuzzy set theory, enhanced by DCTI's structural trend confirmation capabilities. The result is an indicator that provides nuanced, probabilistic trend assessment with institutional-grade signal quality.
Core Technological Components
1. Advanced Fuzzy Logic System with Percentile Normalization
At the foundation of FibonacciFlux lies a comprehensive fuzzy logic system that transforms conventional technical metrics into degrees of membership in linguistic variables:
// Fuzzy triangular membership function with robust error handling
fuzzy_triangle(val, left, center, right) =>
if na(val)
0.0
float denominator1 = math.max(1e-10, center - left)
float denominator2 = math.max(1e-10, right - center)
math.max(0.0, math.min(left == center ? val <= center ? 1.0 : 0.0 : (val - left) / denominator1,
center == right ? val >= center ? 1.0 : 0.0 : (right - val) / denominator2))
The system employs percentile-based normalization for SMA deviation – a critical innovation that enables self-calibration across different assets and market regimes:
// Percentile-based normalization for adaptive calibration
raw_diff = price_src - sma_val
diff_abs_percentile = ta.percentile_linear_interpolation(math.abs(raw_diff), normLookback, percRank) + 1e-10
normalized_diff_raw = raw_diff / diff_abs_percentile
normalized_diff = useClamping ? math.max(-clampValue, math.min(clampValue, normalized_diff_raw)) : normalized_diff_raw
This normalization approach represents a significant advancement over fixed-threshold systems, allowing the indicator to automatically adapt to varying volatility environments and maintain consistent signal quality across diverse market conditions.
2. Donchian Channel Trend Intensity (DCTI) Integration
FibonacciFlux significantly enhances fuzzy logic analysis through the integration of Donchian Channel Trend Intensity (DCTI) – a sophisticated measure of trend strength based on the relationship between short-term and long-term price extremes:
// DCTI calculation for structural trend confirmation
f_dcti(src, majorPer, minorPer, sigPer) =>
H = ta.highest(high, majorPer) // Major period high
L = ta.lowest(low, majorPer) // Major period low
h = ta.highest(high, minorPer) // Minor period high
l = ta.lowest(low, minorPer) // Minor period low
float pdiv = not na(L) ? l - L : 0 // Positive divergence (low vs major low)
float ndiv = not na(H) ? H - h : 0 // Negative divergence (major high vs high)
float divisor = pdiv + ndiv
dctiValue = divisor == 0 ? 0 : 100 * ((pdiv - ndiv) / divisor) // Normalized to -100 to +100 range
sigValue = ta.ema(dctiValue, sigPer)
DCTI provides a complementary structural perspective on market trends by quantifying the relationship between short-term and long-term price extremes. This creates a multi-dimensional analysis framework that combines adaptive deviation measurement (fuzzy SMA) with channel-based trend intensity confirmation (DCTI).
Multi-Dimensional Fuzzy Input Variables
FibonacciFlux processes four distinct technical dimensions through its fuzzy system:
Normalized SMA Deviation: Measures price displacement relative to historical volatility context
Rate of Change (ROC): Captures price momentum over configurable timeframes
Relative Strength Index (RSI): Evaluates cyclical overbought/oversold conditions
Donchian Channel Trend Intensity (DCTI): Provides structural trend confirmation through channel analysis
Each dimension is processed through comprehensive fuzzy sets that transform crisp numerical values into linguistic variables:
// Normalized SMA Deviation - Self-calibrating to volatility regimes
ndiff_LP := fuzzy_triangle(normalized_diff, norm_scale * 0.3, norm_scale * 0.7, norm_scale * 1.1)
ndiff_SP := fuzzy_triangle(normalized_diff, norm_scale * 0.05, norm_scale * 0.25, norm_scale * 0.5)
ndiff_NZ := fuzzy_triangle(normalized_diff, -norm_scale * 0.1, 0.0, norm_scale * 0.1)
ndiff_SN := fuzzy_triangle(normalized_diff, -norm_scale * 0.5, -norm_scale * 0.25, -norm_scale * 0.05)
ndiff_LN := fuzzy_triangle(normalized_diff, -norm_scale * 1.1, -norm_scale * 0.7, -norm_scale * 0.3)
// DCTI - Structural trend measurement
dcti_SP := fuzzy_triangle(dcti_val, 60.0, 85.0, 101.0) // Strong Positive Trend (> ~85)
dcti_WP := fuzzy_triangle(dcti_val, 20.0, 45.0, 70.0) // Weak Positive Trend (~30-60)
dcti_Z := fuzzy_triangle(dcti_val, -30.0, 0.0, 30.0) // Near Zero / Trendless (~+/- 20)
dcti_WN := fuzzy_triangle(dcti_val, -70.0, -45.0, -20.0) // Weak Negative Trend (~-30 - -60)
dcti_SN := fuzzy_triangle(dcti_val, -101.0, -85.0, -60.0) // Strong Negative Trend (< ~-85)
Advanced Fuzzy Rule System with DCTI Confirmation
The core intelligence of FibonacciFlux lies in its sophisticated fuzzy rule system – a structured knowledge representation that encodes expert understanding of market dynamics:
// Base Trend Rules with DCTI Confirmation
cond1 = math.min(ndiff_LP, roc_HP, rsi_M)
strength_SB := math.max(strength_SB, cond1 * (dcti_SP > 0.5 ? 1.2 : dcti_Z > 0.1 ? 0.5 : 1.0))
// DCTI Override Rules - Structural trend confirmation with momentum alignment
cond14 = math.min(ndiff_NZ, roc_HP, dcti_SP)
strength_SB := math.max(strength_SB, cond14 * 0.5)
The rule system implements 15 distinct fuzzy rules that evaluate various market conditions including:
Established Trends: Strong deviations with confirming momentum and DCTI alignment
Emerging Trends: Early deviation patterns with initial momentum and DCTI confirmation
Weakening Trends: Divergent signals between deviation, momentum, and DCTI
Reversal Conditions: Counter-trend signals with DCTI confirmation
Neutral Consolidations: Minimal deviation with low momentum and neutral DCTI
A key innovation is the weighted influence of DCTI on rule activation. When strong DCTI readings align with other indicators, rule strength is amplified (up to 1.2x). Conversely, when DCTI contradicts other indicators, rule impact is reduced (as low as 0.5x). This creates a dynamic, self-adjusting system that prioritizes high-conviction signals.
Defuzzification & Signal Generation
The final step transforms fuzzy outputs into a precise trend score through center-of-gravity defuzzification:
// Defuzzification with precise floating-point handling
denominator = strength_SB + strength_WB + strength_N + strength_WBe + strength_SBe
if denominator > 1e-10
fuzzyTrendScore := (strength_SB * STRONG_BULL + strength_WB * WEAK_BULL +
strength_N * NEUTRAL + strength_WBe * WEAK_BEAR +
strength_SBe * STRONG_BEAR) / denominator
The resulting FuzzyTrendScore ranges from -1.0 (Strong Bear) to +1.0 (Strong Bull), with critical threshold zones at ±0.3 (Weak trend) and ±0.7 (Strong trend). The histogram visualization employs intuitive color-coding for immediate trend assessment.
Strategic Applications for Institutional Trading
FibonacciFlux provides substantial advantages for sophisticated trading operations:
Multi-Timeframe Signal Confirmation: Institutional-grade signal validation across multiple technical dimensions
Trend Strength Quantification: Precise measurement of trend conviction with noise filtration
Early Trend Identification: Detection of emerging trends before traditional indicators through fuzzy pattern recognition
Adaptive Market Regime Analysis: Self-calibrating analysis across varying volatility environments
Algorithmic Strategy Integration: Well-defined numerical output suitable for systematic trading frameworks
Risk Management Enhancement: Superior signal fidelity for risk exposure optimization
Customization Parameters
FibonacciFlux offers extensive customization to align with specific trading mandates and market conditions:
Fuzzy SMA Settings: Configure baseline trend identification parameters including SMA, ROC, and RSI lengths
Normalization Settings: Fine-tune the self-calibration mechanism with adjustable lookback period, percentile rank, and optional clamping
DCTI Parameters: Optimize trend structure confirmation with adjustable major/minor periods and signal smoothing
Visualization Controls: Customize display transparency for optimal chart integration
These parameters enable precise calibration for different asset classes, timeframes, and market regimes while maintaining the core analytical framework.
Implementation Notes
For optimal implementation, consider the following guidance:
Higher timeframes (4H+) benefit from increased normalization lookback (800+) for stability
Volatile assets may require adjusted clamping values (2.5-4.0) for optimal signal sensitivity
DCTI parameters should be aligned with chart timeframe (higher timeframes require increased major/minor periods)
The indicator performs exceptionally well as a trend filter for systematic trading strategies
Acknowledgments
FibonacciFlux builds upon the pioneering work of Donovan Wall in Donchian Channel Trend Intensity analysis. The normalization approach draws inspiration from percentile-based statistical techniques in quantitative finance. This indicator is shared for educational and analytical purposes under Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license.
Past performance does not guarantee future results. All trading involves risk. This indicator should be used as one component of a comprehensive analysis framework.
Shout out @DonovanWall
Fuzzy SMA Trend Analyzer (experimental)[FibonacciFlux]Fuzzy SMA Trend Analyzer (Normalized): Advanced Market Trend Detection Using Fuzzy Logic Theory
Elevate your technical analysis with institutional-grade fuzzy logic implementation
Research Genesis & Conceptual Framework
This indicator represents the culmination of extensive research into applying fuzzy logic theory to financial markets. While traditional technical indicators often produce binary outcomes, market conditions exist on a continuous spectrum. The Fuzzy SMA Trend Analyzer addresses this limitation by implementing a sophisticated fuzzy logic system that captures the nuanced, multi-dimensional nature of market trends.
Core Fuzzy Logic Principles
At the heart of this indicator lies fuzzy logic theory - a mathematical framework designed to handle imprecision and uncertainty:
// Improved fuzzy_triangle function with guard clauses for NA and invalid parameters.
fuzzy_triangle(val, left, center, right) =>
if na(val) or na(left) or na(center) or na(right) or left > center or center > right // Guard checks
0.0
else if left == center and center == right // Crisp set (single point)
val == center ? 1.0 : 0.0
else if left == center // Left-shoulder shape (ramp down from 1 at center to 0 at right)
val >= right ? 0.0 : val <= center ? 1.0 : (right - val) / (right - center)
else if center == right // Right-shoulder shape (ramp up from 0 at left to 1 at center)
val <= left ? 0.0 : val >= center ? 1.0 : (val - left) / (center - left)
else // Standard triangle
math.max(0.0, math.min((val - left) / (center - left), (right - val) / (right - center)))
This implementation of triangular membership functions enables the indicator to transform crisp numerical values into degrees of membership in linguistic variables like "Large Positive" or "Small Negative," creating a more nuanced representation of market conditions.
Dynamic Percentile Normalization
A critical innovation in this indicator is the implementation of percentile-based normalization for SMA deviation:
// ----- Deviation Scale Estimation using Percentile -----
// Calculate the percentile rank of the *absolute* deviation over the lookback period.
// This gives an estimate of the 'typical maximum' deviation magnitude recently.
diff_abs_percentile = ta.percentile_linear_interpolation(math.abs(raw_diff), normLookback, percRank) + 1e-10
// ----- Normalize the Raw Deviation -----
// Divide the raw deviation by the estimated 'typical max' magnitude.
normalized_diff = raw_diff / diff_abs_percentile
// ----- Clamp the Normalized Deviation -----
normalized_diff_clamped = math.max(-3.0, math.min(3.0, normalized_diff))
This percentile normalization approach creates a self-adapting system that automatically calibrates to different assets and market regimes. Rather than using fixed thresholds, the indicator dynamically adjusts based on recent volatility patterns, significantly enhancing signal quality across diverse market environments.
Multi-Factor Fuzzy Rule System
The indicator implements a comprehensive fuzzy rule system that evaluates multiple technical factors:
SMA Deviation (Normalized): Measures price displacement from the Simple Moving Average
Rate of Change (ROC): Captures price momentum over a specified period
Relative Strength Index (RSI): Assesses overbought/oversold conditions
These factors are processed through a sophisticated fuzzy inference system with linguistic variables:
// ----- 3.1 Fuzzy Sets for Normalized Deviation -----
diffN_LP := fuzzy_triangle(normalized_diff_clamped, 0.7, 1.5, 3.0) // Large Positive (around/above percentile)
diffN_SP := fuzzy_triangle(normalized_diff_clamped, 0.1, 0.5, 0.9) // Small Positive
diffN_NZ := fuzzy_triangle(normalized_diff_clamped, -0.2, 0.0, 0.2) // Near Zero
diffN_SN := fuzzy_triangle(normalized_diff_clamped, -0.9, -0.5, -0.1) // Small Negative
diffN_LN := fuzzy_triangle(normalized_diff_clamped, -3.0, -1.5, -0.7) // Large Negative (around/below percentile)
// ----- 3.2 Fuzzy Sets for ROC -----
roc_HN := fuzzy_triangle(roc_val, -8.0, -5.0, -2.0)
roc_WN := fuzzy_triangle(roc_val, -3.0, -1.0, -0.1)
roc_NZ := fuzzy_triangle(roc_val, -0.3, 0.0, 0.3)
roc_WP := fuzzy_triangle(roc_val, 0.1, 1.0, 3.0)
roc_HP := fuzzy_triangle(roc_val, 2.0, 5.0, 8.0)
// ----- 3.3 Fuzzy Sets for RSI -----
rsi_L := fuzzy_triangle(rsi_val, 0.0, 25.0, 40.0)
rsi_M := fuzzy_triangle(rsi_val, 35.0, 50.0, 65.0)
rsi_H := fuzzy_triangle(rsi_val, 60.0, 75.0, 100.0)
Advanced Fuzzy Inference Rules
The indicator employs a comprehensive set of fuzzy rules that encode expert knowledge about market behavior:
// --- Fuzzy Rules using Normalized Deviation (diffN_*) ---
cond1 = math.min(diffN_LP, roc_HP, math.max(rsi_M, rsi_H)) // Strong Bullish: Large pos dev, strong pos roc, rsi ok
strength_SB := math.max(strength_SB, cond1)
cond2 = math.min(diffN_SP, roc_WP, rsi_M) // Weak Bullish: Small pos dev, weak pos roc, rsi mid
strength_WB := math.max(strength_WB, cond2)
cond3 = math.min(diffN_SP, roc_NZ, rsi_H) // Weakening Bullish: Small pos dev, flat roc, rsi high
strength_N := math.max(strength_N, cond3 * 0.6) // More neutral
strength_WB := math.max(strength_WB, cond3 * 0.2) // Less weak bullish
This rule system evaluates multiple conditions simultaneously, weighting them by their degree of membership to produce a comprehensive trend assessment. The rules are designed to identify various market conditions including strong trends, weakening trends, potential reversals, and neutral consolidations.
Defuzzification Process
The final step transforms the fuzzy result back into a crisp numerical value representing the overall trend strength:
// --- Step 6: Defuzzification ---
denominator = strength_SB + strength_WB + strength_N + strength_WBe + strength_SBe
if denominator > 1e-10 // Use small epsilon instead of != 0.0 for float comparison
fuzzyTrendScore := (strength_SB * STRONG_BULL +
strength_WB * WEAK_BULL +
strength_N * NEUTRAL +
strength_WBe * WEAK_BEAR +
strength_SBe * STRONG_BEAR) / denominator
The resulting FuzzyTrendScore ranges from -1 (strong bearish) to +1 (strong bullish), providing a smooth, continuous evaluation of market conditions that avoids the abrupt signal changes common in traditional indicators.
Advanced Visualization with Rainbow Gradient
The indicator incorporates sophisticated visualization using a rainbow gradient coloring system:
// Normalize score to for gradient function
normalizedScore = na(fuzzyTrendScore) ? 0.5 : math.max(0.0, math.min(1.0, (fuzzyTrendScore + 1) / 2))
// Get the color based on gradient setting and normalized score
final_color = get_gradient(normalizedScore, gradient_type)
This color-coding system provides intuitive visual feedback, with color intensity reflecting trend strength and direction. The gradient can be customized between Red-to-Green or Red-to-Blue configurations based on user preference.
Practical Applications
The Fuzzy SMA Trend Analyzer excels in several key applications:
Trend Identification: Precisely identifies market trend direction and strength with nuanced gradation
Market Regime Detection: Distinguishes between trending markets and consolidation phases
Divergence Analysis: Highlights potential reversals when price action and fuzzy trend score diverge
Filter for Trading Systems: Provides high-quality trend filtering for other trading strategies
Risk Management: Offers early warning of potential trend weakening or reversal
Parameter Customization
The indicator offers extensive customization options:
SMA Length: Adjusts the baseline moving average period
ROC Length: Controls momentum sensitivity
RSI Length: Configures overbought/oversold sensitivity
Normalization Lookback: Determines the adaptive calculation window for percentile normalization
Percentile Rank: Sets the statistical threshold for deviation normalization
Gradient Type: Selects the preferred color scheme for visualization
These parameters enable fine-tuning to specific market conditions, trading styles, and timeframes.
Acknowledgments
The rainbow gradient visualization component draws inspiration from LuxAlgo's "Rainbow Adaptive RSI" (used under CC BY-NC-SA 4.0 license). This implementation of fuzzy logic in technical analysis builds upon Fermi estimation principles to overcome the inherent limitations of crisp binary indicators.
This indicator is shared under Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license.
Remember that past performance does not guarantee future results. Always conduct thorough testing before implementing any technical indicator in live trading.
Spot - Fut spread v2"Spot - Fut Spread v2"
indicator is designed to track the difference between spot and futures prices on various exchanges. It automatically identifies the corresponding instrument (spot or futures) based on the current symbol and calculates the spread between the prices. This tool is useful for analyzing the delta between spot and futures markets, helping traders assess arbitrage opportunities and market sentiment.
Key Features:
- Automatic detection of spot and futures assets based on the current chart symbol.
- Flexible asset selection: the ability to manually choose the second asset if automatic selection is disabled.
- Spread calculation between futures and spot prices.
- Moving average of the spread for smoothing data and trend analysis.
Flexible visualization:
- Color indication of positive and negative spread.
- Adjustable background transparency.
- Text label displaying the current spread and moving average values.
- Error alerts in case of invalid data.
How the Indicator Works:
- Determines whether the current symbol is a futures contract.
- Based on this, selects the corresponding spot or futures symbol.
- Retrieves price data and calculates the spread between them.
- Displays the spread value and its moving average.
- The chart background color changes based on the spread value (positive or negative).
- In case of an error, the indicator provides an alert with an explanation.
Customization Parameters:
-Exchange selection: the ability to specify a particular exchange from the list.
- Automatic pair selection: enable or disable automatic selection of the second asset.
- Moving average period: user-defined.
- Colors for positive and negative spread values.
- Moving average color.
- Background transparency.
- Background coloring source (based on spread or its moving average).
Application:
The indicator is suitable for traders who analyze the difference between spot and futures prices, look for arbitrage opportunities, and assess the premium or discount of futures relative to the spot market.
Buy and Sell Signals (London & New York Opens)this is the indicator only helpful in 5 min time frame when previous day candle is in sell direction only take sell signal as entry uncheck buy option in settings and when previous day candle is in buy direction only take buy signal then uncheck sell option risk is swing high reward is 2 times to risk
Futures Round Levels Clean (50/00 only at price)This will display a dashed line at the 50 and 00 levels for futures.
Fibonacci Trend with Adaptive ChannelsFibonacci Trend with Adaptive Channels
The "Fibonacci Trend with Adaptive Channels" indicator is a powerful technical analysis tool that blends dynamic Fibonacci retracement levels with adaptive trend channels and exponential moving averages (EMAs). Designed for traders seeking a comprehensive view of market trends and key price levels, this script combines the precision of ChartPrime's Fibonacci Trend with Julien Eche's Adaptive Trend Finder, enhanced with customizable EMAs. Whether you're a swing trader, day trader, or long-term investor, this indicator offers a versatile approach to identifying support, resistance, and trend direction.
Fibonacci Levels
At its core, the indicator dynamically plots Fibonacci retracement levels (0, 0.236, 0.382, 0.5, 0.618, 0.786, 1) based on the Supertrend indicator's direction. When a trend shift occurs, the script identifies the highest high and lowest low within the trend, extending these levels forward by a user-defined number of bars. Traders can customize the Fibonacci line color and fill color between levels, making it easy to spot potential reversal zones or continuation patterns in any market condition.
Exponential Moving Averages (EMAs)
To complement the Fibonacci analysis, the indicator overlays three EMAs with periods of 10, 55, and 200. These moving averages provide additional context for trend strength and momentum. The short-term EMA (10) tracks rapid price movements, the medium-term EMA (55) offers a balanced view, and the long-term EMA (200) highlights the broader market direction. Each EMA's color is fully customizable, allowing users to tailor the visual experience to their preferences.
Adaptive Trend Channels
The Adaptive Trend Finder component introduces logarithmic regression-based channels that automatically adjust to the strongest historical trend. Users can toggle between short-term (20-200 bars) and long-term (300-1200 bars) channel modes, with customizable deviation multipliers, line styles, and colors for both the midline and outer channels. This adaptive approach ensures that the channels reflect the most statistically significant trend, providing a robust framework for price action analysis.
Statistical Insights
A standout feature is the integrated table, which displays key metrics about the detected trend. Traders can choose to show the auto-selected period (the length with the highest correlation), trend strength (via a descriptive label or Pearson's R value), and the annualized return (CAGR) for daily or weekly timeframes. The table's position and text size are adjustable, offering flexibility to keep your chart clean while accessing critical data at a glance.
Customization and Flexibility
This indicator is built with customization in mind. Beyond color options for Fibonacci levels, EMAs, and channels, users can adjust the Supertrend period, Fibonacci extension length, channel deviation, and table settings. Whether you prefer a minimalist setup with just the essentials or a detailed display with all features enabled, the script adapts to your trading style. Load it twice to view short-term and long-term channels simultaneously for a multi-timeframe perspective.
Usage and Licensing
Ideal for stocks, forex, cryptocurrencies, and more, this indicator is published under a dual-license framework: MPL-2.0 for the Fibonacci Trend component (© ChartPrime) and GPL-3.0 for the Adaptive Trend Finder component (© Julien Eche). For optimal performance, ensure sufficient historical data is loaded, especially in long-term channel mode. Scroll back on your chart if channels aren't visible, and experiment with settings to fine-tune the tool to your market and timeframe of choice.
Three Red WicksThe indicator will mark spots on your chart where three red candles appear in a row. You can modify the marker's color, shape, or position by adjusting the plotshape parameters if desired.
Would you like me to modify anything in this indicator, like changing the marker style or adding additional conditions?
SemaforThis is the 4 Level Semafor indicator with Daily Open Line and Average Session Range. Also on the chart is the EMA Ribbon indicator.
Credit to:
Devlucem for the Semafor indicator
Quantvue for the Average Session Range
Shusterivi for the Daily Open Line
MYNAMEISBRANDON for the EMA Ribbon
The Semafors are based on the ZigZag indicator and show higher highs/lower lows of a specified period, determined by the user and applied in settings.
The default periods I use are:
10 period (hidden on this chart)
50 period-blue dots
250 period-white dots
615 period-black dots
Just as the ZigZag indicator will recalculate so to will the semafors, as additional candles are built. The semafor indicator is never to be used as a stand alone signal. It must be combined with other indicators to be used effectively. What we look for are the semafor patterns of a large white dot followed by a 1st blue dot opposite of the white. Then a 2nd blue dot in agreement with the white dot. In theory, the 2nd blue dot is seen as confirmation of the establishment of the white semafor..
When combined with Daily Open Line, ADR (Average Sessions Range), EMA cross and VWAP anchored to your 250 semafors, your odds are greatly increased. Add to that the knowledge of basic market structure and the wisdom that comes from patience and you have a very powerful weapon.
The Daily Open...I trade the M1 chart and also draw a H4 Open Line on my chart for the smaller time frames. Price will tend to trade away from the Daily Open Line. In many cases until it reaches certain levels...Fib, Gann, ADR, etc., then runs through a pullback cycle. I like the ADR levels. The ADR can give clues when entering a consolidation phase, ie trading between the buy side and sell side 15% levels. Trading away from the Daily Open(or H4 open) along with breaking the 15% level, while in agreement with a semafor pattern is a good sign.
Add to that confluence the agreement of your MA cross and the 250 semafor Anchored VWAP and you have a solid signal to help determine your actions. This trend following layout will work on any time frame. I just really like the M1 for its precision, not for crazy back and forth all day. With the exception of some strong pull back signals, I don't enter any more trades on the M1 than on M5, 15 or 30.
This is based on and follows the teachings of Xard and his trading strategy. Just as I don't want to take anyone's credit for these indicators, I won't take credit for what I have been taught either.
The trader can obviously use their favorite MA cross indicator. But this one is visually beautiful AND displays the current time frame and 1 time frame higher on the chart...awesome!
Of note, I do run into trouble at times with the 615 period semafor. I have been told it is because TradingView has trouble with extended period indicators. As a matter of fact, I would like a much higher period for my biggest semafor. I would like it set at 1250, but that seems to be a no starter. If anyone has a solution, that would be welcomed news.
Volume Spikes Analyzer & Trend ScannerVolume Spikes Analyzer & Trend Scanner
📌 Version: Pine Script (TradingView)
📌 Author:
📌 Overlay: ❌ (Displayed in a separate panel)
📝 Description
The Volume Spikes Analyzer & Trend Scanner is a comprehensive volume analysis tool that identifies and highlights significant volume trends using color-coded bars. It provides a table-based summary of volume conditions and trends, enabling traders to detect high and low volume activity at a glance.
📌 Features
✅ Volume Spike Detection – Highlights abnormal volume spikes above a defined threshold.
✅ Extreme Low Volume Detection – Identifies periods of very low market activity.
✅ Volume-Based Trend Analysis – Differentiates between strong and weak volume increases/decreases.
✅ Customizable Highlight Opacity – Adjusts transparency for better visualization.
✅ Movable Table Display – Users can place the summary table in different positions on the chart.
✅ Alerts for Volume Spikes – Notifies traders of significant volume events.
📈 How It Works
Volume Calculation
The script compares the current volume with the previous volume.
It also calculates a moving average of volume (volMA) for trend comparison.
Volume Condition Detection
If volume is significantly higher than the moving average, it's considered a spike.
If volume is very low, it's categorized as an extreme low volume condition.
The script also differentiates between higher/lower volume relative to average.
Color-Coded Bar Plotting
Volume bars are colored based on the detected conditions for easy identification.
The highlight opacity is customizable.
Table Display
A summary table provides real-time volume conditions and key values:
Current Volume (A)
Previous Volume (B)
Volume Moving Average (C)
Multiplier (A/C)
Alerts for Spikes
If a volume spike occurs, an alert is triggered with the message: "Volume spike detected!".
⚠️ Limitations
⚠ No Historical Table Data – The table only updates dynamically for the latest bar.
⚠ Dependent on Moving Average – If volMA is na due to insufficient data, the table may not display correctly.
⚠ No Volume Types Differentiation – Does not distinguish between buying and selling volume.
📌 How to Use
Add the indicator to your chart.
Customize settings such as volume moving average length and threshold.
Observe the color-coded volume bars to detect significant market activity.
Use the table for quick reference on current volume trends.
Enable alerts for automatic notifications on volume spikes.
📊 Volume Classification & Colors
Condition Description Color
🔥 Volume Spike High volume surge above the threshold. Orange
🟣 Extreme Low Volume Volume is less than 50% of the average. Purple
🟢 Higher Volume (Above Avg.) Strong increase in volume, above the average. Lime Green
🟩 Higher Volume (Below Avg.) Weak increase in volume, still below the average. Green
🟥 Lower Volume (Above Avg.) High but declining volume. Maroon
🔴 Lower Volume (Below Avg.) Weak market participation. Red
⚪ Neutral Volume No significant change in volume. Gray