Kitty Strength vs Ticker w/ Custom MA [theUltimator5]This indicator is one of the Roaring Kitty indicators shown on his StockCharts page, as the GME: SP:SPX chart. This indicator calculates and displays the relative strength of the current ticker against a comparison ticker of your choice (SPX by default). It helps you identify outperformance and underperformance trends by visualizing the price ratio between two assets, as well as an added moving average of your choice (100 SMA by default)
Key Features:
Customizable comparison ticker (default: SPX) - compare against any index or ticker (SPY, QQQ, DIA, etc.)
Multiple moving average types: SMA, EMA, WMA, HMA, VWMA, and RMA
Adjustable moving average length for trend identification
Clean visualization in a separate pane below the main chart
How to Use:
The blue line represents the current relative strength ratio (Current Ticker / Comparison Ticker). When the line is rising, the current ticker is outperforming the comparison ticker. When falling, it's underperforming.
The silver line is the moving average of the relative strength, which helps smooth out noise and identify longer-term trends. Crossovers between the relative strength and its moving average can signal changes in relative performance.
I added additional user configuration so you can customize it to your preferred style since SPX and SMA 100 are not suitable for all tickers and timeframes.
Indicadores y estrategias
Premium Trading Dashboard 💎 Premium Trading Dashboard - Comprehensive Description
This Pine Script v5 indicator is an elite-level all-in-one trading system designed for sophisticated traders on Bursa Malaysia. It combines institutional-grade analysis with smart money detection in a premium visual dashboard.
🎯 Core Purpose:
A comprehensive decision-making tool that analyzes 10+ technical dimensionssimultaneously to provide clear BUY/SELL signals, position sizing recommendations, and complete trade plans with entry/exit levels.

🔥 Key Features & Analysis Systems:
1. 📊 Multi-Dimensional Scoring System
Technical Rating (0-100)
• Moving Average Signals (25 pts): Price vs SMA20/50/200, MA alignment
• RSI Analysis (15 pts): Optimal 50-60 range, avoid extremes
• MACD Signals (15 pts): Line crossovers, histogram momentum
• Bollinger Bands (10 pts): Price position relative to bands
• Stochastic (10 pts): Oversold/overbought conditions
• Volume Confirmation (10 pts): Above MA20 and MA50
• ADX Trend Strength (15 pts): Strong trends above 25
Rating Levels:
• 🚀 80+: STRONG BUY
• 📈 65-79: BUY
• ↔️ 50-64: NEUTRAL
• 📉 35-49: WEAK
• 🔻 <35: VERY WEAK

Shark/Smart Money Rating (0-100)
Detects institutional and smart money activity:
• Volume Spikes (30 pts): 2x+ above MA20
• Large Candles (20 pts): 1.5x+ average range
• Strong Candles (25 pts): 70%+ body-to-range ratio
• Accumulation/Distribution (15 pts): A/D line momentum
Shark Signals:
• 🦈💰 BUYING HARD (70+): Aggressive institutional accumulation
• 🦈📈 BUYING (50+): Smart money entering
• 🦈💸 SELLING HARD (70+): Distribution phase
• 🦈📉 SELLING (50+): Smart money exiting
• ⚡ ACTIVE (40+): Moderate activity
• 😴 QUIET (<40): Low institutional interest

Momentum Score (0-100)
Measures price acceleration across multiple timeframes:
• 1-Day Change (15 pts): >3% = strong, >1% = moderate
• 5-Day Change (15 pts): >5% = strong, >2% = moderate
• 20-Day Change (20 pts): >10% = strong, >5% = moderate
• RSI Momentum (25 pts): 60-70 optimal zone
• MACD Momentum (25 pts): Histogram rising + line above signal
Momentum Levels:
• 🚀 80+: VERY STRONG
• ⬆️ 65-79: STRONG
• ➡️ 50-64: MODERATE
• ⬇️ 35-49: WEAK
• 💤 <35: VERY WEAK

Quality Rating (QR Score 0-100)
Fundamental quality indicators:
• Price vs Key MAs (30 pts): Above SMA50 & SMA200
• MA Alignment (20 pts): Perfect 7>20>50>200 hierarchy
• Volume Consistency (20 pts): Above MA50, positive growth
• 52W Position (15 pts): Price in upper range (70%+)
• Trend Strength ADX (15 pts): Above 40
QR Rating:
• ⭐⭐⭐⭐⭐ 80+: EXCELLENT
• ⭐⭐⭐⭐ 65-79: GOOD
• ⭐⭐⭐ 50-64: AVERAGE
• ⭐⭐ 35-49: BELOW AVG
• ⭐ <35: POOR

2. 🔄 Market Phase Detection (Wyckoff Cycle)
Advanced cycle analysis identifying the 4 key market phases:
• 1️⃣ ACCUMULATION 🌊: "Smart money accumulating"
◦ Sideways at bottom, increasing volume, A/D rising
◦ Best phase for building positions
• 2️⃣ MARKUP 🚀: "Active buying phase"
◦ Strong uptrend, price above all MAs
◦ Momentum building, breakouts occurring
• 3️⃣ DISTRIBUTION ⚠️: "Smart money distributing"
◦ Sideways at top, high volume, A/D falling
◦ Warning phase - prepare to exit
• 4️⃣ MARKDOWN 📉: "Active selling phase"
◦ Downtrend, price below MAs
◦ Avoid new entries
• ↔️ TRANSITION: Between phases

3. 💎 Conviction Level (Composite Score)
Weighted combination of all ratings:
• Technical (30%) + Shark (25%) + Momentum (25%) + QR (20%)
Conviction Levels:
• 💎💎💎 80+: VERY HIGH - Maximum confidence
• 💎💎 65-79: HIGH - Strong confidence
• 💎 50-64: MODERATE - Reasonable confidence
• ⚠️ 35-49: LOW - Weak conviction
• ❌ <35: VERY LOW - Avoid

4. 📋 Analyst Rating (Overall Score)
Final composite recommendation:
• Technical (35%) + Shark (25%) + Momentum (25%) + QR (15%)
Analyst Ratings:
• ⭐⭐⭐⭐⭐ 80+: STRONG BUY
• ⭐⭐⭐⭐ 65-79: BUY
• ⭐⭐⭐ 50-64: HOLD
• ⭐⭐ 35-49: WEAK
• ⭐ <35: AVOID

5. 🎯 Trading Signal Generation (LONG Only)
Smart signal logic with multiple confirmations:
• 🚀 STRONG BUY: Tech 70+, Momentum 60+, Volume spike, Price > SMA20, RSI < 70
• 📈 BUY: Tech 60+, Momentum 50+, Price > SMA20, RSI < 65
• ⏳ WAIT & WATCH: Tech/Conviction 50+
• 🛑 AVOID: Below thresholds

6. 💰 Position Size Recommendation
Risk-based position sizing (% of capital):
• 💰 FULL (5%): Conviction 75+ - Highest confidence
• 💵 LARGE (3-4%): Conviction 60-74 - Strong confidence
• 💳 MEDIUM (2-3%): Conviction 45-59 - Moderate confidence
• 💸 SMALL (1-2%): Conviction 30-44 - Low confidence
• 🚫 AVOID: Conviction <30

7. 📊 Volume Analysis
Real-time volume assessment:
• 🔥🔥🔥 EXTREME: 3x+ above MA20
• 🔥🔥 VERY HIGH: 2x+ above MA20
• 🔥 HIGH: 1.5x+ above MA20
• ⬆️ ABOVE AVG: 1x-1.5x MA20
• ➡️ NORMAL: 0.7x-1x MA20
• ⬇️ LOW: Below 0.7x MA20

8. 📈 Trend Analysis
Dynamic trend detection with duration tracking:
• 📈 STRONG BULLISH: All MAs perfectly aligned (7>20>50>200)
• 📈 BULLISH: Major MAs aligned (20>50>200)
• 📉 STRONG BEARISH: All MAs reversed (7<20<50<200)
• 📉 BEARISH: Major MAs reversed
• ↔️ SIDEWAYS: Mixed alignment
Trend Duration Counter: Shows how many bars trend has persisted

9. 🔥 Catalysts Detection
Identifies multiple positive triggers simultaneously:
• 52-week high breakout
• Smart money buying
• Volume spike (2x+)
• Strong daily move (3%+)
• Bollinger Band breakout
Catalyst Status:
• 🔥🔥🔥 MULTIPLE (4-5): Explosive setup
• 🔥🔥 STRONG (3): Strong setup
• 🔥 PRESENT (2): Good setup
• ⚡ MINOR (1): Weak setup
• ➖ NONE (0): No catalysts

10. 🎮 Trading Mode Recommendation
Suggests optimal trading strategy:
• 🎯 TREND FOLLOW: ADX 40+, strong uptrend
• 📊 RANGE TRADE: ADX <20, sideways between SMAs
• 🦈 SMART MONEY: Following institutional activity
• 🚀 BREAKOUT: Breaking 52W or period high
• ⚡ MOMENTUM: Strong momentum score
• ⏸️ WAIT: No clear opportunity

11. ✅ Overall Status
Clear action recommendation:
• ✅ READY TO BUY: Analyst 75+, Conviction 70+
• 🟢 GOOD TO BUY: Analyst 60+, Conviction 55+
• 🟡 MONITOR: Analyst 45+
• 🟠 CAUTION: Analyst 30-44
• 🔴 AVOID: Analyst <30

12. 💰 Complete Trade Plan
Automatically calculates:
• 🎯 Entry Price: Current close
• 🛑 Stop Loss: ATR-based (2x for big cap, 2.5x for penny stocks)
• 💚 TP1: 1.5R risk-reward
• 💎 TP2: 2.5R risk-reward
• 🏆 TP3: 4.0R risk-reward
• 📊 Risk/Share: Amount risked per share

🎨 Visual Components:
Premium Dashboard (24-Row Table)
• Dark theme with blue frame (#0a0e27 bg, #1e88e5 frame)
• Gold headers (#ffd54f) for section labels
• Color-coded values based on conditions
• Customizable position: 4 corner options
• Real-time updates on every bar
Additional Indicators:
• Moving Averages: SMA 7/20/50/200, EMA 9/21
• Bollinger Bands: 20-period, 2 std dev
• 52-Week High/Low: 252 trading days
• Breakout Lines: Customizable period

🔔 Built-in Alerts:
1. Strong Buy Signal: Tech + Momentum + Volume aligned
2. Shark Buy Alert: Institutional buying detected
3. Multiple Catalysts: 3+ triggers present
4. Strong Buy Rating: Analyst score reaches 80+

⚙️ Customizable Parameters:
• Technical: RSI period, MACD settings
• Shark Detection: Volume multiplier, candle size
• Breakout: Lookback period
• TP/SL: Separate multipliers for big cap vs penny stocks
• Display: Dashboard on/off, position
• Risk-Reward Ratios: Customize TP1/2/3 levels

🎯 Best Use Cases:
✅ Bursa Malaysia LONG-only trading
✅ Swing trading with institutional confirmation
✅ Multi-timeframe analysis (Daily, 4H, 1H)
✅ Position sizing and risk management
✅ Identifying accumulation phases early
✅ High-probability breakout trading
✅ Avoiding distribution zones

🚀 Trading Workflow:
1. Check Overall Status - Ready to buy?
2. Review Analyst Rating - Overall score
3. Confirm Market Phase - Accumulation/Markup best
4. Verify Shark Activity - Smart money buying?
5. Check Catalysts - Multiple triggers?
6. Review Trade Plan - Entry/SL/TP levels
7. Set Position Size - Based on conviction
8. Monitor Trend and Volume - Stay aligned

This is a professional-grade institutional analysis tool condensed into one powerful indicator, perfect for serious traders who want data-driven decisions with smart money confirmation. 💎📈
Multi SMA Indicator📊 Multi SMA Indicator - Description
This Pine Script v5 indicator is a comprehensive technical analysis system that combines multiple essential components for stock trading on Bursa Malaysia (LONG-only strategies).
✨ Key Features:
1. Multiple Simple Moving Averages (SMA)
• SMA 7 (Red) - Very short-term trend
• SMA 20 (Blue) - Short-term trend
• SMA 50 (Black) - Medium-term trend
• SMA 200 (Magenta) - Long-term trend
• All SMAs can be individually shown/hidden
2. 52-Week High/Low (Bursa Malaysia Standard)
• Uses 252 trading days
• 52W High (Green) - Yearly resistance level
• 52W Low (Red) - Yearly support level
• Detects breakouts at these critical levels
3. Bollinger Bands
• BB Length: 20 (customizable)
• Standard Deviation: 2.0
• Special candlestick coloring:
◦ Yellow: Price open & close below Lower BB (strong oversold signal)
◦ Purple: Price below Lower BB
4. Breakout Detection
• Detects breakouts with volume confirmation
• Breakout period: 20 bars (customizable)
• Volume Multiplier: 1.5x above MA20
• Candlestick coloring:
◦ Aqua 🌊: 52-week high breakout
◦ Orange 🍊: 52-week low breakdown
◦ Lime 🟢: Bullish breakout
◦ Magenta 🟣: Bearish breakout
5. Jerun Trend Signals (Trend Confirmation)
• 🦈 Jerun Buy (Aqua): Uptrend confirmation
◦ SMA7 > SMA20 > SMA50 (alignment)
◦ Price above SMA7
◦ Bullish candle with consecutive rises
• 🔥 Jerun Sell (Orange): Downtrend warning
◦ SMA7 < SMA20 < SMA50 (downtrend alignment)
◦ Price below SMA7
◦ Bearish candle with consecutive declines
6. Strong Momentum Detection
• 🚀 Signal: Strong momentum with criteria:
◦ Candle size > 1.5x ATR(14)
◦ Price increase ≥ 3% (threshold customizable)
◦ Volume spike (1.5x above MA20)
◦ Price above SMA7
7. Golden Cross & Death Cross
• 🐃 Golden Cross (Lime): Bullish signal
◦ SMA50 crosses above SMA200 (most powerful)
◦ SMA20 crosses above SMA50
• 🐻 Death Cross (Red): Bearish warning
◦ SMA50 crosses below SMA200
◦ SMA20 crosses below SMA50
📍 Visual Components:
1. Moving Average Lines - 4 SMA lines with distinct colors
2. 52W High/Low Lines - Stepline style for yearly levels
3. Bollinger Bands - 3 lines (upper, middle, lower)
4. Candlestick Colors - Dynamic coloring based on conditions
5. Signal Emojis - 🚀🦈🔥🐃🐻 for quick visual reference
6. Price Labels - Current value labels on the right side of chart
🎯 Usage:
• LONG Only: Focus on buy signals (Bursa Malaysia restriction)
• Entry Signals: Jerun Buy 🦈, Strong Momentum 🚀, Golden Cross 🐃
• Confirmation: Volume spike + Breakout + SMA alignment
• Risk Warning: Jerun Sell 🔥, Death Cross 🐻
• Oversold Opportunity: Yellow/purple candlesticks (price below BB Lower)
⚙️ Customizable Settings:
All parameters can be modified through indicator settings:
• SMA periods
• Breakout length
• Volume multiplier
• Momentum threshold
• Bollinger Bands parameters
• Toggle display for each feature
This indicator is suitable for traders who want a complete system with multiple confirmation signals for entry and risk management. 🚀📈
RSI: Sessions + Days + Risk ManagedThis is a disciplined RSI mean-reversion strategy designed for traders who prioritize risk management and session confluence. Instead of trading 24/7, this strategy focuses on high-liquidity market sessions (London, New York, etc.) and uses dynamic position sizing to ensure a consistent dollar-amount risk per trade.
How it Works:
Entry Logic: The strategy triggers a Long when the RSI crosses above the Oversold level (30) and a Short when it crosses below the Overbought level (70).
Session Filtering: Built-in filters allow you to restrict trading to specific days of the week and specific market hours (NY, London, Tokyo, or Sydney sessions).
Force Close: An optional feature to automatically close open positions at the end of a trading session to avoid overnight gap risk.
Pro-Level Risk Management:
Dynamic Sizing: The script automatically calculates your position size based on a fixed dollar risk (e.g., $5 per trade).
Technical Stops: Stop losses are automatically placed at the high (for shorts) or low (for longs) of the entry candle.
Fixed Reward-to-Risk: Trades are executed with a customizable R:R ratio (default 2.0), ensuring your winners are twice the size of your losses.
Visual Features:
Real-time TP/SL lines while a trade is active.
Post-trade labels indicating "Win" or "Loss" markers.
Clean, organized input menu for easy optimization.
Best Used On:
Timeframes: 5m, 15m, or 1h.
Assets: Forex pairs, Indices (US30, NAS100), and liquid Crypto pairs.
Smart Money Concepts [LuxAlgo]//@version=5
indicator("Gold Price (Korea 1 Don)", overlay=true)
// 설정: 실시간 환율 데이터 가져오기 (FX_IDC:USDKRW)
usdKrw = request.security("FX_IDC:USDKRW", timeframe.period, close)
// 계산 로직
// 트레이딩뷰 XAUUSD는 1트로이온스(31.1034768g) 기준
// 공식: (국제시세 * 환율 / 31.1035) * 3.75
troyOunceToGram = 31.1034768
oneDonGram = 3.75
goldPriceKrw = (close * usdKrw / troyOunceToGram) * oneDonGram
// 화면 표시 (테이블 생성)
var table priceTable = table.new(position.top_right, 2, 2, bgcolor = color.new(color.black, 50), border_width = 1)
if barstate.islast
// 헤더
table.cell(priceTable, 0, 0, "한국 금시세 (1돈)", text_color = color.white, bgcolor=color.new(color.gray, 20), text_size=size.small)
// 가격 표시 (원화 형식으로 콤마 찍어서 출력)
table.cell(priceTable, 0, 1, str.format("{0,number,###,###} 원", goldPriceKrw), text_color = color.yellow, text_size=size.large, bgcolor=color.black)
// 참고용 환율 표시
table.cell(priceTable, 1, 0, "적용 환율", text_color = color.gray, text_size=size.small)
table.cell(priceTable, 1, 1, str.format("{0,number,#,###.##} 원/$", usdKrw), text_color = color.gray, text_size=size.small)
Divergence Buy/SellUser Manual: Buy/Sell Divergence v1
-
The Buy/Sell Divergence v1 indicator is a momentum-based analysis tool built upon the Vortex system. Its primary function is to identify discrepancies between price action and trend strength, signaling potential exhaustion points and market reversals (Divergences).
-
-
-
1. Interface Components
- The indicator consists of three main visual elements in the bottom panel:
Dynamic Vortex (Lines):
Green Line (VI+): Represents the strength of the buyers.
Red Line (VI-): Represents the strength of the sellers.
Note: With "Dynamic View" enabled, only the dominant line is shown, removing visual noise and clutter.
Delta Histogram:
Represents the mathematical difference between the two forces. Bars above zero (Lime) indicate a bullish trend; bars below zero (Maroon) indicate a bearish trend.
Background Color:
Green: Confirmed bullish trend.
Red: Confirmed bearish trend.
-
-
-
2. Signal Interpretation
A. BUY DIV (Bullish Divergence)
Occurs during a downtrend and signals a potential bounce or upward reversal.
Price Condition: The price hits a new lower low.
Indicator Condition: The red line (VI-) shows a lower peak of strength compared to its previous peak.
Visual Signal: A green line connects the peaks on the indicator with the label "BUY DIV".
Meaning: Sellers are pushing the price down, but with less conviction. Selling pressure is evaporating.
-
-
-
B. SELL DIV (Bearish Divergence)
Occurs during an uptrend and signals a potential pullback or downward reversal.
Price Condition: The price hits a new higher high.
Indicator Condition: The green line (VI+) shows a lower peak of strength compared to its previous peak.
Visual Signal: A red line connects the peaks on the indicator with the label "SELL DIV".
Meaning: Buyers are driving the price to new highs, but buying momentum is fading. The trend is becoming "exhausted."
-
-
-
3. Parameter Configuration
Parameter Description Suggestion
Length The Vortex calculation period (default: 14). Use 7-10 for Scalping; 14-
21 for Day Trading; 28+ for
Swing Trading.
Pivot Lookback Number of candles needed to confirm a peak Increase this (e.g., 8-10)
(default: 5). for rarer but more
reliable divergence signals.
Dynamic View Hides the weaker trend line. Keep this ON for a clean
and focused chart reading.
-
-
-
4. Strategic Advice & Risk Management
1. Candle Confirmation: Do not enter the trade at the exact moment the label appears. Because divergences are based on "Pivots," the label appears with a delay equal to the Pivot Lookback. Wait for a break of the signal candle's high (for Buy Div) or low (for Sell Div).
2. Trend Filtering: Divergences are most powerful when they occur near historical support or resistance zones on the price chart.
3. Stop Loss Placement:
- For a BUY DIV signal, place the Stop Loss slightly below the recent price low.
- For a SELL DIV signal, place the Stop Loss slightly above the recent price high.
4. Confluence: If you receive a SELL DIV and simultaneously see the histogram shrinking toward the zero line, the probability of a successful trade increases significantly.
-
-
Gamma Hedging Pressure 🧠 HOW TO USE THIS (TRADING RULES):
🔴 NEGATIVE GAMMA (Red)
✔ Trade breakouts
✔ Hold winners
✔ Avoid fading moves
✔ Best for trend days
🟢 POSITIVE GAMMA (Green)
✔ Trade mean reversion
✔ Fade extremes
✔ Take profits quickly
✔ Best for scalping
⚪ NEUTRAL
❌ Reduce size
❌ Avoid forcing trades
CRE Multi Pair Scanner
✔ 1 lead asset (capital source)
✔ Multiple receiver assets
✔ CRE signal fires per asset
✔ Table + labels show rotation winner
Weekly VWAP (ETH to RTH) - OHLC4Weekly vwap with standard deviations. The vwap will carry over ETH data into RTH when RTH mode is turned on.
Capital Rotational Event (CRE)What is a Capital Rotational Event (CRE)?
A Capital Rotational Event is when money shifts from one asset to another — e.g., rotation from stocks into bonds, from tech into commodities, or from one sector into another.
In technical terms it typically shows:
✔ Divergence between two asset price series
✔ Relative strength switching direction
✔ Volume/flow confirming rotation
✔ Often precedes trend acceleration in the “receiver” asset
Important Level by DXB16**Important Level by DXB16 – The Essential Structure Indicator**
This indicator automatically displays the most important price zones of your market across three timeframes: Daily High/Low, Weekly High/Low, and Monthly High/Low. All levels update in real-time.
**What you'll see:**
- Current daily, weekly, and monthly highs and lows as clear horizontal lines
- Instant context of where the current price sits within the daily, weekly, and monthly range
- Classic reversal, range, and breakout zones at a glance
**Perfect for:**
- Identifying range-bound vs. trend days
- Liquidity grabs and mean-reversion setups at critical levels
- Higher timeframe context for intraday trading
- Futures, indices, forex, crypto
**Features:**
- 6 fully customizable colored lines (Daily, Weekly, Monthly – each High/Low)
- Adjustable label text size
- Clean, minimalist design without distracting boxes
- Fully dynamic – no manual adjustments needed
All-in-One SMC: CHOCH | BOS | FVG | OB | LiquidityThis script combines:
BOS (Break of Structure)
CHOCH (Change of Character)
Bullish & Bearish FVGs
Mitigation Order Blocks
Liquidity grabs (equal highs/lows)
Discount / Premium zones (relative to equilibrium)
Sizing Coach HUD Long and Short This HUD is designed as a systematic execution layer to bridge the gap between technical analysis and mechanical risk management. Its primary purpose is to eliminate the "discretionary gap"—the moment where a trader’s "feeling" about volatility or spreads causes hesitation.
By using this tool, you are not just watching price; you are managing a business where Risk is a constant and Size is a variable.
Core Functionality: The Position Sizing Engine
The HUD automates the math of "Capital-Based Tiers". Instead of choosing an arbitrary share size, the system calculates your position based on three predefined levels of conviction:
Tier 1 (1% Notional): Low-confidence or high-volatility "tester" positions.
Tier 2 (3% Notional): Standard, high-probability setups.
Tier 3 (5% Notional): High-conviction trades where multiple timeframes and factors align.
Execution Workflow (The Poka-Yoke)
To use this HUD effectively and eliminate the "hesitation" identified in the Five Whys analysis, follow this workflow:
Toggle Direction: Set the HUD to Long or Short based on your setup (e.g., NEMA Continuation).
Define Invalidation: Identify your technical stop (default is High/Low of Day +/- 5%). The HUD will automatically calculate the distance to this level.
Check Risk $: Observe the Risk $ row. This tells you exactly how much you will lose in dollars if the stop is hit. If the volatility is extreme (like the NASDAQ:SNDK 14% plunge), the HUD will automatically shrink your Shares count to keep this dollar amount constant.
Execute via HUD: Transmit the order using the Shares provided in your selected Tier. Do not manually adjust the size based on "gut feeling".
Trade Management: The "R" Focus
The bottom half of the HUD displays your Targets (PnL / R).
VWAP & Fibonacci Levels: Automatically plots and calculates profit targets at key institutional levels (VWAP, 0.618, 0.786, 0.886).
Binary Exit Logic: The color-coded logic flags any target that yields less than 1R (Reward-to-Risk) as a warning.
Systematic Holding: Ride the trade to the targets or until your technical exit (e.g., 1M candle close above/below NEMA) is triggered, ignoring the fluctuating P&L.
TJR asia session sweep//@version=5
strategy("TJR asia session sweep", "TJR Asia Sweep", overlay=true, max_lines_count=500, max_labels_count=500)
// Input settings
show_asian = input.bool(true, "Show Asian Session", group="Visual Settings")
show_london = input.bool(true, "Show London Session", group="Visual Settings")
show_swing_points = input.bool(true, "Show Asian Swing Points", group="Visual Settings")
show_market_structure = input.bool(true, "Show Market Structure", group="Visual Settings")
show_bos = input.bool(true, "Show Break of Structure", group="Visual Settings")
// Session Time Settings
asian_start_hour_input = input.int(22, "Asian Session Start Hour", minval=0, maxval=23, group="Session Times")
asian_end_hour_input = input.int(3, "Asian Session End Hour", minval=0, maxval=23, group="Session Times")
london_start_hour_input = input.int(3, "London Session Start Hour", minval=0, maxval=23, group="Session Times")
london_end_hour_input = input.int(8, "London Session End Hour", minval=0, maxval=23, group="Session Times")
session_timezone = input.string("America/New_York", "Session Timezone", options= , group="Session Times")
// Risk Management Settings
use_atr_sl = input.bool(false, "Use ATR Multiplier for Stop Loss", group="Risk Management")
atr_length = input.int(14, "ATR Length", minval=1, maxval=50, group="Risk Management")
atr_multiplier = input.float(2.0, "ATR Multiplier for Stop Loss", minval=0.5, maxval=10.0, group="Risk Management")
force_london_close = input.bool(true, "Force Close at London Session End", group="Risk Management")
cutoff_minutes = input.int(60, "Minutes Before Session End to Stop New Trades", minval=0, maxval=300, group="Risk Management")
// Position Sizing Settings
position_sizing_method = input.string("USD Risk", "Position Sizing Method", options= , group="Position Sizing")
usd_risk_per_trade = input.float(100.0, "USD Risk Per Trade", minval=1.0, maxval=10000.0, group="Position Sizing")
fixed_contracts = input.float(1.0, "Fixed Number of Contracts", minval=0.01, maxval=1000.0, step=0.01, group="Position Sizing")
// Color settings
asian_color = input.color(color.red, "Asian Session Color")
london_color = input.color(color.blue, "London Session Color")
swing_high_color = input.color(color.orange, "Swing High Color")
swing_low_color = input.color(color.lime, "Swing Low Color")
bullish_structure_color = input.color(color.green, "Bullish Structure Color")
bearish_structure_color = input.color(color.red, "Bearish Structure Color")
bos_color = input.color(color.orange, "Break of Structure Color")
// Line settings
line_width = input.int(2, "Line Width", minval=1, maxval=5)
// ATR calculation for stop loss
atr = ta.atr(atr_length)
// Position size calculation function
calculate_position_size(entry_price, stop_loss_price) =>
var float position_size = na
if position_sizing_method == "Fixed Contracts"
position_size := fixed_contracts
else // USD Risk method
stop_distance = math.abs(entry_price - stop_loss_price)
if stop_distance > 0
// Calculate position size based on USD risk per trade
// For forex: position_size = risk_amount / (stop_distance * point_value)
// For most forex pairs, point value = 1 (since we're dealing with price differences directly)
position_size := usd_risk_per_trade / stop_distance
else
position_size := fixed_contracts // Fallback to fixed contracts if stop distance is 0
position_size
// Session time definitions (using input variables)
asian_start_hour = asian_start_hour_input
asian_end_hour = asian_end_hour_input
london_start_hour = london_start_hour_input
london_end_hour = london_end_hour_input
// Get current hour using selected timezone
current_hour = hour(time, session_timezone)
// Previous hour for transition detection
prev_hour = hour(time , session_timezone)
// Session transition detection
asian_start = current_hour == asian_start_hour and prev_hour != asian_start_hour
asian_end = current_hour == asian_end_hour and prev_hour != asian_end_hour
london_start = current_hour == london_start_hour and prev_hour != london_start_hour
london_end = current_hour == london_end_hour and prev_hour != london_end_hour
// Session activity detection
asian_active = (current_hour >= asian_start_hour) or (current_hour < asian_end_hour)
london_active = (current_hour >= london_start_hour) and (current_hour < london_end_hour)
// Session boxes - keep previous sessions visible
var box asian_session_box = na
var box london_session_box = na
// Create Asian session box
if show_asian and asian_start
// Create new box at session start (previous box remains visible)
asian_session_box := box.new(bar_index, high, bar_index + 1, low,
border_color=asian_color, bgcolor=color.new(asian_color, 90),
border_width=2, border_style=line.style_solid)
// Pre-calculate session highs and lows for consistency
asian_session_length = asian_active and not na(asian_session_box) ? bar_index - box.get_left(asian_session_box) + 1 : 1
current_asian_high = ta.highest(high, asian_session_length)
current_asian_low = ta.lowest(low, asian_session_length)
// Update Asian session box continuously during session
if show_asian and asian_active and not na(asian_session_box)
box.set_right(asian_session_box, bar_index)
// Update box to contain session highs and lows
box.set_top(asian_session_box, current_asian_high)
box.set_bottom(asian_session_box, current_asian_low)
// Create London session box
if show_london and london_start
// Create new box at session start (previous box remains visible)
london_session_box := box.new(bar_index, high, bar_index + 1, low,
border_color=london_color, bgcolor=color.new(london_color, 90),
border_width=2, border_style=line.style_solid)
// Pre-calculate London session highs and lows for consistency
london_session_length = london_active and not na(london_session_box) ? bar_index - box.get_left(london_session_box) + 1 : 1
current_london_high = ta.highest(high, london_session_length)
current_london_low = ta.lowest(low, london_session_length)
// Update London session box continuously during session
if show_london and london_active and not na(london_session_box)
box.set_right(london_session_box, bar_index)
// Update box to contain session highs and lows
box.set_top(london_session_box, current_london_high)
box.set_bottom(london_session_box, current_london_low)
// Asian Session Swing Points Detection
var float asian_session_high = na
var float asian_session_low = na
var int asian_high_bar = na
var int asian_low_bar = na
// Asian Session Absolute High/Low for TP levels
var float asian_absolute_high = na
var float asian_absolute_low = na
var line asian_high_line = na
var line asian_low_line = na
var label asian_high_label = na
var label asian_low_label = na
var bool high_broken = false
var bool low_broken = false
// London Session High/Low tracking for stop loss
var float london_session_high = na
var float london_session_low = na
// Market structure tracking variables
var string breakout_direction = na // "bullish" or "bearish"
var float last_hh_level = na // Last Higher High level
var float last_hl_level = na // Last Higher Low level
var float last_ll_level = na // Last Lower Low level
var float last_lh_level = na // Last Lower High level
var int structure_count = 0
var string last_structure_type = na // "HH", "HL", "LL", "LH"
// Legacy variables for compatibility
var float last_swing_high = na
var float last_swing_low = na
var int last_high_bar = na
var int last_low_bar = na
// Market structure state tracking
var float pending_high = na
var float pending_low = na
var int pending_high_bar = na
var int pending_low_bar = na
var bool waiting_for_confirmation = false
// Break of Structure tracking variables
var float most_recent_hl = na
var float most_recent_lh = na
var int most_recent_hl_bar = na
var int most_recent_lh_bar = na
var bool bos_detected = false
// Trading variables
var bool trade_taken = false
// Trade visualization boxes (based on Casper strategy approach)
var box current_profit_box = na
var box current_sl_box = na
// Update swing points during Asian session
if asian_active and show_swing_points
// Always track absolute high/low for both TP levels and breakout detection
if na(asian_absolute_high) or high > asian_absolute_high
asian_absolute_high := high
if na(asian_absolute_low) or low < asian_absolute_low
asian_absolute_low := low
// Use absolute high/low for breakout levels (simplified logic)
if na(asian_session_high) or high > asian_session_high
asian_session_high := high
asian_high_bar := bar_index
if na(asian_session_low) or low < asian_session_low
asian_session_low := low
asian_low_bar := bar_index
// Track London session high/low for stop loss levels
if london_active
if na(london_session_high) or high > london_session_high
london_session_high := high
if na(london_session_low) or low < london_session_low
london_session_low := low
// Draw initial lines when Asian session ends
if asian_end and show_swing_points
if not na(asian_session_high) and not na(asian_high_bar)
// Draw extending line for high
asian_high_line := line.new(asian_high_bar, asian_session_high, bar_index + 200, asian_session_high,
color=swing_high_color, width=2, style=line.style_dashed, extend=extend.right)
asian_high_label := label.new(bar_index + 5, asian_session_high, "Asian High: " + str.tostring(asian_session_high, "#.####"), style=label.style_label_left, color=swing_high_color, textcolor=color.white, size=size.small)
if not na(asian_session_low) and not na(asian_low_bar)
// Draw extending line for low
asian_low_line := line.new(asian_low_bar, asian_session_low, bar_index + 200, asian_session_low,
color=swing_low_color, width=2, style=line.style_dashed, extend=extend.right)
asian_low_label := label.new(bar_index + 5, asian_session_low, "Asian Low: " + str.tostring(asian_session_low, "#.####"), style=label.style_label_left, color=swing_low_color, textcolor=color.white, size=size.small)
// Reset break flags for new session
high_broken := false
low_broken := false
// Check for breakouts during London session
if london_active and show_swing_points and not na(asian_session_high) and not na(asian_session_low)
// Check if Asian high is broken
if not high_broken and not low_broken and high > asian_session_high
high_broken := true
// Update high line to end at break point
if not na(asian_high_line)
line.set_x2(asian_high_line, bar_index)
line.set_extend(asian_high_line, extend.none)
// Remove the low line (first break wins)
if not na(asian_low_line)
line.delete(asian_low_line)
if not na(asian_low_label)
label.delete(asian_low_label)
// Add break marker
label.new(bar_index, asian_session_high * 1.001, "HIGH BREAK!",
style=label.style_label_down, color=color.red, textcolor=color.white, size=size.normal)
// Set breakout direction and initialize structure tracking
breakout_direction := "bullish"
last_swing_high := asian_session_high
last_swing_low := asian_session_low
last_high_bar := bar_index
structure_count := 0
// Check if Asian low is broken
if not low_broken and not high_broken and low < asian_session_low
low_broken := true
// Update low line to end at break point
if not na(asian_low_line)
line.set_x2(asian_low_line, bar_index)
line.set_extend(asian_low_line, extend.none)
// Remove the high line (first break wins)
if not na(asian_high_line)
line.delete(asian_high_line)
if not na(asian_high_label)
label.delete(asian_high_label)
// Add break marker
label.new(bar_index, asian_session_low * 0.999, "LOW BREAK!",
style=label.style_label_up, color=color.red, textcolor=color.white, size=size.normal)
// Set breakout direction and initialize structure tracking
breakout_direction := "bearish"
last_swing_high := asian_session_high
last_swing_low := asian_session_low
last_low_bar := bar_index
structure_count := 0
// Stop extending lines when London session ends (if not already broken)
if london_end and show_swing_points
if not high_broken and not na(asian_high_line)
line.set_x2(asian_high_line, bar_index)
line.set_extend(asian_high_line, extend.none)
if not low_broken and not na(asian_low_line)
line.set_x2(asian_low_line, bar_index)
line.set_extend(asian_low_line, extend.none)
// Force close all trades at London session end (if enabled)
if london_end and force_london_close
if strategy.position_size != 0
// Extend boxes immediately before session close to prevent timing issues
if not na(current_profit_box)
// Ensure minimum 8 bars width or extend to current bar, whichever is longer
box_left = box.get_left(current_profit_box)
min_right = box_left + 8
final_right = math.max(min_right, bar_index)
box.set_right(current_profit_box, final_right)
current_profit_box := na // Clear reference after extending
if not na(current_sl_box)
// Ensure minimum 8 bars width or extend to current bar, whichever is longer
box_left = box.get_left(current_sl_box)
min_right = box_left + 8
final_right = math.max(min_right, bar_index)
box.set_right(current_sl_box, final_right)
current_sl_box := na // Clear reference after extending
strategy.close_all(comment="London Close")
trade_taken := false // Reset trade flag for next session
// Market structure detection after breakout (only during London session and before first BoS)
if show_market_structure and not na(breakout_direction) and london_active and not bos_detected
// Bullish structure tracking (HH, HL alternating)
if breakout_direction == "bullish"
// Check for Higher High pattern: Bullish candle followed by bearish candle
pattern_high = math.max(high , high)
prev_hh = na(last_hh_level) ? last_swing_high : last_hh_level
// HH Detection: Only if we expect HH next (no last structure or last was HL)
if (na(last_structure_type) or last_structure_type == "HL") and close > open and close < open and pattern_high > prev_hh and close > prev_hh
// Check consolidation
is_too_close = not na(last_high_bar) and (bar_index - last_high_bar) <= 4
should_create_hh = true
if is_too_close and structure_count > 0 and pattern_high <= last_hh_level
should_create_hh := false
if should_create_hh
structure_count := structure_count + 1
label.new(bar_index - 1, high + (high * 0.0003), "HH" + str.tostring(structure_count),
style=label.style_none, color=color.new(color.white, 100),
textcolor=color.white, size=size.small)
last_hh_level := pattern_high
last_swing_high := pattern_high
last_high_bar := bar_index
last_structure_type := "HH"
// HL Detection: Only if we expect HL next (last was HH)
pattern_low = math.min(low , low)
prev_hl = na(last_hl_level) ? last_swing_low : last_hl_level
if last_structure_type == "HH" and close < open and close > open and pattern_low > prev_hl and close > prev_hl
// Check consolidation
is_too_close = not na(last_low_bar) and (bar_index - last_low_bar) <= 4
should_create_hl = true
if is_too_close and pattern_low <= last_hl_level
should_create_hl := false
if should_create_hl
structure_count := structure_count + 1
label.new(bar_index - 1, low - (low * 0.0003), "HL" + str.tostring(structure_count),
style=label.style_none, color=color.new(color.white, 100),
textcolor=color.white, size=size.small)
last_hl_level := pattern_low
most_recent_hl := pattern_low // Update most recent HL for BoS detection
most_recent_hl_bar := bar_index - 1 // Store HL bar position
last_low_bar := bar_index
last_structure_type := "HL"
// Bearish structure tracking (LL, LH alternating)
if breakout_direction == "bearish"
// Check for Lower Low pattern: Bearish candle followed by bullish candle
pattern_low = math.min(low , low)
prev_ll = na(last_ll_level) ? last_swing_low : last_ll_level
// LL Detection: Only if we expect LL next (no last structure or last was LH)
if (na(last_structure_type) or last_structure_type == "LH") and close < open and close > open and pattern_low < prev_ll and close < prev_ll
// Check consolidation
is_too_close = not na(last_low_bar) and (bar_index - last_low_bar) <= 4
should_create_ll = true
if is_too_close and structure_count > 0 and pattern_low >= last_ll_level
should_create_ll := false
if should_create_ll
structure_count := structure_count + 1
label.new(bar_index - 1, low - (low * 0.0003), "LL" + str.tostring(structure_count),
style=label.style_none, color=color.new(color.white, 100),
textcolor=color.white, size=size.small)
last_ll_level := pattern_low
last_swing_low := pattern_low
last_low_bar := bar_index
last_structure_type := "LL"
// LH Detection: Only if we expect LH next (last was LL)
pattern_high = math.max(high , high)
prev_lh = na(last_lh_level) ? last_swing_high : last_lh_level
if last_structure_type == "LL" and close > open and close < open and pattern_high < prev_lh and close < prev_lh
// Check consolidation
is_too_close = not na(last_high_bar) and (bar_index - last_high_bar) <= 4
should_create_lh = true
if is_too_close and pattern_high >= last_lh_level
should_create_lh := false
if should_create_lh
structure_count := structure_count + 1
label.new(bar_index - 1, high + (high * 0.0003), "LH" + str.tostring(structure_count),
style=label.style_none, color=color.new(color.white, 100),
textcolor=color.white, size=size.small)
last_lh_level := pattern_high
most_recent_lh := pattern_high // Update most recent LH for BoS detection
most_recent_lh_bar := bar_index - 1 // Store LH bar position
last_high_bar := bar_index
last_structure_type := "LH"
// Check if we're within the cutoff period before London session end
current_minute = minute(time, session_timezone)
london_end_time_minutes = london_end_hour * 60 // Convert London end hour to minutes
current_time_minutes = current_hour * 60 + current_minute // Current time in minutes
// Calculate minutes remaining in London session
london_session_minutes_remaining = london_end_time_minutes - current_time_minutes
// Handle day rollover case (e.g., if london_end is 8:00 (480 min) and current is 23:30 (1410 min))
if london_session_minutes_remaining < 0
london_session_minutes_remaining := london_session_minutes_remaining + (24 * 60) // Add 24 hours in minutes
// Only allow trades if more than cutoff_minutes remaining in London session
allow_new_trades = london_session_minutes_remaining > cutoff_minutes
// Break of Structure (BoS) Detection and Trading Logic - Only first BoS per London session and outside cutoff period
if show_bos and london_active and show_market_structure and not bos_detected and not trade_taken and allow_new_trades
// Bullish BoS: Price closes below the most recent HL (after bullish breakout) - SELL SIGNAL
if breakout_direction == "bullish" and not na(most_recent_hl) and not na(most_recent_hl_bar)
// Check minimum distance requirement (at least 4 candles between BoS and HL)
if close < most_recent_hl and (bar_index - most_recent_hl_bar) >= 4
// Draw dotted line from HL position to BoS point
line.new(most_recent_hl_bar, most_recent_hl, bar_index, most_recent_hl,
color=bos_color, width=2, style=line.style_dotted, extend=extend.none)
// Calculate center position for BoS label
center_bar = math.round((most_recent_hl_bar + bar_index) / 2)
// Draw BoS label below the line for HL break
label.new(center_bar, most_recent_hl - (most_recent_hl * 0.0005), "BoS",
style=label.style_none, color=color.new(color.white, 100),
textcolor=bos_color, size=size.normal)
// SELL ENTRY
if not na(london_session_high) and not na(asian_absolute_low)
// Calculate stop loss based on settings
stop_loss_level = use_atr_sl ? close + (atr * atr_multiplier) : london_session_high
take_profit_level = asian_absolute_low
entry_price = close
// Calculate position size based on user settings
position_size = calculate_position_size(entry_price, stop_loss_level)
strategy.entry("SELL", strategy.short, qty=position_size, comment="BoS Sell")
strategy.exit("SELL EXIT", "SELL", stop=stop_loss_level, limit=take_profit_level, comment="SL/TP")
// Create trade visualization boxes (TradingView style) - minimum 8 bars width
// Blue profit zone box (from entry to take profit)
current_profit_box := box.new(left=bar_index, top=take_profit_level, right=bar_index + 8, bottom=entry_price,
bgcolor=color.new(color.blue, 70), border_width=0)
// Red stop loss zone box (from entry to stop loss)
current_sl_box := box.new(left=bar_index, top=entry_price, right=bar_index + 8, bottom=stop_loss_level,
bgcolor=color.new(color.red, 70), border_width=0)
trade_taken := true
bos_detected := true // Mark BoS as detected for this session
// Bearish BoS: Price closes above the most recent LH (after bearish breakout) - BUY SIGNAL
if breakout_direction == "bearish" and not na(most_recent_lh) and not na(most_recent_lh_bar)
// Check minimum distance requirement (at least 4 candles between BoS and LH)
if close > most_recent_lh and (bar_index - most_recent_lh_bar) >= 4
// Draw dotted line from LH position to BoS point
line.new(most_recent_lh_bar, most_recent_lh, bar_index, most_recent_lh,
color=bos_color, width=1, style=line.style_dotted, extend=extend.none)
// Calculate center position for BoS label
center_bar = math.round((most_recent_lh_bar + bar_index) / 2)
// Draw BoS label above the line for LH break
label.new(center_bar, most_recent_lh + (most_recent_lh * 0.0005), "BoS",
style=label.style_none, color=color.new(color.white, 100),
textcolor=bos_color, size=size.normal)
// BUY ENTRY
if not na(london_session_low) and not na(asian_absolute_high)
// Calculate stop loss based on settings
stop_loss_level = use_atr_sl ? close - (atr * atr_multiplier) : london_session_low
take_profit_level = asian_absolute_high
entry_price = close
// Calculate position size based on user settings
position_size = calculate_position_size(entry_price, stop_loss_level)
strategy.entry("BUY", strategy.long, qty=position_size, comment="BoS Buy")
strategy.exit("BUY EXIT", "BUY", stop=stop_loss_level, limit=take_profit_level, comment="SL/TP")
// Create trade visualization boxes (TradingView style) - minimum 8 bars width
// Blue profit zone box (from entry to take profit)
current_profit_box := box.new(left=bar_index, top=entry_price, right=bar_index + 8, bottom=take_profit_level,
bgcolor=color.new(color.blue, 70), border_width=0)
// Red stop loss zone box (from entry to stop loss)
current_sl_box := box.new(left=bar_index, top=stop_loss_level, right=bar_index + 8, bottom=entry_price,
bgcolor=color.new(color.red, 70), border_width=0)
trade_taken := true
bos_detected := true // Mark BoS as detected for this session
// Position close detection for extending boxes (based on Casper strategy)
if barstate.isconfirmed and strategy.position_size == 0 and strategy.position_size != 0
// Extend trade visualization boxes to exact exit point when position closes
if not na(current_profit_box)
// Ensure minimum 8 bars width or extend to current bar, whichever is longer
box_left = box.get_left(current_profit_box)
min_right = box_left + 8
final_right = math.max(min_right, bar_index)
box.set_right(current_profit_box, final_right)
current_profit_box := na // Clear reference after extending
if not na(current_sl_box)
// Ensure minimum 8 bars width or extend to current bar, whichever is longer
box_left = box.get_left(current_sl_box)
min_right = box_left + 8
final_right = math.max(min_right, bar_index)
box.set_right(current_sl_box, final_right)
current_sl_box := na // Clear reference after extending
// Backup safety check - extend boxes if position is closed but boxes still active
if not na(current_profit_box) and strategy.position_size == 0
box_left = box.get_left(current_profit_box)
min_right = box_left + 8
final_right = math.max(min_right, bar_index)
box.set_right(current_profit_box, final_right)
current_profit_box := na
if not na(current_sl_box) and strategy.position_size == 0
box_left = box.get_left(current_sl_box)
min_right = box_left + 8
final_right = math.max(min_right, bar_index)
box.set_right(current_sl_box, final_right)
current_sl_box := na
// Reset everything when new Asian session starts
if asian_start and show_swing_points
asian_session_high := na
asian_session_low := na
asian_high_bar := na
asian_low_bar := na
// Reset absolute levels
asian_absolute_high := na
asian_absolute_low := na
asian_high_line := na
asian_low_line := na
asian_high_label := na
asian_low_label := na
high_broken := false
low_broken := false
// Reset London session levels
london_session_high := na
london_session_low := na
// Reset market structure tracking
breakout_direction := na
last_hh_level := na
last_hl_level := na
last_ll_level := na
last_lh_level := na
last_swing_high := na
last_swing_low := na
last_high_bar := na
last_low_bar := na
structure_count := 0
last_structure_type := na
pending_high := na
pending_low := na
pending_high_bar := na
pending_low_bar := na
waiting_for_confirmation := false
// Reset BoS tracking
most_recent_hl := na
most_recent_lh := na
most_recent_hl_bar := na
most_recent_lh_bar := na
bos_detected := false
// Reset trading
trade_taken := false
// Reset current trade boxes
current_profit_box := na
current_sl_box := na
// Debug info (optional)
show_debug = input.bool(false, "Show Debug Info")
if show_debug
var table debug_table = table.new(position.top_right, 2, 3, bgcolor=color.white, border_width=1)
if barstate.islast
table.cell(debug_table, 0, 0, "Current Hour:", text_color=color.black)
table.cell(debug_table, 1, 0, str.tostring(current_hour), text_color=color.black)
table.cell(debug_table, 0, 1, "Asian Active:", text_color=color.black)
table.cell(debug_table, 1, 1, str.tostring((current_hour >= asian_start_hour) or (current_hour < asian_end_hour)), text_color=color.black)
table.cell(debug_table, 0, 2, "London Active:", text_color=color.black)
table.cell(debug_table, 1, 2, str.tostring((current_hour >= london_start_hour) and (current_hour < london_end_hour)), text_color=color.black)
Entry ChecklistEntry Checklist
A comprehensive multi-factor analysis tool for stock and crypto entry decisions, combining fundamental, technical, and market sentiment indicators in a dynamic table display.
🎯 Overview
This advanced Pine Script indicator provides traders and investors with a systematic checklist for evaluating potential entry points. It consolidates critical market data into a clean, color-coded table that adapts based on asset type and data availability.
📊 Key Features
Market Context Analysis:
Seasonality: Historical S&P 500 monthly return patterns with strength/weakness labels
Market Breadth (S5TH): Percentage of S&P 500 stocks above their 50-day moving average
Fear/Greed Index (VIX): Market sentiment indicator with threshold-based color coding
Fundamental Analysis (Stocks Only):
Earnings Dates: Upcoming earnings announcement tracking with 14-day warning
Growth Metrics: Year-over-year sales and EPS growth rates
Acceleration: Quarter-over-quarter growth acceleration analysis
Sector & Industry Analysis:
Sector Relative Strength: 20-day performance vs SPY benchmark
Industry Relative Strength: Granular industry ETF performance comparison
120+ Industry ETF Mappings: Comprehensive sector and industry classifications
Technical Analysis:
IBD-Style RS Rating: Multi-timeframe relative strength scoring (1-99 scale)
RS vs SPX: Stock performance relative to S&P 500
RS vs Sector: Performance relative to sector ETF
RS vs Industry: Performance relative to industry ETF
🎨 Visual Design
Dynamic Table: Bottom-right overlay with professional dark theme
Color-Coded Signals: Green (bullish), red (bearish), neutral (white)
SMA Reversal Sequential MTF - Pure Confirmed Final V2SMA Reversal Sequential MTF - Detailed Indicator Manual
This indicator identifies trend reversal points based on the shape of a Simple Moving Average (SMA) and monitors these signals across multiple timeframes (MTF). By synchronizing trends from various intervals, it provides a robust framework for identifying high-probability entry points.
1. Core Logic Overview
The indicator detects "peaks" and "troughs" in the SMA to identify potential reversal points.
Bullish Reversal (UP): Occurs when the SMA turns upward after a period of decline (forming a "trough").
Bearish Reversal (DN): Occurs when the SMA turns downward after a period of inclination (forming a "peak").
In addition to detecting these turns, the indicator tracks the high/low prices of the most recent reversal points on a "Confirmed Bar" basis. When the current price breaks these levels, it confirms a trend continuation or a breakout.
2. Full Description of Input Settings
Basic Settings / Main Settings
Use Short Period (5, 4, 7) / 短期設定を使用:
true: Increases sensitivity to price movements by using shorter parameters (e.g., SMA 5). Suitable for scalping.
false: Uses standard parameters (e.g., SMA 20). Suitable for day trading and swing trading.
Timeframe Visibility / 時間足表示設定
Allows individual toggling of visibility for each timeframe's labels and lines.
Show 1M to 1m / 1M〜1m表示: Individually enable or disable the calculation and display of data for Monthly (1M), Weekly (1W), Daily (Daily), 4H, 1H, 15M, 5M, and 1m timeframes.
Hide Higher TF Settings on Lower TFs / 下位足での上位設定を非表示: When enabled, this removes lower timeframe data from higher timeframe charts to reduce visual noise.
Drawing Options / 表示オプション
Show Only Current TF Labels / 現在足のラベルのみ表示: If enabled, only labels corresponding to the chart's current interval (e.g., "5" labels on a 5M chart) will be displayed.
Show Trendlines & Channels / トレンドライン&チャネルを表示: Automatically draws trendlines and parallel channels by connecting recent local reversal points on the current timeframe.
Show Sequential Labels / 転換点ラベル表示: Displays timeframe labels (e.g., "15", "1H") at the exact point where the SMA reversed.
Show Break Lines / ブレイクライン表示: Draws horizontal lines from the most recent peaks or troughs and displays a "BREAK" label when price crosses them.
Break Label Offset / ブレイク文字の右オフセット: Adjusts the horizontal distance of the "BREAK" label from the current bar for better visibility.
Additional Alert Settings / 追加アラート設定
Alert 1: Current + 2 Higher TFs Sync (Blue/Red) / アラート1: 現在・上位2つ同調:
Triggers a notification when the trend (UP/DN) of the current chart's timeframe, the next higher timeframe, and the second higher timeframe all align.
Alert 2: 4-TF Sync Including Current (Orange) / アラート2: 表示足を含む4足同調:
Triggers a notification when four consecutive timeframes (Current + 3 Higher) align in the same direction. This is considered a high-conviction signal.
3. How to Read the Dashboard (Table)
The compact table in the top-right corner displays the current trend status for key timeframes in real-time.
Blue Background (UP): Indicates price has broken the recent peak, confirming an uptrend for that timeframe.
Red Background (DN): Indicates price has broken the recent trough, confirming a downtrend for that timeframe.
Gray Background: Indicates the trend status is yet to be determined or is in a neutral state.
The table items are fixed to show 1D, 4H, 1H, 15M, and 5M from top to bottom. When all rows turn the same color, it indicates a strong market trend across the entire spectrum.
4. Key Feature: MTF Sync Alerts
The primary advantage of this indicator is its automation of manual Multi-Timeframe Analysis.
3-TF Sync: On a 15M chart, if the 15M, 1H, and 4H trends align, a small Blue (Buy) or Red (Sell) label appears on the chart.
4-TF Sync: If the alignment extends to a 4th timeframe (e.g., up to the Daily timeframe on a 15M chart), an Orange label is displayed, signaling a very strong trend confluence.
このインジケーター(SMA Reversal Sequential MTF)は、移動平均線(SMA)の形状からトレンドの転換点を特定し、それを複数の時間足(MTF)で監視・同期させることで、高精度なエントリーポイントを探るためのツールです。
以下に、すべてのインプット項目を含む詳細な説明をまとめました。
1. 概要と基本ロジック
このインジケーターは、SMA(単純移動平均線)が「山」や「谷」を作ったポイントを転換点として認識します。
上昇転換: SMAが一定期間、下降した後に上昇へ転じた(谷を作った)タイミング。
下降転換: SMAが一定期間、上昇した後に下降へ転じた(山を作った)タイミング。
これに加えて、直近の転換点の価格(高値・安値)を「確定足」で更新し、そのラインを価格がブレイクした際にトレンドの継続や転換を判定します。
2. インプット項目の詳細
基本設定 / Main Settings
短期設定を使用 (5, 4, 7):
true(チェックあり): 短期的な動きに敏感になります(SMA 5期間など)。スキャルピング向け。
false(チェックなし): 標準的な設定(SMA 20期間など)。デイトレード・スイング向け。
時間足表示設定 / Timeframe Visibility
各時間足のラベルやラインを表示するかどうかを個別に設定します。
1M〜1m表示: 月足(1M)から1分足(1m)まで、各MTFデータの計算・表示をオン/オフします。
下位足での上位設定を非表示: * 現在表示しているチャートより上位の時間足設定だけを表示し、ノイズを減らすためのスイッチです。
表示オプション / Drawing Options
現在足のラベルのみ表示: チェックすると、チャートの時間足と一致するラベル(例:5分足チャートなら「5」のラベル)のみ表示されます。
トレンドライン&チャネルを表示: 現在表示している足の直近の転換点同士を結び、トレンドラインと並行チャネルを自動描画します。
転換点ラベル表示: SMAが反転した位置に「15」や「1H」などの時間足ラベルを表示します。
ブレイクライン表示: 直近の転換点(高値・安値)から右側に水平線を引き、そこを価格が抜けた際に「BREAK」の文字を表示します。
ブレイク文字の右オフセット: 「BREAK」ラベルを右側にどれくらい離して表示するかを調整します。
追加アラート設定 / GRP_NEW_AL
アラート1: 現在・上位2つ同調 (青/赤):
「表示中の足 + 1つ上 + 2つ上」の計3つのトレンド(UP/DN)が一致した瞬間に通知します。
アラート2: 表示足を含む4足同調 (オレンジ):
「表示中の足 + 上位3つ」の計4つのトレンドがすべて一致した強力なサイン時に通知します。
3. テーブル(ダッシュボード)の見方
画面右上に表示されるコンパクトなテーブルは、各時間足の現在のトレンド状態をリアルタイムで示しています。
青背景(UP): 直近で高値をブレイクし、上昇トレンドにある状態。
赤背景(DN): 直近で安値をブレイクし、下降トレンドにある状態。
灰背景: 状態が未確定なケース。
表示項目は上位足から順に 1D(日足), 4H, 1H, 15M, 5M となっており、これらが一色に染まるタイミングが環境認識上の強いトレンドを示唆します。
4. 特徴的な機能:MTF同調アラート
このインジケーターの最大の強みは、手動でのマルチタイムフレーム分析を自動化している点です。
3足同調(SYNC): 15分足チャートであれば「15M・1H・4H」が同じ方向を向いた時にチャート上に青(買い)または赤(売り)の小さなラベルが表示されます。
4足同調(4-TF SYNC): さらに上位の足(15分足なら日足まで)が同調すると、オレンジ色のラベルが表示され、より強い根拠となります。
Gold Buy/Sell with BoxesKey Features of This Update
Box-Style Labels: Instead of small icons, this uses label.new to create larger, text-based boxes that provide immediate confirmation ("GOLD BUY CONFIRMED").
Dynamic Positioning: Labels are automatically placed at the high or low of the signal bar to avoid cluttering the price candles.
Multi-Indicator Filter: Signals only trigger when both a Moving Average crossover occurs and momentum (RSI) is in the correct zone, reducing "noise" or false signals in sideways markets.
Alert Ready: You can set mobile or desktop notifications in TradingView by selecting these specific Buy/Sell conditions in the "Create Alert" menu.
Multi TF Volume ATRThis indicator measures volatility using ATR applied to volume across multiple timeframes. It helps identify when real momentum enters the market by showing volume spikes on 1h, 4h, 12h, and Daily charts. When several timeframes spike at the same time, it often signals strong moves, breakouts, or major shifts in volatility.
The script calculates Volume ATR for 1h, 4h, 12h, and 1D. Each timeframe generates its own spike condition. The indicator then checks for alignment between timeframes. The 1h histogram changes color based on the strength of the signal.
Red means multi timeframe alignment. This is the strongest signal and shows that several timeframes are spiking together.
Yellow means a 1h spike only. This is an early warning of local volatility.
Blue means no spike.
The indicator also plots higher timeframe ATR lines for context. These include 4h ATR, 12h ATR, and 1D ATR. When these lines rise together, volatility is building. Spike markers appear at the top of the pane when higher timeframes trigger.
You can choose how strict the alignment should be. Options include all three timeframes (1h, 4h, 12h), at least two timeframes, or including the daily timeframe for even stronger confirmation.
The script includes alert conditions for 1h spikes, multi timeframe alignment spikes, and daily spikes. These alerts help you stay ahead of volatility without watching charts constantly.
This indicator is useful for many trading styles. Breakout traders use red bars to confirm momentum. Mean reversion traders use daily spikes to confirm volatility conditions. Trend traders watch rising 4h and 12h ATR lines. Scalpers use yellow bars as early warnings.
Volume ATR shows how quickly volume is expanding. When several timeframes spike together, it often signals institutional activity, liquidity events, volatility shifts, breakouts, or reversals. This provides information that price alone cannot show.
Hedge Mini Calculator (Avg Long/Short + Alerts) with dca
Hedge Mini Calculator is a position-management indicator for traders who use long & short hedging.
It plots:
Long average price
Short average price
Optional hedge close level (+% above hedge average)
The indicator also provides alerts when price reaches the long or short average, helping you manage hedge exits and directional bias with precision.
Designed for risk control, not signals.
🔹 How to Use (Simple & Clear)
1. Enter Your Positions
In the indicator settings:
Add the dollar amount and entry price for each long leg
Add the dollar amount and entry price for each short leg
Set your leverage (default x4)
The indicator does not connect to your exchange.
All values are entered manually.
2. Read the Lines
Avg Long line → average entry of all long positions
Avg Short line → average entry of all short positions
Hedge Close line (optional) → price level where you may close shorts and stay long
3. Use Alerts
You can create alerts for:
Price reaching Avg Long
Price reaching Avg Short
Alerts trigger when the candle touches the average price (high–low range).
4. Manage the Hedge
Typical workflow:
Keep both long & short active while price is inside the range
When price moves favorably and reaches your target level:
Close the hedge leg (usually shorts)
Keep the directional position (longs)
5. PnL Awareness
The info table shows:
Estimated Long PnL
Estimated Short PnL
Net PnL (based on margin & leverage)
These values are approximations for decision support.
⚠️ Disclaimer
This indicator is not a trading signal.
It is a position management tool for hedging, scaling, and risk control.
Last Week - Last Month Fibonacci LevelsFibonacci levels for last week and last month
Thanks for using the scripts
EMA Cross over EMA 9/ EMA 19This Script will alert you in a clear manner, when this two EMAs cross up or down. It will help you with further confluence.




















