Machine Learning Key Levels [AlgoAlpha]🟠 OVERVIEW
This script plots Machine Learning Key Levels on your chart by detecting historical pivot points and grouping them using agglomerative clustering to highlight price levels with the most past reactions. It combines a pivot detection, hierarchical clustering logic, and an optional silhouette method to automatically select the optimal number of key levels, giving you an adaptive way to visualize price zones where activity concentrated over time.
🟠 CONCEPTS
Agglomerative clustering is a bottom-up method that starts by treating each pivot as its own cluster, then repeatedly merges the two closest clusters based on the average distance between their members until only the desired number of clusters remain. This process creates a hierarchy of groupings that can flexibly describe patterns in how price reacts around certain levels. This offers an advantage over K-means clustering, since the number of clusters does not need to be predefined. In this script, it uses an average linkage approach, where distance between clusters is computed as the average pairwise distance of all contained points.
The script finds pivot highs and lows over a set lookback period and saves them in a buffer controlled by the Pivot Memory setting. When there are at least two pivots, it groups them using agglomerative clustering: it starts with each pivot as its own group and keeps merging the closest pairs based on their average distance until the desired number of clusters is left. This number can be fixed or chosen automatically with the silhouette method, which checks how well each point fits in its cluster compared to others (higher scores mean cleaner separation). Once clustering finishes, the script takes the average price of each cluster to create key levels, sorts them, and draws horizontal lines with labels and colors showing their strength. A metrics table can also display details about the clusters to help you understand how the levels were calculated.
🟠 FEATURES
Agglomerative clustering engine with average linkage to merge pivots into level groups.
Dynamic lines showing each cluster’s price level for clarity.
Labels indicating level strength either as percent of all pivots or raw counts.
A metrics table displaying pivot count, cluster count, silhouette score, and cluster size data.
Optional silhouette-based auto-selection of cluster count to adaptively find the best fit.
🟠 USAGE
Add the indicator to any chart. Choose how far back to detect pivots using Pivot Length and set Pivot Memory to control how many are kept for clustering (more pivots give smoother levels but can slow performance). If you want the script to pick the number of levels automatically, enable Auto No. Levels ; otherwise, set Number of Levels . The colored horizontal lines represent the calculated key levels, and circles show where pivots occurred colored by which cluster they belong to. The labels beside each level indicate its strength, so you can see which levels are supported by more pivots. If Show Metrics Table is enabled, you will see statistics about the clustering in the corner you selected. Use this tool to spot areas where price often reacts and to plan entries or exits around levels that have been significant over time. Adjust settings to better match volatility and history depth of your instrument.
Volatility
Faytterro Bands Breakout📌 Faytterro Bands Breakout 📌
This indicator was created as a strategy showcase for another script: Faytterro Bands
It’s meant to demonstrate a simple breakout strategy based on Faytterro Bands logic and includes performance tracking.
❓ What Is It?
This script is a visual breakout strategy based on a custom moving average and dynamic deviation bands, similar in concept to Bollinger Bands but with unique smoothing (centered regression) and performance features.
🔍 What Does It Do?
Detects breakouts above or below the Faytterro Band.
Plots visual trade entries and exits.
Labels each trade with percentage return.
Draws profit/loss lines for every trade.
Shows cumulative performance (compounded return).
Displays key metrics in the top-right corner:
Total Return
Win Rate
Total Trades
Number of Wins / Losses
🛠 How Does It Work?
Bullish Breakout: When price crosses above the upper band and stays above the midline.
Bearish Breakout: When price crosses below the lower band and stays below the midline.
Each trade is held until breakout invalidation, not a fixed TP/SL.
Trades are compounded, i.e., profits stack up realistically over time.
📈 Best Use Cases:
For traders who want to experiment with breakout strategies.
For visual learners who want to study past breakouts with performance metrics.
As a template to develop your own logic on top of Faytterro Bands.
⚠ Notes:
This is a strategy-like visual indicator, not an automated backtest.
It doesn't use strategy.* commands, so you can still use alerts and visuals.
You can tweak the logic to create your own backtest-ready strategy.
Unlike the original Faytterro Bands, this script does not repaint and is fully stable on closed candles.
Adiyogi Trend🟢🔴 “Adiyogi” Trend — Market Alignment Visualizer
“Adiyogi” Trend is a powerful, non-intrusive trend detection system built for traders who seek clarity, discipline, and alignment with true market flow. Inspired by the meditative stillness of Adiyogi and the need for mindful, high-probability decisions, this tool offers a clean and intuitive visual guide to trending environments — without cluttering the chart or pushing forced trades.
This is not a buy/sell signal generator. Instead, it is designed as a background confirmation engine that helps you stay on the right side of the market by identifying moments of true directional strength.
🧠 Core Logic
The “Adiyogi” Trend indicator highlights the background of your chart in green or red when multiple layers of strength and structure align — including momentum, market positioning, and relative force. Only when these internal components agree does the system activate a directional state.
It’s built on three foundational energies of trend confirmation:
Strength of movement
Structure in price action
Conviction in momentum
By combining these into one visual background, the indicator filters out indecision and helps you stay focused during real trend phases — whether you're day trading, swing trading, or holding longer-term positions.
📌 Core Concepts Behind the Tool
The indicator integrates three essential market filters—each confirming a different dimension of trend strength:
ADX (Average Directional Index) – Measures trend momentum.
You’ve chosen a very responsive setting (ADX Length = 2), which helps catch the earliest possible signs of momentum emergence.
The threshold is ADX ≥ 22, ensuring that weak or sideways markets are filtered out.
SuperTrend (10,1) – Captures short-term trend direction.
This setup follows price closely and reacts quickly to reversals, making it ideal for fast-moving assets or intraday strategies.
SuperTrend acts as the structural confirmation of directional bias.
RSI (Relative Strength Index) – Measures strength based on recent price closes.
You’ve configured RSI > 50 for bullish zones and < 50 for bearish—a neutral midpoint standard often used by professional traders.
This ensures that only trades in sync with momentum and recent strength are highlighted.
🌈 How It Visually Works
Background turns GREEN when:
ADX ≥ 22, indicating strong momentum
Price is above the 20 EMA and above SuperTrend (10,1)
RSI > 50, confirming recent strength
Background turns RED when:
ADX ≥ 22, indicating strong momentum
Price is below the 20 EMA and below SuperTrend (10,1)
RSI < 50, confirming recent weakness
The background remains neutral (transparent) when trend conditions are not clearly aligned—this is the tool's way of keeping you out of indecisive markets.
A label (BULL / BEAR) appears only when the bias flips from the previous one. This helps avoid repeated or redundant alerts, focusing your attention only when something changes.
📊 Practical Uses & Benefits
✅ Stay with the trend: Perfectly filters out choppy or sideways markets by only activating when conditions align across momentum, structure, and strength.
✅ Pre-trade confirmation: Use this tool to confirm trade setups from other indicators or price action patterns.
✅ Avoid noise: Prevent overtrading by focusing only on high-quality trend conditions.
✅ Visual clarity: Unlike arrows or plots that clutter the chart, this tool subtly highlights trend conditions in the background, preserving your price action view.
📍 Important Notes
This is not a buy/sell signal generator. It is a trend-confirmation system.
Use it in conjunction with your existing entry setups—such as breakouts, order blocks, retests, or candlestick patterns.
The tool helps you stay in sync with the dominant direction, especially when combining multiple timeframes.
Can be used on any market (stocks, forex, crypto, indices) and on any timeframe.
Institutional Momentum Scanner [IMS]Institutional Momentum Scanner - Professional Momentum Detection System
Hunt explosive price movements like the professionals. IMS identifies maximum momentum displacement within 10-bar windows, revealing where institutional money commits to directional moves.
KEY FEATURES:
▪ Scans for strongest momentum in rolling 10-bar windows (institutional accumulation period)
▪ Adaptive filtering reduces false signals using efficiency ratio technology
▪ Three clear states: LONG (green), SHORT (red), WAIT (gray)
▪ Dynamic volatility-adjusted thresholds (8% ATR-scaled)
▪ Visual momentum flow with glow effects for signal strength
BASED ON:
- Pocket Pivot concept (O'Neil/Morales) applied to price momentum
- Adaptive Moving Average principles (Kaufman KAMA)
- Market Wizards momentum philosophy
- Institutional order flow patterns (5-day verification window)
HOW IT WORKS:
The scanner finds the maximum price displacement in each 10-bar window - where the market showed its hand. An adaptive filter (5-bar regression) separates real moves from noise. When momentum exceeds the volatility-adjusted threshold, states change.
IDEAL FOR:
- Momentum traders seeking explosive moves
- Swing traders (especially 4H timeframe)
- Position traders wanting institutional footprints
- Anyone tired of false breakout signals
Default parameters (10,5) optimized for 4H charts but adaptable to any timeframe. Remember: The market rewards patience and punishes heroes. Wait for clear signals.
"The market is honest. Are you?"
Forex Monday RangeForex Monday Range. Refers to the price range (high to low) established during Monday's trading session, typically measured from midnight Sunday to midnight Monday (New York time).
NASDAQ Smart Momentum Strategy v4.1 BoostedTry to trade Nasdaq with it in 15 min time frame just build today. GL
KumoFlow Pro v1.0📌 Strategy Description: KumoFlow Pro v1.0
KumoFlow Pro is a momentum strategy that fuses the classic Ichimoku system with modern volume-based confirmations: VWMA (Volume Weighted Moving Average) and CMF (Chaikin Money Flow). It focuses not only on trend direction but also on whether the move is supported by genuine volume, enabling trades only on high-conviction breakouts.
🔍 Key Components:
- 🔹 Ichimoku: Captures trend direction, momentum, and support/resistance zones.
- 🔸 VWMA: Adds weight to volume-backed price moves and filters out weak breakouts.
- 🔸 CMF: Confirms the presence of real capital flow in the trade direction.
- 🔁 Trailing Stop: Dynamic exit mechanism that locks in profit once the trade is in gain. It is % based and adapts to price behavior.
🎯 Purpose of This Setup:
- Capitalize on short-term volatility
- Catch early breakouts with volume confirmation
- Preserve profits with precision via trailing exit
⚙️ OPTIMIZED PARAMETERS (BTC / 30MIN CHART):
- Ichimoku Tenkan/Kijun: 5 / 15
- Senkou B: 30
- VWMA & CMF Length: 10
- Trailing Trigger: 1.5%
- Trailing Offset: 1.0%
⚠️ DISCLAIMER:
This setup is tuned for fast-paced environments and frequent entries. It may produce false signals in choppy conditions. Please test and validate on demo or historical charts before live use.
🔧 All parameters are fully user-adjustable from the input panel. You may customize it for different timeframes or assets.
EVaR Indicator and Position SizingThe Problem:
Financial markets consistently show "fat-tailed" distributions where extreme events occur with higher frequency than predicted by normal distributions (Gaussian or even log-normal). These fat tails manifest in sudden price crashes, volatility spikes, and black swan events that traditional risk measures like volatility can underestimate. Standard deviation and conventional VaR calculations assume normally distributed returns, leaving traders vulnerable to severe drawdowns during market stress.
Cryptocurrencies and volatile instruments display particularly pronounced fat-tailed behavior, with extreme moves occurring 5-10 times more frequently than normal distribution models would predict. This reality demands a more sophisticated approach to risk measurement and position sizing.
The Solution: Entropic Value at Risk (EVAR)
EVaR addresses these limitations by incorporating principles from statistical mechanics and information theory through Tsallis entropy. This advanced approach captures the non-linear dependencies and power-law distributions characteristic of real financial markets.
Entropy is more adaptive than standard deviations and volatility measures.
I was inspired to create this indicator after reading the paper " The End of Mean-Variance? Tsallis Entropy Revolutionises Portfolio Optimisation in Cryptocurrencies " by by Sana Gaied Chortane and Kamel Naoui.
Key advantages of EVAR over traditional risk measures:
Superior tail risk capture: More accurately quantifies the probability of extreme market moves
Adaptability to market regimes: Self-calibrates to changing volatility environments
Non-parametric flexibility: Makes less assumptions about the underlying return distribution
Forward-looking risk assessment: Better anticipates potential market changes (just look at the charts :)
Mathematically, EVAR is defined as:
EVAR_α(X) = inf_{z>0} {z * log(1/α * M_X(1/z))}
Where the moment-generating function is calculated using q-exponentials rather than conventional exponentials, allowing precise modeling of fat-tailed behavior.
Technical Implementation
This indicator implements EVAR through a q-exponential approach from Tsallis statistics:
Returns Calculation: Price returns are calculated over the lookback period
Moment Generating Function: Approximated using q-exponentials to account for fat tails
EVAR Computation: Derived from the MGF and confidence parameter
Normalization: Scaled to for intuitive visualization
Position Sizing: Inversely modulated based on normalized EVAR
The q-parameter controls tail sensitivity—higher values (1.5-2.0) increase the weighting of extreme events in the calculation, making the model more conservative during potentially turbulent conditions.
Indicator Components
1. EVAR Risk Visualization
Dynamic EVAR Plot: Color-coded from red to green normalized risk measurement (0-1)
Risk Thresholds: Reference lines at 0.3, 0.5, and 0.7 delineating risk zones
2. Position Sizing Matrix
Risk Assessment: Current risk level and raw EVAR value
Position Recommendations: Percentage allocation, dollar value, and quantity
Stop Parameters: Mathematically derived stop price with percentage distance
Drawdown Projection: Maximum theoretical loss if stop is triggered
Interpretation and Application
The normalized EVAR reading provides a probabilistic risk assessment:
< 0.3: Low risk environment with minimal tail concerns
0.3-0.5: Moderate risk with standard tail behavior
0.5-0.7: Elevated risk with increased probability of significant moves
> 0.7: High risk environment with substantial tail risk present
Position sizing is automatically calculated using an inverse relationship to EVAR, contracting during high-risk periods and expanding during low-risk conditions. This is a counter-cyclical approach that ensures consistent risk exposure across varying market regimes, especially when the market is hyped or overheated.
Parameter Optimization
For optimal risk assessment across market conditions:
Lookback Period: Determines the historical window for risk calculation
Q Parameter: Controls tail sensitivity (higher values increase conservatism)
Confidence Level: Sets the statistical threshold for risk assessment
For cryptocurrencies and highly volatile instruments, a q-parameter between 1.5-2.0 typically provides the most accurate risk assessment because it helps capturing the fat-tailed behavior characteristic of these markets. You can also increase the q-parameter for more conservative approaches.
Practical Applications
Adaptive Risk Management: Quantify and respond to changing tail risk conditions
Volatility-Normalized Positioning: Maintain consistent exposure across market regimes
Black Swan Detection: Early identification of potential extreme market conditions
Portfolio Construction: Apply consistent risk-based sizing across diverse instruments
This indicator is my own approach to entropy-based risk measures as an alterative to volatility and standard deviations and it helps with fat-tailed markets.
Enjoy!
Micropulse Crypto Reversal – 1 Minute📛 Micropulse Crypto Reversal – 1 Minute
📘 Strategy Description:
Micropulse Reversal is a specialized scalping strategy designed for 1-minute cryptocurrency charts such as BTC/USDT and ETH/USDT. It captures fast reversal opportunities with a scientifically guided combination of price action, volume dynamics, and volatility filtering.
🎯 Core Features:
Hybrid use of RSI, Bollinger Bands, Hull Moving Average, and OBV
Scoring system ensures only strong, high-confidence signals trigger trades
ATR filter blocks signals in low-volatility (choppy) conditions
Supports both long and short entries, with automatic position reversal logic
Optimized parameters are fixed and not user-editable (fully locked)
⚙️ Hardcoded Parameters:
RSI Length: 9, Oversold: 40, Overbought: 60
Bollinger Bands: 20 / 2.0
Hull MA: 13, OBV short/long: 3 / 8
ATR Filter: > 0.1% of price
Take Profit: +0.8%, Stop Loss: -0.6%
Minimum Signal Score to Enter: 4 / 5
📈 Ideal Use:
BTC, ETH, and other major crypto pairs with high volume
Timeframe: 1-minute
Fast-entry, fast-exit trades
Works well for bot integration, signal alerts, or manual scalping
⚠️ Risk Disclaimer:
This strategy is optimized for past data and short-term momentum conditions. Past performance does not guarantee future results.
Always validate on forward data and use proper risk management before live deployment.
EMAREVEX: Adaptive Multi-Timeframe Mean Reversion
📘 Strategy Overview: EMAREVEX
EMAREVEX (EMA Reversion Expert) is a professionally engineered mean-reversion strategy tailored for BTC/USDT, optimized specifically for the 15-minute and 30-minute timeframes.
It combines:
- Multi-timeframe EMA200 trend filtering (15m & 30m)
- Bollinger Band lower/upper breaches as reversion anchors
- RSI-based confirmation for oversold/overbought conditions
- A trailing stop-loss mechanism that activates only after volatility surpasses a configurable ATR threshold, then dynamically tracks price
This setup targets short-term pullback opportunities in volatile intraday environments.
🔬 Designed for quant-informed traders who seek precision entries and dynamic exit control.
⚠️ Warning:
This strategy is optimized on historical data. It should not be used without discretionary confirmation, appropriate risk management, and forward-testing under live market conditions.
Fear and Greed Index [DunesIsland]The Fear and Greed Index is a sentiment indicator designed to measure the emotions driving the stock market, specifically investor fear and greed. Fear represents pessimism and caution, while greed reflects optimism and risk-taking. This indicator aggregates multiple market metrics to provide a comprehensive view of market sentiment, helping traders and investors gauge whether the market is overly fearful or excessively greedy.How It WorksThe Fear and Greed Index is calculated using four key market indicators, each capturing a different aspect of market sentiment:
Market Momentum (30% weight)
Measures how the S&P 500 (SPX) is performing relative to its 125-day simple moving average (SMA).
A higher value indicates that the market is trading well above its moving average, signaling greed.
Stock Price Strength (20% weight)
Calculates the net number of stocks hitting 52-week highs minus those hitting 52-week lows on the NYSE.
A greater number of net highs suggests strong market breadth and greed.
Put/Call Options (30% weight)
Uses the 5-day average of the put/call ratio.
A lower ratio (more call options being bought) indicates greed, as investors are betting on rising prices.
Market Volatility (20% weight)
Utilizes the VIX index, which measures market volatility.
Lower volatility is associated with greed, as investors are less fearful of large market swings.
Each component is normalized using a z-score over a 252-day lookback period (approximately one trading year) and scaled to a range of 0 to 100. The final Fear and Greed Index is a weighted average of these four components, with the weights specified above.Key FeaturesIndex Range: The index value ranges from 0 to 100:
0–25: Extreme Fear (red)
25–50: Fear (orange)
50–75: Neutral (yellow)
75–100: Greed (green)
Dynamic Plot Color: The plot line changes color based on the index value, visually indicating the current sentiment zone.
Reference Lines: Horizontal lines are plotted at 0, 25, 50, 75, and 100 to represent the different sentiment levels: Extreme Fear, Fear, Neutral, Greed, and Extreme Greed.
How to Interpret
Low Values (0–25): Indicate extreme fear, which may suggest that the market is oversold and could be due for a rebound.
High Values (75–100): Indicate greed, which may signal that the market is overbought and could be at risk of a correction.
Neutral Range (25–75): Suggests a balanced market sentiment, neither overly fearful nor greedy.
This indicator is a valuable tool for contrarian investors, as extreme readings often precede market reversals. However, it should be used in conjunction with other technical and fundamental analysis tools for a well-rounded view of the market.
VDN1 - T3 Tilson + IFT + ATRThis strategy combines three powerful indicators to create a high-quality and low-noise trading system:
🔹 T3 Tilson: Serves as the main trend indicator. It reacts smoothly to market direction changes while reducing noise.
🔹 Inverse Fisher Transform of RSI: A momentum filter that sharpens the signal precision. Only trades in the direction of positive or negative momentum.
🔹 ATR Filter: Avoids entries during low volatility (sideways) periods. Ensures the market is active enough before executing trades.
Core Logic:
* Long Entry: T3 Tilson rising + IFT(RSI) > 0 + ATR > threshold
* Short Entry: T3 Tilson falling + IFT(RSI) < 0 + ATR > threshold
* All trades use a fixed size of 1 unit for consistent risk evaluation.
Performance Notes:
* Works exceptionally well on index futures (e.g., NAS100, US30, GER40)
* Shows low drawdown and high profit factor (PF > 3) on those assets
* Also performs decently on XAUUSD, even with only \~32% win rate — thanks to favorable risk/reward
* BTC and ETH may require modified versions due to higher volatility and whipsaws
This is a master version — clean, unoptimized, and stable.
Use this as a core engine to build and test enhanced versions (e.g., with TP/SL, dynamic filters, etc.)
Happy testing and trading!
Volatility Flow X | Dual Trend Strategy [VWMA+SMA+ADX]📌 Strategy Title
Volatility Flow X | Dual Trend Strategy
🧾 Description
🚀 Strategy Overview
Volatility Flow X is a dual-directional trading strategy that combines Volume-Weighted MA (VWMA) for momentum, Simple MA (SMA) for trend direction, ADX for trend strength filtering, and ATR-based volatility cloud for dynamic support/resistance zones.
It is designed specifically for high-volatility assets like BTC/USD on intraday timeframes such as 15 min, 30 min, and 1 hour — offering both breakout and trend-following opportunities.
🔬 Technical Components and Sources
1. VWMA (Volume-Weighted Moving Average)
Captures volume-weighted momentum shifts.
📚 Kirkpatrick & Dahlquist (2010) — “Technical Analysis”
2. SMA (Simple Moving Average)
Used as a baseline trend direction validator.
📚 Ernie Chan — “Algorithmic Trading” (2013)
3. ADX (Average Directional Index)
Filters out low-conviction signals based on trend strength.
📚 J. Welles Wilder (1978) — ADX in directional movement systems
4. ATR Cloud (Volatility Envelope)
Creates upper and lower dynamic bands using ATR to visualize trend pressure.
📚 Zunino et al. (2017) — Fractal volatility behavior in Bitcoin markets
🧠 Key Features
✅ 3 configurable Long signal modes
✅ 3 configurable Short signal modes
✅ Manually switchable signals for flexibility
✅ Auto-calculated TP/SL using ATR and risk/reward ratio
✅ ADX filter to avoid choppy trends
✅ Visual cloud overlay for support/resistance
✅ Suitable for scalping and short-term swing trading
⚙️ Recommended Settings (for BTC/USDT – 30min)
VWMA Length = 18
SMA Length = 50
ATR Length = 14, Multiplier = 2.5
Risk-Reward Ratio = 1.5
ADX Length = 14, Threshold = 18, Lookback = 4
⚠️ Disclaimer
This strategy is not financial advice. Please backtest and understand the risks before using it in live markets.
Volatility Flow X – MACD + Ichimoku Hybrid Trail🌥️ Volatility Flow X – Hybrid Ichimoku Cloud Explained
This strategy combines Ichimoku’s cloud structure with real-time price position.
Unlike standard Ichimoku coloring, the cloud here reflects both trend direction and price behavior.
🔍 What the Cloud Colors Mean
🟢 Green Cloud
Senkou A > Senkou B
Price is above the cloud
→ Indicates strong uptrend; suitable for long entries
🔴 Red Cloud
Senkou A < Senkou B
Price is below the cloud
→ Indicates strong downtrend; suitable for short entries
⚪ Gray Cloud
Price contradicts trend, or price is inside the cloud
→ Represents indecision, low momentum; best to avoid entries
⚙️ Technical Features
Ichimoku Components: Tenkan-sen, Kijun-sen, Senkou Span A & B, Chikou Span
Cloud Transparency: 30%
MACD Filter: Optional momentum confirmation (customizable)
Trailing Stop: Optional dynamic trailing stop after trigger level
Directional Control: Long and short trailing rules can be set independently
📚 References
Ichimoku Charts – Nicole Elliott
Algorithmic Trading – Ernie Chan
TradingView Pine Script and hybrid trend models
⚠️ Disclaimer
This strategy is for educational and backtesting purposes only.
It is not financial advice. Always test thoroughly before applying to real trades.
+ ATR Table and BracketsHi, all. I'm back with a new indicator—one I firmly believe could be one of the most valuable indicators you keep in your indicator toolshed—based around true range.
This is a simple, streamlined indicator utilizing true range and average true range that will help any trader with stoploss, trailing stoploss, and take-profit placement—things that I know many traders use average true range for. It could also be useful for trade entries as well, depending on the trader's style.
Typically, most traders (or at least what I've seen recommended across websites, video tutorials on YouTube, etc.) are taught to simply take the ATR number and use that, and possibly some sort of multiplier, as your stoploss and take-profit. This is fine, but I thought that it might be possible to dive a bit deeper into these values. Because an average is a combination of values, some higher, some lower, and we often see ATR spikes during periods of high volatility, I thought wouldn't it be useful to know what value those ATR spikes are, and how do they relate to the ATR? Then I thought to myself, well, what about the most volatile candle within that ATR (the candle with the greatest true range)? Couldn't knowing that value be useful to a trader? So then the idea of a table displaying these values, along with the ATR and the ATR times some multiplier number, would be a useful, simple way to display this information. That's what we have here.
The table is made up of two columns, one with the name of the metric being measured, and the other with its value. That's it. Simple.
As nice as this was, I thought an additional, great, and perhaps better, way to visualize this information would be in the form of brackets extending from the current bar. These are simply lines/labels plotted at the price values of the ATR, ATR times X, highest ATR, highest ATR times X, and highest TR value. These labels supply the actual values of the ATR, etc., but may also display the price if you should choose (both of these values are toggleable in the 'Inputs' section of the indicator.). Additionally, you can choose to display none of these labels, or all five if you wish (leaves the chart a bit cluttered, as shown in the image below), though I suspect you'll determine your preferences for which information you'd like to see and which not.
Chart with all five lines/labels displayed. I adjusted the ATRX value to 3 just to make the screenshot as legible as possible. Default is set to 1.5. As you can see, the label doesn't show the multiplier number, but the table does.
Here's a screenshot of the labels showing the price in addition to the value of the ATR, set to "Previous Closing Price," (see next paragraph for what that means) and highest TR. Personally, I don't see the value in the displaying the price, but I thought some people might want that. It's not available in the table as of now, but perhaps if I get enough requests for it I will add it.
That's basically it, but one last detail I need to go over is the dropdown box labeled "Bar Value ATR Levels are Oriented To." Firstly, this has no effect on Highest ATR, Highest ATRX, and Highest TR levels. Those are based on the ATR up to the last closed candle, meaning they aren't including the value of the currently open candle (this would be useless). However, knowing that different traders trade different ways it seemed to me prudent to allow for traders to select which opening or closing value the trader wishes to have the ATR brackets based on. For example, as someone who has consumed much No Nonsense Forex content I know that traders are urged to enter their trades in the last fifteen minutes of the trading day because the ATR is unlikely to change significantly in that period (ATR being the centerpiece of NNFX money management), so one of three selections here is to plot the brackets based on the ATR's inclusion of this value (this of course means the brackets will move while the candle is still open). The other options are to set the brackets to the current opening price, or the previous closing price. Depending on what you're trading many times these prices are virtually identical, but sometimes price gaps (stocks in particular), so, wanting your brackets placed relative to the previous close as opposed to the current open might be preferable for some traders.
And that's it. I really hope you guys like this indicator. I haven't seen anything closely similar to it on TradingView, and I think it will be something you all will find incredibly handy.
Please enjoy!
Adaptive Squeeze Momentum +OVERVIEW
Adaptive Squeeze Momentum+ is an enhanced, auto-adaptive momentum indicator inspired by the classic Squeeze Momentum concept. This script dynamically adjusts its parameters to any timeframe without requiring manual inputs, making it a versatile tool for intraday traders and long-term investors alike.
CONCEPTS
The indicator combines Bollinger Bands (BB) and Keltner Channels (KC) to identify volatility compression ("squeeze") and expansion phases. When BB contracts within KC, a squeeze is detected, signaling reduced volatility and potential for a breakout. Additionally, a linear regression momentum calculation helps assess the strength and direction of price moves.
FEATURES
Auto-Adaptation:
Automatically adjusts BB/KC lengths and multipliers based on the chart timeframe (from 1 minute to 1 month).
Dynamic Squeeze Detection:
Clear visual encoding of squeeze status:
- Gray cross: neutral
- Blue cross: squeeze active
- Yellow cross: squeeze released
Momentum Histogram:
Colored area chart shows positive and negative momentum with slope-based coloring.
Clean Visualization:
Minimalist plots focused on actionable signals.
USAGE
Identify Squeeze Phases:
When the blue cross appears, the market is in a volatility squeeze, potentially preceding a breakout.
Monitor Momentum Direction:
The area plot shows the magnitude and direction of price momentum.
Confirm Entries and Exits:
Combine squeeze releases (yellow) with positive momentum for potential long entries or negative momentum for shorts.
Adaptable to Any Market:
Works seamlessly across cryptocurrencies, stocks, forex, and indices on all timeframes.
Unified ATR LevelsThis is a unified ATR-based band plotting indicator.
It allows you to display:
Default ATR (on current timeframe)
Preset ATR (mapped to higher timeframe logic)
User-defined ATR (on any custom timeframe)
✳️ Features:
Configurable multipliers, colors, and line widths
Smart label positioning (left, middle, right)
Clean visuals with adjustable label size
Ideal for multi-timeframe analysis and volatility zones
📌 All feedback welcome!
Tags:
volatility, ATR, multi-timeframe, support-and-resistance, custom-indicator
BB + RSI & Volume FilterThis script overlays three sets of technical filters on your price chart and generates signals when conditions align:
Bollinger Bands
Calculates upper, middle, and lower bands using either SMA or EMA.
Buy signal when price crosses up through the lower band.
Sell signal when price crosses down through the upper band.
Volume Filter
Computes a simple moving average of volume.
Ensures breakout moves have sufficient volume by requiring current volume > SMA(volume) × multiplier.
RSI Filter
Computes RSI on the chosen source.
Buy when RSI crosses above the oversold threshold.
Sell when RSI crosses below the overbought threshold.
Only plots RSI signals that pass the volume filter.
You get:
Bollinger entry/exit shapes (labeled “BB ↑/↓”).
RSI entry/exit shapes (labeled “RSI”) only when volume confirms the move.
Alerts for each signal type.
This combination reduces false breakouts by requiring both volatility (Bollinger) or momentum (RSI) and volume confirmation
Price Extension from 8 EMAOverview
This indicator can be used to see how far away the price is from the 8 EMA. It compares this to the Average Daily Range % to see if the stock may be overextended. The "Extension Multiplier" represents how far the stock is extended away from the 8 EMA.
Core Concept
This indicator is best used for breakout trades that are trying to make sure they are not chasing the stock.
How to Use This Indicator
This tool is primarily intended for analyzing daily charts of individual stocks and is often used by breakout traders to evaluate potential entry areas.
If the stock is far away from the 8 EMA, it is likely not ready to break out. If it is close to the 8ema, it could be ready to move higher.
This indicator can also be used in the opposite way. For example, shorting or puts.
Understanding the colors
Green (Not Extended): Indicates the price is close to the 8 EMA. This often corresponds to periods of consolidation.
Yellow (Slightly Extended): The price is beginning to move away from the 8 EMA.
Orange (Extended): The price has moved a considerable distance from the 8 EMA.
Red (Very Extended): The price is at an extreme distance from the 8 EMA, historically increasing the likelihood of a pullback or consolidation.
Settings
Info Row Position: Adjusts the vertical position of the display table on the chart. Useful when using other indicators.
ADR Length: Sets the lookback period for calculating the Average Daily Range. Or the average range % for different timeframes.
Timeframe: Determines the timeframe for the EMA and ADR calculation (the default is Daily).
H BollingerBollinger Bands are a widely used technical analysis indicator that helps spot relative price highs and lows. The tool comprises three lines: a central band representing the 20-period simple moving average (SMA), and upper and lower bands usually placed two standard deviations above and below the SMA. These bands adjust with market volatility, offering insights into price fluctuations and trading conditions.
How this indicator works
Bollinger Bands helps traders assess price volatility and potential price reversals. They consist of three bands: the middle band, the upper band, and the lower band. Here's how Bollinger Bands work:
Middle band: This is typically a simple moving average (SMA) of the asset's price over a specified period. The most common period used is 20 days.
Upper band: This is calculated by adding a specified number of standard deviations to the middle band. The standard deviation measures the asset's price volatility. Commonly, two standard deviations are added to the middle band.
Lower band: Similar to the upper band, it is calculated by subtracting a specified number of standard deviations from the middle band.
What do Bollinger Bands tell you?
Bollinger bands primarily indicate the level of market volatility and trading opportunities. Narrow bands indicate low market volatility, while wide bands suggest high market volatility. Bollinger bands indicators can be used by traders to assess potential buy or sell signals. For instance, a sell signal may be interpreted or generated if the asset’s price moves closer or crosses the upper band, as it may indicate that the asset is overbought. Alternatively, a buy signal may be interpreted or generated if the price moves closer to the lower band, as it may signify that the asset is oversold.
However, traders should be cautious when using Bollinger Bands as standalone indicators when making trading decisions. Experienced traders refrain from confirming signals based on one indicator. Instead, they generally combine various technical indicators and fundamental analysis methods to make informed trading decisions. Basing trading decisions on only one indicator can result in misinterpretation of signals and heavy losses.
Bollinger Bands assist in identifying whether prices are relatively high or low. They are applied as a pair—upper and lower bands—alongside a moving average. However, these bands are not designed to be used in isolation. Instead, they should be used to validate signals generated by other technical indicators.
Calculation of Bollinger Band
Frahm Factor Position Size CalculatorThe Frahm Factor Position Size Calculator is a powerful evolution of the original Frahm Factor script, leveraging its volatility analysis to dynamically adjust trading risk. This Pine Script for TradingView uses the Frahm Factor’s volatility score (1-10) to set risk percentages (1.75% to 5%) for both Margin-Based and Equity-Based position sizing. A compact table on the main chart displays Risk per Trade, Frahm Factor, and Average Candle Size, making it an essential tool for traders aligning risk with market conditions.
Calculates a volatility score (1-10) using true range percentile rank over a customizable look-back window (default 24 hours).
Dynamically sets risk percentage based on volatility:
Low volatility (score ≤ 3): 5% risk for bolder trades.
High volatility (score ≥ 8): 1.75% risk for caution.
Medium volatility (score 4-7): Smoothly interpolated (e.g., 4 → 4.3%, 5 → 3.6%).
Adjustable sensitivity via Frahm Scale Multiplier (default 9) for tailored volatility response.
Position Sizing:
Margin-Based: Risk as a percentage of total margin (e.g., $175 for 1.75% of $10,000 at high volatility).
Equity-Based: Risk as a percentage of (equity - minimum balance) (e.g., $175 for 1.75% of ($15,000 - $5,000)).
Compact 1-3 row table shows:
Risk per Trade with Frahm score (e.g., “$175.00 (Frahm: 8)”).
Frahm Factor (e.g., “Frahm Factor: 8”).
Average Candle Size (e.g., “Avg Candle: 50 t”).
Toggles to show/hide Frahm Factor and Average Candle Size rows, with no empty backgrounds.
Four sizes: XL (18x7, large text), L (13x6, normal), M (9x5, small, default), S (8x4, tiny).
Repositionable (9 positions, default: top-right).
Customizable cell color, text color, and transparency.
Set Frahm Factor:
Frahm Window (hrs): Pick how far back to measure volatility (e.g., 24 hours). Shorter for fast markets, longer for chill ones.
Frahm Scale Multiplier: Set sensitivity (1-10, default 9). Higher makes the score jumpier; lower smooths it out.
Set Margin-Based:
Total Margin: Enter your account balance (e.g., $10,000). Risk auto-adjusts via Frahm Factor.
Set Equity-Based:
Total Equity: Enter your total account balance (e.g., $15,000).
Minimum Balance: Set to the lowest your account can go before liquidation (e.g., $5,000). Risk is based on the difference, auto-adjusted by Frahm Factor.
Customize Display:
Calculation Method: Pick Margin-Based or Equity-Based.
Table Position: Choose where the table sits (e.g., top_right).
Table Size: Select XL, L, M, or S (default M, small text).
Table Cell Color: Set background color (default blue).
Table Text Color: Set text color (default white).
Table Cell Transparency: Adjust transparency (0 = solid, 100 = invisible, default 80).
Show Frahm Factor & Show Avg Candle Size: Check to show these rows, uncheck to hide (default on).
Momentum Regression [BackQuant]Momentum Regression
The Momentum Regression is an advanced statistical indicator built to empower quants, strategists, and technically inclined traders with a robust visual and quantitative framework for analyzing momentum effects in financial markets. Unlike traditional momentum indicators that rely on raw price movements or moving averages, this tool leverages a volatility-adjusted linear regression model (y ~ x) to uncover and validate momentum behavior over a user-defined lookback window.
Purpose & Design Philosophy
Momentum is a core anomaly in quantitative finance — an effect where assets that have performed well (or poorly) continue to do so over short to medium-term horizons. However, this effect can be noisy, regime-dependent, and sometimes spurious.
The Momentum Regression is designed as a pre-strategy analytical tool to help you filter and verify whether statistically meaningful and tradable momentum exists in a given asset. Its architecture includes:
Volatility normalization to account for differences in scale and distribution.
Regression analysis to model the relationship between past and present standardized returns.
Deviation bands to highlight overbought/oversold zones around the predicted trendline.
Statistical summary tables to assess the reliability of the detected momentum.
Core Concepts and Calculations
The model uses the following:
Independent variable (x): The volatility-adjusted return over the chosen momentum period.
Dependent variable (y): The 1-bar lagged log return, also adjusted for volatility.
A simple linear regression is performed over a large lookback window (default: 1000 bars), which reveals the slope and intercept of the momentum line. These values are then used to construct:
A predicted momentum trendline across time.
Upper and lower deviation bands , representing ±n standard deviations of the regression residuals (errors).
These visual elements help traders judge how far current returns deviate from the modeled momentum trend, similar to Bollinger Bands but derived from a regression model rather than a moving average.
Key Metrics Provided
On each update, the indicator dynamically displays:
Momentum Slope (β₁): Indicates trend direction and strength. A higher absolute value implies a stronger effect.
Intercept (β₀): The predicted return when x = 0.
Pearson’s R: Correlation coefficient between x and y.
R² (Coefficient of Determination): Indicates how well the regression line explains the variance in y.
Standard Error of Residuals: Measures dispersion around the trendline.
t-Statistic of β₁: Used to evaluate statistical significance of the momentum slope.
These statistics are presented in a top-right summary table for immediate interpretation. A bottom-right signal table also summarizes key takeaways with visual indicators.
Features and Inputs
✅ Volatility-Adjusted Momentum : Reduces distortions from noisy price spikes.
✅ Custom Lookback Control : Set the number of bars to analyze regression.
✅ Extendable Trendlines : For continuous visualization into the future.
✅ Deviation Bands : Optional ±σ multipliers to detect abnormal price action.
✅ Contextual Tables : Help determine strength, direction, and significance of momentum.
✅ Separate Pane Design : Cleanly isolates statistical momentum from price chart.
How It Helps Traders
📉 Quantitative Strategy Validation:
Use the regression results to confirm whether a momentum-based strategy is worth pursuing on a specific asset or timeframe.
🔍 Regime Detection:
Track when momentum breaks down or reverses. Slope changes, drops in R², or weak t-stats can signal regime shifts.
📊 Trade Filtering:
Avoid false positives by entering trades only when momentum is both statistically significant and directionally favorable.
📈 Backtest Preparation:
Before running costly simulations, use this tool to pre-screen assets for exploitable return structures.
When to Use It
Before building or deploying a momentum strategy : Test if momentum exists and is statistically reliable.
During market transitions : Detect early signs of fading strength or reversal.
As part of an edge-stacking framework : Combine with other filters such as volatility compression, volume surges, or macro filters.
Conclusion
The Momentum Regression indicator offers a powerful fusion of statistical analysis and visual interpretation. By combining volatility-adjusted returns with real-time linear regression modeling, it helps quantify and qualify one of the most studied and traded anomalies in finance: momentum.
Omori Law Recovery PhasesWhat is the Omori Law?
Originally a seismological model, the Omori Law describes how earthquake aftershocks decay over time. It follows a power law relationship: the frequency of aftershocks decreases roughly proportionally to 1/(t+c)^p, where:
t = time since the main shock
c = time offset constant
p = power law exponent (typically around 1.0)
Application to the markets
Financial markets experience "aftershocks" similar to earthquakes:
Market Crashes as Main Shocks: Major market declines (crashes) represent the initial shock event.
Volatility Decay: After a crash, market volatility typically declines following a power law pattern rather than a linear or exponential one.
Behavioral Components: The decay pattern reflects collective market psychology - initial panic gives way to uncertainty, then stabilization, and finally normalization.
The Four Recovery Phases
The Omori decay pattern in markets can be divided into distinct phases:
Acute Phase: Immediately after the crash, characterized by extreme volatility, panic selling, and sharp reversals. Trading is hazardous.
Reaction Phase: Volatility begins decreasing, but markets test previous levels. False rallies and retests of lows are common.
Repair Phase: Structure returns to the market. Volatility approaches normal levels, and traditional technical analysis becomes more reliable.
Recovery Phase: The final stage where market behavior normalizes completely. The impact of the original shock has fully decayed.
Why It Matters for Traders
Understanding where the market stands in this recovery cycle provides valuable context:
Risk Management: Adjust position sizing based on the current phase
Strategy Selection: Different strategies work in different phases
Psychological Preparation: Know what to expect based on the phase
Time Horizon Guidance: Each phase suggests appropriate time frames for trading