ATR Extension from Moving Average, with Robust Sigma Bands
# ATR Extension from Moving Average, with Robust Sigma Bands
**What it does**
This indicator measures how far price is from a selected moving average, expressed in **ATR multiples**, then overlays **robust sigma bands** around the long run central tendency of that extension. Positive values mean price is extended above the MA, negative values mean price is extended below the MA. The signal adapts to volatility through ATR, which makes comparisons consistent across symbols and regimes.
**Why it can help**
* Normalizes distance to an MA by ATR, which controls for changing volatility
* Uses the **bar’s extreme** against the MA, not just the close, so it captures true stretch
* Computes a **median** and **standard deviation** of the extension over a multi-year window, which yields simple, intuitive bands for trend and mean-reversion decisions
---
## Inputs
* **MA length**: default 50, options 200, 64, 50, 20, 9, 4, 3
* **MA timeframe**: Daily or Weekly. The MA is computed on the chosen higher timeframe through `request.security`.
* **MA type**: EMA or SMA
* **Years lookback**: 1 to 10 years, default 5. This sets the sample for the median and sigma calculation, `years * 365` bars.
* **Line width**: visual width of the plotted extension series
* **Table**: optional on-chart table that displays the current long run **median** and **sigma** of the extension, with selectable text size
**Fixed parameters in this release**
* **ATR length**: 20 on the daily timeframe
* **ATR type**: classic ATR. ADR percent is not enabled in this version.
---
## Plots and colors
* **Main plot**: “Extension from 50d EMA” by default. Value is in **ATR multiples**.
* **Reference lines**:
* `median` line, black dashed
* +2σ orange, +3σ red
* −2σ blue, −3σ green
---
## How it is calculated
1. **Moving average** on the selected higher timeframe: EMA or SMA of `close`.
2. **Extreme-based distance** from MA, as a percent of price:
* If `close > MA`, use `(high − MA) / close * 100`
* Else, use `(low − MA) / close * 100`
3. **ATR percent** on the daily timeframe: `ATR(20) / close * 100`
4. **ATR multiples**: extension percent divided by ATR percent
5. **Robust center and spread** over the chosen lookback window:
* Center: **median** of the ATR-multiple series
* Spread: **standard deviation** of that series
* Bands: center ± 1σ, 2σ, 3σ, with 2σ and 3σ drawn
This design yields an intuitive unit scale. A value of **+2.0** means price is about 2 ATR above the selected MA by the most stretched side of the current bar. A value of **−3.0** means roughly 3 ATR below.
---
## Practical use
* **Trend continuation**
* Sustained readings near or above **+1σ** together with a rising MA often signal healthy momentum.
* **Mean reversion**
* Spikes into **±2σ** or **±3σ** can identify stretched conditions for fade setups in range or late-trend environments.
* **Regime awareness**
* The **median** moves slowly. When median drifts positive for many months, the market spends more time extended above the MA, which often marks bullish regimes. The opposite applies in bearish regimes.
**Notes**
* The MA can be set to Weekly while ATR remains Daily. This is deliberate, it keeps the normalization stable for most symbols.
* On very short intraday charts, the extension remains meaningful since it references the session’s extreme against a higher-timeframe MA and a daily ATR.
* Symbols with short histories may not fill the lookback window. Bands will adapt as data accrues.
---
## Table overlay
Enable **Table → Show** to see:
* “ATR from \”
* Current **median** and **sigma** of the extension series for your lookback
---
## Recommended settings
* **Swing equities**: 50 EMA on Daily, 5 to 7 years
* **Index trend work**: 200 EMA on Daily, 10 years
* **Position trading**: 20 or 50 EMA on Weekly MA, 5 to 10 years
---
## Interpretation examples
* Reading **+2.7** with price above a rising 50 EMA, near prior highs
* Strong trend extension, consider pyramiding in trend systems or waiting for a pullback if you are a mean-reverter.
* Reading **−2.2** into multi-month support with flattening MA
* Stretch to the downside that often mean-reverts, size entries based on your system rules.
---
## Credits
The concept of measuring stretch from a moving average in ATR units has a rich community history. This implementation and its presentation draw on ideas popularized by **Jeff Sun**, **SugarTrader**, and **Steve D Jacobs**. Thanks to each for their contributions to ATR-based extension thinking.
---
## License
This script and description are distributed under **MPL-2.0**, consistent with the header in the source code.
---
## Changelog
* **v1.0**: Initial public release. Daily ATR normalization, EMA or SMA on D or W timeframe, robust median and sigma bands, optional table.
---
## Disclaimer
This tool is for educational use only. It is not financial advice. Always test on your own data and strategies, then manage risk accordingly.
指标和策略
EMA 5/25 Cross Signals with AlertsIt is EMA 5/25 Cross Signals with Alerts
So you can find Golden Cross and Dead Cross
Liquidity levels + Order BlocksThis script mark liquidity levels, and monthly, weekly and daily candle open. The order blocks indicator is on construction.
RSI Price overlay on chartThie Indicator plots buy and sell signals on the chart using the 28 period RSI with overbought areas at 65 and oversold at 35
ORB with Golden Zone FIB targets, Any Timeframe by TenAMTraderDescription:
This indicator is designed to help traders identify key price levels using Fibonacci extensions and retracements based on the Opening Range Breakout (ORB). The levels are visualized as “Golden Zones”, which can serve as potential targets for trades.
Features:
Customizable ORB Timeframe: By default, the ORB is set from 9:30 AM to 9:45 AM EST, but any timeframe can be configured in the settings to fit your trading style.
Golden Zones as Targets: Fibonacci levels are intended to be used as potential profit-taking zones or areas to monitor for reversals, providing a structured framework for intraday and swing trading.
Adjustable Chart Settings: Color-coded levels make it easy to interpret at a glance, and all lines can be customized for personal preference.
Versatile Application: The indicator works across any timeframe, enabling traders to analyze both intraday and multi-day price action.
How to Use:
Ensure Regular Trading Hours (RTH) is enabled on your chart for accurate level calculation.
Observe price action near Golden Zones: a confirmed breakout may indicate continuation, while a pullback could signal a reversal opportunity.
Use the Golden Zones as reference targets for managing risk and planning exits.
Adjust the ORB timeframe and display settings to match your preferred trading style.
Legal Disclosure:
This indicator is provided for educational purposes only and is not financial advice. Trading carries a substantial risk of loss. Users should always perform their own analysis and consult a licensed financial professional before making any trading decisions. Past performance is not indicative of future results.
PT FinderThis is mostly helpful to find potential price targets for Daytrades on the daily chart (if stronger resistances / supports are too far away).
Shows highs / lows of nearby "pivot" candles (higher high / lower low than both candles around) - depending on expected trade direction. Based on my experience these can be potential (albeit weak) resistance / support.
If it shows values only in the wrong trade direction: set a checkmark at "Invert bullish / bearish price targets" in the indicator settings
Also shows the ADR (blue line = yesterday's close MINUS Average Day Range) - which is helpful for Daytrades to see what price movement you could potentially expect for the day!
As a nice bonus it also shows gaps as yellow areas - in case you maybe missed them because you zoomed in / out too much on your daily chart.
More infos: www.reddit.com
Dual Adaptive Movings### Dual Adaptive Movings
By Gurjit Singh
A dual-layer adaptive moving average system that adjusts its responsiveness dynamically using market-derived factors (CMO, RSI, Fractal Roughness, or Stochastic Acceleration). It plots:
* Primary Adaptive MA (MA): Fast, reacts to changes in volatility/momentum.
* Following Adaptive MA (FAMA): A smoother, half-alpha version for trend confirmation.
Instead of fixed smoothing, it adapts dynamically using one of four methods:
* ACMO: Adaptive CMO (momentum)
* ARSI: Adaptive RSI (relative strength)
* FRMA: Fractal Roughness (volatility + fractal dimension)
* ASTA: Adaptive Stochastic Acceleration (%K acceleration)
### ⚙️ Inputs & Options
* Source: Price input (default: close).
* Moving (Type): ACMO, ARSI, FRMA, ASTA.
* MA Length (Primary): Core adaptive window.
* Following (FAMA) Length: Optional; can match MA length.
* Use Wilder’s: Toggles Wilder vs EMA-style smoothing.
* Colors & Fill: Bullish/Bearish tones with transparency control.
### 🔑 How to Use
1. Identify Trend:
* When MA > FAMA → Bullish (fills bullish color).
* When MA < FAMA → Bearish (fills bearish color).
2. Crossovers:
* MA crosses above FAMA → Bullish signal 🐂
* MA crosses below FAMA → Bearish signal 🐻
3. Adaptive Edge:
* Select method (ACMO/ARSI/FRMA/ASTA) depending on whether you want sensitivity to momentum, strength, volatility, or acceleration.
4. Alerts:
* Built-in alerts trigger on crossovers.
### 💡 Tips
* Wilder’s smoothing is gentler than EMA, reducing whipsaws in sideways conditions.
* ACMO and ARSI are best for momentum-driven directional markets, but may false-signal in ranges.
* FRMA and ASTA excels in choppy markets where volatility clusters.
👉 In short: Dual Adaptive Movings adapts moving averages to the market’s own behavior, smoothing noise yet staying responsive. Crossovers mark possible trend shifts, while color fills highlight bias.
Fisher (zero-color + simple OB assist)//@version=5
indicator("Fisher (zero-color + simple OB assist)", overlay=false)
// Inputs
length = input.int(10, "Fisher Period", minval=1)
pivotLen = input.int(3, "Structure pivot length (SMC-lite)", minval=1)
showZero = input.bool(true, "Show Zero Line")
colPos = input.color(color.lime, "Color Above 0 (fallback)")
colNeg = input.color(color.red, "Color Below 0 (fallback)")
useOB = input.bool(true, "Color by OB proximity (Demand below = green, Supply above = red)")
showOBMarks = input.bool(true, "Show OB markers")
// Fisher (MT4-style port)
price = (high + low) / 2.0
hh = ta.highest(high, length)
ll = ta.lowest(low, length)
rng = hh - ll
norm = rng != 0 ? (price - ll) / rng : 0.5
var float v = 0.0
var float fish = 0.0
v := 0.33 * 2.0 * (norm - 0.5) + 0.67 * nz(v , 0)
v := math.min(math.max(v, -0.999), 0.999)
fish := 0.5 * math.log((1 + v) / (1 - v)) + 0.5 * nz(fish , 0)
// SMC-lite OB
ph = ta.pivothigh(high, pivotLen, pivotLen)
pl = ta.pivotlow(low, pivotLen, pivotLen)
var float lastSwingHigh = na
var float lastSwingLow = na
if not na(ph)
lastSwingHigh := ph
if not na(pl)
lastSwingLow := pl
bosUp = not na(lastSwingHigh) and close > lastSwingHigh
bosDn = not na(lastSwingLow) and close < lastSwingLow
bearishBar = close < open
bullishBar = close > open
demHigh_new = ta.valuewhen(bearishBar, high, 0)
demLow_new = ta.valuewhen(bearishBar, low, 0)
supHigh_new = ta.valuewhen(bullishBar, high, 0)
supLow_new = ta.valuewhen(bullishBar, low, 0)
// แยกประกาศตัวแปรทีละตัว และใช้ชนิดให้ชัดเจน
var float demHigh = na
var float demLow = na
var float supHigh = na
var float supLow = na
var bool demActive = false
var bool supActive = false
if bosUp and not na(demHigh_new) and not na(demLow_new)
demHigh := demHigh_new
demLow := demLow_new
demActive := true
if bosDn and not na(supHigh_new) and not na(supLow_new)
supHigh := supHigh_new
supLow := supLow_new
supActive := true
// Mitigation (แตะโซน)
if demActive and not na(demHigh) and not na(demLow)
if low <= demHigh
demActive := false
if supActive and not na(supHigh) and not na(supLow)
if high >= supLow
supActive := false
demandBelow = useOB and demActive and not na(demHigh) and demHigh <= close
supplyAbove = useOB and supActive and not na(supLow) and supLow >= close
colDimUp = color.new(colPos, 40)
colDimDown = color.new(colNeg, 40)
barColor = demandBelow ? colPos : supplyAbove ? colNeg : fish > 0 ? colDimUp : colDimDown
// Plots
plot(0, title="Zero", color=showZero ? color.new(color.gray, 70) : color.new(color.gray, 100))
plot(fish, title="Fisher", style=plot.style_columns, color=barColor, linewidth=2)
plotchar(showOBMarks and demandBelow ? fish : na, title="Demand below", char="D", location=location.absolute, color=color.teal, size=size.tiny)
plotchar(showOBMarks and supplyAbove ? fish : na, title="Supply above", char="S", location=location.absolute, color=color.fuchsia, size=size.tiny)
alertcondition(ta.crossover(fish, 0.0), "Fisher Cross Up", "Fisher crosses above 0")
alertcondition(ta.crossunder(fish, 0.0), "Fisher Cross Down", "Fisher crosses below 0")
Avinacci LevelsThe Avinacci levels are based on Avi's(whop.com) reading of the 8am to 8:30am, 30mn candle. The script plots equidistant levels up and down from the high and lows of this 30mn period. It only works on the 30mn chart.
My script// This Pine Script® code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org
Stockbee LabelUnlock the full potential of your TradingView charts with this powerful indicator designed specifically for Stockbee methods. Instantly gain key market insights at a glance with a sleek, easy-to-read label displayed on your chart. This dynamic label provides critical data including Volume, Total Float, Market Capitalization, Trend Intensity, Average Daily Range (ADR), Half-Day Stop Loss level, and Modified Double Trouble (MDT) .
Elevate your trading strategy with real-time, essential metrics all in one place—streamlining your decision-making and boosting your confidence in the market.
Disclaimer: This indicator is inspired by and built upon the original concepts of Stockbee and EG.
Balance & Reversal Indicator [SYNC & TRADE]ndicator Description: "Balance & Reversal Indicator "
Purpose of the Indicator
The "Balance & Reversal Indicator " indicator is designed for analyzing market activity in cryptocurrency and other financial markets. It assists traders in identifying potential trend reversal points, detecting market equilibrium zones, and evaluating the balance between buying and selling volumes. The indicator is suitable for both short-term and long-term trading, offering flexible settings to adapt to various trading styles and timeframes.
What Does the Indicator Provide?
Volume Analysis: Calculates buy and sell volumes, along with the Long/Short Ratio, to assess current market dynamics.
Reversal Signals: Generates signals for potential Long (buy) and Short (sell) reversals based on customizable levels, ranging from "Potential Reversal" to "Maximum Signal."
Equilibrium Zones: Identifies zones where the market is in balance, useful for recognizing neutral market conditions.
Flexible Calculation Methods: Supports four volume calculation methods (Tick Based, Candle Based, Delta Based, Price Movement) to suit different trading approaches.
Auto and Manual Sensitivity: Offers "Auto" mode for timeframe-based sensitivity or "Manual" mode for custom sensitivity settings.
Data Visualization: Displays key metrics (total volume, buy/sell volumes, ratio, and percentages) via a comparison table and on-chart labels for easy interpretation.
Volume Unit Customization: Allows volume display in USDT, Active contracts, or other units for enhanced flexibility.
How to Use the Indicator?
Adding to the Chart:
Find "Balance & Reversal Indicator " in the TradingView library and add it to your chart.
The indicator appears in a separate panel below the chart, keeping price data unobstructed (overlay=false).
Configuring Settings:
Calculation Method: Choose one of four volume analysis methods:
Tick Based: Analyzes price movement within a candle.
Candle Based: Evaluates candle direction (up/down).
Delta Based: Considers the difference between open and close prices.
Price Movement: Assesses movement strength based on candle body and wick sizes.
Sensitivity Mode:
In "Auto" mode, sensitivity adjusts automatically based on the timeframe (e.g., higher for minute charts, lower for daily charts).
In "Manual" mode, set sensitivity manually (from 0.1 to 1.0).
Reversal Levels (Long/Short): Configure levels for Long and Short signals with associated ranges. For example, Long Reversal Level 1 = -30% with a 5% range triggers signals between -35% and -30%.
Equilibrium Levels: Set levels for neutral market zones (e.g., ±7% for Equilibrium Level 1).
Messages: Customize signal messages to align with your trading style.
Analysis Period (Start/End Time): Define the time range for volume calculations.
Volume Unit: Select USDT, Active (active contracts), or Contracts for volume display.
Interpreting Signals:
Comparison Table (Top-Right Corner): Displays analysis results for all four calculation methods (Long/Short Ratio, Buy %, Sell %, Signal), enabling method comparison.
On-Chart Labels: Show total volume, buy/sell volumes, Long/Short Ratio, buy/sell percentages, current method, and sensitivity.
Color-Coded Signals:
Green: Potential Long (buy) opportunity.
Red: Potential Short (sell) opportunity.
Yellow: Market in equilibrium zone.
Chart Levels: Horizontal lines indicate reversal levels (green for Long, red for Short, yellow for equilibrium) with a transparency gradient for clarity.
Applying in Trading:
Use reversal signals to enter positions. For example, a "Maximum Long Signal" may indicate a strong buying opportunity.
Equilibrium zones help avoid trading during low-volatility periods.
Compare methods in the table to confirm signals.
Adjust settings to match your timeframe and asset. For instance, use "Tick Based" with high sensitivity for scalping on minute charts or "Price Movement" with low sensitivity for long-term trading.
Recommendations:
Test the indicator on historical data to optimize settings for your asset and strategy.
Combine indicator signals with other technical analysis tools (e.g., support/resistance levels or trend indicators) for greater accuracy.
Regularly update the time range (Start/End Time) to ensure relevant data analysis.
Who Is This Indicator For?
"Balance & Reversal Indicator " is ideal for traders who:
Trade on cryptocurrency exchanges and want to analyze trading volumes.
Seek reversal points for entering Long or Short positions.
Prefer customizable settings and the ability to compare different analysis methods.
Operate across various timeframes, from minutes to months.
Note: This indicator is not financial advice. Always conduct your own analysis and consider risks before making trading decisions.
© TradingStrategyCourses, 2025. All rights reserved.
SUHAIBs batvol 3d indicationHow it works:
Market is split into 3 regimes → Bull (uptrend), Bear (downtrend), Neutral (range).
Each regime is a sphere.
Loop on sphere = chance of staying in same regime.
Arrow between spheres = chance of switching to another regime.
Bigger loop/arrow = stronger probability.
Direction matters (Bull→Bear ≠ Bear→Bull).
Behind the scenes:
It detects regimes using price returns or 3 custom indicators.
Data is normalized (Z-score) and classified into Bull / Bear / Neutral.
Every bar, it updates a transition matrix (counts & probabilities of switching).
Uses Laplace smoothing so numbers don’t break.
How to read diagram:
Find current sphere (e.g., Neutral).
If loop is big → likely to continue Neutral.
If one outgoing arrow is big → that’s the most likely next regime.
Unique part:
3D animated spheres + arrows with particles show live probability flows.
Can be plugged into algo/backtesting → outputs (Bull=1, Neutral=0, Bear=-1).
👉 In short:
It’s a probability map of regime shifts. The chart tells you if the market will likely stay the same or flip to another state, and which flip is most probable.
NY Sessions Boxes (Live Drawing)//@version=5
indicator("NY Sessions Boxes (Live Drawing)", overlay=true)
ny_tz = "America/New_York"
t = time(timeframe.period, ny_tz)
hour_ny = hour(t)
minute_ny = minute(t)
// سشن ۱: 02:00 – 05:00
session1_active = (hour_ny >= 2 and hour_ny < 5)
session1_start = (hour_ny == 2 and minute_ny == 0)
// سشن ۲: 09:30 – 11:00
session2_active = ((hour_ny == 9 and minute_ny >= 30) or (hour_ny > 9 and hour_ny < 11))
session2_start = (hour_ny == 9 and minute_ny == 30)
var box box1 = na
var float hi1 = na
var float lo1 = na
if session1_start
hi1 := high
lo1 := low
box1 := box.new(left = time, right = time, top = high, bottom = low, bgcolor=color.new(color.blue, 85), border_color=color.blue)
if session1_active and not na(box1)
hi1 := math.max(hi1, high)
lo1 := math.min(lo1, low)
box.set_right(box1, time)
box.set_top(box1, hi1)
box.set_bottom(box1, lo1)
if not session1_active and not na(box1)
box1 := na
hi1 := na
lo1 := na
var box box2 = na
var float hi2 = na
var float lo2 = na
if session2_start
hi2 := high
lo2 := low
box2 := box.new(left = time, right = time, top = high, bottom = low, bgcolor=color.new(color.purple, 85), border_color=color.purple)
if session2_active and not na(box2)
hi2 := math.max(hi2, high)
lo2 := math.min(lo2, low)
box.set_right(box2, time)
box.set_top(box2, hi2)
box.set_bottom(box2, lo2)
if not session2_active and not na(box2)
box2 := na
hi2 := na
lo2 := na
Block-Based Trend Breakout (YTK/DTK) – v1📌 Overview
Block Trend Breakout (YTK/DTK) is a lightweight, rule-based indicator that detects potential trend reversals or volatility bursts by tracking breakouts of key structural support/resistance levels — derived from block-wise trend patterns.
The logic is simple yet effective: if a trend has been confirmed across multiple blocks (custom-length bar groups), and the price breaks its own structural boundary, a potential reversal or volatility signal is triggered.
🟥 YTK (Uptrend Breakdown) → Price breaks below the lowest low of the most recent block in an uptrend.
🟩 DTK (Downtrend Breakout) → Price breaks above the highest high of the most recent block in a downtrend.
🔍 How It Works
Block Construction: User-defined bar groups (e.g., 6 bars on a 4H chart = 24H blocks).
Trend Validation: At least N consecutive blocks must show higher highs/lows (uptrend) or lower highs/lows (downtrend).
Breakout Test: If the current bar violates the structural limit (MR block high/low), the corresponding signal is plotted.
📉 This logic identifies weakening trends or failed momentum, often preceding reversals or volatility expansions.
⚙️ Features
Adjustable block size and trend confirmation count
Option to use only closed bars (to reduce repaint risk)
Inclusive mode for “<= / >=” logic
Visual signals:
MR Block high/low levels
Trend-colored bars
Arrows for YTK (🔻) and DTK (🔺)
Built-in alerts for automated strategies
🎯 Use Cases
Spotting fakeouts and false breakouts
Identifying trend exhaustion before reversal
Confirming structural support/resistance breaks
Visual tool for discretionary traders
Signal generator for automated systems
💬 Feedback & Contributions
This script is open-source and community-driven. We actively welcome feedback, ideas, improvements, forks, and questions.
📩 Contact for collaboration or discussion:
📧 senbrke@gmail.com
Position Size CalculatorPosition Size Calculator
This open-source Pine Script® indicator helps traders manage risk by calculating position size, margin, and risk/reward based on account size, leverage, entry, stop-loss, and take-profit. It features a customizable table and optional chart lines/labels for clear trade planning across stocks, forex, crypto, and futures.
What It Does
- Position Size: Computes units to trade based on risk percentage and stop-loss distance, capped by leverage.
- Margin: Calculates initial margin in base currency and USD, with account size percentage.
- Risk/Reward: Shows risk-reward ratio, percentage price movements, and USD gains/losses.
- Visualization: Displays results in a table and optional chart lines/labels with customizable styles.
How It Works
- Precision: Adjusts price formatting using syminfo.mintick for accuracy across assets.
- Calculations: Position size = accountSize * (riskPercent / 100) / |entry - stoploss|, capped by accountSize * leverage / entry. Margin = positionSize / leverage. Risk-reward = |takeprofit - entry| / |stoploss - entry|.
- Display: Table shows metrics; optional lines/labels plot entry, stop-loss, and take-profit with percentage and USD details.
How to Use
- Set Inputs:
1- Account Size (USD): Your capital (e.g., 1000).
2- % Risk per Trade: Risk tolerance (e.g., 1%).
3- Leverage: Broker leverage (e.g., 1x, 10x).
4- Entry, Stop Loss, Take Profit: Trade prices.
5- Show Lines and Labels: Enable chart overlays.
- Customize: Adjust table position, colors, and line styles (Solid, Dashed, Dotted).
- View Results: Table shows position size, margin, and risk/reward. Chart lines/labels (if enabled) display prices, percentages, and USD outcomes.
- Apply: Use metrics for trade execution; modify code for custom features.
Notes
- Ensure valid inputs (entry ≠ stop-loss, both positive) to avoid “N/A”.
- Open-source: Inspect or extend the code for your needs.
- Contact the author via TradingView for feedback.
MTF CRT Setup Finder (Raids + BOS linked)//@version=6
indicator("MTF CRT Setup Finder (Raids + BOS linked)", overlay=true, max_lines_count=500)
// === INPUTS ===
lookback = input.int(5, "Swing Lookback Bars", minval=2)
// === Function: Detect swing highs/lows ===
swingHigh(src, lb) => ta.pivothigh(src, lb, lb)
swingLow(src, lb) => ta.pivotlow(src, lb, lb)
// === Function: Detect CRT with memory ===
f_crt(tf) =>
hi = request.security(syminfo.tickerid, tf, high)
lo = request.security(syminfo.tickerid, tf, low)
cl = request.security(syminfo.tickerid, tf, close)
sh = request.security(syminfo.tickerid, tf, swingHigh(high, lookback))
sl = request.security(syminfo.tickerid, tf, swingLow(low, lookback))
raidHigh = not na(sh) and hi > sh and cl < sh
raidLow = not na(sl) and lo < sl and cl > sl
// store last raid state
var bool hadRaidHigh = false
var bool hadRaidLow = false
if raidHigh
hadRaidHigh := true
if raidLow
hadRaidLow := true
bosDown = hadRaidHigh and cl < sl
bosUp = hadRaidLow and cl > sh
// reset after BOS
if bosDown
hadRaidHigh := false
if bosUp
hadRaidLow := false
// === Apply on H1 only first (test) ===
= f_crt("60")
// === Plot ===
plotshape(raidHigh, title="Raid High", style=shape.diamond, color=color.red, size=size.small, text="Raid High")
plotshape(raidLow, title="Raid Low", style=shape.diamond, color=color.green, size=size.small, text="Raid Low")
plotshape(bosDown, title="Bearish CRT", style=shape.triangledown, color=color.red, size=size.large, text="CRT↓")
plotshape(bosUp, title="Bullish CRT", style=shape.triangleup, color=color.green, size=size.large, text="CRT↑")
B A N K $ - HTF Candle Boxes (Power of 3)This indicator allows you to visualise the HTF candles on the LTF's, this is useful for using the Power of 3 / Accumulation, Manipulation & Distribution concepts.
By default, the HTF interval is set to 1h, this means that an outline will be created around the LTF candles that are within that 1h window. (i.e from 13:00-14:00 etc).
Features
HTF Interval Selector - this allows the user to customise which HTF interval to use
Candle Boxes - this outlines the full outer perimeter of the relevant candles
Include Body - this highlights the distance between the candle Open & Close
Show MidLine
Additional Settings
Hide Side Lines - this will only draw the Top & Bottom lines
Extend Lines to Current Candle - most recent Top & Bottom lines will extend to current price
Draw Lines from Exact Candle - this makes the most recent candle lines cleaner
I personally use this indicator to outline the most recent 3 1h candles to make it easier to identify sweeps & reversals however there is additional functionality to allow the user to customise the indicator to their preference.
Frank-Setup EMA, RS & RSI ✅It is a clean and simple indicator designed to identify weakness in stocks using two proven methods: RSI and Relative Strength (RS) vs. a benchmark (e.g., NIFTY).
🔹 Features
RSI Weakness Signals
Plots when RSI crosses below 50 (weakness begins).
Plots when RSI moves back above 50 (weakness ends).
Relative Strength (RS) vs Benchmark
Compares stock performance to a chosen benchmark.
Signals when RS drops below 1 (stock underperforming).
Signals when RS recovers above 1 (strength resumes).
Clear Visual Markers
Circles for RSI signals.
Triangles for RS signals.
Optional RSI labels for clarity.
Built-in Alerts
Get notified instantly when RSI or RS weakness starts or ends.
No need to constantly watch charts.
🎯 Use Case
This tool is built for traders who want to:
Spot shorting opportunities when a stock shows weakness.
Track underperformance vs. the index.
Manage risk by exiting longs when weakness appears.
Advanced RSI-ADX-Bollinger Market Overview DashboardStudy Material: Advanced RSI–ADX–Bollinger Market Overview Dashboard
This dashboard is a comprehensive trading tool designed to combine three powerful technical analysis methods—RSI (Relative Strength Index), ADX (Average Directional Index), and Bollinger Bands—into one unified system with live table output and progress indicators. It aims to provide a complete market snapshot at a glance, helping traders monitor momentum, volatility, trend, and market signals.
________________________________________
🔹 Core Concepts Used
1. RSI (Relative Strength Index)
• RSI measures market momentum by comparing price gains and losses.
• A high RSI indicates overbought conditions (possible reversal or sell zone).
• A low RSI indicates oversold conditions (possible reversal or buy zone).
• In this dashboard, RSI is also represented with progress bars to show how far the current value is moving toward extreme zones.
2. ADX (Average Directional Index)
• ADX is used to gauge the strength of a trend.
• When ADX rises above a threshold, it signals a strong trend (whether bullish or bearish).
• The system checks when ADX momentum crosses above its threshold to confirm whether a signal has strong backing.
3. Bollinger Bands
• Bollinger Bands measure volatility around a moving average.
• The upper band indicates potential overbought pressure, while the lower band shows oversold pressure.
• Expansion of the bands signals rising volatility, contraction shows calming markets.
• This tool also assigns a BB Trend Label: Expand ↑ (bullish), Contract ↓ (bearish), or Neutral →.
________________________________________
🔹 What This Dashboard Tracks
1. Signal Generation
o BUY Signal: RSI oversold + price near lower Bollinger Band + ADX strength confirmation.
o SELL Signal: RSI overbought + price near upper Bollinger Band + ADX strength confirmation.
o Labels are plotted on the chart to indicate BUY or SELL points.
2. Trend Direction & Strength
o The script analyzes short- and medium-term moving averages to decide whether the market is Bullish, Bearish, or Flat.
o An arrow symbol (↑, ↓, →) is shown to highlight the trend.
3. Signal Performance Tracking
o Once a BUY or SELL signal is active, the dashboard tracks:
Maximum profit reached
Maximum loss faced
Whether the signal is still running or closed
o This gives the trader performance feedback on past and ongoing signals.
4. Volume Analysis
o Volume is split into Buy Volume (candles closing higher) and Sell Volume (candles closing lower).
o This provides insight into who is in control of the market—buyers or sellers.
5. Comprehensive Data Table
o A professional table is displayed directly on the chart showing:
RSI Value
ADX Strength
Buy/Sell Volumes
Trend Direction
Bollinger Band Trend
Previous Signal Performance (Max Profit / Max Loss)
Current Signal Performance (Max Profit / Max Loss)
Symbol Name
o Each metric is color-coded for instant decision-making.
6. Progress Indicators
o RSI Progress Bar (0–100 scale).
o ADX Progress Bar (0–50 scale).
o Bollinger Band Expansion/Contraction progress.
o Signal profit/loss progress visualization.
7. Market Status Summary
o The dashboard issues a status label such as:
🔴 SELL ACTIVE
🔵 BUY ACTIVE
🟢 BULL MARKET
🔴 BEAR MARKET
🟡 NEUTRAL
________________________________________
🔹 Practical Use Case
This dashboard is ideal for traders who want a consolidated decision-making tool. Instead of monitoring RSI, ADX, and Bollinger Bands separately, the system automatically combines them and shows signals, trends, volumes, and performance in one view.
It can be applied to:
• Intraday Trading (short-term moves with high volatility).
• Swing Trading (holding positions for days to weeks).
• Trend Confirmation (identifying when to stay in or exit trades).
________________________________________
⚠️ Strict Disclaimer (aiTrendview Policy)
• This script is a research and educational tool only.
• It does NOT guarantee profits and must not be used as a sole decision-making system.
• Past performance tracking inside the dashboard is informational and does not predict future outcomes.
• Trading involves significant financial risk, including potential loss of all capital.
• Users are fully responsible for their own trading decisions.
________________________________________
🚫 Misuse Policy (aiTrendview Standard)
• Do not misuse this tool for false claims of guaranteed profits.
• Redistribution, resale, or repackaging under another name is strictly prohibited without aiTrendview permission.
• This tool is intended to support disciplined trading practices, not reckless speculation.
• aiTrendview does not support gambling-style use or over-leveraging based on this script.
________________________________________
👉 In short: This system is a professional decision-support tool that integrates RSI, ADX, and Bollinger Bands into one dashboard with signals, performance tracking, and progress visualization. It helps traders see the bigger picture of market health—but the responsibility for action remains with the trader.
________________________________________
Extreme Zone Volume ProfileExtreme Zone Volume Profile (EZVP)
Originality & Innovation
The Extreme Zone Volume Profile (EZVP) revolutionizes traditional volume profile analysis by applying statistical zone classification to volume distribution. Unlike standard volume profiles that display raw volume data, EZVP segments the price range into statistically meaningful zones based on percentile thresholds, allowing traders to instantly identify where volume concentration suggests strong support/resistance versus areas of potential breakout.
Technical Methodology
Core Algorithm:
Distributes volume across user-defined bins (20-200) over a lookback period
Calculates volume-weighted price levels for each bin
Applies percentile-based zone classification to the price range (not volume ranking)
Zone B (extreme zones): Outer percentile tails representing potential rejection areas
Zone A (significant zones): Secondary percentile bands indicating strong interest levels
Center Zone: Bulk trading range where most price discovery occurs
Mathematical Foundation:
The script uses price-range percentiles rather than volume percentiles. If the total price range is divided into 100%, Zone B captures the extreme price tails (default 2.5% each end ≈ 2 standard deviations), Zone A captures the next significant bands (default 14% each ≈ 1 standard deviation), leaving the center for normal distribution trading.
Key Calculations:
POC (Point of Control): Price level with maximum volume accumulation
Volume-weighted mean price: Total volume × price / total volume
Median price: Geometric center of the price range
Rightward-projected bars: Volume bars extend forward from current time to avoid historical chart clutter
Trading Applications
Zone Interpretation:
Zone B (Red/Green): Extreme price levels where volume suggests strong rejection potential. Price reaching these zones often indicates overextension and possible reversal points.
Zone A (Orange/Teal): Significant support/resistance areas with substantial volume interest. These levels often act as intermediate targets or consolidation zones.
Center (Gray): Fair value area where most trading occurs. Price tends to return to this range during normal market conditions.
Strategic Usage:
Reversal Trading: Look for rejection signals when price enters Zone B areas
Breakout Confirmation: Volume expansion beyond Zone B boundaries suggests genuine breakouts
Support/Resistance: Zone A boundaries often provide reliable entry/exit levels
Mean Reversion: Price tends to gravitate toward the volume-weighted mean and POC lines
Unique Value Proposition
EZVP addresses three key limitations of traditional volume profiles:
Visual Clarity: Standard profiles can be cluttered and difficult to interpret quickly. EZVP's color-coded zones provide instant visual feedback about price significance.
Statistical Framework: Rather than relying on subjective interpretation of volume nodes, EZVP applies objective percentile-based classification, making support/resistance identification more systematic.
Forward-Looking Display: Rightward-projecting bars keep historical price action clean while maintaining current market structure visibility.
Configuration Guide
Lookback Period (10-1000): Controls the historical depth of volume calculation. Shorter periods for intraday scalping, longer for swing trading.
Number of Bins (20-200): Resolution of volume distribution. Higher values provide more granular analysis but may create noise on lower timeframes.
Zone Percentages:
Zone B: Extreme threshold (default 2.5% = ~2σ statistical significance)
Zone A: Significant threshold (default 14% = ~1σ statistical significance)
Visual Controls: Toggle individual elements (POC, median, mean, zone lines) to customize display complexity for your trading style.
Technical Requirements
Pine Script v6 compatible
Maximum bars back: 5000 (ensures sufficient historical data)
Maximum boxes: 500 (supports high-resolution bin counts)
Maximum lines: 50 (accommodates all zone and reference lines)
This indicator synthesizes volume profile theory with statistical zone analysis, providing a quantitative framework for identifying high-probability support/resistance levels based on volume distribution patterns rather than arbitrary price levels.
Volume Heat ZoneVolume Zones Indicator
This Pine Script creates a volume-based zone analysis tool for TradingView.
Function:
Divides the price range (high to low) into 20 levels over a 100-candle lookback period
Measures volume activity at each price level
Draws boxes at levels with above-average volume (1.5x threshold)
Key Settings:
Lookback Period (100): Number of candles analyzed
Price Levels (20): Price range subdivisions
Volume Threshold (1.5): Minimum volume multiplier for zones
Candle Offset (1): Excludes current candle from analysis
Projection Bars (10): Extends boxes 10 bars into the future
How it works:
The indicator identifies price levels where significant trading volume occurred historically, highlighting potential support/resistance zones. Boxes are redrawn on each confirmed candle, showing dynamic volume concentration areas that traders can use for entry/exit decisions.