Time-Decaying Percentile Oscillator [BackQuant]Time-Decaying Percentile Oscillator
1. Big-picture idea
Traditional percentile or stochastic oscillators treat every bar in the look-back window as equally important. That is fine when markets are slow, but if volatility regime changes quickly yesterday’s print should matter more than last month’s. The Time-Decaying Percentile Oscillator attempts to fix that blind spot by assigning an adjustable weight to every past price before it is ranked. The result is a percentile score that “breathes” with market tempo much faster to flag new extremes yet still smooth enough to ignore random noise.
2. What the script actually does
Build a weight curve
• You pick a look-back length (default 28 bars).
• You decide whether weights fall Linearly , Exponentially , by Power-law or Logarithmically .
• A decay factor (lower = faster fade) shapes how quickly the oldest price loses influence.
• The array is normalised so all weights still sum to 1.
Rank prices by weighted mass
• Every close in the window is paired with its weight.
• The pairs are sorted from low to high.
• The cumulative weight is walked until it equals your chosen percentile level (default 50 = median).
• That price becomes the Time-Decayed Percentile .
Find dispersion with robust statistics
• Instead of a fragile standard deviation the script measures weighted Median-Absolute-Deviation about the new percentile.
• You multiply that deviation by the Deviation Multiplier slider (default 1.0) to get a non-parametric volatility band.
Build an adaptive channel
• Upper band = percentile + (multiplier × deviation)
• Lower band = percentile – (multiplier × deviation)
Normalise into a 0-100 oscillator
• The current close is mapped inside that band:
0 = lower band, 50 = centre, 100 = upper band.
• If the channel squeezes, tiny moves still travel the full scale; if volatility explodes, it automatically widens.
Optional smoothing
• A second-stage moving average (EMA, SMA, DEMA, TEMA, etc.) tames the jitter.
• Length 22 EMA by default—change it to tune reaction speed.
Threshold logic
• Upper Threshold 70 and Lower Threshold 30 separate standard overbought/oversold states.
• Extreme bands 85 and 15 paint background heat when aggressive fade or breakout trades might trigger.
Divergence engine
• Looks back twenty bars.
• Flags Bullish divergence when price makes a lower low but oscillator refuses to confirm (value < 40).
• Flags Bearish divergence when price prints a higher high but oscillator stalls (value > 60).
3. Component walk-through
• Source – Any price series. Close by default, switch to typical price or custom OHLC4 for futures spreads.
• Look-back Period – How many bars to rank. Short = faster, long = slower.
• Base Percentile Level – 50 shows relative position around the median; set to 25 / 75 for quartile tracking or 90 / 10 for extreme tails.
• Deviation Multiplier – Higher values widen the dynamic channel, lowering whipsaw but delaying signals.
• Decay Settings
– Type decides the curve shape. Exponential (default 1.16) mimics EMA logic.
– Factor < 1 shrinks influence faster; > 1 spreads influence flatter.
– Toggle Enable Time Decay off to compare with classic equal-weight stochastic.
• Smoothing Block – Choose one of seven MA flavours plus length.
• Thresholds – Overbought / Oversold / Extreme levels. Push them out when working on very mean-reverting assets like FX; pull them in for trend monsters like crypto.
• Display toggles – Show or hide threshold lines, extreme filler zones, bar colouring, divergence labels.
• Colours – Bullish green, bearish red, neutral grey. Every gradient step is automatically blended to generate a heat map across the 0-100 range.
4. How to read the chart
• Oscillator creeping above 70 = market auctioning near the top of its adaptive range.
• Fast poke above 85 with no follow-through = exhaustion fade candidate.
• Slow grind that lives above 70 for many bars = valid bullish trend, not a fade.
• Cross back through 50 shows balance has shifted; treat it like a micro trend change.
• Divergence arrows add extra confidence when you already see two-bar reversal candles at range extremes.
• Background shading (semi-transparent red / green) warns of extreme states and throttles your position size.
5. Practical trading playbook
Mean-reversion scalps
1. Wait for oscillator to reach your desired OB/ OS levels
2. Check the slope of the smoothing MA—if it is flattening the squeeze is mature.
3. Look for a one- or two-bar reversal pattern.
4. Enter against the move; first target = midline 50, second target = opposite threshold.
5. Stop loss just beyond the extreme band.
Trend continuation pullbacks
1. Identify a clean directional trend on the price chart.
2. During the trend, TDP will oscillate between midline and extreme of that side.
3. Buy dips when oscillator hits OS levels, and the same for OB levels & shorting
4. Exit when oscillator re-tags the same-side extreme or prints divergence.
Volatility regime filter
• Use the Enable Time Decay switch as a regime test.
• If equal-weight oscillator and decayed oscillator diverge widely, market is entering a new volatility regime—tighten stops and trade smaller.
Divergence confirmation for other indicators
• Pair TDP divergence arrows with MACD histogram or RSI to filter false positives.
• The weighted nature means TDP often spots divergence a bar or two earlier than standard RSI.
Swing breakout strategy
1. During consolidation, band width compresses and oscillator oscillates around 50.
2. Watch for sudden expansion where oscillator blasts through extreme bands and stays pinned.
3. Enter with momentum in breakout direction; trail stop behind upper or lower band as it re-expands.
6. Customising decay mathematics
Linear – Each older bar loses the same fixed amount of influence. Intuitive and stable; good for slow swing charts.
Exponential – Influence halves every “decay factor” steps. Mirrors EMA thinking and is fastest to react.
Power-law – Mid-history bars keep more authority than exponential but oldest data still fades. Handy for commodities where seasonality matters.
Logarithmic – The gentlest curve; weight drops sharply at first then levels off. Mimics how traders remember dramatic moves for weeks but forget ordinary noise quickly.
Turn decay off to verify the tool’s added value; most users never switch back.
7. Alert catalogue
• TD Overbought / TD Oversold – Cross of regular thresholds.
• TD Extreme OB / OS – Breach of danger zones.
• TD Bullish / Bearish Divergence – High-probability reversal watch.
• TD Midline Cross – Momentum shift that often precedes a window where trend-following systems perform.
8. Visual hygiene tips
• If you already plot price on a dark background pick Bullish Color and Bearish Color default; change to pastel tones for light themes.
• Hide threshold lines after you memorise the zones to declutter scalping layouts.
• Overlay mode set to false so the oscillator lives in its own panel; keep height about 30 % of screen for best resolution.
9. Final notes
Time-Decaying Percentile Oscillator marries robust statistical ranking, adaptive dispersion and decay-aware weighting into a simple oscillator. It respects both recent order-flow shocks and historical context, offers granular control over responsiveness and ships with divergence and alert plumbing out of the box. Bolt it onto your price action framework, trend-following system or volatility mean-reversion playbook and see how much sooner it recognises genuine extremes compared to legacy oscillators.
Backtest thoroughly, experiment with decay curves on each asset class and remember: in trading, timing beats timidity but patience beats impulse. May this tool help you find that edge.
Medias móviles
Candle Channel█ OVERVIEW
The "Candle Channel" indicator is a versatile technical analysis tool that plots a price channel based on the Simple Moving Average (SMA) of candlestick midpoints. The channel bands, calculated based on candlestick volatility, form dynamic support and resistance levels that adapt to price movements. The script generates signals for reversals from the bands and SMA breakouts, making it useful for both short-term and long-term traders. By adjusting the SMA length, the channel can vary in nature—from a wide channel encapsulating price movement to narrower support/resistance or trend-following bands. The channel width can be further customized using a scaling parameter, allowing adaptation to different trading styles and markets.
█ MECHANISM
Band Calculation
The indicator is based on the following calculations:
Candlestick Midpoint: Calculated as the arithmetic average of the candle’s high and low prices: (high + low) / 2.
Simple Moving Average (SMA): The average of candlestick midpoints over a specified length (default: 20 candles), forming the channel’s centerline.
Average Candle Height: Calculated as the average difference between the high and low prices (high - low) over the same SMA length, serving as a measure of market volatility.
Band Scaling: The user specifies a percentage of the average candle height (default: 200%), which is multiplied by the average height to create an offset. The upper band is SMA + offset, and the lower band is SMA - offset.Example: For an average candle height of 10 points and 200% scaling, the offset is 20 points, meaning the bands are ±20 points from the SMA.
Channel Characteristics: The SMA length determines the channel’s dynamics. Shorter SMA values (10–30) create a wide channel that contains price movement, ideal for scalping or short-term trading. Longer SMA values (above 30, e.g., 50–100) transform the channel into narrower support/resistance or trend-following bands, suitable for longer-term analysis. Band scaling further adjusts the channel width to match market volatility.
Signals
Reversal from Bands: Signals are generated when the price closes outside the band (above the upper or below the lower) and then returns to the channel, indicating a potential trend reversal.
SMA Breakout: Signals are generated when the price crosses the SMA upward (bullish signal) or downward (bearish signal), suggesting potential trend changes.
Visualization
Centerline: The SMA of candlestick midpoints, displayed as a thin line.
Channel Bands: Upper and lower channel boundaries, with customizable colors.
Fill: Options include a gradient (smooth color transition between bands) or solid color. The fill can also be disabled for greater clarity.
█ FEATURES AND SETTINGS
SMA Length: Determines the moving average period (default: 20). Values of 10–30 are suitable for a wide channel containing price movement, ideal for short-term timeframes. Longer values (e.g., 50–100) create narrower support/resistance or trend-following bands, better suited for higher timeframes.
Band Scaling: Percentage of the average candle height (default: 200%). Adjusts the channel width to match market volatility—smaller values (e.g., 50–100%) for narrower bands, larger values (e.g., 200–300%) for wider channels.
Fill Type: Gradient, solid, or no fill, allowing customization to user preferences.
Colors: Options to change the colors of bands, fill, and signals for better readability.
Signals: Options to enable/disable reversal signals from bands and SMA breakout signals.
█ HOW TO USE
Add the script to your chart in TradingView by clicking "Add to Chart" in the Pine Editor.
Adjust input parameters in the script settings:
SMA Length: Set to 10–30 for a wide channel containing price movement, suitable for scalping or short-term trading. Set above 30 (e.g., 50–100) for narrower support/resistance or trend-following bands.
Band Scaling: Adjust the channel width to market volatility. Smaller values (50–100%) for tighter support/resistance bands, larger values (200–300%) for wider channels containing price movement.
Fill Type and Colors: Choose a gradient for aesthetics or a solid fill for clarity.
Analyze signals:
Reversal Signals: Triangles above (bearish) or below (bullish) candles indicate potential reversal points.
SMA Breakout Signals: Circles above (bearish) or below (bullish) candles indicate trend changes.
Test the indicator on different instruments and timeframes to find optimal settings for your trading style.
█ LIMITATIONS
The indicator may generate false signals in highly volatile or consolidating markets.
On low-liquidity charts (e.g., exotic currency pairs), the bands may be less reliable.
Effectiveness depends on properly matching parameters to the market and timeframe.
SMA 12+48The indicator checks the price entry into the 0.618-0.786 zone to the Fibonacci lines and gives a buy signal at the exit
SMA 12+48The indicator checks the price entry into the 0.618-0.786 zone to the Fibonacci lines and gives a buy signal at the exit
Blended EMA (50 & 100)Plots EMA 50, EMA 100, and a blended EMA (average of the two)
Option to hide/show the original EMAs
Clean and lightweight — great for trend filtering on 1hr/4hr
Blended EMA (9 & 20)Shows EMA 9, EMA 20, and their blended average
Toggle to hide/show the original EMAs
Clean, easy to read — ideal for entry setups on lower timeframes
Leola Lens SignalPro📌 Leola Lens SignalPro — Structure-Aware Momentum Overlay (Invite-Only)
This script is designed for traders who prioritize clear structure, liquidity trap zones, and momentum transitions. It provides adaptive visual overlays that align with key decision points — emphasizing structure over lagging indicators.
________________________________________
⚙️ Core Operating Modes
✅ Momentum Shift Mode (Always Active)
Tracks microstructure shifts using volatility compression, imbalance reactions, and adaptive logic for directional bias.
⚡ Scalper Mode (Optional)
Activates fast-response overlays for 1m–15m charts — tuned for crypto, indices, and intraday setups.
🛡 Safeguard Mode (Optional)
Applies volume and exhaustion filters for higher timeframe or conservative entries, ideal for swing traders.
________________________________________
📦 Liquidity Control Box (LCB) Logic
🔵 Blue Box = Bullish Control
• Break above → continuation likely
• Break below → caution for reversal
🟧 Orange Box = Bearish Control
• Break below → continuation likely
• Break above → caution for squeeze
Use the last visible box for bias.
Box edges = confluence zones.
Box overlaps = consolidation → avoid impulsive trades.
________________________________________
🧠 Signal Logic & Concept
Built using a custom structural engine, not derived from public scripts like RSI, MACD, or WaveTrend.
The overlays aim to capture price behavior often aligned with institutional concepts, such as:
• Order Blocks
• Liquidity Sweeps
• Trap Reversals
• Mitigation Moves
Pairs well with SMC-style analysis and order-flow-based trading.
________________________________________
🟡 Visual Signal Layers
• BUY / SELL Labels → Appear near structure flips and trap zones
• Yellow Label → High-risk trend shift zone
• LCB Boxes → Real-time market control zones
• Green/Red Liquidity Zones → Absorption or rejection
• MA Overlays → Adaptive slope-based guidance (optional)
• Pink Lines → High-reactivity reversal zones
• Yellow Line → Soft S/R (psychological pivot)
________________________________________
🎯 Suggested Entry & Exit Cues (Educational Use Only)
✅ Entry
• BUY near Blue LCB + liquidity reaction
• SELL after extended rallies into Orange LCB + trap behavior
• ⚠ Avoid trades directly at Yellow Labels unless other context supports
✅ Exit
• On opposite label after structure break
• On formation of opposite LCB
• Near major liquidity zones or pink levels
🧪 Always backtest label behavior to fit your strategy before use.
________________________________________
🔍 Originality Justification
This script introduces a non-indicator-based approach to structure detection — combining real-time volatility response, adaptive liquidity logic, and multi-mode filtering. It avoids conventional oscillators in favor of clarity-driven visual overlays, offering a novel experience especially useful to discretionary traders.
________________________________________
⚠️ Disclaimer
This script is for educational and informational purposes only. It does not constitute financial advice or a trading signal. Always validate performance with backtesting and forward testing before live use.
________________________________________
Multi Layer EMA Cross ADX Signals #wallstreetdeerMulti-layered Analysis: The strategy uses a combination of indicators to confirm trends and filter out market noise, pinpointing high-probability entries. It includes logic to adapt to different market regimes, ensuring relevance across varying market conditions.
Highly customizable indicator settings help you to increase signal success rate for your favorite instrument.
Bollinger Bands + LWMA + EMA ComboThe BBMA strategy from Omaly Ally, this contains all the MA 5/ 10 high and MA 5/ 10 low, it also has EMA 50, 100 and 200
BTC 5M Scalper: 3EMA Reversal v1.6 Lite by AIOBest Timeframe: 5 minutes!!
Optimal Asset: BTC/USDT (Bitcoin)
Stop Placement: Below the signal candle's low (for long) / Above the signal candle's high (for short)
Risk/Reward: Minimum 1:2 ratio recommended
Description:
This 3EMA Reversal strategy identifies trend continuation signals using:
Fast EMA (20) and Slow EMA (50) crossover
Volume confirmation (above 20-period average)
Engulfing candle pattern
Built-in stop loss and take profit levels
Usage Instructions:
Apply to BTC/USDT 5-minute chart
Enter long when green triangle appears (stop below signal candle)
Enter short when red triangle appears (stop above signal candle)
TP levels are automatically calculated based on your RR setting
Pro Tip: Combine with 1-hour trend analysis for better results. The strategy works best in trending markets with above-average volume.
TOMOs EMA (9, 20, 200) & VWAPThis indicator includes the 9, 20, 200 EMAs and VWAP all in one chart. best to be used on 1m, 5m, 1D timelines.
Custom Multi-MA Overlay (10 MAs with Width & TF)Updated Multi MA Indicator. Customizable in every way from line type width and color, to MA type length and TF.
RSI de LoquyIndicator Description: RSI de Loquy
This custom indicator blends the power of the Relative Strength Index (RSI) with the Hull Moving Average (HMA), enhanced by a linear regression to reveal underlying momentum trends.
How It Works:
The RSI is calculated not on price directly, but on the HMA, offering a smoother and more responsive signal.
The RSI is remapped to a -100 to +100 scale for more intuitive reading:
+100 = extreme oversold
-100 = extreme overbought
A linear regression line is plotted over the rescaled RSI to highlight trend direction and strength.
Usage Tips:
Reversed overbought/oversold levels:
Above +70 = potential oversold condition
Below -70 = potential overbought condition
The white regression line helps confirm trend shifts or momentum continuation.
⚙️ Customizable Inputs:
HMA period
RSI length
Regression length
MA Cross 7-21MA Crossover
Definition
This indicator calculates and plots two moving averages, the MA7 and MA21, and highlights candlesticks where they cross. It indicates when a trend is changing, becoming weaker or stronger, in the short term.
Summary
The Moving Average Crossover indicator sounds simple enough. It measures two moving averages and detects when they cross. The two moving averages measured are the MA7 and MA21. A crossover indicates that the MA7 is now above the MA21, and vice versa. This indicator can be used in conjunction with other moving averages or trend-following indicators to better understand momentum.
swing_funThis is a very simple swing trading entry point indicator, design to be used on the indexes with the 4hr chart. It gives alerts whenever a long or short signal is found.
Perfect Order Setup Signals ✅ Pullback = Setup
✅ Perfect order = Filter
✅ Candle closing back through 20 EMA = Trigger
- Use on any timeframes day or swing positions, Add other confirmations to your analysis before you enter a trade, don't go based just off the long & short signals.
- Now go make some bread any pair $$
Perfect Order Swing Signals✅ Pullback = Setup
✅ Perfect order = Filter
✅ Candle closing back through 20 EMA = Trigger
- Add other confirmations to your analysis before you enter a trade, dont go based just off the long & short signals.
- Now go make some bread $$
EMA 10/20 Crossover BackgroundThis script works best on a weekly chart and it taints the background green if the EMA-10 is larger than EMA-20 (EMA lengths can be configured) and red otherwise. I use this script to immediately determine if a market is trending upwards or downwards.
Зміщена MA з урахуванням волатильності (ATR) Long,ShortThis indicator displays a moving average (MA) line adjusted with volatility (ATR) to define dynamic long and short entry zones.
Custom Multi-MA OverlaySuper simple way to add multiple Moving Averages into your chart using one indicator. Fully customizable from the type of moving average used, length of moving average, coloring, line type, and gives you the ability to quickly toggle each moving average on and off.
Buy and Sell Signals by Raja Saien📈 Buy and Sell Signals by Raja Saien 💹
"Simple. Clean. Powerful."
🔥 This indicator is built for those who believe in price action and clarity. No confusion, no clutter — just pure EMA crossover logic to catch early trends and filter false moves.
✅ Buy Signal when the 9 EMA crosses above the 21 EMA — indicating momentum shift to the upside.
❌ Sell Signal when the 9 EMA crosses below the 21 EMA — signaling potential downside momentum.
🧠 Designed for traders who trust the trend, respect momentum, and want to stay ahead of the crowd.
🔍 Perfect for scalping, intraday, and swing trading. Combine it with support/resistance or price action zones for even more 🔥 accuracy.
✨ Created by Raja Saien — for serious traders only.
💪 "Indicators don’t make you money, but discipline with clarity does."
Price Range Tracker by smaPrice Range Tracker by sma helps traders quickly visualize the current price’s position within a custom price range.
It calculates and displays the highest, lowest, and average price levels over a user-defined period (default: 50 bars).
What it does:
Draws dynamic horizontal lines for the maximum, average, and minimum price levels within the chosen period.
Shows labels next to each level, indicating how far they are from the current price in percentage terms.
Helps traders spot overbought/oversold conditions and potential range breakouts.
How to use:
Adjust the period to fit your timeframe and asset volatility.
Use the percentage distances to assess potential upside/downside from the current price.
Combine with your existing trend or reversal strategies for clearer decisions.
Colors and label distance can be customized to match your chart style.