High Probability Order Blocks [AlgoAlpha]🟠 OVERVIEW
This script detects and visualizes high-probability order blocks by combining a volatility-based z-score trigger with a statistical survival model inspired by Kaplan-Meier estimation. It builds and manages bullish and bearish order blocks dynamically on the chart, displays live survival probabilities per block, and plots optional rejection signals. What makes this tool unique is its use of historical mitigation behavior to estimate and plot how likely each zone is to persist, offering traders a probabilistic perspective on order block strength—something rarely seen in retail indicators.
🟠 CONCEPTS
Order blocks are regions of strong institutional interest, often marked by large imbalances between buying and selling. This script identifies those areas using z-score thresholds on directional distance (up or down candles), detecting statistically significant moves that signal potential smart money footprints. A bullish block is drawn when a strong up-move (zUp > 4) follows a down candle, and vice versa for bearish blocks. Over time, each block is evaluated: if price “mitigates” it (i.e., closes cleanly past the opposite side and confirmed with a 1 bar delay), it’s considered resolved and logged. These resolved blocks then inform a Kaplan-Meier-like survival curve, estimating the likelihood that future blocks of a given age will remain unbroken. The indicator then draws a probability curve for each side (bull/bear), updating it in real time.
🟠 FEATURES
Live label inside each block showing survival probability or “N.E.D.” if insufficient data.
Kaplan-Meier survival curves drawn directly on the chart to show estimated strength decay.
Rejection markers (▲ ▼) if price bounces cleanly off an active order block.
Alerts for zone creation and rejection signals, supporting rule-based trading workflows.
🟠 USAGE
Read the label inside each block for Age | Survival% (or N.E.D. if there aren’t enough samples yet); higher survival % suggests blocks of that age have historically lasted longer.
Use the right-side survival curves to gauge how probability decays with age for bull vs bear blocks, and align entries with the side showing stronger survival at current age.
Treat ▲ (bullish rejection) and ▼ (bearish rejection) as optional confluence when price tests a boundary and fails to break.
Turn on alerts for “Bullish Zone Created,” “Bearish Zone Created,” and rejection signals so you don’t need to watch constantly.
If your chart gets crowded, enable Prevent Overlap ; tune Max Box Age to your timeframe; and adjust KM Training Window / Minimum Samples to trade off responsiveness vs stability.
Indikatoren und Strategien
Volumatic Fair Value Gaps [BigBeluga]🔵 OVERVIEW
The Volumatic Fair Value Gaps indicator detects and plots size-filtered Fair Value Gaps (FVGs) and immediately analyzes the bullish vs. bearish volume composition inside each gap. When an FVG forms, the tool samples volume from a 10× lower timeframe , splits it into Buy and Sell components, and overlays two compact bars whose percentages always sum to 100%. Each gap also shows its total traded volume . A live dashboard (top-right) summarizes how many bullish and bearish FVGs are currently active and their cumulative volumes—offering a quick read on directional participation and trend pressure.
🔵 CONCEPTS
FVGs (Fair Value Gaps) : Imbalance zones between three consecutive candles where price “skips” trading. The script plots bullish and bearish gaps and extends them until mitigated.
Size Filtering : Only significant gaps (by relative size percentile) are drawn, reducing noise and emphasizing meaningful imbalances.
// Gap Filters
float diff = close > open ? (low - high ) / low * 100 : (low - high) / high *100
float sizeFVG = diff / ta.percentile_nearest_rank(diff, 1000, 100) * 100
bool filterFVG = sizeFVG > 15
Volume Decomposition : For each FVG, the indicator inspects a 10× lower timeframe and aggregates volume of bullish vs. bearish candles inside the gap’s span.
100% Split Bars : Two inline bars per FVG display the % Bull and % Bear shares; their total is always 100%.
Total Gap Volume : A numeric label at the right edge of the FVG shows the total traded volume associated with that gap.
Mitigation Logic : Gaps are removed when price closes through (or touches via high/low—user-selectable) the opposite boundary.
Dashboard Summary : Counts and sums the active bullish/bearish FVGs and their total volumes to gauge directional dominance.
🔵 FEATURES
Bullish & Bearish FVG plotting with independent color controls and visibility toggles.
Adaptive size filter (percentile-based) to keep only impactful gaps.
Lower-TF volume sampling at 10× faster resolution for more granular Buy/Sell breakdown.
Per-FVG volume bars : two horizontal bars showing Bull % and Bear % (sum = 100%).
Per-FVG total volume label displayed at the right end of the gap’s body.
Mitigation source option : choose close or high/low for removing/invalidating gaps.
Overlap control : older overlapped gaps are cleaned to avoid clutter.
Auto-extension : active gaps extend right until mitigated.
Dashboard : shows count of bullish/bearish gaps on chart and cumulative volume totals for each side.
Performance safeguards : caps the number of active FVG boxes to maintain responsiveness.
🔵 HOW TO USE
Turn on/off FVG types : Enable Bullish FVG and/or Bearish FVG depending on your focus.
Tune the filter : The script already filters by relative size; if you need fewer (stronger) signals, increase the percentile threshold in code or reduce the number of displayed boxes.
Choose mitigation source :
close — stricter; gap is removed when a closing price crosses the boundary.
high/low — more sensitive; a wick through the boundary mitigates the gap.
Read the per-FVG bars :
A higher Bull % inside a bullish gap suggests constructive demand backing the imbalance.
A higher Bear % inside a bearish gap suggests supply is enforcing the imbalance.
Use total gap volume : Larger totals imply more meaningful interest at that imbalance; confluence with structure/HTF levels increases relevance.
Watch the dashboard : If bullish counts and cumulative volume exceed bearish, market pressure is likely skewed upward (and vice versa). Combine with trend tools or market structure for entries/exits.
Optional: hide volume bars : Disable Volume Bars when you want a cleaner FVG map while keeping total volume labels and the dashboard.
🔵 CONCLUSION
Volumatic Fair Value Gaps blends precise FVG detection with lower-timeframe volume analytics to show not only where imbalances exist but also who powers them. The per-gap Bull/Bear % bars, total volume labels, and the cumulative dashboard together provide a fast, high-signal read on directional participation. Use the tool to prioritize higher-quality gaps, align with trend bias, and time mitigations or continuations with greater confidence.
ATAI Volume analysis with price action V 1.00ATAI Volume Analysis with Price Action
1. Introduction
1.1 Overview
ATAI Volume Analysis with Price Action is a composite indicator designed for TradingView. It combines per‑side volume data —that is, how much buying and selling occurs during each bar—with standard price‑structure elements such as swings, trend lines and support/resistance. By blending these elements the script aims to help a trader understand which side is in control, whether a breakout is genuine, when markets are potentially exhausted and where liquidity providers might be active.
The indicator is built around TradingView’s up/down volume feed accessed via the TradingView/ta/10 library. The following excerpt from the script illustrates how this feed is configured:
import TradingView/ta/10 as tvta
// Determine lower timeframe string based on user choice and chart resolution
string lower_tf_breakout = use_custom_tf_input ? custom_tf_input :
timeframe.isseconds ? "1S" :
timeframe.isintraday ? "1" :
timeframe.isdaily ? "5" : "60"
// Request up/down volume (both positive)
= tvta.requestUpAndDownVolume(lower_tf_breakout)
Lower‑timeframe selection. If you do not specify a custom lower timeframe, the script chooses a default based on your chart resolution: 1 second for second charts, 1 minute for intraday charts, 5 minutes for daily charts and 60 minutes for anything longer. Smaller intervals provide a more precise view of buyer and seller flow but cover fewer bars. Larger intervals cover more history at the cost of granularity.
Tick vs. time bars. Many trading platforms offer a tick / intrabar calculation mode that updates an indicator on every trade rather than only on bar close. Turning on one‑tick calculation will give the most accurate split between buy and sell volume on the current bar, but it typically reduces the amount of historical data available. For the highest fidelity in live trading you can enable this mode; for studying longer histories you might prefer to disable it. When volume data is completely unavailable (some instruments and crypto pairs), all modules that rely on it will remain silent and only the price‑structure backbone will operate.
Figure caption, Each panel shows the indicator’s info table for a different volume sampling interval. In the left chart, the parentheses “(5)” beside the buy‑volume figure denote that the script is aggregating volume over five‑minute bars; the center chart uses “(1)” for one‑minute bars; and the right chart uses “(1T)” for a one‑tick interval. These notations tell you which lower timeframe is driving the volume calculations. Shorter intervals such as 1 minute or 1 tick provide finer detail on buyer and seller flow, but they cover fewer bars; longer intervals like five‑minute bars smooth the data and give more history.
Figure caption, The values in parentheses inside the info table come directly from the Breakout — Settings. The first row shows the custom lower-timeframe used for volume calculations (e.g., “(1)”, “(5)”, or “(1T)”)
2. Price‑Structure Backbone
Even without volume, the indicator draws structural features that underpin all other modules. These features are always on and serve as the reference levels for subsequent calculations.
2.1 What it draws
• Pivots: Swing highs and lows are detected using the pivot_left_input and pivot_right_input settings. A pivot high is identified when the high recorded pivot_right_input bars ago exceeds the highs of the preceding pivot_left_input bars and is also higher than (or equal to) the highs of the subsequent pivot_right_input bars; pivot lows follow the inverse logic. The indicator retains only a fixed number of such pivot points per side, as defined by point_count_input, discarding the oldest ones when the limit is exceeded.
• Trend lines: For each side, the indicator connects the earliest stored pivot and the most recent pivot (oldest high to newest high, and oldest low to newest low). When a new pivot is added or an old one drops out of the lookback window, the line’s endpoints—and therefore its slope—are recalculated accordingly.
• Horizontal support/resistance: The highest high and lowest low within the lookback window defined by length_input are plotted as horizontal dashed lines. These serve as short‑term support and resistance levels.
• Ranked labels: If showPivotLabels is enabled the indicator prints labels such as “HH1”, “HH2”, “LL1” and “LL2” near each pivot. The ranking is determined by comparing the price of each stored pivot: HH1 is the highest high, HH2 is the second highest, and so on; LL1 is the lowest low, LL2 is the second lowest. In the case of equal prices the newer pivot gets the better rank. Labels are offset from price using ½ × ATR × label_atr_multiplier, with the ATR length defined by label_atr_len_input. A dotted connector links each label to the candle’s wick.
2.2 Key settings
• length_input: Window length for finding the highest and lowest values and for determining trend line endpoints. A larger value considers more history and will generate longer trend lines and S/R levels.
• pivot_left_input, pivot_right_input: Strictness of swing confirmation. Higher values require more bars on either side to form a pivot; lower values create more pivots but may include minor swings.
• point_count_input: How many pivots are kept in memory on each side. When new pivots exceed this number the oldest ones are discarded.
• label_atr_len_input and label_atr_multiplier: Determine how far pivot labels are offset from the bar using ATR. Increasing the multiplier moves labels further away from price.
• Styling inputs for trend lines, horizontal lines and labels (color, width and line style).
Figure caption, The chart illustrates how the indicator’s price‑structure backbone operates. In this daily example, the script scans for bars where the high (or low) pivot_right_input bars back is higher (or lower) than the preceding pivot_left_input bars and higher or lower than the subsequent pivot_right_input bars; only those bars are marked as pivots.
These pivot points are stored and ranked: the highest high is labelled “HH1”, the second‑highest “HH2”, and so on, while lows are marked “LL1”, “LL2”, etc. Each label is offset from the price by half of an ATR‑based distance to keep the chart clear, and a dotted connector links the label to the actual candle.
The red diagonal line connects the earliest and latest stored high pivots, and the green line does the same for low pivots; when a new pivot is added or an old one drops out of the lookback window, the end‑points and slopes adjust accordingly. Dashed horizontal lines mark the highest high and lowest low within the current lookback window, providing visual support and resistance levels. Together, these elements form the structural backbone that other modules reference, even when volume data is unavailable.
3. Breakout Module
3.1 Concept
This module confirms that a price break beyond a recent high or low is supported by a genuine shift in buying or selling pressure. It requires price to clear the highest high (“HH1”) or lowest low (“LL1”) and, simultaneously, that the winning side shows a significant volume spike, dominance and ranking. Only when all volume and price conditions pass is a breakout labelled.
3.2 Inputs
• lookback_break_input : This controls the number of bars used to compute moving averages and percentiles for volume. A larger value smooths the averages and percentiles but makes the indicator respond more slowly.
• vol_mult_input : The “spike” multiplier; the current buy or sell volume must be at least this multiple of its moving average over the lookback window to qualify as a breakout.
• rank_threshold_input (0–100) : Defines a volume percentile cutoff: the current buyer/seller volume must be in the top (100−threshold)%(100−threshold)% of all volumes within the lookback window. For example, if set to 80, the current volume must be in the top 20 % of the lookback distribution.
• ratio_threshold_input (0–1) : Specifies the minimum share of total volume that the buyer (for a bullish breakout) or seller (for bearish) must hold on the current bar; the code also requires that the cumulative buyer volume over the lookback window exceeds the seller volume (and vice versa for bearish cases).
• use_custom_tf_input / custom_tf_input : When enabled, these inputs override the automatic choice of lower timeframe for up/down volume; otherwise the script selects a sensible default based on the chart’s timeframe.
• Label appearance settings : Separate options control the ATR-based offset length, offset multiplier, label size and colors for bullish and bearish breakout labels, as well as the connector style and width.
3.3 Detection logic
1. Data preparation : Retrieve per‑side volume from the lower timeframe and take absolute values. Build rolling arrays of the last lookback_break_input values to compute simple moving averages (SMAs), cumulative sums and percentile ranks for buy and sell volume.
2. Volume spike: A spike is flagged when the current buy (or, in the bearish case, sell) volume is at least vol_mult_input times its SMA over the lookback window.
3. Dominance test: The buyer’s (or seller’s) share of total volume on the current bar must meet or exceed ratio_threshold_input. In addition, the cumulative sum of buyer volume over the window must exceed the cumulative sum of seller volume for a bullish breakout (and vice versa for bearish). A separate requirement checks the sign of delta: for bullish breakouts delta_breakout must be non‑negative; for bearish breakouts it must be non‑positive.
4. Percentile rank: The current volume must fall within the top (100 – rank_threshold_input) percent of the lookback distribution—ensuring that the spike is unusually large relative to recent history.
5. Price test: For a bullish signal, the closing price must close above the highest pivot (HH1); for a bearish signal, the close must be below the lowest pivot (LL1).
6. Labeling: When all conditions above are satisfied, the indicator prints “Breakout ↑” above the bar (bullish) or “Breakout ↓” below the bar (bearish). Labels are offset using half of an ATR‑based distance and linked to the candle with a dotted connector.
Figure caption, (Breakout ↑ example) , On this daily chart, price pushes above the red trendline and the highest prior pivot (HH1). The indicator recognizes this as a valid breakout because the buyer‑side volume on the lower timeframe spikes above its recent moving average and buyers dominate the volume statistics over the lookback period; when combined with a close above HH1, this satisfies the breakout conditions. The “Breakout ↑” label appears above the candle, and the info table highlights that up‑volume is elevated relative to its 11‑bar average, buyer share exceeds the dominance threshold and money‑flow metrics support the move.
Figure caption, In this daily example, price breaks below the lowest pivot (LL1) and the lower green trendline. The indicator identifies this as a bearish breakout because sell‑side volume is sharply elevated—about twice its 11‑bar average—and sellers dominate both the bar and the lookback window. With the close falling below LL1, the script triggers a Breakout ↓ label and marks the corresponding row in the info table, which shows strong down volume, negative delta and a seller share comfortably above the dominance threshold.
4. Market Phase Module (Volume Only)
4.1 Concept
Not all markets trend; many cycle between periods of accumulation (buying pressure building up), distribution (selling pressure dominating) and neutral behavior. This module classifies the current bar into one of these phases without using ATR , relying solely on buyer and seller volume statistics. It looks at net flows, ratio changes and an OBV‑like cumulative line with dual‑reference (1‑ and 2‑bar) trends. The result is displayed both as on‑chart labels and in a dedicated row of the info table.
4.2 Inputs
• phase_period_len: Number of bars over which to compute sums and ratios for phase detection.
• phase_ratio_thresh : Minimum buyer share (for accumulation) or minimum seller share (for distribution, derived as 1 − phase_ratio_thresh) of the total volume.
• strict_mode: When enabled, both the 1‑bar and 2‑bar changes in each statistic must agree on the direction (strict confirmation); when disabled, only one of the two references needs to agree (looser confirmation).
• Color customisation for info table cells and label styling for accumulation and distribution phases, including ATR length, multiplier, label size, colors and connector styles.
• show_phase_module: Toggles the entire phase detection subsystem.
• show_phase_labels: Controls whether on‑chart labels are drawn when accumulation or distribution is detected.
4.3 Detection logic
The module computes three families of statistics over the volume window defined by phase_period_len:
1. Net sum (buyers minus sellers): net_sum_phase = Σ(buy) − Σ(sell). A positive value indicates a predominance of buyers. The code also computes the differences between the current value and the values 1 and 2 bars ago (d_net_1, d_net_2) to derive up/down trends.
2. Buyer ratio: The instantaneous ratio TF_buy_breakout / TF_tot_breakout and the window ratio Σ(buy) / Σ(total). The current ratio must exceed phase_ratio_thresh for accumulation or fall below 1 − phase_ratio_thresh for distribution. The first and second differences of the window ratio (d_ratio_1, d_ratio_2) determine trend direction.
3. OBV‑like cumulative net flow: An on‑balance volume analogue obv_net_phase increments by TF_buy_breakout − TF_sell_breakout each bar. Its differences over the last 1 and 2 bars (d_obv_1, d_obv_2) provide trend clues.
The algorithm then combines these signals:
• For strict mode , accumulation requires: (a) current ratio ≥ threshold, (b) cumulative ratio ≥ threshold, (c) both ratio differences ≥ 0, (d) net sum differences ≥ 0, and (e) OBV differences ≥ 0. Distribution is the mirror case.
• For loose mode , it relaxes the directional tests: either the 1‑ or the 2‑bar difference needs to agree in each category.
If all conditions for accumulation are satisfied, the phase is labelled “Accumulation” ; if all conditions for distribution are satisfied, it’s labelled “Distribution” ; otherwise the phase is “Neutral” .
4.4 Outputs
• Info table row : Row 8 displays “Market Phase (Vol)” on the left and the detected phase (Accumulation, Distribution or Neutral) on the right. The text colour of both cells matches a user‑selectable palette (typically green for accumulation, red for distribution and grey for neutral).
• On‑chart labels : When show_phase_labels is enabled and a phase persists for at least one bar, the module prints a label above the bar ( “Accum” ) or below the bar ( “Dist” ) with a dashed or dotted connector. The label is offset using ATR based on phase_label_atr_len_input and phase_label_multiplier and is styled according to user preferences.
Figure caption, The chart displays a red “Dist” label above a particular bar, indicating that the accumulation/distribution module identified a distribution phase at that point. The detection is based on seller dominance: during that bar, the net buyer-minus-seller flow and the OBV‑style cumulative flow were trending down, and the buyer ratio had dropped below the preset threshold. These conditions satisfy the distribution criteria in strict mode. The label is placed above the bar using an ATR‑based offset and a dashed connector. By the time of the current bar in the screenshot, the phase indicator shows “Neutral” in the info table—signaling that neither accumulation nor distribution conditions are currently met—yet the historical “Dist” label remains to mark where the prior distribution phase began.
Figure caption, In this example the market phase module has signaled an Accumulation phase. Three bars before the current candle, the algorithm detected a shift toward buyers: up‑volume exceeded its moving average, down‑volume was below average, and the buyer share of total volume climbed above the threshold while the on‑balance net flow and cumulative ratios were trending upwards. The blue “Accum” label anchored below that bar marks the start of the phase; it remains on the chart because successive bars continue to satisfy the accumulation conditions. The info table confirms this: the “Market Phase (Vol)” row still reads Accumulation, and the ratio and sum rows show buyers dominating both on the current bar and across the lookback window.
5. OB/OS Spike Module
5.1 What overbought/oversold means here
In many markets, a rapid extension up or down is often followed by a period of consolidation or reversal. The indicator interprets overbought (OB) conditions as abnormally strong selling risk at or after a price rally and oversold (OS) conditions as unusually strong buying risk after a decline. Importantly, these are not direct trade signals; rather they flag areas where caution or contrarian setups may be appropriate.
5.2 Inputs
• minHits_obos (1–7): Minimum number of oscillators that must agree on an overbought or oversold condition for a label to print.
• syncWin_obos: Length of a small sliding window over which oscillator votes are smoothed by taking the maximum count observed. This helps filter out choppy signals.
• Volume spike criteria: kVolRatio_obos (ratio of current volume to its SMA) and zVolThr_obos (Z‑score threshold) across volLen_obos. Either threshold can trigger a spike.
• Oscillator toggles and periods: Each of RSI, Stochastic (K and D), Williams %R, CCI, MFI, DeMarker and Stochastic RSI can be independently enabled; their periods are adjustable.
• Label appearance: ATR‑based offset, size, colors for OB and OS labels, plus connector style and width.
5.3 Detection logic
1. Directional volume spikes: Volume spikes are computed separately for buyer and seller volumes. A sell volume spike (sellVolSpike) flags a potential OverBought bar, while a buy volume spike (buyVolSpike) flags a potential OverSold bar. A spike occurs when the respective volume exceeds kVolRatio_obos times its simple moving average over the window or when its Z‑score exceeds zVolThr_obos.
2. Oscillator votes: For each enabled oscillator, calculate its overbought and oversold state using standard thresholds (e.g., RSI ≥ 70 for OB and ≤ 30 for OS; Stochastic %K/%D ≥ 80 for OB and ≤ 20 for OS; etc.). Count how many oscillators vote for OB and how many vote for OS.
3. Minimum hits: Apply the smoothing window syncWin_obos to the vote counts using a maximum‑of‑last‑N approach. A candidate bar is only considered if the smoothed OB hit count ≥ minHits_obos (for OverBought) or the smoothed OS hit count ≥ minHits_obos (for OverSold).
4. Tie‑breaking: If both OverBought and OverSold spike conditions are present on the same bar, compare the smoothed hit counts: the side with the higher count is selected; ties default to OverBought.
5. Label printing: When conditions are met, the bar is labelled as “OverBought X/7” above the candle or “OverSold X/7” below it. “X” is the number of oscillators confirming, and the bracket lists the abbreviations of contributing oscillators. Labels are offset from price using half of an ATR‑scaled distance and can optionally include a dotted or dashed connector line.
Figure caption, In this chart the overbought/oversold module has flagged an OverSold signal. A sell‑off from the prior highs brought price down to the lower trend‑line, where the bar marked “OverSold 3/7 DeM” appears. This label indicates that on that bar the module detected a buy‑side volume spike and that at least three of the seven enabled oscillators—in this case including the DeMarker—were in oversold territory. The label is printed below the candle with a dotted connector, signaling that the market may be temporarily exhausted on the downside. After this oversold print, price begins to rebound towards the upper red trend‑line and higher pivot levels.
Figure caption, This example shows the overbought/oversold module in action. In the left‑hand panel you can see the OB/OS settings where each oscillator (RSI, Stochastic, Williams %R, CCI, MFI, DeMarker and Stochastic RSI) can be enabled or disabled, and the ATR length and label offset multiplier adjusted. On the chart itself, price has pushed up to the descending red trendline and triggered an “OverBought 3/7” label. That means the sell‑side volume spiked relative to its average and three out of the seven enabled oscillators were in overbought territory. The label is offset above the candle by half of an ATR and connected with a dashed line, signaling that upside momentum may be overextended and a pause or pullback could follow.
6. Buyer/Seller Trap Module
6.1 Concept
A bull trap occurs when price appears to break above resistance, attracting buyers, but fails to sustain the move and quickly reverses, leaving a long upper wick and trapping late entrants. A bear trap is the opposite: price breaks below support, lures in sellers, then snaps back, leaving a long lower wick and trapping shorts. This module detects such traps by looking for price structure sweeps, order‑flow mismatches and dominance reversals. It uses a scoring system to differentiate risk from confirmed traps.
6.2 Inputs
• trap_lookback_len: Window length used to rank extremes and detect sweeps.
• trap_wick_threshold: Minimum proportion of a bar’s range that must be wick (upper for bull traps, lower for bear traps) to qualify as a sweep.
• trap_score_risk: Minimum aggregated score required to flag a trap risk. (The code defines a trap_score_confirm input, but confirmation is actually based on price reversal rather than a separate score threshold.)
• trap_confirm_bars: Maximum number of bars allowed for price to reverse and confirm the trap. If price does not reverse in this window, the risk label will expire or remain unconfirmed.
• Label settings: ATR length and multiplier for offsetting, size, colours for risk and confirmed labels, and connector style and width. Separate settings exist for bull and bear traps.
• Toggle inputs: show_trap_module and show_trap_labels enable the module and control whether labels are drawn on the chart.
6.3 Scoring logic
The module assigns points to several conditions and sums them to determine whether a trap risk is present. For bull traps, the score is built from the following (bear traps mirror the logic with highs and lows swapped):
1. Sweep (2 points): Price trades above the high pivot (HH1) but fails to close above it and leaves a long upper wick at least trap_wick_threshold × range. For bear traps, price dips below the low pivot (LL1), fails to close below and leaves a long lower wick.
2. Close break (1 point): Price closes beyond HH1 or LL1 without leaving a long wick.
3. Candle/delta mismatch (2 points): The candle closes bullish yet the order flow delta is negative or the seller ratio exceeds 50%, indicating hidden supply. Conversely, a bearish close with positive delta or buyer dominance suggests hidden demand.
4. Dominance inversion (2 points): The current bar’s buyer volume has the highest rank in the lookback window while cumulative sums favor sellers, or vice versa.
5. Low‑volume break (1 point): Price crosses the pivot but total volume is below its moving average.
The total score for each side is compared to trap_score_risk. If the score is high enough, a “Bull Trap Risk” or “Bear Trap Risk” label is drawn, offset from the candle by half of an ATR‑scaled distance using a dashed outline. If, within trap_confirm_bars, price reverses beyond the opposite level—drops back below the high pivot for bull traps or rises above the low pivot for bear traps—the label is upgraded to a solid “Bull Trap” or “Bear Trap” . In this version of the code, there is no separate score threshold for confirmation: the variable trap_score_confirm is unused; confirmation depends solely on a successful price reversal within the specified number of bars.
Figure caption, In this example the trap module has flagged a Bear Trap Risk. Price initially breaks below the most recent low pivot (LL1), but the bar closes back above that level and leaves a long lower wick, suggesting a failed push lower. Combined with a mismatch between the candle direction and the order flow (buyers regain control) and a reversal in volume dominance, the aggregate score exceeds the risk threshold, so a dashed “Bear Trap Risk” label prints beneath the bar. The green and red trend lines mark the current low and high pivot trajectories, while the horizontal dashed lines show the highest and lowest values in the lookback window. If, within the next few bars, price closes decisively above the support, the risk label would upgrade to a solid “Bear Trap” label.
Figure caption, In this example the trap module has identified both ends of a price range. Near the highs, price briefly pushes above the descending red trendline and the recent pivot high, but fails to close there and leaves a noticeable upper wick. That combination of a sweep above resistance and order‑flow mismatch generates a Bull Trap Risk label with a dashed outline, warning that the upside break may not hold. At the opposite extreme, price later dips below the green trendline and the labelled low pivot, then quickly snaps back and closes higher. The long lower wick and subsequent price reversal upgrade the previous bear‑trap risk into a confirmed Bear Trap (solid label), indicating that sellers were caught on a false breakdown. Horizontal dashed lines mark the highest high and lowest low of the lookback window, while the red and green diagonals connect the earliest and latest pivot highs and lows to visualize the range.
7. Sharp Move Module
7.1 Concept
Markets sometimes display absorption or climax behavior—periods when one side steadily gains the upper hand before price breaks out with a sharp move. This module evaluates several order‑flow and volume conditions to anticipate such moves. Users can choose how many conditions must be met to flag a risk and how many (plus a price break) are required for confirmation.
7.2 Inputs
• sharp Lookback: Number of bars in the window used to compute moving averages, sums, percentile ranks and reference levels.
• sharpPercentile: Minimum percentile rank for the current side’s volume; the current buy (or sell) volume must be greater than or equal to this percentile of historical volumes over the lookback window.
• sharpVolMult: Multiplier used in the volume climax check. The current side’s volume must exceed this multiple of its average to count as a climax.
• sharpRatioThr: Minimum dominance ratio (current side’s volume relative to the opposite side) used in both the instant and cumulative dominance checks.
• sharpChurnThr: Maximum ratio of a bar’s range to its ATR for absorption/churn detection; lower values indicate more absorption (large volume in a small range).
• sharpScoreRisk: Minimum number of conditions that must be true to print a risk label.
• sharpScoreConfirm: Minimum number of conditions plus a price break required for confirmation.
• sharpCvdThr: Threshold for cumulative delta divergence versus price change (positive for bullish accumulation, negative for bearish distribution).
• Label settings: ATR length (sharpATRlen) and multiplier (sharpLabelMult) for positioning labels, label size, colors and connector styles for bullish and bearish sharp moves.
• Toggles: enableSharp activates the module; show_sharp_labels controls whether labels are drawn.
7.3 Conditions (six per side)
For each side, the indicator computes six boolean conditions and sums them to form a score:
1. Dominance (instant and cumulative):
– Instant dominance: current buy volume ≥ sharpRatioThr × current sell volume.
– Cumulative dominance: sum of buy volumes over the window ≥ sharpRatioThr × sum of sell volumes (and vice versa for bearish checks).
2. Accumulation/Distribution divergence: Over the lookback window, cumulative delta rises by at least sharpCvdThr while price fails to rise (bullish), or cumulative delta falls by at least sharpCvdThr while price fails to fall (bearish).
3. Volume climax: The current side’s volume is ≥ sharpVolMult × its average and the product of volume and bar range is the highest in the lookback window.
4. Absorption/Churn: The current side’s volume divided by the bar’s range equals the highest value in the window and the bar’s range divided by ATR ≤ sharpChurnThr (indicating large volume within a small range).
5. Percentile rank: The current side’s volume percentile rank is ≥ sharp Percentile.
6. Mirror logic for sellers: The above checks are repeated with buyer and seller roles swapped and the price break levels reversed.
Each condition that passes contributes one point to the corresponding side’s score (0 or 1). Risk and confirmation thresholds are then applied to these scores.
7.4 Scoring and labels
• Risk: If scoreBull ≥ sharpScoreRisk, a “Sharp ↑ Risk” label is drawn above the bar. If scoreBear ≥ sharpScoreRisk, a “Sharp ↓ Risk” label is drawn below the bar.
• Confirmation: A risk label is upgraded to “Sharp ↑” when scoreBull ≥ sharpScoreConfirm and the bar closes above the highest recent pivot (HH1); for bearish cases, confirmation requires scoreBear ≥ sharpScoreConfirm and a close below the lowest pivot (LL1).
• Label positioning: Labels are offset from the candle by ATR × sharpLabelMult (full ATR times multiplier), not half, and may include a dashed or dotted connector line if enabled.
Figure caption, In this chart both bullish and bearish sharp‑move setups have been flagged. Earlier in the range, a “Sharp ↓ Risk” label appears beneath a candle: the sell‑side score met the risk threshold, signaling that the combination of strong sell volume, dominance and absorption within a narrow range suggested a potential sharp decline. The price did not close below the lower pivot, so this label remains a “risk” and no confirmation occurred. Later, as the market recovered and volume shifted back to the buy side, a “Sharp ↑ Risk” label prints above a candle near the top of the channel. Here, buy‑side dominance, cumulative delta divergence and a volume climax aligned, but price has not yet closed above the upper pivot (HH1), so the alert is still a risk rather than a confirmed sharp‑up move.
Figure caption, In this chart a Sharp ↑ label is displayed above a candle, indicating that the sharp move module has confirmed a bullish breakout. Prior bars satisfied the risk threshold — showing buy‑side dominance, positive cumulative delta divergence, a volume climax and strong absorption in a narrow range — and this candle closes above the highest recent pivot, upgrading the earlier “Sharp ↑ Risk” alert to a full Sharp ↑ signal. The green label is offset from the candle with a dashed connector, while the red and green trend lines trace the high and low pivot trajectories and the dashed horizontals mark the highest and lowest values of the lookback window.
8. Market‑Maker / Spread‑Capture Module
8.1 Concept
Liquidity providers often “capture the spread” by buying and selling in almost equal amounts within a very narrow price range. These bars can signal temporary congestion before a move or reflect algorithmic activity. This module flags bars where both buyer and seller volumes are high, the price range is only a few ticks and the buy/sell split remains close to 50%. It helps traders spot potential liquidity pockets.
8.2 Inputs
• scalpLookback: Window length used to compute volume averages.
• scalpVolMult: Multiplier applied to each side’s average volume; both buy and sell volumes must exceed this multiple.
• scalpTickCount: Maximum allowed number of ticks in a bar’s range (calculated as (high − low) / minTick). A value of 1 or 2 captures ultra‑small bars; increasing it relaxes the range requirement.
• scalpDeltaRatio: Maximum deviation from a perfect 50/50 split. For example, 0.05 means the buyer share must be between 45% and 55%.
• Label settings: ATR length, multiplier, size, colors, connector style and width.
• Toggles : show_scalp_module and show_scalp_labels to enable the module and its labels.
8.3 Signal
When, on the current bar, both TF_buy_breakout and TF_sell_breakout exceed scalpVolMult times their respective averages and (high − low)/minTick ≤ scalpTickCount and the buyer share is within scalpDeltaRatio of 50%, the module prints a “Spread ↔” label above the bar. The label uses the same ATR offset logic as other modules and draws a connector if enabled.
Figure caption, In this chart the spread‑capture module has identified a potential liquidity pocket. Buyer and seller volumes both spiked above their recent averages, yet the candle’s range measured only a couple of ticks and the buy/sell split stayed close to 50 %. This combination met the module’s criteria, so it printed a grey “Spread ↔” label above the bar. The red and green trend lines link the earliest and latest high and low pivots, and the dashed horizontals mark the highest high and lowest low within the current lookback window.
9. Money Flow Module
9.1 Concept
To translate volume into a monetary measure, this module multiplies each side’s volume by the closing price. It tracks buying and selling system money default currency on a per-bar basis and sums them over a chosen period. The difference between buy and sell currencies (Δ$) shows net inflow or outflow.
9.2 Inputs
• mf_period_len_mf: Number of bars used for summing buy and sell dollars.
• Label appearance settings: ATR length, multiplier, size, colors for up/down labels, and connector style and width.
• Toggles: Use enableMoneyFlowLabel_mf and showMFLabels to control whether the module and its labels are displayed.
9.3 Calculations
• Per-bar money: Buy $ = TF_buy_breakout × close; Sell $ = TF_sell_breakout × close. Their difference is Δ$ = Buy $ − Sell $.
• Summations: Over mf_period_len_mf bars, compute Σ Buy $, Σ Sell $ and ΣΔ$ using math.sum().
• Info table entries: Rows 9–13 display these values as texts like “↑ USD 1234 (1M)” or “ΣΔ USD −5678 (14)”, with colors reflecting whether buyers or sellers dominate.
• Money flow status: If Δ$ is positive the bar is marked “Money flow in” ; if negative, “Money flow out” ; if zero, “Neutral”. The cumulative status is similarly derived from ΣΔ.Labels print at the bar that changes the sign of ΣΔ, offset using ATR × label multiplier and styled per user preferences.
Figure caption, The chart illustrates a steady rise toward the highest recent pivot (HH1) with price riding between a rising green trend‑line and a red trend‑line drawn through earlier pivot highs. A green Money flow in label appears above the bar near the top of the channel, signaling that net dollar flow turned positive on this bar: buy‑side dollar volume exceeded sell‑side dollar volume, pushing the cumulative sum ΣΔ$ above zero. In the info table, the “Money flow (bar)” and “Money flow Σ” rows both read In, confirming that the indicator’s money‑flow module has detected an inflow at both bar and aggregate levels, while other modules (pivots, trend lines and support/resistance) remain active to provide structural context.
In this example the Money Flow module signals a net outflow. Price has been trending downward: successive high pivots form a falling red trend‑line and the low pivots form a descending green support line. When the latest bar broke below the previous low pivot (LL1), both the bar‑level and cumulative net dollar flow turned negative—selling volume at the close exceeded buying volume and pushed the cumulative Δ$ below zero. The module reacts by printing a red “Money flow out” label beneath the candle; the info table confirms that the “Money flow (bar)” and “Money flow Σ” rows both show Out, indicating sustained dominance of sellers in this period.
10. Info Table
10.1 Purpose
When enabled, the Info Table appears in the lower right of your chart. It summarises key values computed by the indicator—such as buy and sell volume, delta, total volume, breakout status, market phase, and money flow—so you can see at a glance which side is dominant and which signals are active.
10.2 Symbols
• ↑ / ↓ — Up (↑) denotes buy volume or money; down (↓) denotes sell volume or money.
• MA — Moving average. In the table it shows the average value of a series over the lookback period.
• Σ (Sigma) — Cumulative sum over the chosen lookback period.
• Δ (Delta) — Difference between buy and sell values.
• B / S — Buyer and seller share of total volume, expressed as percentages.
• Ref. Price — Reference price for breakout calculations, based on the latest pivot.
• Status — Indicates whether a breakout condition is currently active (True) or has failed.
10.3 Row definitions
1. Up volume / MA up volume – Displays current buy volume on the lower timeframe and its moving average over the lookback period.
2. Down volume / MA down volume – Shows current sell volume and its moving average; sell values are formatted in red for clarity.
3. Δ / ΣΔ – Lists the difference between buy and sell volume for the current bar and the cumulative delta volume over the lookback period.
4. Σ / MA Σ (Vol/MA) – Total volume (buy + sell) for the bar, with the ratio of this volume to its moving average; the right cell shows the average total volume.
5. B/S ratio – Buy and sell share of the total volume: current bar percentages and the average percentages across the lookback period.
6. Buyer Rank / Seller Rank – Ranks the bar’s buy and sell volumes among the last (n) bars; lower rank numbers indicate higher relative volume.
7. Σ Buy / Σ Sell – Sum of buy and sell volumes over the lookback window, indicating which side has traded more.
8. Breakout UP / DOWN – Shows the breakout thresholds (Ref. Price) and whether the breakout condition is active (True) or has failed.
9. Market Phase (Vol) – Reports the current volume‑only phase: Accumulation, Distribution or Neutral.
10. Money Flow – The final rows display dollar amounts and status:
– ↑ USD / Σ↑ USD – Buy dollars for the current bar and the cumulative sum over the money‑flow period.
– ↓ USD / Σ↓ USD – Sell dollars and their cumulative sum.
– Δ USD / ΣΔ USD – Net dollar difference (buy minus sell) for the bar and cumulatively.
– Money flow (bar) – Indicates whether the bar’s net dollar flow is positive (In), negative (Out) or neutral.
– Money flow Σ – Shows whether the cumulative net dollar flow across the chosen period is positive, negative or neutral.
The chart above shows a sequence of different signals from the indicator. A Bull Trap Risk appears after price briefly pushes above resistance but fails to hold, then a green Accum label identifies an accumulation phase. An upward breakout follows, confirmed by a Money flow in print. Later, a Sharp ↓ Risk warns of a possible sharp downturn; after price dips below support but quickly recovers, a Bear Trap label marks a false breakdown. The highlighted info table in the center summarizes key metrics at that moment, including current and average buy/sell volumes, net delta, total volume versus its moving average, breakout status (up and down), market phase (volume), and bar‑level and cumulative money flow (In/Out).
11. Conclusion & Final Remarks
This indicator was developed as a holistic study of market structure and order flow. It brings together several well‑known concepts from technical analysis—breakouts, accumulation and distribution phases, overbought and oversold extremes, bull and bear traps, sharp directional moves, market‑maker spread bars and money flow—into a single Pine Script tool. Each module is based on widely recognized trading ideas and was implemented after consulting reference materials and example strategies, so you can see in real time how these concepts interact on your chart.
A distinctive feature of this indicator is its reliance on per‑side volume: instead of tallying only total volume, it separately measures buy and sell transactions on a lower time frame. This approach gives a clearer view of who is in control—buyers or sellers—and helps filter breakouts, detect phases of accumulation or distribution, recognize potential traps, anticipate sharp moves and gauge whether liquidity providers are active. The money‑flow module extends this analysis by converting volume into currency values and tracking net inflow or outflow across a chosen window.
Although comprehensive, this indicator is intended solely as a guide. It highlights conditions and statistics that many traders find useful, but it does not generate trading signals or guarantee results. Ultimately, you remain responsible for your positions. Use the information presented here to inform your analysis, combine it with other tools and risk‑management techniques, and always make your own decisions when trading.
Monthly VWAPDescription
This indicator identifies potential mean reversion opportunities by tracking price deviations from monthly VWAP with dynamic volatility-adjusted thresholds.
Core Logic:
The indicator monitors when price moves significantly away from monthly VWAP and looks for potential reversal opportunities. It uses ATR-based dynamic thresholds that adapt to current market volatility, combined with volume confirmation to filter out weak signals.
Key Features:
Adaptive Thresholds: ATR-based bands that adjust to market volatility
Volume Confirmation: Requires average volume spike to validate signals
Monthly Reset: VWAP anchors reset each month for fresh reference levels
Visual Clarity: Color-coded deviation line with background highlights for active signals
Info Panel: Shows days from anchor and current price context vs fair value
Signal Generation:
Buy Signal: Price below monthly VWAP by threshold amount with elevated volume
Sell Signal: Price above monthly VWAP by threshold amount with elevated volume
Neutral: Price within threshold range or insufficient volume
Best Used For:
Mean reversion strategies in ranging markets
Identifying potential oversold/overbought conditions
Understanding price position relative to monthly fair value
Hurst Momentum Oscillator | AlphaNattHurst Momentum Oscillator | AlphaNatt
An adaptive oscillator that combines the Hurst Exponent - which identifies whether markets are trending or mean-reverting - with momentum analysis to create signals that automatically adjust to market regime.
"The Hurst Exponent reveals a hidden truth: markets aren't always trending. This oscillator knows when to ride momentum and when to fade it."
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📐 THE MATHEMATICS
Hurst Exponent (H):
Measures the long-term memory of time series:
H > 0.5: Trending (persistent) behavior
H = 0.5: Random walk
H < 0.5: Mean-reverting behavior
Originally developed for analyzing Nile river flooding patterns, now used in:
Fractal market analysis
Network traffic prediction
Climate modeling
Financial markets
The Innovation:
This oscillator multiplies momentum by the Hurst coefficient:
When trending (H > 0.5): Momentum is amplified
When mean-reverting (H < 0.5): Momentum is reduced
Result: Adaptive signals based on market regime
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💎 KEY ADVANTAGES
Regime Adaptive: Automatically adjusts to trending vs ranging markets
False Signal Reduction: Reduces momentum signals in mean-reverting markets
Trend Amplification: Stronger signals when trends are persistent
Mathematical Edge: Based on fractal dimension analysis
No Repainting: All calculations on historical data
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 TRADING SIGNALS
Visual Interpretation:
Cyan zones: Bullish momentum in trending market
Magenta zones: Bearish momentum or mean reversion
Background tint: Blue = trending, Pink = mean-reverting
Gradient intensity: Signal strength
Trading Strategies:
1. Trend Following:
Trade momentum signals when background is blue (trending)
2. Mean Reversion:
Fade extreme readings when background is pink
3. Regime Transition:
Watch for background color changes as early warning
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 OPTIMAL USAGE
Best Conditions:
Strong trending markets (crypto bull runs)
Clear ranging markets (forex sessions)
Regime transitions
Multi-timeframe analysis
Market Applications:
Crypto: Excellent for identifying trend persistence
Forex: Detects when pairs are ranging
Stocks: Identifies momentum stocks
Commodities: Catches persistent trends
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Developed by AlphaNatt | Fractal Market Analysis
Version: 1.0
Classification: Adaptive Regime Oscillator
Not financial advice. Always DYOR.
Tzotchev Trend Measure [EdgeTools]Are you still measuring trend strength with moving averages? Here is a better variant at scientific level:
Tzotchev Trend Measure: A Statistical Approach to Trend Following
The Tzotchev Trend Measure represents a sophisticated advancement in quantitative trend analysis, moving beyond traditional moving average-based indicators toward a statistically rigorous framework for measuring trend strength. This indicator implements the methodology developed by Tzotchev et al. (2015) in their seminal J.P. Morgan research paper "Designing robust trend-following system: Behind the scenes of trend-following," which introduced a probabilistic approach to trend measurement that has since become a cornerstone of institutional trading strategies.
Mathematical Foundation and Statistical Theory
The core innovation of the Tzotchev Trend Measure lies in its transformation of price momentum into a probability-based metric through the application of statistical hypothesis testing principles. The indicator employs the fundamental formula ST = 2 × Φ(√T × r̄T / σ̂T) - 1, where ST represents the trend strength score bounded between -1 and +1, Φ(x) denotes the normal cumulative distribution function, T represents the lookback period in trading days, r̄T is the average logarithmic return over the specified period, and σ̂T represents the estimated daily return volatility.
This formulation transforms what is essentially a t-statistic into a probabilistic trend measure, testing the null hypothesis that the mean return equals zero against the alternative hypothesis of non-zero mean return. The use of logarithmic returns rather than simple returns provides several statistical advantages, including symmetry properties where log(P₁/P₀) = -log(P₀/P₁), additivity characteristics that allow for proper compounding analysis, and improved validity of normal distribution assumptions that underpin the statistical framework.
The implementation utilizes the Abramowitz and Stegun (1964) approximation for the normal cumulative distribution function, achieving accuracy within ±1.5 × 10⁻⁷ for all input values. This approximation employs Horner's method for polynomial evaluation to ensure numerical stability, particularly important when processing large datasets or extreme market conditions.
Comparative Analysis with Traditional Trend Measurement Methods
The Tzotchev Trend Measure demonstrates significant theoretical and empirical advantages over conventional trend analysis techniques. Traditional moving average-based systems, including simple moving averages (SMA), exponential moving averages (EMA), and their derivatives such as MACD, suffer from several fundamental limitations that the Tzotchev methodology addresses systematically.
Moving average systems exhibit inherent lag bias, as documented by Kaufman (2013) in "Trading Systems and Methods," where he demonstrates that moving averages inevitably lag price movements by approximately half their period length. This lag creates delayed signal generation that reduces profitability in trending markets and increases false signal frequency during consolidation periods. In contrast, the Tzotchev measure eliminates lag bias by directly analyzing the statistical properties of return distributions rather than smoothing price levels.
The volatility normalization inherent in the Tzotchev formula addresses a critical weakness in traditional momentum indicators. As shown by Bollinger (2001) in "Bollinger on Bollinger Bands," momentum oscillators like RSI and Stochastic fail to account for changing volatility regimes, leading to inconsistent signal interpretation across different market conditions. The Tzotchev measure's incorporation of return volatility in the denominator ensures that trend strength assessments remain consistent regardless of the underlying volatility environment.
Empirical studies by Hurst, Ooi, and Pedersen (2013) in "Demystifying Managed Futures" demonstrate that traditional trend-following indicators suffer from significant drawdowns during whipsaw markets, with Sharpe ratios frequently below 0.5 during challenging periods. The authors attribute these poor performance characteristics to the binary nature of most trend signals and their inability to quantify signal confidence. The Tzotchev measure addresses this limitation by providing continuous probability-based outputs that allow for more sophisticated risk management and position sizing strategies.
The statistical foundation of the Tzotchev approach provides superior robustness compared to technical indicators that lack theoretical grounding. Fama and French (1988) in "Permanent and Temporary Components of Stock Prices" established that price movements contain both permanent and temporary components, with traditional moving averages unable to distinguish between these elements effectively. The Tzotchev methodology's hypothesis testing framework specifically tests for the presence of permanent trend components while filtering out temporary noise, providing a more theoretically sound approach to trend identification.
Research by Moskowitz, Ooi, and Pedersen (2012) in "Time Series Momentum in the Cross Section of Asset Returns" found that traditional momentum indicators exhibit significant variation in effectiveness across asset classes and time periods. Their study of multiple asset classes over decades revealed that simple price-based momentum measures often fail to capture persistent trends in fixed income and commodity markets. The Tzotchev measure's normalization by volatility and its probabilistic interpretation provide consistent performance across diverse asset classes, as demonstrated in the original J.P. Morgan research.
Comparative performance studies conducted by AQR Capital Management (Asness, Moskowitz, and Pedersen, 2013) in "Value and Momentum Everywhere" show that volatility-adjusted momentum measures significantly outperform traditional price momentum across international equity, bond, commodity, and currency markets. The study documents Sharpe ratio improvements of 0.2 to 0.4 when incorporating volatility normalization, consistent with the theoretical advantages of the Tzotchev approach.
The regime detection capabilities of the Tzotchev measure provide additional advantages over binary trend classification systems. Research by Ang and Bekaert (2002) in "Regime Switches in Interest Rates" demonstrates that financial markets exhibit distinct regime characteristics that traditional indicators fail to capture adequately. The Tzotchev measure's five-tier classification system (Strong Bull, Weak Bull, Neutral, Weak Bear, Strong Bear) provides more nuanced market state identification than simple trend/no-trend binary systems.
Statistical testing by Jegadeesh and Titman (2001) in "Profitability of Momentum Strategies" revealed that traditional momentum indicators suffer from significant parameter instability, with optimal lookback periods varying substantially across market conditions and asset classes. The Tzotchev measure's statistical framework provides more stable parameter selection through its grounding in hypothesis testing theory, reducing the need for frequent parameter optimization that can lead to overfitting.
Advanced Noise Filtering and Market Regime Detection
A significant enhancement over the original Tzotchev methodology is the incorporation of a multi-factor noise filtering system designed to reduce false signals during sideways market conditions. The filtering mechanism employs four distinct approaches: adaptive thresholding based on current market regime strength, volatility-based filtering utilizing ATR percentile analysis, trend strength confirmation through momentum alignment, and a comprehensive multi-factor approach that combines all methodologies.
The adaptive filtering system analyzes market microstructure through price change relative to average true range, calculates volatility percentiles over rolling windows, and assesses trend alignment across multiple timeframes using exponential moving averages of varying periods. This approach addresses one of the primary limitations identified in traditional trend-following systems, namely their tendency to generate excessive false signals during periods of low volatility or sideways price action.
The regime detection component classifies market conditions into five distinct categories: Strong Bull (ST > 0.3), Weak Bull (0.1 < ST ≤ 0.3), Neutral (-0.1 ≤ ST ≤ 0.1), Weak Bear (-0.3 ≤ ST < -0.1), and Strong Bear (ST < -0.3). This classification system provides traders with clear, quantitative definitions of market regimes that can inform position sizing, risk management, and strategy selection decisions.
Professional Implementation and Trading Applications
The indicator incorporates three distinct trading profiles designed to accommodate different investment approaches and risk tolerances. The Conservative profile employs longer lookback periods (63 days), higher signal thresholds (0.2), and reduced filter sensitivity (0.5) to minimize false signals and focus on major trend changes. The Balanced profile utilizes standard academic parameters with moderate settings across all dimensions. The Aggressive profile implements shorter lookback periods (14 days), lower signal thresholds (-0.1), and increased filter sensitivity (1.5) to capture shorter-term trend movements.
Signal generation occurs through threshold crossover analysis, where long signals are generated when the trend measure crosses above the specified threshold and short signals when it crosses below. The implementation includes sophisticated signal confirmation mechanisms that consider trend alignment across multiple timeframes and momentum strength percentiles to reduce the likelihood of false breakouts.
The alert system provides real-time notifications for trend threshold crossovers, strong regime changes, and signal generation events, with configurable frequency controls to prevent notification spam. Alert messages are standardized to ensure consistency across different market conditions and timeframes.
Performance Optimization and Computational Efficiency
The implementation incorporates several performance optimization features designed to handle large datasets efficiently. The maximum bars back parameter allows users to control historical calculation depth, with default settings optimized for most trading applications while providing flexibility for extended historical analysis. The system includes automatic performance monitoring that generates warnings when computational limits are approached.
Error handling mechanisms protect against division by zero conditions, infinite values, and other numerical instabilities that can occur during extreme market conditions. The finite value checking system ensures data integrity throughout the calculation process, with fallback mechanisms that maintain indicator functionality even when encountering corrupted or missing price data.
Timeframe validation provides warnings when the indicator is applied to unsuitable timeframes, as the Tzotchev methodology was specifically designed for daily and higher timeframe analysis. This validation helps prevent misapplication of the indicator in contexts where its statistical assumptions may not hold.
Visual Design and User Interface
The indicator features eight professional color schemes designed for different trading environments and user preferences. The EdgeTools theme provides an institutional blue and steel color palette suitable for professional trading environments. The Gold theme offers warm colors optimized for commodities trading. The Behavioral theme incorporates psychology-based color contrasts that align with behavioral finance principles. The Quant theme provides neutral colors suitable for analytical applications.
Additional specialized themes include Ocean, Fire, Matrix, and Arctic variations, each optimized for specific visual preferences and trading contexts. All color schemes include automatic dark and light mode optimization to ensure optimal readability across different chart backgrounds and trading platforms.
The information table provides real-time display of key metrics including current trend measure value, market regime classification, signal strength, Z-score, average returns, volatility measures, filter threshold levels, and filter effectiveness percentages. This comprehensive dashboard allows traders to monitor all relevant indicator components simultaneously.
Theoretical Implications and Research Context
The Tzotchev Trend Measure addresses several theoretical limitations inherent in traditional technical analysis approaches. Unlike moving average-based systems that rely on price level comparisons, this methodology grounds trend analysis in statistical hypothesis testing, providing a more robust theoretical foundation for trading decisions.
The probabilistic interpretation of trend strength offers significant advantages over binary trend classification systems. Rather than simply indicating whether a trend exists, the measure quantifies the statistical confidence level associated with the trend assessment, allowing for more nuanced risk management and position sizing decisions.
The incorporation of volatility normalization addresses the well-documented problem of volatility clustering in financial time series, ensuring that trend strength assessments remain consistent across different market volatility regimes. This normalization is particularly important for portfolio management applications where consistent risk metrics across different assets and time periods are essential.
Practical Applications and Trading Strategy Integration
The Tzotchev Trend Measure can be effectively integrated into various trading strategies and portfolio management frameworks. For trend-following strategies, the indicator provides clear entry and exit signals with quantified confidence levels. For mean reversion strategies, extreme readings can signal potential turning points. For portfolio allocation, the regime classification system can inform dynamic asset allocation decisions.
The indicator's statistical foundation makes it particularly suitable for quantitative trading strategies where systematic, rules-based approaches are preferred over discretionary decision-making. The standardized output range facilitates easy integration with position sizing algorithms and risk management systems.
Risk management applications benefit from the indicator's ability to quantify trend strength and provide early warning signals of potential trend changes. The multi-timeframe analysis capability allows for the construction of robust risk management frameworks that consider both short-term tactical and long-term strategic market conditions.
Implementation Guide and Parameter Configuration
The practical application of the Tzotchev Trend Measure requires careful parameter configuration to optimize performance for specific trading objectives and market conditions. This section provides comprehensive guidance for parameter selection and indicator customization.
Core Calculation Parameters
The Lookback Period parameter controls the statistical window used for trend calculation and represents the most critical setting for the indicator. Default values range from 14 to 63 trading days, with shorter periods (14-21 days) providing more sensitive trend detection suitable for short-term trading strategies, while longer periods (42-63 days) offer more stable trend identification appropriate for position trading and long-term investment strategies. The parameter directly influences the statistical significance of trend measurements, with longer periods requiring stronger underlying trends to generate significant signals but providing greater reliability in trend identification.
The Price Source parameter determines which price series is used for return calculations. The default close price provides standard trend analysis, while alternative selections such as high-low midpoint ((high + low) / 2) can reduce noise in volatile markets, and volume-weighted average price (VWAP) offers superior trend identification in institutional trading environments where volume concentration matters significantly.
The Signal Threshold parameter establishes the minimum trend strength required for signal generation, with values ranging from -0.5 to 0.5. Conservative threshold settings (0.2 to 0.3) reduce false signals but may miss early trend opportunities, while aggressive settings (-0.1 to 0.1) provide earlier signal generation at the cost of increased false positive rates. The optimal threshold depends on the trader's risk tolerance and the volatility characteristics of the traded instrument.
Trading Profile Configuration
The Trading Profile system provides pre-configured parameter sets optimized for different trading approaches. The Conservative profile employs a 63-day lookback period with a 0.2 signal threshold and 0.5 noise sensitivity, designed for long-term position traders seeking high-probability trend signals with minimal false positives. The Balanced profile uses a 21-day lookback with 0.05 signal threshold and 1.0 noise sensitivity, suitable for swing traders requiring moderate signal frequency with acceptable noise levels. The Aggressive profile implements a 14-day lookback with -0.1 signal threshold and 1.5 noise sensitivity, optimized for day traders and scalpers requiring frequent signal generation despite higher noise levels.
Advanced Noise Filtering System
The noise filtering mechanism addresses the challenge of false signals during sideways market conditions through four distinct methodologies. The Adaptive filter adjusts thresholds based on current trend strength, increasing sensitivity during strong trending periods while raising thresholds during consolidation phases. The Volatility-based filter utilizes Average True Range (ATR) percentile analysis to suppress signals during abnormally volatile conditions that typically generate false trend indications.
The Trend Strength filter requires alignment between multiple momentum indicators before confirming signals, reducing the probability of false breakouts from consolidation patterns. The Multi-factor approach combines all filtering methodologies using weighted scoring to provide the most robust noise reduction while maintaining signal responsiveness during genuine trend initiations.
The Noise Sensitivity parameter controls the aggressiveness of the filtering system, with lower values (0.5-1.0) providing conservative filtering suitable for volatile instruments, while higher values (1.5-2.0) allow more signals through but may increase false positive rates during choppy market conditions.
Visual Customization and Display Options
The Color Scheme parameter offers eight professional visualization options designed for different analytical preferences and market conditions. The EdgeTools scheme provides high contrast visualization optimized for trend strength differentiation, while the Gold scheme offers warm tones suitable for commodity analysis. The Behavioral scheme uses psychological color associations to enhance decision-making speed, and the Quant scheme provides neutral colors appropriate for quantitative analysis environments.
The Ocean, Fire, Matrix, and Arctic schemes offer additional aesthetic options while maintaining analytical functionality. Each scheme includes optimized colors for both light and dark chart backgrounds, ensuring visibility across different trading platform configurations.
The Show Glow Effects parameter enhances plot visibility through multiple layered lines with progressive transparency, particularly useful when analyzing multiple timeframes simultaneously or when working with dense price data that might obscure trend signals.
Performance Optimization Settings
The Maximum Bars Back parameter controls the historical data depth available for calculations, with values ranging from 5,000 to 50,000 bars. Higher values enable analysis of longer-term trend patterns but may impact indicator loading speed on slower systems or when applied to multiple instruments simultaneously. The optimal setting depends on the intended analysis timeframe and available computational resources.
The Calculate on Every Tick parameter determines whether the indicator updates with every price change or only at bar close. Real-time calculation provides immediate signal updates suitable for scalping and day trading strategies, while bar-close calculation reduces computational overhead and eliminates signal flickering during bar formation, preferred for swing trading and position management applications.
Alert System Configuration
The Alert Frequency parameter controls notification generation, with options for all signals, bar close only, or once per bar. High-frequency trading strategies benefit from all signals mode, while position traders typically prefer bar close alerts to avoid premature position entries based on intrabar fluctuations.
The alert system generates four distinct notification types: Long Signal alerts when the trend measure crosses above the positive signal threshold, Short Signal alerts for negative threshold crossings, Bull Regime alerts when entering strong bullish conditions, and Bear Regime alerts for strong bearish regime identification.
Table Display and Information Management
The information table provides real-time statistical metrics including current trend value, regime classification, signal status, and filter effectiveness measurements. The table position can be customized for optimal screen real estate utilization, and individual metrics can be toggled based on analytical requirements.
The Language parameter supports both English and German display options for international users, while maintaining consistent calculation methodology regardless of display language selection.
Risk Management Integration
Effective risk management integration requires coordination between the trend measure signals and position sizing algorithms. Strong trend readings (above 0.5 or below -0.5) support larger position sizes due to higher probability of trend continuation, while neutral readings (between -0.2 and 0.2) suggest reduced position sizes or range-trading strategies.
The regime classification system provides additional risk management context, with Strong Bull and Strong Bear regimes supporting trend-following strategies, while Neutral regimes indicate potential for mean reversion approaches. The filter effectiveness metric helps traders assess current market conditions and adjust strategy parameters accordingly.
Timeframe Considerations and Multi-Timeframe Analysis
The indicator's effectiveness varies across different timeframes, with higher timeframes (daily, weekly) providing more reliable trend identification but slower signal generation, while lower timeframes (hourly, 15-minute) offer faster signals with increased noise levels. Multi-timeframe analysis combining trend alignment across multiple periods significantly improves signal quality and reduces false positive rates.
For optimal results, traders should consider trend alignment between the primary trading timeframe and at least one higher timeframe before entering positions. Divergences between timeframes often signal potential trend reversals or consolidation periods requiring strategy adjustment.
Conclusion
The Tzotchev Trend Measure represents a significant advancement in technical analysis methodology, combining rigorous statistical foundations with practical trading applications. Its implementation of the J.P. Morgan research methodology provides institutional-quality trend analysis capabilities previously available only to sophisticated quantitative trading firms.
The comprehensive parameter configuration options enable customization for diverse trading styles and market conditions, while the advanced noise filtering and regime detection capabilities provide superior signal quality compared to traditional trend-following indicators. Proper parameter selection and understanding of the indicator's statistical foundation are essential for achieving optimal trading results and effective risk management.
References
Abramowitz, M. and Stegun, I.A. (1964). Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables. Washington: National Bureau of Standards.
Ang, A. and Bekaert, G. (2002). Regime Switches in Interest Rates. Journal of Business and Economic Statistics, 20(2), 163-182.
Asness, C.S., Moskowitz, T.J., and Pedersen, L.H. (2013). Value and Momentum Everywhere. Journal of Finance, 68(3), 929-985.
Bollinger, J. (2001). Bollinger on Bollinger Bands. New York: McGraw-Hill.
Fama, E.F. and French, K.R. (1988). Permanent and Temporary Components of Stock Prices. Journal of Political Economy, 96(2), 246-273.
Hurst, B., Ooi, Y.H., and Pedersen, L.H. (2013). Demystifying Managed Futures. Journal of Investment Management, 11(3), 42-58.
Jegadeesh, N. and Titman, S. (2001). Profitability of Momentum Strategies: An Evaluation of Alternative Explanations. Journal of Finance, 56(2), 699-720.
Kaufman, P.J. (2013). Trading Systems and Methods. 5th Edition. Hoboken: John Wiley & Sons.
Moskowitz, T.J., Ooi, Y.H., and Pedersen, L.H. (2012). Time Series Momentum. Journal of Financial Economics, 104(2), 228-250.
Tzotchev, D., Lo, A.W., and Hasanhodzic, J. (2015). Designing robust trend-following system: Behind the scenes of trend-following. J.P. Morgan Quantitative Research, Asset Management Division.
Volumetric Compressed MAVCMA (Volumetric Compressed Moving Average) uses the compressor and weighted standard deviation functions originally translated to pinescript by @gorx1 to plot moving averages in order to use for entry confirmation.
🔹 Concepts and Idea:
When we do music we always use different kinds of filters (low-pass, high pass, etc) for equalization and filtering itself. That stuff we use in finance as well. What we also always use in music are compressors, there dynamic processors that automatically adjust volume so it will be more consistent. Almost all the cool music you hear is compressed (both individual instruments (especially vocals) and the whole track afterwards), otherwise stuff will be too quite and too weak to flex on it, and also DJing it would be a nightmare.
🔹 Model:
I don't wanna explain it all in statistical / DSP way for once.
First of all, I think the population of volumes is log-normally distributed, so let's take logs of volumes, now we have a ~ normally distributed data. We take linearly weighted mean, add and subtract linearly weighted standard deviation from it, these would be our thresholds, the borders between different kinds of volumes explained before.
The upper threshold is for downward compression, that will not let volume pass it higher.
The lower threshold is for upward compression, all the volumes lower than this threshold will be brought up to the threshold's level.
Then we apply multipliers to the thresholds in order to adjust em and find the sweet spots. We do it the same way as in sound engineering when we don't aim for overcompression, we adjust the thresholds until they start to touch the signal and all good.
Afterwards, we delete all the number 1 and number 3 volume, leaving us exclusively with the clear main component, ready to be processed further.
We return the volumes to dem real scale.
For more info on Volume Compression it's highly advised to check @gorx1's initial script Volume Compressor
🔹 Settings:
MA Type: Moving average type to be used for comparison after calculating the compressed version of volume. This creates the second line after the compression line, so we can consider crossovers for confirmation entries.
Upward threshold: Upward threshold where the compression of volume is calculated. Increasing usually causes smoother lines.
Downward threshold: Downward threshold where the compression of volume is calculated. Decreasing usually causes smoother lines.
Compression Lookback: The Main lookback window of a volume that is used for compression. Increasing this would provide smoother lines but might cause delayed signals. Decreasing means more signals, but might cause whiplash and distorted signals.
Comparative Lookback: This is our lookback to be used with our ma type selection. There is no static better or worse lookback value for this indicator. It should be adjusted based on the pair.
🔹 Where to use:
This indicator should be used as another confirmation tool for your entry signals in your existing strategy/market following combination. Green dots (crossovers) mean bullish movement is expected, and red dots (crossbounders) mean bearish movement is expected. Automated crossover alerts are available. A reminder is that this kind of indicator should not be used on its own for trading, but rather should be used as a confirmation along with your trend detection and main entry indicators to provide additional confidence.
If you want to know under the hood, read the How it works section below.
🔹 How it works:
//This is our main compression calculation, which is used for the first line.
Compressed_out = compressor(volume, len_window, up_thresh, down_thresh)
//This is the secondary ratio calculation that we use for the second line.
Comp_ma = ma(ma_type, close * compressed_out, len_ml) / ma(ma_type, compressed_out, len_ml)
Vwma = ma(ma_type, close, len_window)
We calculate the ratio of the compressed volume and plot it against the base MA. Base MA's length is determined by the Compression Lookback input compared to the Comperative Lookback that is used for the compressed version. This provides us with another possible confirmation indicator that can be used to take advantage of volume ranges.
Pattern ScannerUltimate Pattern Scanner — multi-timeframe candlestick discovery tool (educational use only).
Purpose: This script scans user-selected timeframes for classical candlestick patterns (for example: engulfing, morning/evening stars, hammers, dojis, tasuki gaps, three soldiers/crows, tweezers, marubozu, and others) and reports pattern name, detection price, directional signal (Bull / Bear / Neutral), and a simple volume participation metric. It is intended as an idea-generation and training tool to help traders learn pattern mechanics, not as an automated trading system.
Main modules and rationale: 1) Pattern engine — applies classical candle structure rules to detect formations; 2) SMA trend filter (configurable length) — provides a directional bias to favor trade-with-trend setups; 3) Volume heuristic — approximates participation by separating candles into buy-like and sell-like volume and comparing total volume to a moving average; 4) Multi-timeframe aggregator — collects and presents pattern results from multiple timeframes; 5) Alerts — optional alerts list detected patterns and TFs. Combining these modules is intentional: patterns provide structure, SMA provides context, and volume supplies participation confirmation. Together they improve the educational value and practical relevance of each detected pattern.
How to use: Choose timeframes and SMA length that match your trading horizon. Use the scanner to locate pattern candidates, then confirm with higher-timeframe agreement and volume ratio before considering trade entry. Use structural stops (recent swing highs/lows or ATR-based stops) and define risk:reward rules. For learning, replay alerted bars and record outcomes over fixed horizons to build empirical statistics.
Limitations: Volume classification (close>open) is a heuristic and not a true bid/ask tape. SMA is a lagging trend proxy. Multi-timeframe agreement reduces but does not eliminate false signals, especially around news or in low-liquidity instruments. Use demo accounts and backtesting before live trading.
Inputs you can adjust: timeframe list, SMA length, volume MA length, which patterns to enable/disable, display options.
Compliance notes: This description explains why modules are combined and what the script does without exposing source code logic; it is non-promotional and contains no contact links. Remove any trademark symbols unless registration details are provided.
Risk Disclaimer: This tool is provided for education and analysis only. It is not financial advice and does not guarantee returns. Users assume all risk for trades made based on this script. Backtest thoroughly and use proper risk management.
Pivot Points Strategy🟢 It enters long trades near support zones (S1–S3)
🔴 It enters short trades near resistance zones (R1–R3)
🎯 All positions aim to exit at the central pivot (P).
🚫 It avoids trading when price crosses the pivot during the bar.
🔄 Strategy resets when a new pivot is calculated.
📊 Supports pyramiding up to 5 positions for scaling in.
CF Cycle Low Projection V2Overview
This indicator helps traders analyze repeating market cycles by detecting significant pivot lows and projecting when the next cycle low may occur. It provides timing context to support decision-making but does not generate direct buy/sell signals.
How it works
Pivot detection : Confirms swing lows using left/right bars. Filters (minimum % move and optional ATR separation) ensure only meaningful lows are counted.
Cycle averaging : Calculates the average interval (and standard deviation) between recent pivot lows.
Projection : Adds the average interval to the last pivot low to forecast the next potential cycle low. If that point lies in the past, the script rolls forward until the projection is in the future.
Timing window : A shaded area around the ETA is drawn, based on either standard deviation or a percentage of the average, showing when a low is statistically more likely to occur.
Visualization:
• Vertical line = projected cycle low
• Shaded box = timing window
• Label = countdown in weeks/days/hours
• HUD = status, ETA, intervals used
How to use
Select your preferred timeframe (works on intraday and higher).
Allow pivots to accumulate; once the HUD shows Status: OK, projections will appear.
Use the ETA line and timing window together with structure, liquidity levels, and support/resistance zones.
Combine with your own strategy and risk management rules.
Notes
Works on any market supported by TradingView (crypto, stocks, forex, indices).
Filters can be adjusted to reduce noise (e.g., increase % move or ATR multiplier).
This tool is designed for cycle timing analysis only. It does not predict exact prices or guarantee outcomes.
Some traders refer to this approach as “camel cycle trading,” but here it is implemented as a pivot-based cycle projection tool.
Dusk Wave🌊 Dusk Wave (시각적 분석 도구)
개요
기반 기술: 8단계 추세 파도 시각화
시간대: 모든 시간대 호환
신호: 신호 없음 (분석 전용)
용도: 추세 방향 및 강도 분석
Wave 테이블 설명
DUSK WAVE | TREND ANALYSIS
├─ Wave Alignment: 8개 파도 정렬 상태
├─ Trend Strength: 추세 강도 (Strong/Medium/Weak)
├─ Wave Direction: 파도 전체 방향 (Up/Down/Sideways)
├─ Fast Waves: 단기 파도 상태 (1-4번)
├─ Slow Waves: 장기 파도 상태 (5-8번)
├─ Convergence: 파도 수렴/발산 상태
└─ Trend Quality: 추세 품질 등급 (A/B/C/D)
Wave 해석 가이드
파란색 그라데이션: 8개 EMA 파도 표시
정렬 상태: 모든 파도가 같은 방향 = 강한 추세
파도 간격: 좁을수록 강한 추세, 넓을수록 약한 추세
색상 변화: 파도별 속도 차이 시각화
🌊 Dusk Wave (Visual Analysis Tool) - English Version
Overview
Core Technology: 8-Stage Trend Wave Visualization
Timeframe: Compatible with all timeframes
Signals: No signals (Analysis only)
Purpose: Trend direction and strength analysis
Wave Table Description
DUSK WAVE | TREND ANALYSIS
├─ Wave Alignment: 8 wave alignment status
├─ Trend Strength: Trend intensity (Strong/Medium/Weak)
├─ Wave Direction: Overall wave direction (Up/Down/Sideways)
├─ Fast Waves: Short-term wave status (Waves 1-4)
├─ Slow Waves: Long-term wave status (Waves 5-8)
├─ Convergence: Wave convergence/divergence state
└─ Trend Quality: Trend quality grade (A/B/C/D)
Wave Interpretation Guide
Blue Gradient: 8 EMA waves display
Alignment Status: All waves same direction = Strong trend
Wave Spacing: Closer = Stronger trend, Wider = Weaker trend
Color Changes: Visualizes speed differences between waves
Auto Trend Channel with Fibonacci‼️ PLEASE USE WITH LOG CHART
🟠 Overview
This indicator introduces a novel approach to trend channel construction by implementing a touch-based validation system that ensures channels actually function as dynamic support and resistance levels. Unlike traditional linear regression channels that simply fit a mathematical line through price data, this indicator validates channel effectiveness by measuring how frequently price interacts with the boundaries, creating channels that traders can reliably use for entry and exit decisions.
🟠 Core Idea: Touch-Based Channel Validation
The fundamental problem with standard regression channels is that they often create mathematically correct but practically useless boundaries that price rarely respects. This indicator solves this by introducing a dual-scoring optimization system that evaluates each potential channel based on two critical factors:
Trend Correlation (70% weight): Measures how well prices follow the overall trend direction using Pearson correlation coefficient
Boundary Touch Frequency (30% weight): Counts actual instances where price highs touch the upper channel and lows touch the lower channel
This combination ensures the selected channel not only follows the trend but actively serves as support and resistance.
🟠 Trading Applications
Trend Following
Strong Uptrend: Price consistently bounces off lower channel and Fibonacci levels
Strong Downtrend: Price repeatedly fails at upper channel and Fibonacci resistance
Trend Weakening: Price fails to reach channel extremes or breaks through
Entry Strategies
Channel Bounce Entries: Enter long when price touches lower channel with confirmation; short at upper channel touches
Fibonacci Retracement Entries: Use 38.2% or 61.8% levels for pullback entries in trending markets
Breakout Entries: Trade breakouts when price closes beyond channels with increased volume
🟠 Customization Parameters
Automatic/Manual Period: Choose between intelligent auto-detection or fixed lookback period
Touch Sensitivity (0.1%-10%): Defines how close price must be to count as a boundary touch
Minimum Touches (1-10): Filter threshold for channel validation
Adaptive Deviation: Toggle between calculated or manual deviation multipliers
Kyoshiro - FVG + Order Blocks📌 Kyoshiro – FVG + Order Blocks
This indicator combines Order Block (OB) detection with an intelligent auto-management system and a clean visual display on the chart.
It is designed to help traders better identify institutional zones where price frequently reacts.
⚙️ Key Features:
✅ Real-time detection of bullish and bearish Order Blocks.
✅ Automatic cleanup: invalidated OBs are removed to keep the chart clean.
✅ Customizable display:
Maximum number of visible OBs (bullish / bearish).
Zone colors, outlines, and midlines.
Line styles (solid, dashed, dotted) and adjustable width.
✅ Choice of mitigation method:
Wick
Close
✅ Built-in alerts:
Formation of bullish or bearish OB.
Mitigation of an existing OB.
🔔 Available Alerts:
Bullish OB Formed → A bullish order block is detected.
Bearish OB Formed → A bearish order block is detected.
Bullish OB Mitigated → A bullish OB has been invalidated.
Bearish OB Mitigated → A bearish OB has been invalidated.
🎯 Use Cases:
Quickly identify key liquidity zones.
Track institutional activity in the market.
Improve entry and exit precision.
Smart Money Concepts - (confirmed + ATR + MTF ) ritMaps market structure with confirmed pivots and quantifies SMC events (CHoCH/SMS/BMS) as real-time probabilities. Includes ATR swing-size filter, HTF MA bias gate, and label throttling to cut noise. Shows Premium/Discount/Mid zones and a compact table with Wins/Losses, Profitability, Laplace-smoothed rate, and Wilson confidence band. Optional alerts output ticker, timeframe, and the current probability summary. Designed to be confirmation-based (reduced repaint) and adaptable to any symbol/timeframe.
Planète_finance Day Trading 5m - Signal Achat/Vente EMA
Keep the original logic (EMA 8 & EMA 15 crossover on 5m).
Filter with the EMA200 trend on 1h (to stay in the direction of the market).
Add a simple relative volume filter to avoid false signals.
Display BUY when bullish conditions are met and SELL when bearish conditions are met.
No over-complexity (RSI, cooldown, etc.) → that can be added later if you want to refine.
Smart Money Concepts Probability (Expo) RitSmart Money Concepts Probability (Expo) — v2
Overview
This indicator maps market structure using confirmed swing pivots and quantifies the follow-through of SMC events—CHoCH, SMS, and BMS—as real-time probabilities. It adds robust filters (ATR swing size, multi-timeframe bias) and statistically honest display (Laplace smoothing and Wilson confidence bands) to reduce noise and make the stats you see on the chart closer to what actually plays out.
How it works
Detects confirmed swing highs/lows with ta.pivothigh/ta.pivotlow.
Tracks a structure state machine: bias flips to CHoCH (±1), confirms to SMS (±2), then BMS/continuations (>|±2|).
Logs every transition as a success (continuation) or failure (reversion) and computes: Raw Win%, Laplace-smoothed probability, and Wilson confidence interval.
Draws Premium/Discount/Mid zones between the latest swing high/low and shows contextual probability labels at the extremes.
Filters & Upgrades
ATR swing filter: ignores tiny breaks; only counts pivots that exceed a user-set multiple of ATR.
MTF bias gate: only allows bullish sequences when price is above an HTF moving average (and vice-versa).
Label throttle: minimum bar spacing between plotted events to keep charts readable.
Response vs. Period: choose short-term or long-term structure resolution.
Outputs & Visuals
On-chart labels/lines for CHoCH/SMS/BMS (bull/bear colors).
Top-right table with Wins, Losses, Profitability, Laplace p̂, and Wilson CI (with sample-size guard).
Probability labels near current Up/Dn extremes.
Optional alerts containing ticker, timeframe, and the current probability summary.
Using the stats
Profitability = all-time raw follow-through rate.
Laplace p̂ stabilizes small-N swings.
Wilson CI shows a conservative range; the lower bound is a practical “floor.”
For best results, align entries with MTF bias, ensure swings pass the ATR filter, and favor entries in Discount (for longs) / Premium (for shorts) when the structure agrees.
Notes
This is an analytical tool, not a signal service. Always validate on your markets/timeframes and combine with risk management.
Volume + RSI & MA Differential"Volume + RSI & MA Differential," integrates volume, RSI, and moving average differentials to generate trading signals. The script calculates a 14-period RSI to identify overbought or oversold conditions, with customizable thresholds for buy and sell signals. It also computes a 20-period SMA of the volume to smooth out trading activity data, helping to identify trends in market participation.
The script incorporates a fast (50-period) and a slow (200-period) SMA to analyze short-term and long-term trends, respectively. The differential between these moving averages, adjusted by the volume SMA, is used to identify potential trend changes or confirmations. Bars are colored yellow when the RSI is below the buy threshold and volume is high, indicating a potential buy signal. Conversely, bars turn red when the RSI is above the sell threshold and the fast MA is below the current close price, suggesting a potential sell signal. Neutral conditions result in grey bars.
Additionally, the script uses color-coding to plot the volume SMA and a line that changes color based on the moving average differential. A black line indicates a broadening MA cloud and a bullish trend, while a grey line suggests a narrowing MA cloud and a potential selloff. A yellow line signals the beginning of a buyback. This visual representation helps traders quickly identify potential trading opportunities and trend changes, making the script a valuable tool for technical analysis.
VBC Signals with TP/SL V1.0This script was based on volume break candle theory.
VBC has a very simple idea. It uses the principle that if the price of the XAUUSD asset rises above a specified range of at least 600 points (configuarable) continuously, and a candle breaks the upward trend, a signal will be generated to sell. The entry principle is to enter at the price at the last bullish candle with TP300 SL300.
On the other hand, if the price of xauusd falls below the specified level of 600 points and a candle breaks the price down by 1 candle, a BUY signal will occur, and the ENTRY and TP SL will use the same values as the SELL signalใ
How it works:
SELL SIGNAL : When the asset price rises above 600 points continuously and a "SELL" signal occurs, place a limit sell order at the pair of green and red bars that formed the signal, specifying a TP of 300 and SL of 300.
BUY SIGNAL : When the asset price falls more than 600 points continuously and a "BUY" signal occurs, place a limit sell order at the double bar pattern of the red and green bars that formed the signal, specifying a TP of 300 and a SL of 300.
Disclaimer: This script is for educational purposes only. It does not constitute financial advice. Always do your own research before making trading decisions.
NOTE: For certain XAUUSD of certain broker (for instance XAUUSD on OANDA), the signal might found to often, just multiple the threshold by 10, then 600 will be come 6000
Theil-Sen Line Filter [BackQuant]Theil-Sen Line Filter
A robust, median-slope baseline that tracks price while resisting outliers. Designed for the chart pane as a clean, adaptive reference line with optional candle coloring and slope-flip alerts.
What this is
A trend filter that estimates the underlying slope of price using a Theil-Sen style median of past slopes, then advances a baseline by a controlled fraction of that slope each bar. The result is a smooth line that reacts to real directional change while staying calm through noise, gaps, and single-bar shocks.
Why Theil-Sen
Classical moving averages are sensitive to outliers and shape changes. Ordinary least squares is sensitive to large residuals. The Theil-Sen idea replaces a single fragile estimate with the median of many simple slopes, which is statistically robust and less influenced by a few extreme bars. That makes the baseline steadier in choppy conditions and cleaner around regime turns.
What it plots
Filtered baseline that advances by a fraction of the robust slope each bar.
Optional candle coloring by baseline slope sign for quick trend read.
Alerts when the baseline slope turns up or down.
How it behaves (high level)
Looks back over a fixed window and forms many “current vs past” bar-to-bar slopes.
Takes the median of those slopes to get a robust estimate for the bar.
Optionally caps the magnitude of that per-bar slope so a single volatile bar cannot yank the line.
Moves the baseline forward by a user-controlled fraction of the estimated slope. Lower fractions are smoother. Higher fractions are more responsive.
Inputs and what they do
Price Source — the series the filter tracks. Typical is close; HL2 or HLC3 can be smoother.
Window Length — how many bars to consider for slopes. Larger windows are steadier and slower. Smaller windows are quicker and noisier.
Response — fraction of the estimated slope applied each bar. 1.00 follows the robust slope closely; values below 1.00 dampen moves.
Slope Cap Mode — optional guardrail on each bar’s slope:
None — no cap.
ATR — cap scales with recent true range.
Percent — cap scales with price level.
Points — fixed absolute cap in price points.
ATR Length / Mult, Cap Percent, Cap Points — tune the chosen cap mode’s size.
UI Settings — show or hide the line, paint candles by slope, choose long and short colors.
How to read it
Up-slope baseline and green candles indicate a rising robust trend. Pullbacks that do not flip the slope often resolve in trend direction.
Down-slope baseline and red candles indicate a falling robust trend. Bounces against the slope are lower-probability until proven otherwise.
Flat or frequent flips suggest a range. Increase window length or decrease response if you want fewer whipsaws in sideways markets.
Use cases
Bias filter — only take longs when slope is up, shorts when slope is down. It is a simple way to gate faster setups.
Stop or trail reference — use the line as a trailing guide. If price closes beyond the line and the slope flips, consider reducing exposure.
Regime detector — widen the window on higher timeframes to define major up vs down regimes for asset rotation or risk toggles.
Noise control — enable a cap mode in very volatile symbols to retain the line’s continuity through event bars.
Tuning guidance
Quick swing trading — shorter window, higher response, optionally add a percent cap to keep it stable on large moves.
Position trading — longer window, moderate response. ATR cap tends to scale well across cycles.
Low-liquidity or gappy charts — prefer longer window and a points or ATR cap. That reduces jumpiness around discontinuities.
Alerts included
Theil-Sen Up Slope — baseline’s one-bar change crosses above zero.
Theil-Sen Down Slope — baseline’s one-bar change crosses below zero.
Strengths
Robust to outliers through median-based slope estimation.
Continuously advances with price rather than re-anchoring, which reduces lag at turns.
User-selectable slope caps to tame shock bars without over-smoothing everything.
Minimal visuals with optional candle painting for fast regime recognition.
Notes
This is a filter, not a trading system. It does not account for execution, spreads, or gaps. Pair it with entry logic, risk management, and higher-timeframe context if you plan to use it for decisions.
Volume gaps Volume gaps (white-highlighted zones) are unfinished business in the market. Mark them between low–high, and expect price to revisit them. They’re excellent targets for mean reversion trades and confluence levels for continuation setups
Cascades & Sloped Lines (RU) • v6How it works
• The base trendline is built from the last two confirmed pivot lows (uptrend) and/or pivot highs (downtrend).
• “Cascades” are a set of parallel lines above and below the base line, spaced equally: either ATR × multiplier or a fixed percentage of price.
• Lines are automatically rebuilt when a new confirmed pivot appears. To avoid overloading the chart, old lines are removed.
Useful settings
• Increase Pivot Left/Right if you want “larger” swing points.
• Switch the step mode to Percent if you want a fixed distance.
• Adjust Lines Above/Below to get a “dense” or “sparse” cascade.
• Colors and thickness — match them to your style.
WEBBERISKI TRADESWEBBERISKI Indicator
The WEBBERISKI indicator is a powerful tool designed for traders seeking to capitalize on short-term price movements in volatile markets. It generates buy signals based on a combination of RSI crossovers, EMA breakouts, and VWAP conditions, with customizable filters to restrict signals to prices above or below the anchored VWAP. The indicator tracks both active and ignored trades, providing detailed performance metrics, including win/loss percentages, drop percentages, and time-to-take-profit buckets (<1h, 1-2h, 2-3h, 3-4h, >4h). Visual labels (W, L, IW, IL) mark trade outcomes on the chart, while two tables display drop percentage distributions and comprehensive trade statistics, including VWAP-based win rates. Ideal for day traders and scalpers, WEBBERISKI offers flexible inputs for take-profit, stop-loss, and technical parameters to optimize trading strategies.
The indicator works best and has the highest probability win rates when SL is 5%+ so you need nerves to take trades. But can provide 60%+ win rates with lower SL (1%).
Default TP/SL setting is 0.6% for TP, 5% for SL. Ideally take trades and place your buy order 0.3-0.4% below the signal candle for a TP% of 0.9-1.0%.