Commodity Channel Index CCI + EMA strategy
================================================================================
COMMODITY CHANNEL INDEX CCI + EMA STRATEGY - STRATEGY GUIDE 📊
================================================================================
💡 COLLABORATION & SUPPORT
---------------------------
If you want to collaborate, have an idea for a strategy, or need help writing
or customizing code, send an email to burdytrader@gmail.com or send me a
message. Suggestions, ideas, and comments are always welcome! 🤝
I also develop automated trading codes for other trading platforms including:
- CTrader (C#)
- MetaTrader 4 (MQL4)
- MetaTrader 5 (MQL5)
If you need a strategy converted or developed for any of these platforms, feel
free to contact me!
================================================================================
⚠️ IMPORTANT: INSTRUMENT SELECTION 📈
-------------------------------------
This strategy performs BEST with currency pairs (forex). The CCI indicator
works particularly well in the forex market due to the nature of currency
movements and the effectiveness of the CCI in identifying overbought and
oversold conditions in trending markets.
Why Currency Pairs? 🎯
- CCI is highly effective in identifying reversals in forex markets
- Currency pairs show clear overbought/oversold patterns
- EMA filter (50/200) aligns well with major forex trends
- High liquidity ensures reliable signal execution
Performance Highlights:
In specific currency pairs, when properly configured, this strategy can achieve:
- Profit Factor: Over 2.0
- Win Rate: Up to 70%
- Particularly effective pairs: USDCAD, EURUSD, GBPJPY
While the strategy can work with other instruments (stocks, indices, commodities),
currency pairs provide the most consistent and reliable results. For optimal
performance, focus on major forex pairs with good liquidity and clear trending
characteristics.
================================================================================
WHAT DOES THIS STRATEGY DO? 🎯
---------------------------
This strategy combines the Commodity Channel Index (CCI) with Exponential
Moving Averages (EMA) to identify high-probability trading opportunities.
The strategy uses CCI crossovers with a smoothing moving average and filters
signals using EMA trend confirmation. The strategy automatically enters trades
when CCI crosses the smoothing MA in specific zones, indicating potential trend
reversals or continuations.
HOW IT WORKS? ⚙️
---------------
1. CCI CALCULATION 📈
The strategy calculates the Commodity Channel Index using:
- CCI = (Price - SMA(Price, length)) / (0.015 × Deviation(Price, length))
- Default length: 20 periods
- Source: HLC3 (typical price)
The CCI shows:
- Values above +100 = Overbought conditions
- Values below -100 = Oversold conditions
- Values around 0 = Neutral conditions
2. SMOOTHING MOVING AVERAGE 📊
A moving average is applied to the CCI to smooth out fluctuations:
- Types available: SMA, EMA, SMMA (RMA), WMA, VWMA
- Default: SMA with length 14
- Can be disabled (set to "None")
This smoothed line acts as a reference for crossover signals.
3. EMA TREND FILTER 🎯
Two EMAs are calculated on the CCI:
- EMA 50 (fast EMA)
- EMA 200 (slow EMA)
When the EMA filter is enabled:
- LONG signals only occur when EMA50 > EMA200 (uptrend confirmation)
- SHORT signals only occur when EMA50 < EMA200 (downtrend confirmation)
This filter can be enabled/disabled via the "Use EMA Filter" option.
4. ENTRY CONDITIONS 🎲
LONG ENTRY (Buy Signal):
- CCI crosses ABOVE the Smoothing MA (crossover)
- CCI is between Lower Level (-100) and Middle Level (0)
- EMA Filter: EMA50 > EMA200 (if filter enabled)
- No existing positions (or close opposite positions first)
SHORT ENTRY (Sell Signal):
- CCI crosses BELOW the Smoothing MA (crossunder)
- CCI is between Middle Level (0) and Upper Level (+100)
- EMA Filter: EMA50 < EMA200 (if filter enabled)
- No existing positions (or close opposite positions first)
5. POSITION MANAGEMENT 💰
The strategy uses a simple position management approach:
- Only ONE position at a time (no pyramiding)
- If a signal occurs in the opposite direction, closes existing position first
- Then opens new position in the new direction
- This prevents overexposure and simplifies risk management
6. TAKE PROFIT & STOP LOSS SETTINGS 🎯
The strategy uses percentage-based TP/SL:
- Take Profit: 1.0% (default, configurable)
- Stop Loss: 0.5% (default, configurable)
- Risk/Reward Ratio: 2:1 (TP is double the SL)
TP/SL are calculated once when the position opens and remain fixed.
AVAILABLE PARAMETERS ⚙️
-----------------------
CCI SETTINGS:
1. CCI Length (Default: 20)
- Period for CCI calculation
- Lower values = More sensitive to recent price action
- Higher values = More smoothed, less sensitive
2. CCI Source (Default: HLC3)
- Price source for CCI calculation
- Options: close, open, high, low, hlc3, hlcc4, ohlc4
3. CCI Lower Level (Default: -100)
- Lower boundary for LONG entry zone
- Typically -100 for oversold conditions
4. CCI Middle Level (Default: 0)
- Neutral level separating LONG and SHORT zones
5. CCI Upper Level (Default: +100)
- Upper boundary for SHORT entry zone
- Typically +100 for overbought conditions
SMOOTHING MA:
6. Type (Default: SMA)
- Moving average type: None, SMA, EMA, SMMA (RMA), WMA, VWMA
- Set to "None" to disable smoothing
7. Length (Default: 14)
- Period for smoothing MA
- Range: 7-28, step 7
EMA FILTER:
8. EMA 1 Length (Default: 50)
- Fast EMA period applied to CCI
9. EMA 2 Length (Default: 200)
- Slow EMA period applied to CCI
10. Use EMA Filter (Default: true)
- Enable/disable EMA trend filter
- When enabled: LONG only if EMA50 > EMA200, SHORT only if EMA50 < EMA200
RISK MANAGEMENT:
11. Take Profit (%) (Default: 1.0%)
- Profit target as percentage of entry price
- For LONG: Entry × (1 + TP%)
- For SHORT: Entry × (1 - TP%)
12. Stop Loss (%) (Default: 0.5%)
- Stop loss as percentage of entry price
- For LONG: Entry × (1 - SL%)
- For SHORT: Entry × (1 + SL%)
VISUALIZATION 📊
---------------
The strategy displays in a separate panel below the price chart:
1. CCI LINE
- Blue line showing the CCI value
- Oscillates around zero
2. SMOOTHING MA LINE
- Yellow line showing the smoothed CCI
- Reference line for crossover signals
3. CCI LEVEL LINES
- Red dashed line: Upper Level (+100)
- Green dashed line: Lower Level (-100)
- Yellow dashed line: Middle Level (0)
4. ENTRY SIGNALS
- Green cross: LONG entry signal (when CCI crosses above MA)
- Red cross: SHORT entry signal (when CCI crosses below MA)
RECOMMENDED SETTINGS 🎯
-----------------------
To get started, you can use these settings:
CCI SETTINGS:
- CCI Length: 20 (default)
- CCI Source: HLC3 (default)
- CCI Lower Level: -100 (default)
- CCI Middle Level: 0 (default)
- CCI Upper Level: +100 (default)
SMOOTHING MA:
- Type: SMA (default) or EMA for faster response
- Length: 14 (default)
EMA FILTER:
- EMA 1 Length: 50 (default)
- EMA 2 Length: 200 (default)
- Use EMA Filter: true (recommended for better signal quality)
RISK MANAGEMENT:
- Take Profit (%): 1.0% (adjust based on your risk/reward preference)
- Stop Loss (%): 0.5% (adjust based on your risk tolerance)
For more aggressive trading:
- Reduce CCI Length to 14-16
- Reduce Smoothing MA Length to 7
- Disable EMA Filter
For more conservative trading:
- Increase CCI Length to 24-30
- Increase Smoothing MA Length to 21-28
- Keep EMA Filter enabled
RECOMMENDED CURRENCY PAIRS 💱
------------------------------
This strategy is optimized for currency pairs and performs exceptionally well
on the following pairs when properly configured:
TOP PERFORMING PAIRS:
- USDCAD: Can achieve Profit Factor > 2.0 and Win Rate up to 70%
- EURUSD: Excellent performance with consistent signals
- GBPJPY: Strong results with proper EMA filter configuration
These pairs have shown the best historical performance due to:
- Clear trending characteristics
- Good response to CCI overbought/oversold levels
- Strong alignment with EMA 50/200 trend filter
- High liquidity ensuring reliable execution
When trading these pairs, use the default settings or slightly adjusted
parameters based on the pair's volatility. Always backtest on historical
data before using real money to find the optimal configuration for each
specific pair.
PRACTICAL EXAMPLE 📝
--------------------
Scenario: LONG Entry on EUR/USD
1. Market conditions:
- Price: 1.1000
- CCI: -80 (in oversold zone)
- Smoothing MA: -90
- CCI crosses above Smoothing MA (crossover occurs)
- EMA50: -50, EMA200: -70 (EMA50 > EMA200, uptrend confirmed)
2. Strategy checks conditions:
✓ Smoothing MA enabled: Yes
✓ Crossover: Yes (CCI crosses above MA)
✓ CCI in range: Yes (-100 <= -80 <= 0)
✓ EMA Filter: Yes (EMA50 > EMA200)
✓ No existing position: Yes
3. Strategy opens position:
- Direction: LONG (Buy)
- Entry: 1.1000 (current close)
- Take Profit: 1.1110 (1.0% above entry)
- Stop Loss: 1.0945 (0.5% below entry)
- Risk/Reward: 2:1
4. Outcome scenarios:
- If price rises to 1.1110 → Take Profit hit (profit)
- If price falls to 1.0945 → Stop Loss hit (loss limited)
IMPORTANT NOTE ⚠️
-----------------
This strategy is a technical analysis tool based on CCI and EMA indicators.
Like all trading strategies, it does NOT guarantee profits. Trading involves
significant risks and you can lose money, including your entire investment.
Past performance does not guarantee future results.
Always:
- Use appropriate risk management
- Never risk more than you can afford to lose
- Test the strategy on historical data (backtesting) before using real money
- Start with small position sizes or paper trading
- Understand that no strategy works 100% of the time
- Consider market conditions, news events, and other factors
- Keep a trading journal to learn and improve
The author and contributors are NOT responsible for any losses incurred from
using this strategy. Trading decisions are your own responsibility. Profits
are NOT guaranteed, and losses are possible.
LICENSE 📄
----------
This code is open source and available for modification. You are free to use,
modify, and distribute this strategy. If you republish or share a modified
version, please kindly mention the original author.
================================================================================
Индикаторы и стратегии
Hero Zero+ Gamma (False Breakout Filter)Hero Zero – EMA + VWAP + Gamma (Strong Candle)
Purpose:
This script is designed to capture high-momentum intraday moves (Gamma Blasts / Hero Zero trades) by combining:
Trend strength (EMA stack)
Institutional reference (VWAP)
Momentum candle quality (Full Body / Marubozu)
Participation confirmation (Volume burst – OI proxy)
It avoids weak breakouts and focuses only on decisive price expansion candles.
1️⃣ EMA STRUCTURE – TREND FILTER
emaFast = ta.ema(close, 9)
emaMid = ta.ema(close, 20)
emaSlow = ta.ema(close, 50)
📈 Why EMAs?
EMAs react faster to price → ideal for intraday momentum
The script uses EMA stacking, not just crossovers
Bullish EMA Stack
emaFast > emaMid > emaSlow
✔ Indicates strong uptrend
✔ Buyers are in control across short, medium & intraday timeframes
Bearish EMA Stack
emaFast < emaMid < emaSlow
✔ Indicates strong downtrend
✔ Sellers dominate
🔒 No EMA stack = no trade
This removes sideways and choppy markets.
2️⃣ VWAP – INSTITUTIONAL BIAS
vwapVal = ta.vwap(hlc3)
Why VWAP?
Used by institutions, algos, prop desks
Acts as a fair value line
Conditions
Bullish trade: close > VWAP
Bearish trade: close < VWAP
📌 This ensures:
You trade with smart money
You avoid mean-reversion traps
3️⃣ VOLUME BURST – GAMMA / OI PROXY
avgVol = ta.sma(volume, 20)
volBurst = volume > avgVol * 1.5
What this represents
Sudden increase in participation
Acts as a proxy for OI build-up / Gamma activity
✔ No volume = no follow-through
✔ Volume burst confirms real interest, not fake moves
4️⃣ STRONG CANDLE LOGIC – CORE EDGE 🔥
Candle Anatomy
bodySize = abs(close - open)
upperWick = high - max(close, open)
lowerWick = min(close, open) - low
A) FULL BODY CANDLE
Meaning:
Price moves strongly in one direction with minimal rejection.
Bullish Full Body
bodySize > upperWick
✔ Buyers pushed price up and held it
Bearish Full Body
bodySize > lowerWick
✔ Sellers dominated without pullback
B) MARUBOZU CANDLE (Institutional Candle)
upperWick <= mintick*2
lowerWick <= mintick*2
✔ Almost no wicks
✔ Pure aggression
✔ Typically seen during:
Option Gamma expansion
Index hero moves
Breakout candles
C) STRONG CANDLE (Final Filter)
Strong Candle = Full Body OR Marubozu
📌 This is powerful because:
Full Body → strong but normal momentum
Marubozu → explosive institutional move
Weak candles are fully filtered out.
5️⃣ HERO ZERO (GAMMA BLAST) CONDITIONS
Bullish Gamma Blast
EMA Stack + Price above VWAP +
Strong Bull Candle + Volume Burst
Bearish Gamma Blast
EMA Stack + Price below VWAP +
Strong Bear Candle + Volume Burst
💥 When all align → probability spike
💥 Designed for fast 1–3 candle expansion
6️⃣ SIGNAL VISUALS
Green “GAMMA BUY” → below candle
Red “GAMMA SELL” → above candle
EMAs + VWAP plotted for context
Signals are rare but high-quality.
7️⃣ ALERT SYSTEM
alertcondition(bullGamma)
alertcondition(bearGamma)
✔ Use for:
Bank Nifty / Nifty
Option buying
Scalping during power hours
8️⃣ BEST USAGE (IMPORTANT)
✅ Recommended Timeframes
3-min → Best balance
5-min → Safer
1-min → Aggressive scalping only
✅ Best Time Window (IST)
9:20 – 11:00 AM
2:30 – 3:15 PM (Hero Zero zone)
9️⃣ WHAT THIS SCRIPT AVOIDS ❌
Sideways chop
Low volume traps
Wicky fake breakouts
EMA crossover noise
🧠 TRADER MINDSET
This is not a signal-spamming indicator.
It is a confirmation engine for:
Index options
Momentum scalps
Gamma expansion trades
Wedge Pattern [Kodexius]Wedge Pattern is a chart-overlay indicator designed to detect and manage classic Rising Wedge (bearish) and Falling Wedge (bullish) structures using strict, rules-based validation. The script focuses on producing clean, tradable wedge prints by building both boundaries from confirmed pivot swings, enforcing a mandatory “no closes outside the wedge” condition during formation, and requiring the wedge apex to be projected into the future to avoid premature or distorted patterns.
This implementation is built for practical execution charts. It continuously updates the active wedge boundaries in real time, clearly labels the pattern type, and reacts decisively when price confirms a valid breakout. When enabled, it also projects a measured-move target derived from the wedge geometry, so the trader can quickly evaluate reward potential without manual projection.
The detection logic is intentionally conservative. Rather than printing every possible converging structure, it aims to identify wedges that respect structural integrity: multiple touches on each boundary, controlled price action inside the converging range, and a valid convergence point (apex) ahead of the current bar. The result is a wedge tool that prioritizes quality, readability, and consistent behavior across symbols and timeframes.
🔹 Features
🔸 Rising and Falling Wedge Detection (Trendline Based)
The indicator detects two wedge types by constructing an upper trendline from pivot highs and a lower trendline from pivot lows:
Rising Wedge (Bearish): both lines slope upward, and the lower line rises faster than the upper line, creating a tightening upward channel that typically resolves with a downside break.
Falling Wedge (Bullish): both lines slope downward, and the upper line falls faster than the lower line, producing a tightening downward channel that typically resolves with an upside break.
This slope relationship is the core wedge classifier. It ensures the script is not just drawing random converging lines, but explicitly requires the characteristic “compression” geometry that defines wedges.
🔸 Pivot-Confirmed Structure with User Control
Wedges are built from confirmed pivots using:
Pivot Left and Pivot Right inputs to control how “strict” a pivot must be.
Min. Touches per Line to enforce multiple confirmations on each boundary.
Standard technical analysis commonly requires at least three touches to validate a trendline. This script supports that workflow by requiring a minimum number of pivot points before a wedge is eligible for drawing.
🔸 Mandatory Integrity Rule: No Closes Outside the Boundaries
A key quality filter is applied before a wedge can be accepted:
During formation, no candle close is allowed outside the upper or lower boundary.
If any close is detected above the upper line or below the lower line (with tick tolerance), the candidate wedge is rejected. This prevents patterns that already “broke” before they were formally detected and reduces false positives caused by messy price action.
🔸 Apex Validation to Avoid Distorted Prints
The wedge apex (the projected intersection point of the two trendlines) must be in the future. This avoids degenerate cases where lines intersect behind current price, which often indicates the structure is not a valid wedge or is already past its useful phase.
🔸 Live Updating Boundaries for Active Patterns
Once a wedge becomes active, its upper and lower lines are extended forward bar by bar. The script recalculates the boundary price at the current bar index using the stored slope, then updates the line endpoints so the wedge remains visually accurate as time advances.
🔸 Breakout Engine with Directional Confirmation
The script differentiates between:
Correct breakout: the wedge breaks in the expected direction.
Rising wedge breaks downward (close below the lower boundary).
Falling wedge breaks upward (close above the upper boundary).
When this happens, the wedge is marked as broken and labeled as BREAKOUT on the chart.
🔸 Invalidation and Failure Handling
If price violates the wedge in the wrong direction, or if the wedge collapses into an impossible structure (upper boundary falls below or equals the lower boundary), the wedge is flagged as FAILED. This keeps signals honest and prevents lingering drawings that no longer represent a valid pattern.
🔸 Optional Target Projection (Measured Move)
When Show Target Projection is enabled, the script plots a dashed target line and a target label after a valid breakout. The target is computed as a measured move using the wedge height, projected from the breakout boundary in the breakout direction. This provides an immediate objective reference for potential continuation.
🔸 Clean Object Management and Chart Readability
To maintain clarity, the script manages the “active” wedge per type:
If a new wedge is detected while an older one is still active and not broken or failed, the old drawings are removed and replaced with the newer valid pattern.
This prevents chart clutter and keeps the display focused on the most relevant wedge structures.
🔹 Calculations
1) Pivot Collection
The script uses pivot functions to confirm swing points:
float ph = ta.pivothigh(high, INPUT_PIVOT_LEFT, INPUT_PIVOT_RIGHT)
float pl = ta.pivotlow(low, INPUT_PIVOT_LEFT, INPUT_PIVOT_RIGHT)
if not na(ph)
pivot_highs.push(Coordinate.new(bar_index - INPUT_PIVOT_RIGHT, ph))
if not na(pl)
pivot_lows.push(Coordinate.new(bar_index - INPUT_PIVOT_RIGHT, pl))
Each pivot is stored as a Coordinate containing:
index: the bar index where the pivot is confirmed
price: the pivot high or pivot low value
The arrays are capped (for example, last 20 pivots) to control memory and keep selection relevant.
2) Trendline Construction and Slope
A wedge candidate uses the earliest and latest required pivot points for each line. For each boundary, slope is computed as:
method calc_slope(Trendline this) =>
(this.end.price - this.start.price) / (this.end.index - this.start.index)
With slope known, the trendline value at any bar index is:
method get_price_at(Trendline this, int bar_idx) =>
this.start.price + this.slope * (bar_idx - this.start.index)
This approach allows the script to update wedge boundaries consistently without re-fitting lines on every bar.
3) Wedge Type Classification (Geometry Rules)
After both slopes are calculated, wedge type is determined by slope direction and relative steepness:
Rising wedge requires both slopes positive and lower slope greater than upper slope.
Falling wedge requires both slopes negative and upper slope more negative than lower slope (upper line falls faster).
In code logic:
if tl_up.slope > 0 and tl_lo.slope > 0 and tl_lo.slope > tl_up.slope
w_type := 1 // Rising
if tl_up.slope < 0 and tl_lo.slope < 0 and tl_up.slope < tl_lo.slope
w_type := 2 // Falling
This enforces converging boundaries and avoids simple parallel channels.
4) Apex Projection (Trendline Intersection)
The apex is the projected intersection x-coordinate of the two trendlines:
method get_apex_index(Wedge this) =>
float m1 = this.upper.slope
float m2 = this.lower.slope
float y1 = this.upper.start.price
float y2 = this.lower.start.price
int x1 = this.upper.start.index
int x2 = this.lower.start.index
float apex_x = (y2 - y1 + m1 * x1 - m2 * x2) / (m1 - m2)
math.round(apex_x)
Validation requires:
apex_idx > bar_index (apex must be in the future)
This prevents late or structurally invalid wedges from being activated.
5) Mandatory “No Close Outside” Validation
Before activation, the script verifies the pattern has not been violated by candle closes:
method check_violation(Wedge this, int from_idx, int to_idx) =>
bool violated = false
for i = from_idx to to_idx
float up_p = this.upper.get_price_at(i)
float lo_p = this.lower.get_price_at(i)
float c_p = close
if c_p > up_p + syminfo.mintick or c_p < lo_p - syminfo.mintick
violated := true
break
violated
Interpretation:
For every bar from wedge start to current bar, the close must remain between the projected upper and lower boundary prices.
A tick tolerance (syminfo.mintick) is used to reduce micro false violations.
6) Live Update and Breakout Detection
Once active, lines are extended to the current bar and boundary prices are computed:
float u_p = w.upper.get_price_at(bar_index)
float l_p = w.lower.get_price_at(bar_index)
bool b_up = close > u_p
bool b_dn = close < l_p
Correct breakout conditions:
Rising wedge breakout: close below lower boundary.
Falling wedge breakout: close above upper boundary.
if (w.is_rising and b_dn) or (not w.is_rising and b_up)
w.is_broken := true
Invalidation rules include:
wrong-direction break
boundary crossover (upper <= lower)
7) Target Projection (Measured Move)
If target display is enabled, the script calculates wedge height and projects a target from the breakout side:
float m = math.abs(w.upper.start.price - w.lower.get_price_at(w.upper.start.index))
float t = w.is_rising ? l_p - m : u_p + m
Interpretation:
m represents the wedge height near the start of the formation.
t is the target price, projected in the breakout direction.
Rising wedge: target below the lower boundary.
Falling wedge: target above the upper boundary.
A dashed target line and label are then placed forward in time for readability.
Volume Flow and Delta Analysis [MarkitTick]💡This comprehensive technical indicator is designed for traders who require a granular view of market participation that goes beyond standard volume bars. By leveraging the advanced "Intrabar Analysis" capabilities of Pine Script, this tool deconstructs every single price candle on your chart into its constituent lower-timeframe components. It effectively "X-rays" the market to determine whether the volume inside a bar was primarily driven by aggressive buying or aggressive selling, providing a definitive read on market sentiment and institutional control.
● Originality and Utility
Most standard volume indicators display a simple aggregate total—a single block of volume that fails to distinguish between buying pressure and selling pressure. A high-volume candle could represent a strong breakout, or it could represent a "selling tail" where buyers were absorbed. This script solves that ambiguity. It is not a standard oscillator; it is a quantitative flow analyzer. It reconstructs the "Delta" (the net difference between buying and selling volume) by querying lower-timeframe data (e.g., analyzing 1-minute data inside a 60-minute bar). This allows traders to spot "Hidden Accumulation" (where price is flat but Delta is rising) or "Exhaustion" (where price rises but Delta falls), offering a significant edge in identifying reversals and trend continuations.
● Methodology
The script operates through a sophisticated three-stage quantitative process:
• Intrabar Data Acquisition
The script uses the security_lower_tf function to fetch granular price and volume data from a lower timeframe (automatically detected or user-defined). This allows the script to see what happened "inside" the current chart's bar.
• Directional Flow Distribution
For every lower-timeframe interval, the script assigns volume to either "Bullish Flow" or "Bearish Flow." If the close is higher than the open on the lower timeframe, the volume is credited to buyers. If the close is lower, it is credited to sellers. This logic is far more accurate than simple "Up/Down" tick data, as it respects price action.
• Statistical Volatility Normalization
To filter out noise, the script calculates a dynamic baseline using an Exponential Moving Average (EMA) of the absolute Delta values. It then compares the current bar's Delta against this baseline. This generates an "Intensity Score" (measured in Sigma or Standard Deviations). This ensures that a "High Volume" signal is relevant to the current market volatility, rather than relying on fixed, arbitrary thresholds.
● How to Use
This tool is designed to be a complete decision-support system. Here is how to interpret its various components:
• The Volume Histogram
The background histogram displays Total Volume, while the foreground bars show the split between Buying (Teal) and Selling (Red) flow. Use this to gauge the "quality" of a move. A price rally accompanied by high Teal volume is healthy; a rally on low volume or high Red volume is suspect.
• The Delta Histogram
This plots the net difference.
Strong Positive (Green) Delta: Indicates aggressive market buy orders are hitting the ask.
Strong Negative (Red) Delta: Indicates aggressive market sell orders are hitting the bid.
Divergence: If Price makes a New High but the Delta Histogram makes a Lower High, this is a classic signal of exhaustion and potential reversal.
• The Heads-Up Display (HUD)
A dashboard table pinned to the chart provides real-time metrics:
Session Delta: The cumulative buy/sell pressure for the current trading day.
Flow Regime: Clearly states if the market is in "ACCUMULATION" or "DISTRIBUTION."
Intensity: Shows how statistically significant the current volume is (e.g., "2.5x" means the volume is 2.5 times the standard deviation, indicating an anomaly).
• Visual Signals
The script plots triangle markers on top of the chart when the Delta Intensity exceeds the user-defined threshold.
Up Triangle (Green): Signals strong institutional buying pressure (Delta > Threshold).
Down Triangle (Red): Signals strong institutional selling pressure (Delta < Threshold).
● Inputs and Configuration
Lower Timeframe: By default, the script auto-selects the best resolution (e.g., 1-minute data for hourly charts). Users can override this to fine-tune the granularity.
Volume MA Length: Defines the lookback period for the volume moving average.
Delta Volatility Threshold (Sigma): This is the sensitivity filter for signals. A higher value (e.g., 2.0) results in fewer but more significant signals. A lower value (e.g., 1.0) provides more frequent alerts.
Visual Logic: Users can toggle the Dashboard, Delta Histogram, and Moving Averages on or off to suit their charting aesthetic.
● Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. I expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion.
PA Signal Levels: ENTRY SL TP1-2-3 (Cross Marker) v1 tomgoodcarThis indicator operates using Price Action (candlestick closes opposite to the previous bar) combined with signal confirmation from the Linear Regression Channel:
Signal Logic Chart Display
BUY: Close price is higher than the previous Open, and Low touches or drops below the Signal Support (Lower 1) line. BUY label (Green) below the candle.
SELL: Close price is lower than the previous Open, and High touches or rises above the Signal Resistance (Upper 1) line. SELL label (Red) above the candle.
Click the Alert Button: Click the "Alert" button (bell icon) on the top toolbar of TradingView.
Configure Alert Conditions:
Condition: Select the name of this indicator (e.g., PA Signal Levels: ENTRY SL TP1-2-3 (Cross Marker)).
Option: Select "Any alert() function calls".
Frequency: It is recommended to select "Once Per Bar".
Configure Notification Settings:
Action: Choose your preferred notification channel (e.g., Notify on App, Webhook URL, Email, etc.).
Message: Use {{strategy.order.alert_message}} (or the predefined message in the code) to ensure the alert displays full SL/TP details.
Once configured, the system will notify you immediately whenever a new Buy/Sell signal is generated.
คำศัพท์ที่น่าสนใจ:
Toolbar: แถบเครื่องมือ
Condition: เงื่อนไข
Once Per Bar: หนึ่งครั้งต่อแท่งเทียน (ป้องกันสัญญาณหลอกขณะแท่งยังไม่จบ)
Predefined message: ข้อความที่ตั้งค่าไว้ล่วงหน้า
Gridbot Ping Pong🏓 Gridbot Ping Pong is a dynamic grid bot indicator that generates buy and sell signals as price oscillates between automatically calculated support and resistance levels. The grid adapts to trending markets through adjustable tilt and anchor parameters, which control the grid slope and shift resistance respectively. Entry signals trigger when price touches grid levels, while take profit and stop signals manage position exits. Unlike traditional grid bots that require horizontal ranges, this indicator maintains its oscillation zone as price trends by tilting and shifting the grid structure to follow momentum. The grid bot approach aims to accumulate gains through frequent touches across multiple grid levels rather than seeking large directional moves. Like a ping pong ball in motion, price oscillates between grid levels — each touch generates a signal.
⚡ THEORY & CONCEPTS ⚡
Grid trading is a systematic approach that places buy and sell orders at predetermined price intervals, creating a grid of orders above and below a set price level. In ranging markets, this method capitalizes on natural price oscillations by buying at lower grid levels and selling at higher ones. Each completed round trip between levels represents a captured opportunity, and the frequency of these oscillations determines the grid's effectiveness. Traditional grid bots excel when price remains within the defined range, methodically accumulating gains as price bounces between levels.
However, traditional grid structures face significant challenges when markets begin to trend. Fixed horizontal levels that performed well during consolidation become liabilities during directional moves. An uptrend leaves buy orders unfilled while sell orders trigger prematurely, and a downtrend creates the opposite problem. Extended trends can result in accumulated positions at increasingly unfavorable prices, with no mechanism to adapt to the new market reality. The static nature of traditional grids assumes markets will return to the mean, yet sustained breakouts regularly invalidate this assumption.
Gridbot Ping Pong addresses these limitations through dynamic grid adaptation. The tilt parameter angles the grid in the direction of the prevailing trend, aligning support and resistance levels with market momentum rather than fighting against it. The anchor parameter creates buffer zones beyond the outer grid boundaries, requiring price to demonstrate conviction before triggering a grid shift. When price breaks through these buffers, the entire grid recenters to the new price level. This combination of tilting grids and controlled shifting allows the indicator to maintain grid trading mechanics while acknowledging that markets trend.
The grid adapts through a downtrend and early reversal. Entry signals (▲▼), take profit signals (△▽), and grid shifts demonstrate the ping pong sequence as price oscillates between levels.
The grid structure consists of five levels: two potential support levels below, a center base price, and two potential resistance levels above. These levels are calculated as percentage intervals from a dynamic base price, with the spacing parameter determining the distance between each level. Trend direction is derived from consecutive grid shifts, where multiple shifts in the same direction confirm momentum. The grid restricts entries to the trend direction — buy signals in uptrends, sell signals in downtrends — while counter-trend signals convert to exits when appropriate.
Full market cycle demonstrating grid adaptation through rally, reversal, decline, and recovery. Buy signals dominate during uptrends, sell signals during downtrends, with take profits at boundaries throughout. Two stop signals mark the trend reversals.
Tilt
The tilt mechanic introduces slope to the grid structure based on trend direction and momentum. When consecutive shifts occur in the same direction, the tilt increases, creating a steeper grid that tracks with the trend. As the trend progresses, support levels rise with it — buy signals trigger on pullbacks to these rising levels rather than static levels abandoned by price. Similarly, resistance levels fall during downtrends, keeping sell signals relevant to current price action. If the trend reverses and shifts occur in the opposite direction, the tilt resets and begins building in the new direction. The tilt strength parameter controls how aggressively the grid slopes, with higher values producing steeper angles. Negative tilt values invert this relationship, angling the grid against the prevailing momentum rather than with it. This counter-trend configuration positions support levels lower during uptrends and resistance levels higher during downtrends, favoring mean reversion entries that anticipate pullbacks rather than continuation.
Negative tilt applied during an uptrend. Despite the bullish price action from late November through December, the grids slope downward, positioning buy signals at deeper support levels. Take profit signals appear at resistance as price reaches the upper grid boundaries before pulling back. The counter-trend configuration captures oscillations within the rising market rather than chasing momentum.
Anchor
The anchor mechanic provides resistance to grid shifting. Buffer zones extend beyond the outer grid boundaries, requiring price to demonstrate conviction before triggering a shift. Higher anchor values create larger buffers, requiring more significant price movement. As consecutive shifts confirm a trend, the pro-trend buffer shrinks, allowing the grid to follow momentum with increasing ease. This lets the indicator commit to established trends while resisting premature shifts during consolidations. Tilt and anchor work in complementary tension: tilt rewards momentum by angling the grid, while anchor resists excessive shifting by requiring price conviction to recenter. When price breaks through these buffers, the entire grid recenters to the new price level and play continues on a fresh table.
Steady uptrend with minimal tilt. The flat grid segments demonstrate that shifting alone keeps the grid aligned with price action. Buy signals (▲) and take profit signals (▽) alternate as price bounces between levels, accumulating gains through repetition across the entire move.
Sustained uptrend from June through September. The grid follows the trend with increasing ease as consecutive shifts reduce the pro-trend buffer. The October consolidation eventually triggers a downward shift and stop signal, but the system adapts to the renewed uptrend in November with fresh entry signals.
Signal Generation
The indicator generates three signal types. Entry signals (▲▼) trigger when price reaches a grid level in the direction of the trend, initiating a new position. Take profit signals (△▽) trigger when price reaches a grid level against the trend direction while a position is held, capturing gains as the rally continues. Stop signals (⦿) trigger when a grid shift occurs while holding a position adverse to the new shift direction. The ball goes off the table.
Trend reversal from bearish to bullish. The grid follows the downtrend through November with consecutive sell signals. A stop signal (⦿) triggers at the bottom as the grid shifts adversely against the held position. The system resets and adapts to the emerging uptrend in December, generating fresh buy signals as the new direction establishes.
Trigger Options
The signal trigger determines what price data the indicator uses to detect grid touches, balancing responsiveness against confirmation.
Auto : The default setting, using wick-based detection for pro-trend signals and close-based detection for counter-trend signals. This balances responsiveness when entering with the trend against confirmation when signaling against it.
Wick Touch : Generates signals in real-time when the high or low touches a grid level, providing the fastest response to price interaction.
Wick Reverse : Requires the wick to cross through the grid level from the previous bar, confirming the touch before signaling.
SWMA : Uses a Symmetrically Weighted Moving Average as the trigger source, generating signals only when the smoothed price crosses grid levels.
Close : Uses the bar's closing price as the trigger source, providing confirmed signals after each bar completes.
Symmetrically Weighted Moving Average (SWMA) trigger during a trend reversal. The smoothed price line filters intrabar noise, generating signals only when the SWMA crosses grid levels rather than reacting to wick touches. The grid follows the downtrend through November, resets at the bottom, and adapts to the emerging uptrend in December.
Signal Safeguards
The indicator includes built-in protections to reduce overtrading and mitigate risk, keeping the ball in play longer:
Boundary Protection : New entries are blocked at the outermost grid levels where breakout risk is highest. Exits remain permitted at these boundaries.
Signal Spacing : Signals maintain one-level separation from the most recent signal, preventing clusters of entries at similar prices.
Trend Alignment : When conflicting conditions arise, signals align with the prevailing trend direction rather than fighting momentum.
Automatic Profit Taking : Counter-trend interactions convert to take profit signals when a position is held, capturing gains rather than reversing exposure.
Adverse Shift Stops : When the grid shifts against a held position, a stop signal triggers to exit before further adverse movement.
Cautious Breakout Entries : On the first shift in a new direction, entries are restricted to favorable grid levels until the trend confirms through consecutive shifts.
Shift Resistance : Counter-trend shifts always require full buffer conviction, while pro-trend shifts become easier only after the trend is confirmed.
🛠️ CONFIGURATION & SETTINGS 🛠️
Core Parameters
SPACING (%) : Sets the percentage distance between grid levels. Higher values create wider grids with more room between signals, lower values create tighter grids with more frequent signal opportunities.
TRIGGER : Selects the price source for signal detection. See Trigger Options above.
TILT : Controls the grid slope factor in the trend direction.
ANCHOR : Controls resistance to grid shifting.
Visual Settings
GRIDS : Sets the colors for support (lower) and resistance (upper) grid levels.
FILL : Sets the gradient fill colors between the price line and outer grid boundaries.
SWMA : Sets the color of the Symmetrically Weighted Moving Average line.
🏓 PLAYING GRIDBOT PING PONG 🏓
⚪The objective is not to predict where price will go, but to be present at each level when it arrives.
⚪Each touch at a boundary counts. Gains accumulate through repetition, not single swings.
⚪The rally continues until it doesn't. When the ball goes off the table, the game resets.
⚪The grid creates boundaries where price bounces back and forth. The table is set — the ball does the work.
⚪Price oscillates between defined levels. The grid is the table. Everything else is just ping pong.
Tennis is a form of ping pong. In fact, tennis is ping pong played while standing on the table. In fact, all racquet games are nothing but derivatives of ping pong. — George Carlin
⚠️ DISCLAIMER ⚠️
The Gridbot Ping Pong indicator is a visual analysis tool designed to illustrate grid trading concepts and serve as a framework for understanding grid bot mechanics. While the indicator generates entry, exit, and stop signals, no guarantee is made regarding the profitability of these signals. Like all technical indicators, the grid levels and signals generated by this tool may appear to align with favorable trading opportunities in hindsight. However, these signals are not intended as standalone recommendations for trading decisions. This indicator is intended for educational and analytical purposes, complementing other tools and methods of market analysis.
🧠 BEYOND THE CODE 🧠
Gridbot Ping Pong is part of the Grid Bot Series, building on the concepts introduced in the Grid Bot Simulator , Grid Bot Auto , and Grid Bot Parabolic indicators. While those tools established the foundation for grid-based analysis, this indicator introduces dynamic tilt and anchor mechanics that adapt to trending market conditions.
This indicator shares the same educational philosophy as the Fibonacci Time-Price Zones and the Fibonacci Geometry Series - providing frameworks for understanding market concepts through visualization and experimentation rather than black-box signals.
The Gridbot Ping Pong indicator, like other xxattaxx indicators , is designed to encourage both education and community engagement. Feedback and insights are invaluable to refining and enhancing this tool. We look forward to the creative applications, observations, and discussions this indicator inspires within the trading community.
SMC Ultra-Fast: ALL-IN & Auto-Signal [Fixed]📊 SMC Ultra-Fast: ALL-IN & Auto-Signal - Pine Script V5 Code Analysis
This code is a TradingView indicator designed to identify accurate and fast trading signals, specifically "ALL-IN" signals generated by pivot point breakouts combined with unusually high volume. It also automatically sets Take Profit (TP) and Stop Loss (SL) based on a defined Risk:Reward (RR) ratio.
VAM Pro (Multi-Model) [Final]Volatility Adjusted Momentum (VAM) Pro+ is a professional quantitative tool designed to measure trend strength by normalizing momentum against market volatility. Standard momentum indicators often fail during high-volatility periods because they treat every price change the same regardless of market noise. This indicator solves that problem by scaling price changes based on their statistical significance using Z-Score logic. This Pro+ version is specifically optimized for Scalping and Intraday Trading by introducing advanced volatility estimators and mathematical horizon adjustments that superior to classic standard deviation models.
The indicator allows you to choose the most suitable volatility model for your specific asset class. The Parkinson Volatility model is highly recommended for Crypto markets because it uses the High-Low range instead of just close prices, effectively capturing intraday wicks and liquidation spikes that standard deviation often misses. For Equities and Forex, the Garman-Klass model is the most efficient choice as it utilizes the full Open-High-Low-Close data set to account for opening gaps and professional trading ranges.
The mathematical core of the script features a strict Horizon Adjustment based on the Square Root of Time rule. This aligns the one-bar volatility risk with your chosen momentum lookback period to ensure a mathematically consistent calculation. By default, the script uses Logarithmic Returns to maintain scale invariance, which is critical for assets with high percentage swings like Cryptocurrencies. To trade with VAM Pro, look for the histogram color and its relation to the Zero line. A Green histogram indicates positive volatility-adjusted momentum where bulls are dominant, while a Red histogram shows bearish dominance. Values reaching the +2.0 or -2.0 Sigma levels represent statistically extreme moves that often act as exhaustion points or precede strong mean-reversion opportunities. When the histogram crosses the yellow signal line, it provides an early warning that the current momentum is fading.
Investment involves risk. The Volatility Adjusted Momentum (VAM) Pro+ is an analytical tool and does not constitute financial advice, investment recommendations, or an offer to buy or sell any security. Past performance is not indicative of future results. Market conditions can change rapidly, and technical indicators may produce false signals. Always perform your own due diligence, use proper risk management, and consult with a certified financial advisor before making any trading decisions. The author assumes no responsibility for any financial losses incurred through the use of this script.
Nifty Banknifty Option Buying Algo Compatible by VJhaSpecially meant for Indian market Option buying capitalising on morning momentum through algo trading. Works best on 1 min timeframe. Key highlights are:
(1) In setting set timing of your session preferably 09:15 to 11:30, entry only during this duration, running trade forced closed at end of set session.
(2) Choose fresh or continuation: if continuation is chosen, if yesterday's condition prevails during open entry will be made. If fresh is chosen, entry will be made only if fresh set up is formed
(3) You can set this indicator either on index or directly on call or put. If set on Index then buy means buy for call, sell means exit of call. Sell means buy entry for Put and buy means exit for put. However, if directly on call or put, it is straight.
(4) Choice of pivot bar number as 1 gives more trades with smaller profit. Choice of 2 lesser trades with running profit.
In fact you can use on any instrument Cash, Future, Option , Gold etc with intelligence. In Indian Option Buying deploy this from 9:15 to 11;15 am, on ordinary day, and whole day on trending
On Balance Volume (with Candles)OBV+ is an enhanced On Balance Volume indicator that visualizes volume flow either as a line or candlestick-style OBV bars. It shows whether volume is accumulating or distributing, and includes optional moving-average smoothing and Bollinger Bands on OBV to identify trend direction, consolidation, and breakout strength.
Use-Cases
This indicator is especially useful for:
Bullish setup:
Price sideways + OBV rising → accumulation
Bearish setup:
Price rising + OBV flat/falling → distribution
Breakout confirmation:
Price breakout + OBV breaking BB → high conviction move
Options selling filter:
Flat OBV + compressed BB → range-bound market
SMC Ultra-Fast: ALL-IN & Auto-Signal [Fixed]Summary of Usage Instructions:
Wait for the 🔥 ALL-IN BUY/SELL signal to appear.
Use the automatically drawn lines as price references to set up your orders (Entry, SL, TP) within your broker's platform.
Monitor whether the price hits your TP or SL, and wait for the next ALL-IN signal.
CSA Infinity BridgeCSA Infinity Bridge - 14-Indicator Consensus Dashboard
Description
- CSA Infinity Bridge is a proprietary multi-indicator consensus system that analyzes 14 technical indicators simultaneously and displays their collective agreement in a real-time dashboard. The indicator provides clear LONG, SHORT, or NEUTRAL signals based on mathematical consensus, eliminating subjective interpretation.
Core Innovation
- Unlike single indicators requiring interpretation, this tool synthesizes signals from Heikin Ashi, SuperTrend, Momentum, CCI, MFI, DMI, CMO, RSI+TTM, Zero-Lag MACD, ROC, SMA50, and specialized combinations into a unified market state classification.
Key Features
- 14 independent technical indicators analyzed per bar
- Real-time consensus dashboard with color-coded Bull/Bear readings
- 5-tier market state classification (Bullish, Trending ↑, Neutral, Chop, Trending ↓, Bearish)
- TOTAL column displays agreement count (out of 14) showing conviction level
- STATE column provides clear LONG/SHORT/NEUTRAL recommendations
- Built-in alerts for strong consensus (11+) and state changes
- Customizable dashboard size (Tiny to Huge)
- Optional dashboard placement (Top Right, Bottom Right, Bottom Center, Top Center)
What Makes It Unique
- The consensus engine quantifies market conviction with a simple number: when 11+ indicators agree, high-probability setups appear. When agreement drops below 8, the system warns to reduce exposure or stay flat. This creates a rules-based framework eliminating emotional trading decisions. The flexible dashboard positioning allows seamless integration into any chart layout without obstructing price action.
Ideal For
- Day traders and scalpers on futures markets (MNQ, MES, MYM, MGC, MCL) who need objective signals based on multi-indicator confirmation. Works on any instrument and timeframe, optimized for 1-5 minute scalping.
How to Use
Setup:
- Add indicator to chart and customize dashboard size and position. Enable alerts for "Strong Bullish", "Strong Bearish", "LONG Signal", and "SHORT Signal".
Dashboard Columns:
- Individual cells show Bull/Bear for each of 14 indicators
- TREND shows market state (Bullish/Trending/Neutral/Chop)
- STATE shows trade recommendation (LONG/SHORT/NEUTRAL)
- TOTAL shows agreement count with color coding (green 10+, orange 7-9, gray <7)
Signal Interpretation:
- 11-14 Agreement: High-probability setups, use full position size
- 8-10 Agreement: Medium probability, use 50-75% size
- 6-7 Agreement: Low probability, scalp only or avoid
- 5 Agreement: Chop zone, stay flat
Entry Strategy:
- Enter LONG when TOTAL reaches 11+ with STATE showing LONG. Enter SHORT when TOTAL reaches 11+ with STATE showing SHORT. Use stops 10-15 ticks beyond recent swing points.
Exit Strategy:
- Exit when TOTAL drops to 7 or below, or when STATE changes to opposite direction. Take partial profits at 2R, trail remainder.
Risk Management:
- Position sizing: 100% at 12-14 agreement, 75% at 10-11, 50% at 8-9, avoid below 8. Never risk more than 1% per trade.
Best Timeframes:
- 1-min (scalping), 3-min (quick day trades), 5-min (standard day trading), 15-min (swing entries).
RSI Bull bear thresholds region highlight on priceBullish & bearish relative strength thresholds
Default 61 & 39 RSI
Buy / Sell Volume HeaderBuy / Sell Volume Header
Description
- Buy / Sell Volume Header displays real-time buying and selling volume with percentages in a clean dashboard at the top or bottom of your chart. The indicator calculates buying pressure as volume weighted toward the close relative to the bar's range, and selling pressure as volume weighted toward the high.
- Perfect for day traders and scalpers who need instant visual confirmation of buying vs selling pressure without cluttering their chart with additional panes.
Key Features:
- Real-time buy/sell volume split with percentages
- Customizable lookback period (1 bar for current, or sum multiple bars)
- Adjustable table position (top/bottom, left/center/right)
- Five size options (Tiny to Huge)
- Color-coded: Green (buying volume), Red (selling volume)
- Clean, minimal design that doesn't obstruct price action
Calculation Method:
- Buying Volume = Total Volume × (Close - Low) / (High - Low)
- Selling Volume = Total Volume × (High - Close) / (High - Low)
How to Use:
- Select header location (default: Top Right) and table size (default: Normal). Set lookback period to 1 for current bar only, or higher values to see cumulative volume over multiple bars.
Reading the Display:
- Green Box (Left): Buying volume and percentage of total
- Red Box (Right): Selling volume and percentage of total
- Numbers update in real-time on every tick
Trading Applications:
- Trend Confirmation:
- In uptrends, buying volume should consistently be >60%.
- In downtrends, selling volume should be >60%. Divergences warn of potential reversals.
Breakout Validation:
- Valid breakouts show 70%+ volume in breakout direction.
- Breakouts with <55% directional volume often fail.
Reversal Signals:
- When price makes new high but buying volume drops below 50%, watch for reversal. When price makes new low but selling volume drops below 50%, watch for bounce.
Scalping Entry:
- Enter long when buying volume spikes above 65-70% with price momentum. Enter short when selling volume spikes above 65-70% with price momentum.
Best Practices:
- Use lookback=1 for intraday scalping. Use lookback=3-5 for swing context. Combine with price action for confirmation. Volume percentages work best on liquid instruments (MNQ, MES, stocks with high volume).
NPR21
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView.
50 SMA Slope Change with TrendlineThe 50 MA is a good indicator if medium term price direction whether bull or bear. It shows the 50 MA and the rate of change. A positive slope is green and negative slope is red.
My first script I made and it's nothing special just something I thought would be interesting
CUSUM Volatility BreakoutCUSUM Volatility Breakout A statistical trend-detection and volatility-breakout indicator that identifies subtle momentum shifts earlier than traditional tools.
OVERVIEW
The CUSUM control chart is a statistical tool designed to detect small, gradual shifts from a target value. In trading, it helps identify the early stages of a trend, giving traders a heads-up before momentum becomes obvious on standard price charts. By spotting these subtle movements, the CUSUM Volatility Breakout indicator (CUSUM VB) can highlight potential breakout opportunities earlier than traditional indicators. In other words, a statistical trend detection & breakout indicator.
Copyright © 2025 CoinOperator
HOW IT WORKS
CUSUM VB uses a combination of differenced price series, volume normalization, and dynamic control limits:
CUSUM Principle: Tracks cumulative deviations of price from a zero reference. Signals occur when cumulative deviations exceed a control limit shown on the chart and clears any enabled filters.
Adaptive Volatility: H adjusts automatically based on short- vs long-term ATR ratios, allowing faster detection during volatile periods and reduced false signals in calm markets.
Volume Weighting (optional): Amplifies price CUSUM values during high-volume bars to prioritize market participation strength.
ATR Confirmation (optional): Ensures breakouts are accompanied by expanded volatility.
Bollinger Band Squeeze Integration (optional): Confirms trend breakouts by detecting volatility contraction and release shown on the chart as triangles.
Signals:
Arrows on the price chart mark the bars where trades are actually filled, based on conditions detected on the prior signal bar.
Long Entry: Confirmed positive CUSUM breach (price & volume) with BB breakout (signal bar).
Short Entry: Confirmed negative CUSUM breach (price & volume) with BB breakout (signal bar).
Exit Signals: Triggered automatically by opposite-side signals.
Alerts, when created, fire on the bars where fills occur.
CHART COMPONENTS
CUSUM Upper Price (CU Price) and CUSUM Lower Price (CL Price) are green/red circles for confirmed signals.
● Rapid upward accumulation of CU Price indicates a developing bullish trend.
● Rapid downward accumulation of CL Price indicates a developing bearish trend.
Decision/Control limits (UCL/LCL, red)
Zero line (reference for the differenced price series baseline)
Optional BB triangles and volume CUSUM
SETUP AND CONFIGURATION
Differenced Price Series
Differenced Price Length and Lag
Increase differencing lag or window length → Increases variance of residuals → Wider control limits (UCL/LCL) → Slower to trigger.
Decrease lag or window → Tighter limits, more responsive to short-term regime shifts.
CUSUM Parameters
Volume-Weighted CUSUM
NOTE : Uses price length if 'Confirm Price with Volume' is disabled, otherwise will use volume length.
Amplifies CUSUM price responses during high-volume bars and reduces them during low-volume bars. This links trend detection to market participation strength.
Volume-Weighted CUSUM doesn’t replace price confirmation with volume; it modulates it by volume intensity, amplifying price signals when participation is strong and suppressing them when weak.
Recommended when analyzing assets with consistent volume patterns (e.g., stocks, major futures).
Disable for low-liquidity or irregular-volume instruments (e.g., crypto pairs, small-cap stocks).
ATR Confirmation
Enable this feature to confirm CUSUM signals only when price deviations are accompanied by higher-than-normal volatility. The indicator compares current ATR to a smoothed ATR to detect volatility expansion. This helps distinguish true breakouts from low-volatility noise and reduces false signals during quiet periods.
Adjust the ATR lookback length, smoothing length, and expansion factor to control sensitivity. Rule of thumb:
ATR Length ≈ 0.5 × differenced price length to 1.5 × differenced price length gives balanced sensitivity.
ATR Smoothing 5–10 bars.
ATR Expansion 5% to 50%.
CUSUM Input Mode
Select how CUSUM processes differenced price and log-normalized volume — either directly (Txfrm Data) or as deviations from a short-term EMA baseline (Residuals):
Txfrm Data = transformed input: differenced price & log-normalized volume as input for CUSUM (larger swings, more frequent control limit breaches)
Residuals = deviation from short-term EMA baseline (smaller swings, fewer control limit breaches, but higher signal quality).
Residual EMA Length: Defines how quickly the residual baseline adapts to recent differenced price moves. Shorter = more reactive; longer = smoother baseline. Keep EMA length moderate; over-smoothing can distort timing.
Control Sensitivity (K)
Increase K → Less sensitive → CUSUM accumulates slower → Fewer signals, captures only major trends.
Decrease K → More sensitive → CUSUM accumulates faster → More signals, captures minor swings too.
Reset Mode : Method of resetting CUSUM values.
Immediate Reset: Reset both immediately after any signal breach. Traditional SPC.
Opposite-Side Reset: Reset only the opposite side when a valid signal fires. Best for ongoing trend tracking.
Decay Reset: Gradually reduce CUSUM values toward zero with a decay factor each bar. Maintains trend memory but allows slow “forgetting.”
Threshold Reset: Reset only if CUSUM returns below a small threshold (10 % of H). Filters noise without full wipe.
No Reset / Continuous: Never reset; instead track running totals. Long-term cumulative bias measurement.
Conflict Handling : Method of handling conflicting signals.
Ignore Both: Discards both when overlap occurs.
Prioritize Latest: Chooses the direction implied by the most recent close.
Prioritize Stronger: Compares absolute magnitudes of CU Price vs CL Price.
Average Resolve: Looks at the difference; small overlap → ignore, otherwise pick direction by sign.
Sequential Confirm: Requires N consecutive same-direction signals before confirmation.
Volume Parameters (Optional)
Amplification Factor
Adjusts volume sensitivity and effectively rescales the log series of volume to a comparable magnitude with price changes.
Since price and volume are normalized in a compatible way, the amplification factor is used instead of independent K and H values for volume.
Bollinger Bands (Optional)
Lookback Synchronization
BB Lookback (for CUSUM): Number of bars that define a window for the BB signal to look back for the CUSUM signal.
CUSUM Lookback (for BB): Number of bars that define a window for the CUSUM signal to look back for the BB signal.
Both can be enabled for stricter alignment.
Relationship Between K, H, ARL₀ and ARL₁
H (max) is usually the only H you need to adjust. With everything else being constant, increasing either K or H (max) generally increases both ARL₀ and ARL₁ : higher thresholds reduce false alarms but slow detection, and lower thresholds do the opposite.
Increase Min Target ARL ratio →
ARL₀ increases (safer, fewer false alarms)
ARL₁ decreases or stays small (faster detection)
Control limits slightly expand to achieve separation
Strategy becomes more selective and stable
Decrease Min Target ARL ratio →
ARL₀ decreases (more false alarms tolerated)
ARL₁ increases (slower detection tolerated)
Control limits tighten
Strategy becomes more sensitive but lower quality
The ARL Ratio of ARL₀ / ARL₁ is typically between 3 and 8. This implies you want your ARL₀ (false-alarm interval) ≈ 'Min Target ARL ratio' × differenced price length window.
Example:
"Min Target ARL ratio = 4.0"
⇒ implies you want your ARL₀ (false-alarm interval) ≈ 4 × differenced price length.
Assume price length = 50 (typical differencing window).
ARL ratio = 4.0 → target ARL = 4 × 50 = 200 bars.
● On a 6-hour chart (≈4 bars/day) → ~50 days between expected false alarms (on average).
● On a daily chart → ~200 trading days between false alarms (very conservative).
ARL ratio = 8.0 → target ARL = 400 bars → twice as infrequent signals vs ratio=4.
ARL ratio = 2.0 → target ARL = 100 bars → about half the inter-signal interval.
Another way to think about it: probability of a false alarm on any bar ≈ 1 / target ARL. If you want ~1% of bars producing alarms, target ARL ≈ 100.
QUICK START
Start with the defaults.
Set price series → length/order/lag
Configure CUSUM thresholds → K, H min/max
1. Adjust the price differencing lag/window.
2. Verify that it captures real price inflection points without overreacting to bar noise.
Enable optional filters → Volume, ATR, BB
The optional Bollinger Bands squeeze usually works best if used with CUSUM Input Mode = Txfrm Data.
Monitor CUSUM chart → CU Price, CL Price, thresholds, zero line
Act on signals → data window / chart triangles
Adjust sensitivity → H (max), K, lengths
Monitor ARL ratio and CUSUM behavior for fine-tuning
Note : When you’ve finalized the length, lag, and order of the Price Difference, as well as the Ln(Vol) Series of “Confirm Price with Volume” if enabled, then pass both through the Augmented Dickey–Fuller (ADF) mean reversion test to ensure they are stationary, i.e., mean reverting. You can find a ready-made indicator for such use at . Many thanks to tbtkg for this indicator.
SUMMARY
CUSUM VB combines CUSUM statistical control, volatility-adaptive thresholds, volume weighting, and optional BB breakout confirmation to provide robust, actionable signals across a wide variety of trading instruments.
Why traders use it : Fast detection of shifts, reduced false alarms, versatile across markets.
Ideal for : Futures (continuous contracts), forex, crypto, stocks, ETFs, and commodity/index CFDs, especially where:
● Price and volume data exist
● Breakouts and volatility shifts are tradable
● There’s enough liquidity for meaningful signals
Visualization : Upper/lower CUSUM circles, UCL/LCL thresholds, optional highlight traded background, optional volume and BB overlays on the chart, optional entry/exit labels on the price chart, as well as entry/exit signals in the data window.
Alerts : For entry/exit labels when trades are actually filled.
CUSUM VB is designed for traders who want statistically grounded trend detection with configurable sensitivity, visual clarity, and multi-market versatility.
DISCLAIMER
This software and documentation are provided “as is” without any warranties of any kind, express or implied. CoinOperator assumes no responsibility or liability for any errors, omissions, or losses arising from the use or interpretation of this software or its outputs. Trading and investing carry inherent risks, and users are solely responsible for their own decisions and results.
Delta Volume EMA Strategy
================================================================================
DELTA VOLUME EMA STRATEGY - STRATEGY GUIDE 📊
================================================================================
💡 COLLABORATION & SUPPORT
---------------------------
If you want to collaborate, have an idea for a strategy, or need help writing
or customizing code, send an email to burdytrader@gmail.com or send me a
message. Suggestions, ideas, and comments are always welcome! 🤝
================================================================================
⚠️ IMPORTANT: INSTRUMENT SELECTION 📈
-------------------------------------
This strategy performs BEST with instruments that have a centralized data flow,
such as Futures contracts. Centralized markets provide more accurate and
reliable volume data, which is essential for Volume Delta analysis to work
effectively.
Why Futures? 🎯
- Centralized exchange = Accurate volume data
- All trades flow through a single exchange
- Volume reflects true buying/selling pressure
- Better correlation between volume and price movements
While the strategy can work with other instruments (stocks, forex, etc.),
volume data quality may vary, which can affect the reliability of Volume Delta
signals. For optimal performance, use Futures contracts or other instruments
with centralized, high-quality volume data.
================================================================================
WHAT DOES THIS STRATEGY DO? 🎯
---------------------------
This strategy uses Volume Delta analysis combined with Exponential Moving
Averages (EMA) to identify high-probability trading opportunities. The Volume
Delta measures the difference between buying and selling pressure, helping to
identify when strong institutional or smart money movements occur. The strategy
automatically enters trades when volume delta reaches extreme levels, indicating
potential trend continuation or reversal points.
HOW IT WORKS? ⚙️
---------------
1. VOLUME DELTA CALCULATION 📈
The strategy calculates the Volume Delta using the following formula:
- Volume Ratio (v) = Current Volume / Previous Volume
- EMA of Close (mac) = EMA(Close, MA Length) × Volume Ratio
- EMA of Open (mao) = EMA(Open, MA Length) × Volume Ratio
- Volume Delta (vd) = mac - mao
The Volume Delta shows:
- Positive values (green) = Buying pressure (buyers are more active)
- Negative values (red) = Selling pressure (sellers are more active)
2. VOLUME DELTA MOVING AVERAGE 📊
The strategy calculates an EMA of the Volume Delta (vdma) to smooth out
fluctuations and identify the overall trend of buying/selling pressure:
- vdma = EMA(Volume Delta, EMA Length)
- When vdma is above zero = Overall buying pressure
- When vdma is below zero = Overall selling pressure
3. PERCENTILE-BASED ENTRY CONDITIONS 🎲
Instead of using fixed thresholds, the strategy uses percentile analysis to
identify extreme volume delta movements:
For LONG entries:
- Analyzes seller volumes (negative volume delta) over the lookback period
- Calculates the percentile threshold (default: 80th percentile)
- Enters LONG when volume delta becomes positive AND exceeds the threshold
- This indicates a strong shift from selling to buying pressure
For SHORT entries:
- Analyzes buyer volumes (positive volume delta) over the lookback period
- Calculates the percentile threshold (default: 80th percentile)
- Enters SHORT when volume delta becomes negative AND exceeds the threshold
- This indicates a strong shift from buying to selling pressure
4. POSITION SIZING 💰
The strategy offers two position sizing methods:
a) RISK VALUE (Fixed Risk in Dollars):
- Calculates position size based on a fixed dollar risk amount
- Formula: Position Size = Risk Amount / (Entry Price × Stop Loss %)
- Ensures consistent risk per trade regardless of price level
b) LOTS SIZE:
- Uses a fixed lot size for all trades
- Simple and straightforward approach
- Useful when you want consistent position sizes
5. TAKE PROFIT & STOP LOSS SETTINGS 🎯
The strategy offers flexible TP/SL configuration in three modes:
a) PERCENTAGE (%):
- TP/SL calculated as a percentage of entry price
- Example: 2% TP means entry price × 1.02 (for LONG) or × 0.98 (for SHORT)
- Adapts automatically to different price levels
b) CURRENCY:
- TP/SL set as a fixed currency amount
- Example: $100 TP means entry price + $100 (for LONG) or - $100 (for SHORT)
- Useful for instruments with consistent price movements
c) PIPS:
- TP/SL set as a fixed number of pips
- Automatically converts pips to price using the instrument's minimum tick
- Ideal for forex and other pip-based instruments
6. AUTOMATIC TRADE EXECUTION ⚡
When entry conditions are met:
- Opens a position (LONG or SHORT) at market price
- Automatically sets Take Profit and Stop Loss based on selected mode
- Sends an alert with all trade information
- Only one position at a time (waits for current position to close)
AVAILABLE PARAMETERS ⚙️
----------------------
1. MA LENGTH (Default: 10)
- Length of the Exponential Moving Average used for close and open prices
- Lower values = More sensitive to recent price action
- Higher values = More smoothed, less sensitive
2. EMA LENGTH (Default: 20)
- Length of the EMA applied to Volume Delta
- Controls the smoothing of the volume delta signal
- Lower values = Faster signals, more trades
- Higher values = Slower signals, fewer but potentially more reliable trades
3. POSITION SIZE MODE
- "Risk Value": Calculate position size based on fixed dollar risk
- "Lots Size": Use fixed lot size for all trades
4. FIXED RISK IN $ (Default: 50)
- Only used when Position Size Mode = "Risk Value"
- The dollar amount you're willing to risk per trade
- Strategy calculates position size automatically
5. LOT SIZE (Default: 0.01)
- Only used when Position Size Mode = "Lots Size"
- Fixed lot size for all trades
6. TAKE PROFIT MODE
- "%": Percentage of entry price
- "Currency": Fixed currency amount
- "Pips": Fixed number of pips
7. STOP LOSS MODE
- "%": Percentage of entry price
- "Currency": Fixed currency amount
- "Pips": Fixed number of pips
8. TAKE PROFIT / STOP LOSS VALUES
- Different input fields appear based on selected mode
- Configure TP and SL independently
9. VOLUME LOOKBACK PERIOD (Default: 20)
- Number of bars used to calculate percentile thresholds
- Lower values = More sensitive, adapts faster to recent conditions
- Higher values = More stable, uses longer-term statistics
10. PERCENTILE THRESHOLD (Default: 80%)
- The percentile level used to identify extreme volume delta movements
- 80% means: only enter when volume delta exceeds 80% of recent values
- Higher values = Fewer but potentially stronger signals
- Lower values = More frequent signals
VISUALIZATION 📊
---------------
The strategy displays on the chart:
1. VOLUME DELTA COLUMNS
- Green columns = Positive volume delta (buying pressure)
- Red columns = Negative volume delta (selling pressure)
- Height represents the magnitude of buying/selling pressure
2. VOLUME DELTA MA AREA
- Two overlapping area plots showing the smoothed volume delta
- Black area (base layer) for overall visualization
- Green area (when positive) = Overall buying pressure trend
- Red area (when negative) = Overall selling pressure trend
- Helps identify the dominant market sentiment
3. ZERO LINE
- Horizontal line at zero
- Helps visualize when buying/selling pressure crosses the neutral point
ALERTS 🔔
--------
When enabled, the strategy sends alerts when a trade is opened. The alert
message includes:
- Direction: "Buy" for LONG positions or "Sell" for SHORT positions
- Entry Price: The price at which the position was opened
- TP (Take Profit): The target profit price
- SL (Stop Loss): The stop loss price
Example alert message:
"Buy | Entry: 1.2050 | TP: 1.2250 | SL: 1.1950"
Alerts can be configured in TradingView to send notifications via email,
SMS, webhooks, or other platforms.
RECOMMENDED SETTINGS 🎯
-----------------------
To get started, you can use these settings:
STRATEGY PARAMETERS:
- MA Length: 10 (default)
- EMA Length: 20 (default)
- Volume Lookback Period: 20 (default)
- Percentile Threshold: 80% (default)
POSITION SIZING:
- Position Size Mode: "Risk Value" (for risk management)
- Fixed Risk in $: Adjust based on your account size (e.g., 1-2% of account)
- OR use "Lots Size" with 0.01 lots for small accounts
TAKE PROFIT & STOP LOSS:
- TP Mode: "%" (recommended for most instruments)
- SL Mode: "%" (recommended for most instruments)
- Take Profit (%): 2.0% (adjust based on your risk/reward preference)
- Stop Loss (%): 1.0% (adjust based on your risk tolerance)
For Forex:
- Consider using "Pips" mode for TP/SL
- Typical values: 20-50 pips TP, 10-30 pips SL
For Stocks/Indices:
- Use "%" mode for TP/SL
- Typical values: 2-5% TP, 1-2% SL
PRACTICAL EXAMPLE 📝
-------------------
Scenario: LONG Entry on EUR/USD
1. Market conditions:
- Price: 1.1000
- Volume Delta becomes strongly positive
- Volume Delta exceeds 80th percentile of recent seller volumes
2. Strategy calculates:
- Entry Price: 1.1000 (current close)
- Position Size Mode: "Risk Value"
- Fixed Risk: $50
- Stop Loss Mode: "%"
- Stop Loss: 1.0%
- Position Size = $50 / (1.1000 × 0.01) = 4.55 lots
3. Strategy opens position:
- Direction: LONG (Buy)
- Entry: 1.1000
- Take Profit: 1.1220 (2% above entry)
- Stop Loss: 1.0890 (1% below entry)
- Alert sent: "Buy | Entry: 1.1000 | TP: 1.1220 | SL: 1.0890"
4. Outcome scenarios:
- If price rises to 1.1220 → Take Profit hit (profit)
- If price falls to 1.0890 → Stop Loss hit (loss limited to $50)
IMPORTANT NOTE ⚠️
-----------------
This strategy is a technical analysis tool based on volume delta analysis.
Like all trading strategies, it does NOT guarantee profits. Trading involves
significant risks and you can lose money, including your entire investment.
Past performance does not guarantee future results.
Always:
- Use appropriate risk management
- Never risk more than you can afford to lose
- Test the strategy on historical data (backtesting) before using real money
- Start with small position sizes or paper trading
- Understand that no strategy works 100% of the time
- Consider market conditions, news events, and other factors
- Keep a trading journal to learn and improve
The author and contributors are NOT responsible for any losses incurred from
using this strategy. Trading decisions are your own responsibility. Profits
are NOT guaranteed, and losses are possible.
LICENSE 📄
---------
This code is open source and available for modification. You are free to use,
modify, and distribute this strategy. If you republish or share a modified
version, please kindly mention the original author.
================================================================================
Valid Rejection Block FinderThis is used to find valid rejection blocks that, 1 candle closes in the right direction of the wick, 2 makes sure the wick sweeps the low of the previous candle, 3 uses ATR to find larger movements and 4, presents a data table of the probability of price coming back into the zones.
XAUUSD $4 Scalp Indicator (Swift Algo)his script is a Trend-Momentum Scalper. It uses three Exponential Moving Averages (EMAs) to identify trend direction and the Relative Strength Index (RSI) to ensure you aren't entering a trade when the market is overextended.How the Strategy WorksThe "Swift Algo" relies on a three-layer confirmation system to filter out "bad" trades:1. The Trend Filter (The 50 EMA)The Blue 50-period EMA acts as the "Grandmaster" trend.If the price is above the 50 EMA, the script only looks for Buy signals.If the price is below the 50 EMA, it only looks for Sell signals.Why? This prevents you from "fighting the trend."2. The Entry Trigger (9 & 21 EMA Cross)The actual signal is generated by the "Fast" (9) and "Slow" (21) EMAs.Buy Signal: When the 9 EMA (Green) crosses above the 21 EMA (Orange).Sell Signal: When the 9 EMA (Green) crosses below the 21 EMA (Orange).3. The "Sweet Spot" RSI FilterThe RSI filter is the most unique part of this script. It looks for momentum that is strong but not yet exhausted.For Buys: RSI must be between 50 and 70. (Bullish momentum is building, but not yet overbought).For Sells: RSI must be between 30 and 50. (Bearish momentum is building, but not yet oversold).Technical Summary of ComponentsVariableSettingRoleFast EMA9Short-term momentum trigger.Slow EMA21Medium-term baseline.Trend EMA50Long-term trend direction (The "Filter").RSI Length14Measures the speed and change of price movements.Practical Tips for XAUUSD (Gold) ScalpingTimeframes: This specific combination (9/21/50) is most effective on the 1-minute (1m) or 5-minute (5m) charts for scalping.The "$4 Target": Since your indicator title mentions a "$4 Scalp," this implies that on Gold ( OANDA:XAUUSD $), you are looking for a move of 40 pips (e.g., from $2030.00 to $2034.00).Stop Loss Placement: A common practice with this setup is to place your Stop Loss just below the 50 EMA for buys, or above it for sells.Would you like me to modify the code to include an automated Stop Loss and Take Profit level on the chart?
Breakout SignalShow big bars closing on the high or low
This script allows you to find highlighted bars (bullish green and bearish red ) for bars that close with a particular Internal Bar Strength and ATR. I set the default at showing bars with an ATR > ATR10 and the IBS can be effected to show if the bar closes at its high or low.
I also put a EMA filter here. i usually set this quite low to about 7 but can be changed depending on your preference.
BK AK-Flag Formations🏴☠️ BK AK-Flag Formations — Continuation Structure, Tactical Readability. 🏴☠️
Built for traders who press momentum with discipline: it finds flagpoles + flags/pennants, validates the structure, draws the boundaries, and labels it in a way you can act on without clutter.
🎖️ Full Credit — Foundation Engine (Trendoscope)
Original foundation (Trendoscope Flags & Pennants):
The core detection engine (multi-zigzag swing extraction, pivot logic, validation/classification framework, and base drawing architecture) is by Trendoscope.
This script keeps that engine intact. My work adds a tactical execution layer: short tags + tooltip briefing + alert routing + forward border projection.
✅ What This Script Does
This indicator hunts continuation formations after an impulse move, and outputs three things:
Detects the pole (impulse leg) and the consolidation that follows
Classifies the consolidation as a Flag or Pennant, and assigns a bias (Bull/Bear/Neutral) based on context
Draws the structure and labels it cleanly, with optional hover briefings and filtered alerts
You get continuation structure across multiple sensitivities, so it can catch tight flags and larger, slower continuations without changing settings every chart.
🔍 How It Detects (So You Know It’s Not Random)
This is not “pattern art.” It’s rule-based swing logic + geometry:
1) Multi-Zigzag Sweep (micro → macro)
The script runs multiple zigzag levels (up to 4) to extract swings at different sensitivities.
That means the same market is scanned for both:
short, fast consolidations
larger, cleaner consolidations
2) Impulse + Consolidation Validation
After swings are extracted, the engine checks:
that the move qualifies as an impulse “pole”
that the consolidation stays within a controlled retracement window (your Max Retracement control)
that the consolidation geometry is coherent enough to be classified (tolerance controlled by Error Threshold and Flat Threshold)
3) Optional Quality Filters (you control strictness)
Verify Bar Ratio: checks proportion/spacing of pivots, not just price shape
Avoid Overlap: prevents stacking new patterns on top of existing ones
Max Patterns: hard cap so the chart stays readable
Repaint option: allows refinement if better coordinates form (useful for real-time traders)
🧩 BK Enhancements — Why This Publication Exists (Not a Mashup)
This is one pattern engine plus a purpose-built execution layer. Not “two indicators glued together.”
A) Short-Form Pattern Tags (clarity under pressure)
Instead of long labels drowning price, the script can replace them with compact codes:
BF / BeF / BP / BeP / F / P / UF / DF / RF / FF / AF / DeF
This is not cosmetic — it lets you keep structure visible while trading.
B) Tooltip Briefing (optional)
Hover a tag to see:
the full pattern name
the bias (Bullish/Bearish/Neutral)
So you get detail only when you request it, not sprayed across the chart.
C) Alert Routing (signal control, not spam)
Alerts can be filtered by:
Bias (Bull/Bear/Neutral)
Type (Flag vs Pennant)
So you can route only what you trade — e.g., bullish continuations only, or pennants only.
D) Pattern Border Extension (planning the break/retest)
Optional feature extends only the two true boundary lines forward by N bars, so you can plan:
breakout/breakdown levels
retest zones
invalidation outside structure
This extension is selective: it aims to extend the actual borders, not random zigzag legs.
How these work together:
Trendoscope detects/validates → draws the pattern → BK layer converts labels to short tags + applies transparency + tooltip overlay → BK alert router filters by bias/type → BK border extension projects the two boundary lines forward.
That’s the purpose: faster reads + cleaner execution planning.
🏷️ How To Read the Codes (Practical Translation)
BF — Bull Flag: strong pole → controlled pullback → watch boundary break + continuation
BP — Bull Pennant: thrust → tight compression → expansion confirms carry
BeF — Bear Flag: down impulse → weak rallies → breakdown favors continuation lower
BeP — Bear Pennant: pause beneath resistance → release favors trend continuation
F / P: generic tags when it’s valid but shouldn’t over-specify
⚙️ What You Actually Tune
Zigzag lengths/depths: sensitivity (faster vs cleaner)
Max Retracement: how deep consolidation may retrace the pole
Error / Flat thresholds: strictness of structure validation
Overlap / Max patterns: chart cleanliness
Labels: short tags, transparency, tooltips
Border extension: extend boundaries forward by N bars
Alerts: enable + filter by bias and by type
🧑🏫 BK / AK
AK is honor — my mentor’s standard: patience, clarity, no gambling.
All glory to G-d — the true source of wisdom, restraint, and endurance.
👑 King Solomon Lens
“Plans are established by counsel; by wise guidance wage war.” — Proverbs 20:18
Continuation trading is the same: impulse → formation → execution.
BK AK-Flag Formations — when the standard rises, the line advances.
Gd bless. 🙏
Moving Average Structure ZigZag [Stable & Filtered]
(日本語説明)
このインジケーターは、移動平均線(MA)の転換に基づき、相場の「真の構造」を可視化するために開発されました。 通常のZigZagのように価格の単純な反転に依存せず、「MAのトレンド転換 + 指定した値幅の到達」という2つの条件を用いることで、レンジ相場の細かなノイズ(ダマシ)を排除し、ダウ理論に基づいた重要な高値・安値だけを結びます。
💡 主な機能
MAタイプの切り替え: SMA, EMA, HMA, VW-HMAなど、目的に合わせたトレンド感度を選択可能。
値幅フィルター(Min Deviation): 添付画像のように、小さな値動きをカットし、大きな市場構造だけを抽出します。
価格アクションへの追従: ラインはMAの数値ではなく、期間内の実最高値・最安値を正確に結び、高値更新時には自動で延伸されます。
🛠 活用シーン
環境認識: 上位足での大きな波形を確認し、現在のフェーズを定義。
ノイズ除去: 市場の主要な節目(レジサポ候補)の特定。
ダウ理論の視覚化: 高値・安値の切り上がり・切り下がりを明確化。
(English Description)
This indicator was developed to visualize the "True Market Structure" based on Moving Average (MA) reversals. Unlike standard ZigZag which relies solely on price reversals, this tool combines MA Trend Reversals and a Minimum Deviation filter to eliminate market noise and highlight significant swing highs and lows based on Dow Theory.
💡 Key Features
Multiple MA Types: Select from SMA, EMA, HMA, VW-HMA, etc., to match your preferred trend sensitivity.
Min Deviation Filter: As shown in the attached image, it filters out minor price fluctuations to extract only the major market waves.
Price Action Tracking: The lines connect the actual High/Low prices within the period, not the MA values themselves. Lines automatically extend when a trend continues to new highs/lows.
🛠 Use Cases
Market Context: Identify major wave patterns on higher timeframes to define the current phase.
Noise Reduction: Pinpoint key market levels and potential support/resistance.
Dow Theory Visualization: Clearly visualize higher highs/lows and trend shifts.
Settings
MA Type: Choose the type of Moving Average.
Moving Average Length: The lookback period for structure.
Min Deviation (Pips): The threshold to filter noise. Adjust according to the volatility of the pair.
NQ 2026 Strategic Levels + Market MemoryTitle: NQ Strategic Levels 2026: Volume Profile & Market Memory
Description: This indicator plots the critical institutional levels for NQ (Nasdaq-100) heading into 2026. It is designed to help traders visualize the "Market Structure" map based on the 2025 yearly volume profile and key historical events.
How it Works: The script projects three dynamic "Zones" and three fixed "Historical Markers" to the right of your chart. It does not clutter the past price action; it focuses on future price discovery.
1. The 2026 Active Zones (Boxes):
🛑 Resistance (Supply Zone): Derived from the "Trapped Buyers" of late 2025. This is where overhead supply is likely to cause profit-taking.
⚖️ The Pivot (Equilibrium): Based on the Q4 2025 High Volume Node (HVN). This is the "Line in the Sand." Above this zone, the weekly bias is Bullish. Below it, the bias shifts to Bearish/Correction.
💰 The Buy Zone (Support): The Yearly Value Area Low (VAL). This represents the strongest institutional support and a high-probability area for "Buy the Dip" programs.
2. The 2025 Market Memory (Dashed Lines):
Triple Witch Liquidity: The December 2025 rejection high.
AI Summer Breakout: The key breakout level from mid-2025 that flipped from resistance to support.
Tariff Scare Floor: The macro bottom established during the volatility of April 2025.
How to Use:
Trend Followers: Watch the Pivot Zone. If price holds above it, target the Resistance Zone.
Mean Reversion Traders: Look for rejections at the Resistance Zone or bounces at the Buy Zone.
Risk Management: Use the Historical Markers as invalidated points or profit targets.
Disclaimer: These levels are based on volume analysis and historical price action. Not financial advice. Trade at your own risk.






















