RSI Driven ATR Trend [NeuraAlgo]
RSI Driven ATR Trend
Dynamic Trend Detection and Strength Analysis
Unlock the market’s hidden rhythm with the RSI Driven ATR Trend , a sophisticated tool designed to measure trend direction and strength using a combination of RSI momentum and ATR-based volatility . This indicator provides real-time insights into bullish and bearish phases, helping traders identify potential turning points and optimize entry and exit decisions.
1.Core In Logic:
Dynamically calculates trend levels based on RSI and ATR interactions.
Highlights trend direction with intuitive color coding: green for bullish, red for bearish.
Displays trend strength as a percentage to quantify momentum intensity.
Automatic visual cues for potential trend reversals with “Turn Up” and “Turn Down” labels.
Advanced smoothing and dynamic gating ensure responsive yet stable trend detection.
Compatible with all timeframes and instruments.
2.Inputs Explained:
Rsi Factor: Adjusts the sensitivity of the RSI in trend calculation. Higher values make the trend detection more responsive to momentum changes.
Multiplier: Multiplies the effect of Rsi Factor to fine-tune trend responsiveness.
Bar Back: Number of bars used for peak and dip calculations, determining how far back the indicator looks for trend changes.
Period: Lookback period used in trend gating and ATR calculations.
Source: Price source for calculations (default is close).
Main Colors: Customize bullish and bearish trend colors.
3.How it Works:
The indicator calculates RSI values and ATR-based dynamic ranges to determine upper and lower trend levels.
Trend direction is determined by price crossing above (bullish) or below (bearish) the dynamic trend line.
Trend strength is expressed as a percentage relative to the trend line, helping you assess momentum intensity.
Visual cues like "Turn Up" and "Turn Down" labels indicate potential trend reversals.
Bars are colored dynamically based on trend direction for quick interpretation.
Ideal for traders seeking a clear, actionable view of market trends without the clutter of multiple indicators. RSI Driven ATR Trend translates complex price behavior into an easy-to-read visual guide, helping you make smarter trading decisions.
Happy Trading!
Statistics
Volatility Signal-to-Noise Ratio🙏🏻 this is VSNR: the most effective and simple volatility regime detector & automatic volatility threshold scaler that somehow no1 ever talks about.
This is simply an inverse of the coefficient of variation of absolute returns, but properly constructed taking into account temporal information, and made online via recursive math with algocomplexity O(1) both in expanding and moving windows modes.
How do the available alternatives differ (while some’re just worse)?
Mainstream quant stat tests like Durbin-Watson, Dickey-Fuller etc: default implementations are ALL not time aware. They measure different kinds of regime, which is less (if at all) relevant for actual trading context. Mix of different math, high algocomplexity.
The closest one is MMI by financialhacker, but his approach is also not time aware, and has a higher algocomplexity anyways. Best alternative to mine, but pls modify it to use a time-weighted median.
Fractal dimension & its derivatives by John Ehlers: again not time aware, very low info gain, relies on bar sizes (high and lows), which don’t always exist unlike changes between datapoints. But it’s a geometric tool in essence, so this is fundamental. Let it watch your back if you already use it.
Hurst exponent: much higher algocomplexity, mix of parametric and non-parametric math inside. An invention, not a math entity. Again, not time aware. Also measures different kinds of regime.
How to set it up:
Given my other tools, I choose length so that it will match the amount of data that your trading method or study uses multiplied by ~ 4-5. E.g if you use some kind of bands to trade volatility and you calculate them over moving window 64, put VSNR on 256.
However it depends mathematically on many things, so for your methods you may instead need multipliers of 1 or ~ 16.
Additionally if you wanna use all data to estimate SNR, put 0 into length input.
How to use for regime detection:
First we define:
MR bias: mean reversion bias meaning volatility shorts would work better, fading levels would work better
Momo bias: momentum bias meaning volatility longs would work better, trading breakouts of levels would work better.
The study plots 3 horizontal thresholds for VSNR, just check its location:
Above upper level: significant Momo bias
Above 1 : Momo bias
Below 1 : MR bias
Below lower level: significant MR bias
Take a look at the screenshots, 2 completely different volatility regimes are spotted by VSNR, while an ADF does not show different regime:
^^ CBOT:ZN1!
^^ INDEX:BTCUSD
How to use as automatic volatility threshold scaler
Copy the code from the script, and use VSNR as a multiplier for your volatility threshold.
E.g you use a regression channel and fade/push upper and lower thresholds which are RMSEs multiples. Inside the code, multiply RMSE by VSNR, now you’re adaptive.
^^ The same logic as when MM bots widen spreads with vola goes wild.
How it works:
Returns follow Laplace distro -> logically abs returns follow exponential distro , cuz laplace = double exponential.
Exponential distro has a natural coefficient of variation = 1 -> signal to noise ratio defined as mean/stdev = 1 as well. The same can be said for Student t distro with parameter v = 4. So 1 is our main threshold.
We can add additional thresholds by discovering SNRs of Student t with v = 3 and v = 5 (+- 1 from baseline v = 4). These have lighter & heavier tails each favoring mean reversion or momentum more. I computed the SNR values you see in the code with mpmath python module, with precision 256 decimals, so you can trust it I put it on my momma.
Then I use exponential smoothing with properly defined alphas (one matches cumulative WMA and another minimizes error with WMA in moving window mode) to estimate SNR of abs returns.
…
Lightweight huh?
∞
Trend Continuation [OmegaTools]Trend Continuation is a trend-following and trend-continuation tool designed to highlight high-probability pullbacks within an existing directional bias. It helps discretionary and systematic traders visually isolate “continuation zones” where a retracement is more likely to resolve in favor of the prevailing trend rather than trigger a full reversal.
1. Concept and Objective
The indicator combines two key components:
1. A trend bias engine (based either on a Rolling VWAP regime or on swing market structure).
2. A pullback pressure model, which quantifies how deep and “aggressive” the recent retracement has been relative to the trend.
The goal is to identify moments where the market pulls back against the trend, builds enough “reversal pressure,” and then shows signs that the trend is likely to **continue** rather than flip. When specific conditions are met, the indicator highlights bars and plots reference levels that can be used as potential continuation zones, filters, or confluence areas in a broader trading plan.
2. Trend Bias Modes
The primary trend direction is defined through the `Trend Mode` input:
* **RVWAP Mode (default)**
The script computes two rolling volume-weighted average prices over different lengths:
* A **shorter-term rolling VWAP**
* A **longer-term rolling VWAP**
When the shorter RVWAP is above the longer one, the bias is set to **bullish (+1)**. When it is below, the bias is **bearish (-1)**.
This creates a smooth, volume-weighted trend definition that tends to adapt to shifting regimes and filters out minor noise.
* **Market Structure Mode**
In this mode, trend bias is derived from **pivot highs and lows**:
* When price breaks above a recent pivot high, the bias flips to **bullish (+1)**.
* When price breaks below a recent pivot low, the bias flips to **bearish (-1)**.
This approach is more structurally oriented and reacts to significant swing breaks rather than just moving-average style relationships.
If no clear condition is met, the internal bias can temporarily be neutral, though the main design assumes working with clearly bullish or bearish environments.
3. Pullback and Reversal Pressure Logic
Once the trend bias is defined, the indicator measures **pullback intensity** against that trend:
* A **lookback window (“Pullback Length”)** scans recent highs and lows:
* In an uptrend, it tracks the **highest high** over the window and measures how far the current low pulls back from that high.
* In a downtrend, it tracks the **lowest low** and measures how far the current high bounces up from that low.
* This distance is converted into a **“reversal pressure” value**:
* In a bullish bias, deeper pullbacks (lower lows relative to the recent high) indicate stronger counter-trend pressure.
* In a bearish bias, stronger rallies (higher highs relative to the recent low) indicate stronger counter-trend pressure.
The raw reversal pressure is then smoothed with a long-term moving average to separate normal retracements from **statistically significant extremes**.
4. Thresholds and Histogram Coloring
To avoid reacting to every minor pullback, the indicator builds a **dynamic threshold** using a combination of:
* Long-term averages of reversal pressure.
* Standard deviation of reversal pressure.
* High-percentile values of reversal behavior over different sample sizes.
From this, a **threshold line** is derived, and the script then compares the current reversal pressure to this adaptive level:
* The **Reversal Histogram** (column plot) represents the excess reversal pressure above its own long-term average.
* When:
* There is a valid bullish or bearish bias, and
* The histogram is above the dynamic threshold,
the bars of the histogram are **colored**:
* Blue (or a similar “positive” color) in bullish bias.
* Red/pink (or a similar “negative” color) in bearish bias.
* When reversal pressure is below threshold or bias is not relevant, the histogram remains **neutral gray**.
These colored histogram segments represent **“high-tension” pullback states**, where counter-trend pressure has reached an extreme that, historically, often resolves with the original trend continuing rather than fully reversing.
5. Continuation Level and Bar Coloring on Price Chart
To connect the oscillator logic back to the chart:
* A **continuation reference level** is computed on the price series:
* In an uptrend, this is derived by subtracting the threshold from recent highs.
* In a downtrend, it is derived by adding the threshold to recent lows.
* This level is plotted as a **line on the price chart** (only when the trend bias is stable), acting as a visual guide for:
* Potential continuation zones,
* Possible stop-placement or invalidation areas,
* Or filters for entries/exits.
The bars are then **colored** when price crosses or interacts with these levels in the direction of the trend:
* In a bullish bias, bars closing below the continuation level can be highlighted as potential **deep pullback/continuation opportunities** or as warning signals, depending on the user’s playbook.
* In a bearish bias, bars closing above the continuation level are similarly highlighted.
This makes it easy to see where the oscillator’s “extreme pullback” conditions align with structural movements on the actual price bars.
6. Embedded Win-Rate Estimation (WR Table)
The script also includes an internal **win-rate style metric (WR%)** displayed in a small table on the chart:
* It tracks occurrences where:
* A valid bullish or bearish bias is present, and
* The Reversal Histogram is **above the threshold** (i.e., histogram is colored).
* It then approximates the **probability that the trend bias does not change** following such high-pressure pullback events.
* The WR value is shown as a percentage and represents, in essence, the **historical trend-continuation rate** under these specific conditions over the most recent sample of events.
This is not a formal statistical test and does not guarantee future performance, but it provides a quick visual indication of how often these continuation setups have led to **trend persistence** in the recent past.
7. How to Use in Practice
Typical applications include:
Trend-following entries on pullbacks
Identify the main trend using either RVWAP or Market Structure mode.
Wait for a colored histogram bar (reversal pressure above threshold).
Use the continuation reference line and bar coloring on the price chart to refine entry zones or invalidation levels.
Filtering signals from other systems
Run the indicator in the background to confirm trend continuation conditions before taking signals from another strategy (e.g., breakouts or momentum entries).
Only act on long signals when the bias is bullish and a high-pressure pullback has recently occurred; similarly for short signals in bearish conditions.
Risk management and trend monitoring
Monitor when reversal pressure is building against your current position.
Use shifts in bias combined with high reversal pressure to re-evaluate or scale out of trend-following trades.
Recommended steps:
1. Choose your Trend Mode:
- RVWAP for smoother, regime-style trend detection.
- Market Structure for swing-based structural changes.
2. Adjust Trend Length and Pullback Length to match your timeframe (shorter for intraday, longer for swing/position trading).
3. Observe where histogram colors appear and how price reacts around the continuation line and highlighted bars.
4. Integrate these signals into a pre-defined trading plan with clear entry, exit, and risk rules.
8. Limitations and Disclaimer
* This tool is a **technical analysis aid**, not a complete trading system.
* Past behavior of trend continuation or reversal pressure does **not** guarantee future results.
* The embedded WR metric is a **descriptive statistic** based on recent historical conditions only; it is not a promise of performance or a robust statistical forecast.
* All parameters (lengths, thresholds, modes) are user-configurable and should be **tested and validated** on your own data, instruments, and timeframes before any live use.
Disclaimer
This indicator is provided for informational and educational purposes only and does not constitute financial, investment, or trading advice. Trading and investing in financial markets involve substantial risk, including the possible loss of all capital. You are solely responsible for your own trading decisions and for evaluating all information provided by this tool. OmegaTools and the author of this script expressly disclaim any liability for any direct or indirect loss resulting from the use of this indicator. Always consult with a qualified financial professional before making any investment decisions.
Static K-means Clustering | InvestorUnknownStatic K-Means Clustering is a machine-learning-driven market regime classifier designed for traders who want a data-driven structure instead of subjective indicators or manually drawn zones.
This script performs offline (static) K-means training on your chosen historical window. Using four engineered features:
RSI (Momentum)
CCI (Price deviation / Mean reversion)
CMF (Money flow / Strength)
MACD Histogram (Trend acceleration)
It groups past market conditions into K distinct clusters (regimes). After training, every new bar is assigned to the nearest cluster via Euclidean distance in 4-dimensional standardized feature space.
This allows you to create models like:
Regime-based long/short filters
Volatility phase detectors
Trend vs. chop separation
Mean-reversion vs. breakout classification
Volume-enhanced money-flow regime shifts
Full machine-learning trading systems based solely on regimes
Note:
This script is not a universal ML strategy out of the box.
The user must engineer the feature set to match their trading style and target market.
K-means is a tool, not a ready made system, this script provides the framework.
Core Idea
K-means clustering takes raw, unlabeled market observations and attempts to discover structure by grouping similar bars together.
// STEP 1 — DATA POINTS ON A COORDINATE PLANE
// We start with raw, unlabeled data scattered in 2D space (x/y).
// At this point, nothing is grouped—these are just observations.
// K-means will try to discover structure by grouping nearby points.
//
// y ↑
// |
// 12 | •
// | •
// 10 | •
// | •
// 8 | • •
// |
// 6 | •
// |
// 4 | •
// |
// 2 |______________________________________________→ x
// 2 4 6 8 10 12 14
//
//
//
// STEP 2 — RANDOMLY PLACE INITIAL CENTROIDS
// The algorithm begins by placing K centroids at random positions.
// These centroids act as the temporary “representatives” of clusters.
// Their starting positions heavily influence the first assignment step.
//
// y ↑
// |
// 12 | •
// | •
// 10 | • C2 ×
// | •
// 8 | • •
// |
// 6 | C1 × •
// |
// 4 | •
// |
// 2 |______________________________________________→ x
// 2 4 6 8 10 12 14
//
//
//
// STEP 3 — ASSIGN POINTS TO NEAREST CENTROID
// Each point is compared to all centroids.
// Using simple Euclidean distance, each point joins the cluster
// of the centroid it is closest to.
// This creates a temporary grouping of the data.
//
// (Coloring concept shown using labels)
//
// - Points closer to C1 → Cluster 1
// - Points closer to C2 → Cluster 2
//
// y ↑
// |
// 12 | 2
// | 1
// 10 | 1 C2 ×
// | 2
// 8 | 1 2
// |
// 6 | C1 × 2
// |
// 4 | 1
// |
// 2 |______________________________________________→ x
// 2 4 6 8 10 12 14
//
// (1 = assigned to Cluster 1, 2 = assigned to Cluster 2)
// At this stage, clusters are formed purely by distance.
Your chosen historical window becomes the static training dataset , and after fitting, the centroids never change again.
This makes the model:
Predictable
Repeatable
Consistent across backtests
Fast for live use (no recalculation of centroids every bar)
Static Training Window
You select a period with:
Training Start
Training End
Only bars inside this range are used to fit the K-means model. This window defines:
the market regime examples
the statistical distributions (means/std) for each feature
how the centroids will be positioned post-trainin
Bars before training = fully transparent
Training bars = gray
Post-training bars = full colored regimes
Feature Engineering (4D Input Vector)
Every bar during training becomes a 4-dimensional point:
This combination balances: momentum, volatility, mean-reversion, trend acceleration giving the algorithm a richer "market fingerprint" per bar.
Standardization
To prevent any feature from dominating due to scale differences (e.g., CMF near zero vs CCI ±200), all features are standardized:
standardize(value, mean, std) =>
(value - mean) / std
Centroid Initialization
Centroids start at diverse coordinates using various curves:
linear
sinusoidal
sign-preserving quadratic
tanh compression
init_centroids() =>
// Spread centroids across using different shapes per feature
for c = 0 to k_clusters - 1
frac = k_clusters == 1 ? 0.0 : c / (k_clusters - 1.0) // 0 → 1
v = frac * 2 - 1 // -1 → +1
array.set(cent_rsi, c, v) // linear
array.set(cent_cci, c, math.sin(v)) // sinusoidal
array.set(cent_cmf, c, v * v * (v < 0 ? -1 : 1)) // quadratic sign-preserving
array.set(cent_mac, c, tanh(v)) // compressed
This makes initial cluster spread “random” even though true randomness is hardly achieved in pinescript.
K-Means Iterative Refinement
The algorithm repeats these steps:
(A) Assignment Step, Each bar is assigned to the nearest centroid via Euclidean distance in 4D:
distance = sqrt(dx² + dy² + dz² + dw²)
(B) Update Step, Centroids update to the mean of points assigned to them. This repeats iterations times (configurable).
LIVE REGIME CLASSIFICATION
After training, each new bar is:
Standardized using the training mean/std
Compared to all centroids
Assigned to the nearest cluster
Bar color updates based on cluster
No re-training occurs. This ensures:
No lookahead bias
Clean historical testing
Stable regimes over time
CLUSTER BEHAVIOR & TRADING LOGIC
Clusters (0, 1, 2, 3…) hold no inherent meaning. The user defines what each cluster does.
Example of custom actions:
Cluster 0 → Cash
Cluster 1 → Long
Cluster 2 → Short
Cluster 3+ → Cash (noise regime)
This flexibility means:
One trader might have cluster 0 as consolidation.
Another might repurpose it as a breakout-loading zone.
A third might ignore 3 clusters entirely.
Example on ETHUSD
Important Note:
Any change of parameters or chart timeframe or ticker can cause the “order” of clusters to change
The script does NOT assume any cluster equals any actionable bias, user decides.
PERFORMANCE METRICS & ROC TABLE
The indicator computes average 1-bar ROC for each cluster in:
Training set
Test (live) set
This helps measure:
Cluster profitability consistency
Regime forward predictability
Whether a regime is noise, trend, or reversion-biased
EQUITY SIMULATION & FEES
Designed for close-to-close realistic backtesting.
Position = cluster of previous bar
Fees applied only on regime switches. Meaning:
Staying long → no fee
Switching long→short → fee applied
Switching any→cash → fee applied
Fee input is percentage, but script already converts internally.
Disclaimers
⚠️ This indicator uses machine-learning but does not predict the future. It classifies similarity to past regimes, nothing more.
⚠️ Backtest results are not indicative of future performance.
⚠️ Clusters have no inherent “bullish” or “bearish” meaning. You must interpret them based on your testing and your own feature engineering.
OTT Volatility [RunRox]📊 OTT Volatility is an indicator developed by the RunRox team to pinpoint the most optimal time to trade across different markets.
OTT stands for Optimal Trade Time Volatility and is designed primarily for markets without a fixed trading session, such as cryptocurrencies that trade 24/7. At the same time, it works equally well on any other market.
🔶 The concept is straightforward. The indicator takes a specified number of historical periods (Samples) and statistically evaluates which hours of the day or which days show the highest volatility for the selected asset.
As a result, it highlights time windows with elevated volatility where traders can focus on searching for trade setups and building positions.
🔶 As the core volatility metric, the indicator uses ATR (Average True Range) to measure intraday volatility. Then it calculates the average ATR value over the last N Samples, creating a statistically stable estimate of typical volatility for the selected asset.
🔶 Statistically, during these highlighted periods the market shows higher-than-average volatility.
This means that in these time windows price is more likely to be subject to stronger moves and potential manipulation, making them attractive for active trade execution and position management.
⚠️ However, historical behavior does not guarantee future results.
These periods should be treated only as zones where volatility has a higher probability of being above normal, not as a promise of movement.
As shown in the screenshot above, the indicator also projects potential future volatility based on historical data. This helps you better plan your trading hours and align your activity with periods where volatility is statistically expected to be higher or lower.
🔶 Current Volatility – as shown in the screenshot above, you can also monitor the real-time volatility of the market without any statistical averaging.
On top of that, you can overlay the current volatility on top of the statistical volatility levels, which makes it easy to see whether the market is now trading in a high- or low-volatility regime relative to its usual behavior.
4 display modes – you can choose any visualization style that fits your trading workflow:
Absolute – displays the raw volatility values.
Relative – shows volatility relative to its typical levels.
Average Centered – centers volatility around its average value.
Trim Low Value – filters out low-volatility noise and highlights only more significant moves.
This indicator helps you define the most effective trading hours on any market by relying on historical volatility statistics.
Use it to quickly see when your market tends to be more active and to structure your trading sessions around those periods.
✅ We hope this tool becomes a useful part of your trading toolkit and helps you improve the quality of your decisions and timing.
BTC -50% Crash to Recovery ZoneGeneral Overview This is a macro-analysis tool designed to visualize the true duration of Bitcoin’s "Suffering & Recovery Cycles." Unlike standard oscillators that only signal oversold conditions, this script highlights the entire timeline required for the market to flush out leverage and return to All-Time Highs (ATH).
Operational Logic The algorithm tracks Bitcoin’s historical All-Time High (ATH).
The Trigger: It activates automatically when the price drops 50% below the last recorded ATH.
The "Recovery Zone": Once triggered, the chart background turns red (indicating a "Drawdown" state). This zone remains active persistently, even during intermediate relief rallies.
The Reset: The zone deactivates only when the price breaks above the previous ATH, marking the official start of a new Price Discovery phase.
How to Read It
Red Background: We are officially in a Bear Market or Recovery Phase. The asset is technically "underwater." For the long-term investor with a low time preference, this visually defines the accumulation window.
Red Horizontal Line: Indicates the "Target." This is the exact price level of the old ATH that Bitcoin must reclaim to close the bearish cycle.
No Background Color: We are in Price Discovery. The market is healthy and pushing for new highs.
The Financial Lesson This indicator visually demonstrates a fundamental market truth: "Price takes the elevator down, but takes the stairs up." It shows that after a halving of value (-50%), Bitcoin may take months or years to recover previous levels, helping investors filter out the noise of short-term pumps that fail to break the macro-bearish structure.
Z-Score Regime DetectorThe Z-Score Regime Detector is a statistical market regime indicator that helps identify bullish and bearish market conditions based on normalized momentum of three core metrics:
- Price (Close)
- Volume
- Market Capitalization (via CRYPTOCAP:TOTAL)
Each metric is standardized using the Z-score over a user-defined period, allowing comparison of relative extremes across time. This removes raw value biases and reveals underlying momentum structure.
📊 How it Works
- Z-Score: Measures how far a current value deviates from its average in terms of standard deviations.
- A Bullish Regime is identified when both price and market cap Z-scores are above the volume Z-score.
- A Bearish Regime occurs when price and market cap Z-scores fall below volume Z-score.
Bias Signal:
- Bullish Bias = Price Z-score > Market Cap Z-score
- Bearish Bias = Market Cap Z-score > Price Z-score
This provides a statistically consistent framework to assess whether the market is flowing with strength or stress.
✅ Why This Might Be Effective
- Normalizing the data via Z-scores allows comparison of diverse metrics on a common scale.
- Using market cap offers broader insight than price alone, especially for crypto.
- Volume as a reference threshold helps identify accumulation/distribution regimes.
- Simple regime logic makes it suitable for trend confirmation, filtering, or position biasing in systems.
⚠️ Disclaimer
This script is for educational purposes only and should not be considered financial advice. Always perform your own research and risk management. Past performance is not indicative of future results. Use at your own discretion.
I4I Inside Vortex Strike RateThis indicator identifies what I call an "Inside Vortex": It's similar to a Doji but more strict in having to be inside a keltner and also have a lower ATR than a blended average.
The bar itself is not that special. But it indicates that a potential big move might come in the next 2 periods.
After the patter: It then looks at what I call the Market Maker High and Low: A % of a blended ATR. It then looks back 100-200 or more bars and calculates the overall strike % in history for the High and low after the pattern happens.
This allows us to know how often these levels are hit within the next 2 periods to find if we have any edge on spread, call or put prices or use them as targets.
So its:
Pattern:
Levels
Strike Rate.
Very unique and EXTREME useful. Especially for options traders.
P/E, EPS, Price & Price-to-Sales DisplayPrice to earning ratio,
EPS,
Price ANd
Price-to-Sales Display
ATR multiple from High & LowA simple numerical indicator measuring ATR multiple from recent 252 days high and low.
ATR multiples from high (and low) are used as a base in many systematic trading and trend following systems. As an example many systems buy after a 2.5–4 ATR multiple pullback in a strong stock if the regime allows it. This would then be paired with an entry tactic, for example buy as it recaptures the a pivot within the upper range, a MA or breaks out again after this mid term pullback/shakeout.
This indicator uses a function which captures the recent high and low no matter if we have 252 bars or not, which is not how standard high/low works in Tradingview. This means it also works with recent IPO:s.
I prefer to overlay the indicator in one of the lower panes, for example the volume pane and then right click on the indicator and select Pin to scale > No scale (fullscreen).
Labden Predictive Kernel SFPPredictive kernel sfp indicator that uses a fuckton of math instead of typical signals to print buy and sell patterns.
MTF Scalper - alemicihanMulti-Timeframe Scalper Strategy: Aligning the Big Picture for Quick Gains
This article presents a robust futures trading strategy designed for high-frequency scalping in the crypto market. It’s built on the principle of minimizing risk by ensuring that short-term entries are always aligned with the dominant, higher-timeframe trend.
The Core Concept: Alignment is Key
A Balanced Trend Follower approach, now refined for rapid scalping, uses a Multi-Timeframe (MTF) confirmation system to filter out market noise and increase the probability of a successful trade.
The strategy operates on a Low Timeframe (LTF) chart (e.g., 3m, 5m, or 15m) but only executes trades if the direction is validated by three Higher Timeframes (HTF).
ComponentPurposeFunctionHTF (D, 4h, 1h) EMA => Trend Confirmation =>Checks if the current price is above/below all three Exponential Moving Averages (EMA 20). This provides a strong directional bias.
LTF (5m) Stochastic RSI => Momentum Entry => Generates the actual buy/sell signal by spotting a swift crossover, indicating fresh momentum in the direction of the confirmed HTF trend.
How The Signal Is Generated
Trend Alignment: The system first confirms the trend. If the price is trading above the Daily, 4-Hour, and 1-Hour EMAs, the market is deemed to be in a Strong LONG Trend. Only LONG signals are permitted.
Momentum Trigger: Once the trend is confirmed, a Long Signal is generated only when the Stochastic K-Line crosses above the D-Line, indicating a momentum shift (a pullback ending) towards the main trend direction.
Short Signal: The inverse logic applies to the Short Trend confirmation and entry signal.
Mandatory Risk Management: ATR-Based Exit
Given the high leverage nature of futures and scalping, static Stop-Loss (SL) and Take-Profit (TP) levels are inefficient. This strategy uses the Average True Range (ATR) indicator to dynamically set profit and loss targets based on current market volatility.
Stop Loss (SL): Set dynamically at 1.5 x ATR below (for long) or above (for short) the entry price. This gives the trade enough room to breathe without risking excessive capital.
Take Profit (TP): Set dynamically at 3.0 x ATR, establishing a robust Risk-to-Reward Ratio of 1:2.
Final Thoughts on Testing
This sophisticated approach combines the reliability of MTF analysis with the speed of momentum indicators. However, data analysis is key. Backtesting these parameters (EMA, ATR Multipliers, RSI/Stochastic lengths) on your chosen asset (like BTC/USDT or ETH/USDT) and timeframe is crucial to achieving optimal performance.
CME Gap Tracker + Live StatisticsThis script automatically finds the gaps inherent in the time data of any given chart, and displays them in color-coated buckets of how long it takes for the close of the gap to get filled. Add it on any CME Futures chart on the daily, and it will find all the weekend gaps. Set your period to an hour, and it will find the intraday gaps. Also displays a statistical calculation for each bucket.
Bar Count Per SessionCount K bars based on sessions, supporting at most 3 sessions
- Customize the session's timezone and period
- Set the steps between each number
- Use with the built-in `Trading Session` is a great convenience
Uptrick: Dynamic Z-Score DivergenceIntroduction
Uptrick: Dynamic Z-Score Divergence is an oscillator that combines multiple momentum sources within a Z-Score framework, allowing for the detection of statistically significant mean-reversion setups, directional shifts, and divergence signals. It integrates a multi-source normalized oscillator, a slope-based signal engine, structured divergence logic, a slope-adaptive EMA with dynamic bands, and a modular bar coloring system. This script is designed to help traders identify statistically stretched conditions, evolving trend dynamics, and classical divergence behavior using a unified statistical approach.
Overview
At its core, this script calculates the Z-Score of three momentum sources—RSI, Stochastic RSI, and MACD—using a user-defined lookback period. These are averaged and smoothed to form the main oscillator line. This normalized oscillator reflects how far short-term momentum deviates from its mean, highlighting statistically extreme areas.
Signals are triggered when the oscillator reverses slope within defined inner zones, indicating a shift in direction while the signal remains in a statistically stretched state. These mean-reversion flips (referred to as TP signals) help identify turning points when price momentum begins to revert from extended zones.
In addition, the script includes a divergence detection engine that compares oscillator pivot points with price pivot points. It confirms regular bullish and bearish divergence by validating spacing between pivots and visualizes both the oscillator-side and chart-side divergences clearly.
A dynamic trend overlay system is included using a Slope Adaptive EMA (SA-EMA). This trend line becomes more responsive when Z-Score deviation increases, allowing the trend line to adapt to market conditions. It is paired with ATR-based bands that are slope-sensitive and selectively visible—offering context for dynamic support and resistance.
The script includes configurable bar coloring logic, allowing users to color candles based on oscillator slope, last confirmed divergence, or the most recent signal of any type. A full alert system is also built-in for key signals.
Originality
The script is based on the well-known concept of Z-Score valuation, which is a standard statistical method for identifying how far a signal deviates from its mean. This foundation—normalizing momentum values such as RSI or MACD to measure relative strength or weakness—is not unique to this script and is widely used in quantitative analysis.
What makes this implementation original is how it expands the Z-Score foundation into a fully featured, signal-producing system. First, it introduces a multi-source composite oscillator by combining three momentum inputs—RSI, Stochastic RSI, and MACD—into a unified Z-Score stream. Second, it builds on that stream with a directional slope logic that identifies turning points inside statistical zones.
The most distinctive additions are the layered features placed on top of this normalized oscillator:
A structured divergence detection engine that compares oscillator pivots with price pivots to validate regular bullish and bearish divergence using precise spacing and timing filters.
A fully integrated slope-adaptive EMA overlay, where the smoothing dynamically adjusts based on real-time Z-Score movement of RSI, allowing the trend line to become more reactive during high-momentum environments and slower during consolidation.
ATR-based dynamic bands that adapt to slope direction and offer real-time visual zones for support and resistance within trend structures.
These features are not typically found in standard Z-Score indicators and collectively provide a unique approach that bridges statistical normalization, structure detection, and adaptive trend modeling within one script.
Features
Z-Score-based oscillator combining RSI, StochRSI, and MACD
Configurable smoothing for stable composite signal output
Buy/Sell TP signals based on slope flips in defined zones
Background highlighting for extreme outer bands
Inner and outer zones with fill logic for statistical context
Pivot-based divergence detection (regular bullish/bearish)
Divergence markers on oscillator and price chart
Slope-Adaptive EMA (SA-EMA) with real-time adaptivity based on RSI Z-Score
ATR-based upper and lower bands around the SA-EMA, visibility tied to slope direction
Configurable bar coloring (oscillator slope, divergence, or most recent signal)
Alerts for TP signals and confirmed divergences
Optional fixed Y-axis scaling for consistent oscillator view
The full setup mode can be seen below:
Input Parameters
General Settings
Full Setup: Enables rendering of the full visual system (lines, bands, signals)
Z-Score Lookback: Lookback period for normalization (mean and standard deviation)
Main Line Smoothing: EMA length applied to the averaged Z-Score
Slope Detection Index: Used to calculate directional flips for signal logic
Enable Background Highlighting: Enables visual region coloring in
overbought/oversold areas
Force Visible Y-Axis Scale: Forces max/min bounds for a consistent oscillator range
Divergence Settings
Enable Divergence Detection: Toggles divergence logic
Pivot Lookback Left / Right: Defines the structure of oscillator pivot points
Minimum / Maximum Bars Between Pivots: Controls the allowed spacing range for divergence validation
Bar Coloring Settings
Bar Coloring Mode:
➜ Line Color: Colors bars based on oscillator slope
➜ Latest Confirmed Signal: Colors bars based on the most recent confirmed divergence
➜ Any Latest Signal: Colors based on the most recent signal (TP or divergence)
SA-EMA Settings
RSI Length: RSI period used to determine adaptivity
Z-Score Length: Lookback for normalizing RSI in adaptive logic
Base EMA Length: Base length for smoothing before adaptivity
Adaptivity Intensity: Scales the smoothing responsiveness based on RSI deviation
Slope Index: Determines slope direction for coloring and band logic
Band ATR Length / Band Multiplier: Controls the width and responsiveness of the trend-following bands
Alerts
The script includes the following alert conditions:
Buy Signal (TP reversal detected in oversold zone)
Sell Signal (TP reversal detected in overbought zone)
Confirmed Bullish Divergence (oscillator HL, price LL)
Confirmed Bearish Divergence (oscillator LH, price HH)
These alerts allow integration into automation systems or signal monitoring setups.
Summary
Uptrick: Dynamic Z-Score Divergence is a statistically grounded trading indicator that merges normalized multi-momentum analysis with real-time slope logic, divergence detection, and adaptive trend overlays. It helps traders identify mean-reversion conditions, divergence structures, and evolving trend zones using a modular system of statistical and structural tools. Its alert system, layered visuals, and flexible input design make it suitable for discretionary traders seeking to combine quantitative momentum logic with structural pattern recognition.
Disclaimer
This script is for educational and informational purposes only. No indicator can guarantee future performance, and trading involves risk. Always use risk management and test strategies in a simulated environment before deploying with live capital.
Pair Cointegration & Static Beta Analyzer (v6)Pair Cointegration & Static Beta Analyzer (v6)
This indicator evaluates whether two instruments exhibit statistical properties consistent with cointegration and tradable mean reversion.
It uses long-term beta estimation, spread standardization, AR(1) dynamics, drift stability, tail distribution analysis, and a multi-factor scoring model.
1. Static Beta and Spread Construction
A long-horizon static beta is estimated using covariance and variance of log-returns.
This beta does not update on every bar and is used throughout the entire model.
Beta = Cov(r1, r2) / Var(r2)
Spread = PriceA - Beta * PriceB
This “frozen” beta provides structural stability and avoids rolling noise in spread construction.
2. Correlation Check
Log-price correlation ensures the instruments move together over time.
Correlation ≥ 0.85 is required before deeper cointegration diagnostics are considered meaningful.
3. Z-Score Normalization and Distribution Behavior
The spread is standardized:
Z = (Spread - MA(Spread)) / Std(Spread)
The following statistical properties are examined:
Z-Mean: Should be close to zero in a stationary process
Z-Variance: Measures amplitude of deviations
Tail Probability: Frequency of |Z| being larger than a threshold (e.g. 2)
These metrics reveal whether the spread behaves like a mean-reverting equilibrium.
4. Mean Drift Stability
A rolling mean of the spread is examined.
If the rolling mean drifts excessively, the spread may not represent a stable long-term equilibrium.
A normalized drift ratio is used:
Mean Drift Ratio = Range( RollingMean(Spread) ) / Std(Spread)
Low drift indicates stable long-run equilibrium behavior.
5. AR(1) Dynamics and Half-Life
An AR(1) model approximates mean reversion:
Spread(t) = Phi * Spread(t-1) + error
Mean reversion requires:
0 < Phi < 1
Half-life of reversion:
Half-life = -ln(2) / ln(Phi)
Valid half-life for 10-minute bars typically falls between 3 and 80 bars.
6. Composite Scoring Model (0–100)
A multi-factor weighted scoring system is applied:
Component Score
Correlation 0–20
Z-Mean 0–15
Z-Variance 0–10
Tail Probability 0–10
Mean Drift 0–15
AR(1) Phi 0–15
Half-Life 0–15
Score interpretation:
70–100: Strong Cointegration Quality
40–70: Moderate
0–40: Weak
A pair is classified as cointegrated when:
Total Score ≥ Threshold (default = 70)
7. Main Cointegration Panel
Displays:
Static beta
Log-price correlation
Z-Mean, Z-Variance, Tail Probability
Drift Ratio
AR(1) Phi and Half-life
Composite score
Overall cointegration assessment
8. Beta Hedge Position Sizing (Average-Price Based)
To provide a more stable hedge ratio, hedge sizing is computed using average prices, not instantaneous prices:
AvgPriceA = SMA(PriceA, N)
AvgPriceB = SMA(PriceB, N)
Required B per 1 A = Beta * (AvgPriceA / AvgPriceB)
Using averaged prices results in a smoother, more reliable hedge ratio, reducing noise from bar-to-bar volatility.
The panel displays:
Required B security for 1 A security (average)
This represents the beta-neutral quantity of B required to hedge one unit of A.
Overview of Classical Stationarity & Cointegration Methods
The principal econometric tools commonly used in assessing stationarity and cointegration include:
Augmented Dickey–Fuller (ADF) Test
Phillips–Perron (PP) Test
KPSS Test
Engle–Granger Cointegration Test
Phillips–Ouliaris Cointegration Test
Johansen Cointegration Test
Since these procedures rely on regression residuals, matrix operations, and distribution-based critical values that are not supported in TradingView Pine Script, a practical multi-criteria scoring approach is employed instead. This framework leverages metrics that are fully computable in Pine and offers an operational proxy for evaluating cointegration-like behavior under platform constraints.
References
Engle & Granger (1987), Co-integration and Error Correction
Poterba & Summers (1988), Mean Reversion in Stock Prices
Vidyamurthy (2004), Pairs Trading
Explanation structured with assistance from OpenAI’s ChatGPT
Regards.
FVG – (auto close + age) GR V1.0FVG – Fair Value Gaps (auto close + age counter)
Short Description
Automatically detects Fair Value Gaps (FVGs) on the current timeframe, keeps them open until price fully fills the gap or a maximum bar age is reached, and shows how many candles have passed since each FVG was created.
Full Description
This indicator automatically finds and visualizes Fair Value Gaps (FVGs) using the classic 3-candle ICT logic on any timeframe.
It works on whatever timeframe you apply it to (M1, M5, H1, H4, etc.) and adapts to the current chart.
FVG detection logic
The script uses a 3-candle pattern:
Bullish FVG
Condition:
low > high
Gap zone:
Lower boundary: high
Upper boundary: low
Bearish FVG
Condition:
high < low
Gap zone:
Lower boundary: high
Upper boundary: low
Each detected FVG is drawn as a colored box (green for bullish, red for bearish in this version, but you can adjust colors in the inputs).
Auto-close rules
An FVG remains on the chart until one of the following happens:
Full fill / mitigation
A bullish FVG closes when any candle’s low goes down to or below the lower boundary of the gap.
A bearish FVG closes when any candle’s high goes up to or above the upper boundary of the gap.
Maximum bar age reached
Each FVG has a maximum lifetime measured in candles.
When the number of candles since its creation reaches the configured maximum (default: 200 bars), the FVG is automatically removed even if it has not been fully filled.
This keeps the chart cleaner and prevents very old gaps from cluttering the view.
Age counter (labels inside the boxes)
Inside every FVG box there is a small label that:
Shows how many bars have passed since the FVG was created.
Moves together with the right edge of the box and stays vertically centered in the gap.
This makes it easy to distinguish fresh gaps from older ones and prioritize which zones you want to pay attention to.
Inputs
FVG color – Main fill color for all FVG boxes.
Show bullish FVGs – Turn bullish gaps on/off.
Show bearish FVGs – Turn bearish gaps on/off.
Max bar age – Maximum number of candles an FVG is allowed to stay on the chart before it is removed.
Usage
Works on any symbol and any timeframe.
Can be combined with your own ICT / SMC concepts, order blocks, session ranges, market structure, etc.
You can also choose to only display bullish or only bearish FVGs depending on your directional bias.
Disclaimer
This script is for educational and informational purposes only and is not financial advice. Always do your own research and use proper risk management when trading.
HPAS mean reversion strategy testerTakes Krown HPAS values hardcoded and simulates longs and short with configurable standard deviation multiplier TP/SL. Best used on lower timeframes
Intraday Close Price VariationShows in the graph the intraday variation, being useful when using the replay feature.
BTC Macro Heatmap (Fed Cuts & Hikes)🔴 1. Red line – Fed Funds Rate (policy trend)
This line tells you what stage of the monetary cycle we’re in.
Rising red line = the Fed is hiking → liquidity is tightening → money leaves risk assets like BTC.
Flat = pause → markets start pricing in the next move (often sideways BTC).
Falling = easing / cutting → liquidity returns → bullish environment builds.
The rate of change matters more than the level. When the slope turns down, capital starts seeking yield again — BTC benefits first because it’s the most volatile asset.
💚 2. Dim green zones – detected cuts
These are data-based easing events pulled directly from FRED.
They show when the actual effective rate began moving down, not necessarily the exact meeting day.
Think of them as the Fed’s “foot off the brake” — that’s when risk markets begin responding.
🟩 3. Bright green lines – official FOMC cuts
These are the real policy shifts — the Fed formally changed direction.
After these appear, BTC historically transitions from accumulation → markup phase.
Look at 2020: the bright green lines came right before BTC’s full reversal.
You’re seeing the same thing now with the 2025 lines — early-stage liquidity return.
🟠 4. Orange line – DXY (US Dollar Index)
DXY is your “risk-off” gauge.
When DXY rises, global investors flock to dollars → BTC usually weakens.
When DXY peaks and starts dropping, it means risk appetite is coming back → BTC rallies.
BTC and DXY are inversely correlated about 70–80% of the time.
Watch for DXY lower highs after rate cuts — that’s your macro confirmation of a BTC-friendly environment.
🟦 5. Aqua line – BTC (normalized)
You’re not looking for the price itself here, but its shape relative to DXY and the Fed line.
When BTC curls up as the red line flattens and DXY rolls over → that’s historically the start of a major bull phase.
BTC tends to bottom before the first cut and explode once DXY decisively breaks down.
🧠 Putting it together
Here’s the rhythm this chart shows over and over:
Fed hikes (red line rising) → BTC weakens, DXY climbs.
Fed pauses (red line flat) → BTC stops falling, DXY tops.
Fed cuts (dim + bright green) → DXY turns down → BTC begins long recovery → bull cycle starts.
RLSR logreg_support_libLibrary "logreg_support_lib"
sigmoid(z)
Parameters:
z (float)
prng01(seed1, seed2)
Parameters:
seed1 (float)
seed2 (float)
normalize(value, minval, maxval)
Parameters:
value (float)
minval (float)
maxval (float)
calcpercentilefast(arr, percentile)
Parameters:
arr (array)
percentile (float)
calcpercentile_series_sampled(s, length, percentile, stride)
Parameters:
s (float)
length (int)
percentile (float)
stride (int)
calcRangeWithLog(value, minval, maxval, uselog)
Parameters:
value (float)
minval (float)
maxval (float)
uselog (bool)
calcMomentumAdvanced(src, length, momType)
Parameters:
src (float)
length (simple int)
momType (string)
normalizeMomentumByType(rawMom, momType, momMin, momMax, momNorm)
Parameters:
rawMom (float)
momType (string)
momMin (float)
momMax (float)
momNorm (float)
normalizeMomentumByTypeExt(rawMom, momType, momMin, momMax, momNorm, bouncingdecay)
Parameters:
rawMom (float)
momType (string)
momMin (float)
momMax (float)
momNorm (float)
bouncingdecay (float)
calcrollingstddev(src, length)
Parameters:
src (float)
length (int)
addlog(buffer, level, msg)
Parameters:
buffer (string)
level (string)
msg (string)
calcfeaturecorrelation(x1, x2)
Parameters:
x1 (array)
x2 (array)
calcnoiseratio(src, lookback)
Parameters:
src (float)
lookback (int)
calccompatibilityscore(x1, x2)
Parameters:
x1 (array)
x2 (array)
getfuturereturn(offset, returnlookback)
Parameters:
offset (int)
returnlookback (int)
calculatema(source, length, matype)
Parameters:
source (float)
length (simple int)
matype (string)
adaptive_trigger_for_source(src, enabled, freeze, lookback, threshold, volahistory)
Parameters:
src (float)
enabled (bool)
freeze (bool)
lookback (int)
threshold (float)
volahistory (array)
checkadaptivetrigger5(s1, enabled1, freeze1, hist1, s2, enabled2, freeze2, hist2, s3, enabled3, freeze3, hist3, s4, enabled4, freeze4, hist4, s5, enabled5, freeze5, hist5, lookback, threshold)
Parameters:
s1 (float)
enabled1 (bool)
freeze1 (bool)
hist1 (array)
s2 (float)
enabled2 (bool)
freeze2 (bool)
hist2 (array)
s3 (float)
enabled3 (bool)
freeze3 (bool)
hist3 (array)
s4 (float)
enabled4 (bool)
freeze4 (bool)
hist4 (array)
s5 (float)
enabled5 (bool)
freeze5 (bool)
hist5 (array)
lookback (int)
threshold (float)
ring_start_index(rb_write_idx, rb_count, rb_cap)
Parameters:
rb_write_idx (int)
rb_count (int)
rb_cap (int)
reversalLibrary "reversals"
psar(af_start, af_increment, af_max)
Calculates Parabolic Stop And Reverse (SAR)
Parameters:
af_start (simple float) : Initial acceleration factor (Wilder's original: 0.02)
af_increment (simple float) : Acceleration factor increment per new extreme (Wilder's original: 0.02)
af_max (simple float) : Maximum acceleration factor (Wilder's original: 0.20)
Returns: SAR value (stop level for current trend)
fractals()
Detects Williams Fractal patterns (5-bar pattern)
Returns: Tuple with fractal values (na if no fractal)
swings(lookback, source_high, source_low)
Detects swing highs and swing lows using lookback period
Parameters:
lookback (simple int) : Number of bars on each side to confirm swing point
source_high (float) : Price series for swing high detection (typically high)
source_low (float) : Price series for swing low detection (typically low)
Returns: Tuple with swing point values (na if no swing)
pivot(tf)
Calculates classic/standard/floor pivot points
Parameters:
tf (simple string) : Timeframe for pivot calculation ("D", "W", "M")
Returns: Tuple with pivot levels
pivotcam(tf)
Calculates Camarilla pivot points with 8 levels for short-term trading
Parameters:
tf (simple string) : Timeframe for pivot calculation ("D", "W", "M")
Returns: Tuple with pivot levels
pivotdem(tf)
Calculates d-mark pivot points with conditional open/close logic
Parameters:
tf (simple string) : Timeframe for pivot calculation ("D", "W", "M")
Returns: Tuple with pivot levels (only 3 levels)
pivotext(tf)
Calculates extended traditional pivot points with R4-R5 and S4-S5 levels
Parameters:
tf (simple string) : Timeframe for pivot calculation ("D", "W", "M")
Returns: Tuple with pivot levels
pivotfib(tf)
Calculates Fibonacci pivot points using Fibonacci ratios
Parameters:
tf (simple string) : Timeframe for pivot calculation ("D", "W", "M")
Returns: Tuple with pivot levels
pivotwood(tf)
Calculates Woodie's pivot points with weighted closing price
Parameters:
tf (simple string) : Timeframe for pivot calculation ("D", "W", "M")
Returns: Tuple with pivot levels
Weekday Close vs Open — Last N (per weekday)# Weekday Close vs Open - Last N Occurrences
This indicator distills every weekday's historical open-to-close behavior into a compact table so you can see how "typical" the current session is before the day even closes. It runs independently of your chart timeframe by pulling daily OHLCV data under the hood, tracking the last **N** completed occurrences for each weekday, and refreshing only when a daily bar closes. On daily charts you can also shade every past bar that matches today's weekday (excluding the in-progress session) to reinforce the pattern visually while the table remains non-repainting.
## What It Shows
- **Win/Loss/Tie counts** - how many of the last `N` occurrences closed above the open (wins), below (losses), or inside the tie threshold you define as "flat".
- **Win % heatmap** - the win column is color-coded (deep green > deep red) so you immediately recognize strong or weak weekdays.
- **Advanced metrics (optional)** - average daily volume plus the average percentage excursion above/below the open (`AvgUp%`, `AvgDn%`) for that weekday.
- **Totals row** - aggregates every weekday into one row to estimate overall hit rate and average stats across the entire data set.
- **Weekday shading (optional)** - on daily charts you can tint every bar that matches today's weekday (all Mondays, all Fridays, etc.) for instant pattern recognition.
## How It Works
1. The script requests daily OHLCV data (non-repainting) regardless of the chart timeframe.
2. When a new daily bar confirms, it packs that day's data into one of seven arrays (one per weekday). Each day contributes five floats (O/H/L/C/V) so trimming and statistics stay in lockstep.
3. A helper function (`f_dayMetrics`) scans daily history to compute average volume, average excursion above/below the open, and win/loss/tie counts for the requested weekday.
4. The table populates on the last bar of the chart session, respecting your advanced/totals toggles and keeping text at `size.normal`.
## Reading the Table
- **Win/Loss/Tie columns**: raw counts taken from your chosen `N`.
- **Win %***: excludes ties from the denominator so it reflects only decisive closes.
- **AvgUp% / AvgDn%**: typical intraday extension (high vs open, open vs low) in percent.
- **Avg Vol**: arithmetic mean of daily volume for that weekday.
- **TOTAL row**: provides a global win rate plus volume/up/down averages weighted by how many samples each weekday contributed.
## Practical Uses
- Spot weekdays that historically trend higher or lower before entering a trade.
- Compare current price action against the typical intraday range (`AvgUp%` vs today's move).
- Filter mean-reversion vs breakout setups based on the most reliable weekday patterns.
- Quickly gauge whether today is behaving "in character" by referencing the highlighted row or the optional whole-chart weekday shading.
> **Tip:** Use smaller `N` values (e.g., 10-20) for adaptive, recent behavior and larger values (50+) to capture longer-term seasonality. Tighten the tie threshold if you want almost every candle to register as win/loss, or widen it to focus only on meaningful moves.






















