Indicator

Fractal Retracement [Jamallo](2025)
Intro
FRAMA is a moving average that adapts its speed based on fractal geometry — specifically, the fractal dimension (D) of recent price action. When price is trending strongly (low fractal dimension), it moves fast. When price is choppy/ranging (high fractal dimension), it slows down. This makes it far more responsive than a standard EMA or SMA.
Breakdown:
The indicator wraps this with a continuous range logic layer: the filtered line = k only moves if price breaks beyond the FRAMA ± ATR-based range, creating a stepped/ratcheting effect that filters out noise.
Two sets of bands are plotted around the filtered line, scaled by ATR multiplied by user-defined multipliers (tight at 0.5×, medium at 1.0×). They're smoothed with a short EMA to reduce jitter, and filled with gradient colors for visual clarity.
Direction is simply determined by whether k is rising or falling, and colors everything green (uptrend) or pink/red (downtrend).
END
In short, it's a noise-filtered trend indicator useful for identifying trend direction, dynamic support/resistance , and gauging how far price has retraced from the trend baseline. Indicator

20,50,100, 200 EMA with support and resistance
Overview
A clean, rule-based trading strategy designed for the **Daily timeframe**. It uses four Exponential Moving Averages (EMA 20, 50, 100, 200) as a trend filter combined with dynamic Support & Resistance levels to identify high-probability breakout and breakdown setups.
The logic is intentionally simple — no indicators stacked on indicators, no complex filters. Just price, trend direction, and key levels.
How It Works
Entry — Long (CE / Buy)
A long entry is triggered when:
- Price closes **above all four EMAs** (20, 50, 100, 200) — confirming strong bullish trend alignment
- Price **breaks above the previous bar's high** — confirming momentum and breakout
Entry — Short (PE / Sell)
A short entry is triggered when:
- Price closes **below all four EMAs** (20, 50, 100, 200) — confirming strong bearish trend alignment
- Price **breaks below the previous bar's low** — confirming momentum and breakdown
Exit Logic
- Stop Loss — set at the previous bar's low (for longs) or previous bar's high (for shorts)
- Target — calculated using the configurable Risk: Reward Ratio (default 3:1)
- EMA-based dynamic exit — if price closes below EMA 20 or EMA 50 (for longs), or above EMA 20 or EMA 50 (for shorts), the stop is tightened to force an exit on the next bar, protecting open profit
- Optional Trailing Stop Loss — activates after a defined profit % is reached, then trails at a set % distance from the peak
Indicators on Chart
| Line | Color | Meaning |
|------|-------|---------|
| EMA 20 | Yellow | Fast trend / momentum |
| EMA 50 | Blue | Mid-term trend |
| EMA 100 | White | Medium-long trend support |
| EMA 200 | Green | Long-term trend direction |
| Resistance | Orange dots | Swing high levels |
| Support | Blue dots | Swing low levels |
| ▲ Green arrow | Below bar | Long (CE) entry signal |
| ▼ Red arrow | Above bar | Short (PE) entry signal |
---
Settings
| Input | Default | Description |
|-------|---------|-------------|
| Risk Reward Ratio | 3.0 | Target = Entry + (RR × Risk) |
| Show Support/Resistance | On | Toggle S/R level plots |
| Swing Detection Bars | 20 | Lookback bars for pivot detection |
| One Trade Per Day | On | Limits to one CE and one PE per day |
| Use Trailing Stop Loss | Off | Enable trailing SL after activation |
| Trailing Activation % | 1.0% | Profit % before trailing SL kicks in |
| Trailing Distance % | 0.5% | Distance the trailing SL follows from peak |
---
Best Used On
- **Timeframe:** Daily (recommended), Weekly
- **Instruments:** Stocks, Indices, ETFs
- Works well on trending instruments where EMA stacking is meaningful
---
Notes
- This strategy does **not** use candle body filters, volume filters, or session time windows — keeping it universally applicable across timeframes and instruments
- One trade per direction per day is enforced by default to avoid overtrading
- Both CE (long) and PE (short) trades cannot be open simultaneously
---
⚠️ **Disclaimer:** This strategy is for educational and backtesting purposes only. Past performance does not guarantee future results. This is not financial advice. Always do your own research and consult a qualified financial advisor before making any trading decisions. Strategy

Dynamic Support & Resistance [UAlgo]Dynamic Support & Resistance is a pivot driven structure indicator that detects recurring reaction prices and converts them into live support and resistance zones. The script does not treat every pivot as an isolated event. Instead, it groups nearby pivots into shared price areas, counts how many times the market has respected each area, and only promotes a level visually once it reaches the required minimum number of touches.
This creates a cleaner and more practical market structure map. When price reacts again near an existing zone, the level is updated rather than duplicated. As a result, the plotted areas represent repeated interaction and growing structural significance instead of a large collection of disconnected swing points.
Each active level is displayed as a channel centered on the level price. The size of that channel is based on the user selected tolerance percentage, so every level is shown as a reaction zone rather than a single exact line only. A center line and a text label are also added, which makes the structure easier to read in live chart conditions.
The script also includes a clear invalidation model. Support becomes invalid when price closes meaningfully below the zone by more than the selected break threshold. Resistance follows the opposite logic. Once invalidated, the level is removed from the active structure map, which keeps the chart focused on areas that are still relevant.
This makes the indicator useful for traders who want a simple but adaptive framework for mapping horizontal support and resistance. It works well for identifying repeated reaction zones, tracking the growth of structural importance through multiple touches, and recognizing when a level has finally lost validity.
🔹 Features
🔸 Pivot Based Structure Detection
The script starts from confirmed pivot highs and pivot lows. This means support and resistance zones are built from meaningful swing points rather than from arbitrary rolling highs and lows. As a result, the detected levels are more closely aligned with actual market turning areas.
🔸 Level Clustering Instead of Raw Pivot Plotting
A newly detected pivot is not always turned into a brand new level. The script first checks whether that pivot belongs to an existing active zone within the allowed tolerance. If it does, the existing level is updated. If it does not, a new level is created. This prevents unnecessary duplication and keeps the structure map organized.
🔸 Touch Counting and Strength Filtering
Every level tracks how many times price has reacted around it. A zone becomes visually important only after it reaches the required minimum number of touches. This helps filter out weak one time reactions and highlights price areas that have shown repeated acceptance or rejection.
🔸 Adaptive Reaction Zones
Each level is displayed as a channel rather than as a single price only. The channel width is calculated from the level price and the selected tolerance percentage. This makes the plotted area more realistic because support and resistance usually behave as zones rather than exact ticks.
🔸 Dynamic Price Recentering
When a new pivot is assigned to an existing level, the script updates the level price using an average based on the previous stored price and the new pivot. This gradually shifts the zone toward the center of actual reaction activity, which makes the level more representative over time.
🔸 Separate Support and Resistance Maps
Support and resistance are stored independently in their own arrays. This allows the script to manage bullish and bearish reaction zones separately while preserving clean logic for visualization, touch counting, invalidation, and cleanup.
🔸 Live Visual Rendering
Once a level becomes strong enough, the script draws:
a reaction channel,
a center line,
and a label showing the role and price.
This produces a chart friendly display that is easy to interpret during live trading or post analysis.
🔸 Invalidation by Closing Break
Levels are not removed by random intrabar noise alone. Instead, support is invalidated only when closing price moves below the level by more than the selected break percentage, and resistance is invalidated only when closing price moves above it by more than that threshold. This helps reduce premature removals.
🔸 Automatic Cleanup
Broken levels are removed from the active arrays after invalidation. This keeps the script efficient and prevents the internal structure store from filling with irrelevant levels.
🔸 Label Position Refresh
On the last bar, active labels are shifted slightly forward so they remain readable and do not sit directly on top of current candles. This small detail improves chart presentation significantly.
🔹 Calculations
1) Pivot Detection
float ph = ta.pivothigh(high, pivotLen, pivotLen)
float pl = ta.pivotlow(low, pivotLen, pivotLen)
int pIdx = bar_index - pivotLen
if not na(ph)
resistances.processPoint(ph, -1, pIdx)
if not na(pl)
supports.processPoint(pl, 1, pIdx)
This is the starting point of the script.
The code uses ta.pivothigh and ta.pivotlow to detect confirmed swing highs and swing lows. Because pivots are only confirmed after pivotLen bars on both sides, the actual pivot bar is not the current bar. That is why the script calculates:
pIdx = bar_index - pivotLen
This gives the real bar index where the pivot occurred.
Then the pivot is passed into the correct structure map:
pivot highs go into the resistance array,
pivot lows go into the support array.
So at this stage, the script is transforming raw swing points into candidate support or resistance events.
2) Grouping New Pivots Into Existing Levels
method processPoint(array levels, float price, int role, int idx) =>
bool found = false
for in levels
if lvl.active
float tolerance = lvl.price * zonePct
if math.abs(price - lvl.price) <= tolerance
lvl.price := (lvl.price * lvl.count + price) / (lvl.count + 1)
lvl.count += 1
lvl.updateVisuals()
found := true
break
if not found
SRLevel newLvl = SRLevel.new(price, 1, role, true, na, na, na, idx)
levels.push(newLvl)
This method decides whether a new pivot should strengthen an existing level or create a completely new one.
For every active level in the relevant array, the script calculates a tolerance band:
tolerance = lvl.price * zonePct
Then it checks whether the new pivot price is close enough to that level:
math.abs(price - lvl.price) <= tolerance
If the pivot falls inside the allowed zone, the script treats it as another touch of the same structure. It then updates the stored level price using an average weighted by the existing touch count:
lvl.price := (lvl.price * lvl.count + price) / (lvl.count + 1)
This is important. The level does not stay frozen forever. It gradually recenters as more pivots are absorbed into it. At the same time, the touch count increases, which strengthens the zone statistically.
If no active level is close enough, the script creates a fresh support or resistance level with an initial count of one.
So this method is the core clustering engine of the whole indicator.
3) Minimum Touch Logic and Zone Construction
method updateVisuals(SRLevel this) =>
if this.active and this.count >= minStrength
color c = this.role == 1 ? colSup : colRes
float tolerance = this.price * zonePct
float top = this.price + tolerance
float bot = this.price - tolerance
This is the first visual gate.
A level is drawn only if two conditions are true:
the level must still be active,
and its touch count must be greater than or equal to the minimum strength input.
That means weak single touch levels can exist internally, but they are not shown until they prove themselves.
Once the level qualifies, the script calculates the channel boundaries around the center price:
top = this.price + tolerance
bot = this.price - tolerance
So the plotted zone is always centered on the current level price and expands above and below it by the selected tolerance percentage.
This is what turns the raw pivot cluster into an actual support or resistance zone.
4) Drawing the Channel, Center Line, and Label
if na(this.bx)
this.bx := box.new(
left=this.start_idx,
top=top,
right=bar_index,
bottom=bot,
border_color=color.new(c, 0),
border_style=line.style_dotted,
bgcolor=color.new(c, 80),
extend=extend.right
)
else
this.bx.set_top(top)
this.bx.set_bottom(bot)
if na(this.ln)
this.ln := line.new(
x1=this.start_idx,
y1=this.price,
x2=bar_index,
y2=this.price,
color=c,
width=1,
extend=extend.right
)
else
this.ln.set_y1(this.price)
this.ln.set_y2(this.price)
Once a level is strong enough, the script renders its visual structure.
The box represents the full support or resistance channel from the starting pivot index to the current bar, and it is extended to the right so the zone remains visible into future bars.
The line is drawn exactly at the stored level price, which serves as the center of the zone. Because the price can shift slightly over time as new pivots are absorbed, the center line is updated dynamically as well.
So visually, each confirmed level contains:
a shaded reaction area,
a center reference line,
and an ongoing extension into the future.
This gives the user both a zone view and a central price reference at the same time.
5) Text Label Calculation
string txt = str.format("{0} - {1,number,#.##}", this.role == 1 ? "Support" : "Resistance", this.price)
if na(this.lbl)
this.lbl := label.new(
x=bar_index,
y=this.price,
text=txt,
style=label.style_label_left,
color=color.new(color.black, 100),
textcolor=colTxt,
size=size.small
)
else
this.lbl.set_xy(bar_index, this.price)
this.lbl.set_text(txt)
This snippet builds and updates the text label for each visible level.
The label text is generated from the level role and the current averaged level price. So if the level belongs to the bullish structure map, the label shows Support and the current price. If it belongs to the bearish structure map, it shows Resistance and the current price.
The label is then either created or updated at the latest bar.
This means the label always reflects the most current state of the zone instead of staying attached to an outdated price.
6) Invalidation Logic
method checkInvalidation(array levels, float currentPrice) =>
for in levels
if lvl.active
float threshold = lvl.price * breakPct
bool broken = false
if lvl.role == 1
if currentPrice < lvl.price - threshold
broken := true
else
if currentPrice > lvl.price + threshold
broken := true
if broken
lvl.active := false
lvl.updateVisuals()
This method decides when a level should stop being considered valid.
For every active level, the script calculates a break threshold based on the level price and the selected invalidation percentage:
threshold = lvl.price * breakPct
Then it applies directional logic.
For support:
price must close below the level by more than the threshold.
For resistance:
price must close above the level by more than the threshold.
This is important because it means the script does not remove zones on a tiny touch or minor overshoot. A meaningful closing break is required.
When that break happens, the level is marked inactive and its visuals are refreshed so the box, line, and label are deleted.
7) Visual Removal of Broken Levels
else if not this.active
if not na(this.bx)
this.bx.delete()
this.bx := na
if not na(this.ln)
this.ln.delete()
this.ln := na
if not na(this.lbl)
this.lbl.delete()
this.lbl := na
This is the part of updateVisuals that handles invalidated levels.
Once a level is no longer active, the script deletes all visual objects associated with it:
the channel box,
the center line,
and the text label.
This keeps the chart focused on only those support and resistance zones that are still valid. It also prevents broken levels from continuing to influence the user visually after the market has already moved through them.
8) Cleanup of Inactive Objects From Memory
method cleanup(array levels) =>
int n = levels.size()
if n > 0
for i = n - 1 to 0
SRLevel lvl = levels.get(i)
if not lvl.active
levels.remove(i)
Deleting a level visually is only one part of the process. The script also removes inactive levels from the calculation arrays.
This reverse loop is important because removing array elements while looping forward can shift indices and create logic errors. By iterating from the end toward zero, the script safely removes inactive items.
This keeps the internal storage efficient and prevents the structure engine from wasting time checking already broken zones on future bars.
9) Last Bar Label Position Update
if barstate.islast
for lvl in supports
if lvl.active and not na(lvl.lbl)
lvl.lbl.set_x(bar_index + 5)
for lvl in resistances
if lvl.active and not na(lvl.lbl)
lvl.lbl.set_x(bar_index + 5)
This small block improves readability on the chart.
On the last visible bar, the script shifts active labels slightly to the right of the current candle. That creates a cleaner presentation and reduces overlap between labels and price bars.
Although this does not change the structural logic of the indicator, it improves usability in live analysis and makes the levels easier to read at a glance.
10) Full Execution Flow
if not na(ph)
resistances.processPoint(ph, -1, pIdx)
if not na(pl)
supports.processPoint(pl, 1, pIdx)
supports.checkInvalidation(close)
resistances.checkInvalidation(close)
supports.cleanup()
resistances.cleanup()
This compact block summarizes how the script behaves on every bar.
First, it checks whether a new pivot high or pivot low has been confirmed.
Second, it sends that pivot into the correct level array.
Third, it checks whether any active support or resistance has been invalidated by the current closing price.
Finally, it removes inactive levels from memory.
So the script is constantly cycling through four steps:
detect,
cluster,
invalidate,
clean.
That is why the indicator remains dynamic. It is always updating the active structure map as the market evolves. Indicator

Session Anchor RangeThe Session Anchor Range highlights the full wick-to-wick range of the first 15-minute candle of the New York session.
This first candle often acts as a reference point for liquidity and early session positioning, helping traders quickly identify potential bias, support, resistance, and breakout opportunities throughout the trading day.
The indicator automatically draws a rectangle covering the high and low of the first NY 15-minute candle, creating a clear visual range that can be used as a decision zone.
How to Use It:
1️⃣ Breakout Bias
One of the most common ways to use this tool is to determine market bias once price breaks out of the range.
• Break above the range → Bullish bias
• Break below the range → Bearish bias
When combined with structure, volume, or higher timeframe analysis, these breakouts can provide strong confluence for directional trades.
2️⃣ Intraday Support & Resistance
While price remains inside the range, the boundaries can behave as dynamic levels.
• Top of the range → potential resistance
• Bottom of the range → potential support
Traders often watch for rejections, liquidity sweeps, or consolidation around these edges.
3️⃣ Liquidity & Expansion
The first 15 minutes of the New York session frequently establish early liquidity zones.
A clean breakout from the range can signal volatility expansion and momentum entering the market.
This can help traders anticipate trend continuation or session direction.
Tips for Best Results
• Works best on lower timeframes (1m–15m)
• Combine with market structure or trend analysis
• Watch for false breakouts and liquidity sweeps around the edges
• Use with other confluence tools such as VWAP, value areas, or order flow
Customization
The indicator allows you to customize:
• Rectangle border color
• Fill color and transparency
• Border thickness
• Session behavior Indicator

Adaptive Bollinger Bands [by Oberlunar]Adaptive Bollinger Bands by Oberlunar extends a classical Bollinger-style framework by building structured envelopes on highs and lows and then interpreting them through flow and regime context rather than through band touches alone. The script combines two moving-average bases, adaptive volume-distribution logic above and below price, a normalized TRIX component, and a multi-timeframe directional filter to distinguish between mean-reversion conditions and breakout conditions in a more organized way.
Its original value is not in any single component taken in isolation, but in the way these elements are fused into one coherent visual system. The bands define the price structure, the heatmap and tape show where directional pressure is stronger, the regime engine helps separate quieter rejection environments from more persistent expansion, and the support, resistance, and compression areas help mark zones where market behavior becomes more interpretable.
The indicator is designed to be read directly on standard charts. It does not use future-looking logic, and higher-timeframe requests are made with no lookahead. It is meant as a decision-support tool for chart reading, not as a promise of performance or as a substitute for risk management.
A common way to use the script is to observe how price behaves when it reaches the outer parts of the envelope and then compare that location with the active regime, the side-specific flow, and the multi-timeframe bias. In quieter conditions, signals near the edge of the channel can be interpreted as possible rejection areas. In stronger directional conditions, the same area can instead be read as part of a continuation or breakout sequence. The heatmap and tape help show whether pressure is building above or below price, while the marked zones can help the user keep track of relevant local structure.
Enjoy
by Oberlunar ✦👁 Indicator

Indicator

Malaysian SnR Levels [UAlgo]Malaysian SnR Levels is a structure based support and resistance overlay that automatically plots three level types on the chart:
A-Levels, which act as resistance
V-Levels, which act as support
Gap Levels, which mark qualifying candle to candle price gaps
The script is built for traders who want clean horizontal reference levels that stay active until price decisively crosses through them. Instead of drawing every pivot forever, the indicator manages each level as a stateful object with freshness and activity tracking. A newly created level begins as fresh , becomes unfresh after its first wick interaction, and remains active until price fully crosses through it. Once broken, the level stops extending and is archived on the chart.
A major strength of this implementation is its optional multi timeframe workflow. You can leave the timeframe input empty to detect levels on the current chart, or select a higher timeframe to project higher timeframe A, V, and Gap levels onto a lower timeframe execution chart. This makes the script useful for both local chart structure and top down level mapping.
The result is a practical support and resistance engine focused on:
Pivot based resistance and support
Gap based structural levels
Fresh versus unfresh state tracking
Automatic break detection
Optional MTF level projection
🔹 Features
🔸 1) Automatic A-Levels and V-Levels
The script detects pivot highs and pivot lows and converts them into horizontal support and resistance levels:
A-Levels come from confirmed pivot highs and behave as resistance
V-Levels come from confirmed pivot lows and behave as support
These are built from pivot calculations on close , not on raw high and low extremes, which gives the levels a close based structural character.
🔸 2) Automatic Gap Levels
In addition to pivots, the script detects directional gap style levels when two consecutive candles move in the same direction and the open to prior close gap exceeds a minimum tick distance.
Bullish gap logic creates a gap level at the previous close.
Bearish gap logic also creates a gap level at the previous close.
This gives the indicator a third structural layer beyond classic pivot based support and resistance.
🔸 3) Fresh and Unfresh State Tracking
Every new level starts as fresh . A fresh level is considered untouched. Once price interacts with the level by wick, it becomes unfresh :
The line style changes to dashed
The width becomes thinner
The color shifts to the unfresh color theme
This helps traders quickly distinguish untouched levels from levels that have already been tested.
🔸 4) Active Until Full Break
A level stays active until price crosses through it. Once broken, the level:
Stops extending
Fixes its endpoint at the break time
Keeps the historical line visible
Stops updating as an active level
This is useful because old levels remain visible for review, while current active levels continue projecting forward.
🔸 5) Multi Timeframe Detection (Optional)
The script supports a selectable detection timeframe:
Leave it empty to use the current chart timeframe
Set it to a higher timeframe to project higher timeframe levels onto the current chart
This is especially useful when traders want to execute on a lower timeframe while respecting higher timeframe structure.
🔸 6) Minimum Gap Filter in Ticks
Gap levels are filtered by a configurable minimum distance in ticks. This avoids plotting tiny micro gaps and helps keep only more meaningful dislocations.
🔸 7) Duplicate Level Protection
Before adding a new level, the script checks whether an active level already exists near the same price. If another active level is within a small tick range, the new one is skipped.
This reduces clutter and prevents nearly identical levels from stacking on top of each other.
🔸 8) Separate Visibility Controls
Users can independently choose whether to display:
A-Levels
V-Levels
Gap Levels
This makes the tool adaptable for different workflows, such as only plotting pivot levels or only monitoring gap structure.
🔸 9) Full Visual Customization
The script provides separate color controls for:
Fresh A-Levels
Unfresh A-Levels
Fresh V-Levels
Unfresh V-Levels
Fresh Gap Levels
Unfresh Gap Levels
It also allows customization of:
Fresh line width
Unfresh line width
Label size
This makes it easy to fit the indicator into different chart styles.
🔸 10) Label Projection to the Right
Each active level includes a compact label showing its type:
A
V
Gap
The label is automatically pushed several time steps to the right of current price so it stays readable and aligned with the level.
🔸 11) Automatic Level Count Management
The script keeps the number of stored levels under control using a maximum active limit. When capacity is exceeded, it tries to remove an older inactive level first.
This helps maintain chart cleanliness and stay within PulseWire object limits.
🔹 Calculations
1) Pivot Based A-Level and V-Level Detection
The script calculates pivots using close, not high or low:
float ph = ta.pivothigh(close, pivotLength, pivotLength)
float pl = ta.pivotlow(close, pivotLength, pivotLength)
Interpretation:
A-Level = confirmed close based pivot high
V-Level = confirmed close based pivot low
Because pivot confirmation requires bars on both sides, the level time is aligned to the true pivot bar using:
int ph_t = not na(ph) ? time : na
int pl_t = not na(pl) ? time : na
2) Gap Level Detection Logic
The script defines bullish and bearish gap conditions using consecutive candles in the same direction plus a minimum gap size measured in ticks.
Bullish gap:
bool bullishGap = prevBullish and isBullish and (open - close ) >= syminfo.mintick * minGapTicks
Bearish gap:
bool bearishGap = prevBearish and isBearish and (close - open) >= syminfo.mintick * minGapTicks
If either condition is true, the gap level is set at:
gap_price := close
So the reference price for the gap level is the previous candle’s close.
3) Multi Timeframe Data Selection
The script computes levels in a helper function and can either use:
Local chart data directly
Or higher timeframe data through request.security
= request.security(...)
If the timeframe input is empty, local values are used. Otherwise, the security values are used:
float ph = tf == "" ? loc_ph : sec_ph
This gives flexible MTF projection while keeping one consistent logic engine.
4) New Level Event Detection
To prevent the same pivot or gap from being added multiple times, the script checks whether the timestamp of the detected event changed:
bool new_ph = not na(ph_t) and ph_t != nz(ph_t )
bool new_pl = not na(pl_t) and pl_t != nz(pl_t )
bool new_gap = not na(gap_t) and gap_t != nz(gap_t )
This is an important implementation detail because it avoids a common Pine issue where na != na can propagate as na and block reliable detection.
5) Level Creation and Duplicate Protection
Before a new level is added, the script checks existing active levels and rejects duplicates that are too close:
if lvl.isActive and math.abs(lvl.price - p) < syminfo.mintick * 10
exists := true
This means levels within 10 ticks of an existing active level are treated as duplicates and not added.
6) Level Initialization
When a level is created, it starts as:
Fresh = true
Active = true
A line is drawn from the source time and extended to the right:
line.new(st, p, st + timeStep, p, xloc=xloc.bar_time, color=c, width=lineWidthFresh, extend=extend.right)
A label is also created and placed several time steps to the right:
label.new(cur_time + timeStep * 5, p, t, ...)
This keeps the label visually separated from the current candle.
7) Fresh to Unfresh Transition Logic
A level becomes unfresh when price first touches it by wick while the level is still active.
For A-Levels:
touchedWick := h >= this.price
For V-Levels:
touchedWick := l <= this.price
For Gap levels:
touchedWick := h >= this.price and l <= this.price
Once touched:
The level remains active
isFresh becomes false
The line becomes dashed
The width changes to the unfresh width
The line and label colors switch to the unfresh palette
This means a wick touch weakens the level visually, but does not break it.
8) Break / Deactivation Logic
A level becomes inactive only when price crosses through it, not merely when it is touched.
Cross up condition:
bool crossedUp = (o <= this.price and c > this.price) or (c_prev < this.price and c > this.price)
Cross down condition:
bool crossedDown = (o >= this.price and c < this.price) or (c_prev > this.price and c < this.price)
If either is true:
this.isActive := false
this.lvlLine.set_x2(curTime)
this.lvlLine.set_extend(extend.none)
this.lvlLabel.set_x(curTime)
Interpretation:
The level stops projecting and is fixed at the break time.
9) Time Step Handling
The script uses the current bar’s time distance to position and extend labels:
int timeStep = bar_index > 0 ? time - time : 60000
This is important because the script uses xloc.bar_time , so horizontal positioning is time based rather than bar index based.
10) Maximum Level Management
When the array exceeds the user defined maximum, the script tries to remove an inactive level first:
if this.size() > maxLevels
int removeIdx = 0
for i = 0 to this.size() - 1
SnRLevel lvl = this.get(i)
if not lvl.isActive
removeIdx := i
break
Then it deletes that level’s line and label.
Important implementation note:
If no inactive level is found, removeIdx remains 0, so the oldest level in the array is removed.
11) A-Level, V-Level, and Gap Interpretation
In this script:
A-Levels are close based pivot highs and function like resistance
V-Levels are close based pivot lows and function like support
Gap Levels are prior close reference levels from qualifying directional gaps
All three share the same lifecycle framework:
Fresh
Unfresh after wick touch
Inactive after a full cross through Indicator

Trade by Design - v1.0.0Trade by Design — NY 17:00 Session Levels (v1.0.0)
Overview
Trade by Design plots key reference levels derived from a New York–anchored trading day that resets at 17:00 America/New_York. The indicator is designed to make higher-quality context levels visible on any intraday chart by automatically drawing:
Previous Week High/Low (HoW/LoW)
Previous Trading Day High/Low (HoD/LoD)
Current Day Running High/Low (iH/iL) with the current day’s range percentage
These levels can be used as structured support/resistance references and as a framework for intraday planning.
What the indicator draws
1) Previous Week Levels — HoW / LoW
HoW (High of Week): highest price reached during the previous NY-anchored week
LoW (Low of Week): lowest price reached during the previous NY-anchored week
Week boundary: the week is treated as starting at Sunday 17:00 New York time, aligning the week definition with the same session reset concept used for daily levels.
Why it matters: prior week extremes frequently act as decision points where price can reject, consolidate, or break and retest.
2) Previous Trading Day Levels — HoD / LoD
HoD (High of Day): highest price reached during the prior trading day
LoD (Low of Day): lowest price reached during the prior trading day
Trading day boundary: 17:00 NY → 17:00 NY (America/New_York)
Why it matters: prior day extremes are commonly used for liquidity, breakout, and mean-reversion context depending on market conditions.
3) Current Day Running Levels — iH / iL
iH (Initial/Current High): running high since the selected start time
iL (Initial/Current Low): running low since the selected start time
The label displays the % range between iH and iL, helping you assess the day’s realized movement at a glance.
Optional “Gap” handling (17:00–20:00 NY)
You can choose where the iH/iL calculation begins:
Include Gap (start at 17:00 NY): iH/iL tracks the entire NY trading day from the reset.
Exclude Gap (start at 20:00 NY): iH/iL ignores the 17:00–20:00 window and begins at 20:00 NY.
This option exists because some traders prefer measuring the day’s initial range from later liquidity conditions.
Controls & Settings
Visuals
Independent colors for weekly, daily, and current-day levels
Line width, line style (solid/dashed/dotted)
Separate transparency for current vs historical lines
Label size and label offset (in bars) to improve readability
History
Choose how many prior weeks to display (older weekly levels labeled sequentially)
Toggle visibility for historical HoD/LoD and historical iH/iL
Label convention
Current: HoW / LoW, HoD / LoD, iH / iL (with % range)
Historical: sequential suffixes are used to distinguish older levels (e.g., HoD2/LoD2, HoW2/LoW2, etc.)
Practical ways to use the levels (examples)
Support/Resistance map: treat HoW/LoW and HoD/LoD as structural boundaries for reactions and invalidations.
Breakout context: a clean break and acceptance beyond HoD/LoD (or HoW/LoW) can signal continuation; failure to accept can signal range behavior.
Volatility awareness: use the iH/iL % range to judge whether the day is expanding (trend-day potential) or compressing (range potential).
Confluence: align these levels with your own confirmation tools (market structure, volume, orderflow, trend filters, etc.).
Notes & limitations
Results depend on the symbol’s session data and the chart timeframe; some markets have unique trading hours that may affect how highs/lows form.
This indicator provides reference levels only and does not generate buy/sell signals.
Always apply risk management. This is not financial advice.
Version history
v1.0.0
Stable release of NY 17:00 anchored levels
Previous Week High/Low (HoW/LoW)
Previous Trading Day High/Low (HoD/LoD)
Current Day running High/Low (iH/iL) + range %
Optional inclusion/exclusion of 17:00–20:00 NY window for iH/iL
Historical rendering controls + styling options for production charting Indicator

Strong Breakouts MTF | ProjectSyndicateStrong Breakouts MTF automatically identifies and power-ranks high-probability breakout opportunities by analyzing historical pivot structures. It filters for quality, calculates a 0-10 strength score for every breakout based on zone tightness, candle momentum, and proximity to the breakout level, and presents all data on the chart and in a comprehensive multi-timeframe dashboard to eliminate noise and focus on breakouts that matter.
• 🎯 Power-Ranking System (0-10) — every breakout is given a strength score based on a weighted algorithm that assesses zone structure, breakout candle characteristics, and ATR-based volatility, providing an instant quality assessment.
• 🎨 Strength-Based Color Scheme — breakout zones are colored by their power rank; stronger breakouts get darker, more prominent colors for immediate visual hierarchy.
• 🧠 Smart Pivot Structure Detection — automatically identifies the underlying pivot high/low structure that creates the breakout zone, ensuring the detected levels are based on significant market turning points.
• 📊 On-Chart Statistics — each breakout zone displays its direction (Bullish/Bearish) and its calculated strength score directly on the chart.
NQ
• 🧭 Full MTF Dashboard Display — provides a complete market overview across 7 timeframes (M1, M5, M15, M30, H1, H4, D1), showing the latest breakout signal, its strength, entry/SL/TP levels, and how many bars ago it occurred on that timeframe. The dashboard is stable and consistent regardless of the chart you are viewing.
• 🔔 Comprehensive Alerts — get notified the moment a new breakout occurs, with the alert message containing the full details: strength, entry, SL, and TP levels.
• ✅ Quality Control Filters — a user-configurable minimum strength score allows you to filter out weak, low-probability breakouts and focus only on high-quality signals.
• 🔧 Fully Customizable — control everything from the breakout lookback period and ATR multipliers for SL/TP to the visibility of the dashboard and on-chart visuals.
BTCUSD
• 🎯 Why this algo is unique: Standard breakout indicators often generate excessive false signals or repaint. This algorithm uses a multi-factor scoring system to quantify the quality of a breakout in real-time. It doesn’t just show you a breakout; it tells you how strong it is. The MTF dashboard provides a complete, stable cross-timeframe perspective that is impossible to achieve with standard indicators.
• 🚀 Apply to Gold (XAUUSD), Forex, Crypto, and Indices on any timeframe. The breakout lookback and minimum score settings allow it to adapt to anything from scalping to swing trading.
USDJPY
• 🎯 How to use this? Focus on trading opportunities from high-strength breakouts rated 7/10 or higher, as these have the highest probability of a significant follow-through. Use the dashboard to quickly identify which timeframes have active signals and use the on-chart visuals to analyze the breakout structure in detail.
• ⚠️ IMPORTANT NOTICE: This indicator is designed to identify high-probability breakout opportunities. It should NOT be used as a standalone signal for entering trades. Always use it in conjunction with your own trading strategy, price action analysis, and other technical indicators to confirm trade setups and manage risk.
Alerts Setup
To receive the detailed breakout alerts, follow these steps:
This single alert will trigger for any new Bullish or Bearish breakout detected by the script.
1.Click the "Alert" button in the top toolbar of PulseWire.
2.In the "Condition" dropdown, select "Strong Breakouts MTF".
3.In the second dropdown, choose "Any alert() function call".
4.Set "Expiration" to your desired time.
5.Click "Create".
Alerts Format
BULLISH BREAKOUT
Symbol : XAUUSD
Timeframe: 5
Strength : 7.4 / 10
Entry : 3185.50
SL : 3181.20
TP1 : 3189.80
TP2 : 3194.10
Bearish Breakout:
BEARISH BREAKOUT
Symbol : XAUUSD
Timeframe: 5
Strength : 6.1 / 10
Entry : 3178.30
SL : 3182.60
TP1 : 3174.00
TP2 : 3169.70 Indicator

Prev day High, Low, Close + continuing trend
📊 Yesterday's Levels: Market Strength and Sentiment (HLC)
This indicator is designed for intraday traders who need to quickly identify the previous day's key levels (High, Low, and Close) and, most importantly, understand the sentiment of the previous session at a glance.
🔍 What does this indicator do?
Unlike other “Daily High/Low” indicators, this tool cleans up historical noise and pre-market gapping to provide a purist view of the regular session.
Real Static Levels: Draws the YHP (Yesterday's High Price), YLP (Yesterday's Low Price), and YCP (Yesterday's Close Price).
No “Steps”: Lines only appear in the current session and start exactly at the market open (RTH), eliminating annoying pre-market tails.
Thirds Strength Analysis: Applies an algorithmic rule based on the location of the close relative to the previous day's total range:
Green Shading (Bullish Strength): If the price closed in the upper third of the range (dominant buying pressure).
Red Shading (Bearish Strength): If the price closed in the lower third of the range (dominant selling pressure).
No color: If the close was neutral (in the middle third).
### 💡 How to use it?
* **Trend Continuity**: If you see green shading and the price opens above the PDC, buyers are in control.
* **Reaction Levels**: The PDH and PDL act as natural support and resistance levels where institutions tend to make decisions.
* **Session Filter**: Ideal for avoiding “traps” during the pre-market, as the indicator only activates when real liquidity begins.
### 🛠 Technical Features
* **Optimized for MSTR and volatile assets**: Filters weekend gaps to maintain data accuracy.
* **Dynamic Tags**: Level names automatically scroll to the right so as not to obstruct the candles.
* **Clean Code**: Written in Pine Script v5 with corrected `lookahead` logic to avoid repainting.
Indicator

Strong SR Zones | ProjectSyndicateStrong SR Zones automatically identifies and power-ranks high-probability support and resistance levels by clustering historical pivots. It filters for quality, calculates a 0-10 strength score for every zone based on age, touches, and historical performance win rate, and presents all data on the chart and in a comprehensive dashboard to eliminate clutter and focus on levels that matter.
• 🎯 Power-Ranking System (0-10) — every S/R zone is given a strength score based on total touches, age, and its historical bounce-vs-break "win rate" for instant quality assessment.
• 🎨 Strength-Based Color Scheme — zones are colored by their power rank stronger zones get darker, more prominent colors for immediate visual hierarchy.
• 🧠 Smart Pivot Clustering — automatically merges nearby pivot highs and lows into single, consolidated S/R zones to reduce chart noise and reveal true institutional levels.
• 📊 In-Zone Statistics — each zone displays its price, total touches, age in bars, strength score, average bounce size in pips, and historical win rate directly on the chart.
• 🧭 Full Dashboard Display — provides a complete market overview, including the current trading session, volatility state, and a list of all active support and resistance zones with their strength and distance from the current price.
• 🔔 Comprehensive Alerts — get notified when price approaches any S/R zone, with special alerts for high-strength zones rated 7/10 or higher, ensuring you never miss a key level interaction.
• ✅ Quality Control Filters — user-configurable inputs for pivot lookback, minimum touches, and a lookback period of up to 5000 bars allow for deep customization to match any trading style.
• 🔧 Fully Customizable — control everything from the max number of levels shown and zone width to the text size of all labels and dashboard elements.
• 🎯 Why this algo is unique: Standard pivot indicators flood the chart with dozens of meaningless lines. This algorithm intelligently filters, merges, and ranks them. It doesn't just show you where support and resistance was, it quantifies how strong it is based on historical performance, giving you a clear edge. You instantly see which levels have a proven history of holding and which are likely to break.
• 🚀 Apply to Gold (XAUUSD), Forex, Crypto, and Indices on any timeframe. The lookbackBars and minTouches settings allow it to adapt to anything from scalping to swing trading.
• 🎯 How to use this? Focus on trading opportunities around high-strength zones rated 7/10 or higher as these have the highest probability of producing a significant reaction. Use the dashboard to quickly identify the most immediate S/R levels and the alerts to prepare for potential entries or exits.
• ⚠️ IMPORTANT NOTICE: This indicator is designed to identify high-probability support and resistance zones. It should NOT be used as a standalone signal for entering trades. Always use it in conjunction with your own trading strategy, price action analysis, and other technical indicators to confirm trade setups and manage risk.
Indicator

Indicator

Mean Deviation Trend [BackQuant]Mean Deviation Trend
Overview
Mean Deviation Trend is a structure-based trend and regime indicator that measures directional pressure as the market’s sustained deviation from a moving “mean,” then uses that pressure to drive an adaptive band , dynamic coloring, and a level engine that marks deviation peak extremes after momentum fades.
Most trend tools start with direction, for example slope or MA cross, then try to estimate strength later. This script does the reverse:
It first quantifies how far price is displaced from a central mean in volatility-adjusted units .
It then smooths and accumulates that deviation to determine trend direction and conviction .
Finally it converts conviction into a band that tightens when pressure is strong and widens when pressure is weak.
The result is a single framework that blends:
A mean anchor (EMA).
A signed deviation engine normalized by ATR.
A conviction score based on sustained deviation.
An adaptive band that behaves like dynamic support/resistance.
A “deviation peak” level system that plants levels at extremes after the push fades.
Optional glow, fills, candle coloring, and flip markers.
Core concept: deviation from mean as trend fuel
A trend is not just “price up” or “price down.” A trend is a persistent imbalance where price spends time displaced from fair value and keeps re-asserting that displacement. This indicator treats the mean as a moving fair value proxy, and it measures how aggressively price is departing from it.
Key idea:
If price stays above the mean and that displacement is sustained, bullish pressure is dominant.
If price stays below the mean and that displacement is sustained, bearish pressure is dominant.
If price keeps snapping back and deviation cannot sustain, regime is weak and uncertainty is high.
This is why the script doesn’t rely on a single moment like a cross. It cares about persistence .
Mean anchor (the “center of gravity”)
The mean is defined as an EMA of close:
mean = EMA(close, meanLen)
Why EMA:
It responds faster than SMA to regime changes.
It provides a stable anchor without overreacting to single bars.
The mean line is not just a moving average here, it is the reference line that deviation is measured against. Everything downstream depends on the mean being a consistent “center.”
Volatility normalization (why ATR is essential here)
Raw distance from mean is meaningless across volatility regimes. A $200 deviation on BTC might be noise one week and huge another week. To fix this, the script normalizes deviation by ATR:
atr = ATR(14)
rawDev = (close - mean) / atr
Interpretation:
rawDev is “how many ATR units price is away from the mean.”
This makes deviation comparable across timeframes and volatility states.
This is critical because it turns the indicator into a dimensionless pressure metric rather than a price-distance tool.
Deviation smoothing (instantaneous pressure vs noisy pressure)
Instantaneous deviation can spike on one candle and mean nothing. So the script applies EMA smoothing to raw deviation:
devSmooth = EMA(rawDev, devLen)
What this does:
Reduces single-bar spikes.
Keeps the sign and general magnitude of displacement.
Creates a cleaner “pressure line” that responds but does not jitter.
This is the first stage of filtering: “Are we meaningfully deviating, or just wicking?”
Deviation accumulation (turning pressure into conviction)
This is the part that makes the indicator behave like a trend conviction model rather than a simple oscillator.
The script computes:
cumDev = SMA(devSmooth, devAccum)
Even though it’s coded as an SMA, conceptually it behaves like a rolling accumulation of the deviation signal:
If devSmooth stays positive for multiple bars, cumDev rises and stays positive.
If devSmooth stays negative for multiple bars, cumDev drops and stays negative.
If devSmooth flips sign repeatedly, cumDev compresses toward zero.
This is the key “persistence detector.” It converts short-term deviation into a medium-term conviction read.
Trend direction and flips
Trend direction is derived purely from the sign of cumulative deviation:
tDir = cumDev > 0 ? +1 : -1
flip = tDir != tDir
Interpretation:
Bull regime means the market’s sustained deviation is above the mean (pressure up).
Bear regime means sustained deviation is below the mean (pressure down).
A flip marks a regime transition where the sustained bias changes sign.
This is intentionally simple because all the complexity is in how cumDev is built.
Measuring conviction: devNorm (adaptive strength scale)
The script measures absolute conviction:
devAbs = abs(cumDev)
Then it normalizes it relative to a rolling peak:
devHigh = highest(devAbs, 80)
devNorm = devHigh > 0 ? min(devAbs / devHigh, 1) : 0
Meaning:
devNorm is a 0..1 strength scale.
0 means current conviction is tiny relative to recent extremes.
1 means conviction is at the strongest level seen in the last ~80 bars.
This is not a z-score, it’s a “relative-to-recent-peak” normalization. That matters because it makes the band behavior adapt to each instrument’s recent character, not a fixed threshold system.
Adaptive band logic (tight when confident, wide when uncertain)
The band is built to behave differently depending on conviction. When conviction is strong, the band should hug price and act like a close structural guide. When conviction is weak, the band should widen and stop pretending it is precise.
This is done by interpolating between two ATR multipliers:
bandTight = ATR multiplier when devNorm is high
bandWide = ATR multiplier when devNorm is low
bandMult = bandWide - devNorm * (bandWide - bandTight)
bandW = atr * bandMult
Interpretation:
devNorm near 1 → bandMult approaches bandTight → band width shrinks.
devNorm near 0 → bandMult approaches bandWide → band width expands.
So the band width is not arbitrary. It is a direct function of trend conviction.
Active band placement (trend-aware support/resistance)
The “active band” is placed on the opposite side of the mean depending on direction:
If bullish: activeBand = mean - bandW
If bearish: activeBand = mean + bandW
So in bullish regimes, the band behaves like a dynamic support zone beneath the mean. In bearish regimes, it behaves like dynamic resistance above the mean.
Then it is smoothed:
activeBand = EMA(activeBand, 3)
This prevents the band from stepping too harshly when ATR shifts.
Outer band (secondary structure reference)
A second band is created at half width on the opposite side:
bull: outerBand = mean + bandW * 0.5
bear: outerBand = mean - bandW * 0.5
Then smoothed again. This outer line is not the main “stop band,” it is more of an additional structure marker to show where the mean plus/minus partial deviation zone sits. It can help visually gauge whether price is extended relative to the mean structure while still in the same regime.
Color system (strength-aware gradient)
The trend color is not binary. It is strength-weighted:
If bullish, devNorm drives a gradient from a faint bull tint to full bull.
If bearish, devNorm drives a gradient from a faint bear tint to full bear.
This gives you an immediate read:
Bright strong color = conviction high.
Faded color = conviction low, regime fragile.
It also ties into the glow and fill so the whole visual language matches the same underlying “pressure” variable.
Deviation peak level engine (how the script plants levels)
This indicator includes a separate mechanism that marks important extremes after a strong deviation push fades. The idea is:
When trend pressure peaks and then collapses, the extreme price printed at peak deviation often becomes a reaction level later.
This is similar in spirit to:
exhaustion extremes,
climactic deviation points,
distribution/accumulation turning zones,
but the script formalizes it using the deviation engine.
1) Track the strongest deviation peak
The script stores a running peak:
peakDev: maximum devAbs seen since last reset
peakPrice: the extreme price at that peak (high for bull, low for bear)
peakDir: direction at peak
peakBar: bar index of peak
When devAbs prints a new high, it updates those values.
2) Define “fade” (momentum has cooled)
A fade event triggers when:
peakDev is meaningfully large (peakDev > 0.3)
current devAbs drops below a fraction of the peak: devAbs < peakDev * fadeThr
fadeThr is the key user control. Lower fadeThr requires a deeper drop from peak before planting a level.
What “fade” means in practice:
A strong push happened (deviation expanded).
That push is no longer active (deviation contracted).
So the extreme created during the push is now “locked in” as a candidate level.
3) Plant a level at the extreme
When faded:
A dashed horizontal line is created at peakPrice.
The line is projected forward (bar_index + 60).
It is stored in an array with direction and retest state.
It also respects maxLvls by deleting the oldest levels to avoid clutter.
4) Maintain levels and delete invalid ones
Each bar, levels are checked:
If price breaks far beyond the level (by about 2 ATR in the wrong direction), the level is deleted.
That “broken” rule is a pragmatic invalidation filter. If price rips through a former deviation extreme by a large margin, the level is no longer acting like a meaningful reaction zone.
5) Detect retests and mark them
A retest is detected when:
close is within ~0.25 ATR of the level,
and two bars ago price was not near it (distance > 0.5 ATR),
and the level hasn’t already been marked as retested.
When that happens:
A diamond marker is printed (◆) above or below depending on approach.
The level is flagged as retested so it won’t spam markers.
So levels are not just static drawings. They have state: naked vs retested, and they get culled if invalidated.
Glow system (volatility-scaled aesthetic, strength-scaled intensity)
Glow is not random decoration here. Its width scales with devNorm:
glowMult = 0.4 + devNorm * 1.2
glowW = atr * 0.08 * glowMult
So in strong trends:
Glow band expands.
The mean core visually “radiates” more.
In weak trends:
Glow shrinks and becomes less prominent.
The glow is built using multiple invisible plots above and below the mean, then layered fills with different transparencies. It creates a soft gradient aura around the mean that encodes strength.
Band fill and line break behavior
The active band is plotted with plot.style_linebr and forced to break on flips:
bandBrk = flip ? na : activeBand
This prevents the band from drawing a misleading connecting line across a regime change. It visually resets when direction flips, which matters because the band swaps sides of the mean when regime changes.
Fill is drawn between:
the active band line
and hl2 (mid-price reference)
So you get a shaded zone that reflects the current regime color and strength.
Candles and flip labels
Candles can be colored by the same strength-weighted regime color, which makes the entire chart consistent.
On flips:
Bull flip prints ▲ at the low.
Bear flip prints ▼ at the high.
These are regime markers, not “entry signals” by default. They simply identify when the cumulative deviation sign changed.
How to read this indicator in practice
1) Regime and conviction
Direction comes from cumDev sign.
Conviction comes from devNorm intensity.
Bright color + stable band on one side means strong sustained pressure.
Faded color + widening band means weak sustained pressure and higher uncertainty.
2) Using the active band as structure
In a bullish regime, activeBand is below mean and can behave like:
dynamic support,
risk boundary,
trend “line in the sand.”
In bearish regime, it flips above mean and acts like dynamic resistance.
Because the band widens when conviction is low, it naturally tells you “do not treat this as a tight stop zone when the trend is weak.”
3) Using deviation peak levels
Peak levels represent exhaustion extremes after a strong deviation impulse faded:
If price returns to a naked level, that area can act as a reaction zone.
Once retested, the script marks it and treats it as less “special.”
If price breaks it by a wide margin, the script removes it as invalid.
This level engine is best viewed as “structural memory of deviation events,” not generic support/resistance.
4) Extreme deviation alert
devNorm > 0.85 means the current sustained deviation is near the strongest seen recently. That’s useful for:
identifying trend climax states,
detecting when continuation is strong but risk of snapback rises,
flagging conditions where mean reversion pressure is building.
It does not guarantee reversal, it flags “stretch.”
Inputs and what they actually change
Mean Length (meanLen)
Controls the anchor responsiveness:
Lower = mean follows price more closely, deviation shrinks, more frequent flips.
Higher = mean is slower, deviation grows, trend regimes last longer.
Deviation Smoothing (devLen)
Controls how noisy the deviation signal is:
Lower = faster response, more jitter.
Higher = smoother pressure, slower flips.
Deviation Accumulation (devAccum)
Controls persistence requirement:
Lower = trend conviction reacts quickly but can whipsaw.
Higher = requires sustained deviation, fewer flips, more confirmation.
Band Tight / Band Wide
These define the band behavior range:
bandTight: how close the band gets when conviction is strong.
bandWide: how far it drifts when conviction is weak.
If you want the band to behave more like a stop guide, reduce bandWide. If you want it to act more like a regime boundary, increase bandWide.
Fade Threshold + Max Levels
These shape the level engine:
fadeThr lower = requires bigger cooling before planting levels (fewer, more meaningful).
fadeThr higher = plants levels earlier (more levels, more noise).
maxLvls controls clutter and historical depth.
Alerts (what they represent)
Dev Bull / Dev Bear: regime flips, cumulative deviation changed sign.
Dev Faded: a deviation peak cooled enough to plant a level.
Extreme Dev: sustained deviation is near local maximum, stretch condition.
Summary
Mean Deviation Trend models trend as sustained, volatility-normalized displacement from a mean rather than simple direction. It smooths and accumulates signed deviation to extract regime and conviction, then converts that conviction into an adaptive ATR band that tightens when pressure is strong and widens when pressure is weak. On top of that, it tracks deviation peak extremes and plants forward levels only after deviation fades, creating a structured map of “where trend impulses peaked” and how price reacts when those zones are revisited. Indicator

Absorption ReversalAbsorption Reversal detects institutional absorption patterns at the extremes of a trading range. When price reaches a range boundary, large limit orders from institutional players can "absorb" aggressive market orders — this creates a characteristic candle with high volume and a long rejection wick. The indicator identifies these setups and waits for confirmation before signaling a reversal.
Free & Open Source — no invite-only access, no paywall. Full source code, fully transparent.
## The Concept: What Is Absorption?
In order flow terms, absorption occurs when resting limit orders at a price level absorb incoming market orders without allowing price to break through. This is a core concept in Wyckoff analysis (Effort vs. Result) and institutional trading:
- High volume (Effort) + small price movement / long wick (no Result) = absorption
- The wick shows that price was pushed to the extreme but immediately rejected
- This typically happens at range boundaries where institutional players defend levels
The indicator automates this detection process with quantifiable rules.
## How It Works
The signal generation follows a strict 6-step process:
Step 1 — Range Detection: A Donchian Channel (highest high / lowest low) defines the current trading range boundaries.
Step 2 — Range Width Filter: The channel width must be below its own average — confirming the market is sideways/contracting, not expanding into a trend.
Step 3 — ADX Trend Filter: Wilder's ADX must be below the threshold (default 25) — no strong trend active. Absorption setups work best in range-bound markets.
Step 4 — Proximity Check: Price must be in the upper or lower proximity zone of the range (default: outer 15%). Absorption in the middle of a range is meaningless.
Step 5 — Absorption Bar: A candle that shows:
- Volume spike (default 1.5x average — significant participation)
- Long rejection wick (default 66% of candle range — strong rejection)
- Located at the range extreme (within proximity zone)
Step 6 — Confirmation: Within the next N bars (default 3), a follow-up candle must close back inside the range in the expected reversal direction. No confirmation = no signal.
## Chart Elements
- Range Lines — Donchian Channel upper (red) and lower (green) boundaries
- Proximity Zones — Optional shaded areas showing where absorption signals can trigger
- Orange Diamonds — Absorption bars detected (before confirmation)
- Green/Red Triangles + BUY/SELL Labels — Confirmed reversal signals only
## Dashboard
The real-time dashboard displays:
- Market Regime — Range or Trending (based on ADX + channel width)
- ADX Value — Current trend strength with classification
- Range Width — Contracting or Expanding
- Position — Where price sits in the range (Near High / Near Low / Middle)
- Volume — Current volume relative to average + spike detection
- Pending — Active absorption bars awaiting confirmation (with countdown)
## Settings
Range Detection: Donchian Channel Length (default 20), Proximity Zone % (default 15%)
Trend Filter: ADX Filter ON/OFF (default ON), Range Width Filter ON/OFF (default ON)
Absorption Criteria: Min Wick/Range Ratio (default 0.66), Volume SMA Length (default 20), Volume Spike Multiplier (default 1.5x)
Confirmation: Max Confirmation Bars (default 3)
## Alerts
4 alert conditions:
- Absorption Buy Signal — confirmed bullish reversal at range low
- Absorption Sell Signal — confirmed bearish reversal at range high
- Bullish Absorption Detected — absorption bar found, awaiting confirmation
- Bearish Absorption Detected — absorption bar found, awaiting confirmation
## Best Used For
- Identifying high-probability reversal setups at range boundaries
- Spotting institutional absorption activity via volume + wick analysis
- Range-trading strategies with clear entry signals
- Confluence tool alongside other indicators
- Works on all instruments: stocks, forex, crypto, futures, indices
## Technical Notes
- Pine Script v6 (latest version)
- Signals on confirmed bars only — no repainting
- State-based confirmation logic
- Open source, no external dependencies
- All inputs have tooltips
## Disclaimer
This indicator is for educational and informational purposes only. It does not constitute financial advice. No signals should be interpreted as buy or sell recommendations. Past performance is not indicative of future results. Always implement proper risk management. Trade at your own risk. Indicator

Indicator

Indicator

Volume Profile S/R Zones (Peaks)Volume Profile S/R Zones (Peaks) is a volume-profile based support/resistance tool that converts significant volume nodes into tradable zones, then ranks them by how consistently price respected them over the selected lookback.
The script builds a rolling Volume Profile over a user-defined window (default 81 days) using a fixed number of price bins (default 33 rows). For each price bin it accumulates:
Total volume traded inside that price region
Bullish volume (lower-timeframe bars that close above open)
Bearish volume (implied as total − bullish)
The profile is plotted on the left side of the chart. All profile elements and zones are intentionally forced to a single clean style: white at 20% opacity (labels keep the chart’s default text color styling).
What it detects
1) High Volume Nodes (Peaks)
The script scans the profile rows and detects local maxima (HVNs). To prevent noisy “micro peaks,” a peak must pass two quality filters:
Relative-to-Max filter: peak volume must be at least a % of the largest node’s volume
Prominence filter: peak volume must exceed the average of nearby nodes by a minimum ratio
These filters remove weak nodes and keep only meaningful price areas where the market traded heavily.
2) Optional Low Volume Nodes (Troughs / LVNs)
When enabled, the script also detects local minima (LVNs). LVNs can behave like “barrier” areas where price rejects or moves quickly through.
Zones instead of lines
Each detected node becomes a zone, not a single price line.
Zone center = middle of the profile row
Zone thickness is adaptive:
Zone Half-Width = max(price bin size, ATR × fraction)
This makes zones robust to volatility and reduces “false breaks” caused by small wicks.
Zone merging (reduces clutter)
Nodes close to each other are merged into a single zone if their centers are within:
Merge Distance = ATR × fraction
The merged zone center becomes volume-weighted, so stronger nodes dominate.
Reliability scoring (the core feature)
Every zone is scored by replaying price interaction over the lookback window:
Events
Touch: candle range intersects the zone
Valid rejection: touch + close exits the zone in the expected direction
Confirmed break: close outside the zone, confirmed by:
distance beyond the zone (ATR-based), or
a minimum number of consecutive closes outside
Scoring
Touch adds points
Rejection adds more points
Confirmed break subtracts points
A decay factor is applied each bar so older interactions matter less than recent ones
This produces a practical ranking: zones that get repeatedly respected score high; zones that fail score low.
What you see on the chart
Left-side Volume Profile (white 20% opacity)
Top N strongest zones (ranked by score), drawn as horizontal bands across the chart
Right-side price labels showing each zone’s center price
Label tooltip includes:
zone center price
reliability score
current “role” (support-side vs resistance-side)
polarity bias (bull/bear/neutral based on volume delta)
Inputs and how to tune
Volume Profile
Profile Lookback (Days): defines market memory (short = tactical, long = structural)
Rows: resolution of price bins (higher = more detailed, lower = smoother)
Profile Width: visual width of the profile histogram
POC mode: optional regular or developing POC line
Zones
Top N Zones: limits clutter by plotting only the strongest zones
ATR Length / Zone Half-Width: controls how wide zones are
Prominence / Relative-to-Max: controls strictness of peak detection
Merge Distance: merges nearby zones into one
Scoring
Touch / Rejection / Break points
Decay factor (higher = longer memory)
Break confirmation settings (ATR distance + consecutive closes)
How to use (practical framework)
This indicator is designed to treat volume nodes as acceptance/rejection areas, not perfect lines:
Focus on high-score zones (they have the most recent evidence of being respected)
Use zones as:
potential accumulation/defense areas (support-side)
potential supply/ceiling areas (resistance-side)
Break confirmation is ATR-based to reduce false breakdowns/breakouts
For investing, many users run two instances:
long lookback (e.g., 252 days) for macro zones
shorter lookback (e.g., 81 days) for tactical entries
Notes / Limitations
The script is a historical structure tool, not a predictor.
Zones can shift gradually as the rolling lookback window updates.
Different assets (high volatility vs low volatility) may require different row counts and filter strictness.
License / Credits
Based on LuxAlgo’s Volume Profile foundation and heavily modified to add zone construction, merging, and reliability scoring.
Licensed under CC BY-NC-SA 4.0 (Attribution–NonCommercial–ShareAlike). Indicator

Mouchli Zone Projection ToolZone Projection Tool
The Problem: Manually drawing zones is tedious. You have to identify the consolidation, measure the distance, find the 50% line, and then manually clone/stack boxes up and down the chart. If you switch assets or timeframes, you have to do it all over again.
The Solution: This custom Pine Script automates the entire mathematical process. You simply define your two "Anchor Zones" (current support and resistance), and the script instantly builds the entire grid for you—perfectly spaced and optimized.
Key Features:
⚡ Automated Stacking: Input your bottom zone and top zone. The script calculates the exact center, determines the "grid step," and automatically projects zones UP and DOWN the chart.
📊 Multi-Asset Manager: Save your levels for up to 5 different assets (e.g., QQQ, ES, NVDA, SPY, BTC) in one single indicator. The script is smart—it automatically detects which chart you are looking at and loads the correct levels instantly.
🗓️ Daily & Weekly Overlays: Input both Daily Zones (Purple) and Weekly Zones (Orange) for the same asset. You can view them simultaneously to see where short-term and long-term structures overlap.
🎛️ Toggle Controls: Includes "Show/Hide" checkboxes for every zone set. Want to focus only on the Daily levels? Uncheck the Weekly box, and they disappear instantly without deleting your data.
📍 The "Halfway" Line: Automatically calculates and draws the dashed 50% transition line between every zone, identifying the "no-man's-land" where price often pivots.
How it works:
Add the indicator to your chart.
Open the Settings (gear icon).
Select your Ticker (e.g., Asset 1 = QQQ).
Enter your "Anchor" prices for Zone 1 (Support) and Zone 2 (Resistance).
Set your Projection UP and Projection DOWN counts to determine how far the grid extends.
The script will automatically draw the 50% lines and project the zones for you.
Indicator

Visual Trading ZonesVisual Trading Zones is a chart-based indicator designed to display clear and structured price zones using evenly spaced levels.
The indicator automatically builds horizontal zones across the visible price range and helps traders visually identify potential areas of interest such as support, resistance, and reaction zones.
Key Features
Displays horizontal price zones with a fixed step
Optional main levels and sub-levels inside each zone
Clean and minimal visual presentation
Works on any market and timeframe
Fully customizable colors, line styles, and zone transparency
No signals, no alerts — purely visual analysis tool
How It Works
Price zones are constructed using a user-defined step size.
Each zone is visually highlighted, allowing traders to quickly see how price interacts with these areas over time.
The indicator does not repaint and does not generate trading signals.
It is intended to be used as a visual framework alongside any trading strategy.
Recommended Use
Identifying potential support and resistance zones
Market structure and range analysis
Confluence with price action, indicators, or volume tools
⚙️ Settings Overview
Step — distance between price zones
Step Unit — ticks or pips (for FX instruments)
SubLevels — number of internal levels within each zone
Show Zones / Lines / Prices — visual display options
Range Bars — number of bars used to build zones
Style Settings — colors, line styles, transparency Indicator

Auction Weighted Support and Resistance [Metrify]This script builds an “auction-weighted” S/R map that’s intentionally closer to a microstructure proxy than a classic “draw pivots → draw lines” approach.
The core idea: treat repeated interactions around the same price as evidence of auction behavior (acceptance vs rejection), then compress that behavior into a small set of ranked horizontal zones per horizon. Instead of outputting dozens of levels, it runs a selection pass to keep only the strongest, spatially distinct levels.
Candidate discovery is pivot-driven, but not used naively. The script collects pivot highs/lows into rolling buffers for three horizons (Micro/Short/Medium) with different pivot lengths and memory caps. Those candidates don’t become “levels” directly; they’re just seeds that get clustered and rescored. Clustering is ATR-normalized (distance measured in ATR multiples), so the same logic doesn’t fall apart when you change symbol volatility or timeframe. Each horizon has its own clustering radius (distATR_micro/short/medium), which makes Micro more granular and Medium more tolerant.
The “weight” you see is not a single metric. It’s a composite score that tries to approximate how meaningful a price is in an auction sense:
Touch count (distinct): interactions are counted only when the candle range gets within a near-band threshold (ATR-normalized), and then gated by minimum bar separation so you don’t get spam from chop printing 20 touches in a row. (this is done with a stride-based loop to avoid blowing runtime on deep lookbacks)
Acceptance: a rolling overlap rate of candle ranges inside the box. It’s exponentially weighted (half-life decay), so recent acceptance matters more, but older acceptance still contributes. If price has been “living” around that level, acceptance rises.
Rejection quality: wick-aware rejection, but range-gated (not close-gated). The scoring looks at whether the candle range overlaps/approaches the level, then measures wick dominance on the rejecting side plus where the close sits inside the bar range.
Age decay: older levels aren’t thrown away automatically, but they get downweighted via an exponential decay term so stale structure doesn’t dominate forever.
Those components get combined by f_weightCompose() into a bounded weight using saturating transforms (so touches don’t scale linearly forever) and a decay factor tied to age. When multiple candidates land in the same cluster, the merge is done with a saturating union on weights (1 - (1-oldW)*(1-wAdd)) rather than simple addition, so weights don’t explode and a level can converge toward 1.0 without becoming meaningless. The cluster center price is updated via a weight-based average to prevent random drift from weak additions.
After clustering, we does an explicit selection pass instead of drawing everything. First it filters by minScore, then sorts by weight, then applies a spatial suppression step (basically NMS for horizontal levels). The minimum spacing is ATR-based and incorporates both a horizon spacing floor and the zone thickness, so you don’t end up with two bands that overlap visually or convey the same information. On top of that, there’s a global cross-horizon collision gate (f_canDraw) so Medium zones can coexist with Short/Micro without the chart turning into a layered fog of rectangles.
Visualization is intentionally “zone-first.” Each selected level becomes a box band whose half-thickness is ATR-scaled per horizon (bandThicknessATR_*). Opacity isn’t linear: it normalizes weight above minScore, applies a power curve to compress mid-range values, and also scales relative to the strongest level in that horizon (so you still get contrast when everything is “kind of strong”).
The pressure overlay is not volume-based and not orderflow (pine can’t read L2), but it tries to expose short-term imbalance while price is inside a band. When the last price is inside a zone, it computes a pressure score from two parts: proximity to the center (closer = higher) and a directional imbalance proxy from recent returns sampled only on bars that intersect the band. It then draws two thin lines at the band edges with alpha proportional to that pressure score. This is meant as a “are we being pushed out or absorbed here” hint (not a prediction engine).
If you enable the audit panel, the script builds a table listing the levels that actually got drawn (post-selection + collision filtering). The columns map directly to the internal metrics (weight, touches, acceptance, rejection), so you can sanity-check why a level exists. Level IDs are horizon-prefixed (MC/ST/MD) and assigned based on ranking within each horizon.
note:
rebuild is throttled (rebuildEveryN) and only runs on the last bar. Loops that can go deep use a stride heuristic (1/2/4) to keep runtime predictable on large lookbacks. Arrays are used as bounded buffers for candidate storage, and drawing objects are aggressively deleted/rebuilt to avoid object leaks. Indicator

Indicator

Intraday Refuges/Shelters (RID)==========================================
RID (INTRADAY SHELTERS/REFUGES) INDICATOR
==========================================
*Fair warning: this may be more words than a humble, simple indicator truly
needs… but Claude insisted.
// ** INTRODUCTION ** //
RID (Intraday Shelters/Refuges) is a lightweight, fast, and easy-to-implement
indicator designed for monitoring price action on intraday timeframes — the same
ones used by institutional operators to execute their trades within each market session.
The indicator generates a framework of support and resistance levels automatically
calculated from the asset's Daily Opening Price (D.O.P.). These levels are established
using fixed percentages that have proven their effectiveness in institutional trading
for decades, constituting "textbook" references widely adopted by market professionals.
RID integrates as an optional module within our Weekly Shelters (RS) indicator, allowing
the operator to simultaneously control their weekly positions and, when conditions warrant,
move down to intraday operations without loading additional indicators or losing sight
of the higher timeframe.
// ** INDICATOR FUNDAMENTALS ** //
The foundation of RID rests on a proven market principle: the daily opening price acts
as a "psychological anchor" that influences participant behavior throughout the entire session.
Why does this method work?
• UNIVERSAL REFERENCE POINT: The daily opening price is objective data, visible to all
market participants simultaneously. Institutions, algorithms, and retail traders use it
as a common reference to calibrate their decisions.
• STANDARD PERCENTAGE LEVELS: The percentages used (0.382%, 1.0%, 1.5%, 2.0%, 2.5% and
extensions) are not arbitrary. They represent intraday volatility thresholds that have
historically acted as inflection points across multiple asset classes.
• SELF-FULFILLING PROPHECY EFFECT: When a critical mass of operators place orders at the
same percentage levels —whether for profit-taking, protective stops, or entries—
these levels become high-probability price reaction zones.
• INSTITUTIONAL RISK MANAGEMENT: Institutional trading desks frequently define their daily
loss limits and profit targets in percentage terms relative to the open. RID captures
this logic and makes it visible for retail operators.
The ±0.382% level deserves special mention: it's a derivation of the Fibonacci golden ratio
(0.382) applied to the intraday context, representing the first significant movement threshold
from the opening.
// ** INDICATOR OBJECTIVES ** //
1) Facilitate manual intraday trade execution by providing a framework of target prices
established under a scheme of mathematical certainty, eliminating subjectivity in
defining entries, exits, and stops.
2) Serve as a lightweight and modular tool, easily integrable —either as an overlay or
source code— with strategies and indicators specialized in intraday trade execution,
both manual and automated.
3) Provide a visual reference framework that allows the operator to quickly assess the
intraday market "temperature": Is price near a key support or resistance? Has it already
reached the session's typical movement target? Is it time to seek entries or protect profits?
// ** INDICATOR TECHNICAL FEATURES ** //
• 21 CONFIGURABLE LEVELS: 11 main levels (±0.382%, ±1.0%, ±1.5%, ±2.0%, ±2.5% and D.O.P.)
plus 10 extended levels (±3.0% to ±5.0%) for high volatility sessions. Each level can
be individually enabled or disabled according to operator needs.
• AUTOMATIC D.O.P. DETECTION: The indicator automatically identifies the start of each daily
session and captures the opening price without user intervention.
• CONFIGURABLE HISTORY LIMIT: Option to limit processing to the last N days (default: 3),
optimizing performance on very low timeframes (1m, 5m) where excess historical data can
slow down the chart.
• PROFESSIONAL VISUALIZATION: Labels with formatted price (thousands separators) and
percentage, placeable with configurable offset. The D.O.P. level (0%) is highlighted
with differentiated width.
• VERTICAL REFERENCE LINES: From D.O.P. to each level, facilitating visualization of the
percentage distance traveled.
• FULL CUSTOMIZATION: Colors, widths, line styles (solid, dashed, dotted), label opacity,
and forward extension fully adjustable.
• PRICE SCALE INTEGRATION: Levels can be displayed on the right margin of PulseWire,
controllable from the indicator's Style tab.
• BAR REPLAY COMPATIBILITY: Works perfectly with Bar Replay for back-testing
intraday strategies.
• OPTIMIZED PERFORMANCE: Efficient architecture with persistent arrays and intelligent
updating, suitable for timeframes down to 1 minute.
// ** OPERATING INSTRUCTIONS ** //
INITIAL SETUP:
1) Load the indicator on a chart with 4H or lower timeframe (1H, 30m, 15m, 5m, 1m).
2) Enable "Limit history by days" and adjust "Maximum days to display" according to your needs:
• For scalping (1m-5m): 1-2 days
• For day trading (15m-1H): 2-3 days
• For intraday swing (4H): 3-5 days
OPERATIONAL USE:
3) Identify the D.O.P. (0% line): This is your central reference point for the session.
4) Observe current price position relative to levels:
• Price above D.O.P. → Session with bullish bias
• Price below D.O.P. → Session with bearish bias
5) Use levels as:
• ENTRIES: Look for reversal signals when price reaches S1-S5 (buys) or R1-R5 (sells)
• TARGETS: Set take-profits at the next resistance level (longs) or support (shorts)
• STOPS: Place protective stops beyond the immediate opposite level
PRACTICAL RULES:
6) The ±1.0% and ±2.0% levels are historically most respected; prioritize them.
7) If price exceeds ±2.5% from open, it might be time to take profits and close your position
or consider enabling extended levels (±3.0% to ±5.0%).
8) High volatility days (news, earnings): wait for price to respect at least one level
before trading in its direction.
9) Combine RID with other indicators from our ecosystem (RS, RMP, RLP/RLPS) to confirm level
confluence across multiple timeframes.
VISUAL OPTIMIZATION:
10) For clean charts: keep enabled only main levels (±0.382% to ±2.5%).
11) For detailed volatile asset analysis: also enable extended levels.
12) Adjust "Label margin" to prevent overlap with current price.
// ** INTEGRATION WITH OTHER SHELTER VALUE INDICATORS ** //
RID is part of a complete shelter-based analysis ecosystem we have developed:
• RLP (Long-Term Shelters): For automatic determination of the preponderant phase
of a Zigzag, which institutional investors choose as the base of a Fibo whose
levels calculate order placement projection over the following months and years.
• RLPS (Simplified Long-Term Shelters): Simplified version of RLP where known
coordinates of the preponderant phase are captured, obtained through own analysis
or automatically with the RLP indicator.
• RMP (Medium-Term Shelters): Provides psychological shelter and resistance levels
that institutional investors establish at the beginning of each year. They
constitute the main framework used by professionals to plan operations
throughout the year.
• RS (Weekly Shelters): For short-term tactical analysis (4H, 1H) based on selected
phases of one or two Zigzags that define Fibo tracing, over recent major and minor
degree pauses, whose levels take effect during the current and following weeks.
• RID (Intraday Shelters): This indicator. For intraday operations based on levels
calculated from daily opening price, designed for 4H or lower timeframes,
including scalping strategies.
By combining RID with RLP/RLPS, RMP and RS, a multilevel scaffolding is built that
allows trading with clarity on any time horizon, from minute positions to operations
projected over months and years.
// ** NOTES ** //
• All comments regarding detected errors and improvement suggestions are welcome and deeply appreciated. Your feedback helps us refine these tools.
• To our Hispanic speaking friends, we sincerely regret to inform you that we have not
included the Spanish translation in the published version, due to our latent concern
regarding the ambiguous rules about prohibitions on publishing indicators documented
or described in languages other than English.
• Sharing is motivating because there’s no better way to receive genuine feedback
of real acceptance.
• RECOMMENDED VALIDATION METHOD: Use PulseWire's Bar Replay to verify, session by
session, how price of your favorite asset interacts with RID levels. This personal
validation will give you statistical confidence before incorporating the indicator
into your actual trading.
Happy hunting in this magnificent jungle!
Indicator
