Pine Script®指标
指标和策略
TPO Profile: Gradient HeatmapTPO for a specific session like RTH since TradingView's default one doesn't allow you to do that. You can change the session time and periods.
8 works good for row height on ES
40 works good for row height on NQ
TradingView limits the number of boxes drawn to 500, so if you want more profiles going back in history, you need to increase the row height. If you want more detail but less days back, reduce row height
Pine Script®指标
Swing Trading Low Risk Entry PinescreenerSwing Trading Low Risk Entry – Pine Screener
Created by Colin Rogers
Last Update: Feb 13, 2026
Description:
This script is built for Pine Screener only. It provides clean numeric columns to help identify low-risk swing trading setups using ATR and moving average reclaim signals.
Unfortunately, pinescreener to my knowledge does not allow automatic updates to the screener unless you hit scan button (tradestation does this well w/ radar screen)
What It Shows:
1) % ∆ LOD
Measures how far price closed off the low of the day as a percentage of ATR(10).
Formula:
(close - low) / ATR(10)
Lower values mean price closed near the low relative to volatility. Useful for avoiding entries when a stock has already moved its full average move for the day (from Jeff Sun)
2) ATR Distance from 50 SMA
Shows how many ATRs price is above or below the 50-day SMA.
Formula:
(close - 50 SMA) / ATR(10)
Helps avoid buying over-extended stocks
good rule of thumb is ideally avoid stocks above 4x atr from the 50 sma
3) U&R Flags (10 / 20 / 50 / 100 SMA)
Triggers when price undercuts a moving average and closes back above it, or reclaims it after closing below the prior day.
Each moving average outputs its own screener column and returns 1 when active.
Intended Use:
Use in Pine Screener to filter for:
• Stocks near the 50-day SMA
• Controlled pullbacks
• Moving average reclaim setups
Designed for structured swing entries with defined risk.
Pine Script®指标
150 MA - Entry & Exit on Second CloseA moving average indicator that confirms trend direction with two consecutive closes before signaling entries and exits.
Features three customizable moving averages (50, 150, 200), optional weekly MAs (50W, 200W), visual entry/exit arrows, 50/150 crossover detection, and a real-time position status box.
The 150 MA acts as the key decision line - entry signals appear after two consecutive higher closes above it, exit signals after two consecutive lower closes below it.
Pine Script®指标
Current 15m Candle CPI TRADE📌 Indicator Description
Current 15m Candle +50 / +86 Levels
This indicator is specifically designed for trading high-impact news events such as CPI releases.
It dynamically calculates expansion levels from the currently forming 15-minute candle, projecting potential volatility targets during news spikes.
🔎 How It Works
During events like the Consumer Price Index (CPI):
The market often makes aggressive breakout moves.
This indicator tracks the live 15-minute candle.
It projects:
🔵 High + 50 points
🔵 High + 86 points
🔴 Low − 50 points
🔴 Low − 86 points
These levels act as volatility expansion targets during the news reaction.
⚡ Key Features
Works only on the 15-minute timeframe
Shows levels from the live candle only
Automatically removes previous levels
Keeps the chart clean (no historical clutter)
Adjustable point settings
Custom horizontal extension
🎯 Purpose
Built for:
CPI breakout trading
News volatility scalping
Fast momentum trades
Target projection during macro releases
This tool helps traders react quickly to inflation-driven market moves by providing clear expansion targets in real time.
Pine Script®指标
Volatility Regime Clustering# Volatility Regime Clustering (VRC) - Intelligent Volatility Classification
## The Problem
Most traders use the same position size regardless of market conditions. This leads to excessive risk during high volatility periods and missed profits during calm periods. Standard volatility indicators (ATR, Bollinger Bands) show current values but don't automatically classify market regimes.
## The Solution
**Volatility Regime Clustering** uses a machine learning algorithm (k-means clustering) to automatically identify volatility regimes based on historical data. The indicator independently finds boundaries between calm, normal, and nervous markets for each trading instrument.
## How It Works
### Technical Implementation
1. **Volatility Normalization**: ATR is converted to basis points for comparability across instruments with different prices.
2. **K-means Clustering**:
- The indicator analyzes the last N bars (default 200)
- Automatically groups historical ATR values into 2-4 clusters
- Cluster centroids are evenly distributed from minimum to maximum volatility
- The algorithm iteratively refines cluster boundaries every 5 bars
3. **False Signal Protection**:
- Threshold-based smoothing: regime changes only after 3+ consecutive confirmations
- Empty cluster protection with automatic reinitialization
- Warmup period to accumulate sufficient history
4. **Guaranteed Order**:
- Regime 0 always = low volatility
- Regime 1 always = medium volatility
- Regime 2 always = high volatility
- Regime 3 always = extreme volatility
## Visualization
- 🟢 **Green Background**: Low volatility - calm market, full position size recommended
- 🟡 **Yellow Background**: Medium volatility - standard conditions, 75-80% of normal risk recommended
- 🟠 **Orange Background**: High volatility - nervous market, reduce risk to 40-50%
- 🔴 **Red Background**: Extreme volatility - panic/news, minimum risk 25% or stay out
**Info Panel** (top right corner) displays:
- Current volatility regime
- ATR in basis points
- Current cluster center (regime mean value)
- Deviation from cluster center (how close to regime transition)
- Regime stability (% of time in current state)
- Recommended risk multiplier
- Recommended position size in %
## How to Use
### Basic Approach (Risk Management)
1. Add the indicator to any asset chart
2. Wait for warmup period completion (requires minimum 200 bars of history)
3. Monitor background color and recommendations table
4. Adjust position size according to risk multiplier
**Example**:
- You normally risk 2% of capital per trade
- Indicator shows "Risk Multiplier: 0.50x" (orange/red regime)
- Reduce risk to 1% (2% × 0.5 = 1%)
### Advanced Usage
**Entry Filtering**:
- Enter positions only in green/yellow regimes
- Avoid new positions during red background
**Open Position Management**:
- When transitioning to high volatility, move stop-losses further
- In calm regimes, use more aggressive take-profits
**Options Strategies**:
- High volatility → sell options (elevated premium)
- Low volatility → buy options before potential expansion
## Settings
### Main Parameters
- **ATR Length** (14): ATR calculation period. Lower = faster reaction, higher = smoother
- **Clustering Lookback** (200): number of bars for algorithm training. Recommended 150-300
- **Number of Regimes** (3): number of volatility regimes (2-4)
- 2 regimes: simple "calm/nervous"
- 3 regimes: "low/medium/high" (recommended)
- 4 regimes: adds "extreme" regime for rare events
- **Regime Smoothing** (3): number of confirmation bars for regime change. Higher = fewer false switches
### Visual Settings
- **Show Background Color**: enable/disable colored background
- **Show Regime Labels**: display labels on chart when regime changes
- **Show Risk Adjustment Info**: show/hide info panel
- **Info Panel Size**: panel font size (Tiny/Small/Normal/Large)
- **Colors**: customize colors for each regime
## What Makes It Different
Unlike existing volatility indicators:
1. **Automatic Adaptation**: no manual threshold configuration needed for each asset
2. **Machine Learning**: uses k-means clustering instead of fixed percentiles
3. **Self-Learning**: regime boundaries recalculated based on rolling window history
4. **Specific Recommendations**: not just volatility level display, but precise numerical multiplier for position sizing
5. **Noise Protection**: threshold-based smoothing prevents chaotic regime switching
6. **Universality**: ATR normalization allows application across any instruments (forex, stocks, crypto)
## Limitations
- Requires minimum 200 bars of history for correct operation
- On very low timeframes (M1-M5) may be overly sensitive
- Indicator reacts with slight delay due to smoothing (this protects against false signals)
## Recommendations
- **Intraday Trading**: use on H1-H4 with default parameters
- **Swing Trading**: increase Clustering Lookback to 300-500 bars
- **Scalping**: reduce Regime Smoothing to 1-2 and ATR Length to 7-10
- **Combination with Other Indicators**: use VRC as a risk filter on top of your main strategy
## Alerts
The indicator supports three alert types:
- **Regime Change**: any volatility regime change
- **Extreme Volatility**: entry into extreme volatility regime
- **Low Volatility**: entry into low volatility regime
---
**Important**: This indicator is a risk management tool, not a trading system. Use it in combination with a proven entry and exit strategy.
Pine Script®指标
Pro RSI + Stoch + ATR Dashboard (MASTER) by AliMulti-Timeframe Momentum + Volatility Alignment System
Trend Filtered MASTER Signals
Designed for Structured, Discipline-Based Trading
Pro RSI + Stoch + ATR Dashboard (MASTER) by Ali
Full Mathematical Logic & Professional Usage Guide
This indicator is a multi-timeframe momentum and volatility dashboard designed to combine:
RSI (Trend & Strength)
Stochastic (Timing & Trigger)
ATR & ATR% (Volatility & Risk Control)
Alignment Scoring (Market Structure Confirmation)
MASTER Signal Logic (Filtered Trade Execution)
The goal is simple:
Reduce overtrading.
Eliminate counter-trend entries.
Trade only when momentum alignment confirms structure.
1️⃣ Core Indicators & Mathematical Foundation
🔹 RSI (Relative Strength Index)
RSI measures the ratio between average gains and average losses over a defined period.
Formula:
RSI = 100 −
RS = Average Gain / Average Loss
Default Length: 14
Key Level:
RSI ≥ 50 → bullish momentum bias
RSI < 50 → bearish momentum bias
In this system, RSI 50 is used as:
Trend filter
Alignment scoring basis
🔹 Stochastic (K & D)
Stochastic measures where price closes relative to its recent range.
K line = smoothed momentum line
D line = signal line (smoothed K)
Default:
Length = 14
K smoothing = 3
D smoothing = 3
Trigger logic:
K crossing above D → bullish short-term trigger
K crossing below D → bearish short-term trigger
⚠ Stochastic alone does NOT generate signals.
It only acts as a timing mechanism inside MASTER logic.
🔹 ATR (Average True Range)
ATR measures market volatility.
True Range (TR) =
max(High−Low, |High−PrevClose|, |Low−PrevClose|)
ATR = Moving average of TR over N periods
Default Length: 14
ATR% = (ATR / Close) × 100
Why ATR% matters:
Higher ATR% → wider stops required
Lower ATR% → tighter structure, breakout potential
2️⃣ Multi-Timeframe Structure (MTF Logic)
The dashboard evaluates 4 timeframes simultaneously:
15m → Entry & Timing
1H → Short-term bias
4H → Structural trend
1D → Market regime
Each timeframe displays:
RSI
Stoch K/D
ATR
Status
This allows structured decision making instead of single-timeframe guessing.
3️⃣ MASTER Logic (Trend + Alignment + Trigger)
A MASTER signal is generated ONLY when all three layers align:
🔹 1) Trend Filter (RSI 50 on selected TF)
User selects Trend TF (1H / 4H / 1D)
If RSI ≥ 50 → LONG ONLY
If RSI < 50 → SHORT ONLY
This prevents counter-trend trading.
tr.tradingview.com
🔹 2) Alignment Score (MTF Confirmation)
Alignment counts how many timeframes have RSI ≥ 50.
bullCount = sum of bullish RSI conditions (0–4)
Score% = (bullCount / 4) × 100
Example:
4/4 (100%) → Full bullish alignment
2/4 (50%) → Mixed / chop conditions
0/4 (0%) → Full bearish regime
This prevents trading in unstable market environments.
tr.tradingview.com
🔹 3) Trigger (15m Stoch Cross)
Entry confirmation uses:
15m K crossing above D → bullish trigger
15m K crossing below D → bearish trigger
4️⃣ MASTER BUY / SELL Conditions
MASTER BUY:
Trend = LONG ONLY
bullCount ≥ Min Bull TF setting
15m Stoch bullish cross
MASTER SELL:
Trend = SHORT ONLY
bullCount ≤ Max Bull TF setting
15m Stoch bearish cross
This ensures:
Trend + Structure + Timing = One controlled signal.
5️⃣ Reading the Dashboard Table
Columns:
TIME → timeframe
RSI → momentum strength
K / D → stochastic timing
ATR → volatility
STATUS → simplified momentum state
STATUS is informational only.
It does NOT replace MASTER logic.
6️⃣ Center Info Label Explained
Displays:
TREND → Active direction filter
ALIGN → MTF momentum strength
ATR% → Volatility intensity across TFs
Professional usage:
ALIGN ≥ 75% → Strong trend continuation
ALIGN ≤ 50% → Chop / mean reversion zone
High ATR% → Adjust risk and position size
Low ATR% → Breakout probability increases
7️⃣ Recommended Settings by Trader Type
🔹 General / Balanced:
Trend TF: 4H
Min Bull BUY: 3
Max Bull SELL: 1
🔹 Intraday:
Trend TF: 1H or 4H
Min Bull BUY: 2–3
Max Bull SELL: 1–2
🔹 Scalper:
Trend TF: 1H
Min Bull BUY: 2
Max Bull SELL: 2
🔹 Swing:
Trend TF: 1D
Min Bull BUY: 3
Max Bull SELL: 1
8️⃣ Professional Trade Workflow
Check TREND first
Confirm ALIGN strength
Wait for 15m trigger
Enter with structure-based stop
Adjust position size using ATR%
This indicator is a structured decision framework, not a random signal generator.
Built for traders who value structure over impulse.
⚠ Risk Disclaimer This tool enhances structure and discipline. It does not predict markets. Best performance occurs in aligned trending environments.
Pine Script®指标
Futures Circuit Breaker Halt DetectorFutures Circuit Breaker Halt Detector. In Extreme volatility keeps you from breaching prop firm rules.
Pine Script®指标
EMA Cross with MTF Understanding EMA Crossover and Multi-Time Frame SMA Crossover in Technical Analysis
Technical indicators like Exponential Moving Averages (EMAs) and Simple Moving Averages (SMAs) are foundational tools for traders to identify trends, momentum shifts, and potential entry/exit points in markets such as stocks, forex, or cryptocurrencies. Crossovers—where one average line crosses another—signal changes in trend direction. Below, I'll break down EMA crossovers, then extend to multi-time frame (MTF) SMA crossovers, and explain how analyzing from a lower time frame can reveal higher time frame trends.
EMA Crossover: Basics and Application
An EMA crossover involves two or more EMAs of different periods intersecting on a price chart. EMAs give more weight to recent prices compared to SMAs, making them more responsive to new data and ideal for capturing short- to medium-term trends.
How It Works:
Typically, traders use a short-term EMA (e.g., 9-period or 12-period) and a longer-term EMA (e.g., 26-period or 50-period).
Golden Cross (Bullish Signal): When the shorter EMA crosses above the longer EMA, it suggests upward momentum and a potential buy opportunity. This indicates that recent price action is stronger than the historical average.
Death Cross (Bearish Signal): When the shorter EMA crosses below the longer EMA, it signals downward momentum and a potential sell or short opportunity.
Example: On a daily chart, a 12-period EMA crossing above a 26-period EMA might confirm the start of an uptrend, often used in strategies like the MACD (which is derived from EMA differences).
Advantages:
Quick response to price changes due to exponential weighting.
Reduces lag compared to SMAs, helping in volatile markets.
Can be combined with volume or other indicators (e.g., RSI) to filter false signals.
Limitations:
Prone to whipsaws (false crossovers) in sideways or ranging markets.
Best suited for trending environments; in choppy conditions, it may generate too many signals.
Traders often apply EMA crossovers on single time frames, but for broader context, incorporating multi-time frame analysis enhances reliability.
Multi-Time Frame SMA Crossover: Integrating Broader Perspectives
Multi-time frame (MTF) analysis involves examining the same asset across different time intervals (e.g., 5-minute, 1-hour, daily) to align short-term trades with longer-term trends. Here, we focus on SMA crossovers, where SMAs—simple arithmetic averages of closing prices over a set period—are used instead of EMAs. SMAs are smoother and less reactive, making them suitable for identifying sustained trends.
How It Works in MTF:
Choose at least two time frames: a lower one (e.g., 15-minute for intraday trading) and a higher one (e.g., 4-hour or daily for overall trend).
On each frame, plot two SMAs: a shorter one (e.g., 50-period) and a longer one (e.g., 200-period).
Crossover Signals:
Bullish: Shorter SMA crosses above the longer SMA.
Bearish: Shorter SMA crosses below the longer SMA.
In MTF, the higher time frame dictates the dominant trend, while the lower one provides precise entry timing. For instance:
If the daily chart shows a bullish 50/200 SMA crossover (uptrend), look for buy entries on the 1-hour chart when its own SMA crossover aligns.
This "top-down" approach ensures you're trading in the direction of the bigger picture, reducing counter-trend risks.
Advantages:
Filters noise: Higher time frames smooth out short-term volatility.
Improves win rate by confirming trends across scales.
Versatile for strategies like swing trading (daily/weekly) or scalping (5-min/15-min).
Limitations:
SMAs lag more than EMAs, potentially missing early trend entries.
Requires monitoring multiple charts, which can be time-intensive without automation.
Viewing Higher Time Frame Trends from a Lower Time Frame
One of the key benefits of MTF analysis is the ability to "see" higher time frame trends directly on a lower time frame chart, without switching views constantly. This is achieved through anchored or overlaid indicators that project higher-period data onto the lower chart.
How It Enables Trend Tracking:
Overlay Technique: On a lower time frame (e.g., 15-minute), plot SMAs or EMAs calculated from higher time frame data. For example:
Use a 50-period SMA on a daily chart, but recalculate it for the 15-minute chart by multiplying periods (since there are about 96 15-minute bars in a trading day, a daily 50-SMA might approximate to a 4800-period SMA on 15-min).
Tools like TradingView allow "higher time frame" scripts to fetch and display this directly.
Trend Visibility: From the lower frame, you can observe if the price is above/below the higher-frame SMA, indicating the overall trend. A crossover on the lower frame that aligns with the higher frame's direction confirms momentum.
Example: On a 5-minute chart (lower TF), if the overlaid daily 200-SMA acts as support (price bounces off it), it shows the higher TF uptrend is intact, even amid intraday dips. This helps avoid selling into a pullback during a broader bull market.
Practical Benefits:
Early Detection: Lower TFs show granular price action, revealing how higher TF trends are forming in real-time (e.g., a building crossover on daily visible as momentum buildup on hourly).
Risk Management: Use higher TF levels for stop-losses while entering on lower TF signals.
Example Strategy: In forex, on a 1-hour chart, confirm the 4-hour SMA trend is bullish, then wait for a 1-hour EMA crossover for entry. This way, you're "zooming in" on the big trend without losing context.
Pine Script®指标
SMA 5/34 BlueSMA 534 Blue = Awesome Oscillator (AO)
Simple SMA crossover indicator with both 5-period and 34-period SMAs in blue, thin lines for a clean chart view. No arrows, no clutter – just smooth trend lines.
Pine Script®指标
multi assett 12344this is a multi asset chart, testing out the difference between trending and signals.
not yet finished but will be soon
testtttttttttt
Pine Script®指标
VWAP (ARCHI)VWAP Bands — Volume Weighted Average Price with Deviation Bands
Overview
**VWAP Bands** is an advanced VWAP indicator featuring automatic standard deviation bands (±1σ, ±2σ, ±3σ), multiple anchor period options, and fully customizable visuals. Designed for intraday and swing traders who use volume-weighted levels for decision-making.
🔑 Key Features
📐 **Anchored VWAP** — Choose your reset period: Session (default), Week, Month, Quarter, or Year. VWAP resets at the beginning of each period.
📊 **Deviation Bands** — Three levels of standard deviation bands (±1σ, ±2σ, ±3σ) highlight statistical zones of overextension relative to the volume-weighted mean price.
🎨 **Full Customization** — Adjustable colors, line widths, band fills, and edge labels. Toggle each band on/off independently.
📍 **Previous VWAP Close** — Optionally display the closing VWAP level from the previous session as a key reference point.
📈 How to Use
Identifying Value Zones
- Price **at VWAP** = fair value. Institutional traders benchmark execution quality against VWAP.
- Price **above VWAP** = buyers in control, bullish bias.
- Price **below VWAP** = sellers in control, bearish bias.
Mean Reversion Trading
- Price touches **±2σ** = extreme deviation, look for a reversal back to VWAP.
- Price touches **±3σ** = very rare event, high probability of a pullback.
- **±1σ** = normal volatility range, not a standalone signal.
Trend vs Range
- **Trending market**: Price stays on one side of VWAP, bands widen.
- **Ranging market**: Price oscillates around VWAP, bands contract.
### Confluence Trading
Combine VWAP Bands with horizontal support/resistance levels. When a VWAP band aligns with a key level — that's a high-probability zone for entries.
⚙️ Settings
| Parameter | Default | Description |
|-----------|---------|-------------|
| Anchor Period | Session | VWAP reset period (Session/Week/Month/Quarter/Year) |
| Source | hlc3 | Price source (hlc3, close, ohlc4) |
| Band 1 Multiplier | 1.0 | First band (±1σ) |
| Band 2 Multiplier | 2.0 | Second band (±2σ) |
| Band 3 Multiplier | 3.0 | Third band (±3σ) |
| Fill Bands | ✅ | Color fill between bands |
| Show Labels | ✅ | Labels at band edges |
| Prev VWAP Close | ❌ | Previous session VWAP close level |
💡 Tips
1. **Intraday (M5–H1):** Use Anchor = Session. VWAP resets daily.
2. **Swing (H4–D1):** Use Anchor = Week or Month for broader context.
3. **Forex/Gold:** Source `hlc3` provides the closest approximation to tick-based VWAP.
4. **Stocks:** Session VWAP matches the standard institutional benchmark.
⚠️ Note
This indicator calculates VWAP from bar data (OHLCV), not tick data. On lower timeframes (M1–M5), accuracy is near-perfect. On higher timeframes (H4+), slight deviations from tick-based VWAP may occur — this is a fundamental limitation of bar-based calculation.
Pine Script®指标
Day trade futures - ES VWAP Pullback v2.0 [Signals]ES VWAP Institutional Pullback v2.0
—— STRATEGY VERSION ——
A futures day-trading system built specifically for /ES (S&P 500 E-mini) on the 5-minute timeframe. Designed around the premise that institutional algorithms benchmark entries against VWAP and that the highest-probability trades come from entering trend continuations after pullbacks — not from predicting reversals.
This is not a typical MACD crossover strategy. Every component is filtered and confirmed before a signal fires.
█ HOW IT WORKS
The system requires four conditions to align before entering a trade:
1. Higher-Timeframe Trend Confirmation
Uses a 50 EMA pulled from the 15-minute chart via request.security(). Price must be above this EMA for longs, below for shorts. This replaces the common approach of plotting a 200 EMA on the entry timeframe, which on a 5-minute chart represents ~17 hours of data and reacts too slowly to intraday regime changes.
2. VWAP Institutional Bias
Price must be above the session VWAP for longs, below for shorts. VWAP is the benchmark institutional algorithms use to evaluate execution quality. Trading in the direction of VWAP bias aligns your entries with the dominant order flow.
3. MACD Histogram Reversal (Not Raw Crossover)
Rather than entering on a standard MACD line crossover (which lags significantly on short timeframes), the system detects when the MACD histogram flips from negative to positive territory after being negative for at least two consecutive bars. This catches the exact moment selling pressure exhausts and buying momentum resumes — typically 1–3 bars earlier than a traditional crossover.
4. Volume Spike Confirmation
The entry bar must have volume ≥ 1.2× its 20-bar simple moving average. A MACD histogram flip on thin volume is noise. Requiring a volume spike confirms that institutional participation is actually present at the reversal point.
█ SESSION FILTER
Futures trade nearly 24 hours, but VWAP-based strategies degrade outside Regular Trading Hours when volume thins and price action becomes erratic. The system enforces a hard session window of 9:30 AM – 3:30 PM Eastern by default. All positions are automatically closed at session end if the EOD close option is enabled.
█ RISK MANAGEMENT
Dynamic ATR-Based Stops
Stop loss is calculated as 1.5× the 14-period ATR at the moment of entry. During volatile opens, your stop widens to give the trade room. During quiet midday action, it tightens to protect capital. This replaces fixed-point stops that get hunted during volatility expansion.
Partial Profit at 1R
When price reaches 1× your initial risk (the 1R level), 50% of the position is closed automatically. This locks in profit and reduces psychological pressure on the remaining runner.
Trailing Stop
After reaching the 1R trigger, a trailing stop activates at 0.75× ATR behind the current price. It only moves in your favor — never backward. This lets winners run in trending sessions while protecting gains.
Full Take Profit at 2R
The remaining position targets 2× the initial risk. Combined with the partial at 1R, the effective average exit on a full winner is approximately 1.5R.
█ BACKTEST REALISM
The strategy models:
• $2.50 per contract commission (round-trip ~$5.00, typical for /ES)
• 2-tick slippage ($25 per contract)
• No fills on close — orders process on the next bar
This matters. Many published strategies show inflated results because they assume zero friction. The performance you see in the Strategy Tester should be closer to what you would actually experience.
█ DASHBOARD
A real-time info table displays:
• Current HTF trend direction
• VWAP bias (above/below)
• Current ATR value
• Volume ratio vs. SMA (with color coding for spike detection)
• Session status (active/closed)
• Position status
• MACD histogram value
█ SETTINGS GUIDE
Inputs are grouped logically. Key tuning parameters:
Volume Multiple (default 1.2×) — Lower to 1.0× if you're getting too few signals in quieter sessions. Raise to 1.5× for stricter filtering.
HTF Timeframe (default 15m) — The 15-minute 50 EMA represents ~12.5 hours of trend data. You can try 30m for a slower, more conservative filter.
Trail Trigger (default 1.0R) — Set to 0.75R for more aggressive trailing. Set to 1.5R if you want the trail to activate later and give more room.
Trail Offset (default 0.75 ATR) — Lower values trail tighter (more likely to get stopped but lock more profit). Higher values give more room but risk giving back gains.
All filters (HTF, VWAP, Volume, Session) can be individually toggled off for testing which components add value in your specific market conditions.
█ WHAT THIS IS NOT
• This is not a scalping system. It targets 2R moves, not 2-tick scratches.
• This is not a reversal catcher. It trades pullbacks within established trends.
• This will not protect you from news events. Avoid FOMC, CPI, NFP, and other high-impact macro releases — no algorithm can predict those.
• This is not financial advice. Futures are leveraged instruments. Backtest results do not guarantee future performance.
█ RECOMMENDED USAGE
• Chart: /ES 5-minute
• Session: RTH only (9:30 AM – 3:30 PM ET)
• Avoid: 15 minutes before/after high-impact economic data
• Combine with: Level 2 / DOM for discretionary confirmation if available
—— INDICATOR VERSION ——
Same logic as the strategy but packaged as an indicator() for live discretionary trading:
• No backtest engine overhead — lighter on your chart
• Entry labels display exact SL, TP, and risk in points at signal time
• 1R level plotted in cyan for visual partial-profit reference
• Signal levels auto-expire after 50 bars or when SL/TP is hit
• Alert conditions registered for both long and short signals — configure through TradingView's alert dialog
Pine Script®指标
Premium Discount Range Daily with VWAPPremium Discount Range (Daily + VWAP):
This indicator provides a visual reference for price positioning relative to:
• The current day’s developing high/low range midpoint
• Session VWAP
It classifies price into three zones:
Premium → Price trading above midpoint threshold
Discount → Price trading below midpoint threshold
Fair Value → Price within the defined midpoint band
How It Works:
1. Tracks the current day's evolving high and low.
2. Calculates the intraday midpoint.
3. Compares current price to:
Midpoint (with adjustable percentage threshold)
VWAP
4. Displays status via:
Background shading
Optional live label
Use Cases:
• Intraday bias identification
• Context for pullback entries
• Range positioning analysis
• VWAP confluence assessment
Notes:
Designed for intraday charts.
Works across stocks, forex, crypto, and indices.
Does not generate trading signals or guarantee outcomes.
Use alongside proper risk management and confirmation tools.
Pine Script®指标
Candle Patterns Ver.3I am always studying strategies and one way to incorporate different strategies aiming to improve the chances to be on the right side of a trade.
This indicator has other indicators that together makes easy to spot a possible good trade.
It has:
- Bollinger Bands that give us the market volatility and can identify overbought or oversold levels;
- Stochastic: that give us market momentum and also overbought and oversold levels;
- Candle patterns: I just added the Pin bars(or Hammer at support) and Engulfing patterns. I noticed those 2 are the most reliable if spotted at the right place.
- Daily Trend direction: based on an EMA(200), one of the most reliable and used Moving averages.
- Round Numbers: This is always a good help before we place our trade to identify possible rejection levels or Support / Resistance levels.
So the idea here is, during the analysis, identify when a new candle open what was and where was the previous candle. I in general trade Daily charts and during tests I notice that when the previous bar closed at the lower BB, it was an Engulfing bar and the Stochastic %K was crossing %D below the 20 level I would say there is a 65 to 75% chance of the price move up, at least to test the middle BB. It is some kind of situation that does not happen very often but when happens is almost sure "money in the bank". So I added the Daily Trend as away to confirm the market direction or if it is just a pullback.
So to make my analysis easy and fast I added symbols telling me the story of the previous day like EG arrow for an engulfing bar, a big light blue arrow when the engulfing is close to the lower BB, an green(Stoch cross above below 20 level) and a red arrow(Stoch cross below at 80 level) with a TRUE text.
Of course it is not perfect but it helps me on my analysis. Also the Engulfing pattern can have different interpretations so keep that in mind. An I am working on make the arrows not appears on top of the others so be kind... :)
Please feel free to comment or criticize( in a good way).
You all have a great trading.
Pine Script®指标
Pine Script®指标
Pine Script®指标
VWAP Guppy (32 Days Structure)Introduction to the Volume Weighted Super Guppy Indicator
The Volume Weighted Super Guppy is a technical analysis indicator that builds on the traditional Guppy Multiple Moving Average (GMMA) by incorporating volume weighting, similar to how the Volume Weighted Average Price (VWAP) accounts for trading volume in price calculations. Developed as an enhancement to Daryl Guppy's original GMMA, this variant aims to provide a more robust signal by factoring in volume, which helps differentiate between price movements driven by high conviction (high volume) and those that are less significant. The "Super" aspect often refers to an optimized or expanded version of the standard Guppy setup, and the "30 days" likely alludes to the long-term moving average group, which typically starts at a 30-period EMA and extends upward, making it suitable for medium- to long-term trend analysis over roughly a month's worth of data (assuming daily charts).
Core Components and How It Works
The standard GMMA consists of two groups of exponential moving averages (EMAs):
Short-term group (representing traders' sentiment): Typically VWAP of 1 to 32 days . These react quickly to price changes and capture short-term momentum.
Long-term group (representing investors' sentiment): Typically VWAP of 1 to 32 days. These provide a smoother view of the underlying trend, with the 30-period EMA serving as the entry point into longer-term analysis.
In the Volume Weighted Super Guppy, each VWAP is adjusted to be volume-weighted, meaning the average price is calculated not just on closing prices but on a volume-adjusted basis (akin to VWAP's formula: Cumulative (Price × Volume) / Cumulative Volume). This weighting emphasizes periods of high trading activity, reducing the impact of low-volume price spikes or dips that might distort traditional EMAs. If volume data is unavailable (e.g., in certain markets like forex), a fallback to simple price-based EMAs is often implemented.
The indicator plots these multiple lines as "ribbons" on a price chart:
Short-term ribbons are usually colored differently (e.g., green for bullish, red for bearish) from long-term ones.
Convergence or divergence between the groups signals potential trend shifts, with volume weighting adding reliability by highlighting volume-backed moves.
How It Helps Track Trends
The Volume Weighted Super Guppy excels at identifying trend direction, strength, and potential reversals, making it a valuable tool for swing traders, trend followers, and investors monitoring 30-day or longer horizons. Here's how it aids in trend tracking:
Trend Direction Identification:
When the short-term EMA group is above the long-term group (starting from the 1 to 32 days VWAP), it indicates an uptrend. The volume weighting ensures this signal is stronger if supported by increasing volume, filtering out false breakouts.
Conversely, if the short-term group crosses below the long-term group, it signals a downtrend. This crossover is particularly useful over a 30-day rolling window, as it captures shifts from short-term volatility to sustained investor-driven moves.
Trend Strength Assessment:
Separation of Ribbons: Wide separation between the short- and long-term groups suggests a strong trend. For example, in a bullish scenario, expanding distance between the groups over 30 days indicates building momentum, often confirmed by higher volume in the weighted calculation.
Compression and Expansion: When the ribbons compress (lines bunch together), it signals consolidation or weakening trend strength, potentially foreshadowing a breakout. Volume weighting helps discern if the compression is due to low-interest trading (weaker signal) or building volume (stronger impending move).
Breakout and Reversal Anticipation:
The indicator anticipates breakouts when price and value (as captured by the volume-weighted EMAs) converge, especially around the 30-60 period long-term averages. A breakout above the long-term ribbon on rising volume can confirm a new uptrend.
For reversals, watch for the short-term group to "bounce" off the long-term group (e.g., acting as support in uptrends). Over 30 days, this can highlight trend exhaustion if volume diminishes.
Practical Application in a 30-Day Context:
On daily charts, the 1 to 32-days VWAP aligns with a monthly view, making it ideal for tracking intermediate trends. Traders can anchor the indicator to a specific date (similar to anchored VWAP) to analyze trends from key events, like earnings releases.
Combine with volume profiles or other indicators (e.g., RSI for overbought/oversold conditions) to validate signals. For instance, in a 30-day uptrend, if price pulls back to the long-term ribbon with low volume, it may present a buying opportunity.
Advantages and Limitations
Advantages: Volume integration makes it more responsive to market participation than standard GMMA, reducing false signals in volatile markets. It's versatile across assets like stocks, crypto, and forex, and particularly effective for trend-following strategies over 30+ days.
Limitations: It can lag in choppy, range-bound markets, and over-reliance on historical data (especially the 30-60 periods) may miss rapid intraday shifts. Always backtest on your specific timeframe and asset.
Pine Script®指标
Pine Script®指标
Regime Guard (Clean Background) - Free v1.0.1 [VBS]This indicator is built with one simple objective:
Help traders avoid trading when the market environment is unfavorable.
Instead of generating buy or sell signals, Regime Guard focuses on identifying whether the market is in a No-Trade (compression/choppy) condition or a Tradable (normal expansion) state.
It is designed to be used alongside trend or momentum tools — not as a standalone entry system.
What It Does
1) Detects Volatility Compression (Squeeze)
Using Bollinger Band Width percentile, the script identifies periods where volatility is unusually low compared to its recent history.
Low volatility often leads to:
False breakouts
Whipsaws
Overtrading losses
When compression is detected and trend strength is weak, the background turns gray, signaling a No-Trade environment.
2) Measures Trend Strength (DMI / ADX)
The script evaluates whether the market is trending or choppy using ADX.
Low ADX → weak structure, higher risk of random movement
Rising ADX → strengthening directional movement
This helps differentiate between:
Quiet compression
Genuine expansion
Market States
The indicator operates with clean, minimal states:
Gray Background → NO-TRADE
Market is compressed and trend strength is weak. Risk of chop is elevated.
Subtle Green Background → TRADABLE
Market conditions are normal and potentially suitable for setups.
No arrows.
No direction bias.
No false promises.
This tool is about environment filtering, not prediction.
Optional READY Hint
A “READY” event can be enabled to highlight when:
The market exits a squeeze
Or ADX begins rising above a defined threshold
By default, this marker is turned off to maintain a clean chart.
Important:
READY does not mean Buy or Sell.
It simply means market conditions may be shifting back toward tradable behavior.
How to Use It
A simple workflow:
Use a trend indicator to determine direction
Use a momentum tool for timing
Use Regime Guard to confirm the environment is tradable
If the background is gray, consider standing aside.
If conditions are tradable, then look for structured setups.
Why This Exists
Many traders don’t lose because of bad entries.
They lose because they trade in the wrong market conditions.
Regime Guard is designed to reduce that mistake.
It won’t tell you where to buy or sell.
It will help you decide when it makes sense to participate at all.
— VictoryByStrategy
Pine Script®指标
Operation Assistant (Replay Trading Helper)**Operation Assistant (Replay Trading Helper)**
This Pine Script is a visual execution helper designed for TradingView Bar Replay and discretionary practice. When you arm **BUY** or **SELL**, it triggers on the candle close and automatically calculates an **Entry** at the current bar’s close, a **Stop Loss** at the current bar’s wick (Low for BUY / High for SELL), and a **Take Profit** using a configurable **Risk-to-Reward (default RR=2)**. It then plots clear horizontal **ENTRY / SL / TP** lines and shows the exact prices in a compact on-chart panel, so you can copy them into the Trading panel quickly. No orders are sent—this tool is for faster manual execution and consistent risk structure during replay or live chart review.
Pine Script®指标
Pine Script®指标
Arbitrage Monitoring [ZurvanEG]⯁ Advanced Multi-Market Arbitrage & Liquidity Scanner
◇ Overview
This professional-grade analysis suite is designed to detect, validate, and visualize cross-exchange price inefficiencies in real-time. Unlike standard gap scanners, this engine employs a Statistical Validation Layer to filter out market noise, ensuring that only high-quality, actionable Arbitrage opportunities are presented.
Whether analyzing Crypto Assets across centralized exchanges or Forex & Commodities across top-tier brokers, this tool transforms fragmented liquidity data into a unified, actionable dashboard.
◈ Dual-Engine Architecture
The system adapts its scanning logic based on the asset class:
⬥ Crypto Mode: Scans a network of major CEXs (Binance, OKX, Kraken, etc.) with specific algorithms for USDT-paired volatility and volume weighting.
⬥ Forex Mode: Connects to premium liquidity providers (OANDA, Saxo, IC Markets) to monitor fiat pairs and Gold (XAUUSD), calibrated for tight spreads and high-frequency precision.
◈ Operational Modes & Scanning Logic
This system offers two distinct engine modes, allowing traders to switch between Deep Granular Analysis and Broad Market Surveillance:
⬥ Deep Dive (Chart Asset Focus)
⬦ Precision Analysis: This mode directs the full processing power of the script to the single asset currently displayed on your chart.
⬦ Dynamic Ticker Recognition: It automatically extracts the base asset (e.g., “BTC” from “BTCUSDT”) and instantly queries the entire network of supported exchanges (20+ sources) to find the absolute best Buy/Sell prices available globally.
⬥ Multi-Asset Scanner (Watchtower Mode)
⬦ Market-Wide Surveillance: Acts as a background radar system. Instead of focusing on one chart, it continuously monitors a user-defined “Asset Universe” (up to 5 custom instruments) simultaneously.
⬦ Resource Balancing: The engine intelligently allocates resources to track the spread quality for your entire watchlist in real-time, regardless of which symbol is currently on your chart.
◈ Smart Validation & Risk Engine
Unlike simple price-gap tools, this indicator employs a multi-layered Statistical Verification Engine to filter out noise and ensure actionable opportunities.
⬥ Z-Score Contextualization:
Instead of relying on fixed percentage thresholds, the engine calculates the Standard Deviation (Z-Score) of the current spread relative to its recent history. This distinguishes statistically significant anomalies from normal market volatility.
⬥ Stagnancy Protection (Anti-Freeze):
Automatically detects and quarantines exchanges with “frozen” data feeds. If a price remains unchanged for a user-defined number of bars, the source is flagged as stale to prevent false signals caused by API disconnects or illiquid order books.
⬥ Liquidity & Volume Filters:
Ensures that price gaps are backed by real market depth. The engine filters out “ghost” arbitrage opportunities on exchanges with insufficient volume, protecting traders from getting trapped in illiquid positions.
⬥ Stability Counters:
Requires an opportunity to persist for a minimum number of consecutive bars (Stability Bars) before validation. This rules out HFT (High-Frequency Trading) flickers and latency-based ghosts that are impossible to execute manually.
◈ Visualization Suite & Intelligent Dashboard
This indicator bridges the gap between raw data processing and visual decision-making, offering two synchronized layers of market insight:
⬥ The Arbitrage Cloud (Chart Overlay)
⬦ Spatial Spread Representation: Unlike traditional line indicators, this feature renders the arbitrage opportunity as a dynamic, semi-transparent cloud directly on your price chart. It visualizes the physical gap between the Global Best Buy Price (Lowest Ask) and the Global Best Sell Price (Highest Bid).
⬦ Contextual Volatility Analysis: By overlaying this cloud on the asset’s candles, traders can instantly assess the magnitude of the spread relative to current price action. You can visually correlate spread widenings with specific market events, support/resistance breakouts, or liquidity crunches without needing to look at a separate oscillator.
⬦ History Tracking
Instead of a fleeting snapshot, the Arbitrage Cloud renders the complete historical trajectory of price inefficiencies directly on your chart.
Contextual Backtesting: By plotting the cloud historically, you can visually backtest how spreads behave during specific market events (e.g., news releases, volatility spikes). This allows you to identify recurring patterns in liquidity fragmentation.
Visualizing Spread Expansion/Contraction: See exactly when opportunities opened and closed in the past. The cloud’s width dynamically reflects the magnitude of historical arbitrage windows, helping you distinguish between fleeting wicks and sustained profitable trends.
Correlation Analysis: Directly correlate spread widenings with price action (support/resistance, breakouts) to refine your entry and exit strategies based on proven historical behavior.
⬥ Command-Center Dashboard
A professional-grade, tabular overlay designed to act as your central monitoring station. It goes beyond simple data display to provide actionable metrics:
⬦ Micro-Trend Sparklines: Integrated mini-charts within the table columns visualize the recent trajectory of the spread over the last Nbars. This allows you to identify whether an opportunity is expanding (opening up) or compressing (closing down) at a glance, without changing your chart timeframe.
⬦ Net Profit & ROI Logic: The dashboard includes a sophisticated Fee Adjustment Engine. Instead of showing theoretical “Gross Profit,” it optionally deducts user-defined trading fees (e.g., 0.1% maker/taker) and transfer costs. This presents the “True Net Profit,” filtering out opportunities that look good on paper but are unprofitable after costs.
⬦ Composite Quality Scoring (0-100): To simplify decision-making, the engine synthesizes multiple data points into a single “Quality Score.”
◈ Alert System
Receive alerts only for opportunities that pass all validation filters (Z-Score, Stability, Volume). A built-in Smart Cooldown prevents notification spam, ensuring each alert is a distinct, actionable event.
Every notification includes the essential data:
⬦ Asset & Spread %
⬦ Specific Buy/Sell Venues
◈ Conclusion
The Arbitrage Monitoring represents a paradigm shift from standard retail indicators to institutional-grade market analysis. By synthesizing real-time liquidity fragmentation, statistical rigor (Z-Score), and cross-venue data aggregation, this engine solves the primary challenge of modern trading: Data Reliability. It does not merely flag price differences; it mathematically validates the quality and executability of those inefficiencies before they appear on your screen.
For the discretionary trader, it acts as a Market Truth Revealer, exposing the hidden liquidity mechanics behind a single candle. For the quantitative arbitrageur, it serves as a robust Signal Validation Layer, filtering out latency noise to isolate genuine alpha.
Whether deployed for High-Frequency Scalping in Crypto or Precision Hedging in Forex, this tool transforms the chaotic landscape of global pricing into a structured, actionable, and visually intuitive roadmap. It is the ultimate instrument for traders who demand to see the entire market, not just a single exchange.
Pine Script®指标






















