Volume by Time [LuxAlgo]The Volume by Time indicator collects volume data for every point in time over the day and displays the average volume of the specific dataset collected at each respective bar.
The indicator overlays the current volume and the historical average to allow for better comparisons.
🔶 USAGE
Throughout the day, the volume of every bar is stored in groups organized by the time when each bar occurred.
Over time, the datasets accumulate, and from that, we can simply determine the average value at each specific time of the day.
The display is a histogram style, which consists of hollow bars and solid filled columns.
-Hollow bars represent the average volume at that time of the day.
-Solid columns display the current volume from the current bar.
By default, the entire history of data is used, but if desired, the number of days under analysis can be specified to provide a more relevant point of view.
A readout of the number of days being analyzed can be seen in the status bar at any time.
Note: Due to partial sessions, it is typical to see this value change throughout the day; this is simply due to the fact that not every trading session has the exact same schedule 100% of the time.
The analysis type can also be specified; these can be either Average (Default) or Median.
Additionally, a Bi-directional can be toggled for a distinct difference between upwards volume and downwards volume.
🔶 SETTINGS
Analysis Type: Choose between Average or Median analysis modes.
Length (Days): Set the number of days to use for analysis. Set to 0 for full data (Default 0).
Bi-Directional Toggle: Toggle between one-sided or two-sided display.
Indicadores y estrategias
ADX Tide ZonesADX Tide Zones – Adaptive Momentum & Trend Strength Framework
Overview
ADX Tide Zones – Professional is a dynamic trend-strength visualizer designed for traders who want to interpret momentum with precision and context. By combining the Average Directional Index (ADX) with adaptive threshold logic, the indicator segments price action into distinct “tide zones” that reflect varying levels of market strength: Calm, Rising, Strong, and Falling Tides. These zones transform raw ADX readings into an interpretable framework that highlights when markets are consolidating, building momentum, trending strongly, or losing strength.
Unlike standard ADX readings, which can be difficult to interpret in real time, ADX Tide Zones translate momentum shifts into a continuous, color-coded system that traders can instantly read. Whether applied to scalping, intraday, or swing trading, the indicator offers a consistent methodology for identifying actionable opportunities across assets and timeframes.
How It Works
The foundation of ADX Tide Zones lies in momentum analysis via the ADX. By measuring the strength (not direction) of a trend, ADX provides an objective read on when markets are gaining or losing energy. ADX Tide Zones enhances this by applying threshold logic to classify ADX values into four distinct states:
Calm Tide : Low ADX values indicate sideways or consolidating conditions.
Rising Tide : ADX increases past a threshold, signaling momentum building.
Strong Tide : ADX remains elevated, confirming robust and sustained trend strength.
Falling Tide : ADX declines after strength, hinting at exhaustion or early reversal setups.
These states are displayed on the chart through adaptive visualizations (zones, bar colors, or overlays), offering real-time clarity on when to expect expansion, continuation, or contraction in price action.
Interpretation
Trend Analysis : By mapping transitions between tides, traders can instantly gauge whether markets are in accumulation, expansion, or exhaustion phases. Rising/Strong Tides reinforce trend continuation, while Falling Tides highlight weakening conditions.
Volatility & Risk Assessment : Shifts between Calm → Rising Tide often precede volatility expansions. Falling Tides can signal a period of compression or corrective moves, warning traders to manage risk proactively.
Market Context : The indicator does not dictate direction; instead, it overlays strength on top of price action, allowing traders to combine it with directional tools such as moving averages, order blocks, or liquidity zones for confirmation.
Strategy Integration
ADX Tide Zones adapts seamlessly to a wide range of trading strategies by translating momentum dynamics into actionable frameworks:
Trend Following : Traders can align with dominant flows by entering positions when the indicator confirms a Rising Tide or Strong Tide. These conditions signal persistent directional strength, making them ideal for continuation setups. Combining directional bias with ADX confirmation reduces the risk of trading against prevailing momentum.
Breakout Trading : When the market transitions from Calm Tide into a Rising Tide, it often precedes a volatility expansion. This shift highlights breakout conditions where accumulation gives way to impulsive price movement. Traders can use this transition as a timing tool to catch early entries into new momentum phases.
Exhaustion Reversals : Strong Tide phases don’t last forever—when they begin to fade into Falling Tide, it can mark trend fatigue or liquidity exhaustion. This offers contrarian traders an early edge in spotting overextended moves and positioning for corrective pullbacks or full reversals.
Multi-Timeframe Analysis : By overlaying higher timeframe tide zones on intraday or scalping charts, traders can filter noise and trade in alignment with larger flows. For example, combining a daily Rising Tide bias with a 15-minute breakout confirmation can significantly improve entry precision while reducing exposure to false signals.
Advanced Techniques
For traders seeking an extra edge, ADX Tide Zones can be pushed further with advanced methods:
Volume & Liquidity Confirmation : Pair the tide transitions with volume spikes, order flow, or liquidity sweep tools. When directional strength confirmed by the ADX coincides with institutional activity, it validates setups and increases probability of follow-through.
Cross-Asset Synchronization : Momentum rarely exists in isolation. Monitoring tide shifts across correlated instruments (e.g., majors vs. USD, or indices vs. risk assets) can uncover synchronized volatility events. These correlations help traders identify whether a move is isolated noise or part of a broader systemic trend.
Threshold Optimization : The sensitivity of ADX Tide Zones can be fine-tuned for different trading objectives. Lower thresholds heighten responsiveness, capturing micro-moves suitable for scalpers. Higher thresholds filter minor fluctuations, isolating major structural swings that align with swing or position trading.
Contextual Trade Management : Instead of using static stops or targets, traders can adapt risk management dynamically by tracking tide progression. For example, a trade initiated during Rising Tide may remain valid as long as conditions sustain, but partial profits or tighter stops can be applied once the zone shifts to Calm Tide.
Inputs & Customization
ADX Length : Define the lookback period for ADX calculation.
Threshold Levels : Adjust sensitivity for Calm, Rising, Strong, and Falling Tides.
Zone Visualization : Choose between bar coloring, background shading, or overlays.
Color Customization : Configure bullish, bearish, neutral, and tide-specific colors.
Multi-Timeframe Options : Enable tide readings from higher timeframes for confirmation.
Why Use ADX Tide Zones
ADX Tide Zones turns the complexity of momentum analysis into a visual system that highlights when markets are gearing up for moves, trending with conviction, or running out of steam. By combining adaptive ADX interpretation with customizable thresholds, traders can:
Anticipate breakouts before volatility expands.
Confirm the strength behind price trends.
Spot exhaustion phases early to secure profits or prepare for reversals.
Adapt strategies seamlessly between scalping, intraday, and swing trading.
With its balance of simplicity and depth, ADX Tide Zones provides a structured lens for reading market momentum, equipping traders with the clarity needed to execute with discipline and confidence.
Deadband Hysteresis Filter [BackQuant]Deadband Hysteresis Filter
What this is
This tool builds a “debounced” price baseline that ignores small fluctuations and only reacts when price meaningfully departs from its recent path. It uses a deadband to define how much deviation matters and a hysteresis scheme to avoid rapid flip-flops around the decision boundary. The baseline’s slope provides a simple trend cue, used to color candles and to trigger up and down alerts.
Why deadband and hysteresis help
They filter micro noise so the baseline does not react to every tiny tick.
They stabilize state changes. Hysteresis means the rule to start moving is stricter than the rule to keep holding, which reduces whipsaw.
They produce a stepped, readable path that advances during sustained moves and stays flat during chop.
How it works (conceptual)
At each bar the script maintains a running baseline dbhf and compares it to the input price p .
Compute a base threshold baseTau using the selected mode (ATR, Percent, Ticks, or Points).
Build an enter band tauEnter = baseTau × Enter Mult and an exit band tauExit = baseTau × Exit Mult where typically Exit Mult < Enter Mult .
Let diff = p − dbhf .
If diff > +tauEnter , raise the baseline by response × (diff − tauEnter) .
If diff < −tauEnter , lower the baseline by response × (diff + tauEnter) .
Otherwise, hold the prior value.
Trend state is derived from slope: dbhf > dbhf → up trend, dbhf < dbhf → down trend.
Inputs and what they control
Threshold mode
ATR — baseTau = ATR(atrLen) × atrMult . Adapts to volatility. Useful when regimes change.
Percent — baseTau = |price| × pctThresh% . Scale-free across symbols of different prices.
Ticks — baseTau = syminfo.mintick × tickThresh . Good for futures where tick size matters.
Points — baseTau = ptsThresh . Fixed distance in price units.
Band multipliers and response
Enter Mult — outer band. Price must travel at least this far from the baseline before an update occurs. Larger values reject more noise but increase lag.
Exit Mult — inner band for hysteresis. Keep this smaller than Enter Mult to create a hold zone that resists small re-entries.
Response — step size when outside the enter band. Higher response tracks faster; lower response is smoother.
UI settings
Show Filtered Price — plots the baseline on price.
Paint candles — colors bars by the filtered slope using your long/short colors.
How it can be used
Trend qualifier — take entries only in the direction of the baseline slope and skip trades against it.
Debounced crossovers — use the baseline as a stabilized surrogate for price in moving-average or channel crossover rules.
Trailing logic — trail stops a small distance beyond the baseline so small pullbacks do not eject the trade.
Session aware filtering — widen Enter Mult or switch to ATR mode for volatile sessions; tighten in quiet sessions.
Parameter interactions and tuning
Enter Mult vs Response — both govern sensitivity. If you see too many flips, increase Enter Mult or reduce Response. If turns feel late, do the opposite.
Exit Mult — widening the gap between Enter and Exit expands the hold zone and reduces oscillation around the threshold.
Mode choice — ATR adapts automatically; Percent keeps behavior consistent across instruments; Ticks or Points are useful when you think in fixed increments.
Timeframe coupling — on higher timeframes you can often lower Enter Mult or raise Response because raw noise is already reduced.
Concrete starter recipes
General purpose — ATR mode, atrLen=14 , atrMult=1.0–1.5 , Enter=1.0 , Exit=0.5 , Response=0.20 . Balanced noise rejection and lag.
Choppy range filter — ATR mode, increase atrMult to 2.0, keep Response≈0.15 . Stronger suppression of micro-moves.
Fast intraday — Percent mode, pctThresh=0.1–0.3 , Enter=1.0 , Exit=0.4–0.6 , Response=0.30–0.40 . Quicker turns for scalping.
Futures ticks — Ticks mode, set tickThresh to a few spreads beyond typical noise; start with Enter=1.0 , Exit=0.5 , Response=0.25 .
Strengths
Clear, explainable logic with an explicit noise budget.
Multiple threshold modes so the same tool fits equities, futures, and crypto.
Built-in hysteresis that reduces flip-flop near the boundary.
Slope-based coloring and alerts that make state changes obvious in real time.
Limitations and notes
All filters add lag. Larger thresholds and smaller response trade faster reaction for fewer false turns.
Fixed Points or Ticks can under- or over-filter when volatility regime shifts. ATR adapts, but will also expand bands during spikes.
On extremely choppy symbols, even a well tuned band will step frequently. Widen Enter Mult or reduce Response if needed.
This is a chart study. It does not include commissions, slippage, funding, or gap risks.
Alerts
DBHF Up Slope — baseline turns from down to up on the latest bar.
DBHF Down Slope — baseline turns from up to down on the latest bar.
Implementation details worth knowing
Initialization sets the baseline to the first observed price to avoid a cold-start jump.
Slope is evaluated bar-to-bar. The up and down alerts check for a change of slope rather than raw price crossings.
Candle colors and the baseline plot share the same long/short palette with transparency applied to the line.
Practical workflow
Pick a mode that matches how you think about distance. ATR for volatility aware, Percent for scale-free, Ticks or Points for fixed increments.
Tune Enter Mult until the number of flips feels appropriate for your timeframe.
Set Exit Mult clearly below Enter Mult to create a real hold zone.
Adjust Response last to control “how fast” the baseline chases price once it decides to move.
Final thoughts
Deadband plus hysteresis gives you a principled way to “only care when it matters.” With a sensible threshold and response, the filter yields a stable, low-chop trend cue you can use directly for bias or plug into your own entries, exits, and risk rules.
Elliott Wave Rule EngineWhat this tool does
The indicator scans price for two concurrent swing structures—a Small (shorter-degree) and a Large (higher-degree) set—then applies an Elliott/NeoWave rule engine to the most recent 5-swing motive (1-2-3-4-5) or 3-swing corrective (A-B-C). It produces:
Blue lines for Small swings and Orange lines for Large swings.
A rule dashboard (optional) showing PASS/FAIL/WARN for core rules & guidelines.
Buy/Sell labels when (a) a valid motive completes and (b) loop “consensus,” alignment, and scoring gates are satisfied.
Reading the chart
Small swings: thin blue segments, built from your Small settings.
Large swings: thicker orange segments, from your Large settings.
Background tint: faint green when a motive (impulse/diagonal) is valid right now on Small.
Labels (if enabled):
“1…5” or “A-B-C” markers on the latest detected structure.
Buy/Sell label at the last pivot when all gates pass; text may include a score %.
How it works
For both Small and Large degrees the script:
- Loops over all (left, right) combinations you specify (e.g., Small Left = 3..6, Right = 0..0) and calls ta.pivothigh/low.
- Aggregates the results:
- Keeps the most extreme pivot found in the loop (highest high or lowest low) that’s newer than the last accepted swing.
- Gates acceptance by minimum % change versus the last opposite swing (inside the loop) and a post-aggregation filter (Small Minimum swing %, Large Minimum swing %).
- Merges back-to-back same-type swings (HH or LL) by keeping only the more extreme one.
- Keeps only the last N=lookbackWaves swings (default 100).
- Consensus (used for signals) comes from the loop counts:
- sBuyConsensus = small L-count / total-combos (bullish bias)
- sSellConsensus = small H-count / total-combos (bearish bias)
(and the same for Large). This is a data-driven “how many combos agreed” measure.
2) Rule engine (Impulse/Diagonal vs. Corrective)
When there are at least 6 Small swings, the engine tests 1-2-3-4-5:
Hard rules (must pass for an Impulse):
- Wave-2 not > 100% of Wave-1 (no retrace beyond start of W1).
- Wave-3 not the shortest among 1,3,5.
- Wave-4 doesn’t overlap Wave-1 (if it does, structure may be a Diagonal).
- Diagonal eligibility: Rules 1 & 2 pass but Rule 3 fails ⇒ eligible as a Diagonal (
Guidelines (7 checks, count toward a threshold you set):
- W2 retraces a Fib level (within ±fibTol).
- W4 retraces a Fib level (within ±fibTol).
- W3 strongest momentum (speed = |Δprice| / bars).
- Alternation: W2 vs W4 have meaningfully different “sharpness” (price per bar), threshold altSlopeThr.
- Proportion (Price): |W1| and |W3| within propTolP× each other.
- Proportion (Time): W1W3 and W2W4 durations within propTolT×.
- W5 weaker than W3 (momentum divergence proxy).
A Motive is valid if:
- Impulse: all 3 hard rules pass and guideline passes ≥ Min guideline passes.
- Diagonal: diagonal-eligible and guideline passes ≥ Min guideline passes.
- if motive fails, the engine still evaluates ABC as Zigzag and Flat to populate the table:
- Zigzag: B shallower than ~0.618A; C ≈ A or 1.618A (±fibTol).
- Flat: B ≥ ~0.9A; expanded flat if B > 1.0A and C in *A; “running” note if C < A.
3) Signal logic (consensus-gated & scored)
Signals fire only on new Small pivots and only if a Small motive just validated:Direction comes from the motive’s W1 (up = bull, down = bear).
Consensus checks (from the loop):
Use Sell consensus if the last pivot is a High, or Buy consensus if it’s a Low.Require it ≥ Min SMALL loop consensus and ahead of the opposite side by at least Min consensus margin.If you also require Large quality: check the corresponding Large consensus ≥ Min LARGE loop consensus.
Alignment: If Require small/large directional alignment is ON, Small and Large directions must match (or the Large motive must be complete).
Score:
- If Large not required: finalScore = smallConsensus × smallQuality.
- If Large required: finalScore = smallConsensus × smallQuality × largeQuality.
- Need finalScore ≥ Min final score.
When all gates pass, you’ll see “Buy xx%” or “Sell xx%” at the pivot.
Inputs (explained):
- Smaller Wave Swing Detection (Looped)
- Small Left Min / Max (default 3..6): ta.pivot* left widths to scan.
- Small Right Min / Max (default 0..0): right widths to scan (0 = earliest confirmation).
- Small Minimum swing % (post-aggregation) (0.3%): filters out tiny swings after the loop.
- Larger Wave Swing Detection (Looped)
- Large Left Min / Max (100..200) and Right Min/Max (0..0): higher-degree scan (defaults are big; adjust for intraday).
- Large Minimum swing % (post-aggregation) (1.5%).
- Loop Filters (inside the loop)
- Small loop min % change (0.20%): a candidate pivot counts only if move vs. last opposite Small swing ≥ this.
- Large loop min % change (1.50%): same idea for Large.
Rule Engine Tolerances
- Fibonacci tolerance (±%) (0.05 = 5%): closeness to Fib levels.
-Same-degree TIME proportion max (x) (2.00×) and PRICE proportion max (x) (3.00×).
- Alternation slope ratio threshold (0.10): higher = stricter alternation.
- Min guideline passes (0–7) (5): threshold for motive validity.
- Signal Probability (Loop Consensus)
- Min SMALL loop consensus (0.60).
- Min LARGE loop consensus (0.50) (used only if Large validation matters).
- Min consensus margin vs opposite (0.10): e.g., 0.60 vs 0.45 fails (margin 0.15 passes).
Require LARGE 1–5 valid (or diagonal) for signal (off by default).
Min final score (0.20): gate on the composite score.
Annotate label with score % (on).
WARN (orange): guideline not met—pattern can still be valid if total passes ≥ Min guideline passes.
FAQ
Q: Why did I get a diagonal instead of an impulse?
A: Wave-4 overlapped Wave-1 (Rule 3). If Rules 1 & 2 pass and guidelines meet your minimum, it’s eligible as a Diagonal.
Q: Where do Buy/Sell labels come from?
A: Only after a valid Small motive at a new pivot, and only if consensus, alignment, and final score gates pass (per your settings).
Q: It “missed” a wave in hindsight.
A: Pivots require right bars to confirm; extremely tight settings can filter that swing; adjust Small min % or ranges.
Q: Are there repaints?
A: No, It uses standard pivot confirmation; until a pivot is confirmed, recent swings can evolve. After confirmation, lines/labels are stable.
Limitations & disclaimers
Elliott/NeoWave rules are heuristics; markets are messy. Treat outputs as structured context, not certainty.
Consensus is pattern-scan agreement, not probability of profit Not investment advice; always couple with risk management.
Ultra Degen Indicator🚨 Ultra Degen Indicator 🚨
Ready to YOLO your way to the moon or get rekt trying?
The Ultra Degen Indicator is your ultimate co-pilot for navigating the wild world of crypto. This isn't your grandpa's boring, slow-moving indicator. This is pure, unadulterated degen energy, designed to help you catch pumps and dump your bags before it's too late.
We've turbocharged the classic Supertrend by adding a high-octane RSI filter. This means no more waiting for slow signals. We're getting in early and getting out fast.
What's under the hood?
Supercharged Supertrend: A lean, mean, trend-following machine that cuts through the noise to tell you whether to long or short.
RSI Momentum Filter: The secret sauce! We use RSI to confirm that the momentum is in your favor. No more buying on weak bounces or selling into strong pumps. If the Supertrend flashes a buy signal, the RSI checks for bullish momentum. If the RSI isn't feeling it, we sit on our hands and wait for a better entry.
Multi-Timeframe (MTF) Support: Want to catch a quick scalp but trade with the big boys' trend? No problem. The Ultra Degen Indicator lets you set a higher timeframe to filter your trades, so you can snipe entries on the 5-minute chart while staying aligned with the daily trend. This is how you avoid getting rekt by a whale.
This indicator is for the true degen who understands that sometimes, you just gotta ape in. Use it wisely, have fun, and may your portfolio never see a red candle again.
DYOR. NFA. LFG. 🚀
Adaptive Trend Following Suite [Alpha Extract]A sophisticated multi-filter trend analysis system that combines advanced noise reduction, adaptive moving averages, and intelligent market structure detection to deliver institutional-grade trend following signals. Utilizing cutting-edge mathematical algorithms and dynamic channel adaptation, this indicator provides crystal-clear directional guidance with real-time confidence scoring and market mode classification for professional trading execution.
🔶 Advanced Noise Reduction
Filter Eliminates market noise using sophisticated Gaussian filtering with configurable sigma values and period optimization. The system applies mathematical weight distribution across price data to ensure clean signal generation while preserving critical trend information, automatically adjusting filter strength based on volatility conditions.
advancedNoiseFilter(sourceData, filterLength, sigmaParam) =>
weightSum = 0.0
valueSum = 0.0
centerPoint = (filterLength - 1) / 2
for index = 0 to filterLength - 1
gaussianWeight = math.exp(-0.5 * math.pow((index - centerPoint) / sigmaParam, 2))
weightSum += gaussianWeight
valueSum += sourceData * gaussianWeight
valueSum / weightSum
🔶 Adaptive Moving Average Core Engine
Features revolutionary volatility-responsive averaging that automatically adjusts smoothing parameters based on real-time market conditions. The engine calculates adaptive power factors using logarithmic scaling and bandwidth optimization, ensuring optimal responsiveness during trending markets while maintaining stability during consolidation phases.
// Calculate adaptive parameters
adaptiveLength = (periodLength - 1) / 2
logFactor = math.max(math.log(math.sqrt(adaptiveLength)) / math.log(2) + 2, 0)
powerFactor = math.max(logFactor - 2, 0.5)
relativeVol = avgVolatility != 0 ? volatilityMeasure / avgVolatility : 0
adaptivePower = math.pow(relativeVol, powerFactor)
bandwidthFactor = math.sqrt(adaptiveLength) * logFactor
🔶 Intelligent Market Structure Analysis
Employs fractal dimension calculations to classify market conditions as trending or ranging with mathematical precision. The system analyzes price path complexity using normalized data arrays and geometric path length calculations, providing quantitative market mode identification with configurable threshold sensitivity.
🔶 Multi-Component Momentum Analysis
Integrates RSI and CCI oscillators with advanced Z-score normalization for statistical significance testing. Each momentum component receives independent analysis with customizable periods and significance levels, creating a robust consensus system that filters false signals while maintaining sensitivity to genuine momentum shifts.
// Z-score momentum analysis
rsiAverage = ta.sma(rsiComponent, zAnalysisPeriod)
rsiDeviation = ta.stdev(rsiComponent, zAnalysisPeriod)
rsiZScore = (rsiComponent - rsiAverage) / rsiDeviation
if math.abs(rsiZScore) > zSignificanceLevel
rsiMomentumSignal := rsiComponent > 50 ? 1 : rsiComponent < 50 ? -1 : rsiMomentumSignal
❓How It Works
🔶 Dynamic Channel Configuration
Calculates adaptive channel boundaries using three distinct methodologies: ATR-based volatility, Standard Deviation, and advanced Gaussian Deviation analysis. The system automatically adjusts channel multipliers based on market structure classification, applying tighter channels during trending conditions and wider boundaries during ranging markets for optimal signal accuracy.
dynamicChannelEngine(baselineData, channelLength, methodType) =>
switch methodType
"ATR" => ta.atr(channelLength)
"Standard Deviation" => ta.stdev(baselineData, channelLength)
"Gaussian Deviation" =>
weightArray = array.new_float()
totalWeight = 0.0
for i = 0 to channelLength - 1
gaussWeight = math.exp(-math.pow((i / channelLength) / 2, 2))
weightedVariance += math.pow(deviation, 2) * array.get(weightArray, i)
math.sqrt(weightedVariance / totalWeight)
🔶 Signal Processing Pipeline
Executes a sophisticated 10-step signal generation process including noise filtering, trend reference calculation, structure analysis, momentum component processing, channel boundary determination, trend direction assessment, consensus calculation, confidence scoring, and final signal generation with quality control validation.
🔶 Confidence Transformation System
Applies sigmoid transformation functions to raw confidence scores, providing 0-1 normalized confidence ratings with configurable threshold controls. The system uses steepness parameters and center point adjustments to fine-tune signal sensitivity while maintaining statistical robustness across different market conditions.
🔶 Enhanced Visual Presentation
Features dynamic color-coded trend lines with adaptive channel fills, enhanced candlestick visualization, and intelligent price-trend relationship mapping. The system provides real-time visual feedback through gradient fills and transparency adjustments that immediately communicate trend strength and direction changes.
🔶 Real-Time Information Dashboard
Displays critical trading metrics including market mode classification (Trending/Ranging), structure complexity values, confidence scores, and current signal status. The dashboard updates in real-time with color-coded indicators and numerical precision for instant market condition assessment.
🔶 Intelligent Alert System
Generates three distinct alert types: Bullish Signal alerts for uptrend confirmations, Bearish Signal alerts for downtrend confirmations, and Mode Change alerts for market structure transitions. Each alert includes detailed messaging and timestamp information for comprehensive trade management integration.
🔶 Performance Optimization
Utilizes efficient array management and conditional processing to maintain smooth operation across all timeframes. The system employs strategic variable caching, optimized loop structures, and intelligent update mechanisms to ensure consistent performance even during high-volatility market conditions.
This indicator delivers institutional-grade trend analysis through sophisticated mathematical modelling and multi-stage signal processing. By combining advanced noise reduction, adaptive averaging, intelligent structure analysis, and robust momentum confirmation with dynamic channel adaptation, it provides traders with unparalleled trend following precision. The comprehensive confidence scoring system and real-time market mode classification make it an essential tool for professional traders seeking consistent, high-probability trend following opportunities with mathematical certainty and visual clarity.
Sequential Pattern Strength [QuantAlgo]🟢 Overview
The Sequential Pattern Strength indicator measures the power and sustainability of consecutive price movements by tracking unbroken sequences of up or down closes. It incorporates sequence quality assessment, price extension analysis, and automatic exhaustion detection to help traders identify when strong trends are losing momentum and approaching potential reversal or continuation points.
🟢 How It Works
The indicator's key insight lies in its sequential pattern tracking system, where pattern strength is measured by analyzing consecutive price movements and their sustainability:
if close > close
upSequence := upSequence + 1
downSequence := 0
else if close < close
downSequence := downSequence + 1
upSequence := 0
The system calculates sequence quality by measuring how "perfect" the consecutive moves are:
perfectMoves = math.max(upSequence, downSequence)
totalMoves = math.abs(bar_index - ta.valuewhen(upSequence == 1 or downSequence == 1, bar_index, 0))
sequenceQuality = totalMoves > 0 ? perfectMoves / totalMoves : 1.0
First, it tracks price extension from the sequence starting point:
priceExtension = (close - sequenceStartPrice) / sequenceStartPrice * 100
Then, pattern exhaustion is identified when sequences become overextended:
isExhausted = math.abs(currentSequence) >= maxSequence or
math.abs(priceExtension) > resetThreshold * math.abs(currentSequence)
Finally, the pattern strength combines sequence length, quality, and price movement with momentum enhancement:
patternStrength = currentSequence * sequenceQuality * (1 + math.abs(priceExtension) / 10)
enhancedSignal = patternStrength + momentum * 10
signal = ta.ema(enhancedSignal, smooth)
This creates a sequence-based momentum indicator that combines consecutive movement analysis with pattern sustainability assessment, providing traders with both directional signals and exhaustion insights for entry/exit timing.
🟢 Signal Interpretation
Positive Values (Above Zero): Sequential pattern strength indicating bullish momentum with consecutive upward price movements and sustained buying pressure = Long/Buy opportunities
Negative Values (Below Zero): Sequential pattern strength indicating bearish momentum with consecutive downward price movements and sustained selling pressure = Short/Sell opportunities
Zero Line Crosses: Pattern transitions between bullish and bearish regimes, indicating potential trend changes or momentum shifts when sequences break
Upper Threshold Zone: Area above maximum sequence threshold (2x maxSequence) indicating extremely strong bullish patterns approaching exhaustion levels
Lower Threshold Zone: Area below negative threshold (-2x maxSequence) indicating extremely strong bearish patterns approaching exhaustion levels
Perfect Price-Anchored % Fib Grid This indicator generates support and resistance levels anchored to a fixed price of your choice.
You can also specify a percentage for the indicator to calculate potential highs and lows.
Commonly used values are 3.5% or 7%, as well as smaller decimal versions like 0.35% or 0.7%, depending on the volatility you expect.
In addition, the indicator can highlight potential stop-run levels in multiples of 27 — ranging from 0 up to 243. This automatically places the 243 GB range directly onto your chart.
The tool is versatile and can be applied not only to equities, but also to ES futures and Forex markets.
Big Orders Detector - Whale Activity SpotterDetect Institutional & Whale Trading Activity with Volume Analysis
This indicator helps traders identify significant buy/sell orders (whale activity) by analyzing volume spikes and price movements. Perfect for spotting institutional entries and exits.
📊 Key Features:
Volume Spike Detection - Identifies when volume exceeds average by customizable multiplier
Price Movement Analysis - Tracks significant price changes with adjustable threshold
Smart Direction Detection - Distinguishes between big buy and sell orders
Visual Markers - Clear arrows, background highlights, and detailed labels
Flexible Settings - Fully customizable parameters for different trading styles
Statistics Table - Optional real-time order count tracking
Alert System - Built-in alerts for automated notifications
⚙️ How It Works:
The indicator combines volume analysis with price movement detection to identify unusual market activity. When volume significantly exceeds the moving average AND price shows meaningful movement, it marks these as potential whale orders.
🎯 Best Used For:
Crypto markets with high volume activity
Forex pairs during major news events
Stock trading around earnings/announcements
Identifying institutional accumulation/distribution
📈 Settings Guide:
Volume Multiplier (3.0) - How many times above average volume (recommended minimum: 3.0)
Volume Period (20) - Moving average period for volume
Price Threshold (1.5%) - Minimum price change requirement
Visual Options - Toggle arrows, labels, and background highlights
💡 Trading Tips:
Use on liquid markets with consistent volume
Combine with support/resistance levels
Higher timeframes show more significant orders
Adjust sensitivity based on market volatility
⚠️ Important Notes:
Not financial advice - for educational purposes only
Past performance doesn't guarantee future results
Always use proper risk management
Test parameters on your specific markets
Perfect for swing traders, day traders, and anyone looking to spot whale activity in their favorite markets!
FibNexus [CHE]FibNexus — Auto-Fibonacci with Adaptive TrendLen + TFRSI Triggers
What it is.
FibNexus is a chart overlay that auto-anchors Fibonacci levels to the most relevant swing range without any manual timeframe picking. It does this by computing an adaptive trend length (“TrendLen”) from recent price behavior, then drawing retracements/extensions from the detected swing High/Low. A built-in TFRSI module adds LONG/SHORT triggers and ready-made alerts.
What makes FibNexus different (the TrendLen edge)
Most Fibonacci tools either (a) use fixed lookbacks or (b) force you to choose a higher reference timeframe (or a multiplier of it) and then place Fibs on those higher-TF swings. Your earlier Ultimate Fibonacci Trading Tool \ follows that higher-reference approach (auto TF, multiplier, or manual) and emphasizes custom level/label options. ( )
FibNexus flips that workflow:
* It doesn’t rely on a higher timeframe or a static lookback.
* Instead, it measures multiple window lengths inside the current chart timeframe and selects the one that best fits the data right now.
* From that data-driven window, it automatically finds the most recent swing high & low and draws the entire Fib stack from there.
* When the statistically “best” window changes, anchors update once, labels refresh cleanly, and then lines just extend to the right on each new bar.
Result: No more guesswork about “which timeframe or lookback should I use?”—FibNexus adapts the anchors to market conditions and keeps the drawing noise low.
How TrendLen works (transparent, deterministic)
1. Scan windows: The script evaluates a series of lookbacks (10, 20, …, 500 bars).
2. Score by correlation: For each window, it computes the correlation between price and its lagged version and picks the window with the highest correlation (the strongest, most self-consistent trend segment).
3. Anchor the swing: On a confirmed bar and only when TrendLen changes, it scans the last `TrendLen` bars to capture the highest high and lowest low and marks them with “X”.
4. Draw once, extend later: It deletes the old Fib objects, redraws the active levels from those anchors, and from then on extends the lines to the right as new bars print (no redraw spam).
This makes FibNexus responsive (it adapts when the structure shifts) and quiet (it doesn’t constantly repaint Fibs).
Fibonacci engine (levels, labels, direction)
* Retracements: 0.000 · 0.236 · 0.382 · 0.500 · 0.618 · 0.786 · 1.000
* Extensions: 1.618 · 2.618 · 3.618 · 4.236
* Label styles: *Default* (percent + price), *None*, *Percentage*, *Price*
* Label sizing: *tiny → huge*
* Bull/Bear context: Direction is inferred from mid-range positioning; prices are projected accordingly (retracement vs. extension math is handled for both cases).
* Selective toggles: You can show/hide any level and color it independently.
Momentum & signals (TFRSI module)
FibNexus embeds your TFRSI (“The Forbidden RSI \ ”) as the momentum/trigger layer. TFRSI is your open-source oscillator published on TradingView and designed for fast, normalized momentum readouts with customizable length/smoothing. ( )
* Defaults: `TFRSI length = 6`, `signal smoothing = 2`
* Triggers:
* LONG when TFRSI crosses up through the Long level (default 2.0)
* SHORT when TFRSI crosses down through the Short level (default 98.0)
* On-chart labels: Green LONG under the bar, red SHORT above the bar.
* Spam control: Keep only the N most recent labels to avoid clutter.
* Confirmed bars only: Signals/labels finalize at bar close to reduce flicker.
Alerts (ready for TradingView)
* LONG signal (TFRSI crossover)
* SHORT signal (TFRSI crossunder)
* TrendLen changed (anchors/Fibs recalculated)
* Price crossed a Fib level (any active level)
Use the provided `alertcondition(...)` entries in the TV dialog. Optionally enable instant `alert()` calls with verbose text (avoid duplicates if you also add alertconditions).
Typical use-cases & playbook
* Level reaction trading: In trends, watch 0.382 / 0.5 / 0.618 for reaction. A TFRSI up-cross near a retracement in an uptrend is a straightforward continuation setup; the opposite applies in downtrends.
* Breakout objectives: After clearing the 1.000 line (old swing), 1.618 is a common first extension target; beyond that, 2.618/3.618/4.236 map stretch objectives.
* Chop control: In range conditions, keep signals conservative (e.g., stick with the tight defaults 2.0/98.0 or raise thresholds). Always seek confluence (candlesticks, volume, HTF bias).
* Less micromanagement: You don’t need to babysit timeframe selection or anchors—TrendLen recomputes only when the data say so.
Inputs (by group)
* Core: TFRSI length & smoothing.
* Fibonacci Levels: Per-level toggles, numeric values, colors.
* Fibonacci Labels: Style (percentage/price/both/none) and size.
* Signals: Max number of visible LONG/SHORT labels (or 0 = off).
* TFRSI Trigger: Long/Short thresholds (defaults 2.0 / 98.0).
* Alerts: Master enable, per-event toggles, optional instant `alert()`.
Performance & UX
* Overlay indicator; efficient object handling.
* Clean redraw policy: Full re-draw only when TrendLen changes; otherwise Fibs extend horizontally.
* Clarity: Auto-marked swing anchors (“X”), configurable labels/colors.
Credits & references
* TFRSI – “The Forbidden RSI \ ” (open-source publication and description on TradingView). Used here as the momentum basis.
* “Ultimate Fibonacci Trading Tool \ ” (your earlier open-source tool on TradingView). Focuses on higher-reference timeframe selection (auto/multiplier/manual) and rich labeling controls; FibNexus replaces the fixed/higher-TF anchor logic with adaptive TrendLen in the current timeframe.
Risk disclaimer
This indicator is for educational/information purposes only and is not financial advice. No performance guarantees; past behavior does not predict future results. Trading involves substantial risk (including total loss). Always do your own research, test on demo, use risk management, and consult a licensed advisor where appropriate. Use at your own risk.
Disclaimer:
The content provided, including all code and materials, is strictly for educational and informational purposes only. It is not intended as, and should not be interpreted as, financial advice, a recommendation to buy or sell any financial instrument, or an offer of any financial product or service. All strategies, tools, and examples discussed are provided for illustrative purposes to demonstrate coding techniques and the functionality of Pine Script within a trading context.
Any results from strategies or tools provided are hypothetical, and past performance is not indicative of future results. Trading and investing involve high risk, including the potential loss of principal, and may not be suitable for all individuals. Before making any trading decisions, please consult with a qualified financial professional to understand the risks involved.
By using this script, you acknowledge and agree that any trading decisions are made solely at your discretion and risk.
Enhance your trading precision and confidence with FibNexus ! 🚀
Happy trading
Chervolino
Volume Profile Multi periodVolume Profile - AOC 📈
Unlock market insights with this powerful volume profile indicator! Analyze trading activity across multiple sessions with customizable settings and clear visuals. Perfect for traders aiming to identify key price levels and market trends with precision. 🚀
Key Features:
Multi-Session Support: Visualize volume profiles for Tokyo, London, New York, Daily, Weekly, Monthly, Quarterly, and Semiannual sessions. 🌍
Customizable Display: Choose session types, resolution, and bar modes (Mode 1 or Mode 2) to match your strategy. 🎛️
Point of Control (POC): Highlights the most traded price levels for each session. 🎯
Color-Coded Profiles: Distinct up/down volume visualization for quick analysis. 📊
Session Labels: Optional labels for easy identification of session periods. 🏷️
High/Low Tracking: Tracks session-specific highs and lows for accurate profiling. 📏
Empower your trading decisions with clear, actionable volume data! 💡
Signal Strength AnalysisTraining Guide — Signal Strength Analysis
1. What this tool is
This is an all-in-one analysis dashboard that:
• Tracks market structure (order blocks, trendlines, support/resistance).
• Reads technical indicators (RSI, MACD, Bollinger Bands).
• Measures volume, volatility, momentum, and price positioning.
• Confirms buy/sell signals with multiple filters.
• Keeps performance records (win rate, PnL, signal strength).
• Presents everything in a visual table for quick decision support.
👉 It is a learning and training tool — not a broker strategy. It helps learners practice multi-factor analysis in a structured way.
________________________________________
2. Step-by-step workflow for learners
Step 1 – Market Overview
The dashboard starts with:
• Last Price → current market close.
• Daily Change % → price vs. yesterday.
• Volume Ratio → compares today’s volume to the average.
💡 Learners can check if the market is calm, trending, or under unusual activity.
________________________________________
Step 2 – Technical Indicators
• RSI (Relative Strength Index)
o 70 = Overbought, <30 = Oversold.
o A progress bar shows strength visually.
• MACD (Moving Average Convergence Divergence)
o “Bull” if histogram > 0, “Bear” if < 0.
o Helps track momentum shifts.
• Bollinger Band Position
o Where price sits between upper & lower bands.
o 80% = Overbought zone, <20% = Oversold zone.
💡 Learners use this to spot overextended moves and potential reversals.
________________________________________
Step 3 – Order Block Analysis
• Buy OB Level / Sell OB Level
o Price zones where buyers or sellers concentrated.
• OB Status
o 🟢 Buy Active → bullish setup.
o 🔴 Sell Active → bearish setup.
o ⚪ Waiting → no clear signal.
💡 Helps students understand how institutions leave “footprints” in price zones.
________________________________________
Step 4 – Volume Analysis
• Bull Volume vs. Bear Volume
o Cumulative measurement of buy vs. sell pressure.
o Progress bars show balance.
• Volume Spike
o “🔥 High” when today’s volume is unusually strong.
💡 Shows when participation supports a move (important for validation).
________________________________________
Step 5 – Signal Strength
• A score out of 100% based on:
1. RSI extremes (overbought/oversold).
2. Volume spike confirmation.
3. MACD trend confirmation.
4. Overall EMA trend alignment.
• Win Rate → % of successful signals tracked.
• Total PnL → running performance.
💡 Learners can practice weighing multiple signals instead of relying on one indicator.
________________________________________
Step 6 – Market Conditions & Risk
• Trend Check → bullish, bearish, or neutral from EMAs.
• ATR Filter → rejects signals if volatility is too low.
• Risk Management Alerts → marks TP/SL hits for both long and short trades.
💡 This trains learners to always tie signals to risk/reward management.
________________________________________
3. How it helps learners
• Structured Thinking: Instead of chasing random indicators, they get a full framework.
• Practical Filters: Combines momentum, volume, and volatility so signals are stronger.
• Visual Reinforcement: Table sections show conditions in color-coded, easy-to-read cells.
• Performance Tracking: Builds discipline by recording wins/losses, not just entries.
• Risk Awareness: Alerts teach that managing exits is as important as finding entries.
________________________________________
4. Deep dive into dashboard sections
Section What It Teaches How Learners Use It
🔍 Market Overview Price, change %, volume context Judge if market is trending or consolidating
📈 Technical Analysis RSI, MACD, BB position Identify overbought/oversold, momentum shifts
🎯 Order Block Analysis Institutional levels Practice spotting zones where smart money acts
📊 Volume Analysis Buyer vs seller activity Confirm if move is real or weak
⚡ Signal Strength Composite score + Win Rate Learn weighting multiple signals together
🎲 Market Conditions & Risk Trend + volatility + alerts Build habit of risk-managed decisions
________________________________________
5. Suggested classroom exercises
1. Trend vs. Countertrend Study
o When OB says “Buy” but RSI shows overbought, what happens?
o Learners compare outcomes.
2. Volume Confirmation
o Log trades with & without volume spikes.
o Discuss why volume validation matters.
3. Signal Strength Calibration
o Watch how strength % changes when multiple indicators align.
o Practice “confidence ranking” before entries.
4. Risk Discipline Drill
o Focus only on TP/SL hits.
o Learners note whether following system exits improved results.
________________________________________
6. Key takeaways for learners
• No single indicator works alone — this tool forces multi-factor thinking.
• Volume and volatility filters prevent false signals.
• Performance tracking builds accountability.
• Color-coded dashboards simplify complex information.
• Alerts + risk management remind that exit discipline is vital.
________________________________________
⚠️ Important disclaimer:
This script is an educational tool only. It demonstrates how traders can combine multiple analyses into one framework. It should not be used as financial advice or a live trading strategy without testing, risk controls, and professional guidance.
________________________________________
Smart Structure Breaks & Order BlocksOverview (What it does)
The indicator “Smart Structure Breaks & Order Blocks” detects market structure using swing highs and lows, identifies Break of Structure (BOS) events, and automatically draws order blocks (OBs) from the origin candle. These zones extend to the right and change color/outline when mitigated or invalidated. By formalizing and automating part of discretionary analysis, it provides consistent zone recognition.
Main Components
Swing Detection: ta.pivothigh/ta.pivotlow identify confirmed swing points.
BOS Detection: Determines if the recent swing high/low is broken by close (strict mode) or crossover.
OB Creation: After a BOS, the opposite candle (bearish for bullish BOS, bullish for bearish BOS) is used to generate an order block zone.
Zone Management: Limits the number of zones, extends them to the right, and tracks tagged (mitigated) or invalidated states.
Input Parameters
Left/Right Pivot (default 6/6): Number of bars required on each side to confirm a swing. Higher values = smoother swings.
Max Zones (default 4): Maximum zones stored per direction (bull/bear). Oldest zones are overwritten.
Zone Confirmation Lookback (default 3): Ensures OB origin candle validity by checking recent highs/lows.
Show Swing Points (default ON): Displays triangles on swing highs/lows.
Require close for BOS? (default ON): Strict BOS (close required) vs loose BOS (line crossover).
Use candle body for zones (default OFF): Zones drawn from candle body (ON) or wick (OFF).
Signal Definition & Logic
Swing Updates: Latest confirmed pivots update lastHighLevel / lastLowLevel.
BOS (Break of Structure):
Bullish – close breaks last swing high.
Bearish – close breaks last swing low.
Only one valid BOS per swing (avoids duplicates).
OB Detection:
Bullish BOS → previous bearish candle with lowest low forms the OB.
Bearish BOS → previous bullish candle with highest high forms the OB.
Zones: Bull = green, Bear = red, semi-transparent, extended to the right.
Zone States:
Mitigated: Price touches the zone → border highlighted.
Invalidated:
Bull zone → close below → turns red.
Bear zone → close above → turns green.
Chart Appearance
Swing High: red triangle above bar
Swing Low: green triangle below bar
Bull OB: green zone (border highlighted on touch)
Bear OB: red zone (border highlighted on touch)
Invalid Zones: Bull zones turn reddish, Bear zones turn greenish
Practical Use (Trading Assistance)
Trend Following Entries: Buy pullbacks into green OBs in uptrends, sell rallies into red OBs in downtrends.
Focus on First Touch: First mitigation after BOS often has higher reaction probability.
Confluence: Combine with higher timeframe trend, volume, session levels, key price levels (previous highs/lows, VWAP, etc.).
Stops/Targets:
Bull – stop below zone, partial take profit at swing high or resistance.
Bear – stop above zone, partial take profit at swing low or support.
Parameter Tuning (per market/timeframe)
Pivot (6/6 → 4/4/8/8): Lower for scalping (3–5), medium for day trading (5–8), higher for swing trading (8–14). Increase to reduce noise.
Strict Break: ON to reduce false breaks in ranging markets; OFF for earlier signals.
Body Zones: ON for assets with long wicks, OFF for cleaner OBs in liquid instruments.
Zone Confirmation (default 3): Increase for stricter OB origin, fewer zones.
Max Zones (default 4 → 6–10): Increase for higher volatility, decrease to avoid clutter.
Strengths
Standardizes BOS and OB detection that is usually subjective.
Tracks mitigation and invalidation automatically.
Adaptable: allows body/wick zone switching for different instruments.
Limitations
Pivot-based: Signals appear only after pivots confirm (slight lag).
Zones reflect past balance: Can fail after new events (news, earnings, macro data).
Range-heavy markets: More false BOS; consider stricter settings.
Backtesting: This script is for drawing/visual aid; trading rules must be defined separately.
Workflow Example
Identify higher timeframe trend (4H/Daily).
On lower TF (15–60m), wait for BOS and new OB.
Enter on first mitigation with confirmation candle.
Stop beyond zone; targets based on R multiples and swing points.
FAQ
Q: Why are zones invalidated quickly?
A: Flow reversal after BOS. Adjust pivots higher, enable Strict mode, or switch to Body zones to reduce noise.
Q: What does “tagged” mean?
A: Price touched the zone once = mitigated. Implies some orders in that zone may have been filled.
Q: Body or Wick zones?
A: Wick zones are fine in clean markets. For volatile pairs with long wicks, body zones provide more realistic areas.
Customization Tips (Code perspective)
Zone storage: Currently ring buffer ((idx+1) % zoneLimit). Could prioritize keeping unmitigated zones.
Automated testing: Add strategy.entry/exit for rule-based backtests.
Multi-timeframe: Use request.security() for higher timeframe swings/BOS.
Visualization: Add labels for BOS bars, tag zones with IDs, count touches.
Summary
This indicator formalizes the cycle Swing → BOS → OB creation → Mitigation/Invalidation, providing consistent structure analysis and zone tracking. By tuning sensitivity and strictness, and combining with higher timeframe context, it enhances pullback/continuation trading setups. Always combine with proper risk management.
Rocket/Bomb PPO + SMI (confirmed, no repaint) — 1-liner labelsName: Rocket/Bomb PPO + SMI (confirmed, non-repaint)
What it does
Combines PPO (Percentage Price Oscillator) momentum with SMI (Stochastic Momentum Index) timing.
Prints a 🚀 “Rocket” buy label when PPO crosses up its signal and SMI crosses up its signal (momentum + timing agree).
Prints a 💣 “Bomb” sell label when PPO crosses down its signal and SMI crosses down its signal.
Labels are offset by ATR so they sit neatly above/below bars.
Why it’s clean (non-repaint)
Signals are gated by bar close confirmation (barstate.isconfirmed), so labels only appear after the bar closes—no flicker or back-filling.
Optional filter
“Strict SMI zone” filter: only allow buys when SMI < –Z and sells when SMI > +Z (default Z=20). This reduces noise in choppy markets.
Customization
PPO/SMI lengths, strict zone level, emoji vs arrows, label colors, icon size, and ATR offset are all configurable.
Alerts
Built-in alert conditions for Rocket (Long) and Bomb (Short) so you can automate notifications.
How to use (at a glance)
Trade in the direction of the Rocket/Bomb labels; the strict zone option helps avoid weak signals.
Best paired with basic trend or S/R context (e.g., higher-time-frame trend filter, recent swing levels) for entries/exits.
Mean-Reversion Indicator_V2_SamleeOverview
This is the second version of my mean reversion indicator. It combines a moving average with adaptive standard deviation bands to detect when the price deviates significantly from its mean. The script provides automatic entry/exit signals, real-time PnL tracking, and shaded trade zones to make mean reversion trading more intuitive.
Core Logic
Mean benchmark: Simple Moving Average (MA).
Volatility bands: Standard deviation of the spread (close − MA) defines upper and lower bands.
Trading rules:
Price breaks below the lower band → Enter Long
Price breaks above the upper band → Enter Short
Price reverts to MA → Exit position
What’s different vs. classic Bollinger/Keltner
Bandwidth is based on the standard deviation of the price–MA spread, not raw closing prices.
Entry signals use previous-bar confirmation to reduce intrabar noise.
Exit rule is a mean-touch condition, rather than fixed profit/loss targets.
Enhanced visualization:
A shaded box dynamically shows the distance between entry and current/exit price, making it easy to see profit/loss zones over the holding period.
Instant PnL labels display current position side (Long/Short/Flat) and live profit/loss in both pips and %.
Entry and exit points are clearly marked on the chart with labels and exact prices.
These visualization tools go beyond what most indicators provide, giving traders a clearer, more practical view of trade evolution.
Key Features
Automatic detection of position status (Long / Short / Flat).
Chart labels for entries (“Entry”) and exits (“Exit”).
Real-time floating PnL calculation in both pips and %.
Info panel (top-right) showing entry price, current price, position side, and PnL.
Dynamic shading between entry and current/exit price to visualize profit/loss zones.
Usage Notes & Risk
Mean reversion may underperform in strong trending markets; parameters (len_ma, len_std, mult) should be validated per instrument and timeframe.
Works best on relatively stable, mean-reverting pairs (e.g., AUDNZD).
Risk management is essential: use independent stop-loss rules (e.g., limit risk to 1–2% of equity per trade).
This script is provided for educational purposes only and is not financial advice.
Clean Zone + SL/TP (Latest Only)📌 Description
Clean Zone + SL/TP (Latest Only) is an indicator designed to highlight the most recent supply or demand zone based on pivot highs/lows, and automatically plot entry, stop loss, and multiple take profit levels.
🔹 Automatic Direction Detection
The script can auto-detect trade direction (Long/Short) using pivot logic, or you can override manually.
🔹 Zone Drawing
Only the latest valid supply (red) or demand (green) zone is displayed.
Zones are extended to the right for a customizable number of bars.
🔹 Entry / SL / TP Levels
Entry, Stop Loss, and TP1/TP2/TP3 levels are plotted automatically.
Targets can be calculated either by zone size or by ATR-based multiples.
Risk/Reward ratios are fully adjustable.
🔹 Customizable Display
Toggle visibility for zones (box), entry/SL/TP lines, and price labels.
Labels show only on the latest bar for a clean chart look.
🎯 Use Case
This tool helps traders quickly identify the cleanest and most recent supply/demand setup and manage trades with predefined risk/reward targets. It’s especially useful for price action traders and those who prefer simple, uncluttered charts.
Martingale Strategy Simulator [BackQuant]Martingale Strategy Simulator
Purpose
This indicator lets you study how a martingale-style position sizing rule interacts with a simple long or short trading signal. It computes an equity curve from bar-to-bar returns, adapts position size after losing streaks, caps exposure at a user limit, and summarizes risk with portfolio metrics. An optional Monte Carlo module projects possible future equity paths from your realized daily returns.
What a martingale is
A martingale sizing rule increases stake after losses and resets after a win. In its classical form from gambling, you double the bet after each loss so that a single win recovers all prior losses plus one unit of profit. In markets there is no fixed “even-money” payout and returns are multiplicative, so an exact recovery guarantee does not exist. The core idea is unchanged:
Lose one leg → increase next position size
Lose again → increase again
Win → reset to the base size
The expectation of your strategy still depends on the signal’s edge. Sizing does not create positive expectancy on its own. A martingale raises variance and tail risk by concentrating more capital as a losing streak develops.
What it plots
Equity – simulated portfolio equity including compounding
Buy & Hold – equity from holding the chart symbol for context
Optional helpers – last trade outcome, current streak length, current allocation fraction
Optional diagnostics – daily portfolio return, rolling drawdown, metrics table
Optional Monte Carlo probability cone – p5, p16, p50, p84, p95 aggregate bands
Model assumptions
Bar-close execution with no slippage or commissions
Shorting allowed and frictionless
No margin interest, borrow fees, or position limits
No intrabar moves or gaps within a bar (returns are close-to-close)
Sizing applies to equity fraction only and is capped by your setting
All results are hypothetical and for education only.
How the simulator applies it
1) Directional signal
You pick a simple directional rule that produces +1 for long or −1 for short each bar. Options include 100 HMA slope, RSI above or below 50, EMA or SMA crosses, CCI and other oscillators, ATR move, BB basis, and more. The stance is evaluated bar by bar. When the stance flips, the current trade ends and the next one starts.
2) Sizing after losses and wins
Position size is a fraction of equity:
Initial allocation – the starting fraction, for example 0.15 means 15 percent of equity
Increase after loss – multiply the next allocation by your factor after a losing leg, for example 2.00 to double
Reset after win – return to the initial allocation
Max allocation cap – hard ceiling to prevent runaway growth
At a high level the size after k consecutive losses is
alloc(k) = min( cap , base × factor^k ) .
In practice the simulator changes size only when a leg ends and its PnL is known.
3) Equity update
Let r_t = close_t / close_{t-1} − 1 be the symbol’s bar return, d_{t−1} ∈ {+1, −1} the prior bar stance, and a_{t−1} the prior bar allocation fraction. The simulator compounds:
eq_t = eq_{t−1} × (1 + a_{t−1} × d_{t−1} × r_t) .
This is bar-based and avoids intrabar lookahead. Costs, slippage, and borrowing costs are not modeled.
Why traders experiment with martingale sizing
Mean-reversion contexts – if the signal often snaps back after a string of losses, adding size near the tail of a move can pull the average entry closer to the turn
Behavioral or microstructure edges – some rules have modest edge but frequent small whipsaws; size escalation may shorten time-to-recovery when the edge manifests
Exploration and stress testing – studying the relationship between streaks, caps, and drawdowns is instructive even if you do not deploy martingale sizing live
Why martingale is dangerous
Martingale concentrates capital when the strategy is performing worst. The main risks are structural, not cosmetic:
Loss streaks are inevitable – even with a 55 percent win rate you should expect multi-loss runs. The probability of at least one k-loss streak in N trades rises quickly with N.
Size explodes geometrically – with factor 2.0 and base 10 percent, the sequence is 10, 20, 40, 80, 100 (capped) after five losses. Without a strict cap, required size becomes infeasible.
No fixed payout – in gambling, one win at even odds resets PnL. In markets, there is no guaranteed bounce nor fixed profit multiple. Trends can extend and gaps can skip levels.
Correlation of losses – losses cluster in trends and in volatility bursts. A martingale tends to be largest just when volatility is highest.
Margin and liquidity constraints – leverage limits, margin calls, position limits, and widening spreads can force liquidation before a mean reversion occurs.
Fat tails and regime shifts – assumptions of independent, Gaussian returns can understate tail risk. Structural breaks can keep the signal wrong for much longer than expected.
The simulator exposes these dynamics in the equity curve, Max Drawdown, VaR and CVaR, and via Monte Carlo sketches of forward uncertainty.
Interpreting losing streaks with numbers
A rough intuition: if your per-trade win probability is p and loss probability is q=1−p , the chance of a specific run of k consecutive losses is q^k . Over many trades, the chance that at least one k-loss run occurs grows with the number of opportunities. As a sanity check:
If p=0.55 , then q=0.45 . A 6-loss run has probability q^6 ≈ 0.008 on any six-trade window. Across hundreds of trades, a 6 to 8-loss run is not rare.
If your size factor is 1.5 and your base is 10 percent, after 8 losses the requested size is 10% × 1.5^8 ≈ 25.6% . With factor 2.0 it would try to be 10% × 2^8 = 256% but your cap will stop it. The equity curve will still wear the compounded drawdown from the sequence that led to the cap.
This is why the cap setting is central. It does not remove tail risk, but it prevents the sizing rule from demanding impossible positions
Note: The p and q math is illustrative. In live data the win rate and distribution can drift over time, so real streaks can be longer or shorter than the simple q^k intuition suggests..
Using the simulator productively
Parameter studies
Start with conservative settings. Increase one element at a time and watch how the equity, Max Drawdown, and CVaR respond.
Initial allocation – lower base reduces volatility and drawdowns across the board
Increase factor – set modestly above 1.0 if you want the effect at all; doubling is aggressive
Max cap – the most important brake; many users keep it between 20 and 50 percent
Signal selection
Keep sizing fixed and rotate signals to see how streak patterns differ. Trend-following signals tend to produce long wrong-way streaks in choppy ranges. Mean-reversion signals do the opposite. Martingale sizing interacts very differently with each.
Diagnostics to watch
Use the built-in metrics to quantify risk:
Max Drawdown – worst peak-to-trough equity loss
Sharpe and Sortino – volatility and downside-adjusted return
VaR 95 percent and CVaR – tail risk measures from the realized distribution
Alpha and Beta – relationship to your chosen benchmark
If you would like to check out the original performance metrics script with multiple assets with a better explanation on all metrics please see
Monte Carlo exploration
When enabled, the forecast draws many synthetic paths from your realized daily returns:
Choose a horizon and a number of runs
Review the bands: p5 to p95 for a wide risk envelope; p16 to p84 for a narrower range; p50 as the median path
Use the table to read the expected return over the horizon and the tail outcomes
Remember it is a sketch based on your recent distribution, not a predictor
Concrete examples
Example A: Modest martingale
Base 10 percent, factor 1.25, cap 40 percent, RSI>50 signal. You will see small escalations on 2 to 4 loss runs and frequent resets. The equity curve usually remains smooth unless the signal enters a prolonged wrong-way regime. Max DD may rise moderately versus fixed sizing.
Example B: Aggressive martingale
Base 15 percent, factor 2.0, cap 60 percent, EMA cross signal. The curve can look stellar during favorable regimes, then a single extended streak pushes allocation to the cap, and a few more losses drive deep drawdown. CVaR and Max DD jump sharply. This is a textbook case of high tail risk.
Strengths
Bar-by-bar, transparent computation of equity from stance and size
Explicit handling of wins, losses, streaks, and caps
Portable signal inputs so you can A–B test ideas quickly
Risk diagnostics and forward uncertainty visualization in one place
Example, Rolling Max Drawdown
Limitations and important notes
Martingale sizing can escalate drawdowns rapidly. The cap limits position size but not the possibility of extended adverse runs.
No commissions, slippage, margin interest, borrow costs, or liquidity limits are modeled.
Signals are evaluated on closes. Real execution and fills will differ.
Monte Carlo assumes independent draws from your recent return distribution. Markets often have serial correlation, fat tails, and regime changes.
All results are hypothetical. Use this as an educational tool, not a production risk engine.
Practical tips
Prefer gentle factors such as 1.1 to 1.3. Doubling is usually excessive outside of toy examples.
Keep a strict cap. Many users cap between 20 and 40 percent of equity per leg.
Stress test with different start dates and subperiods. Long flat or trending regimes are where martingale weaknesses appear.
Compare to an anti-martingale (increase after wins, cut after losses) to understand the other side of the trade-off.
If you deploy sizing live, add external guardrails such as a daily loss cut, volatility filters, and a global max drawdown stop.
Settings recap
Backtest start date and initial capital
Initial allocation, increase-after-loss factor, max allocation cap
Signal source selector
Trading days per year and risk-free rate
Benchmark symbol for Alpha and Beta
UI toggles for equity, buy and hold, labels, metrics, PnL, and drawdown
Monte Carlo controls for enable, runs, horizon, and result table
Final thoughts
A martingale is not a free lunch. It is a way to tilt capital allocation toward losing streaks. If the signal has a real edge and mean reversion is common, careful and capped escalation can reduce time-to-recovery. If the signal lacks edge or regimes shift, the same rule can magnify losses at the worst possible moment. This simulator makes those trade-offs visible so you can calibrate parameters, understand tail risk, and decide whether the approach belongs anywhere in your research workflow.
Signal Generator: HTF EMA Momentum + MACDHTF EMA Momentum + MACD Indicator
This indicator combines higher timeframe (HTF) EMA momentum with MACD signals to identify potential trend-aligned trades. It displays an HTF histogram for momentum (green for up, red for down) and MACD lines in a subwindow, with buy/sell labels on the main chart when conditions align.
Key Components:
HTF Histogram:
Based on EMA differences from a selected higher timeframe (default H1). It reflects momentum: green if current diff > previous (with optional strict 3-bar check), red otherwise. Can ignore EMA crossover if "HTF Momentum Only" is enabled.
MACD Lines: Standard MACD (fast/slow/signal) on the current timeframe, with adjustable scaling.
Signals:
Buy: HTF uptrend + MACD cross up below -Zero Band + min gap filter.
Sell: HTF downtrend + MACD cross down above +Zero Band + min gap filter.
Labels appear 1.5 ATR (adjustable) from the candle, sized large for visibility.
Filters: Zero Band avoids near-zero crosses; Min MACD Gap ensures separation.
Extras: Toggleable zero levels, alerts, and full customization of periods, colors, and scales.
Usage Tips:
Apply to any timeframe; set HTF for broader context (e.g., H4 for intraday). Use signals as entry cues with additional confirmation like support/resistance. Backtest thoroughly—risk management is essential.
RS Alpha by The Noiseless TraderRS Alpha by The Noiseless Trader plots a clean, benchmark‑relative strength line for any symbol and (optionally) a mean line to assess trend and momentum in relative performance. It’s designed for uncluttered, professional RS analysis and works across any timeframe.
Compare any symbol vs a benchmark (default: NSE:NIFTY).
Optional log‑normalized RS for return‑aware comparisons.
Optional RS Mean with trend coloring (rising/falling).
Optional RS Trend zero‑line coloring based on short‑range slope.
Lightweight alerts for rising/falling RS mean.
Tip: Use RS to identify leaders (RS > 0 with rising mean) and laggards (RS < 0 with falling mean), then align setups with your price action rules.
Reading the indicator
Leadership: RS > 0 and RS Mean rising → outperformance vs benchmark.
Weakness: RS < 0 and RS Mean falling → underperformance vs benchmark.
Inflections: Watch RS crossing above/below its Mean for early shifts.
Zero‑line context: With RS Trend on, the zero line subtly reflects short‑term slope (green for positive, maroon for negative).
Alerts
Rising Strength – RS Mean turning/remaining upward.
Declining Strength – RS Mean turning/remaining downward.
(Use these as context; execute entries on your price‑action rules.)
Best practices
Pair RS with your trend/structure rules (e.g., higher highs + RS leadership).
For sectors/baskets, keep the Comparative Symbol consistent to rank peers.
Log‑normalized RS helps when comparing assets with very different volatilities or large base effects.
Test multiple length and Mean settings; 60 is a balanced default for swing/positional work.
Credits
Original concept & code: © bharatTrader
Modifications & refinements: The Noiseless Trader
ORB with Fib Levels - TradingbrockOpening Range (OR) Indicator Overview
This TradingView indicator analyzes and displays the Opening Range - a popular day trading concept that tracks price movement during the first 30-60 minutes of the trading session.
Core Functionality:
Opening Range Detection: By default, it monitors the 9:30-10:00 AM ET period and tracks the highest high and lowest low during this time frame, creating upper and lower boundaries.
Fibonacci Retracement Levels: Inside the opening range, it displays five key Fibonacci levels:
0.236 (23.6% - shallow retracement)
0.382 (38.2% - standard retracement)
0.500 (50% - halfway point)
0.618 (61.8% - golden ratio)
0.786 (78.6% - deep retracement)
Extension Levels: The indicator projects additional levels beyond the opening range:
1x extension above/below the range
2x extension levels that only appear when price breaks the first extension
Trading Applications:
Support & Resistance: The opening range high/low often act as key levels throughout the trading day
Breakout Trading: Many traders watch for price to break above or below the opening range
Mean Reversion: The Fibonacci levels within the range can serve as potential reversal points
Risk Management: Helps define clear levels for stop losses and profit targets
The indicator essentially gives traders a framework to understand how price is behaving relative to the early session's established range, which often sets the tone for the entire trading day.
Trend Score with Dynamic Stop Loss RTH
📘 Trend Score with Dynamic Stop Loss (RTH) — Guide
🔎 Overview
This indicator tracks intraday momentum during Regular Trading Hours and flags trend flips using a cumulative TrendScore. It also draws dynamic stop-loss levels and shows a live stats table for quick decision-making and journaling.
⸻
⚙️ Core Concepts
1) TrendScore (per bar)
• +1 if the current bar makes a higher high than the previous bar (counted once per bar).
• –1 if the current bar makes a lower low than the previous bar (counted once per bar).
• If a bar takes both the prior high and low, the net contribution can cancel out within that bar.
2) Cumulative TrendScore (running total)
• The per-bar TrendScore accumulates across the session to form the cumulative TrendScore (TS).
• TS resets to 0 at session open and is cleared at session close.
• Rising TS = persistent upside pressure; falling TS = persistent downside pressure.
⸻
🔄 Flip Rules (3-point reversal of the cumulative TrendScore)
A flip occurs when the cumulative TrendScore reverses by 3 points in the opposite direction of the current trend.
• Bullish Flip
• Trigger: After a decline, the cumulative TrendScore rises by +3 from its down-leg.
• Interpretation: Bulls have taken control.
• Stop-loss: the lowest price of the prior (down) leg.
• Bearish Flip
• Trigger: After a rise, the cumulative TrendScore falls by –3 from its up-leg.
• Interpretation: Bears have taken control.
• Stop-loss: the highest price of the prior (up) leg.
Flip bars are marked with ▲ (lime) for bullish and ▼ (red) for bearish.
Note: If you prefer a different reversal distance, adjust the flip distance setting in the script’s inputs (default is 3).
⸻
📏 Stop-Loss Lines
• A dotted line is drawn at the prior leg’s extreme:
Green (below price) after a bullish flip.
Red (above price) after a bearish flip.
• Options:
Remove on touch for a clean chart.
Freeze on touch to keep a visual record for journaling.
• All stop lines are cleared at session end.
⸻
🧮 Stats Table (what you see)
• Trend: Bull / Bear / Neutral
• Bars in Trend: Count since the flip bar
• Since Flip: Current close minus flip bar close
• Since SL: Current close minus active stop level
• MFE-Maximum Favorable Excursion: Highest favorable move since flip
• MAE-Maximum Adverse Excursion: Largest adverse move since flip
Table colors reflect the current trend (green for bull, red for bear).
⸻
📊 Trading Playbook
Entries
• Aggressive: Enter immediately on a flip marker.
• Conservative: Wait for a small pullback that doesn’t violate the stop.
Stops
• Place the stop at the script’s flip stop-loss line (the prior leg extreme).
Exits
Choose one style and stick with it:
• Stop-only: Exit when the stop is hit.
• Time-based: Flatten at session close.
• Targets: Scale/close at 1R, 2R.
• Trailing: Trail behind minor swings once MFE > 1R.
Ultimately Exit choice is your own edge, so you must decide for yourself.
💡 Best Practices
• Skip the first few bars after the open (gap noise).
• Use regular candles (Heikin-Ashi will distort highs/lows).
• If you want fewer flips, increase the flip distance (e.g., 4 or 5). For more
responsiveness, use 2. Otherwise, increase your time frame to 5m, 10m, 15m.
• Keep SL lines frozen (not auto-removed) if you’re journaling.
Rolling Midpoints of Price vs 50% FibThis script overlays two complementary midpoint lines on your chart to reveal evolving bias, structural imbalances, and zones of mean reversion:
🔸 The Price Midpoint tracks a dynamic center based on the raw price range over a user-defined lookback.
🔸 The Fib Midpoint is calculated from the most recent confirmed swing high and low, forming a live 50% Fibonacci retracement — then smoothed for trend stability.
📘 What Is Mean Reversion, and Why Midpoints Matter?
Markets often oscillate between periods of trend and consolidation. Mean reversion refers to the tendency of price to return to a “fair value” after stretching too far in one direction. The Price Midpoint captures this range-based balance, while the Fib Midpoint anchors to structural swing levels. When price strays far from both, it may be overextended — setting the stage for pullbacks or reversion. When price hovers between or tests both midlines, it reflects balance or indecision. EquiZone helps visualize this dynamic, offering traders real-time insight into whether price is moving with strength, fading, or snapping back to equilibrium.
🔍 Concept Breakdown
➖Price Midpoint – A rolling midpoint between the highest high and lowest low over a user-defined lookback. Think of it as a range-weighted equilibrium.
➖Fib Midpoint – A dynamic 50% Fibonacci retracement between the most recent confirmed swing high and swing low (based on pivot logic), smoothed over time for stability.
➖Color-coded Fills & Bar Colors – Highlight confluence and divergence between the two midpoints, offering intuitive visual cues on trend alignment or structural disagreement.
🎯 Why It’s Useful
➖Spot consolidation zones and structural inflection points
➖Detect hidden divergence between price action and swing structure
➖Use midpoint alignment as a trend confirmation filter
➖Identify mean reversion setups when price strays too far from both midlines
➖Visualize market equilibrium across two complementary perspectives
⚙️ Customizable Features
➖Independent lookbacks for both midpoints
➖Toggle fill shading and adjust color schemes
➖Choose from multiple bar color modes (Close, HL2, OHLC3, OHLC4)
➖Control pivot sensitivity via left/right bar windows
➖Select pivot source: high, low, or close
🧠 How to Use
➖When Price Mid > Fib Mid, momentum may be outrunning structure → bullish extension
➖When Fib Mid > Price Mid, structure leads but price lags → bearish potential or fading momentum
➖When the two lines converge, it signals a zone of balance or potential breakout setup
➖Use bar colors to confirm whether price is leading or following structure
🔧 This isn’t just a visual overlay — it’s a structure-aware bias engine.
Best For:
📈 Trend-followers seeking confirmation between price action and structure
🔄 Reversal traders watching for midpoint divergence
📊 Range traders identifying dynamic fair-value zones
🔍 Price-action analysts who want a clean, non-lagging context layer
➡️ Built for clarity and speed, EquiZone adds zero clutter and works seamlessly across all timeframes and asset types. It pairs especially well with support/resistance zones, trendlines, Fibonacci ladders, and price action patterns.
📌 Final Note:
While Rolling Midpoints provides insight into market balance and directional bias, no single indicator should be traded in isolation. For best results, combine it with contextual tools such as trend structure, volume analysis, higher-timeframe mapping, and clear entry/exit frameworks. Use this as a bias confirmation tool, not a trigger by itself.