Hộp thời gian quanh đóng nến H1"H1 Candle Time Box" is a custom TradingView indicator that highlights a configurable time window surrounding the close of each 1-hour (H1) candle. The indicator draws a transparent box 15 minutes before and after each H1 candle close (by default), helping traders visualize time-based reaction zones.
🔍 Features:
Custom time window: Users can set how many minutes before and after the H1 close the box should appear.
Dynamic positioning: Boxes are drawn slightly above the candles to avoid overlap with price bars.
Live time labels: Each box displays its time range (e.g., "08:45 - 09:15") based on the start and end time of the zone.
Auto-cleaning: Only a limited number of recent boxes (default: 5) are shown, keeping the chart clean.
Requires 1-minute chart for precise timing.
This tool is especially helpful for intraday traders to identify areas of interest or market reactions before and after key hourly closes.
Göstergeler ve stratejiler
Volatility Regime Classifier | ATRP Percentile ZonesThis indicator helps you understand the current volatility environment of any asset by comparing recent ATR-based values to its historical range.
It defines four regimes:
🔴 Low Volatility: Volatility is decreasing
🟢 Normal: Volatility is increasing but still below average
🟠 High: Volatility is elevated
🟣 Extreme: Volatility is very high compared to recent history
⚙️ How it works
We calculate the Average True Range (ATR) as a percentage of price (ATRP), then compare a short-term ATR to a longer-term one. Their difference shows whether volatility is picking up or slowing down.
To make the signal more adaptive, we look at the distribution of recent volatility over a rolling window. We compute the 50th and 70th percentiles of that history to set dynamic thresholds.
About distribution & percentiles
Volatility in financial markets doesn't follow a normal (Gaussian) distribution, it's often skewed, with sudden spikes and fat tails. That means fixed thresholds (like "ATR > 20") can be misleading or irrelevant across assets and timeframes.
Using percentiles solves this:
The 50th percentile marks the middle of the recent volatility range.
The 70th percentile captures a zone where volatility is unusually high, but not too rare, which keeps the signal usable and not overly sensitive.
These levels offer a balance:
⚖️ not too reactive, not too slow — just enough to highlight meaningful shifts.
✅ Use cases
Spot changes in market conditions
Filter or adapt strategies depending on the regime
Adjust position sizing and risk dynamically
Small Cap Momentum Entry System✅ Features Included:
Momentum entry detection
Trailing stop overlay
Alert for entry and exit
Pre-market high line (optional display toggle)
Dual-Phase Trend Regime Oscillator (Zeiierman)█ Overview
Trend Regime: Dual-Phase Oscillator (Zeiierman) is a volatility-sensitive trend classification tool that dynamically switches between two oscillators, one optimized for low volatility, the other for high volatility.
By analyzing standard deviation-based volatility states and applying correlation-derived oscillators, this indicator reveals not only whether the market is trending but also what kind of trend regime it is in —Bullish or Bearish —and how that regime reacts to market volatility.
█ Its Uniqueness
Most trend indicators assume a static market environment; they don't adjust their logic when the underlying volatility shifts. That often leads to false signals in choppy conditions or late entries in trending phases.
Trend Regime: Dual-Phase Oscillator solves this by introducing volatility-aware adaptability. It switches between a slow, stable oscillator in calm markets and a fast, reactive oscillator in volatile ones, ensuring the right sensitivity at the right time.
█ How It Works
⚪ Volatility State Engine
Calculates returns-based volatility using standard deviation of price change
Smooths the current volatility with a moving average
Builds a volatility history window and performs median clustering to determine typical "Low" and "High" volatility zones
Dynamically assigns the chart to one of two internal volatility regimes: Low or High
⚪ Dual Oscillators
In Low Volatility, it uses a Slow Trend Oscillator (longer lookback, smoother)
In High Volatility, it switches to a Fast Trend Oscillator (shorter lookback, responsive)
Both oscillators use price-time correlation as a measure of directional strength
The output is normalized between 0 and 1, allowing for consistent interpretation
⚪ Trend Regime Classification
The active oscillator is compared to a neutral threshold (0.5)
If above: Bullish Regime, if below: Bearish Regime, else: Neutral
The background and markers update to reflect regime changes visually
Triangle markers highlight bullish/bearish regime shifts
█ How to Use
⚪ Identify Current Trend Regime
Use the background color and chart table to immediately recognize whether the market is trending up or down.
⚪ Trade Regime Shifts
Use triangle markers (▲ / ▼) to spot fresh regime entries, which are ideal for confirming breakouts within trends.
⚪ Pullback Trading
Look for pullbacks when the trend is in a stable condition and the slow oscillator remains consistently near the upper or lower threshold. Watch for moments when the fast oscillator retraces back toward the midline, or slightly above/below it — this often signals a potential pullback entry in the direction of the prevailing trend.
█ Settings Explained
Length (Slow Trend Oscillator) – Used in calm conditions. Longer = smoother signals
Length (Fast Trend Oscillator) – Used in volatile conditions. Shorter = more responsive
Volatility Refit Interval – Controls how often the system recalculates Low/High volatility levels
Current Volatility Period – Lookback used for immediate volatility measurement
Volatility Smoothing Length – Applies an SMA to the raw volatility to reduce noise
-----------------
Disclaimer
The content provided in my scripts, indicators, ideas, algorithms, and systems is for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or a solicitation to buy or sell any financial instruments. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
1-Candle Order Block DetectorThis simple indicator is based on the 1-Candle rule. During an impulsive move toward the upside or downside, an order block is plotted based on a single down-closed or up-closed candle.
Inputs can be easily customized based on preferences or strength of trend filtering.
UNITED TRADING COMMUNITY WaterMarkWATER MARK indicator. Will allow you to improve the order of the entries you need on the chart.
1. Name and date for the traded instrument
2. Watermarks to protect your charts (in the center and around the perimeter of the chart)
3. The new "notes" option will allow you to keep focus on the factors that are important to you on the chart.
Very flexible settings for any notes, labels, watermarks on the chart that are important to you.
Индикатор WATER MARK . Даст возможность вам улучшить порядок нужных вам записей на графике.
1. Название и дата для торгуемого инструмента
2. Водные знаки для защиты ваших графиков ( в центре и по периметру графика)
3. Новая опция "заметки" позволит вам держать фокус на важных для вас факторах на графике.
Очень гибкая настройка , любых значимых для вас заметок , лейблов , вотермарк на графике.
Chandelier Exit 優化版//@version=5
indicator('Chandelier Exit 優化版', shorttitle='CE優化', overlay=true)
var string calcGroup = 'Calculation'
length = input.int(title='ATR週期', defval=22, group=calcGroup)
mult = input.float(title='ATR倍數', step=0.1, defval=3.0, group=calcGroup)
useClose = input.bool(title='使用收盤價計算高低點', defval=true, group=calcGroup)
var string visualGroup = '視覺設定'
showLabels = input.bool(title='顯示買/賣標籤', defval=true, group=visualGroup)
highlightState = input.bool(title='高亮趨勢區域', defval=true, group=visualGroup)
var string alertGroup = '警報設定'
awaitBarConfirmation = input.bool(title="等待K棒收定再確認訊號", defval=false, group=alertGroup)
atr = mult * ta.atr(length)
longStop = (useClose ? ta.highest(close, length) : ta.highest(length)) - atr
longStopPrev = nz(longStop , longStop)
longStop := close > longStopPrev ? math.max(longStop, longStopPrev) : longStop
shortStop = (useClose ? ta.lowest(close, length) : ta.lowest(length)) + atr
shortStopPrev = nz(shortStop , shortStop)
shortStop := close < shortStopPrev ? math.min(shortStop, shortStopPrev) : shortStop
var int dir = 1
dir := close > shortStopPrev ? 1 : close < longStopPrev ? -1 : dir
var color longColor = color.green
var color shortColor = color.red
var color longFillColor = color.new(color.green, 90)
var color shortFillColor = color.new(color.red, 90)
var color textColor = color.white
longStopPlot = plot(dir == 1 ? longStop : na, title='多方停損', style=plot.style_linebr, linewidth=2, color=longColor)
buySignal = dir == 1 and dir == -1
plotshape(buySignal ? longStop : na, title='買進訊號', location=location.absolute, style=shape.circle, size=size.tiny, color=longColor)
plotshape(buySignal and showLabels ? longStop : na, title='買標籤', text='買', location=location.absolute, style=shape.labelup, size=size.tiny, color=longColor, textcolor=textColor)
shortStopPlot = plot(dir == 1 ? na : shortStop, title='空方停損', style=plot.style_linebr, linewidth=2, color=shortColor)
sellSignal = dir == -1 and dir == 1
plotshape(sellSignal ? shortStop : na, title='賣出訊號', location=location.absolute, style=shape.circle, size=size.tiny, color=shortColor)
plotshape(sellSignal and showLabels ? shortStop : na, title='賣標籤', text='賣', location=location.absolute, style=shape.labeldown, size=size.tiny, color=shortColor, textcolor=textColor)
midPricePlot = plot(ohlc4, title='', style=plot.style_circles, linewidth=0, display=display.none, editable=false)
longStateFillColor = highlightState ? dir == 1 ? longFillColor : na : na
shortStateFillColor = highlightState ? dir == -1 ? shortFillColor : na : na
fill(midPricePlot, longStopPlot, title='多方區域', color=longStateFillColor)
fill(midPricePlot, shortStopPlot, title='空方區域', color=shortStateFillColor)
await = true // 立即通知快訊,無需等K棒收定
alertcondition(dir != dir and await, title='警報: 趨勢改變', message='Chandelier Exit 趨勢改變!')
alertcondition(buySignal and await, title='警報: 買進訊號', message='Chandelier Exit 買進訊號!')
alertcondition(sellSignal and await, title='警報: 賣出訊號', message='Chandelier Exit 賣出訊號!')
Premium Lux AlgoCombining multiple indicators to receive buy and sell signals and create support and resistance levels and cloud space
Global Liquidity IndexThis indicator tracks worldwide liquidity by aggregating the sum of the global M2 money supply, and major central bank balance sheets and subtracting the U.S. Treasury General Account (TGA), the Federal Reserve’s Reverse Repo (RRP) facility. It offers insight into the overall liquidity environment, often a key driver of risk asset performance.
Custom MACD//@version=5
indicator("Custom MACD", overlay=false)
fastLength = input.int(8, title="Fast EMA Length")
slowLength = input.int(21, title="Slow EMA Length")
signalSmoothing = input.int(5, title="Signal Smoothing")
= ta.macd(close, fastLength, slowLength, signalSmoothing)
plot(macdLine, color=color.blue, title="MACD Line")
plot(signalLine, color=color.red, title="Signal Line")
plot(histLine, style=plot.style_histogram, color=histLine >= 0 ? color.green : color.red, title="Histogram")
Fakeout Filter📈 Fakeout Filter by ARV
🔍 Overview:
The Fakeout Filter is a smart breakout validation tool designed to help traders avoid false breakouts and focus only on high-probability breakout trades. This indicator combines price action, volume analysis, RSI divergence detection, and OBV trend confirmation to filter out noise and improve your entries.
⚙️ Key Features:
✅ Breakout Detection
Detects when the price closes above a user-defined resistance level.
✅ Volume Spike Confirmation
Confirms breakouts only if there’s a significant increase in volume (customizable via settings).
✅ RSI Bearish Divergence Filter
Warns you of bearish RSI divergence, which often signals fakeouts during breakouts.
✅ OBV Trend Confirmation
Ensures On-Balance Volume (OBV) is rising, aligning volume flow with price movement.
✅ EMA Filter (Trend Confirmation)
Adds a safety filter using Exponential Moving Average (EMA) to ensure price action aligns with the short-term trend.
📌 How to Use:
Set Resistance Level:
In the indicator settings, input a key resistance level (manual input based on your chart analysis).
Watch for Signals:
A green background and “Breakout” label appear when:
Price closes above the resistance.
Volume is significantly higher than average.
OBV is rising.
No bearish RSI divergence is detected.
Price is above the EMA (trend confirmation).
Entry Suggestion:
Consider entering long positions only when the breakout label appears.
For additional confirmation, wait for a retest of the resistance as support before entering.
🔧 Settings:
Resistance Level – Manually set the level you're watching.
Volume Multiplier – Adjusts sensitivity to volume spikes (default: 1.5x average).
RSI Period – RSI used for divergence detection (default: 14).
EMA Period – For trend direction confirmation (default: 21).
✅ Best Use Cases:
Scalpers and intraday traders avoiding fakeouts on 5m–1H timeframes.
Swing traders validating breakout setups.
BTC, ETH, and major altcoins in consolidation or breakout zones.
⚠️ Disclaimer:
This tool is for educational purposes only. Always combine it with your own market analysis and risk management.
3-Candle Pattern StrategyBuy Conditions:
Candle 2 bars ago: close > open
Previous candle: close < open
Current candle: close > open
Current candle: (high - close) < (high - low) * 0.15
Current candle: volume > previous volume
Sell Conditions:
Candle 2 bars ago: close < open
Previous candle: close > open
Current candle: close < open
Current candle: (close - low) < (high - low) * 0.15
Current candle: volume > previous volume
Vol Spike + Super Trend by Ralpinoy
DESCRIPTION:
A combination of trend indicators in one with and Volume Spikes and some personal touch
A trend-following band built off w ATR. When price closes above the upper band, it flips “Bullish,” and when it closes below the lower band, it flips “Bearish.”
Always remember that the Green Band (UP trending) "TATAAS ang price in Tagalog" then when the Red band its (DOWN Trending) "PAGBABA".
Buy signal when the band flips from red → green; Sell signal when it flips green → red.
Flags bars where volume is “X times” above its moving average.
Additional filters (local highs/lows, hammer/shooter candles, same-color closes) let you only highlight truly significant volume bursts.
Bullish spike = orange circle below bar; Bearish spike = orange circle above bar.
HOW DOES THIS WORKS
ATR & Bands:
The script computes a smoothed ATR.
Upper band = (HL2 − Multiplier·ATR), Lower band = (HL2 + Multiplier·ATR).
Bands “trail” price, flipping direction only on a clear close beyond them—this helps keep you in strong trends and avoids whipsaws.
TREND LOGIC
A simple state variable (trend) holds +1 or –1.
When price closes above the prior lower-band, trend flips to +1; when it closes below the prior upper-band, it flips to –1.
Volume Spike Logic:
volume > MA(volume)×Multiplier flags extreme activity.
Optional “only valid highs & lows,” “only hammers/shooters,” and “same-color” filters give you cleaner, more actionable spikes.
READING THE SIGNALS
Stay long while SuperTrend is green.
Stay short (or stay out of longs) while SuperTrend is red.
Entry Triggers
Buy: SuperTrend flips red→green and prints a “GREEN DOT” label on the band.
Sell: SuperTrend flips green→red and prints a “RED DOT” label.
Volume Spike Confluence
A bullish volume spike (circle below bar) near a SuperTrend flip adds conviction to a long entry.
A bearish volume spike near a down-trend flip adds conviction to a short.
Exits & Stops
A common stop-loss is just beyond the opposite SuperTrend band.
You can also exit when the SuperTrend flips back (i.e. you trade only from flip→next flip).
BEST PRACTICES AND APPLICATIONS
Timeframes: SuperTrend is reliable on 1 H, 4 H, Daily charts. On 1 min/5 min, increase the ATR period or multiplier to reduce noise.
Multipliers:
ATR Multiplier 2–3 for faster flips, 4–5 for more conservative signals.
Volume Multiplier 1.5–2 for catching strong spikes, higher for only extreme activity.
Load the script and toggle only the SuperTrend on. Watch how it trails price.
Activate volume spikes and see which bars light up—note whether they line up with trend flips.
Practice on a demo account: enter on the flip + a confirming volume spike, stop just beyond the opposite band, and target a multiple of your risk ex.x2 (just do it)
With this combo you get a visual, rules-based trend system plus a volume filter to help you catch powerful, momentum-backed moves.
Enjoy, and let me know how does it works for you! Dont be shy to like and comment this indicator, Ralpinoy
ICT Macro Zone Boxes w/ Individual H/L Tracking v3.1ICT Macro Zones (Grey Box Version
This indicator dynamically highlights key intraday time-based macro sessions using a clean, minimalistic grey box overlay, helping traders align with institutional trading cycles. Inspired by ICT (Inner Circle Trader) concepts, it tracks real-time highs and lows for each session and optionally extends the zone box after the session ends — making it a precision tool for intraday setups, order flow analysis, and macro-level liquidity sweeps.
### 🔍 **What It Does**
- Plots **six predefined macro sessions** used in Smart Money Concepts:
- AM Macro (09:50–10:10)
- London Close (10:50–11:10)
- Lunch Macro (11:30–13:30)
- PM Macro (14:50–15:10)
- London SB (03:00–04:00)
- PM SB (15:00–16:00)
- Each zone:
- **Tracks high and low dynamically** throughout the session.
- **Draws a consistent grey shaded box** to visualize price boundaries.
- **Displays a label** at the first bar of the session (optional).
- **Optionally extends** the box to the right after the session closes.
### 🧠 **How It Works**
- Uses Pine Script arrays to define each session’s time window, label, and color.
- Detects session entry using `time()` within a New York timezone context.
- High/Low values are updated per bar inside the session window.
- Once a session ends, the box is optionally closed and fixed in place.
- All visual zones use a standardized grey tone for clarity and consistency across charts.
### 🛠️ **Settings**
- **Shade Zone High→Low:** Enable/disable the grey macro box.
- **Extend Box After Session:** Keep the zone visible after it ends.
- **Show Entry Label:** Display a label at the start of each session.
### 🎯 **Why This Script is Unique**
Unlike basic session markers or colored backgrounds, this tool:
- Focuses on **macro moments of liquidity and reversal**, not just open/close times.
- Uses **per-session logic** to individually track price behavior inside key time windows.
- Supports **real-time high/low tracking and clean zone drawing**, ideal for Smart Money and ICT-style strategies.
Perfect — based on your list, here's a **bundle-style description** that not only explains the function of each script but also shows how they **work together** in a Smart Money/ICT workflow. This kind of cross-script explanation is exactly what TradingView wants to see to justify closed-source mashups or interdependent tools.
---
📚 ICT SMC Toolkit — Script Integration Guide
This set of advanced Smart Money Concept (SMC) tools is designed for traders who follow ICT-based methodologies, combining liquidity theory, time-based precision, and engineered confluences for high-probability trades. Each indicator is optimized to work both independently and synergistically, forming a comprehensive trading framework.
---
First FVG Custom Time Range
**Purpose:**
Plots the **first Fair Value Gap (FVG)** that appears within a defined session (e.g., NY Kill Zone, Custom range). Includes optional retest alerts.
**Best Used With:**
- Use with **ICT Macro Zones (Grey Box Version)** to isolate FVGs during high-probability times like AM Macro or PM SB.
- Combine with **Liquidity Levels** to assess whether FVGs form near swing points or liquidity voids.
---
ICT SMC Liquidity Grabs and OB s
**Purpose:**
Detects **liquidity grabs** (stop hunts above/below swing highs/lows) and **bullish/bearish order blocks**. Includes optional Fibonacci OTE levels for sniper entries.
**Best Used With:**
- Use with **ICT Turtle Soup (Reversal)** for confirmation after a liquidity grab.
- Combine with **Macro Zones** to catch order blocks forming inside timed macro windows.
- Match with **Smart Swing Levels** to confirm structure breaks before entry.
ICT SMC Liquidity Levels (Smart Swing Lows)
**Purpose:**
Automatically marks swing highs/lows based on user-defined lookbacks. Tracks whether those levels have been breached or respected.
**Best Used With:**
- Combine with **Turtle Soup** to detect if a swing level was swept, then reversed.
- Use with **Liquidity Grabs** to confirm a grab occurred at a meaningful structural point.
- Align with **Macro Zones** to understand when liquidity events occur within macro session timing.
ICT Turtle Soup (Liquidity Reversal)
**Purpose:**
Implements the classic ICT Turtle Soup model. Looks for swing failure and quick reversals after a liquidity sweep — ideal for catching traps.
Best Used With:
- Confirm with **Liquidity Grabs + OBs** to identify institutional activity at the reversal point.
- Use **Liquidity Levels** to ensure the reversal is happening at valid previous swing highs/lows.
- Amplify probability when pattern appears during **Macro Zones** or near the **First FVG**.
ICT Turtle Soup Ultimate V2
**Purpose:**
An enhanced, multi-layer version of the Turtle Soup setup that includes built-in liquidity checks, OTE levels, structure validation, and customizable visual output.
**Best Used With:**
- Use as an **entry signal generator** when other indicators (e.g., OBs, liquidity grabs) are aligned.
- Pair with **Macro Zones** for high-precision timing.
- Combine with **First FVG** to anticipate price rebalancing before explosive moves.
---
## 🧠 Workflow Example:
1. **Start with Macro Zones** to focus only on institutional trading windows.
2. Look for **Liquidity Grabs or Swing Sweeps** around key highs/lows.
3. Check for a **Turtle Soup Reversal** or **Order Block Reaction** near that level.
4. Confirm confluence with a **Fair Value Gap**.
5. Execute using the **OTE level** from the Liquidity Grabs + OB script.
---
Let me know which script you want to publish first — I’ll tailor its **individual TradingView description** and flag its ideal **“Best Used With” partners** to help users see the value in your ecosystem.
Price Change Sentiment Index [tradeviZion]Price Change Sentiment Index
A technical indicator that measures price changes relative to the day's range.
Indicator Overview
Normalizes price changes on a 0-100 scale
Uses a smoothing period for signal clarity
Shows potential overbought/oversold conditions
Inputs
Smoothing Period (default: 3)
Show Background Colors (on/off)
Overbought Level (default: 75)
Oversold Level (default: 25)
Reading the Indicator
Values above 75: Price change showing strong upward movement
Values below 25: Price change showing strong downward movement
Around 50: Neutral price movement
Technical Details
// Core calculation
changePct = (currClose - prevClose) / (high - low)
normalized = 50 + (changePct * 50)
smoothedNormalized = ta.sma(normalizedClamped, smoothingPeriod)
Usage Notes
Best used with other technical analysis tools
Adjustable smoothing period affects signal sensitivity
Background colors highlight extreme readings
Works on any timeframe
Settings Guide
Smoothing Period:
- Lower values (1-3): More responsive
- Higher values (5-10): Smoother output
Visual Settings: Toggle background colors
Levels: Adjust overbought/oversold thresholds
This indicator is a technical analysis tool. Please conduct your own research and testing before use.
AP_Ultimate CCI MTF v5**AP Ultimate CCI Multi-Timeframe Indicator**
*Track Commodity Channel Index trends across multiple timeframes in one view!*
**Overview:**
Adapted from ChrisMoody's popular RSI MTF concept, this enhanced version brings powerful multi-timeframe analysis to the CCI indicator. Perfect for traders who want to confirm trends across different time horizons without switching charts.
**Key Features:**
📈 **Dual CCI Analysis**
- Primary CCI (Default: 1H) + Secondary CCI (Default: 4H)
- Fully customizable timeframes for both indicators
- Independent length settings (14-50 periods recommended)
🚦 **Visual Trading Signals**
- Automatic Buy/Sell markers on crossovers
- 🟢 **B** Signals: When CCI crosses above -100 (Oversold reversal)
- 🔴 **S** Signals: When CCI crosses below +100 (Overbought reversal)
- Clean triangular markers at chart edges for clear visibility
🎨 **Customizable Visuals**
- Adjustable overbought/oversold levels (Default: ±100)
- Background highlights for extreme zones
- Modern color schemes with transparency control
- Optional zero line display
⚙️ **Technical Specs**
- Built in Pine Script v6
- Non-repainting calculations
- Timeframe-aware alerts support
- Optimized for all asset classes
**How to Use (my use case):**
1. Apply to 15M-4H charts for intraday trading
2. Default setup: Compare 1H vs 4H CCI
3. Look for confluence between timeframes:
- Strong trend = Both CCIs moving in same direction
- Reversal signal = Crossovers with volume confirmation
4. Combine with price action or support/resistance
**Why this Indicator:**
✅ Eliminates manual timeframe switching
✅ Identifies hidden divergences between time horizons
✅ Works equally well for stocks, forex, and crypto
✅ Perfect for momentum and mean-reversion strategies
*Pro Tip: Pair with volume indicators and moving averages for enhanced confirmation!*
Zweig Breadth Thrust (%)Zweig Breadth Thrust Indicator for US Markets (NYSE, NASDAQ, AMEX, All Markets)
The formula for calculating the Zweig Breadth Thrust involves several steps. Here’s a simplified version of the calculation:
1. Calculate the number of advancing stocks (those that increased in price) over a specified period, usually the past 10 trading days.
2. Calculate the number of declining stocks (those that decreased in price) over the same period.
3. Calculate the 10-day moving average (either SMA or EMA) of the advancing stocks.
4. Calculate the 10-day moving average (either SMA orEMA) of the declining stocks.
5. Calculate the ZBT value by dividing the 10-day EMA of advancing issues by the sum of the 10-day EMA of advancing issues and the 10-day EMA of declining issues, then multiplying by 100 to convert it to a percentage.
Custom Opening Range Breakout (IST, Fixed)This script is designed to:
Calculate and visualize the Opening Range (OR) for any session using Indian Standard Time (IST)
Automatically plot breakout levels (A and C) based on a user-defined percentage buffer
Draw persistent horizontal lines from the OR candle to the end of the trading day
Reset daily, drawing a fresh set of levels for each new session
Custom Opening Range Breakout (IST, Fixed)This script is designed to:
Calculate and visualize the Opening Range (OR) for any session using Indian Standard Time (IST)
Automatically plot breakout levels (A and C) based on a user-defined percentage buffer
Draw persistent horizontal lines from the OR candle to the end of the trading day
Reset daily, drawing a fresh set of levels for each new session
Simple ScreenerThis is a basic easy to use screener.
In the code you will find an area with all the tickers and you can add your own it will look like this.
It uses the RSI, TSI, ADX, AND SUPER TREND! The code is open source if you would like to tinker and make it better with it. please message me if you have any questions or request.
s01 = input.symbol('AMD', group = 'Symbols', inline = 's01')
s02 = input.symbol('GOOG', group = 'Symbols', inline = 's02')
s03 = input.symbol('BKNG', group = 'Symbols', inline = 's03')
s04 = input.symbol('NIO', group = 'Symbols', inline = 's04')
s05 = input.symbol('NVDA', group = 'Symbols', inline = 's05')
s06 = input.symbol('SPY', group = 'Symbols', inline = 's06')
s07 = input.symbol('QQQ', group = 'Symbols', inline = 's07')
s08 = input.symbol('DIA', group = 'Symbols', inline = 's08')
s09 = input.symbol('IWM', group = 'Symbols', inline = 's09')
s10 = input.symbol('LCID', group = 'Symbols', inline = 's10')
s11 = input.symbol('PTON', group = 'Symbols', inline = 's11')
s12 = input.symbol('PLUG', group = 'Symbols', inline = 's12')
s13 = input.symbol('PLTR', group = 'Symbols', inline = 's13')
s14 = input.symbol('TSLA', group = 'Symbols', inline = 's14')
s15 = input.symbol('AMZN', group = 'Symbols', inline = 's15')
s16 = input.symbol('AAPL', group = 'Symbols', inline = 's16')
s17 = input.symbol('BA', group = 'Symbols', inline = 's17')
s18 = input.symbol('VXX', group = 'Symbols', inline = 's18')
s19 = input.symbol('OXY', group = 'Symbols', inline = 's19')
s20 = input.symbol('JNJ', group = 'Symbols', inline = 's20')
Just replace with the ticker that you would prefer!
Major Session Highs/LowsThis indicator creates horizontal lines at major session high/lows (US, London, and Asian). The script updates the lines automatically, on session close.
For instance, when viewing during the US session, after the London overlap, horizontal lines will be displayed at the following levels.
The high/low of the most recent London session.
The high/low of the most recent Asian session.
The high/low of the last full US session, i.e. the session of the day prior.
When the current US session closes, the US levels automatically update.
Merged: Range Filter & Smart Envelope//@version=5
indicator("Merged: Range Filter & Smart Envelope", overlay=true, max_lines_count=500, max_labels_count=500)
// ==================== Range Filter Settings ====================
// Color variables
upColor = color.white
midColor = #90bff9
downColor = color.blue
// Source
src = input(defval=close, title="Source")
// Sampling Period
per = input.int(defval=100, minval=1, title="Sampling Period")
// Range Multiplier
mult = input.float(defval=3.0, minval=0.1, title="Range Multiplier")
// Smooth Average Range
smoothrng(x, t, m) =>
wper = t * 2 - 1
avrng = ta.ema(math.abs(x - x ), t)
smoothrng = ta.ema(avrng, wper) * m
smoothrng
smrng = smoothrng(src, per, mult)
// Range Filter
rngfilt(x, r) =>
rngfilt = x
rngfilt := x > nz(rngfilt ) ? x - r < nz(rngfilt ) ? nz(rngfilt ) : x - r :
x + r > nz(rngfilt ) ? nz(rngfilt ) : x + r
rngfilt
filt = rngfilt(src, smrng)
// Filter Direction
upward = 0.0
upward := filt > filt ? nz(upward ) + 1 : filt < filt ? 0 : nz(upward )
downward = 0.0
downward := filt < filt ? nz(downward ) + 1 : filt > filt ? 0 : nz(downward )
// Target Bands
hband = filt + smrng
lband = filt - smrng
// Colors
filtcolor = upward > 0 ? upColor : downward > 0 ? downColor : midColor
barcolor = src > filt and src > src and upward > 0 ? upColor :
src > filt and src < src and upward > 0 ? upColor :
src < filt and src < src and downward > 0 ? downColor :
src < filt and src > src and downward > 0 ? downColor : midColor
filtplot = plot(filt, color=filtcolor, linewidth=2, title="Range Filter")
// Target
hbandplot = plot(hband, color=color.new(upColor, 70), title="High Target")
lbandplot = plot(lband, color=color.new(downColor, 70), title="Low Target")
// Fills
fill(hbandplot, filtplot, color=color.new(upColor, 90), title="High Target Range")
fill(lbandplot, filtplot, color=color.new(downColor, 90), title="Low Target Range")
// Bar Color
barcolor(barcolor)
// Break Outs
longCond = bool(na)
shortCond = bool(na)
longCond := src > filt and src > src and upward > 0 or
src > filt and src < src and upward > 0
shortCond := src < filt and src < src and downward > 0 or
src < filt and src > src and downward > 0
CondIni = 0
CondIni := longCond ? 1 : shortCond ? -1 : CondIni
longCondition = longCond and CondIni == -1
shortCondition = shortCond and CondIni == 1
// ==================== Smart Envelope with Stochastic RSI ====================
h_env = input.float(8., 'Bandwidth', minval = 0)
mult_env = input.float(3., minval = 0)
repaint = input(true, 'Repainting Smoothing')
// Stochastic RSI Settings
smoothK = input.int(3, "K", minval=1)
smoothD = input.int(3, "D", minval=1)
lengthRSI = input.int(14, "RSI Length", minval=1)
lengthStoch = input.int(14, "Stochastic Length", minval=1)
rsi1 = ta.rsi(src, lengthRSI)
k = ta.sma(ta.stoch(rsi1, rsi1, rsi1, lengthStoch), smoothK)
d = ta.sma(k, smoothD)
// Nadaraya-Watson Envelope Functions
gauss(x, h) => math.exp(-(math.pow(x, 2)/(h * h * 2)))
var coefs = array.new_float(0)
var den = 0.
if barstate.isfirst and not repaint
for i = 0 to 499
w = gauss(i, h_env)
coefs.push(w)
den := coefs.sum()
out = 0.
if not repaint
for i = 0 to 499
out += src * coefs.get(i)
out /= den
mae = ta.sma(math.abs(src - out), 499) * mult_env
upper_env = out + mae
lower_env = out - mae
// Compute and display NWE
n = bar_index
var float y2 = na
var float y1 = na
nwe = array.new(0)
if barstate.islast and repaint
sae = 0.
for i = 0 to math.min(499,n - 1)
sum = 0.
sumw = 0.
for j = 0 to math.min(499,n - 1)
w = gauss(i - j, h_env)
sum += src * w
sumw += w
y2 := sum / sumw
sae += math.abs(src - y2)
nwe.push(y2)
sae := sae / math.min(499,n - 1) * mult_env
for i = 0 to math.min(499,n - 1)
if i % 2
line.new(n-i+1, y1 + sae, n-i, nwe.get(i) + sae, color=color.teal)
line.new(n-i+1, y1 - sae, n-i, nwe.get(i) - sae, color=color.red)
y1 := nwe.get(i)
// Plot Nadaraya-Watson Envelope
plot(repaint ? na : out + mae, 'Upper Envelope', color=color.teal)
plot(repaint ? na : out - mae, 'Lower Envelope', color=color.red)
// Stochastic RSI Plot
plot(k, "Stochastic RSI K", color=color.blue)
plot(d, "Stochastic RSI D", color=color.orange)
h0 = hline(80, "Upper Band", color=color.gray)
hline(50, "Middle Band", color=color.new(color.gray, 50))
h1 = hline(20, "Lower Band", color=color.gray)
fill(h0, h1, color=color.rgb(33, 150, 243, 90), title="Stochastic RSI Background")
// ==================== Combined Signal Logic ====================
// Enhanced Signal Confirmation
ma_length = input.int(20, "Filter Moving Average Length", minval=1)
ma = ta.sma(close, ma_length)
// Combined Buy Signal: Range Filter + Stochastic RSI + Envelope
combined_buy = (longCondition or (ta.crossover(k, d) and close > upper_env)) and close > ma
combined_sell = (shortCondition or (ta.crossunder(k, d) and close < lower_env)) and close < ma
// Plot combined signals with higher priority
plotshape(combined_buy, "Combined Buy", shape.labelup, location.belowbar, color=color.green, size=size.normal, text="STRONG BUY")
plotshape(combined_sell, "Combined Sell", shape.labeldown, location.abovebar, color=color.red, size=size.normal, text="STRONG SELL")
// Original signals (lower priority)
plotshape(longCondition and not combined_buy, "Buy Signal", shape.labelup, location.belowbar, color=color.lime, size=size.small, text="BUY")
plotshape(shortCondition and not combined_sell, "Sell Signal", shape.labeldown, location.abovebar, color=color.maroon, size=size.small, text="SELL")
// Plot the moving average filter line
plot(ma, "Filter MA", color=color.purple, linewidth=2)
// Alerts
alertcondition(combined_buy, title="Strong Buy Alert", message="Strong Buy Signal")
alertcondition(combined_sell, title="Strong Sell Alert", message="Strong Sell Signal")
Lot Size (USD)Calculate lot size and stop loss from the actual price to the stop loss that you enter manually. Only for Forex pairs with USD