Testthis is a test script
bool newClosed = strategy.closedtrades > strategy.closedtrades
if newClosed
int last = strategy.closedtrades - 1
// 最新平仓 trade 的关键信息
string eid = strategy.closedtrades.entry_id(last)
float epx = strategy.closedtrades.entry_price(last)
string xid = strategy.closedtrades.exit_id(last)
float xpx = strategy.closedtrades.exit_price(last)
float pnl = strategy.closedtrades.profit(last) // 注意:单位是策略币种/合约计价(受 commission 等影响)
// 判断是不是“止损”触发(看 exit_id)
bool isStop = str.startswith(xid, "S_SL_")
string msg = "CLOSED TRADE (new) " +"entry: " + eid + " @ " + str.tostring(epx) + " " +"exit : " + xid + " @ " + str.tostring(xpx) + " " +"pnl : " + str.tostring(pnl) + " " +"isStop=" + str.tostring(isStop)
label.new(bar_index, high, msg, style=label.style_label_down, textalign=text.align_left)
Candlestick analysis
Custom Step Bar CountHere is a professional description for your TradingView script, suitable for the "Description" field when publishing.
I have provided two versions: a **Standard Version** (detailed and professional) and a **Short Version** (concise).
### Option 1: Standard Version (Recommended for Publishing)
**Title:** Custom Step Bar Count
**Description:**
This indicator is an advanced bar counting tool designed for traders who need to track time cycles or specific bar sequences with custom arithmetic progressions. Unlike standard counters that simply display "1, 2, 3," this script allows you to decouple the **display frequency** from the **displayed value**.
The counter automatically resets at the beginning of every new trading day.
**Key Features:**
* **Custom Display Interval:** Choose how often a label appears (e.g., every 5 bars).
* **Custom Number Increment:** Define the value step for the displayed numbers (e.g., count by 3s).
* **Daily Reset:** The count restarts automatically at the beginning of each session.
* **Visual Customization:** Adjust label size and text color to fit your chart theme.
**How it works (Example):**
If you want to track a cycle where every **5th** bar represents a value of **3**:
1. Set **Display Every X Bars** to `5`.
2. Set **Number Increment** to `3`.
**Result:**
* Bar 5 shows label "**3**"
* Bar 10 shows label "**6**"
* Bar 15 shows label "**9**"
This is particularly useful for specific time-based strategies, Gann analysis, or backtesting setups that require non-linear counting.
---
### Option 2: Short Version (Concise)
**Title:** Custom Step Bar Count
**Description:**
A flexible bar counting utility that resets daily. This script allows you to customize both the frequency of the labels and the numeric step value.
**Settings:**
* **Display Every X Bars:** Controls the gap between labels (e.g., every 5th bar).
* **Number Increment:** Controls the number sequence (e.g., increments of 3).
**Example:**
With an interval of **5** and an increment of **3**, the script will display:
* 5th Bar: **3**
* 10th Bar: **6**
* 15th Bar: **9**
Includes options for text color and label size. Updated for Pine Script v6.
Gold Sniper Pro: Trend & Reversal SystemTitle: Gold Sniper Pro: Trend & Reversal System
Headline: Stop choosing between "Buying the Dip" and "Chasing the Trend." Now you can do both.
Introduction: Most indicators fail because they only work in one market condition. Reversal indicators fail during strong breakouts (selling too early), and Trend indicators fail during ranging markets (buying the top).
Gold Sniper Pro solves this by running two separate algorithms simultaneously to cover every phase of price action on Gold (XAUUSD).
How It Works (The Dual-Core Logic):
1. 🟢 SNIPER MODE (The "Buy Low" Logic)
Goal: Catch the exact bottom of a pullback.
Logic: Detects when price sweeps a liquidity low but is trading at a "discount" (below the EMA 20).
Signal: Displays a Green "SNIPER" label.
Best for: Ranging markets and deep corrections.
2. 🔵 TREND MODE (The "Breakout" Logic)
Goal: Catch the high-momentum runaway moves (like the 16:40 pump).
Logic: Detects when price is holding above the EMA 20 with strong momentum. It buys the strength, not the weakness.
Signal: Displays a Blue "TREND" label.
Best for: News events and strong directional rallies.
Key Features:
⚡ Dynamic EMA Filter: Replaces laggy RSI with real-time price action relative to the EMA 20.
🛡️ Multi-Timeframe Safety: Built-in 30m Trend Filter to prevent trading against the major trend (can be toggled OFF for aggressive scalping).
🎯 Auto TP/SL Lines: Automatically plots your Risk:Reward (2:1) targets on the chart.
🚀 "Force Trade" Switch: A new feature that allows you to bypass safety filters during high-volatility news events to catch fast breakouts.
How to Use:
Timeframe: Best on 1m or 5m (Designed for XAUUSD/Gold).
Aggressive: Check "Ignore 30m Filter" in settings to catch every scalping opportunity.
Conservative: Uncheck "Ignore Filter" to only trade when the 30m trend is aligned.
Exit: Close trade when price hits the Green TP line or Red SL line.
Settings:
EMA Length: 20 (Standard Institutional Trend).
Reward Ratio: 2.0 (Default).
Gold Trap Hunter (Auto-Structure & Liquidity Sweeps)The Concept: Stop Getting Trapped Have you ever bought a breakout, only to watch the price immediately reverse and hit your stop loss? This is called a Liquidity Trap (or "Sweep"). Institutional algorithms often push price slightly above a key High or below a key Low to trigger retail stop losses before moving the market in the real direction.
The Universal Trap Hunter is designed to visualize this market structure automatically. It helps you avoid "Fake Breakouts" and identifies high-probability Reversal points where the "Smart Money" is active.
How It Works (The Logic)
1. The Structure Boxes (The Battlefield) The indicator draws a shaded box representing the Higher Timeframe Structure.
Green Box: The market structure is Bullish (Making Higher Highs). We are looking for longs.
Red Box: The market structure is Bearish (Making Lower Lows). We are looking for shorts.
Feature: This is Universal. If you are on the 15-minute chart, it automatically calculates the 4-Hour structure for you. You are always trading with the bigger trend.
2. The "SWEEP" Signal (The Entry Trigger) A "Sweep" is the most powerful signal in this system.
What is it? Price breaks a previous structure High/Low but fails to close there. It grabs the liquidity and reverses.
⚔️ Green Sweep: Price broke the previous Low (trapping sellers), then closed back UP inside the range. This is a bullish reversal signal.
⚔️ Red Sweep: Price broke the previous High (trapping buyers), then closed back DOWN inside the range. This is a bearish reversal signal.
3. The Noise Filter (Gray Candles) Trading is about knowing when NOT to trade.
Gray Candles: These indicate "Noise." The price action is choppy or conflicting with the trend.
Colored Candles: The candles only turn Green or Red when the Trend, Momentum, and Structure all align. If you see color, the move is valid.
Settings & Customization
Structure Mode (Auto vs Manual):
Auto (Recommended): The script automatically selects the best Higher Timeframe for you.
Scalping 1m? → It looks at 1H Structure.
Trading 15m? → It looks at 4H Structure.
Manual: You can lock it to a specific timeframe (e.g., always show Daily structure).
Colors: Fully customizable to fit your dark/light theme.
How to Trade This Strategy
Identify the Trend: Look at the background Box color (Green = Bullish, Red = Bearish).
Wait for the Trap: Do not chase the price. Wait for price to challenge the edge of the box.
The Signal: Look for the "⚔️ SWEEP" label.
If the box is Green and you see a Green Sweep at the bottom: Strong Buy.
If the box is Red and you see a Red Sweep at the top: Strong Sell.
Disclaimer: This tool is for educational purposes and market analysis only. It helps visualize market structure and liquidity traps but does not guarantee future results. Always manage your risk.
Gold Sniper (Liquidity Sweep)Concept : Stop Hunting the "Smart Money" Way Most traders lose money because they enter exactly where "Smart Money" is looking to trigger Stop Losses. We have all been there: You buy at support, the price dips just below your stop loss, takes you out, and then rockets up without you.
Gold Sniper is designed to capitalize on this exact behavior . Instead of buying the support, this script waits for the Liquidity Sweep (the "Stop Hunt"). It identifies when price breaks a key structure level to trap sellers, and signals an entry only when the price reclaims that level with momentum.
How It Works (The Logic) This indicator looks for a specific "Perfect Storm" setup using a 4-step confirmation process:
Identifies Support (Yellow Dots): It tracks local pivot lows (default 10 bars) to visualize the "Floor" where retail traders likely have their stop losses.
Detects the Sweep: It waits for price to drop below these yellow dots. This is the "Trap" phase where liquidity is grabbed.
Confirms the Reclaim: It does NOT catch the falling knife. It waits for a candle to close back ABOVE the broken support level.
Momentum Check (RSI): It ensures internal strength (RSI) is rising compared to the previous low, confirming that the drop was a trap, not a genuine crash.
Visual Features
Yellow Dots: Dynamic Support Levels / Pivot Lows.
"SWEEP BUY" Label: Signals exactly when the trap is complete and the reclaim has occurred.
Red Line (Hard Stop): Automatically draws a Stop Loss level at the lowest point of the sweep candle.
How to Use This Strategy
Wait for the Setup: Do not trade if price is just drifting. Wait for price to challenge and break the Yellow Dots.
The Trigger: Enter immediately on the Close of the candle with the "SWEEP BUY" label.
Stop Loss: Place your Hard Stop at the Red Line provided by the indicator.
Rule: If price touches the Red Line, the setup has failed (it was a real crash, not a sweep). Exit immediately.
Best Timeframes: Optimized for 1-Minute and 5-Minute scalping on Gold (XAUUSD) and Futures, but works on all liquid assets.
Settings
Pivot Lookback: How many bars back to check for the support floor (Default: 10).
RSI Length: Sensitivity of the momentum filter (Default: 14).
Disclaimer : This tool is for educational purposes and market analysis only. It identifies high-probability "Liquidity Sweep" setups but does not guarantee future results. Always manage your risk.
Moving Average Exponential//@version=6
indicator(title="Moving Average Exponential", shorttitle="EMA", overlay=true, timeframe="", timeframe_gaps=true)
len = input.int(9, minval=1, title="Length")
src = input(close, title="Source")
offset = input.int(title="Offset", defval=0, minval=-500, maxval=500, display = display.data_window)
out = ta.ema(src, len)
plot(out, title="EMA", color=color.blue, offset=offset)
// Smoothing MA inputs
GRP = "Smoothing"
TT_BB = "Only applies when 'SMA + Bollinger Bands' is selected. Determines the distance between the SMA and the bands."
maTypeInput = input.string("None", "Type", options = , group = GRP, display = display.data_window)
var isBB = maTypeInput == "SMA + Bollinger Bands"
maLengthInput = input.int(14, "Length", group = GRP, display = display.data_window, active = maTypeInput != "None")
bbMultInput = input.float(2.0, "BB StdDev", minval = 0.001, maxval = 50, step = 0.5, tooltip = TT_BB, group = GRP, display = display.data_window, active = isBB)
var enableMA = maTypeInput != "None"
// Smoothing MA Calculation
ma(source, length, MAtype) =>
switch MAtype
"SMA" => ta.sma(source, length)
"SMA + Bollinger Bands" => ta.sma(source, length)
"EMA" => ta.ema(source, length)
"SMMA (RMA)" => ta.rma(source, length)
"WMA" => ta.wma(source, length)
"VWMA" => ta.vwma(source, length)
// Smoothing MA plots
smoothingMA = enableMA ? ma(out, maLengthInput, maTypeInput) : na
smoothingStDev = isBB ? ta.stdev(out, maLengthInput) * bbMultInput : na
plot(smoothingMA, "EMA-based MA", color=color.yellow, display = enableMA ? display.all : display.none, editable = enableMA)
bbUpperBand = plot(smoothingMA + smoothingStDev, title = "Upper Bollinger Band", color=color.green, display = isBB ? display.all : display.none, editable = isBB)
bbLowerBand = plot(smoothingMA - smoothingStDev, title = "Lower Bollinger Band", color=color.green, display = isBB ? display.all : display.none, editable = isBB)
fill(bbUpperBand, bbLowerBand, color= isBB ? color.new(color.green, 90) : na, title="Bollinger Bands Background Fill", display = isBB ? display.all : display.none, editable = isBB)
JOWY LA VERDADERA ESTRUCTURABasically it is an indicator that perfectly represents the typical BoS Market structure in the fastest way. It is advisable to study several temporalities at the same time and not focus on just one.
Top-secret Golden Mentor (Jorge's Algo)Description:
INTRODUCTION The Top-secret Golden Mentor is an institutional trading system engineered for surgical precision on Gold (XAUUSD) and other volatile assets. This indicator goes beyond simple entry signals; it automatically filters market traps (fakeouts) by aligning every volume anomaly with the macro market structure.
The main objective is simple: Stop trading against the trend and pinpoint exactly where institutions have injected capital.
KEY FEATURES
1. X-Ray Candles (True Volume Pressure) Move beyond traditional Japanese candlesticks. This indicator "undresses" the price action:
Grey Border: Represents the price range.
Color Fill (Green/Red): Reveals who actually won the internal volume battle (Delta).
Benefit: You can spot candles that look bullish on the outside but are "hollow" (empty of buyers) on the inside.
2. Smart Trend Filter (The Trap Detector) The core upgrade of V18. The system analyzes market structure in real-time.
If a BUY signal appears during a BEARISH structure, the system instantly marks it with a Grey "X".
Signal with "X" = MARKET TRAP (Absorption).
This prevents you from entering fake pullbacks that are about to be absorbed by the main trend.
3. Sniper Signals & Institutional Gaps (FVG) When the system detects a massive volume injection:
It plots a Volume Dot (Alert).
It automatically projects the 50% Retracement Line of the candle body (Institutional Equilibrium).
It draws a Subtle Box (Gap/FVG) marking the price inefficiency where institutions often return to mitigate.
4. Dynamic Structure Panel A visual dashboard in the top corner that instantly displays the current timeframe bias (BULLISH or BEARISH), removing subjective guesswork.
HOW TO USE THIS STRATEGY
Check the Panel: Is the bias BULLISH or BEARISH?
Wait for the Signal: Look for the Volume Dot.
Filter the Trap:
If the dot has a Grey "X" on top: DO NOT TRADE. It is a counter-trend trap.
If the dot has NO "X" and lines are drawn: VALID SIGNAL.
Execution: Place your Limit Order at the dotted 50% line or inside the Institutional Gap Box.
RECOMMENDED SETTINGS
Assets: Optimized for XAUUSD (Gold), but works on Forex and Futures.
Timeframes: Highly effective on 1H for direction and 5m for sniper entries.
DISCLAIMER This indicator is a technical analysis assistance tool based on Smart Money Concepts (SMC). It does not guarantee future profits. Always use proper risk management.
FVG Candle - Auto Threshold + MitigationFVG Candle (MTF) is a clean and lightweight Fair Value Gap indicator designed for traders who want a structured and non-repainting view of imbalance zones across timeframes.
This script focuses on clarity, mitigation logic, and multi-timeframe consistency, making it suitable for discretionary trading and market structure analysis.
🔹 Key Features
Detects Bullish and Bearish Fair Value Gaps
Multi-Timeframe (MTF) FVG detection
Automatic volatility-based threshold
Split-box visualization for clearer imbalance structure
Automatic mitigation detection and cleanup
Optional bar-based extension
Built-in alerts for new FVG formation
Non-repainting by default
🔹 What Makes This Script Different
Uses a controlled MTF workflow to avoid unnecessary repainting
Automatically removes mitigated gaps to keep the chart clean
Visual split of FVG zones improves precision when interacting with price
Designed to be lightweight and readable, avoiding chart clutter
🔹 Repainting Notice
By default, this script does NOT repaint.
An optional repainting mode is available for study and visualization purposes only.
When enabled, historical FVGs may adjust as higher timeframe candles complete.
🔹 How to Use
Use FVGs as reaction zones, not direct entry signals
Combine with market structure, liquidity, or volume
Bullish FVGs may act as demand zones
Bearish FVGs may act as supply zones
Mitigated FVGs are automatically removed
🔹 Credits
The Fair Value Gap concept and core detection logic are inspired by
Smart Money Concepts .
This script is distributed under the CC BY-NC-SA 4.0 license, with proper attribution.
Peak Rejection LevelsPeak Rejection Levels is a price-action–based indicator designed to automatically identify strong rejection levels at swing highs and swing lows.
It highlights areas where price attempted to move further but was firmly rejected, often acting as key support or resistance zones.
The indicator is especially useful for :
Intraday and swing trading
Identifying high-probability rejection zones
Support/resistance mapping based on pure price action
Confluence with trend, structure, or indicator-based strategies
📈 What Is a “Peak Rejection”?
A peak rejection is defined using strict price-action rules:
🔺 Swing High Rejection (Resistance)
A swing high is marked as a rejection when:
The candle is a confirmed swing high
The candle has an upper wick
The upper wick is larger than the candle body
The wick represents the highest price of the swing
This indicates strong selling pressure and rejection from higher prices
🔻 Swing Low Rejection (Support)
A swing low is marked as a rejection when:
The candle is a confirmed swing low
The candle has a lower wick
The lower wick is larger than the candle body
The wick represents the lowest price of the swing
This indicates strong buying pressure and rejection from lower prices
When these conditions are met, the indicator draws a horizontal level at the rejection wick.
🧠 Key Features
✅ Works on any timeframe
✅ Non-repainting (uses confirmed swings)
✅ Automatically removes broken levels
✅ Automatically removes old levels based on time
✅ Clean and uncluttered chart output
✅ Pure price-action logic (no indicators, no lag)
Asia Session + London ORB (NY Time)This TradingView indicator automatically identifies and marks key price levels from the **Asia trading session** and the **London Opening Range Breakout (ORB)** in **New York time (NY)**. It is designed for traders who want a clear visual reference for breakout and reversal strategies across major sessions.
**Features:**
1. **Asia Session High, Low, and Midpoint:**
* Automatically detects the high, low, and midpoint of the Asia session (default: 7:00 PM – 3:00 AM NY time).
* Draws a semi-transparent box to visualize the Asia session range.
* Extends levels forward for breakout or range-trading reference.
2. **London ORB High, Low, and Midpoint:**
* Marks the first 15-minute opening range of the London session (default: 3:00 AM – 3:15 AM NY time).
* Draws a semi-transparent box for the London ORB.
* Calculates midpoint and extends lines for easy breakout observation.
3. **Customizable Colors and Line Widths:**
* Users can set colors for session highs, lows, midpoints, and session boxes.
* Adjustable line width for better visibility on charts.
4. **Fully Automated:**
* No manual drawing required.
* Works for futures, forex, indices, or any market symbol.
**Use Case:**
* Identify breakout levels for **London session** relative to **Asia session range**.
* Spot potential reversals or continuation patterns at session highs/lows.
* Quick visual reference for high-probability intraday setups.
**Technical Notes:**
* Built in **Pine Script v6** for TradingView.
* Uses NY timezone by default but sessions can be customized.
* Compatible with intraday and higher timeframes.
OTT + Supertrend - cift Teyit v3OTT + Supertrend Strategy - Brief Explanation
This is a technical analysis strategy combining two popular trend-following indicators:
OTT (Optimized Trend Tracker):
Uses VAR moving average and ATR (Average True Range)
Tracks price movements in an optimized way
Determines trend direction and strength
Supertrend:
ATR-based indicator
Creates dynamic support/resistance levels above or below price
Green line indicates uptrend, red line indicates downtrend
Combined Usage:
Provides strong trend confirmation when both indicators signal the same direction
OTT green + Supertrend green = Buy signal
OTT red + Supertrend red = Sell signal
Reduces false signals and confirms trend strength
Advantages: Double confirmation system, more reliable entry-exit points, early warning on trend changes
Caution: May generate false signals in sideways markets, should be supported with additional indicators.
Hieu gold m2 1688This indicator compares global gold price dynamics with global M2 liquidity.
The M2 aggregate is constructed from four major economies the United States, China, the Eurozone, and Japan which together account for roughly 80 percent of global GDP and the vast majority of global liquidity creation.
By comparing gold with this core M2 proxy, the indicator highlights how changes in global liquidity influence long term gold valuation and macro cycles.
It is designed for macro analysis rather than short term trading and focuses on trend and regime shifts in monetary conditions.
Smart Money Concepts 2026🔘 The Smart Money Concepts (SMC) 2026 indicator is an institutional-grade trading tool built to give traders a measurable edge by automating key SMC price-action events and highlighting high-probability areas of interest. Alerts using TradingView built-in alerts system. Strength ranking to highlight stronger zones. Market structure mark-up. OB/FVG/BB detection. NRP algo, all zones do not repaint.
🩶 Smart Money Concepts (SMC) 2026
🗂️ User Guide & Trading Protocol
1.0 🧾 Executive Overview
◼️ This protocol explains the indicator’s features, how to read its data, and how to apply it inside a structured, confluence-based trading plan.
▫️ The system is engineered to de-clutter charts, focus attention on high-conviction zones, and support disciplined execution.
________________________________________
2.0 ⚙️ Core Feature Compendium
🩶 The indicator integrates advanced components for a complete SMC market view.
⚙️ Feature 📌 Description
Market Structure ||| Plots BOS + CHOCH to define trend and potential reversals. ||| ✅ ON
Order Blocks (OB) ||| Detects bullish/bearish OBs showing institutional supply/demand zones. ||| ✅ ON
Fair Value Gaps (FVG) ||| Flags imbalances price often revisits to rebalance (key entry areas). ||| ✅ ON
Breaker Blocks (BB) ||| Finds failed/mitigated OBs that break and become strong reversal zones. ||| ⛔ OFF
Premium & Discount ||| Draws Premium (sell) / Discount (buy) from latest major swing range. ||| ✅ ON
Liquidity Zones ||| Marks EQH/EQL where stop liquidity is likely to rest. ||| ✅ ON
Strength Rating (0–10) ||| Scores each OB/FVG by momentum, size, and session context for quality filtering. ||| ✅ ON
Integrated Alerts ||| Native alerts when new OB/FVG forms so you don’t miss setups. ||| ✅ ON
BTCUSD with Smart Money Concepts 2026
________________________________________
3.0 🧭 Zone Information Panel
🔍 Every OB and FVG zone includes an info panel for fast decision-making.
🧩 Data Point ||| 📌 Meaning / How to Use It
Type ||| Identifies zone type (e.g., Bullish OB, Bearish FVG).
Strength ||| Proprietary 0–10 score. ◾ Primary quality filter: > 6.5 preferred.
Session ||| Session where the zone formed: Asian / London / New York (London/NY often stronger).
Age ||| Bars since creation. Older unmitigated zones can still react strongly.
Distance ||| Current price distance from zone midpoint in pips/points (proximity context).
Pips/Points ||| Total height of the zone. Tighter zones can improve R:R efficiency.
________________________________________
4.0 🛡️ Trading Methodology & Protocol
🩶 The edge is not trading every zone. The edge is:
◻️ Select high-strength zones → treat as AOIs → demand confirmation → execute with discipline.
________________________________________
4.1 🎯 High-Probability Reversal Strategy
1) 🧩 Identify the Area of Interest (AOI)
🔘 Scan for Order Blocks / Fair Value Gaps with:
◼️ Strength ≥ 6.5 (quality threshold)
▫️ Add conviction by location:
• Short bias: AOI in Premium
• Long bias: AOI in Discount
TSLA with Smart Money Concepts 2026
________________________________________
2) ⏱️ Wait for Price to Test the Zone
🔘 Let price trade into the high-strength OB/FVG.
◻️ Do not front-run entries.
🧷 Alerts ||| Set an alert for price entering the zone so you’re ready for execution.
________________________________________
3) 🧠 Seek Confirmation for Entry Most Critical Step
🔍 Confirmation reduces failure risk. On a lower timeframe (e.g., zone on 1H → confirm on 5m/15m), look for one or more:
📍 Confirmation Type ||| What You Want To See
Market Structure Shift ||| LTF CHOCH against the move into the zone.
Momentum Divergence ||| RSI/MACD divergence (LL in price + HL in oscillator for longs; inverse for shorts).
Engulfing Candle ||| Strong bullish/bearish engulfing showing decisive rejection.
________________________________________
4) 📐 Trade Execution Rules
🔘 Execute only after confirmation prints.
🧾 Rule ||| Execution Standard
Entry ||| After a clear confirmation signal closes.
Stop Loss ||| Just beyond the distal end of the zone.
Bearish OB/FVG SL ||| Place SL above the zone high.
Bullish OB/FVG SL ||| Place SL below the zone low.
Take Profit ||| Target logical liquidity: opposing high/low, opposing OB/FVG, nearby EQH/EQL.
________________________________________
Brent oil with Smart Money Concepts 2026
⬛🛠️ Key Features Overview
⚙️ Feature 📌 Description
Zone Strength Ranking ||| Each zone is dynamically scored from 1–10 based on its age and number of retests. Fresher, less-tested zones are stronger, helping prioritize high-impact levels.
Real-Time Distance ||| Each active zone’s info label shows the exact distance in pips from current price to the zone edge for quick risk/opportunity assessment.
Trading Session Tracking ||| Zones are tagged by formation session (Asian / London / New York) for added context—high-volume session zones often matter more.
Advanced ATR Filtering ||| Volatility-based filters control zone quality: set min/max zone height and optionally enforce a consistent zone height using ATR.
Minimum Zone Distance ||| Reduces clutter by requiring a minimum number of bars between new zones, ensuring zones are distinct and well-separated.
Built on Pine Script v6 ||| Uses the newest Pine Script version for better efficiency, reliability, and smoother handling of complex logic/drawings.
________________________________________
5.0 ✅ Conclusion
🩶 The SMC 2026 indicator is most powerful when used as a structured decision framework, not a blind signal generator.
🔘 Its core value is systematically identifying + scoring high-probability institutional zones.
◼️ By following this protocol—prioritize Strength ≥ 6.5, align with Premium/Discount, and require confirmation—you elevate consistency, clarity, and execution discipline.
Altangadas Megad //@version=5
indicator("VWAP/MVWAP/EMA Precise Final", overlay = true)
// --- 1. Signal Settings ---
vwapLength = input.int(1, title="VWAP Length", minval=1)
emaLength1 = input.int(7, title="Signal EMA 1 (7)", minval=1)
emaLength2 = input.int(25, title="Signal EMA 2 (25)", minval=1)
mvwapLength = input.int(21, title="MVWAP Length", minval=1)
// --- RSI Settings ---
rsiLength = input.int(14, title="RSI Length")
rsiLimit = input.int(70, title="RSI Filter Level")
// --- 2. Trend EMA Settings ---
ema50Length = input.int(50, title="Trend EMA 50")
ema100Length = input.int(100, title="Trend EMA 100")
ema200Length = input.int(200, title="Trend EMA 200")
ema800Length = input.int(800, title="Institutional EMA 800")
// --- Calculations ---
vwapValue = ta.vwap(hlc3)
cvwap = ta.ema(vwapValue, vwapLength)
mvwap = ta.ema(vwapValue, mvwapLength)
rsiValue = ta.rsi(close, rsiLength)
ema1 = ta.ema(close, emaLength1)
ema2 = ta.ema(close, emaLength2)
ema50 = ta.ema(close, ema50Length)
ema100 = ta.ema(close, ema100Length)
ema200 = ta.ema(close, ema200Length)
ema800 = ta.ema(close, ema800Length)
// --- Plotting Lines ---
plot(cvwap, color=color.blue, linewidth=2, title="VWAP", style=plot.style_linebr)
plot(mvwap, color=color.fuchsia, linewidth=2, title="MVWAP", style=plot.style_linebr)
plot(ema1, color=color.new(color.yellow, 50), title="EMA 7")
plot(ema2, color=color.new(color.orange, 50), title="EMA 25")
plot(ema50, color=color.green, linewidth=1, title="EMA 50")
plot(ema100, color=color.blue, linewidth=1, title="EMA 100")
plot(ema200, color=color.gray, linewidth=2, title="EMA 200")
plot(ema800, color=color.yellow, linewidth=4, title="EMA 800")
// --- Signal Logic (Анхны огтлолцол дээр нэг удаа сигнал өгөх) ---
// LONG: EMA болон VWAP бүгд MVWAP-аас дээш гарахад
longCond = (ema1 > mvwap) and (ema2 > mvwap) and (cvwap > mvwap)
// SHORT: EMA болон VWAP бүгд MVWAP-аас доош ороход
shortCond = (ema1 < mvwap) and (ema2 < mvwap) and (cvwap < mvwap)
// Зөвхөн төлөв өөрчлөгдөх мөчийг барих
longTrigger = longCond and not longCond and (rsiValue < rsiLimit)
shortTrigger = shortCond and not shortCond and (rsiValue > (100 - rsiLimit))
// --- Tiny Signals ---
plotshape(longTrigger, title="L", location=location.belowbar, color=color.green, style=shape.triangleup, size=size.tiny, text="L")
plotshape(shortTrigger, title="S", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.tiny, text="S")
// --- Alerts ---
alertcondition(longTrigger, title="Long Alert", message="XAUUSD: LONG!")
alertcondition(shortTrigger, title="Short Alert", message="XAUUSD: SHORT!")
IFVG Flow (M3/M5) - Reversal Pink / Continuation Blueddddddddddddddddddddddddddddddddddddddddddddddddddd
NY PM Session Highlighter (For Hawaiian Traders)Purpose: This script is designed for traders targeting the New York PM Session (1:30 PM – 4:00 PM ET). Based on 5-year historical data for ES and NQ, this window represents a high-probability period for 2:1 Risk-to-Reward setups as institutional traders rebalance and drive price toward the daily close.
Key Features:
DST-Automated Tracking: Uses the America/New_York timezone to ensure the lines stay accurate during Daylight Saving transitions.
Visual Guidance: Draws a dashed vertical line at the 1:30 PM ET start and the 4:00 PM ET close.
Session Boxing: Highlights the background in a soft blue to define the "trading zone," helping you ignore the low-volume "lunch doldrums" that occur immediately before.
Hawaii-Friendly: Automatically adjusts to your local Hawaii Standard Time (HST) so you don't have to calculate the 5 or 6-hour offset manually.
Trade Logic:
Wait for the 1:30 PM ET (8:30 AM HST) line.
Look for a sweep of the 12:00 PM – 1:00 PM (Lunch) range.
Enter on a Market Structure Shift (MSS) or Fair Value Gap (FVG).
Target a 2:1 Reward-to-Risk ratio, aiming to exit by the 4:00 PM ET line.
Quartile Close HighlighterThis indicator highlights price action by coloring candles based on their closing relative to their range. It paints the candle green if the close is within the top quartile (upper 25%) and red if the close is within the lower quartile (bottom 25%).
Best Buying & Selling Flip Zone @MaxMaserati 3.0Best Buying & Selling Flip Zone 3.0 🐂🐻
Best Buying & Selling Flip Zone 3.0 is an advanced, multi-timeframe Price Action tool designed to identify high-probability institutional supply and demand zones.
By analyzing candle range and body size (Expander vs. Normal candles), this indicator categorizes market structure shifts into three distinct tiers of strength (A+++, A++, A+). It includes a built-in Trade Manager, Volume Tracking, and a unique "Defender/Attacker" Multi-Timeframe (MTF) entry confirmation system.
🚀 Key Features
Multi-Timeframe Analysis: Monitor Higher Timeframe (HTF) zones while trading on a Lower Timeframe (LTF).
Tiered Setup Grading: Automatically classifies zones based on the strength of the candle engulfing action (King Slayer, Crusher, Drift).
Smart Entry Confirmation: The script can wait for price to tap an HTF zone and then automatically search for a confirmation pattern on the current timeframe before signaling a trade.
Built-in Trade Management: Visualizes Entry, Stop Loss (SL), and Take Profit (TP) levels with customizable Risk:Reward ratios.
Volume Tracking: Monitors the volume utilized to create a zone and tracks "remaining" volume as price tests the zone.
Zone Deletion Logic: Automatically removes zones that have been invalidated by either a wick or a candle close.
🧠 How It Works: The "A-Grade" Logic
The indicator analyzes candles based on their body-to-range ratio to define "Expander" (Explosive move) vs. "Normal" candles. It then looks for engulfing behaviors to create zones:
A+++ (King Slayer):
Logic: A Bullish Expander engulfs a Bearish Expander (or vice versa).
Significance: This is the strongest signal, indicating a massive shift in momentum where aggressive buyers completely overwhelmed aggressive sellers.
A++ (Crusher):
Logic: A Bullish Expander engulfs a Bearish Normal candle.
Significance: Strong momentum overcoming standard price action. High probability.
A+ (Drift):
Logic: A Bullish Normal candle engulfs a Bearish Normal candle.
Significance: A standard flip zone. Good for continuation plays but less aggressive than KS or CR setups.
🛠️ Functionality Guide
1. General Filters & Timeframes
Higher Timeframe: Select a timeframe higher than your chart (e.g., Select 4H while trading on 15m). The indicator will draw the major zones from the 4H.
Deletion Logic:
Wick (Hard): Zone is removed immediately if price touches the invalidation level.
Close (Soft): Zone is removed only if a candle closes past the invalidation level.
2. LTF Entry Confirmation (The "Master" Switch)
When Show LTF Entry Logic is enabled, the indicator does not signal immediately upon an HTF zone creation. Instead:
It waits for the price to retraced and touch the HTF zone.
Once touched, it scans the current timeframe for a valid flip setup (KS, CR, or DR).
It creates a tighter entry box and draws trade lines only when this confirmation occurs.
3. Trade Management
Risk:Reward: Set your desired RR (e.g., 2.0).
SL Padding: Add breathing room (ticks) to your Stop Loss.
SL Source: Choose between a safer Stop Loss (based on the HTF zone) or a tighter Stop Loss (based on the LTF confirmation candle).
4. Volume Stats
Labels display the volume involved in the zone's creation. As price taps the zone, the volume is "depleted" from the label, giving you insight into the remaining order flow absorption.
🎨 Visual Customization
Colors: Fully customizable colors for Buyers (Green) and Sellers (Red) zones across all three strength tiers.
Labels: Toggle technical names, touch counts, and timeframe labels.
Lines: Option to show "Aggressive Open Lines" to mark the exact opening price of the flip zone extended forward.
⚠️ Disclaimer
This tool is for educational purposes and chart analysis assistance only. Past performance of a setup (A+++/King Slayer) does not guarantee future results. Always manage risk and use this in conjunction with your own trading strategy.
Buyers & sellers Candle Control Dominance Zone @MaxMaserati 3.0Description
The Buyers & Sellers Candle Control Dominance Zone is a surgical price-action tool designed to identify and project key supply and demand zones derived from candle anatomy across multiple timeframes.
By splitting candles into "Sellers Control" (upper wick/shadow) and "Buyers Control" (lower wick/shadow) regions, this script visualizes exactly where price rejection and absorption are occurring. With the new HTF Engine, you can now view these institutional rejection zones from a Higher Timeframe (e.g., 4H) while trading on a Lower Timeframe (e.g., 15m).
How it Works
The indicator identifies specific "Control Zones" based on the battle between buyers and sellers:
Live Control (Current & HTF): Real-time monitoring of the developing candle. See a 4H wick forming live while watching the 1m chart.
Last Closed Control (Current & HTF): Projects the zones from the most recently completed candle.
Dominance Zones (BuBC & BeBC):
BuBC (Bullish Body Close): A "Dominance Zone" triggered when a candle closes above the previous candle's high. Signifies strong bullish momentum.
BeBC (Bearish Body Close): A "Dominance Zone" triggered when a candle closes below the previous candle's low. Signifies aggressive selling pressure.
Key Features
Multi-Timeframe (MTF) Overlay: Plot 4H, Daily, or Weekly control zones directly on your lower timeframe scalping charts.
Smart Labeling: HTF labels automatically update to show the zone type (e.g., "Sellers Control (Live) ") and whether the last candle was a Dominance candle (BuBC/BeBC).
Dynamic Extension: Zones are projected forward to help you catch retests of rejection levels.
Alerts Included: Built-in alerts trigger when price crosses into a Dominance Zone (BuBC/BeBC), allowing you to set it and forget it.
Can be use as:
Support & Resistance: Use Buyers Control zones (lower wicks) as demand zones for longs and Sellers Control zones (upper wicks) as supply zones for shorts.
Trend Confirmation: A BuBC zone often acts as a launchpad for continued upside. If price falls back into a BuBC zone and rejects, it is a high-probability continuation signal.
Fractal Entry: Use the HTF zones to find the "Big Picture" levels, then use the Current TF zones to refine your entry with precision.
Settings
Display Filter: Toggle Current TF zones (Live, Closed, BuBC, BeBC) independently.
Higher Timeframe Settings: Enable/Disable HTF overlay and select your preferred timeframe (e.g., 240 for 4H).
Visuals: Fully adjustable transparency, colors, and extension lengths to keep your chart clean.






















