DNSE VN301!, Bollinger Bands Break Out Strategy "Bollinger Bands Breakout with SMA Trend Filter" is a volatility breakout strategy designed to capture strong directional price movements when price breaks outside its recent trading range. The strategy uses Bollinger Bands, constructed from an SMA(20) and two standard deviations, to identify bullish breakouts when price closes above the upper band and bearish breakouts when price closes below the lower band.
To improve signal quality, the strategy incorporates an optional SMA(200) trend filter, allowing Long trades only when the SMA is rising and Short trades only when it is falling. By combining volatility-based breakout signals with long-term trend confirmation, the strategy seeks to reduce false breakouts during ranging markets while participating in sustained intraday trends. It also includes configurable stop loss, take profit, trading session filters, automatic end-of-day position closure, and trend reversal exits for disciplined risk management.
Strategy settings and configuration:
Chart timeframe: recommended 5-minute chart
Position size: 3 contracts
Bollinger Bands length: 20
Bollinger Bands multiplier: 2.0
SMA length: 200
Stop loss: 10 points
Take profit: disabled
SMA trend filter: On / Off
Take profit: On / Off
Time filter: On / Off
Trading session: 09:00 – 14:30
Trade direction: Long / Short / Both
Default script settings:
The strategy calculates Bollinger Bands using the SMA(20) of the closing price. The upper and lower bands are created by adding or subtracting two standard deviations around the middle line.
When volatility increases, the Bollinger Bands expand. When the market is quiet or moving sideways, the bands contract.
When the closing price breaks above the upper Bollinger Band, buying pressure may be taking control. When the closing price breaks below the lower Bollinger Band, selling pressure may be taking control.
When the SMA(200) trend filter is enabled, the script only allows Long trades when SMA(200) is rising and only allows Short trades when SMA(200) is falling. When the SMA filter is disabled, the strategy can trade both directions based only on Bollinger Bands breakout signals.
Users can add the built-in Bollinger Bands indicator on TradingView with Length 20 and Multiplier 2.0 to visually monitor the signal on the price chart.
Entry and exit rules:
Long entry:
Closing price > upper Bollinger Band
AND SMA(200) is rising, if the SMA filter is enabled
AND the signal appears during the trading session
AND trade direction allows Long entries
Long exit:
Stop loss: 10 points from entry price
Take profit: disabled by default
Closing price touches or breaks below the lower Bollinger Band
SMA(200) turns downward, if the SMA filter is enabled
Reversal when a valid Short signal appears
Automatic position close at the end of the trading session
Short entry:
Closing price < lower Bollinger Band
AND SMA(200) is falling, if the SMA filter is enabled
AND the signal appears during the trading session
AND trade direction allows Short entries
Short exit:
Stop loss: 10 points from entry price
Take profit: disabled by default
Closing price touches or breaks above the upper Bollinger Band
SMA(200) turns upward, if the SMA filter is enabled
Reversal when a valid Long signal appears
Automatic position close at the end of the trading session
Risk disclaimer:
Futures trading involves a high level of risk and prices can move sharply. This script is provided for reference, research, and backtesting purposes only. Users should fully understand derivatives trading, their own risk tolerance, and the strategy logic before applying it to live trading.
All investment decisions are the responsibility of the user. phaisinh.online is not responsible for any losses arising from the use of this strategy in real trading. Past performance does not guarantee future results.
____________________________________________________________________
"Bollinger Bands Breakout với Bộ lọc Xu hướng SMA" là một chiến lược giao dịch theo xu hướng dựa trên sự bứt phá của biến động giá, được thiết kế nhằm nắm bắt các chuyển động mạnh theo một hướng khi giá vượt ra khỏi vùng dao động gần nhất. Chiến lược sử dụng Bollinger Bands, được xây dựng từ SMA(20) và 2 độ lệch chuẩn, để xác định tín hiệu mua khi giá đóng cửa vượt lên trên dải trên và tín hiệu bán khi giá đóng cửa xuống dưới dải dưới.
Để nâng cao chất lượng tín hiệu, chiến lược tích hợp bộ lọc xu hướng SMA(200) (có thể bật hoặc tắt), chỉ cho phép mở vị thế Long khi SMA đang dốc lên và vị thế Short khi SMA đang dốc xuống. Bằng cách kết hợp tín hiệu bứt phá theo biến động của Bollinger Bands với xác nhận xu hướng dài hạn, chiến lược hướng tới việc giảm thiểu các tín hiệu phá vỡ giả trong giai đoạn thị trường đi ngang, đồng thời tận dụng các xu hướng intraday kéo dài. Ngoài ra, chiến lược còn bao gồm các tùy chọn Stop Loss, Take Profit, bộ lọc khung thời gian giao dịch, cơ chế tự động đóng toàn bộ vị thế khi kết thúc phiên, cùng với điều kiện thoát lệnh khi xu hướng SMA đảo chiều, nhằm đảm bảo quản trị rủi ro một cách chặt chẽ và có kỷ luật.
Cài đặt & cấu hình chiến lược:
Biểu đồ: khuyến nghị khung 5 phút
Khối lượng giao dịch: 3 hợp đồng
Chu kỳ Bollinger Bands: 20
Hệ số nhân Bollinger Bands: 2.0
Chu kỳ SMA: 200
Cắt lỗ: 10 điểm
Chốt lời: tắt
Bộ lọc xu hướng SMA: Bật / Tắt
Dùng chốt lời: Bật / Tắt
Bộ lọc giờ: Bật / Tắt
Khung giờ giao dịch: 09:00 – 14:30
Chiều giao dịch: Mua / Bán / Cả hai
Cài đặt mặc định của script:
Chiến lược tính toán Bollinger Bands dựa trên đường SMA(20) của giá đóng cửa. Dải trên và dải dưới được tạo bằng cách cộng hoặc trừ hai độ lệch chuẩn quanh đường giữa.
Khi biến động tăng mạnh, hai dải Bollinger Bands sẽ mở rộng. Khi thị trường đi ngang hoặc biến động thấp, hai dải sẽ co hẹp lại.
Khi giá đóng cửa vượt lên trên dải trên Bollinger Bands, lực mua có thể đang chiếm ưu thế. Khi giá đóng cửa phá xuống dưới dải dưới Bollinger Bands, lực bán có thể đang chiếm ưu thế.
Khi bật bộ lọc xu hướng SMA(200), script chỉ cho phép lệnh Mua khi SMA(200) dốc lên và chỉ cho phép lệnh Bán khi SMA(200) dốc xuống. Khi tắt bộ lọc SMA, chiến lược có thể giao dịch cả hai chiều chỉ dựa trên tín hiệu breakout của Bollinger Bands.
Người dùng có thể thêm chỉ báo Bollinger Bands có sẵn trên TradingView với tham số Length 20 và Multiplier 2.0 để quan sát tín hiệu trực quan trên biểu đồ giá.
Điều kiện vào và thoát lệnh:
Vào lệnh Mua:
Giá đóng cửa > dải trên Bollinger Bands
VÀ SMA(200) dốc lên, nếu bật bộ lọc SMA
VÀ tín hiệu xuất hiện trong khung giờ giao dịch
VÀ chiều giao dịch cho phép lệnh Mua
Thoát lệnh Mua:
Cắt lỗ: 10 điểm từ giá vào lệnh
Chốt lời: không dùng theo mặc định
Giá đóng cửa chạm hoặc phá xuống dải dưới Bollinger Bands
SMA(200) đảo chiều xuống, nếu bật bộ lọc SMA
Đảo chiều khi xuất hiện tín hiệu Bán hợp lệ
Tự động đóng lệnh khi hết khung giờ giao dịch
Vào lệnh Bán:
Giá đóng cửa < dải dưới Bollinger Bands
VÀ SMA(200) dốc xuống, nếu bật bộ lọc SMA
VÀ tín hiệu xuất hiện trong khung giờ giao dịch
VÀ chiều giao dịch cho phép lệnh Bán
Thoát lệnh Bán:
Cắt lỗ: 10 điểm từ giá vào lệnh
Chốt lời: không dùng theo mặc định
Giá đóng cửa chạm hoặc phá lên dải trên Bollinger Bands
SMA(200) đảo chiều lên, nếu bật bộ lọc SMA
Đảo chiều khi xuất hiện tín hiệu Mua hợp lệ
Tự động đóng lệnh khi hết khung giờ giao dịch
Tuyên bố rủi ro:
Giao dịch hợp đồng tương lai có mức độ rủi ro cao và giá có thể biến động mạnh. Script này chỉ phục vụ mục đích tham khảo, nghiên cứu và kiểm thử. Người dùng cần hiểu rõ giao dịch phái sinh, khẩu vị rủi ro cá nhân và logic của chiến lược trước khi áp dụng vào giao dịch thực tế.
Mọi quyết định đầu tư thuộc trách nhiệm của người dùng. phaisinh.online không chịu trách nhiệm cho bất kỳ khoản lỗ nào phát sinh từ việc sử dụng chiến lược này trong giao dịch thực tế. Hiệu quả trong quá khứ không đảm bảo kết quả trong tương lai.
Strategy

Historical Precedent Engine [HPE]WHAT IT DOES
HPE takes the last few candles on your chart, searches that chart's own history for
earlier sequences that resemble them, and shows you what price did after those earlier
sequences. It is an analog study. The output is a summary of precedent, not a forecast.
TUNING IS NOT OPTIONAL — READ THIS FIRST
This is a matcher, and a matcher only speaks when it finds something. Every enabled
filter is a hard gate applied to every candle in the fingerprint, and the gates compound:
a sequence qualifies only if candle 1 passes wick, body and volume, and candle 2 passes
all three, and so on, and the sequence momentum passes, and the direction rule passes.
Tighten two of those and the survivor count does not halve, it collapses.
So the normal failure mode is an empty dashboard. Median outcome, tolerance band, delta
and range all read "—", Bias reads Neutral, and Matches Used reads 0. That is not a bug
and it is not the tool being broken. It means nothing in this chart's history was close
enough to the present under the settings you have. The honest answer for that bar is
silence, and the tool gives it.
The tolerance units
Wick and body are measured as a percentage of the candle's own high-to-low range, not of
price. An upper wick occupying a fifth of its candle scores 20, whether that candle is a
one-minute Bitcoin bar or a daily equity bar. A tolerance of 12 therefore means "within
12 percentage points of range", and it means the same thing on every instrument and every
timeframe.
That is deliberate. Measured against price instead, the same tolerance would need to be
roughly a hundred times larger on a daily equity chart than on a one-minute crypto chart,
and no single default could serve both — one setting would accept everything on one chart
and nothing on the other.
On Auto-Tune, which ships OFF
Auto-Tune moves the wick and body tolerances based on how well recent projections
resolved. It ships disabled, for two measured reasons.
It cannot start from nothing. It does not act until at least five projections have been
scored, so if your tolerances are too tight to ever produce a match, there are no
projections, nothing is scored, and it never moves. It is a regulator, not a starter
motor.
And once it does start, it tends not to stop. It can only travel between a quarter and
four times your input, and when widening fails to improve fit — which is the usual case
if the matches were poor to begin with — it widens every bar until it pins at four times
your input and stays there. On the test chart it did exactly that, and the difference it
made was 50 resolved projections instead of 49. It bought one projection out of fifty
while making the number in the settings box a fiction.
So it is off, and what you type is what runs. Turn it on if you want it, knowing both of
the above.
The order to loosen in, most effective first:
1. Strict Direction off. With it on, every candle must match direction, which is a
1-in-2^N filter before any tolerance is applied. This is the single biggest lever.
2. Shorten Sequence Length. Fewer candles means fewer conjunctive conditions. Three is
the minimum and is the default for that reason.
3. Raise Wick and Body Tolerance, in the units described above.
4. Turn off Require Per-Candle Volume Match and Require Momentum Match. Volume ratios in
particular are noisy on short timeframes and reject a lot for little gain.
5. Lower Min Matches Required. It ships at 2 rather than 3 because on the instrument
these defaults were measured on, 3 never fires. Read the last paragraph of this
description before you take that as a recommendation.
Where the defaults came from
They were measured with a full 1,000-sequence library on three charts chosen to be as
unalike as possible, and they were picked to make the engine speak at all rather than to
make it look good:
COINBASE:BTCUSD 1-minute 73 projections over 25,837 bars
COINBASE:BTCUSD 1-hour 33 projections over 22,764 bars
AMEX:SPY daily 29 projections over 8,436 bars
That is between one bar in 290 and one bar in 690 — the same order of magnitude across a
crypto intraday chart and an equity daily chart, with no per-instrument tuning. It should
still be quiet, and you should still retune for your own instrument and horizon, but the
defaults are a measured starting point rather than a guess.
One note on reading the dashboard while you do that. The calibration row shows total
projections alongside how many sit in the calibration window, and that window is capped by
Calibration window (samples) — 50 by default. Watch the total, not the window. The window
fills early and then stops moving, which makes a well-tuned setup and a barely-working one
look identical.
ON LIBRARY SIZE
Max Stored Sequences is the pool the matcher searches, and a bigger pool is the one way
to get more matches without making each match mean less. It is capped at 1,000 by default
for a practical reason: raising it substantially can push the script past TradingView's
calculation limit, at which point it stops reporting entirely. If you raise it and the
indicator goes blank rather than merely empty, that is what happened. Put it back. This
cap is also the real ceiling on how often the engine can fire at a tolerance tight enough
to be meaningful, and it is worth knowing that before you go hunting for settings.
HOW IT WORKS
1. Fingerprint. On every confirmed bar, the last N candles are reduced to a five-field
vector per candle: upper wick, lower wick, body, direction, and volume measured
against its own moving average.
2. Store. That fingerprint is written to a rolling library along with what price did over
the following bars.
3. Match. The current fingerprint is compared against every stored sequence. A stored
sequence qualifies only if each candle falls inside the wick, body and volume
tolerances, and only if the sequence momentum falls inside its tolerance. Direction
matching is separate: with Strict Direction on, every candle must match direction;
with it off, only the final candle must. An optional session filter restricts matches
to the same trading session.
4. Summarise. Qualifying matches are ranked by how well their own past projections
resolved, and the strongest are combined into a single percentile outcome — the median
by default. If fewer than Min Matches Required qualify, nothing is drawn.
5. Calibrate. Once the horizon elapses, each projection is scored against what actually
happened. That score weights how much a stored sequence counts in future matches, and
feeds Auto-Tune if you have enabled it.
READING THE CHART
Projection line and band — the percentile outcome of the current match set, extended to
the horizon.
Consensus paths — the individual paths of the top matches, drawn separately, so you can
see the spread the single summary line came from. A tight cluster and a wide scatter
produce the same median.
Rolling projection trail — past projections left on the chart beside what price actually
did. This is deliberate. A tool that hides its misses is not worth reading.
Dashboard — match count, median outcome, ±1σ range, session, library size, live
tolerances, and the calibration block. The projection values — median outcome, tolerance
band, delta, range, bias, match count and best-match error — are cleared at the start of
every confirmed bar, so those rows always show that bar's answer and never a leftover
from an earlier bar that happened to match. The library and calibration counters are
cumulative by design and do not clear.
The same state is also published to the Data Window as plain numbers, which is easier to
read than canvas text while you are tuning.
ON THE CALIBRATION NUMBERS
The dashboard reports mean projection error, not accuracy.
It is the average distance between projection and outcome, expressed as a share of the
size of the move that actually occurred, measured over the most recent resolved
projections on the chart you are looking at. It is computed in-sample, on bars the engine
had already stored, and it is not a forward result.
It is there so you can tell whether your tolerances are set sensibly. It is not evidence
that the tool works, and it should not be read as a hit rate. Because the actual move is
the denominator, the figure also moves with volatility regime rather than with skill
alone — quiet bars punish it, large moves flatter it.
ON REPAINTING
Two specific claims, both checkable in the source:
There are no request.security() calls anywhere in this script. Every value is computed
from the chart's own bars, so there is no higher-timeframe lookahead question to get
wrong in the first place.
Every drawing and every dashboard write sits inside a single barstate.isconfirmed gate.
Nothing is created, moved or deleted while the live bar is still forming.
A projection does extend to bars that have not happened yet. It does not move once drawn.
It is simply right or wrong, and the trail is there so you can see which.
SETTINGS WORTH KNOWING
Sequence Length — how many candles form the fingerprint. Longer is stricter and finds
fewer matches, and the effect is multiplicative rather than linear.
Min Matches Required — below this count nothing is drawn.
Delta Percentile — 50 is the median. Move it to read the pessimistic or optimistic tail
of the same match set rather than its centre.
Auto-Tune Tolerances — off by default; see above before enabling.
Strict Direction — the difference between "these candles had the same shape" and "these
candles had the same shape and went the same way."
WHAT THIS IS NOT
This is a visualization and analysis tool, not a trading system. It does not produce
advice. Nothing here is a signal to enter or exit a position, and no performance is
claimed or implied. Markets change regime, and any tool built on historical structure
will fail when they do. Use it as context alongside your own analysis.
One more thing worth saying plainly, and it is the honest counterweight to the tuning
advice above: a small sample of matches is a small sample. Two historical analogs tell
you very little, and the engine will draw a line from two just as readily as from thirty.
Min Matches ships at 2 because that is what it took to get the engine to speak on the
instrument it was measured on — which is a statement about how hard analogs are to find
in a 1,000-sequence library, not a claim that two is enough to believe. Loosening the
filters until something appears is easy, and it is exactly how you end up reading noise.
Watch the match count before you read the line, and treat a projection drawn from a
handful of precedents as the weak evidence it is.
Indicator

Market Correlation Visualizer (Z-Score)Market Correlation Visualizer (Z-Score & % Var)
OVERVIEW
The Market Correlation Visualizer is a multi-asset analysis tool designed for intraday traders and quant analysts. Instead of relying on static correlation tables, this script plots real-time relative performance across up to 8 benchmark assets (Indices, Volatility, Commodities, Bonds, and Crypto) directly on your chart panel.
By standardizing assets through either Z-Score (Standard Deviations) or Percentage Change, you can instantly spot institutional imbalances, intermarket divergences, and statistical overextensions before they manifest on price action alone.
KEY FEATURES
Dual Engine Calculation:
Z-Score Normalization scales price movements based on rolling standard deviation. It identifies when an asset is statistically overbought/oversold relative to its peers.
Daily % Change Anchor normalizes performance from a customizable anchor time (e.g. Daily Open) to track pure percentage strength or weakness throughout the session.
Smart Right-Hand Labels:
Clean, dynamic labels automatically lock onto the right boundary of the indicator panel, displaying the ticker name and exact current reading. No need to memorize line colors.
Statistical Excess Zones (+/- 2.0 SD):
Visual upper and lower threshold bands immediately highlight extreme mean-reversion zones when using Z-Score mode.
Selective Visibility Filters:
Toggle up to 8 custom symbols on or off directly from the settings menu to keep your workspace uncluttered.
Error-Handled Security Fetching:
Built with robust fallback logic to ensure smooth performance across various brokers without breaking the chart panel if a specific ticker fails to load.
HOW TO USE FOR INTRADAY TRADING
Spotting SMT / Intermarket Divergences:
Watch key correlated pairs (e.g. ES vs NQ). If one index makes a new high while the visualizer line on the other fails to confirm, a liquidity sweep or SMT divergence is in play.
Mean-Reversion & Arbitrage:
When an asset crosses outside the +/- 2.0 Standard Deviation band while others remain neutral, it indicates an overextended asset prone to snapping back toward the zero-line.
Volatility Confirmation:
Track VIX against equity futures (ES, NQ). If ES hits a new low but the VIX line fails to push upward, the selling momentum lacks institutional backing.
DEFAULT TICKERS INCLUDED
Asset 1: TVC:VIX (Volatility)
Asset 2: CME_MINI:ES1! (S&P 500)
Asset 3: CME_MINI:NQ1! (Nasdaq 100)
Asset 4: COMEX:GC1! (Gold)
Assets 5 to 8 (Optional): NYMEX:CL1! (Crude Oil), CBOT:ZB1! (30Y Bonds), CME_MINI:RTY1! (Russell 2000), BINANCE:BTCUSDT (Bitcoin).
All inputs can be fully customized in the script settings. Indicator

EWS - Anchored VWAP IndicatorVWAP — Daily / Weekly / Monthly
Three independently anchored volume weighted average prices on one chart. Each
one resets on the first tick of a new day, week and month, so you always see
where the daily, weekly and monthly volume has actually been transacted rather
than a single rolling average.
WHAT IT DOES
VWAP is the average price of every trade in a period, weighted by size. It is
the reference price large orders are measured against, which is why price so
often gravitates back to it. A daily VWAP tells you who is winning the session,
a weekly VWAP frames the swing, and a monthly VWAP marks the level that
positional money is anchored to. Having all three at once shows you when they
stack up (trend) and when they pinch together (compression before expansion).
Each VWAP is accumulated bar by bar from the raw price and volume of the chart
you are on. Nothing is smoothed, averaged again, or borrowed from a higher
timeframe request, so there is no repainting and no lag beyond the data itself.
ANCHORING
The whole point of a periodic VWAP is where it resets, so the anchor is
configurable rather than assumed.
Session (exchange) resets when TradingView opens a new daily, weekly or monthly
bar. This respects the symbol's real session, so a futures day correctly begins
at 18:00 the previous evening and a stock day begins at the opening bell. This
matches the behaviour of the built-in VWAP.
Calendar resets at 00:00 in a timezone you choose: the exchange timezone, UTC,
or any IANA timezone you type in. This is normally what you want on 24/7 crypto,
where there is no session and the market convention is a UTC day.
Pick the mode that matches how you actually think about the instrument. For
crypto, Calendar UTC. For futures, FX and equities, Session.
FEATURES
Daily, weekly and monthly VWAP, each with its own colour, line width and
on/off switch.
Optional standard deviation bands on any of the three, with a configurable
multiplier and a shaded fill. The deviation is volume weighted from the same
accumulator as the VWAP itself, not a simple standard deviation of price.
Show only the current period. Hides every completed day, week and month and
draws just the anchors that are still building. Useful when you only trade the
live level and want the history out of the way.
Auto-hide. A daily VWAP on a daily chart is just the bar itself, so anchors
that are meaningless on the current timeframe are hidden automatically. Can be
turned off.
Line breaks at each reset, so you do not get a vertical spike connecting the
end of one period to the start of the next.
Value labels at the right edge showing the live price of each VWAP.
Alerts for price crossing the daily, weekly or monthly VWAP.
Selectable source, defaulting to hlc3, which is the standard VWAP price.
NOTES
The indicator needs real volume. If the symbol's data feed provides none, it
will tell you instead of silently drawing a flat line. Some index and CFD style
tickers have no volume; use an exchange specific ticker in that case.
Values update on every tick. When a new period begins, the reset happens on the
first tick of that period's first bar. You do not have to wait for a bar to
close.
This is a reference and context tool, not a signal generator. VWAP tells you
where value is, not which way price is going next. Use it to frame entries,
size risk against a level, and judge whether a move is extended, and combine it
with your own method rather than trading crosses on their own.
Indicator

CORTEX MULTI-TIMEFRAME POI ENGINE# CORTEX MULTI-TIMEFRAME POI ENGINE
The CORTEX MULTI-TIMEFRAME POI ENGINE is a rules-based TradingView indicator designed to identify, qualify, and manage supply-and-demand Points of Interest across multiple structural timeframes.
Rather than marking every pivot, opposing candle, or conventional order block, CORTEX applies a structured qualification process built around confirmed market structure, consolidation quality, displacement, retracement depth, imbalance, liquidity proxies, and breaker-block behavior.
## Multi-Timeframe Market Structure
CORTEX organizes market location into three distinct layers:
- **Daily POIs** establish higher-timeframe macro location.
- **H4 POIs** identify intermediate structural areas.
- **M15 and M5 AM-session POIs** support intraday refinement on NQ and ES.
Daily, H4, M15, and M5 layers are independently controlled, allowing traders to reduce chart clutter and focus only on the context relevant to their current workflow.
## POI Qualification
A standard CORTEX POI progresses through an objective detection pipeline:
1. Meaningful retracement
2. Compressed base formation
3. Institutional Footprint Candle refinement
4. Directional displacement
5. Mandatory break of structure
6. Liquidity and imbalance evaluation
7. Width and location validation
8. Transparent quality scoring
9. Confirmed zone creation
Break of structure is mandatory. Additional characteristics contribute to a configurable quality score rather than relying on unexplained probability claims.
Available qualification modes include:
- **Loose** for broader structural identification
- **Balanced** for the recommended combination of quality and frequency
- **Strict** for selective, higher-confluence zones
- **Custom** for complete user control
## Breaker-Block Fusion
The engine includes an independently developed ICT breaker-block module.
A potential order block becomes a breaker only after a later confirmed candle closes through its opposite boundary. Wick-only violations do not qualify.
Breaker blocks may:
- Create standalone breaker POIs
- Add confluence to existing supply or demand zones
- Merge with overlapping, same-direction POIs
- Refine the final area to the valid price intersection
- Increase the zone’s score without exceeding 100
Merged areas are classified as **Breaker-Confluent POIs**, helping distinguish ordinary structural zones from areas supported by a confirmed failed-block transition.
## CORTEX AM Session POI Layer
The intraday module is designed specifically for NQ and ES during the default **08:00–11:00 America/New_York** session.
It provides:
- M15 POIs on M15 and M5 charts
- M5 POIs on M5 charts
- Automatic daylight-saving adjustment
- Automatic NQ and ES futures-root recognition
- Optional manual instrument override
- Confirmed post-session BOS allowance
- Independent demand, supply, timeframe, and display controls
Mandatory default width limits are:
- **NQ: 250 ticks**
- **ES: 40 ticks**
Zone width is calculated using the instrument’s native minimum tick size. Candidates exceeding the applicable limit are rejected before publication.
## Transparent Scoring
Each POI receives an objective score from 0 to 100. Depending on the selected mode and timeframe, the score may incorporate:
- Confirmed BOS
- Base quality
- Retracement depth
- Departure strength
- Liquidity sweep
- Fair-value gap or imbalance
- Resting-liquidity proxy
- Breaker-block confluence
Scores and classifications can be displayed directly on zone labels and in the Data Window.
## Zone Lifecycle Management
Every confirmed POI is actively managed through the following lifecycle:
- **Fresh**
- **Tested**
- **Mitigated**
- **Invalidated**
- **Expired**
Users can configure mitigation and invalidation behavior, retain invalidated zones for historical review, and control how long intraday zones remain available.
## Non-Repainting Design
CORTEX uses confirmed source-timeframe information for zone creation.
Higher-timeframe results are transported using confirmed historical offsets, preventing unfinished Daily, H4, M15, or M5 candles from publishing premature zones. A confirmed POI may be anchored to its original footprint candle, but it does not become logically active before its qualifying structure is complete.
This deliberate confirmation delay is intended to support stable behavior across:
- Historical charts
- Realtime execution
- TradingView Bar Replay
## Diagnostics and Alerts
The CORTEX diagnostics dashboard reports:
- Latest qualification stage
- Signals detected
- Candidates awaiting BOS
- Width-filter rejections
- Breaker flips
- Zones retained
- Session status
- Detected instrument
- Applicable tick limit
- Chart-timeframe compatibility
Alerts are available for new POIs, breaker zones, confluence, first tests, mitigation, and invalidation. Alerts should be configured for **Once Per Bar Close**.
## Intended Workflow
CORTEX is designed to support a top-down process:
1. Use Daily zones to establish macro location.
2. Use H4 zones to refine structural context.
3. Use M15 zones for intraday directional areas.
4. Use M5 zones for lower-timeframe refinement.
5. Evaluate price behavior at qualified zones rather than treating every zone as an automatic entry.
CORTEX does not claim to identify actual institutional orders. Supply, demand, liquidity, imbalance, and breaker classifications are objective technical proxies derived from price action.
This indicator is an analytical framework—not financial advice or a guarantee of future performance. Traders should combine it with appropriate confirmation, risk management, and independent judgment. Indicator

Automated Liquidity & Key Levels Matrix PROAutomated Liquidity & Key Levels Matrix PRO
Automated Liquidity & Key Levels Matrix PRO is an advanced, multi functional technical analysis script designed for quantitative traders and technical analysts. It automatically isolates high probability support and resistance zones, tracks real time market structure breakouts with split line clarity, highlights high volume expansion candles, and provides an attractive glowing trend wave layer.
Key Features Overview
1. Ultra Attractive Glowing Trend Wave
Includes a smooth dynamic trend wave with adjustable halo glow effects, line width, and colors to easily visualize dynamic trend direction.
2. Clean Split Line Market Structure Signals
Features refined Break of Structure and Change of Character signals. The structure line splits cleanly around the centered label, leaving a gap so the text stands out clearly without line overlap.
3. Text Free Clean Major Swing Badges
Isolates major macro swing high and low extremes using text free, solid color directional badges to keep chart visuals clean and minimal.
4. Dynamic Support and Resistance Zones
Automatically maps key supply and demand ranges across price action. To keep your chart clean and easy to read, broken or mitigated zones automatically disappear as soon as price breaks through them.
5. Volume Weighted Smart Candlestick Heatmap
Combines dynamic structural trend direction with volume expansion detection. High volume expansion bars render in distinct neon pink highlights for instant volatility identification.
6. Comprehensive Customization Panel
Includes independent controls for line thickness, text colors, line colors, font sizes, wave parameters, and zone fill opacity.
How to Use
Step 1: Trend Identification
Observe the Glowing Trend Wave and Volume Weighted Smart Candlestick theme to gauge underlying trend direction.
Step 2: Monitor Dynamic Key Zones
Look for price interactions around active, unmitigated support and resistance zones.
Step 3: Analyze Clean Structure Signals
Watch for Break of Structure and Change of Character signals displayed with split lines and centered labels.
Settings Overview
Glowing Wave Settings
- Show Glowing Wave Layer: Toggle display of the dynamic trend wave.
- Wave Period & Line Thickness: Adjust wave sensitivity and visual halo glow.
Market Structure Settings
- Show Breakout Signals: Toggle structural lines and labels.
- Independent Colors & Sizes: Customize BOS/CHoCH line colors, text colors, and font sizes separately.
Support and Resistance Settings
- Show Dynamic Support & Resistance: Toggle zone rectangles.
- Zone Fill Transparency: Customize fill opacity from 0 to 100.
Major Swing Settings
- Show Clean Major Swing Badges: Toggle text free ITH/ITL pivot badges.
Disclaimer
This script is built strictly for educational, analytical, and charting enhancement purposes. It does not provide financial advice, trade recommendations, or guaranteed results. Always practice proper risk management. Indicator

2pac futures times 3AM & 11AM Candle Boxes (NY Time)
---
**3AM & 11AM Candle Box — New York Time Session Levels**
This indicator marks two of the most-watched clock-time candles on any 5-minute chart: the candle that opens at **3:00 AM New York time** and the one that opens at **11:00 AM New York time**. Each candle's high and low get boxed in — grey for the 3AM candle, blue for the 11AM candle — and the box can stretch forward in real time so that level stays visible as price continues to trade through the day.
Why these two times matter: 3:00 AM NY sits right around the London session ramp-up, often marking the range price consolidates in before the New York session opens. 11:00 AM NY falls in the middle of the NY AM session, a common checkpoint traders use to judge whether the morning's move has real follow-through or is starting to stall. Boxing both gives you two clean, objective reference zones without having to eyeball chart time stamps.
**How to use it for entries**
The most common way to trade off these boxes is a **break and retest**: wait for price to close outside the box (above for a long idea, below for a short), then watch for price to pull back and test that broken edge as new support or resistance before continuing in the breakout direction. A stop typically sits just on the other side of the box; a target is usually the next visible structure, prior high/low, or a fixed risk-multiple.
**Confluence** is what separates a random break from a higher-quality one — look for the retest to line up with other things you already trust: a prior day's high/low, a round number, a VWAP touch, or a higher-timeframe trendline. The more of those stacking at the same retest zone, the more weight that level tends to carry.
Both boxes are fully adjustable — time, color, and whether they extend live or stop at a fixed width — so this works as a standalone session marker or as one more layer of confluence in a broader system.
*Not financial advice — for educational and charting purposes only.* Indicator

Institutional SMC & Order Flow Matrix PROInstitutional SMC & Order Flow Matrix PRO
Institutional SMC & Order Flow Matrix PRO is a clean, modern, and highly versatile technical charting tool engineered for traders practicing Smart Money Concepts and Order Flow Trading. Built with a focus on visual clarity, it eliminates unnecessary chart clutter by utilizing auto mitigating execution zones, swing anchored market structure lines, and an intelligent trend heatmap.
Key Features Overview
1. Precision Anchored Market Structure
Tracks Break of Structure and Change of Character signals with extreme precision. Lines originate directly from actual swing high or low pivot prices, while structure text labels sit neatly in the center of lines to prevent candle overlap.
2. Smart Auto Mitigating Order Block Zones
Automatically maps active institutional order blocks and imbalance execution zones. Mitigated zones automatically vanish from your chart once price fills the imbalance, keeping your workspace clean and professional.
3. Institutional Candle Heatmap
Features dynamic candlestick coloring driven by macro structural pivots. Bullish trend phases render in clean vibrant green, bearish phases in deep red, and high momentum displacement candles highlight in glowing gold.
4. Major Intermediate Term High and Low Badges
Automatically detects macro structural extremes. Displays solid red Intermediate Term High badges at major resistance tops and green Intermediate Term Low badges at major support bottoms.
5. Complete Manual Customization Suite
Includes comprehensive user settings for every element. Customize line styles, line thickness, border widths, box transparency, text alignment, text colors, and font sizes.
How to Use
Step 1: Identify Macro Trend Bias
Observe the Institutional Candle Heatmap theme to quickly determine current directional order flow.
Step 2: Monitor Centered Structure Signals
Look for precise Break of Structure lines and Change of Character signals anchored directly from swing points.
Step 3: Spot Gold Displacement Candles
Identify gold highlighted expansion candles that create fresh institutional order blocks.
Step 4: Trade Active Execution Zones
Utilize unmitigated bullish and bearish order block zones for high probability entries.
Settings Overview
Market Structure Settings
- Show Market Structure: Toggle structural line displays.
- Line Style and Thickness: Choose between Solid, Dashed, or Dotted lines with adjustable width.
Order Block Zone Settings
- Show Active Order Blocks: Toggle order block rectangles.
- Zone Fill Transparency: Adjust fill opacity from 0 to 100.
- Zone Text Settings: Customize display text, text alignment, font size, and text color.
Major Pivot Settings
- Show Major ITH / ITL Badges: Toggle visibility of macro pivot badges.
- Sensitivity: Adjust pivot lookback sensitivity.
Candle Heatmap Settings
- Enable Trend Candle Heatmap: Toggle dynamic trend candles and gold displacement highlights.
Disclaimer
This indicator is built strictly for educational, analytical, and charting enhancement purposes. It does not provide financial advice, trade recommendations, or guaranteed results. Always apply proper risk management principles. Indicator

[Kpt-Ahab] Poor Man's Orderflow Simple AlgoPilotImportant Notice and Risk Warning
The published settings were selected solely based on historical data for the asset and timeframe shown.
The displayed result may be random or over-optimized and cannot automatically be transferred to other assets, timeframes, or future market conditions. Even with the presented settings, the strategy may cause significant losses at any time, including the complete loss of the allocated strategy capital.
This script is intended exclusively for analysis and testing purposes. It does not constitute investment advice or a trading recommendation.
Description
This script uses reused and adapted code components from ** Auto RiskManagement & Backtest System 2.1b** and the ** Poor Mans Orderflow Simulator **.
These components have been combined into a standalone strategy that integrates simplified orderflow signals with position management, risk management, and backtesting functions.
How It Works
The strategy uses a simplified approximation of orderflow. It evaluates the relationship between candle body size and candle range, relative volume, candle direction, and recurring absorption and impulse events.
It does not use actual bid/ask, footprint, Level 2, or order book data.
Depending on the selected signal mode, direct breakouts, confirmed absorption clusters, impulse candles, or combinations of these conditions may generate long and short signals.
Position and Risk Management
The script supports, among other features:
* Long and short positions
* Fixed or trailing stop-loss levels
* Multiple partial profit targets
* Breakeven after the first profit target
* Optional additional entries
* Further entries may also be disabled after the specified total number of losing trades has been reached or when the maximum permitted drawdown is exceeded.
* Internal or external trading signals
* Automatic parameters based on asset class and timeframe
Additional entries and simulated leverage may significantly increase the risk of loss.
Backtest Limitations
Strategy Tester results are based exclusively on historical market data. Real-world results may differ significantly due to commissions, spreads, slippage, liquidity, price gaps, and execution delays.
Past performance is not a reliable indication of future results.
Position Closing Settings
The **Open Position Signals** setting determines how new signals are handled while a position is already open:
* **Wait-End-Deal:** All indicator signals are ignored until the current position has ended.
* **Wait-Signal-Close:** Only explicit signals for closing a long or short position are processed.
* **Wait-Reversal:** An opposing entry signal may also close the current position.
Several closing conditions are available for the integrated orderflow logic. For example, a position may be closed by an opposing impulse, a combination of a cluster and an impulse, or a confirmed opposing entry signal.
Further trading may also be restricted after a specified number of losing trades or when the maximum permitted drawdown is reached.
Trailing Stop, Breakeven, and Liquidation Line
The strategy supports both a fixed stop-loss and a trailing stop. The selected percentage represents the direct price distance from the average entry price and is not automatically adjusted by the simulated leverage.
In trailing mode, the stop is only moved in a direction that is favorable to the position. If the average entry price changes due to an additional entry, the existing stop is adjusted accordingly.
The stop may optionally be moved to the average entry price after the first profit target has been reached. A stop mode must be enabled for this function to operate.
The displayed liquidation line is only an internal estimate based on the simulated position and account values. It may differ significantly from the actual liquidation calculation used by a broker or exchange.
Using External Indicators
An external numerical signal source may be used instead of the integrated Poor Man’s Orderflow Simulator.
The external indicator must provide a selectable plot series containing the following values:
* **+1:** Long or buy signal
* **−1:** Short or sell signal
* **+2:** Close short position
* **−2:** Close long position
All other values, including `na`, produce no new signal.
The external indicator must output the required numerical values through a selectable plot. This plot can then be selected under **External Source**.
Whether and how an external signal is processed while a position is open also depends on the selected **Open Position Signals** setting.
-----------------------------------
Wichtiger Hinweis und Risikowarnung
Die veröffentlichten Einstellungen wurden ausschließlich anhand historischer Daten für das dargestellte Asset und den verwendeten Zeitrahmen gewählt.
Das Ergebnis kann zufällig oder überoptimiert sein und lässt sich nicht automatisch auf andere Assets, Zeitrahmen oder zukünftige Marktphasen übertragen. Auch mit den dargestellten Einstellungen kann die Strategie jederzeit erhebliche Verluste verursachen und das eingesetzte Strategiekapital vollständig verlieren.
Dieses Skript dient ausschließlich zu Analyse- und Testzwecken und stellt keine Anlageberatung oder Handelsempfehlung dar.
Beschreibung
Dieses Skript verwendet wiederverwendete und angepasste Codebestandteile aus Auto RiskManagement & Backtest System 2.1b und dem Poor Mans Orderflow Simulator .
Die Komponenten wurden zu einer eigenständigen Strategie verbunden, die vereinfachte Orderflow-Signale mit Positions-, Risiko- und Backtestfunktionen kombiniert.
Funktionsweise
Die Strategie verwendet eine vereinfachte Annäherung an Orderflow. Sie wertet das Verhältnis von Kerzenkörper und Handelsspanne, relatives Volumen, Kerzenrichtung sowie wiederkehrende Absorptions- und Impulsereignisse aus.
Dabei werden keine echten Bid-/Ask-, Footprint-, Level-2- oder Orderbuchdaten verwendet.
Abhängig vom gewählten Signalmodus können direkte Ausbrüche, bestätigte Absorptionscluster, Impulskerzen oder Kombinationen dieser Bedingungen Long- und Short-Signale erzeugen.
Positions- und Risikomanagement
Das Skript unterstützt unter anderem:
Long- und Short-Positionen
feste oder nachlaufende Stop-Loss-Marken
mehrere Teilgewinnziele
Breakeven nach dem ersten Gewinnziel
optionale zusätzliche Einstiege
Drawdown-Begrenzung und Begrenzung nach einer festgelegten Anzahl an Verlusttrades
interne oder externe Handelssignale
automatische Parameter nach Assetklasse und Zeitrahmen
Zusätzliche Einstiege und ein simulierter Hebel können das Verlustrisiko deutlich erhöhen.
Einschränkungen des Backtests
Die Ergebnisse des Strategietesters basieren ausschließlich auf historischen Kursdaten. Reale Ergebnisse können durch Gebühren, Spread, Slippage, Liquidität, Kurslücken und Ausführungsverzögerungen erheblich abweichen.
Vergangene Ergebnisse sind kein verlässlicher Hinweis auf zukünftige Ergebnisse.
Schließungseinstellungen
Über **Open Position Signals** wird festgelegt, wie neue Signale während einer bereits geöffneten Position behandelt werden:
* **Wait-End-Deal:** Alle Indikatorsignale werden bis zum Ende der Position ignoriert.
* **Wait-Signal-Close:** Nur ausdrückliche Signale zum Schließen einer Long- oder Short-Position werden berücksichtigt.
* **Wait-Reversal:** Zusätzlich kann ein entgegengesetztes Einstiegssignal die aktuelle Position schließen.
Für die integrierte Orderflow-Logik stehen verschiedene Schließungsbedingungen zur Verfügung. Eine Position kann beispielsweise durch einen gegensätzlichen Impuls, eine Kombination aus Cluster und Impuls oder ein bestätigtes entgegengesetztes Einstiegssignal geschlossen werden.
Zusätzlich kann der weitere Handel nach einer festgelegten Anzahl an Verlusttrades oder beim Erreichen des maximal erlaubten Drawdowns begrenzt werden.
Trailing-Stop, Breakeven und Liquidationslinie
Die Strategie unterstützt einen festen Stop-Loss sowie einen nachlaufenden Trailing-Stop. Der eingestellte Prozentwert beschreibt dabei den direkten Abstand zum durchschnittlichen Einstiegspreis und wird nicht automatisch durch den simulierten Hebel verändert.
Im Trailing-Modus wird der Stop nur in eine für die Position günstigere Richtung nachgezogen. Verändert sich der durchschnittliche Einstiegspreis durch einen zusätzlichen Einstieg, wird auch der bestehende Stop entsprechend angepasst.
Optional kann der Stop nach dem Erreichen des ersten Gewinnziels auf den durchschnittlichen Einstiegspreis verschoben werden. Hierfür muss ein Stop-Modus aktiviert sein.
Die angezeigte Liquidationslinie ist lediglich eine interne Schätzung auf Basis der simulierten Positions- und Kontowerte. Sie kann deutlich von der tatsächlichen Liquidationsberechnung eines Brokers oder einer Börse abweichen.
Verwendung externer Indikatoren
Anstelle des integrierten Poor-Man’s-Orderflow-Simulators kann eine externe numerische Signalquelle verwendet werden.
Hierfür muss der externe Indikator eine auswählbare Plot-Serie mit den folgenden Werten ausgeben:
* **+1:** Long- beziehungsweise Kaufsignal
* **−1:** Short- beziehungsweise Verkaufssignal
* **+2:** Short-Position schließen
* **−2:** Long-Position schließen
Bei allen anderen Werten oder bei `na` wird kein neues Signal ausgeführt.
Der externe Indikator muss die benötigten Zahlenwerte direkt über einen auswählbaren Plot bereitstellen. Anschließend wird dieser Plot unter **External Source** ausgewählt.
Ob und wie ein externes Signal während einer geöffneten Position verarbeitet wird, hängt zusätzlich von der gewählten Einstellung unter **Open Position Signals** ab. Strategy

Z-Edge | Confluence Z-score StrategyA multi-factor trading strategy that standardizes three independent market signals — momentum, RSI, and relative volume — into a single composite Z-score, then trades either trend-following or mean-reversion setups off that score. Position size and stop placement are calculated automatically from ATR-based risk, so every trade is sized consistently regardless of the asset's volatility.
Features
Multi-factor composite — blends price momentum (rate of change), RSI, and relative volume into one Z-scored reading, with adjustable weights so you can lean the composite toward whichever factor you trust most for a given market.
Adaptive smoothing — the EMA smoothing length isn't fixed. It automatically shortens in high-volatility regimes (faster response) and lengthens in calm regimes (less noise), driven by an ATR percentile rank.
Two entry modes — Zero Cross (trend-following: enter when the composite crosses through zero) or Threshold Reversion (mean-reversion: enter when the composite reverses from an extreme).
Divergence detection — flags when price makes a new high/low that the composite Z-score doesn't confirm, a classic early-warning signal the underlying factors alone don't show.
ATR-based risk sizing — every trade's position size is calculated from your risk-per-trade %, account equity, and ATR stop distance, with a hard cap on max % of equity per position.
Automatic stop-loss placement — stops are placed directly from the ATR calculation, not just displayed.
How the algorithm works
Factor calculation — momentum is measured as rate-of-change over a configurable lookback, RSI uses a standard length, and relative volume is current volume divided by its moving average.
Standardization — each factor is converted to a Z-score (value − mean) / stdev over a shared lookback period, making them comparable regardless of asset or scale.
Composite blend — the three Z-scores are combined using your weight inputs into one composite reading.
Adaptive smoothing — an ATR percentile rank (0–100) determines where the current volatility regime sits historically, and that percentile scales the EMA smoothing length between your min/max settings.
Signal generation — depending on the selected mode, entries fire either on a zero-line cross (trend) or on a reversal from a threshold extreme (reversion); exits fire on the opposite condition or when the ATR stop is hit.
Sizing — position size = (account equity × risk %) ÷ (ATR × stop multiplier), capped at a max % of equity.
Tips for use
Match the mode to the market. Zero Cross mode is built for trending assets; Threshold Reversion is built for range-bound ones. Running the wrong mode on the wrong market condition is the most common way this underperforms.
Start on the daily timeframe. Default lookbacks (100-period Z-score, 100-period ATR percentile) are sized for daily bars; shrink them proportionally for lower timeframes.
Test on liquid assets. Relative volume is one of the three factors — thin, erratic volume data will make the composite noisier.
Backtest across a full cycle. Use at least 2+ years of data spanning both trending and ranging periods so you're not fitting to one regime.
Watch the % of equity cap. On very low-volatility assets, ATR-based sizing can push toward very large positions; the equity cap prevents unrealistic leverage but will also silently reduce your intended risk-per-trade when it kicks in — check the info table to see when that's happening.
Divergence is a filter, not a standalone signal. It's most useful for skipping or flagging entries near likely reversals, not as an independent trigger.
Strategy

Volatility Cone & Analog Path ProjectionVolatility Cone & Analog Path Projection — Forward Price Envelope with Fractal Replay and Terminal Probability Distribution
Overview
Nearly every overlay on TradingView describes the past: where price has been, where volume traded, where structure broke. This tool points in the other direction. It builds a forward projection zone from the current bar using three independent layers — a realized-volatility cone, a replay of the historically most similar price fractals, and a terminal probability profile that combines both into a distribution of possible outcomes at the projection horizon.
The result is not a forecast. It is a bounded expectation: a visual answer to "given how this instrument has actually been moving, what range is normal over the next N bars, and where has price historically ended up after conditions that looked like this?"
Conceptual Framework
Price uncertainty grows with the square root of time, not linearly. A 24-bar projection is not 24 times as wide as a 1-bar projection — it is roughly 4.9 times as wide. Traders who size targets and stops on a straight-line mental model consistently misjudge what is achievable in a given number of bars.
The cone makes that curvature visible. Its width at each future bar is sigma * sqrt(t), where sigma is the standard deviation of log returns over the volatility window. Three nested bands are drawn, so you can immediately see which targets sit inside the ordinary range, which sit at the statistical edge, and which would require an exceptional move.
The Gaussian model alone, however, is a poor description of real markets: returns have fat tails, and volatility clusters. The analog layer addresses this by ignoring models entirely and asking an empirical question instead — what actually happened, historically, after the market printed this exact shape?
How It Works
Volatility estimation. Log returns are computed bar to bar. Their standard deviation over the volatility window gives the per-bar sigma; their mean gives the drift. Drift can be included or excluded from the cone's centerline.
Cone construction. For each future bar t from 1 to the horizon, the upper and lower bounds are close * exp(drift*t ± k*sigma*sqrt(t)) for each of the three band multipliers. Each band is rendered as a closed polygon with layered transparency, producing depth from the centerline outward.
Fingerprint extraction. The most recent N bars of log returns are z-scored — mean removed, divided by their own standard deviation. This makes the pattern scale-invariant: the same shape is recognised whether it happened during a quiet range or a volatile expansion, and at any price level.
Historical scan. Every candidate window inside the scan depth is z-scored the same way and compared to the current fingerprint by summed squared difference. Lower distance means a closer shape match. Candidates that overlap an already-selected match without improving on it are rejected, so the top results are not five copies of the same event shifted by one bar.
Forward replay. For each of the top matches, the bars that followed it are converted into a relative path and re-anchored to the current close. The path each analog is drawing forward is exactly the move that occurred after that historical fingerprint — nothing is fitted or optimised. Paths ending above the current price are drawn bullish, below bearish, and a thick median line traces the bar-by-bar median across all analogs.
Terminal probability profile. At the projection horizon a horizontal distribution is built across the cone's full range. Each row's density blends the Gaussian probability implied by the volatility model with an empirical kernel centred on each analog's endpoint. The Model Weight input controls that mix: 1.0 is purely theoretical, 0.0 is purely historical, and the default sits between them. The widest row — the mode of the blended distribution — is marked as the most probable zone.
Interpretation
Cone bands define what is statistically ordinary. A target beyond the outer band within the horizon is not impossible, it is simply rare — treat it accordingly when planning holding time.
Cone width itself is information. A narrow cone means compressed volatility, which historically resolves into expansion. A wide cone means the market is already moving; chasing inside it carries a worse risk profile.
Analog dispersion matters more than analog direction. Five paths that fan out in all directions means the current shape carried no historical edge. Five paths clustering in one direction is the meaningful configuration.
Best Match Quality in the panel scores how closely the nearest historical fingerprint resembles the present one. Below roughly 60%, treat the analog layer as noise and rely on the cone alone.
The most probable zone is where the blended distribution peaks. It is a magnet-style reference, not a target — the distribution is wide by construction.
Volatility Regime compares short-window volatility to the full window. Expanding means the cone is likely to understate near-term movement; contracting means the opposite.
Settings
Setting Effect
Projection Horizon Bars projected forward. Also the endpoint of the profile
Volatility Window Sample size for sigma and drift. Longer = smoother, slower to adapt
Include Drift Tilts the cone with the window's mean return
Inner / Mid / Outer Band Sigma multipliers for the three layers
Fingerprint Length Bars compared for similarity. Shorter = more matches, less specific
Scan Depth How far back to search for analogs
Number of Analogs How many historical paths to replay
Profile Rows / Width Resolution and horizontal size of the terminal distribution
Model Weight Gaussian versus empirical blend in the distribution
Redraw on Bar Close Only Recommended on. The scan is heavy; this runs it once per bar
Limitations — read this
This is not a prediction and must not be traded as one. The cone describes a statistical range under an assumption of stable volatility. Real volatility is not stable, and returns have fatter tails than the Gaussian model implies, so moves outside the outer band occur more often than the model suggests.
Analog matching is weak evidence. A few dozen bars of shape similarity is a small sample; markets are non-stationary and a pattern that resolved one way in the past carries no obligation to repeat. The paths are historical context, not a probability statement about the future.
Nothing repaints, but the whole projection is recomputed each bar. Yesterday's cone is not preserved — the drawing always reflects current data only. It is anchored to the last bar by design.
On low-volume, illiquid, or heavily gapped instruments the return distribution is distorted and both layers degrade.
No entries, no stops, no targets, no signals. This is a context tool for sizing expectations and holding time. Indicator

Indicator

Momentum PowerTrend & Momentum Power (Futures Traders)
What it does
This indicator gives NQ traders a fast read on trend and momentum strength — for NQ and ES side by side — without having to flip charts. It's built for spotting confluence: when NQ and ES are both showing strong trend/momentum in the same direction, that agreement is often more meaningful than either instrument alone. When they diverge, that relative strength/weakness between the two can be just as useful to watch.
How it works
Trend Power is derived from Wilder's DMI/ADX — it measures how strong a directional trend is, not just whether one exists.
Momentum Power is an ATR-normalized rate-of-change — it measures how fast price is moving relative to recent volatility, so readings stay consistent across different volatility regimes.
Each reading is scored 1–3 dots (weak/medium/strong) and colored bullish, bearish, or neutral/indecisive.
The dashboard shows four rows: NQ Trend, NQ Momentum, ES Trend, ES Momentum — so you can see both instruments' internal state at a glance.
ES data is pulled live via request.security, so no need to switch charts.
New: Candle coloring on confluence
When enough dots across all four rows agree on direction (default: 7 of 12), the candles on your chart change color — green for bullish consensus, red for bearish. This is a visual cue for when NQ and ES trend/momentum are aligned, not aligned individual instrument readings in isolation.
Important — this is not a buy/sell signal
This tool does not generate entries, exits, or trade recommendations. It's a read on relative trend and momentum strength between NQ and ES to help you gauge confluence and context. Candle coloring reflects dot agreement, not a system signal — it still requires your own judgment, risk management, and confirmation from your broader trade plan before acting on anything you see.
Inputs
ES symbol is configurable (defaults to CME_MINI:ES1!; swap for micros or a fixed contract month)
All thresholds (trend/momentum weak/medium/strong, deadzones) are adjustable per your own calibration
Dot consensus threshold and candle colors are configurable independently of the dashboard dot colors Indicator

Polynomial & Logarithmic Regression Channels [OnlyFibonacci]Polynomial & Logarithmic Regression Channels is an overlay indicator that fits a 2nd-degree polynomial regression curve to recent price action and builds dynamic standard deviation channels around that curve. Unlike a straight linear regression line or a simple moving average, the polynomial model captures curved trends — acceleration, deceleration, and rounded turning phases — while deviation bands quantify how far price has stretched from the fitted trend.
What Makes This Indicator Different Matrix-based polynomial regression — Coefficients are solved via least-squares using Pine Script v6 matrix operations (matrix.new, matrix.transpose, matrix.mult, matrix.inv), not a basic ta.linreg() call. Logarithmic price scale toggle — Switch between standard and log-price regression. Log mode is well suited for long-horizon assets where percentage growth matters more than absolute price moves. Residual volatility channels — Inner (±1σ) and outer (±2σ) bands are built from the standard deviation of price residuals relative to the fitted curve, not from raw price volatility alone. Live dashboard — Model type, channel position (%), residual volatility, and trend status (Overbought / Oversold / Neutral) are displayed in an upper-right table. Built-in alerts — Outer channel breaches and polynomial slope direction changes.
How It Works On each bar, the script collects the last N closing prices (default: 200) and fits the equation y = a + bx + cx² using matrix least-squares: β = (X'X)⁻¹X'Y. The regression line value at the current bar becomes the central trend curve. Residuals (actual price minus fitted value) across the lookback window are used to compute a sample standard deviation. Upper and lower channels are then plotted at user-defined σ multipliers. When Use Logarithmic Price Scale is enabled, prices are transformed with math.log() before regression and mapped back to the chart with math.exp() for display. The central line color reflects the instantaneous slope of the polynomial at the current bar: bright green when sloping up, bright red when sloping down.
Key Settings Lookback Period (default 200) — Number of bars used to fit the polynomial. Higher values produce a smoother, slower-reacting curve; lower values track price more closely. Use Logarithmic Price Scale — Enable for long-term trending markets (equities, crypto, indices). Keep off for short-term or range-bound analysis. Inner / Outer Multipliers (default ±1.0 / ±2.0) — Control channel width. Wider multipliers reduce false overbought/oversold signals; tighter multipliers increase sensitivity. Visual Style — Trend colors, band colors, fill transparency, and line widths. Dashboard — Toggle the info table and adjust text size.
How to Read the Chart Polynomial Regression line — The dynamic trend curve. Color shows current slope direction. Inner bands (±1σ) — Normal fluctuation zone around the trend. Pullbacks into inner bands within a trending market may offer continuation setups. Outer bands (±2σ) — Statistical stretch zone. Price beyond outer bands signals extended deviation from the fitted trend. Channel fills — Soft shaded areas between bands help visualize channel structure without cluttering the chart.
Dashboard Metrics Model Type — "Polynomial" (standard scale) or "Log-Poly" (logarithmic scale). Channel Position (%) — Where price sits within the outer channel (0% = outer lower, 100% = outer upper). Values above 80% or below 20% are highlighted. Residual Volatility — Dispersion of price around the fitted curve, shown as a percentage. Trend Status — Overbought (above outer upper), Oversold (below outer lower), or Neutral (inside outer bands).
How to Use — Practical Interpretation Trend identification: Trade in the direction of the regression line color. A green (upward-sloping) curve supports bullish bias; red supports bearish bias. Pullback entries: In a strong trend, price pulling back toward the regression line or inner band while slope remains favorable can indicate a potential continuation zone — always confirm with your own structure or confluence. Mean reversion / exhaustion: When price pushes beyond the outer bands and dashboard shows Overbought or Oversold, the move may be statistically extended relative to the fitted curve. This does not guarantee reversal; it flags stretched conditions. Log vs. standard mode: Use log mode on higher timeframes and growth assets. Use standard mode on lower timeframes or when absolute price deviation is more relevant. Lookback tuning: Match lookback to your analysis horizon — e.g. 100–150 for swing trading, 200+ for position trend context.
Built-in Alerts Overbought — price above outer upper channel Oversold — price below outer lower channel Trend slope turned bullish — polynomial derivative crossed above zero Trend slope turned bearish — polynomial derivative crossed below zero
Recommended Setup Apply to a clean chart with no other overlapping indicators for clearest visualization. Start with default settings (200 lookback, ±1σ / ±2σ bands). Test on your preferred timeframe and symbol before relying on signals. Combine with support/resistance, volume, or higher-timeframe trend for confluence — this tool provides statistical context, not standalone trade signals.
This indicator is a quantitative analysis tool for educational and informational purposes only. It does not constitute financial advice, investment recommendation, or a guarantee of future performance. Past behavior of regression channels does not predict future results. Always manage risk and conduct your own due diligence before making trading decisions.
Credits Developed by OnlyFibonacci . Licensed under Mozilla Public License 2.0. Indicator

ORB AI [PickMyTrade]ORB AI asks a question most opening-range tools skip: does this
breakout resemble the chart's own past breakouts that worked, or the ones that didn't?
Instead of firing on a single range-break condition, every qualified breakout is scored
across seven independent structural factors, then cross-checked against an on-chart
K-nearest-neighbour library built exclusively from this symbol's own resolved breakout
outcomes. Both numbers are shown — the rule score and the KNN vote — without either one
silently deciding the trade for you.
----------------------------------------------------------------------------------------------------------------
🔷 WHAT IT MEASURES
🔸 Opening Range
The range locks from a configurable session anchor — Exchange Session (the symbol's own
listed timezone), New York 09:30, New York 08:30 (data), London 08:00, Tokyo 09:00, or a
Custom session/timezone pair — over a configurable window (1–120 minutes). If the chart
timeframe is coarser than the chosen window, the range automatically expands to one full
bar and the dashboard notes the effective duration rather than silently misrepresenting
it.
🔸 Rule Confidence (7-factor score)
Every qualified breakout candidate is scored 0–100 across Trend, Momentum, Volume,
Volatility, Structure, Breakout Quality and Liquidity. Trend itself is a blend (35% EMA
alignment, 25% ADX, 25% higher-timeframe read, 15% slope) — the dashboard breaks out all
seven components individually so the score is never a black box.
🔸 Flow Marks — BO / RT / FBO / Sweep
BO tags the confirmed breakout bar. RT tags a retest of the broken range edge that holds
(with a running count). FBO tags a breakout that closed back inside the range — a false
breakout, not a win or loss judgement. Sweep tags a wick that pierced the range edge and
closed back inside — liquidity taken without a directional close.
----------------------------------------------------------------------------------------------------------------
🔷 THE KNN ENGINE (LORENTZIAN DISTANCE)
🔸 How the library is built
Every rule-qualified breakout gets a 6-feature fingerprint (trend, momentum, volume,
volatility, structure, breakout quality). Its outcome is then resolved forward, stop
checked first: 1R target reached before the stop = win, stop first = loss, neither
within the configurable outcome window (15–600 minutes) = discarded as undecided —
drifts are never counted as losses, so the base rate reflects only decisive breakouts.
Every qualified candidate is recorded regardless of outcome, so the library grows
without selection bias.
🔸 How a new candidate is voted
A new candidate is compared to the stored library (up to 300 records) by Lorentzian
distance. The K nearest historical analogues (3–15, default 5) vote, and the vote share
is shown on the signal label and dashboard.
🔸 Advisory vs. Gate
Advisory mode (default) displays the vote as context; it never blocks a signal, so the
set of signalling bars stays fully deterministic regardless of library state. Gate mode
(opt-in) also requires the vote to clear a minimum share before a signal fires — this
trades determinism for selectivity and is only meaningful once the library has grown
past a configurable minimum size.
🔸 Read honestly
With a 6-feature fingerprint, the nearest neighbours of a few-hundred-record library
span roughly half of each feature's range — the vote is a coarse regional tendency, not
a precise analogue match. Loading a different amount of chart history can change the
displayed vote (Advisory) or which candidates pass (Gate); this is inherent to on-chart
instance-based learning and is disclosed rather than hidden. The indicator requires a
symbol with volume data — volume-less feeds (some cash indices / spot FX) cannot render
the KNN engine.
----------------------------------------------------------------------------------------------------------------
🔷 SIGNALS AND DISPLAY
🔸 Dashboard
A compact table shows Session, Regime, ML Engine status (library size / warm-up state),
locked Range, Bias, the 7-factor Rule Confidence bar, Risk-per-Unit, the active Trade
Plan, and a Flow Marks legend. An optional Full mode expands all seven score components.
🔸 Trade Plan overlay
On a qualified signal the indicator draws an entry, stop, and take-profit levels using
one of three configurable methods: a fixed R ladder, an opening-range-width measured-move
projection, or an ATR-scaled EMA-dynamic trail. This is a reference overlay describing
one rules-based way to structure the trade *if* you choose to take it — it is not a
recommendation, and the levels are not a performance claim.
🔸 Non-repainting
Signals evaluate on confirmed closes only. Locked range levels never change once set.
Higher-timeframe reads use ` ` plus `lookahead_off`. The KNN library is built strictly
from already-resolved past outcomes — no future data is read at any point.
🔸 Alerts
19 `alertcondition()` calls cover long/short entries, false breakouts (combined and
per-direction), confidence-threshold crosses, range completion, trend-context changes,
take-profit and stop touches (combined and per-level), reversals, session-end exits,
approaching-breakout warnings, retests, and sweeps above/below the range. Recommended
alert setting: *Once Per Bar Close*.
----------------------------------------------------------------------------------------------------------------
🔷 INPUTS
🔸 Opening Range — Session anchor, custom session/timezone, range length (minutes).
🔸 Signal Engine — Minimum Rule Confidence threshold, TP method (R Ladder / OR Width
Projection / Dynamic EMA), R-ladder multiples, wide-range-OR filter.
🔸 KNN · ML Engine — Mode (Advisory / Gate / Off), K neighbours, history length,
minimum ML vote (Gate only), outcome window (minutes), Gate minimum library size.
🔸 Filters — Signal Blackout window (session-anchor timezone), max signals per
session, news filter.
🔸 Visual — Bull/bear colours, dashboard position and detail level, Zen mode (hides
text labels, keeps shapes/zones only).
----------------------------------------------------------------------------------------------------------------
🔷 REQUIREMENTS AND LIMITATIONS
Requires a symbol with volume data — the KNN engine cannot render on volume-less feeds
(some cash indices, spot FX). The KNN vote is a coarse regional tendency drawn from a
finite on-chart library, not a precise analogue match or a probability estimate; it is
advisory by default for that reason. Loading a different amount of chart history changes
the displayed vote in Advisory mode, and can change which candidates pass in Gate mode —
this is inherent to on-chart instance-based learning and is disclosed rather than hidden.
This is a decision-support toolkit: it does not place trades, and no element of the
dashboard, score, or trade-plan overlay is a claim about future performance. Always
apply independent risk management.
----------------------------------------------------------------------------------------------------------------
Built natively in Pine Script® v6. Seven-factor rule-based confluence scoring with an
on-chart, self-learning KNN engine using Lorentzian distance over resolved breakout
outcomes — no external libraries, no repainting, no lookahead.
Open source — Mozilla Public License 2.0. Indicator

Smart Trend Filter Confirmation [MarkitTick]💡 A confirmed-bar trend-following system that fuses a volatility-adaptive trailing band with a six-condition consensus filter, designed to suppress the false flips that plague standard trend-following tools when markets stall, chop, or thin out. Rather than reacting to every band cross, the script cross-examines each potential signal against stall detection, slope strength, volume participation, range compression, basis-point movement, and trend strength (ADX) before allowing a flip to display — while retaining a breakout override so genuinely explosive moves are never suppressed by the very filters designed to catch noise.
✨ Originality and Utility
Trailing-band trend systems (Chandelier-style or SuperTrend-style constructs) are common on TradingView, but nearly all of them share the same weakness: the trailing line flips direction on every price crossover, regardless of whether that crossover reflects a genuine change in market character or simply noise generated during a stalled, illiquid, or compressing market. This script's originality lies in the "Regime Consensus" layer built on top of the adaptive trailing band. Six independent, mathematically distinct filters — measuring band stall, linear-regression slope, relative volume, historical range percentile, basis-point velocity, and ADX-based trend strength — are computed every bar. If any single filter flags a "flat" regime, the display direction is held at its last confirmed state instead of flipping, which materially reduces whipsaw signals in ranging conditions. A dedicated breakout override simultaneously monitors for abnormally large single-bar moves (measured in ATR multiples) and forces the flip through regardless of filter status, ensuring the system does not become sluggish during genuine volatility expansion. This combination — adaptive smoothing of the source price, a volatility- and momentum-weighted dynamic band, a multi-factor flat-market veto, and a breakout bypass — is not a simple mashup of stock indicators but an integrated decision layer where each component directly informs whether the others are permitted to act. The trend line, filters, override, and dashboard are not separable add-ons; they operate as a single signal-gating pipeline.
🔬 Methodology and Concepts
● Adaptive Source Smoothing
Before any band math is applied, the script conditions the underlying HL2-style source price using one of two selectable adaptive filters:
Kalman Filter — a recursive estimator that maintains an internal "belief" about the true price and a corresponding uncertainty (error covariance). Each new bar, the filter computes a gain factor from the ratio of predicted uncertainty to total uncertainty (predicted plus measurement noise, set by the Kalman R input) and blends the new price observation into its estimate proportionally. A higher Kalman Q input allows the estimate to adapt faster to new prices; a higher Kalman R input makes the filter trust new observations less, producing a smoother but slower-reacting line.
LLAMA (an adaptive-length moving average inspired by Kaufman's Efficiency Ratio concept) — measures how efficiently price has moved over the lookback window by comparing net directional change to the sum of all bar-to-bar movement (an efficiency ratio between 0 and 1). This ratio is squared into a smoothing constant that continuously shifts the moving average's responsiveness between a fast EMA-like constant and a slow EMA-like constant, so the average tightens to price during clean directional runs and widens during choppy conditions.
• Dynamic Volatility Band
The core trailing band's half-width is not a fixed ATR multiple. It is calculated from three weighted components: a base multiplier, an ATR-based term scaled by the ATR Weight input, and a normalized recent-price-movement term (capped at its own 95th percentile to prevent single outlier bars from distorting the band) scaled by the Move Weight input. This composite value is then multiplied by the current ATR and smoothed with an exponential moving average (controlled by the Smooth Len input) to prevent the band width itself from jumping erratically bar to bar.
• Trailing Trend Line Construction
The trend line follows classic chandelier-style trailing logic: while price remains above the trend line, the line can only ratchet upward (never retreating below its prior value even if the lower band momentarily dips beneath it); while price remains below the trend line, the line can only ratchet downward. A flip only occurs when confirmed prior-bar closing price crosses to the opposite side of the line.
• Six-Factor Regime Consensus Filter
Before a directional flip is permitted to display, up to six independent conditions are checked. If any active filter flags the market as "flat," the displayed direction holds at its previous confirmed state rather than flipping:
Stall Filter — flags when the trend line's bar-to-bar movement is smaller than a fraction (Flatness input) of current ATR, indicating the line itself has gone quiet.
Slope Filter — runs a short linear regression across recent trend-line values, measures the resulting slope, normalizes it against ATR, and flags when that normalized slope falls below the Slope Thr input.
Volume Filter — flags when confirmed volume falls at or below its own moving average, treating below-average participation as unreliable for a fresh directional call.
Range Filter — flags when the current bar's high-low range falls within the lower percentile band (Range Pct input) of its historical distribution over the Pctile Len lookback, identifying range compression.
BPS Filter — converts the trend line's bar-to-bar movement into basis points relative to price and flags when that figure falls under the Min BPS input, catching moves too small to be economically meaningful.
ADX Filter — computes a standard Directional Movement Index reading and flags when it sits below the ADX Thr input, indicating weak underlying trend strength.
• Breakout Override
Running in parallel to the consensus filters, this component measures the absolute prior-bar price change against a multiple of ATR (Ovr ATR Mult input). If that threshold is exceeded, the override forces the flip through immediately, bypassing every flat-market filter above. This prevents the filter layer from muting the system's response to genuine volatility expansion or breakout conditions.
🎨 Visual Guide
Trend Line — a stepped line plotted along the confirmed trailing band value. It renders in the Bull color when the confirmed direction is up and the Bear color when down; both colors are fully customizable in the Colors group.
Gradient Candles / Bar Coloring — when enabled, chart candles and bars are recolored on a gradient between the Neutral color and the active directional color, with gradient intensity scaled by how far confirmed price has extended from the trend line relative to ATR (capped at 3x ATR for full saturation). A muted candle indicates price sitting close to the trend line; a fully saturated candle indicates an extended move.
Cloud Fill — a semi-transparent fill (opacity set by Cloud Transp) rendered between the trend line and a short moving average of HLC3 (length set by Cloud MA Len), tinted in the active directional color to visually reinforce which side of the trend the market currently occupies.
Bull / Bear Signal Labels — a "Bull" label appears below price the bar a confirmed flip to the up-regime occurs, and a "Bear" label above price on a confirmed flip to the down-regime, provided the Regime Consensus Filter did not veto the flip and Lock Signal is not engaged.
Trade Level Lines and Labels (optional, enabled via Show Trade Levels) — on each new confirmed signal, five lines are drawn forward from the signal bar: an Entry line (at prior confirmed close), a Stop Loss line, and three Take Profit lines (TP1, TP2, TP3), each offset from entry by ATR multiples set in the Trade Tools group. A shaded risk zone connects Entry to Stop Loss, and a shaded reward zone connects Entry to the furthest take-profit line. Each line carries a right-aligned label showing its exact price.
Live Dashboard (optional, position configurable via Dash X / Dash Y) — a compact table summarizing current symbol/timeframe, signal lock state, active direction, current signal status, regime classification (Flat/Trending), breakout override status, active adaptive filter type, current trend-line and ATR values, a visual progress bar for trend strength, and individual on/off/flat status readouts for each of the six regime filters.
Non-Standard Chart Warning — a red-bordered table automatically appears in the top-left corner if the script detects it is being run on a Heikin Ashi, Renko, Line Break, Kagi, or Point & Figure chart, warning that signal reliability is compromised on synthetic chart types.
📖 How to Use
A "Bull" label with the trend line switching to the Bull color signals a confirmed transition to an up-regime that has passed all active consensus filters (or was pushed through by the breakout override).
A "Bear" label with the trend line switching to the Bear color signals the equivalent confirmed down-regime transition.
Because flips are gated by the consensus filter, the absence of a new signal during a period of price consolidation is intentional — the script is treating the move as noise rather than a lack of function. Check the dashboard's individual filter rows to see exactly which condition(s) are currently classifying the market as flat.
The dashboard's "Override" row shows "Engaged" when the Breakout Override has just bypassed the filters — useful for distinguishing a filter-confirmed signal from a volatility-forced one.
When Show Trade Levels is active, treat the Entry/SL/TP lines as a reference risk framework tied to current ATR, not a guaranteed execution plan; always verify levels make sense for the instrument and timeframe before acting on them.
Enable Lock Signal to freeze the current signal state on the most recent bar, useful when reviewing historical signal behavior without new signals interrupting the current view.
If the Non-Standard Chart warning appears, switch to a standard candlestick chart type before relying on any signal from this script.
⚙️ Inputs and Settings
ATR Len — lookback period for the underlying ATR calculation that drives band width and multiple filter thresholds. Shorter values make the band more reactive to recent volatility; longer values smooth it out.
Band Mult, ATR Weight, Move Weight — the three components that combine into the dynamic band multiplier. Band Mult sets a base width, ATR Weight scales the contribution of current ATR relative to price, and Move Weight scales the contribution of recent capped price movement.
Smooth Len — the EMA length applied to the calculated band half-width, controlling how quickly the band itself can widen or narrow.
Adaptive Filter / Filter Type — toggles and selects between Kalman and LLAMA smoothing of the source price feeding the trend line.
Kalman Q / Kalman R — process noise and measurement noise inputs for the Kalman filter; higher Q increases responsiveness, higher R increases smoothing.
LLAMA Len — lookback window for the efficiency-ratio calculation driving the LLAMA adaptive average.
Stall Filter / Flatness — enables the stall check and sets the ATR-relative threshold below which trend-line movement is considered stalled.
Slope Filter / Reg Len / Slope Thr — enables the regression-slope check, sets its lookback window, and sets the normalized slope threshold below which the market is considered flat.
Volume Filter / Vol MA Len — enables the volume check and sets the moving-average length volume is compared against.
Range Filter / Pctile Len / Range Pct — enables the range-compression check and sets the historical lookback and percentile threshold used to classify current range as compressed.
BPS Filter / Min BPS — enables the basis-point movement check and sets the minimum basis-point threshold for a trend-line move to be considered meaningful.
ADX Filter / ADX Len / ADX Thr — enables the ADX-based trend-strength check and sets its calculation length and minimum threshold.
Breakout Ovr / Ovr ATR Mult — enables the override and sets the ATR multiple of single-bar price change required to force a flip through the filters.
Show Trade Levels / SL, TP1, TP2, TP3 ATR Mult — enables the trade-level drawing tool and sets each level's distance from entry as a multiple of ATR.
Bar Coloring, Bull/Bear Marks, Cloud Fill, Cloud MA Len, Cloud Transp — visual toggles and parameters controlling gradient candles, signal labels, and the cloud fill between trend line and reference average.
Show Dash, Dash X, Dash Y — toggles the dashboard and sets its screen position.
Long/Short/Close Action inputs — customizable text strings inserted into the "action" field of each alert's JSON payload, for direct use with automated webhook execution systems.
Colors group — full color customization for bull/bear/neutral states, label text, warning banner, dashboard theme, gradient candle tiers, and trade-level line colors.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
The trailing-band mechanism draws on the same volatility-normalized stop methodology popularized by Chandelier Exit-style systems, which themselves extend J. Welles Wilder's Average True Range concept into an adaptive trailing stop: rather than a fixed price distance, the stop distance breathes with recently realized volatility, tightening in calm markets and widening in turbulent ones.
The Kalman filter option applies a classical state-space estimation technique originally developed for aerospace tracking problems (Rudolf Kálmán, 1960). It treats the "true" price trend as an unobserved state to be estimated from noisy observations, recursively updating a prediction and its uncertainty at each time step and weighting new information by a gain term derived from the relative magnitude of prediction versus measurement uncertainty. Applied to price series, it produces a smoothed estimate that adapts its own responsiveness based on the ongoing balance of signal versus noise.
The LLAMA adaptive average is built on an efficiency-ratio concept in the lineage of Perry Kaufman's Adaptive Moving Average research: the ratio of net directional displacement to total path length over a window quantifies how "efficiently" price has trended, and this ratio is used to interpolate the smoothing constant between fast and slow exponential-average bounds. Markets that trend efficiently receive a fast, responsive average; markets that chop inefficiently receive a slow, heavily smoothed one.
The Slope Filter applies ordinary least squares (OLS) linear regression across a short trend-line window to extract a first-derivative estimate (slope) of the trend line's trajectory, normalizing it by ATR so the threshold behaves consistently across instruments and volatility regimes of different scale.
The ADX Filter is grounded in Wilder's Directional Movement System, which decomposes price movement into positive and negative directional components and derives a smoothed trend-strength oscillator independent of direction — a standard framework for distinguishing trending from ranging conditions.
The Range Filter's use of percentile-rank classification reflects a basic non-parametric statistical approach: rather than assuming a normal distribution of high-low ranges, it empirically ranks the current range against its own recent historical distribution, which is more robust to the fat-tailed, non-normal behavior typically observed in financial return and range series.
Collectively, the six-factor consensus mechanism reflects a general principle from ensemble/multi-condition filtering: requiring independent, structurally uncorrelated confirmations to agree (or, here, requiring none to actively veto) before acting on a signal tends to reduce the false-positive rate relative to any single condition acting alone, at the cost of some responsiveness — a classic precision/recall tradeoff which the Breakout Override is specifically designed to mitigate during high-volatility regimes.
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. We expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion. Indicator

MSnR CC Level [6 Types]MSnR CC Level
This script detects and maps Confirmation Candle (CC) levels, a 3-candle confirmation structure that checks whether a previously created level gets touched and rejected by the latest closed candle while keeping directional continuation.
Rather than looking at single swing points, CC detection requires a specific three-part pattern to validate a level. The result is a complete structural map of confirmed rejections inside the scan window, with each of the six CC types drawn so it can be told apart at a glance.
WHAT MAKES THIS DIFFERENT
1. Complete structural confirmation, not just arbitrary levels.
Most level tools draw lines where price has simply turned around. This tool requires a strict 3-candle structural proof. A level must be established, tested, and actively rejected with continuation to be drawn on the chart.
2. Identifies six distinct CC structures.
The script distinguishes between A CC, V CC, Bullish Gap CC, Bearish Gap CC, SBR CC, and RBS CC. The type is visually indicated, so you know exactly what structure formed the level without having to check the candles manually.
3. SBR and RBS are one-shot dynamic flips.
When an established level is broken, the script immediately starts looking for the very next candle to act as the signal candle, confirming a Support Become Resistance (SBR) or Resistance Become Support (RBS) setup.
THE SIX CC TYPES
A candle is Green when close is greater than or equal to open (a Doji counts as Green) and Red when close is less than open. The running candle is never used.
For the first four types, a 3-candle sequence is evaluated:
- Candle 1 establishes the reference level (the close of the first candle).
- Candle 2 provides the middle structure.
- Candle 3 is the signal candle that must reject the level and maintain directional strength.
V CC (Bullish)
Red, Green, Green. The signal candle low touches the V level, the body remains above it, and its close is greater than or equal to the middle candle's close.
Bullish Gap CC
Green, Green, Green. Follows the same touch, body, and continuation rules as the V CC.
A CC (Bearish)
Green, Red, Red. The signal candle high touches the A level, the body remains below it, and its close is less than or equal to the middle candle's close.
Bearish Gap CC
Red, Red, Red. Follows the same touch, body, and continuation rules as the A CC.
For the broken levels:
SBR CC
When a support level breaks down, the very next candle must act as the signal candle. It must reject the freshly flipped level from below, satisfying the same touch, body, and continuation rules as a bearish CC.
RBS CC
When a resistance level breaks up, the very next candle must act as the signal candle. It must reject the freshly flipped level from above, satisfying the same touch, body, and continuation rules as a bullish CC.
READING THE CHART
Colour tells you the side:
- Red labels: bearish rejections. A CC, Bearish Gap CC, SBR CC.
- Green labels: bullish rejections. V CC, Bullish Gap CC, RBS CC.
Each CC level starts at the candle that created its structure and extends to the right. The labels sit cleanly at the right edge of the chart to keep the price action visible. If multiple CC levels form at the same price, their labels are merged into a single entry to keep the chart clean. Nearby labels are automatically staggered horizontally to avoid overlap.
SETTINGS
Scan
- Scan Length (closed candles): how many closed candles are scanned backwards from the latest bar. Every CC Level found inside this window is drawn. The running candle is always excluded.
Display
- An individual switch for each of the six CC types, plus a toggle for the text labels.
Style
- Level Line Color, Label Size, and spacing options. You can adjust the distance used to merge same-price labels, the gap before staggering, and the horizontal stagger step.
ALERTS
Six alert conditions are available: A CC, V CC, Bullish Gap CC, Bearish Gap CC, SBR CC and RBS CC.
Each message carries the level type, the symbol, the timeframe and the closing price. The same messages are also sent through the alert function, so the "Any alert() function call" alert type can deliver everything through a single alert.
All alerts are evaluated only after a candle has fully closed.
REPAINTING
This script does not repaint.
- Detection reads confirmed candles only. The scan starts one bar behind the latest bar, so the candle that is still forming is never part of any calculation.
- Alert signals can only become true once a candle has finished. Price moving inside an open candle cannot make a signal appear and then disappear.
- Levels are rebuilt on the last bar from confirmed history. A level's price never moves. Once drawn, nothing shifts backwards.
When you create an alert, TradingView may show a caution banner saying the indicator can repaint. That banner appears automatically for any script that uses the built in bar state variables, no matter how they are used, because the platform cannot check the intent behind them. This script uses them for the opposite purpose: one of them is what restricts every signal to bar close, and the other is what redraws the levels efficiently on the final bar. Choosing "Once Per Bar Close" when creating the alert is still recommended.
NOTES AND LIMITATIONS
- TradingView caps drawings at 500 lines and 500 labels. A very long Scan Length will hit that ceiling and the oldest drawings will be dropped.
- The label offset and merge gap are measured in ticks. Expect to adjust these settings when moving between symbols with different tick values.
- Detection is purely structural. It reports where valid CC patterns have formed. It does not measure what happened afterwards, or produce entries, targets or stops.
HOW TO USE IT
Use these CC levels to map where the market has shown confirmed structural rejection. Areas where multiple CC structures stack together often represent stronger zones of interest.
These are reference areas, not automated entry signals. Use them alongside higher timeframe structure, and apply your own confirmation and risk management.
DISCLAIMER
This indicator is a level detection tool. It is not financial advice and it makes no claim about profitability. Trading involves risk. Always apply your own analysis and risk management. Indicator

Indicator

MQE - Market Quality Engine v1.6# MQE — Market Quality Engine v1.6
**MQE is not a buy/sell signal generator.** It is a Decision Support System that measures the quality of the current market environment on a standardized 0-100 scale. Its purpose is not to dictate "Buy" or "Sell," but to present, transparently and explainably, how favorable current market conditions are for opening a directional position.
## Methodology
MQE combines evidence from five independent analytical engines:
- **Trend Engine** — Evaluates market structure direction using EMA structure, AlphaTrend, and Comparative Relative Strength (CRS) against a benchmark (default BIST:XU100).
- **Flow Engine** — Measures directional capital commitment using a Cumulative Delta Volume (CDV) approximation; unlike raw volume, it prioritizes directional information over mere activity. The engine's highest-weighted criterion (40%) is whether CDV's fast average (EMA5) remains above its slow average (SMA68) — a strong, sustained CDV reading is interpreted as confirmation that the underlying scenario has not broken down.
- **Opportunity Conditions Engine** — Built around Relative ATR, this engine evaluates "tradability" rather than raw volatility; neither extreme compression nor extreme expansion is treated as inherently favorable.
- **Participation Engine** — Uses Relative Volume to assess whether sufficient market participation supports the current move; it is non-directional and primarily feeds into the Confidence output.
- **Momentum Engine** — MFI-based; deliberately avoids classic overbought/oversold interpretation and instead evaluates the persistence of directional energy as a supporting, confirmatory layer.
The output of these five engines is combined using regime-adaptive weighting — based on the current market **Regime** (Bull Trend / Bear Trend / Range / Transition) — into independent **Long Score** and **Short Score** values (0-100). Contradictions between engines are captured separately by a **Penalty** mechanism that only ever reduces the score, while the internal consistency of the evidence is reported through a fully independent **Confidence** value (0-100) that never alters the score itself. A high score paired with low confidence signals an environment that looks attractive but is backed by inconsistent evidence; high score with high confidence signals strong agreement across all evidence families.
For quick manual screening, MQE also provides a composite **Grade** (A+ through D), calculated separately for both directions.
## Dashboard
Two independent panels are provided: a **Primary Dashboard** (Long/Short Score, Confidence, Regime, and per-engine summaries — shown side-by-side for both the last closed bar and the live bar), and a **Diagnostics Panel** (per-engine breakdowns, penalty sources, raw indicator values, and active confirmation timeframes).
## Timeframe Adaptivity
Higher-timeframe confirmation and the AlphaTrend calculation automatically scale to the chart's timeframe (from 5-minute up to weekly), so no manual configuration is required by default; manual overrides remain available for advanced customization.
## Credit
The AlphaTrend calculation logic is adapted from the publicly known AlphaTrend concept originally developed by Kıvanç Özbilgiç.
## Disclaimer
MQE is not financial advice; it provides a statistical assessment of market conditions only. Past performance or evidence consistency does not guarantee future price behavior. All trading decisions and risk management remain the sole responsibility of the user.
Indicator

CM - Bollinger Bands Mean Reversion [CriptoMatiko]This indicator tracks **Bollinger Bands mean reversion signals**, replicating the entry and exit logic of a Python backtester that evaluated 81 long + 81 short parameter combinations on ETH/USDT 4H (Bybit Futures Linear, Mar 2025 – Aug 2026).
**The central finding:** the stop loss matters more than the band parameters.
| Setup | Direction | SL | Trades | Win Rate | Return |
|---|---|---|---|---|---|
| Standard (what tutorials teach) | Long | 2% | 110 | 38% | **-22.8%** |
| Optimized (indicator default) | Long | 1% | 110 | 38.2% | **+16.0%** |
| Buy & Hold ETH (same period) | — | — | — | — | -1.2% |
Same indicator. Same band parameters (20, 2.0). Different stop loss.
**Short side (optional):**
BB(20,2) shorts returned -17.4% — avoid with these settings. The optimizer found that shorts require different parameters: BB(10, 2.5) SL=1% TP=3R → +8.9% (Sharpe 7.81, 23 trades). Enable via the "Allow Short" input and adjust the parameters accordingly.
---
**Signal logic:**
- Long signal: bar closes **below** the lower Bollinger Band (no open position)
- Short signal: bar closes **above** the upper Bollinger Band (no open position)
- Entry: executed at the **next bar's open** (no lookahead)
**Exit logic — three mechanisms:**
1. **SL**: price hits SL% below (long) or above (short) the entry price
2. **TP**: price hits TP_ratio × risk from entry
3. **BB_UP / BB_DN**: bar closes beyond the opposite band (mean reversion complete)
**Default parameters (best Sharpe from 81-config long optimization):**
- BB Period: 20 | Std Deviation: 2.0 | Stop Loss: 1.0% | TP Ratio: 2.0R
**What makes this different from other BB indicators:**
- Parameters derived from a grid search (3 periods × 3 std devs × 3 SL% × 3 TP ratios × long/short/both)
- Simulated position tracking: entry marks appear on the next bar's open, matching backtester logic
- Three exit mechanisms with distinct markers (SL ✕ / TP ✓ / BB reversion ▽)
- SL and TP levels displayed as live lines during open position
- Short side included but with honest disclosure: BB(20,2) shorts underperform
- Uses ddof=1 standard deviation (biased=false) to match Python pandas behavior exactly
**Note:** This is an indicator with simulated position tracking, not a strategy. It shows signals and approximate trade timing for visual reference. For exact backtesting and the full optimizer: see GitHub link below.
**Tested on:** ETH/USDT 4H, Bybit Futures Linear. Validate on your own pair before using with real capital. Past performance does not guarantee future results. Indicator

Ang MTF Clouds + BarCount v2Merges Ripster's EMA Clouds and MTF Clouds into one workspace and adds the execution layer around them: five higher-timeframe clouds (daily + hourly), five clouds on the chart timeframe, opening-range breakout, premarket high/low, a 10:00 ET marker, bar counting from the open, auto-spaced cloud labels, and a Chop/Trend verdict panel.
The panel is the reason this exists. Cloud systems are trend-day tools that get chopped up in ranges, so the first question is whether the day is tradeable at all — price trapped inside the premarket range with no 10:00 breakout is a "size down" day regardless of what color the clouds are.
Entries at cloud rejections/reclaims, stops at the cloud edge, targets at the next cloud (MTF magnet). Designed for SPY on a 10-minute chart.
Note: higher-timeframe clouds repaint intraday (standard request.security behavior), so replay-based backtests will overstate performance. Cloud concept © @ripster47, MPL 2.0. Indicator

XauLabs Trend & Range**ENGLISH**
**What it does**
This indicator answers one question, and only one: is the market currently trending up, trending down, or ranging? It reads pure price structure — confirmed swing highs and swing lows — and states a verdict on the chart.
**How it works (full method)**
1. **Swing detection.** A swing high is confirmed only when the highs of the N bars before AND the N bars after are all lower (mirrored for swing lows). N is user-defined, default 7, range 5–21. Confirmation therefore arrives N bars after the actual extreme; the marker is then plotted at its true historical position and never moves again.
2. **Memory.** The script keeps the last two confirmed highs and the last two confirmed lows.
3. **Classification.**
- Uptrend: last high > previous high AND last low > previous low.
- Downtrend: last high < previous high AND last low < previous low.
- Range: anything else, including any state with fewer than two confirmed highs and two confirmed lows.
4. **Close-based invalidation** (optional, on by default). Any bar closing below the last confirmed swing low arms an invalidation flag. While that flag is armed, no uptrend is displayed: the state is forced to Range, even if the swing sequence otherwise qualifies as higher highs and higher lows. The flag is cleared only when a new swing low is confirmed. The logic is mirrored for downtrends, using a close above the last confirmed swing high. Wicks piercing the level do not count — only the close does. This mechanism can only suppress a trend reading, never create one: a trend must always earn its own structure.
**Why the delay is deliberate**
Signals never appear and later vanish. What the history shows is what would have been visible live. The cost is the N-bar confirmation delay, and it is stated openly rather than hidden behind a repainting display.
**On-chart output**
- Background tint: green uptrend, red downtrend, grey range.
- Triangles marking each confirmed swing high and low.
- A two-line state badge in the top-right corner, with selectable size and language (EN/FR).
- One alert condition: state change.
**Suggested use**
Start on H4. When the state reads Range, trend-following setups are structurally out of place — the indicator is meant to be used as a context filter before any entry logic, not as an entry trigger itself. The lower the sensitivity value, the faster and noisier the reading; the higher, the slower and more stable.
**Originality**
Most trend tools average price (moving averages, oscillators) and therefore lag by construction. This one reads structure only, applies a strict non-repainting confirmation rule, and adds a close-based invalidation layer so that a broken structure is downgraded to Range immediately rather than after the next swing forms. Open source: every rule above is verifiable line by line in the code.
This is an educational structure-reading tool. It gives no buy or sell signals and makes no performance claim. Trading involves substantial risk of loss.
---
**FRANÇAIS**
**Ce que fait l'indicateur**
Il répond à une seule question : le marché est-il en tendance haussière, baissière, ou en range ? Il lit la structure pure du prix — sommets et creux confirmés — et affiche son verdict.
**Comment il fonctionne (méthode complète)**
1. **Détection des pivots.** Un sommet n'est confirmé que si les N bougies avant ET les N bougies après ont toutes un plus haut inférieur (symétrique pour les creux). N est réglable, 7 par défaut, plage 5–21. La confirmation arrive donc N bougies après l'extrême réel ; le marqueur est ensuite tracé à sa vraie place historique et ne bouge plus jamais.
2. **Mémoire.** Le script conserve les deux derniers sommets et les deux derniers creux confirmés.
3. **Classification.**
- Hausse : dernier sommet > précédent ET dernier creux > précédent.
- Baisse : dernier sommet < précédent ET dernier creux < précédent.
- Range : tout le reste, y compris tant que moins de deux sommets et deux creux sont confirmés.
4. **Invalidation en clôture** (optionnelle, active par défaut). Toute bougie qui clôture sous le dernier creux confirmé arme une invalidation. Tant qu'elle est armée, aucune tendance haussière n'est affichée : l'état reste Range, même si la séquence de pivots remplit par ailleurs la condition sommets et creux ascendants. L'invalidation ne se désarme qu'à la confirmation d'un nouveau creux. Le mécanisme est symétrique en tendance baissière, avec une clôture au-dessus du dernier sommet confirmé. Une mèche qui perce le niveau ne suffit pas — seule la clôture compte. Ce mécanisme peut uniquement supprimer une lecture de tendance, jamais en créer une : une tendance doit toujours prouver sa propre structure.
**Pourquoi le délai est assumé**
Aucun signal n'apparaît puis ne disparaît. Ce que montre l'historique est ce qui aurait été visible en direct. La contrepartie est le délai de confirmation de N bougies, affiché ouvertement plutôt que masqué derrière un affichage qui se repeint.
**Affichage**
- Fond teinté : vert en hausse, rouge en baisse, gris en range.
- Triangles marquant chaque sommet et creux confirmé.
- Un badge d'état à deux lignes dans le coin supérieur droit, avec taille et langue (EN/FR) réglables.
- Une condition d'alerte : changement d'état.
**Utilisation suggérée**
Commencer en H4. Quand l'état affiche Range, les setups de suivi de tendance sont structurellement hors sujet — l'indicateur est conçu comme un filtre de contexte en amont d'une logique d'entrée, pas comme un déclencheur d'entrée. Plus la sensibilité est basse, plus la lecture est rapide et bruitée ; plus elle est haute, plus elle est lente et stable.
**Originalité**
La plupart des outils de tendance moyennent le prix (moyennes mobiles, oscillateurs) et retardent par construction. Celui-ci lit uniquement la structure, applique une règle de confirmation stricte sans repeinture, et ajoute une couche d'invalidation en clôture pour qu'une structure cassée redevienne Range immédiatement plutôt qu'au pivot suivant. Code ouvert : chaque règle ci-dessus est vérifiable ligne par ligne.
Outil éducatif de lecture de structure. Il ne donne aucun signal d'achat ou de vente et ne formule aucune promesse de performance. Le trading comporte un risque de perte important. Indicator

Pipstorm & SessionsThis indicator is designed to help traders identify the behavior of price during the major forex trading sessions: Asian, London, New York AM, and New York PM.
It automatically highlights each trading session on the chart, making it easy to analyze session ranges, volatility, and market structure.
Key Features
Automatically marks Asian, London, NY AM, and NY PM sessions.
Displays each session's trading range with colored boxes.
Helps identify session highs and lows.
Useful for spotting liquidity grabs, breakouts, and reversals.
Supports Smart Money Concepts (SMC), ICT, and price action trading strategies.
Clean and simple visual layout for better chart analysis.
How It Can Be Used
Trade London breakouts after the Asian session.
Identify New York reversals and continuation setups.
Monitor liquidity above session highs and below session lows.
Improve entry and exit timing using session-based market behavior.
Suitable for Gold (XAU/USD), Forex pairs, and major indices.
Best Timeframes
Works effectively on M5, M15, M30, and H1 charts.
Disclaimer
This indicator is an analytical tool and should be used alongside proper risk management and market confirmation. It does not guarantee profitable trades. Indicator
