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.
Candlestick analysis
TDStochastic - TOM GOOD CAR (Center)Indicator Overview
TDStochastic - TGC_Stoch_Center is a streamlined momentum analysis tool designed for clarity and efficiency. By integrating Stochastic calculations with a centralized real-time Dashboard, it allows traders to instantly identify market trends and momentum strength directly on the chart.
Key Features
Visual Dashboard: Features a top-center table displaying Trend Status (UP/DOWN), Price Strength (POWERFUL/WEAK), and the current percentage value.
Dynamic Bar Coloring: Automatically changes the candlestick colors based on Stochastic %D direction to filter out market noise.
Enhanced Smoothing: Utilizes SMA smoothing for K and D lines to provide a more stable and reliable signal compared to standard stochastic oscillators.
How to Use
Trend Identification: Monitor the "STATUS" cell. If the momentum is rising, it displays "UPTREND."
Strength Assessment: When momentum is positive and accelerating, the "POWERFUL" status confirms the prevailing trend's strength.
Execution: Ideally used for trend following. Traders can remain in positions as long as the bar color and dashboard status remain consistent with the direction.
Trading involves significant risk. This indicator is a technical analysis tool based on historical data and does not guarantee future profits. Always use proper risk management and do not rely solely on a single indicator for trading decisions.
Bullish Diamond (Current TF)To ensure the Blue Diamond only appears based on the current timeframe's bullish momentum and ignores any signals during a downtrend, we will use a logic that checks two things:
Trend Filter: Is the current price above a major Moving Average (the 200-period)?
Crossover: Did a fast Moving Average just cross above a slow one on the specific bars you are looking at?
EOB Area - Full Wick Engulf (Bull + Bear)eob this svcript ding dong liukldo dokku nuydfvurfuhtrgbrug
rnguyvutgitjug5gb tuhgtugnt
OXS for GC A Share MarketThis is a dummy indicator for selecting shares from GC A share market based on momentum thoery
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)
CRE Multi Pair Scanner
✔ 1 lead asset (capital source)
✔ Multiple receiver assets
✔ CRE signal fires per asset
✔ Table + labels show rotation winner
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
FVG for Backtesting3-Candle Trend + FVG (15m) – v6
This indicator identifies three consecutive bullish or bearish candles on the 15-minute timeframe and highlights Fair Value Gaps (FVG) in the middle candle.
It displays:
Boxes marking the FVG zones
Labels showing “FVG”
Triangle signals for long (bullish) and short (bearish) setups
Fully compatible with Pine Script v6, it serves as a visual tool for spotting trend setups and potential trading opportunities.
INDICADOR PRO🧪 How to Use It Effectively (Forex & Crypto)
✔️ Ideal for:
EURUSD, GBPUSD, USDJPY
BTC, ETH (best during London + New York sessions)
✔️ Recommended:
Disable the Asia session for crypto if the market is noisy
Backtest for at least 3–6 months
Use PDH/PDL as a strong filter
SMA Reversal Sequential MTF - FinalSMA Reversal Sequential MTF - Final Edition
Here is the direct English translation of the description, maintaining the professional and factual tone without excessive ornamentation.
SMA Reversal Sequential MTF - Final Edition
1. Overview
This script is the final edition of "SMA Reversal Sequential MTF," featuring a proprietary logic that identifies market pivot points based on the structural changes of Simple Moving Averages (SMA). It integrates multi-timeframe (MTF) analysis covering from 1-minute to monthly scales, visualizing trend status, synchronization, and consolidations (squeezes) directly on the chart.
2. Core Logic
SMA Reversal Logic: Identifies points where the SMA shifts in a "V-shape" or "Inverted V-shape" based on the positional relationship of the three most recent MA points. The algorithm maintains strictly precise calculations consistent since the initial version.
Breakout Detection: Displays a "BREAK" label when the price closes beyond the most recent high or low established by a pivot point.
Multi-Timeframe (MTF): Projects signals from higher timeframes (e.g., 1D, 4H, 1H) onto the current chart.
3. Input Settings
The settings menu is configured with bilingual labels (Japanese and English).
■ Main Settings
Use Short Period Settings (5, 3, 7)
OFF (Default): SMA 20, Offset 6, Lookback 20
ON: SMA 5, Offset 3, Lookback 7
■ Timeframe Visibility
Show Timeframes (1M to 1m)
Individually toggle the visibility of each timeframe. The settings are organized in descending order from higher to lower timeframes.
Hide Lower Timeframes
When ON, automatically hides signals from timeframes lower than the one currently displayed on the chart.
■ Drawing Options
Show Only Current TF Labels
Hides MTF labels and displays only the pivot points corresponding to the current chart timeframe.
Show Trendlines & Channels
Automatically plots lines connecting recent highs/lows and their parallel channels for the current timeframe.
Show Sequential Labels
Displays labels (e.g., 1H) at SMA reversal points to indicate the source timeframe.
Show Break Lines
Displays horizontal lines at un-breached highs/lows along with breakout labels.
■ Additional Alert Settings
Alert 1: 3-TF Sync
Triggers when the current timeframe and the two immediate higher timeframes align in the same trend direction.
Alert 2: 4-TF Sync
Triggers when four timeframes synchronize in the same trend direction.
Alert 3: Squeeze (Green ●)
Detects "Triangle Squeezes" (lower highs and higher lows) and displays a "●" on the chart with a notification.
4. Dashboard
The dashboard in the top-right corner displays the real-time trend status of five major timeframes (1D, 4H, 1H, 15M, 5M).
Blue: Bullish (Price has broken the recent high)
Red: Bearish (Price has broken the recent low)
Gray: Neutral
5. Trading Application
Market Context: Identify directional bias when dashboard colors align.
Entry Alignment: Utilize "Sync Alerts" on lower timeframes as signals when they align with the higher timeframe trend.
Volatility Contraction: The appearance of a green "●" (Squeeze) indicates energy consolidation, suggesting a potential breakout.
SMA Reversal Sequential MTF - Final Edition
1. 概要 (Overview)
本スクリプトは、SMA(単純移動平均線)の形状変化から相場の転換点(ピボット)を特定する独自ロジックを用いた「SMA Reversal Sequential MTF」の最終盤です。1分足から月足までを網羅するマルチタイムフレーム(MTF)分析を統合しており、上位足のトレンド状態、同期、三角保合い(スクイーズ)をチャート上に可視化します。
2. ロジック解説 (Core Logic)
SMA Reversal Logic: 指定期間のSMAが「V字」または「逆V字」に転換したポイントを、直近のMA3点の位置関係から算出します。アルゴリズムは初版から変わらぬ厳密な計算を維持しています。
Breakout Detection: 転換点で作られた直近の高値・安値を終値でブレイクした際に「BREAK」ラベルを表示します。
Multi-Timeframe (MTF): 現在のチャート上に上位足(1D, 4H, 1H等)のシグナルを投影します。
3. インプット項目の詳細 (Input Settings)
設定画面は、日本語と英語の併記構成となっています。
■ 基本設定 / Main Settings
短期設定を使用 (5, 3, 7) / Use Short Period Settings
OFF (デフォルト):SMA 20, Offset 6, Lookback 20
ON:SMA 5, Offset 3, Lookback 7
■ 時間足表示設定 / Timeframe Visibility
1M表示 ~ 1m表示 / Show Timeframes
各時間足の表示を個別に切り替えます。設定画面では大きな足から順に並んでいます。
現在足より短い時間足の設定を非表示 / Hide Lower Timeframes
ONにすると、現在表示しているチャートより短い時間足のシグナルを自動で非表示にします。
■ 表示オプション / Drawing Options
現在足のラベルのみ表示 / Show Only Current TF Labels
現在の時間足の転換点のみを表示し、MTFラベルを非表示にします。
トレンドライン&チャネルを表示 / Show Trendlines & Channels
現在足の安値同士・高値同士を結んだラインと、平行チャネルを自動描画します。
転換点ラベル表示 / Show Sequential Labels
SMAの反転箇所に、該当する時間足のラベル(例:1H)を表示します。
ブレイクライン表示 / Show Break Lines
未更新の高値・安値ラインと、ブレイク時のラベルを表示します。
■ 追加アラート設定 / Additional Alert Settings
アラート1: 現在・上位2つ同調 / Alert 1: 3-TF Sync
現在足+上位2つの時間足のトレンドが同一方向になった際に通知します。
アラート2: 表示足を含む4足同調 / Alert 2: 4-TF Sync
4つの時間足のトレンドが同期した際に通知します。
アラート3: 三角保合い発生 (緑●) / Alert 3: Squeeze
高値切り下がり、安値切り上がりの「三角保合い」形成を検知し、チャート上に「●」を表示・通知します。
4. ダッシュボード (Dashboard)
チャート右上に主要5足(1D, 4H, 1H, 15M, 5M)のトレンド状況をリアルタイム表示します。
青色(Blue): 強気(直近高値をブレイク中)
赤色(Red): 弱気(直近安値をブレイク中)
灰色(Gray): ニュートラル
5. トレードへの活用
環境認識: ダッシュボードの色が揃っている方向への優位性を確認します。
エントリー判断: 上位足のトレンド方向に、下位足で同期アラートが発生したポイントをシグナルとして活用します。
ボラティリティの収束: 緑の「●(Squeeze)」が表示された際は、エネルギーが収束している状態を示唆します。
15:50 AnticipeThis indicator is designed to anticipate the market behavior around a specific time of day (by default 15:50) by evaluating market conditions one minute before the target candle.
It is primarily intended for intraday trading on 1-minute charts, especially on index futures such as NQ / MNQ.
The logic combines trend, volatility compression, momentum, volume, and VWAP positioning, using a scoring system to determine whether a LONG, SHORT, or NEUTRAL bias is statistically favored before the target candle prints.
Core Concept
At the anticipation candle (15:49 by default), the indicator evaluates multiple technical conditions.
Each condition adds points to a LONG score or SHORT score.
If one side reaches the required score threshold and is stronger than the opposite side, a persistent signal is generated and held through the 15:50 candle.
The 15:50 candle is highlighted in yellow for visual reference.
Indicators Used
The system combines:
• Bollinger Bands to detect volatility compression
• EMA 9 / EMA 21 / EMA 89 for short-term and structural trend
• RSI for momentum confirmation
• Volume Spike Detection based on a volume SMA multiplier
• Anchored VWAP, reset daily and anchored at a configurable time
• Optional Reversal Mode for mean-reversion setups
Scoring Logic
Each side (LONG / SHORT) accumulates points based on conditions such as:
• Bollinger Band compression
• EMA 9 vs EMA 21 alignment
• Price location relative to EMA 9 and BB basis
• RSI above or below threshold
• Volume spike confirmation
• Price position relative to Anchored VWAP
If Reversal Mode is enabled, additional points are added when:
• Price touches or exceeds Bollinger extremes
• RSI divergence is detected
• Price deviates significantly from Anchored VWAP
Reversal conditions carry more weight, favoring exhaustion and snap-back setups.
Signal Generation
At the anticipation candle:
• LONG signal
Triggered when LONG score ≥ required threshold and stronger than SHORT score.
• SHORT signal
Triggered when SHORT score ≥ required threshold and stronger than LONG score.
• NEUTRAL signal
Displayed when neither side has a clear statistical edge.
Signals are displayed as labels above or below price, positioned dynamically using ATR to avoid candle overlap.
Once triggered, the signal remains active through the 15:50 candle and can be used for trade execution or confirmation.
Anchored VWAP
The Anchored VWAP:
• Resets automatically each trading day
• Starts calculating from a user-defined hour and minute
• Acts as a directional and mean-reversion reference
• Is fully integrated into both trend and reversal logic
Alerts
The indicator provides alert conditions for:
• Anticipated LONG setup
• Anticipated SHORT setup
• NEUTRAL condition
Alerts trigger when the anticipation signal becomes active, allowing automation or discretionary execution.
Intended Use
This indicator is best used as:
• A directional bias tool before a known time-based volatility event
• A confirmation layer, not a standalone entry system
• A way to structure disciplined trades instead of reacting emotionally to the 15:50 candle
It favors clarity, confluence, and probability, not prediction.
PDH & PDL - Previous Day LevelsPDH & PDL – Previous Day High and Low
This indicator automatically plots the Previous Day High (PDH) and Previous Day Low (PDL) on intraday charts.
These key levels are widely used by traders as important support and resistance zones, helping to identify potential areas for price reactions, breakouts, or liquidity grabs.
Features
Automatically detects the previous trading day’s high and low
Draws clear horizontal levels across the current session
Labels the levels as PDH and PDL
Updates in real time at the start of each new trading day
Designed for intraday timeframes
How to Use
Use PDH as a potential resistance level
Use PDL as a potential support level
Watch for breakouts, rejections, or retests around these levels
Combine with price action, volume, or session-based strategies
Best For
Day trading
Scalping
Forex, indices, crypto, and futures
Traders who use market structure and key levels
This indicator keeps your chart clean while highlighting two of the most important reference levels from the previous trading day.
Custom Price Offsets v6.1Use the indicator to mark pullbacks and targets on your chart based off custom levels. Click to set the initial point on your chart. Can change your offsets in the settings menu. must delete and readd indicator to change set point.
MRG VWAP CompleteMRG VWAP Complete - Indicator Description
📊 Overview
MRG VWAP Complete is a professional all-in-one VWAP indicator that combines two powerful volume-weighted average price tools into a single, highly customizable solution. This indicator provides traders with both anchored VWAP with deviation bands and a weekly VWAP that resets every Sunday, offering comprehensive price analysis across multiple timeframes.
🎯 Key Features
Dual VWAP System
Standard VWAP: Highly configurable with multiple anchor periods and deviation bands
Weekly VWAP: Automatically resets every Sunday for swing trading strategies
Option to display both simultaneously or independently
Standard VWAP Capabilities
Multiple Anchor Periods:
Session (Daily)
Week / Month / Quarter / Year
Decade / Century
Corporate Events: Earnings / Dividends / Splits
Customizable Parameters:
Source selection (HLC3, Close, Open, etc.)
Hide on 1D timeframes and above
Offset adjustment
Custom color and line thickness (1-5)
Advanced Deviation Bands System
Three Independent Band Levels:
Each band can be enabled/disabled individually
Customizable multipliers for each level
Independent color selection for each band
Optional fill toggle for each band
Two Calculation Modes:
Standard Deviation: Traditional statistical approach
Percentage: Distance calculated as percentage of VWAP value
Visual Customization:
✅ Enable/disable band fills independently
🎨 Choose any color for each band
📏 Transparent fills (95% opacity) for clear price action visibility
🎯 Clean chart display with only desired elements
Weekly VWAP Features
Resets automatically every Sunday
Customizable source input
Independent color and line width settings
Perfect for identifying weekly trends and key levels
⚙️ Complete Parameter List
Display Options
Show/Hide Standard VWAP
Show/Hide Weekly VWAP
Standard VWAP Settings
Anchor Period selection
Source selection
Hide on 1D or above option
Offset value
VWAP color
VWAP line width (1-5)
Bands Settings
Calculation mode (Standard Deviation / Percentage)
Band #1: Enable, Multiplier, Color, Fill toggle
Band #2: Enable, Multiplier, Color, Fill toggle
Band #3: Enable, Multiplier, Color, Fill toggle
Weekly VWAP Settings
Weekly VWAP color
Weekly VWAP line width (1-5)
Source selection
📈 Strategic Applications
Mean Reversion Trading
Use deviation bands to identify overbought/oversold conditions
Enter trades when price reaches outer bands
Target VWAP for exits
Trend Confirmation
Price above VWAP = Bullish bias
Price below VWAP = Bearish bias
Weekly VWAP confirms longer-term trend direction
Support & Resistance
VWAP acts as dynamic support/resistance
Deviation bands provide multiple levels for entries/exits
Weekly VWAP identifies major swing levels
Multi-Timeframe Analysis
Combine Standard VWAP (intraday) with Weekly VWAP (swing)
Identify confluence zones where both VWAPs align
Spot divergences between short-term and weekly trends
Breakout Trading
Monitor price action around VWAP levels
Trade breakouts through deviation bands
Weekly VWAP breaks signal strong momentum
💡 Advantages
✨ All-in-One Solution: No need for multiple VWAP indicators
⏱️ Time-Saving: Pre-configured with professional settings
🎯 Precision: Multiple anchor periods for different trading styles
🎨 Fully Customizable: Every visual element can be adjusted
📊 Clean Charts: Toggle fills on/off for optimal visualization
🔄 Automatic Updates: Both VWAPs update in real-time
📱 Universal: Works on all timeframes and instruments
🎓 Ideal For
Trading Styles
Day Trading (M1, M5, M15)
Swing Trading (H1, H4, D1)
Scalping strategies
Position trading
Markets
Forex (XAUUSD, EUR/USD, GBP/USD, etc.)
Indices (US30, NAS100, SPX500)
Cryptocurrencies
Commodities
Stocks
Strategies
VWAP mean reversion
Trend following
Breakout trading
Volume-weighted support/resistance
Institutional order flow analysis
🔧 Recommended Settings
For Day Trading (M5-M15)
Standard VWAP: Anchor = Session
Band #1: Multiplier 1.0, Fill ON
Band #2: Multiplier 2.0, Fill OFF
Weekly VWAP: Enabled for major levels
For Swing Trading (H1-H4)
Standard VWAP: Anchor = Week
Band #1: Multiplier 1.5, Fill ON
Band #2: Multiplier 2.5, Fill ON
Weekly VWAP: Primary level for trend confirmation
For Scalping (M1-M5)
Standard VWAP: Anchor = Session
Band #1: Multiplier 0.5, Fill ON
Band #2: Multiplier 1.0, Fill OFF
Weekly VWAP: Disabled for cleaner chart
📊 Understanding the Bands
Band Multiplier = 1.0
Contains ~68% of price action (1 standard deviation)
Primary mean reversion zone
Band Multiplier = 2.0
Contains ~95% of price action (2 standard deviations)
Strong overbought/oversold signal
Band Multiplier = 3.0
Contains ~99.7% of price action (3 standard deviations)
Extreme reversal zones
🎯 Trading Tips
Confluence Trading: Enter when price touches a deviation band AND Weekly VWAP
Trend Confirmation: Only take long trades above both VWAPs, shorts below both
Band Rejection: Watch for candle rejections at outer bands for reversal signals
Volume Confirmation: Strong moves should break bands with high volume
Time of Day: VWAP is most reliable during high-volume sessions
📌 Important Notes
VWAP resets based on anchor period selection
Weekly VWAP uses Sunday as the start of the week
Deviation bands require sufficient volume data
Best used in combination with other technical analysis tools
Not a standalone trading system - use proper risk management
🚀 Why Choose MRG VWAP Complete?
✅ Professional Grade: Used by institutional traders
✅ Maximum Flexibility: Adapt to any trading style
✅ Visual Clarity: Customizable colors and fills
✅ Dual Perspective: Intraday + weekly analysis combined
✅ Easy to Use: Intuitive parameter organization
✅ Performance Optimized: Efficient code for smooth charting
Master volume-weighted price analysis with the most complete VWAP indicator available! 📊🚀
💼 Perfect For Professional Traders
Whether you're a retail trader or institutional analyst, MRG VWAP Complete provides the tools you need to:
Identify fair value zones
Spot institutional order flow
Time entries with precision
Manage risk effectively
Trade with the smart money
Elevate your VWAP trading to the next level! 💎
ETH Staking Rate - weighted average of WSTETH, CBETH, RETHThis indicator uses the redemption rate of WSTETH, CBETH, RETH from Pyth and the market cap of each from Cryptocap to calculate a weighted average ETH staking rate.
VWAP Suite (Updated 3W + Long Term)VWAP Suite (Updated 3W + Long Term)VWAP Suite (Updated 3W + Long Term)VWAP Suite (Updated 3W + Long Term)VWAP Suite (Updated 3W + Long Term)VWAP Suite (Updated 3W + Long Term)VWAP Suite (Updated 3W + Long Term)VWAP Suite (Updated 3W + Long Term)
Pullbacks CompletoThis indicator is a comprehensive Trend Following toolkit that combines two distinct, high-probability pullback strategies into a single, intelligent interface. It is designed to help traders identify precise entry points during corrections in established trends, filtering out low-quality noise.
The indicator features Smart Conflict Detection: if the two strategies generate opposing signals on the same candle, the system blocks the individual alerts and displays a Purple "X", warning the trader of market indecision.
Strategy 1: Stoch Pullback (Triangles)
Visual: Green/Red Triangles Logic:
Trend: Defined by the alignment of the Fast EMA (21) and Slow EMA (100).
The Setup: The indicator waits for the Stochastic RSI to enter an Overbought or Oversold zone.
Strict Filter: A signal is only valid if, while in the zone, the price physically tests the Fast EMA (closes against it). This filters out "shallow" pullbacks.
Trigger: The signal is fired when the Stochastic RSI crosses back out of the extreme zone, resuming the trend.
Strategy 2: Dave Landry Setup (Dots)
Visual: Green/Red Circles Logic:
Trend: Filtered by MACD Histogram momentum and the relation to the Fast EMA (21).
The Pattern: Looks for a correction of at least 2 candles making lower lows (for uptrends) or higher highs (for downtrends).
Trigger: Enters when the price breaks the high/low of the previous candle, provided it closes in favor of the EMA 21.
Anti-Climax Filter: Includes a "Stretched" filter to prevent buying/selling on exhausted "Elephant Bars" (huge candles that have already consumed the move).
Key Features
Dual Alert System: Receive specific alerts for "Pullback" or "Landry" setups.
Conflict Warning: If Strategy A says "Buy" and Strategy B says "Sell" simultaneously, a "Doubtful Signal" alert is triggered, and a purple Cross appears on the chart.
Smart Visibility: The indicator automatically hides or shows the Moving Averages depending on which strategies you have enabled in the settings.
Educational Tooltips: Hover over the "i" icons in the settings menu to read the rationale behind each specific filter.
How to Use
Green Triangle: Look for Long opportunities (Stoch Pullback).
Green Dot: Look for Long opportunities (Landry Breakout).
Red Triangle: Look for Short opportunities (Stoch Pullback).
Red Dot: Look for Short opportunities (Landry Breakout).
Purple X: Stay Out. The setups are conflicting (Trend vs. Momentum disagreement).
Configuration You can toggle each strategy on/off in the settings menu. You can also choose to display the Overbought/Oversold background zones to visualize where the Stoch Pullback is "arming".
Synthetic Renko Overlay + Instant Expansion Alert✔ Builds Renko bricks internally
✔ Overlays them on ANY chart (3m recommended)
✔ Detects sudden aggressive brick growth
✔ Fires alert on the FIRST push
✔ Works for NQ / ES / BTC / any market






















