HTF Control Shift + FVG Interaction + Shift Lines
### 📘 **HTF Control Shift + FVG Interaction + Shift Lines**
This indicator combines **Higher Timeframe Control Shift detection**, **Fair Value Gap (FVG) tracking**, and **Shift Line projection** into one complete structure-based trading toolkit.
#### 🔍 **Features**
* **Control Shift Detection:**
  Highlights bullish or bearish “Control Shift” candles based on wick/body ratios — showing where aggressive control transitions occur.
* **Fair Value Gap Mapping:**
  Automatically detects and draws bullish or bearish FVGs on any chosen timeframe, with optional dynamic extension and mitigation tracking.
* **Shift Line Projection:**
  Extends high and low lines from each Control Shift candle to visualize structure and potential continuation or rejection zones.
* **Interaction Alerts:**
  Triggers alerts when:
  * A Bullish Control Shift interacts with a Bullish FVG
  * A Bearish Control Shift interacts with a Bearish FVG
  * Price breaks the high/low following an interaction
* **Visual Highlights:**
  Colored FVG zones, labeled interactions, and diamond markers for easy visual confirmation of key reaction points.
#### ⚙️ **How to Use**
1. Choose a **higher timeframe (HTF)** in settings (e.g., 15m, 1h, 4h).
2. Watch for **Control Shift candles** (yellow/orange bars) forming at or interacting with **FVG zones**.
3. A **Bullish Interaction + Break of High** often signals continuation.
   A **Bearish Interaction + Break of Low** may confirm rejection or trend reversal.
4. Use alerts to track live market structure shifts without constant chart watching.
#### 🧠 **Purpose**
Ideal for traders combining **Smart Money Concepts (SMC)** and **candle structure logic**, this tool visualizes where institutional aggression shifts align with **liquidity gaps** — helping anticipate **high-probability continuations or reversals**.
Candlestick analysis
AG_STRATEGY📈 AG_STRATEGY — Smart Money System + Sessions + PDH/PDL
AG_STRATEGY is an advanced Smart Money Concepts (SMC) toolkit built for traders who follow market structure, liquidity and institutional timing.
It combines real-time market structure, session ranges, liquidity levels, and daily institutional levels — all in one clean, professional interface.
✅ Key Features
🧠 Smart Money Concepts Engine
Automatic detection of:
BOS (Break of Structure)
CHoCH (Change of Character)
Dual structure system: Swing & Internal
Historical / Present display modes
Optional structural candle coloring
🎯 Liquidity & Market Structure
Equal Highs (EQH) and Equal Lows (EQL)
Marks strong/weak highs & lows
Real-time swing confirmation
Clear visual labels + smart positioning
⚡ Fair Value Gaps (FVG)
Automatic bullish & bearish FVGs
Higher-timeframe compatible
Extendable boxes
Auto-filtering to remove noise
🕓 Institutional Sessions
Asia
London
New York
Includes:
High/Low of each session
Automatic range plotting
Session background shading
London & NY Open markers
📌 PDH/PDL + Higher-Timeframe Levels
PDH / PDL (Previous Day High/Low)
Dynamic confirmation ✓ when liquidity is swept
Multi-timeframe level support:
Daily
Weekly
Monthly
Line style options: solid / dashed / dotted
🔔 Built-in Alerts
Internal & swing BOS / CHoCH
Equal Highs / Equal Lows
Bullish / Bearish FVG detected
🎛 Fully Adjustable Interface
Colored or Monochrome visual mode
Custom label sizes
Extend levels automatically
Session timezone settings
Clean, modular toggles for each component
🎯 Designed For Traders Who
Follow institutional order flow
Enter on BOS/CHoCH + FVG + Liquidity sweeps
Trade London & New York sessions
Want structure and liquidity clearly mapped
Prefer clean charts with full control
💡 Why AG_STRATEGY Stands Out
✔ Professional SMC engine
✔ Real-time swing & internal structure
✔ Session-based liquidity tracking
✔ Non-cluttered chart — high clarity
✔ Supports institutional trading workflows
Structure Labels ( HH / HL / LH / LL )Here’s a clean and efficient Pine Script (v5) code that automatically detects and labels Higher Highs ( HH ), Lower Highs ( LH ), Higher Lows ( HL ), and Lower Lows ( LL ) on your  TradingView chart .
OPADA//@version=5
indicator("Buy/Sell Zones – TV Style", overlay=true, timeframe="", timeframe_gaps=true)
//=====================
// الإعدادات
//=====================
len     = input.int(100,  "Length", minval=10)
useATR  = input.bool(true, "Use ATR (بدل الانحراف المعياري)")
mult    = input.float(2.0, "Band Multiplier", step=0.1)
useRSI  = input.bool(true, "تفعيل فلتر RSI")
rsiOB   = input.int(70, "RSI Overbought", minval=50, maxval=90)
rsiOS   = input.int(30, "RSI Oversold",  minval=10, maxval=50)
//=====================
// القناة: أساس + انحراف
//=====================
basis = ta.linreg(close, len, 0)
off   = useATR ? ta.atr(len) * mult : ta.stdev(close, len) * mult
upper = basis + off
lower = basis - off
// نطاق علوي/سفلي بعيد لعمل تعبئة المناطق
lookback      = math.min(bar_index, 500)
topBand       = ta.highest(high, lookback)  + 50 * syminfo.mintick
bottomBand    = ta.lowest(low, lookback)    - 50 * syminfo.mintick
//=====================
// الرسم
//=====================
pUpper   = plot(upper, "Upper", color=color.new(color.blue, 0), linewidth=1)
pLower   = plot(lower, "Lower", color=color.new(color.red,  0), linewidth=1)
pBasis   = plot(basis, "Basis", color=color.new(color.gray, 60), linewidth=2)
// تعبئة المناطق: فوق القناة (أزرق)، تحت القناة (أحمر)
pTop     = plot(topBand,    display=display.none)
pBottom  = plot(bottomBand, display=display.none)
fill(pUpper, pTop,    color=color.new(color.blue, 80))   // منطقة مقاومة/بيع
fill(pBottom, pLower, color=color.new(color.red,  80))   // منطقة دعم/شراء
//=====================
// خط أفقي من قمّة قريبة (يمثل مقاومة) – قريب من الخط المنقّط في الصورة
//=====================
resLen   = math.round(len * 0.6)
dynRes   = ta.highest(high, resLen)
plot(dynRes, "Recent Resistance", color=color.new(color.white, 0), linewidth=1)
//=====================
// إشارات BUY / SELL + فلتر RSI (اختياري)
//=====================
rsi = ta.rsi(close, 14)
touchLower = ta.crossover(close, lower) or close <= lower
touchUpper = ta.crossunder(close, upper) or close >= upper
buyOK  = useRSI ? (touchLower and rsi <= rsiOS) : touchLower
sellOK = useRSI ? (touchUpper and rsi >= rsiOB) : touchUpper
plotshape(buyOK,  title="BUY",  location=location.belowbar, style=shape.labelup,
     text="BUY",  color=color.new(color.green, 0), textcolor=color.white, size=size.tiny, offset=0)
plotshape(sellOK, title="SELL", location=location.abovebar, style=shape.labeldown,
     text="SELL", color=color.new(color.red,   0), textcolor=color.white, size=size.tiny, offset=0)
// تنبيهات
alertcondition(buyOK,  title="BUY",  message="BUY signal: price touched/closed below lower band (RSI filter may apply).")
alertcondition(sellOK, title="SELL", message="SELL signal: price touched/closed above upper band (RSI filter may apply).")
Minimal Adaptive System v7 [MAS] - Refactor (No Repaint)🔹 Overview
MAS v7 is the next evolution of the Minimal Adaptive System series.
It analyzes trend, momentum, volatility and volume simultaneously, producing a single Adaptive Score (0–1) that automatically calibrates to market conditions.
All signals are non-repainting, generated only on confirmed bars.
⸻
🔹 Core Features
	•	Adaptive Scoring Engine – Combines EMA, RSI, MACD, ADX and Volume into a dynamic score that shifts with volatility.
	•	Volatility Awareness – ATR-based adjustment keeps thresholds proportional to market noise.
	•	Trend Detection – Multi-EMA system identifies true direction and filter reversals.
	•	Momentum Confirmation – RSI & MACD synchronization for higher-quality signals.
	•	Dynamic Thresholds – Buy/Sell levels adapt to changing volatility regimes.
	•	Minimal Dashboard – Clean, real-time panel displaying Trend Bias, RSI, Volume Ratio, ADX and Adaptive Score.
	•	No Repaint Architecture – All conditions calculated from closed candles only.
	•	Multi-Mode Ready – Works for Scalping, Swing or Position trading with sensitivity control.
⸻
🔹 Signal Logic
	•	Strong Buy → Adaptive Score crosses above 0.60
	•	Strong Sell → Adaptive Score crosses below 0.40
	•	Thresholds expand or contract automatically with volatility and sensitivity.
⸻
🔹 Best Markets & Timeframes
Designed for Crypto, Forex, Indices and Equities across all chart periods.
Works especially well on 1H – 4H swing setups and 15 min intraday momentum trades.
⸻
🔹 Risk Management
Built-in ATR adaptive stops and targets adjust dynamically to volatility, offering consistent R:R behavior across different assets.
⸻
🔹 Summary
MAS v7 brings adaptive intelligence to technical trading.
It doesn’t chase signals — it evolves with the market.
#1 Vishal Toora Buy Sell Tablecopyright Vishal Toora
**“© 2025 Vishal Toora — counting volumes so you don’t have to. Buy, sell, or just stare at the screen.”**
Or a few more playful options:
1. **“© Vishal Toora — making deltas speak louder than your ex.”**
2. **“© Vishal Toora — one signal to rule them all (Buy/Sell/Neutral).”**
3. **“© Vishal Toora — because guessing markets is so 2024.”**
Disclaimer: This indicator is for educational and informational purposes only. I do not claim 100% accuracy, and you are responsible for your own trading decisions.
Trend on TimeFrames indicatorThis indicator shows you If you are bullish or bearish on every important timeframe
Breakout Bar CandidateShows the values of True Range, LS volatility and whether the volume is above or below average
RSI potente 2.0rsi mas refinado e indicadores correctos a corto ,mediano y largo plazo .. el mejor indicador
PriceAction & Economic StrategyThis indicator combines price-action logic with macroeconomic data to generate trading signals.
Features:
- Price-action signals: A bullish signal occurs when a candle closes above its open; a bearish signal occurs when a candle closes below its open.
- Signal gap: The indicator includes an input called "Signal Gap (bars)" that defines the minimum number of bars between signals. By default the gap is set to 3, but you can adjust this between 1 and 10 to control signal frequency.
- Alerts: The script defines alert conditions for long and short signals, allowing you to create TradingView alerts that notify you when a new signal occurs.
- Economic data: The script uses TradingView's built-in `request.economic()` function to request U.S. GDP data. The GDP series is plotted in the Data Window for additional macroeconomic context.
How to use:
1. Add the indicator to a chart.
2. Open the indicator's settings and adjust the "Signal Gap (bars)" input to set the minimum bar gap between signals.
3. Look for green triangles plotted below the bars (bullish signals) and red triangles plotted above the bars (bearish signals). These appear only when the gap criterion is met.
4. If you want alerts, click the Alert button in TradingView, select this indicator, and choose either the Long or Short alert conditions.
5. To view the GDP data, open the Data Window; the GDP value will be shown alongside other series for each bar.
6. Use these signals in combination with your own analysis; this indicator is for educational purposes and does not constitute financial advice.
London Breakout Structure by Ale 2This indicator identifies market structure breakouts (CHOCH/BOS) within a specific London session window, highlighting potential breakout trades with automatic entry, stop loss (SL), and take profit (TP) levels.
It helps traders focus on high-probability breakouts when volatility increases after the Asian session, using price structure, ATR-based volatility filters, and a custom risk/reward setup.
🔹 Example of Strategy Application
Define your session (e.g. 04:00 to 05:00).
Wait for a CHOCH (Change of Character) inside this session.
If a bullish CHOCH occurs → go LONG at candle close.
If a bearish CHOCH occurs → go SHORT at candle close.
SL is set below/above the previous swing using ATR × multiplier.
TP is calculated automatically based on your R:R ratio.
📊 Example:
When price breaks above the last swing high within the session, a “BUY” label appears and the indicator draws Entry, SL, and TP levels automatically.
If the breakout fails and price closes below the opposite structure, a “SELL” signal will replace the bullish setup.
🔹 Details
The logic is based on structural shifts (CHOCH/BOS):
A CHOCH occurs when price breaks and closes beyond the most recent high/low.
The indicator dynamically detects these shifts in structure, validating them only inside your chosen time window (e.g. the London Open).
The ATR filter ensures setups are valid only when the range has enough volatility, avoiding false signals in low-volume hours.
You can also visualize:
The session area (purple background)
Entry, Stop Loss, and Take Profit levels
Direction labels (BUY/SELL)
ATR line for volatility context
🔹 Configuration
Start / End Hour: define your preferred trading window.
ATR Length & Multiplier: adjust for volatility.
Risk/Reward Ratio: set your desired R:R (default 1:2).
Minimum Range Filter: avoids signals with tight SLs.
Alerts: receive notifications when breakout conditions occur.
🔹 Recommendations
Works best on 15m or 5m charts during London session.
Designed for breakout and structure-based traders.
Works on Forex, Crypto, and Indices.
Ideal as a visual and educational tool for understanding BOS/CHOCH behavior.
Candle Range Theory (CRT) by LucasCRT script to find entries on AMD trades - turtle soup, ICT, manipulation, stop loss hunt. Use on higher timeframes - minimum 1H and higher, try to enter with trend - when uptrending wait for bearish candle with entry signal.
Custom Two Sessions H/L/50% LevelsTrack high/low/midpoint levels across two customizable time sessions. Perfect for monitoring H4 blocks, session ranges, or any custom time periods as reference levels for lower timeframe trading.
  
What This Indicator Does:
Tracks and projects High, Low, and 50% Midpoint levels for two fully customizable time sessions. Unlike fixed-session indicators, you define EXACTLY when each session starts and ends.
Key Features:
• Two independent sessions with custom start/end times (hour and minute)
• High/Low/50% midpoint tracking for each session
• Visual session boxes showing calculation periods
• Horizontal lines projecting levels into the future
• Historical session levels remain visible for reference
• Works on any chart timeframe (M1, M5, M15, H1, H4, etc.)
• Full visual customization (colors, line styles, widths)
• DST timezone support
Common Use Cases:
H4 Candle Tracking - Set sessions to 4-hour blocks (e.g., 6-10am, 10am-2pm) to track individual H4 highs/lows
H1 Candle Tracking - 1-hour blocks for scalping reference levels
Session Trading - ETH vs RTH, London vs NY, Asian session, etc.
Custom Time Periods - Any time range you want to monitor
How to Use:
The indicator identifies key price levels from higher timeframe periods. Use previous session H/L/50% as reference levels for:
Identifying sweep and reclaim setups
Lower timeframe structural flip confirmations
Support/resistance zones for entries
Delivery targets after breaks of structure
Settings:
Configure each session's start/end times independently. The indicator automatically triggers at the first bar crossing into your specified time, making it compatible with all chart timeframes.
Smart Money Concepts URUGUAYSmart money concept, Bos , choch , liquidiciones con niveles marcados con lineas perfecto
High Volume Vector CandlesHigh Volume Vector Candles highlights candles where trading activity significantly exceeds the average, helping you quickly identify powerful moves driven by strong volume.
How it works:
- The script calculates a moving average of volume over a user-defined period.
- When current volume exceeds the chosen threshold (e.g. 150% of the average), the candle is marked as a high-volume event.
- Bullish high-volume candles are highlighted in blue tones, while bearish ones are shown in yellow, both with adjustable opacity.
This visualization makes it easier to spot potential breakout points, absorption zones, or institutional activity directly on your chart.
Customizable Settings:
• Moving average length  
• Threshold percentage above average  
• Bullish/Bearish highlight colors  
• Opacity level
Ideal for traders who combine price action with volume analysis to anticipate market momentum.
5M Gap Finder — Persistent Boxes (Tiered) v65 M gap finder, using 3 different types of gaps: Tier	Definition Tightness	Frequency	Use Case
Tier A (Strict)	Gap ≥ 0.10%, body ≥ 70% of range	Rare	Institutional-strength displacement
Tier B (Standard)	Gap ≥ 0.05%, body ≥ 60% of range	Medium	Baseline trading setup
Tier C (Loose)	Gap ≥ 0.03%, no body condition	Common	Data collection and observation
STOP STRAT MECANICA//@version=5
indicator("Breakout + Stop ATR(100) - M15 (SL label)", overlay=true)
// === PARÁMETROS ===
atr_length = input.int(100, "ATR Length")
atr_mult   = input.float(1.0, "Multiplicador ATR", step=0.1)
range_len  = input.int(20, "Velas para rango (breakout)", minval=5)
// === CÁLCULOS ===
atr_value = ta.atr(atr_length)
range_high = ta.highest(high, range_len)
range_low  = ta.lowest(low, range_len)
break_long  = ta.crossover(close, range_high)
break_short = ta.crossunder(close, range_low)
entry_price = close
long_stop  = entry_price - atr_value * atr_mult
short_stop = entry_price + atr_value * atr_mult
// === VARIABLES PERSISTENTES ===
var line long_sl_line  = na
var line short_sl_line = na
var label last_label   = na
var label info_label   = na
// === RUPTURA ALCISTA ===
if break_long
    if not na(long_sl_line)
        line.delete(long_sl_line)
    long_sl_line := line.new(bar_index, long_stop, bar_index + 1, long_stop, xloc=xloc.bar_index, extend=extend.right, color=color.new(color.green, 0), width=2)
    last_label := label.new(bar_index, entry_price, "Breakout ↑ SL: " + str.tostring(long_stop, format.mintick), xloc=xloc.bar_index, yloc=yloc.price, style=label.style_label_up, color=color.new(color.green, 80), textcolor=color.white)
// === RUPTURA BAJISTA ===
if break_short
    if not na(short_sl_line)
        line.delete(short_sl_line)
    short_sl_line := line.new(bar_index, short_stop, bar_index + 1, short_stop, xloc=xloc.bar_index, extend=extend.right, color=color.new(color.red, 0), width=2)
    last_label := label.new(bar_index, entry_price, "Breakout ↓ SL: " + str.tostring(short_stop, format.mintick), xloc=xloc.bar_index, yloc=yloc.price, style=label.style_label_down, color=color.new(color.red, 80), textcolor=color.white)
// === INFO LABEL (solo muestra “SL” en vez de ATR) ===
if barstate.islast
    if not na(info_label)
        label.delete(info_label)
    info_label := label.new(bar_index, high, "SL: " + str.tostring(atr_value, format.mintick), xloc=xloc.bar_index, yloc=yloc.abovebar, style=label.style_label_left, color=color.new(color.blue, 70), textcolor=color.white)
VWDF Oscillator + Highlight + Targetsai generated measures volume, delta and its weighted. significant candles are displayed
EURUSD kun profitVery nice script, Cannot call 'alertcondition' with argument 'message'='exit_alert_msg'. An argument of 'series string' type was used but a 'const string' is expected. Version 5 of Pine Script® is outdated. We recommend using the current version, which is 6.(PINE_VERSION_OUTDATED)
Serenity Model VIPI — by yuu_iuHere’s a concise, practical English guide for Serenity Model VIPI (Author: yuu_iu). It covers what it is, how to set it up for daily trading, how to tune it, and how we guarantee non-repainting.
Serenity Model VIPI — User Guide (Daily Close, Non‑Repainting)
Credits
- Author: yuu_iu
- Producer: yuu_iu
- Platform: TradingView (Pine Script v5)
1) What it is
Serenity Model VIPI is a multi‑module, context‑aware trading model that fuses signals from:
- Entry modules: VCP, Flow, Momentum, Mean Reversion, Breakout
- Exit/risk modules: Contrarian, Breakout Sell, Volume Delta Sell, Peak Detector, Overbought Exit, Profit‑Take
- Context/memory: Learns per Ticker/Sector/Market Regime and adjusts weights/aggression
- Learning engine: Runs short “fake trades” to learn safely before scaling real trades
It produces a weighted, context‑adjusted score and a final decision: BUY, SELL, TAKE_PROFIT, or WAIT.
2) How it works (high level)
- Each module computes a score per bar.
- A fusion layer combines module scores using accuracy and base weights, then adjusts by:
  - Market regime (Bull/Bear/Sideways) and optional higher‑timeframe (HTF) bias
  - Risk control neuron
  - Context memory (ticker/sector/regime)
- Optional LLM mode can override marginal cases if context supports it.
- Final decision is taken at bar close only (no intrabar repaint).
3) Non‑repainting guarantee (Daily)
- Close‑only execution: All key actions use barstate.isconfirmed, so signals/entries/exits only finalize after the daily candle closes.
- No lookahead on HTF data: request.security() reads prior‑bar values (series ) for HTF close/EMA/RSI.
- Alerts at bar close: Alerts are fired once per bar close to prevent mid‑bar changes.
What this means: Once the daily bar closes, the decision and alert won’t be repainted.
4) Setup (TradingView)
- Paste the Pine v5 code into Pine Editor, click Add to chart.
- Timeframe: 1D (Daily).
- Optional: enable a date window for training/backtest
  - Enable Custom Date Filter: ON
  - Set Start Date / End Date
- Create alert (non‑repainting)
  - Condition: AI TRADE Signal
  - Options: Once Per Bar Close
  - Webhook (optional): Paste your URL into “System Webhook URL (for AI events)”
- Watch the UI
  - On‑chart markers: AI BUY / AI SELL / AI TAKE PROFIT
  - Right‑side table: Trades, Win Rate, Avg Profit, module accuracies, memory source, HTF trend, etc.
  - “AI Thoughts” label: brief reasoning and debug lines.
5) Daily trading workflow
- The model evaluates at daily close and may:
  - Enter long (BUY) when buy votes + total score exceed thresholds, after context/risk checks
  - Exit via trailing stop, hard stop, TAKE_PROFIT, or SELL decision
- Learning mode:
  - Triggers short “fake trades” every N bars (default 3) and measures outcome after 5 bars
  - Improves module accuracies and adjusts aggression once stable (min fake win% threshold)
- Memory application:
  - When you change tickers, the model tries to apply Ticker or Sector memory for the current market regime to pre‑bias module weights/aggression.
6) Tuning (what to adjust and why)
Core controls
- Base Aggression Level (default 1.0): Higher = more trades and stronger decisions; start conservative on Daily (1.0–1.2).
- Learning Speed Multiplier (default 3): Faster adaptation after fake/real trades; too high can overreact.
- Min Fake Win Rate to Exit Learning (%) (default 10–20%): Raises the bar before trusting more real trades.
- Fake Trade Every N Bars (default 3): Frequency of learning attempts.
- Learning Threshold Win Rate (default 0.4): Governs when the learner should keep learning.
- Hard Stop Loss (%) (default 5–8%): Global emergency stop.
Multi‑Timeframe (MTF)
- Enable Multi‑Timeframe Confirmation: ON (recommended for Daily)
- HTF Trend Source: HOSE:VNINDEX for VN equities (or CURRENT_SYMBOL if you prefer)
- HTF Timeframe: D or 240 (for a strong bias)
- MTF Weight Adjustment: 0.2–0.4 (0.3 default is balanced)
Module toggles and base weights
- In strong uptrends: increase VCP, Momentum, Breakout (0.2–0.3 typical)
- In sideways low‑vol regimes: raise MeanRev (0.2–0.3)
- For exits/defense: Contrarian, Peak, Overbought Exit, Profit‑Take (0.1–0.2 each)
- Keep Flow on as a volume‑quality filter (≈0.2)
Memory and control
- Enable Shared Memory Across Tickers: ON to share learning
- Enable Sector‑Based Knowledge Transfer: ON to inherit sector tendencies
- Manual Reset Learning: Use sparingly to reset module accuracies if regime changes drastically
Risk management
- Hard Stop Loss (%): 5–8% typical on Daily
- Trailing Stop: ATR‑ and volatility‑adaptive; tightens faster in Bear/High‑Vol regimes
- Max hold bars: Shorter in Bear or Sideways High‑Vol to cut risk
Alerts and webhook
- Use AI TRADE Signal with Once Per Bar Close
- Webhook payload is JSON, including event type, symbol, time, win rates, equity, aggression, etc.
7) Recommended Daily preset (VN equities)
- MTF: Enable, Source: HOSE:VNINDEX, TF: D, Weight Adj: 0.3
- Aggression: 1.1
- Learning Speed: 3
- Min Fake Win Rate to Exit Learning: 15%
- Hard SL: 6%
- Base Weights:
  - VCP 0.25, Momentum 0.25, Breakout 0.15, Flow 0.20
  - MeanRev 0.20 (raise in sideways)
  - Contrarian/Peak/Overbought/Profit‑Take: 0.10–0.20
- Leave other defaults as is, then fine‑tune by symbol/sector.
8) Reading the UI
- Table highlights: Real Trades, Win Rate, Avg Profit, Fake Actions/Win%, VCP Acc, Aggression, Equity, Score, Status (LEARNING/TRADING/REFLECTION), Last Real, Consec Loss, Best/Worst Trade, Pattern Score, Memory Source, Current Sector, AI Health, HTF Trend, Scheduler, Memory Loaded, Fake Active.
- Shapes: AI BUY (below bar), AI SELL/TAKE PROFIT (above bar)
- “AI Thoughts”: module contributions, context notes, debug lines
9) Troubleshooting
- No trades?
  - Ensure timeframe is 1D and the date filter covers the chart range
  - Check Scheduler Cooldown (3 bars default) and that barstate.isconfirmed (only at close)
  - If MTF is ON and HTF is bearish, buy bias is reduced; relax MTF Weight Adjustment or module weights
- Too many/too few trades?
  - Lower/raise Base Aggression Level
  - Adjust base weights on key modules (raise entry modules to be more active; raise exit/defense modules to be more selective)
- Learning doesn’t end?
  - Increase Min Fake Win Rate to Exit Learning only after it’s consistently stable; otherwise lower it or reduce Fake Trade Every N Bars
10) Important notes
- The strategy is non‑repainting at bar close by design (confirmed bars + HTF series  + close‑only alerts).
- Backtest fills may differ from live fills due to slippage and broker rules; this is normal for all TradingView strategies.
- Always validate settings across multiple symbols and regimes before going live.
If you want, I can bundle this guide into a README section in your Pine code and add a small on‑chart signature (Author/Producer: yuu_iu) in the top‑right corner.
Multi-TF Gates (Labels + Alerts)//@version=6
indicator("PO9 – Multi-TF Gates (Labels + Alerts)", overlay=true, max_lines_count=500)
iYear=input.int(2024,"Anchor Year",minval=1970)
iMonth=input.int(11,"Anchor Month",minval=1,maxval=12)
iDay=input.int(6,"Anchor Day",minval=1,maxval=31)
useSymbolTZ=input.bool(true,"Use symbol's exchange timezone (syminfo.timezone)")
tzChoice=input.string("Etc/UTC","Custom timezone (if not using symbol TZ)",options= )
anchorType=input.string("FX NY 17:00","Anchor at",options= )
showEvery=input.int(9,"Mark every Nth candle",minval=1)
showD=input.bool(true,"Show Daily")
show3H=input.bool(true,"Show 3H")
show1H=input.bool(true,"Show 1H")
show15=input.bool(true,"Show 15M")
show5=input.bool(false,"Show 5M (optional)")
colD=input.color(color.new(color.red,0),"Daily color")
col3H=input.color(color.new(color.orange,0),"3H color")
col1H=input.color(color.new(color.yellow,0),"1H color")
col15=input.color(color.new(color.teal,0),"15M color")
col5=input.color(color.new(color.gray,0),"5M color")
styStr=input.string("dashed","Line style",options= )
lnW=input.int(2,"Line width",minval=1,maxval=4)
extendTop=input.float(1.5,"ATR multiples above high",minval=0.1)
extendBottom=input.float(1.5,"ATR multiples below low",minval=0.1)
showLabels=input.bool(true,"Show labels")
enableAlerts=input.bool(true,"Enable alerts")
f_style(s)=>s=="solid"?line.style_solid:s=="dashed"?line.style_dashed:line.style_dotted
var lines=array.new_line()
f_prune(maxKeep)=>
    if array.size(lines)>maxKeep
        old=array.shift(lines)
        line.delete(old)
tzEff=useSymbolTZ?syminfo.timezone:tzChoice
anchorTs=anchorType=="FX NY 17:00"?timestamp("America/New_York",iYear,iMonth,iDay,17,0):timestamp(tzEff,iYear,iMonth,iDay,0,0)
atr=ta.atr(14)
f_vline(_color,_tf,_idx)=>
    y1=low-atr*extendBottom
    y2=high+atr*extendTop
    lid=line.new(x1=bar_index,y1=y1,x2=bar_index,y2=y2,xloc=xloc.bar_index,extend=extend.none,color=_color,style=f_style(styStr),width=lnW)
    if showLabels
        label.new(x=bar_index,y=high+(atr*2),text=_tf+" #"+str.tostring(_idx),xloc=xloc.bar_index,style=label.style_label_down,color=_color,textcolor=color.black)
    array.push(lines,lid)
is_tf_open(tf)=> time==request.security(syminfo.tickerid,tf,time,barmerge.gaps_off,barmerge.lookahead_off)
f_tf(_tf,_show,_color,_name)=>
    var bool started=false
    var int idx=0
    isOpen=_show and is_tf_open(_tf)
    firstBar=isOpen and (time>=anchorTs) and (nz(time ,time)






















