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.
Price vs CVD Divergence Zones (All Types)This is an indicator which shows the divergence between the running price and the CVD
Smart Z-Score OB Z-Score Impulse & Institutional Order Blocks
This indicator identifies high-probability Order Blocks (OB) by calculating the statistical deviation of price momentum using Z-Score analysis. Unlike standard pivot-based indicators, it focuses exclusively on "Institutional Footprints"—areas where price exploded with significant force.
How it Works
Statistical Outlier Detection: The script analyzes the last 100 bars to determine the "normal" volatility range. When price momentum exceeds the 6.0 Z-Score threshold, it identifies a move that has less than a 0.001% probability of being random noise.
Impulse Tracking: It monitors cumulative one-way price distance (momentum). A breakout only triggers a signal if the movement is exceptionally strong relative to recent history.
Smart Order Blocks: When a "Z-UP" or "Z-DOWN" impulse is detected, the script automatically draws a horizontal box at the origin of the move. These zones represent high-interest areas where institutional orders were likely placed.
Trading Strategy (SMC Focus)
Z-UP (Green): Indicates an aggressive institutional buy. The resulting green box acts as a Bullish Order Block (Demand Zone).
Z-DOWN (Red): Indicates aggressive institutional selling. The red box acts as a Bearish Order Block (Supply Zone).
Entry: Look for price to return (Retest) to these boxes. Since these zones were created by massive momentum, they often provide high-probability entry points with clear Stop-Loss levels just outside the zone.
"Higher Z-Score = Fewer, more potent Order Block signals."
BULLISH!! Low High Range Options HelperThis indicator is designed for range-based options trading, where price tends to rotate between a defined low and high rather than trend continuously. Its purpose is not to tell you what to trade, but to provide context for timing, specifically answering the question: if price is at a discount here, how much time should an option realistically have?
The script identifies a recent price range and plots three key levels. The range high represents the upper boundary of recent price action and often acts as a take-profit or resistance area. The range mid is the 50 percent equilibrium of the range and is intended as a confirmation level rather than an entry signal. The range low represents the discount zone, where risk is best defined for bullish options trades. This is the only area where options guidance is displayed.
When price touches the range low, the indicator calculates how long similar range rotations have taken in the past, adjusts that timing to the current chart timeframe, and applies a safety factor to reduce the risk of under-timing an options position. It then displays a suggested days-to-expiration label, such as 3 DTE, 4 DTE, 5 DTE, 6 DTE, 7 DTE, 10 DTE, or 14 plus. Shorter DTE values reflect faster expected rotations, while longer DTE values reflect slower, choppier, or more uncertain conditions. The goal is to help avoid the common mistake of buying options that do not have enough time to work.
A typical way to use this tool is to identify a clearly defined range, wait for price to reach the range low, note the DTE guidance shown on the chart, then wait for confirmation such as a reclaim of the range midpoint before considering a trade. Risk can then be managed with the range structure in mind, often targeting the range high in rotational environments. The indicator is most effective in sideways or mean-reverting markets rather than strong trends.
This script does not place trades, predict direction, or guarantee outcomes. It does not account for news events, earnings, implied volatility changes, or broader macro conditions. It is intended as a contextual tool to support disciplined decision-making, not as a standalone trading system.
Always trade smart. Manage position size, define risk before entering a trade, and avoid over-leveraging short-dated options. The objective is not to predict the market, but to consistently align price structure with realistic time expectations.
9 EMA Pullback Zones + Grade + VWAP Regime + VIX Filter (v6)Only for education purpose When 9 ema price above or below Vwap it will give you long or short entry



















