VWAP Orderflow Buy/Sell Signals Level 1✅ WHAT THE SCRIPT DOES
✔ Buy Signal Requirements
Price crosses above VWAP
CVD (delta proxy) is rising
Candle is bullish
This fires a “BUY” label under the candle.
✔ Sell Signal Requirements
Price crosses below VWAP
CVD is falling
Candle is bearish
This prints a “SELL” label above the candle.
🧠 WHY IT WORKS
This is a simplified version of:
VWAP Reclaim Strategy
VWAP Rejection Strategy
CVD Divergence Confirmation
Footprint “aggression” reading using delta strength
You now have:
Trend confirmation
Momentum confirmation
VWAP structure confirmation
Indicators and strategies
Vynthra Weigthed SD Bands⚡ Vynthra Weighted SD Bands
Vynthra Weighted SD Bands is a volatility intelligence system designed to reveal the true structural rhythm of price expansion and compression.
In contrast to traditional standard deviation bands, which treat all price movement as equal, this model assigns adaptive weight to momentum efficiency, directional stability and volatility symmetry. The result is a set of bands that respond to market structure rather than raw noise, enabling far cleaner identification of trending phases, exhaustion, squeezes and volatility shifts.
Core Concept
The engine dynamically recalibrates its envelopes using weighted volatility rather than static deviation. This weighting framework allows the indicator to widen during structurally strong trends, tighten during compression phases and remain neutral when conditions are directionless.
By combining momentum symmetry, volatility efficiency and trend quality into the weighting logic, the bands reveal when price is expanding with intent and when it is simply wandering inside a noisy range.
Visual Logic
The bands form a structural map around price, highlighting three essential states:
• expansion, where weighted volatility aligns with directional intent
• compression, where energy builds and price begins coiling
• reversion zones, where inefficiency causes price to gravitate back toward equilibrium
The indicator remains visually clean, functioning as an adaptive envelope that responds to real structural behavior rather than generic deviation.
Practical Use
Weighted SD Bands are highly effective for traders seeking clarity in environments where timing matters.
They provide intuitive signals for:
• identifying early trend acceleration
• spotting exhaustion before reversal pressure emerges
• defining balanced entry zones in expanding markets
• timing reversion trades during volatility collapse
• distinguishing healthy movement from unstable noise
The system does not issue buy or sell signals. It creates a volatility framework that helps you understand when to participate, when to wait and when to step aside entirely.
Access
Get access for free
Available exclusively within the VynthraQuant Systems suite.
Connect via Whop, X or TradingView (VynthraQuant) for inquiries or alternative payment arrangements.
whop.com
Islamic Disclaimer
Ensure your investments and methods align with halal principles. The indicator itself contains no interest, leverage or speculative mechanisms.
General Disclaimer
For educational purposes only. This is not financial advice. Past performance does not guarantee future results. Use at your own risk.
Alpha VWAP Regime
🔥 Alpha VWAP Regime — What It Is
Alpha VWAP Regime هي إستراتيجية تداول مؤسسية متقدمة تعتمد على قراءة حركة السعر حول VWAP، وتحديد “حالة السوق” (Regime) قبل اتخاذ أي قرار تداول.
الهدف الرئيسي:
الدخول في اللحظات التي يتحرك فيها السوق مع السيولة الحقيقية — Smart Money — وليس ضدها.
الاستراتيجية مبنية على 3 مفاهيم أساسية:
1. Session VWAP لتحديد قيمة السعر العادلة خلال الجلسة
2. Anchored VWAP لقراءة تكلفة المشاركين الرئيسيين من القمم والقيعان الحاسمة
3. Market Regimes عبر ADX للكشف عن:
o Trend
o Range
o Breakout
________________________________________
🎯 What This Strategy Does
• تحدد ما إذا كان السوق في Trend، Range، أو Breakout Mode
• تبني Directional Bias واضح قبل أي صفقة
• تدخل فقط عندما تتفق السعر + VWAP + السيولة
• تمنع التداول في مناطق "No-Trade Zone" (الفير فاليو ±1σ)
• تستخدم VWAP Bands (±2σ) لاكتشاف نقاط الانعكاس عالية الدقة
• تعتمد على Anchored VWAP لاكتشاف مستويات التكلفة المؤسسية
• تضع أهداف ووقف خسارة مبنية على ATR (ديناميكية حسب التقلب)
________________________________________
⚡ Why It Works
VWAP هو خط السعر الحقيقي الذي يتبعه:
• المؤسسات
• صناديق التحوط
• خوارزميات التنفيذ
• صناع السوق
عند دمج:
• Session VWAP
• Anchored VWAP
• VWAP Bands
• ADX Regime Filter
تحصل على رؤية واضحة لمكان السيولة، وأي اتجاه يتحكم في الجلسة، ومتى يكون التداول خطرًا أو واعدًا.
________________________________________
📌 Entry Modes Available
الاستراتيجية تحتوي على 3 أنماط دخول قابلة للاختيار:
1️⃣ Trend Mode
الدخول مع الاتجاه عندما يكون السوق في Trend Regime.
يعتمد على الارتداد من VWAP أو النطاق الداخلي (±1σ).
2️⃣ Mean Reversion Mode
تداول انعكاسات التذبذب عندما يكون السوق في Range Regime.
خاصة عند لمس VWAP ±2σ.
3️⃣ Breakout Mode
اكتشاف اختراقات Anchored VWAP الحقيقية المدعومة بحجم تداول قوي.
4️⃣ ALL Mode
دمج الأنماط الثلاثة للحصول على رؤية شاملة للسوق.
________________________________________
🧩 Key Features
• يعمل على جميع الأسواق (أسهم – كريبتو – فوركس – مؤشرات)
• مناسب للفريمات من 1m حتى 1h
• يتكيف تلقائيًا مع حالة السوق
• إدارة مخاطر ديناميكية مبنية على ATR
• إشارات نظيفة بدون ازدحام على الشارت (بناءً على اختيارك)
• يمكن إخفاء جميع المؤشرات والاكتفاء بإظهار الإشارات فقط
________________________________________
📈 Who Is This For?
• متداولي الاتجاه (Trend Traders)
• متداولي التذبذب والارتداد (Mean Reversion)
• المتداولين المؤسسيين وصناديق التحوط
• Scalpers وDay Traders
• أي شخص يعتمد على VWAP كأداة أساسية لإدارة المراكز أو الدخول والخروج
________________________________________
🏆 Summary
Alpha VWAP Regime ليست مجرد استراتيجية VWAP عادية،
بل منظومة كاملة لتحديد:
✔ حالة السوق
✔ الاتجاه الحقيقي
✔ مناطق السيولة
✔ أماكن الانعكاس
✔ لحظة الاختراق المؤسسي
🔥 What Is Alpha VWAP Regime?
Alpha VWAP Regime is an institutional-grade trading strategy designed to analyze market structure, liquidity positioning, and price behavior around VWAP.
Instead of relying on single signals, the strategy identifies the current market regime and adapts its entries accordingly.
It combines:
• Session VWAP
• Anchored VWAP (AVWAP)
• VWAP Bands (±1σ, ±2σ)
• ADX Regime Detection
• Volume Confirmation
This creates a dynamic model that understands where smart money is positioned—and aligns your trades with it.
________________________________________
🎯 What This Strategy Does
• Detects whether the market is in Trend, Range, or Breakout regime
• Builds a clear Directional Bias using multiple VWAP layers
• Avoids low-quality trades inside the Fair-Value Zone (±1σ)
• Captures high-probability reversals at ±2σ extremes
• Uses Anchored VWAP to track institutional cost zones
• Sets dynamic ATR-based stop loss and targets
• Allows you to switch between Indicators & Signals or Signals Only for clean charts
________________________________________
⚡ Why It Works
VWAP is the execution benchmark for:
• Hedge funds
• Institutional traders
• Execution algos (TWAP, VWAP, POV…)
• Smart-money liquidity providers
By combining:
• Session VWAP
• Anchored VWAP
• Standard deviation bands
• Market regime detection via ADX
…the strategy forms a precise map of liquidity, momentum, and mean-reversion zones—giving a massive statistical edge.
________________________________________
📌 Available Entry Modes
1️⃣ Trend Mode
Trades pullbacks with the trend when ADX confirms a momentum regime.
• Pullback to VWAP or −1σ
• Bullish/Bearish reversal confirmation
• Strong continuation logic
________________________________________
2️⃣ Mean Reversion Mode
Executed when the market is in a sideways range.
• Price reaches ±2σ
• Reversal candle
• Target: return to VWAP (fair value)
________________________________________
3️⃣ Breakout Mode
Detects real institutional breakouts via Anchored VWAP.
• AVWAP High/Low breakout
• Volume > 20-bar average
• Strong impulsive candle (engulfing / marubozu)
________________________________________
4️⃣ ALL Mode
Runs all regimes simultaneously for maximum coverage.
________________________________________
🧩 Key Features
• Works on all assets (Stocks, Crypto, Forex, Indices)
• Ideal for 1m → 1h timeframes
• Automatically adapts to market conditions
• Institutional bias detection using multi-VWAP structure
• Dynamic ATR-based risk management
• Clean “signals only” option for chart-only users
• Breakout detection powered by Anchored VWAP + volume
________________________________________
🎯 Who Is This For?
• Trend traders
• Mean-reversion traders
• Institutional-style traders
• Day traders & scalpers
• VWAP-focused execution traders
• Anyone who wants clear, rules-based entries with regime awareness
________________________________________
🏆 Summary
Alpha VWAP Regime is more than a VWAP indicator —
it's a full decision-making framework that identifies:
✔ Market regime
✔ Trend direction
✔ Liquidity zones
✔ Fair-value areas
✔ Extremes & reversals
✔ True institutional breakouts
monthly//@version=5
indicator("monthly18", overlay=true, max_boxes_count=500, max_lines_count=500, max_bars_back=5000, dynamic_requests=true)
extend_last = input.bool(false, "Extend last session")
hide_current_until_end = input.bool(false, "Hide current session")
tz_offset_input = input.int(-4, "Timezone UTC", minval=-12, maxval=12)
// Monthly Range
upper_line_col = input.color(color.blue, "Line color", group="Monthly Range")
upper_bg_col = input.color(color.new(color.blue, 90), "Background color", group="Monthly Range")
upper_subquadrants = input.bool(false, "Subquadrants", group="Monthly Range")
show_25_75 = input.bool(false, "show only quadrant 1 and 4", group="Monthly Range")
upper_top_low_subquadrants = input.bool(false, " option 1", group="Monthly Range", tooltip="divides quadrant 1 and 4 into 4 quadrants and displays only the top and low quadrant.")
extend_main_only = input.bool(false, "Extend previous session main quadrant lines only", group="Monthly Range")
lower_line_col = upper_line_col
lower_bg_col = upper_bg_col
lower_subquadrants = upper_subquadrants
lower_top_low_subquadrants = upper_top_low_subquadrants
// Open Line
open_col = input.color(color.yellow, "Line color opening price", group="Open Line")
open_width = input.int(1, "Line width", minval=1, maxval=4, group="Open Line")
// Alarm
enable_alarms = input.bool(false, "Enable alarms", group="Alarm")
alarm_prev = input.bool(false, "Alarm previous session", group="Alarm")
alarm_curr = input.bool(false, "Alarm current session", group="Alarm")
var color trans = color.new(#000000, 100)
// Days in month array
var int daysInMonth = array.from(0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)
// Function to check if DST is active for a given date (US rules for NY time)
is_dst(int y, int m, int d) =>
int march1_dow = dayofweek(timestamp("UTC", y, 3, 1, 0, 0, 0))
int dst_start_day = 8 + (7 - (march1_dow - 1) % 7) % 7 // Second Sunday in March
int dst_start = timestamp("UTC", y, 3, dst_start_day, 2, 0, 0)
int nov1_dow = dayofweek(timestamp("UTC", y, 11, 1, 0, 0, 0))
int dst_end_day = 1 + (7 - (nov1_dow - 1) % 7) % 7 // First Sunday in November
int dst_end = timestamp("UTC", y, 11, dst_end_day, 2, 0, 0)
int the_time = timestamp("UTC", y, m, d, 18, 0, 0)
the_time >= dst_start and the_time < dst_end
// Function to get TZ offset for a given UTC date
get_tz_offset(int y, int m, int d) =>
tz_offset_input == 0 ? (is_dst(y, m, d) ? -4 : -5) : tz_offset_input
// Function to get tz string for a given ts
get_tz(int ts) =>
int y = year(ts, "UTC")
int m = month(ts, "UTC")
int d = dayofmonth(ts, "UTC")
int offset = get_tz_offset(y, m, d)
"UTC" + (offset >= 0 ? "+" + str.tostring(offset) : str.tostring(offset))
// Function to check if a timestamp is a trading bar open time for CME equity futures (ES/MNQ) in ET
is_trading(int ts) =>
string tz = get_tz(ts)
int h = hour(ts, tz)
int d = dayofweek(ts, tz) // 1=Sun, 2=Mon, ..., 7=Sat
int m = minute(ts, tz)
bool condition = m == 0 and d != 7 and ((d == 1 and h >= 18) or (d == 6 and h < 17) or (d >= 2 and d <= 5 and h != 17))
condition
// Function to get the next trading bar time after ts
get_next_bar_time(int ts) =>
int next_ts = ts + 3600000
int iterations = 0
while not is_trading(next_ts) and iterations < 100 // Safety limit for long breaks (e.g., weekends)
next_ts += 3600000
iterations += 1
next_ts
// Function to get trading bars in a full day
get_day_trading_bars(int day_ts) =>
string tz = get_tz(day_ts)
int dow = dayofweek(day_ts, tz)
dow == 1 ? 6 : dow == 6 ? 17 : dow == 7 ? 0 : 23
// Function to calculate trading bars between from_ts and to_ts
calculate_trading_bars(int from_ts, int to_ts) =>
string from_tz = get_tz(from_ts)
int from_y = year(from_ts, from_tz)
int from_m = month(from_ts, from_tz)
int from_d = dayofmonth(from_ts, from_tz)
int from_day_start = timestamp(from_tz, from_y, from_m, from_d, 0, 0, 0)
string to_tz = get_tz(to_ts)
int to_y = year(to_ts, to_tz)
int to_m = month(to_ts, to_tz)
int to_d = dayofmonth(to_ts, to_tz)
int to_day_start = timestamp(to_tz, to_y, to_m, to_d, 0, 0, 0)
int bars = 0
if from_day_start == to_day_start
int from_h = hour(from_ts, from_tz)
int to_h = hour(to_ts, to_tz)
for h = from_h to to_h - 1
int h_ts = from_day_start + h * 3600000
if is_trading(h_ts)
bars += 1
else
int from_h = hour(from_ts, from_tz)
for h = from_h to 23
int h_ts = from_day_start + h * 3600000
if is_trading(h_ts)
bars += 1
int next_day = from_day_start + 86400000
while next_day < to_day_start
bars += get_day_trading_bars(next_day)
next_day += 86400000
int to_h = hour(to_ts, to_tz)
for h = 0 to to_h - 1
int h_ts = to_day_start + h * 3600000
if is_trading(h_ts)
bars += 1
bars
// Function to get timestamps for the current session
get_session_info() =>
int current_month = month(time, "UTC")
int current_year = year(time, "UTC")
int previous_month = current_month - 1
int previous_year = current_year
if previous_month < 1
previous_month += 12
previous_year -= 1
int previous_days = array.get(daysInMonth, previous_month)
if previous_month == 2 and ((previous_year % 4 == 0 and previous_year % 100 != 0) or previous_year % 400 == 0)
previous_days := 29
int tz_offset_start = tz_offset_input == 0 ? (is_dst(previous_year, previous_month, previous_days) ? -4 : -5) : tz_offset_input
string tz_start = "UTC" + (tz_offset_start >= 0 ? "+" + str.tostring(tz_offset_start) : str.tostring(tz_offset_start))
int start_time = timestamp(tz_start, previous_year, previous_month, previous_days, 18, 0, 0)
int current_days = array.get(daysInMonth, current_month)
if current_month == 2 and ((current_year % 4 == 0 and current_year % 100 != 0) or current_year % 400 == 0)
current_days := 29
int tz_offset_end = tz_offset_input == 0 ? (is_dst(current_year, current_month, current_days) ? -4 : -5) : tz_offset_input
string tz_end = "UTC" + (tz_offset_end >= 0 ? "+" + str.tostring(tz_offset_end) : str.tostring(tz_offset_end))
int session_end = timestamp(tz_end, current_year, current_month, current_days, 16, 59, 0)
int end_of_day = timestamp(tz_end, current_year, current_month, current_days, 23, 59, 0)
// Function to get timestamps for the previous session
get_previous_session_info() =>
int curr_month = month(time, "UTC")
int curr_year = year(time, "UTC")
int prev_month = curr_month - 1
int prev_year = curr_year
if prev_month < 1
prev_month += 12
prev_year -= 1
int prev_prev_month = prev_month - 1
int prev_prev_year = prev_year
if prev_prev_month < 1
prev_prev_month += 12
prev_prev_year -= 1
int prev_days = array.get(daysInMonth, prev_month)
if prev_month == 2 and ((prev_year % 4 == 0 and prev_year % 100 != 0) or prev_year % 400 == 0)
prev_days := 29
int prev_prev_days = array.get(daysInMonth, prev_prev_month)
if prev_prev_month == 2 and ((prev_prev_year % 4 == 0 and prev_prev_year % 100 != 0) or prev_prev_year % 400 == 0)
prev_prev_days := 29
int tz_offset_start_prev = tz_offset_input == 0 ? (is_dst(prev_prev_year, prev_prev_month, prev_prev_days) ? -4 : -5) : tz_offset_input
string tz_start_prev = "UTC" + (tz_offset_start_prev >= 0 ? "+" + str.tostring(tz_offset_start_prev) : str.tostring(tz_offset_start_prev))
int previous_start_time = timestamp(tz_start_prev, prev_prev_year, prev_prev_month, prev_prev_days, 18, 0, 0)
int tz_offset_end_prev = tz_offset_input == 0 ? (is_dst(prev_year, prev_month, prev_days) ? -4 : -5) : tz_offset_input
string tz_end_prev = "UTC" + (tz_offset_end_prev >= 0 ? "+" + str.tostring(tz_offset_end_prev) : str.tostring(tz_offset_end_prev))
int previous_session_end = timestamp(tz_end_prev, prev_year, prev_month, prev_days, 16, 59, 0)
int previous_end_of_day = timestamp(tz_end_prev, prev_year, prev_month, prev_days, 23, 59, 0)
// Function to get end of current trading day
get_current_day_end() =>
int current_day = dayofmonth(time)
int current_month = month(time)
int current_year = year(time)
int tz_offset = tz_offset_input == 0 ? (is_dst(current_year, current_month, current_day) ? -4 : -5) : tz_offset_input
string tz = "UTC" + (tz_offset >= 0 ? "+" + str.tostring(tz_offset) : str.tostring(tz_offset))
timestamp(tz, current_year, current_month, current_day, 23, 59, 0)
// Function to calculate x2 for open extend
get_x2_open(int curr_year, int curr_month, int tz_offset_next, string tz_next, int session_end) =>
int add_months = 1
int new_month = curr_month + add_months
int new_year = curr_year + math.floor((new_month - 1)/12)
new_month := (new_month - 1) % 12 + 1
int new_days = array.get(daysInMonth, new_month)
if new_month == 2 and ((new_year % 4 == 0 and new_year % 100 != 0) or new_year % 400 == 0)
new_days := 29
int tz_offset_new = tz_offset_input == 0 ? (is_dst(new_year, new_month, new_days) ? -4 : -5) : tz_offset_input
string tz_new = "UTC" + (tz_offset_new >= 0 ? "+" + str.tostring(tz_offset_new) : str.tostring(tz_offset_new))
timestamp(tz_new, new_year, new_month, new_days, 16, 59, 0)
// Get timestamps for current
= get_session_info()
// Get timestamps for previous
= get_previous_session_info()
// Adjust start_time to next trading if not trading
if not is_trading(start_time)
start_time := get_next_bar_time(start_time)
if not is_trading(previous_start_time)
previous_start_time := get_next_bar_time(previous_start_time)
// Current 60min bar open
string curr_tz = get_tz(time)
int local_y = year(time, curr_tz)
int local_m = month(time, curr_tz)
int local_d = dayofmonth(time, curr_tz)
int local_h = hour(time, curr_tz)
int current_htf_open = timestamp(curr_tz, local_y, local_m, local_d, local_h, 0, 0)
// If current hour is non-trading, adjust to the previous trading hour
if not is_trading(current_htf_open)
int prev_ts = current_htf_open - 3600000
int iterations = 0
while not is_trading(prev_ts) and iterations < 100
prev_ts -= 3600000
iterations += 1
current_htf_open := prev_ts
// Calculate bars_back using day loop
string start_tz = get_tz(start_time)
int start_day_start = timestamp(start_tz, year(start_time, start_tz), month(start_time, start_tz), dayofmonth(start_time, start_tz), 0, 0, 0)
int current_day_start = timestamp(curr_tz, local_y, local_m, local_d, 0, 0, 0)
int bars_back = 0
if start_day_start == current_day_start
// same day
int start_hour = hour(start_time, start_tz)
int end_hour = hour(current_htf_open, curr_tz)
for h = start_hour to end_hour - 1
int h_ts = start_day_start + h * 3600000
if is_trading(h_ts)
bars_back += 1
else
// first day partial
int start_hour = hour(start_time, start_tz)
for h = start_hour to 23
int h_ts = start_day_start + h * 3600000
if is_trading(h_ts)
bars_back += 1
// full days
int next_day = start_day_start + 86400000
while next_day < current_day_start
bars_back += get_day_trading_bars(next_day)
next_day += 86400000
// last day partial
int end_hour = hour(current_htf_open, curr_tz)
for h = 0 to end_hour - 1
int h_ts = current_day_start + h * 3600000
if is_trading(h_ts)
bars_back += 1
bars_back := math.max(0, bars_back)
int length = bars_back + 1
if na(length) or length <= 0
length := 1
var float session_open = na
var float session_high = na
var float session_low = na
var float previous_session_open = na
var float previous_session_high = na
var float previous_session_low = na
session_open := request.security(syminfo.tickerid, "60", open , lookahead=barmerge.lookahead_on)
session_high := request.security(syminfo.tickerid, "60", ta.highest(high, length), lookahead=barmerge.lookahead_on)
session_low := request.security(syminfo.tickerid, "60", ta.lowest(low, length), lookahead=barmerge.lookahead_on)
int previous_length = calculate_trading_bars(previous_start_time, previous_session_end + 3600000)
int bars_back_prev_start = bars_back + previous_length
int bars_back_prev_end = bars_back + 1
previous_session_open := request.security(syminfo.tickerid, "60", open , lookahead=barmerge.lookahead_on)
previous_session_high := request.security(syminfo.tickerid, "60", ta.highest(high, previous_length) , lookahead=barmerge.lookahead_on)
previous_session_low := request.security(syminfo.tickerid, "60", ta.lowest(low, previous_length) , lookahead=barmerge.lookahead_on)
// Calculate main quadrant levels
float lower_range = session_open - session_low
float upper_range = session_high - session_open
float l25 = session_low + 0.25 * lower_range
float l50 = session_low + 0.5 * lower_range
float l75 = session_low + 0.75 * lower_range
float u25 = session_open + 0.25 * upper_range
float u50 = session_open + 0.5 * upper_range
float u75 = session_open + 0.75 * upper_range
float prev_lower_range = previous_session_open - previous_session_low
float prev_upper_range = previous_session_high - previous_session_open
float prev_l25 = previous_session_low + 0.25 * prev_lower_range
float prev_l50 = previous_session_low + 0.5 * prev_lower_range
float prev_l75 = previous_session_low + 0.75 * prev_lower_range
float prev_u25 = previous_session_open + 0.25 * prev_upper_range
float prev_u50 = previous_session_open + 0.5 * prev_upper_range
float prev_u75 = previous_session_open + 0.75 * prev_upper_range
// Quadrant visibility
bool show_q1 = true
bool show_q23 = true
bool show_q4 = true
if show_25_75
show_q23 := false
// Current drawings
var line low_line = na
var line l25_line = na
var line l50_line = na
var line l75_line = na
var line u25_line = na
var line u50_line = na
var line u75_line = na
var line uhigh_line = na
var line uq1_25_line = na
var line uq1_50_line = na
var line uq1_75_line = na
var line uq23_25_line = na
var line uq23_50_line = na
var line uq23_75_line = na
var line uq4_25_line = na
var line uq4_50_line = na
var line uq4_75_line = na
var line lq1_25_line = na
var line lq1_50_line = na
var line lq1_75_line = na
var line lq23_25_line = na
var line lq23_50_line = na
var line lq23_75_line = na
var line lq4_25_line = na
var line lq4_50_line = na
var line lq4_75_line = na
var box lower_q1_bottom_box = na
var box lower_q1_middle_box = na
var box lower_q1_top_box = na
var box lower_q23_box = na
var box lower_q4_bottom_box = na
var box lower_q4_middle_box = na
var box lower_q4_top_box = na
var box upper_q1_bottom_box = na
var box upper_q1_middle_box = na
var box upper_q1_top_box = na
var box upper_q23_box = na
var box upper_q4_bottom_box = na
var box upper_q4_middle_box = na
var box upper_q4_top_box = na
var line open_line = na
// Previous drawings
var line prev_low_line = na
var line prev_l25_line = na
var line prev_l50_line = na
var line prev_l75_line = na
var line prev_u25_line = na
var line prev_u50_line = na
var line prev_u75_line = na
var line prev_uhigh_line = na
var line prev_uq1_25_line = na
var line prev_uq1_50_line = na
var line prev_uq1_75_line = na
var line prev_uq23_25_line = na
var line prev_uq23_50_line = na
var line prev_uq23_75_line = na
var line prev_uq4_25_line = na
var line prev_uq4_50_line = na
var line prev_uq4_75_line = na
var line prev_lq1_25_line = na
var line prev_lq1_50_line = na
var line prev_lq1_75_line = na
var line prev_lq23_25_line = na
var line prev_lq23_50_line = na
var line prev_lq23_75_line = na
var line prev_lq4_25_line = na
var line prev_lq4_50_line = na
var line prev_lq4_75_line = na
var box prev_lower_q1_bottom_box = na
var box prev_lower_q1_middle_box = na
var box prev_lower_q1_top_box = na
var box prev_lower_q23_box = na
var box prev_lower_q4_bottom_box = na
var box prev_lower_q4_middle_box = na
var box prev_lower_q4_top_box = na
var box prev_upper_q1_bottom_box = na
var box prev_upper_q1_middle_box = na
var box prev_upper_q1_top_box = na
var box prev_upper_q23_box = na
var box prev_upper_q4_bottom_box = na
var box prev_upper_q4_middle_box = na
var box prev_upper_q4_top_box = na
var line prev_open_line = na
// Labels
var label curr_high_label = na
var label curr_low_label = na
var label curr_u25_label = na
var label curr_u50_label = na
var label curr_u75_label = na
var label curr_l25_label = na
var label curr_l50_label = na
var label curr_l75_label = na
var label prev_high_label = na
var label prev_low_label = na
var label prev_u25_label = na
var label prev_u50_label = na
var label prev_u75_label = na
var label prev_l25_label = na
var label prev_l50_label = na
var label prev_l75_label = na
bool show_current = not hide_current_until_end or time >= session_end
if barstate.islast
int x2 = get_current_day_end()
int open_x2 = x2
int x2_prev_main = extend_last ? get_current_day_end() : previous_end_of_day
int x2_prev_sub = extend_last and not extend_main_only ? get_current_day_end() : previous_end_of_day
int interval_seconds = na
if timeframe.isseconds
interval_seconds := timeframe.multiplier
else if timeframe.isminutes
interval_seconds := timeframe.multiplier * 60
else if timeframe.isdaily
interval_seconds := timeframe.multiplier * 86400
else if timeframe.isweekly
interval_seconds := timeframe.multiplier * 604800
else if timeframe.ismonthly
interval_seconds := timeframe.multiplier * 2592000
else
interval_seconds := timeframe.multiplier * 3600 // hours
int interval_ms = interval_seconds * 1000
int max_future_time = time + 500 * interval_ms
x2 := math.min(x2, max_future_time)
open_x2 := math.min(open_x2, max_future_time)
x2_prev_main := math.min(x2_prev_main, max_future_time)
x2_prev_sub := math.min(x2_prev_sub, max_future_time)
// Upper subquadrants
float uq1_range = u25 - session_open
float uq1_25 = session_open + 0.25 * uq1_range
float uq1_50 = session_open + 0.5 * uq1_range
float uq1_75 = session_open + 0.75 * uq1_range
float uq23_range = u75 - u25
float uq23_25 = u25 + 0.25 * uq23_range
float uq23_50 = u25 + 0.5 * uq23_range
float uq23_75 = u25 + 0.75 * uq23_range
float uq4_range = session_high - u75
float uq4_25 = u75 + 0.25 * uq4_range
float uq4_50 = u75 + 0.5 * uq4_range
float uq4_75 = u75 + 0.75 * uq4_range
// Lower subquadrants
float lq1_range = l25 - session_low
float lq1_25 = session_low + 0.25 * lq1_range
float lq1_50 = session_low + 0.5 * lq1_range
float lq1_75 = session_low + 0.75 * lq1_range
float lq23_range = l75 - l25
float lq23_25 = l25 + 0.25 * lq23_range
float lq23_50 = l25 + 0.5 * lq23_range
float lq23_75 = l25 + 0.75 * lq23_range
float lq4_range = session_open - l75
float lq4_25 = l75 + 0.25 * lq4_range
float lq4_50 = l75 + 0.5 * lq4_range
float lq4_75 = l75 + 0.75 * lq4_range
// Previous upper subquadrants
float prev_uq1_range = prev_u25 - previous_session_open
float prev_uq1_25 = previous_session_open + 0.25 * prev_uq1_range
float prev_uq1_50 = previous_session_open + 0.5 * prev_uq1_range
float prev_uq1_75 = previous_session_open + 0.75 * prev_uq1_range
float prev_uq23_range = prev_u75 - prev_u25
float prev_uq23_25 = prev_u25 + 0.25 * prev_uq23_range
float prev_uq23_50 = prev_u25 + 0.5 * prev_uq23_range
float prev_uq23_75 = prev_u25 + 0.75 * prev_uq23_range
float prev_uq4_range = previous_session_high - prev_u75
float prev_uq4_25 = prev_u75 + 0.25 * prev_uq4_range
float prev_uq4_50 = prev_u75 + 0.5 * prev_uq4_range
float prev_uq4_75 = prev_u75 + 0.75 * prev_uq4_range
// Previous lower subquadrants
float prev_lq1_range = prev_l25 - previous_session_low
float prev_lq1_25 = previous_session_low + 0.25 * prev_lq1_range
float prev_lq1_50 = previous_session_low + 0.5 * prev_lq1_range
float prev_lq1_75 = previous_session_low + 0.75 * prev_lq1_range
float prev_lq23_range = prev_l75 - prev_l25
float prev_lq23_25 = prev_l25 + 0.25 * prev_lq23_range
float prev_lq23_50 = prev_l25 + 0.5 * prev_lq23_range
float prev_lq23_75 = prev_l25 + 0.75 * prev_lq23_range
float prev_lq4_range = previous_session_open - prev_l75
float prev_lq4_25 = prev_l75 + 0.25 * prev_lq4_range
float prev_lq4_50 = prev_l75 + 0.5 * prev_lq4_range
float prev_lq4_75 = prev_l75 + 0.75 * prev_lq4_range
if na(low_line)
low_line := line.new(start_time, session_low, x2, session_low, color=lower_line_col, xloc=xloc.bar_time)
l25_line := line.new(start_time, l25, x2, l25, color=lower_line_col, xloc=xloc.bar_time)
l50_line := line.new(start_time, l50, x2, l50, color=lower_line_col, xloc=xloc.bar_time)
l75_line := line.new(start_time, l75, x2, l75, color=lower_line_col, xloc=xloc.bar_time)
u25_line := line.new(start_time, u25, x2, u25, color=upper_line_col, xloc=xloc.bar_time)
u50_line := line.new(start_time, u50, x2, u50, color=upper_line_col, xloc=xloc.bar_time)
u75_line := line.new(start_time, u75, x2, u75, color=upper_line_col, xloc=xloc.bar_time)
uhigh_line := line.new(start_time, session_high, x2, session_high, color=upper_line_col, xloc=xloc.bar_time)
uq1_25_line := line.new(start_time, uq1_25, x2, uq1_25, color=upper_line_col, xloc=xloc.bar_time)
uq1_50_line := line.new(start_time, uq1_50, x2, uq1_50, color=upper_line_col, xloc=xloc.bar_time)
uq1_75_line := line.new(start_time, uq1_75, x2, uq1_75, color=upper_line_col, xloc=xloc.bar_time)
uq23_25_line := line.new(start_time, uq23_25, x2, uq23_25, color=upper_line_col, xloc=xloc.bar_time)
uq23_50_line := line.new(start_time, uq23_50, x2, uq23_50, color=upper_line_col, xloc=xloc.bar_time)
uq23_75_line := line.new(start_time, uq23_75, x2, uq23_75, color=upper_line_col, xloc=xloc.bar_time)
uq4_25_line := line.new(start_time, uq4_25, x2, uq4_25, color=upper_line_col, xloc=xloc.bar_time)
uq4_50_line := line.new(start_time, uq4_50, x2, uq4_50, color=upper_line_col, xloc=xloc.bar_time)
uq4_75_line := line.new(start_time, uq4_75, x2, uq4_75, color=upper_line_col, xloc=xloc.bar_time)
lq1_25_line := line.new(start_time, lq1_25, x2, lq1_25, color=lower_line_col, xloc=xloc.bar_time)
lq1_50_line := line.new(start_time, lq1_50, x2, lq1_50, color=lower_line_col, xloc=xloc.bar_time)
lq1_75_line := line.new(start_time, lq1_75, x2, lq1_75, color=lower_line_col, xloc=xloc.bar_time)
lq23_25_line := line.new(start_time, lq23_25, x2, lq23_25, color=lower_line_col, xloc=xloc.bar_time)
lq23_50_line := line.new(start_time, lq23_50, x2, lq23_50, color=lower_line_col, xloc=xloc.bar_time)
lq23_75_line := line.new(start_time, lq23_75, x2, lq23_75, color=lower_line_col, xloc=xloc.bar_time)
lq4_25_line := line.new(start_time, lq4_25, x2, lq4_25, color=lower_line_col, xloc=xloc.bar_time)
lq4_50_line := line.new(start_time, lq4_50, x2, lq4_50, color=lower_line_col, xloc=xloc.bar_time)
lq4_75_line := line.new(start_time, lq4_75, x2, lq4_75, color=lower_line_col, xloc=xloc.bar_time)
lower_q1_bottom_box := box.new(start_time, session_open, x2, session_low, bgcolor=trans, border_color=na, xloc=xloc.bar_time)
lower_q1_middle_box := box.new(start_time, session_open, x2, session_low, bgcolor=trans, border_color=na, xloc=xloc.bar_time)
lower_q1_top_box := box.new(start_time, session_open, x2, session_low, bgcolor=trans, border_color=na, xloc=xloc.bar_time)
lower_q23_box := box.new(start_time, session_open, x2, session_low, bgcolor=trans, border_color=na, xloc=xloc.bar_time)
lower_q4_bottom_box := box.new(start_time, session_open, x2, session_low, bgcolor=trans, border_color=na, xloc=xloc.bar_time)
lower_q4_middle_box := box.new(start_time, session_open, x2, session_low, bgcolor=trans, border_color=na, xloc=xloc.bar_time)
lower_q4_top_box := box.new(start_time, session_open, x2, session_low, bgcolor=trans, border_color=na, xloc=xloc.bar_time)
upper_q1_bottom_box := box.new(start_time, session_high, x2, session_open, bgcolor=trans, border_color=na, xloc=xloc.bar_time)
upper_q1_middle_box := box.new(start_time, session_high, x2, session_open, bgcolor=trans, border_color=na, xloc=xloc.bar_time)
upper_q1_top_box := box.new(start_time, session_high, x2, session_open, bgcolor=trans, border_color=na, xloc=xloc.bar_time)
upper_q23_box := box.new(start_time, session_high, x2, session_open, bgcolor=trans, border_color=na, xloc=xloc.bar_time)
upper_q4_bottom_box := box.new(start_time, session_high, x2, session_open, bgcolor=trans, border_color=na, xloc=xloc.bar_time)
upper_q4_middle_box := box.new(start_time, session_high, x2, session_open, bgcolor=trans, border_color=na, xloc=xloc.bar_time)
upper_q4_top_box := box.new(start_time, session_high, x2, session_open, bgcolor=trans, border_color=na, xloc=xloc.bar_time)
open_line := line.new(start_time, session_open, open_x2, session_open, color=open_col, width = open_width, xloc=xloc.bar_time)
prev_low_line := line.new(previous_start_time, previous_session_low, x2_prev_main, previous_session_low, color=lower_line_col, xloc=xloc.bar_time)
prev_l25_line := line.new(previous_start_time, previous_session_low, x2_prev_main, previous_session_low, color=lower_line_col, xloc=xloc.bar_time)
prev_l50_line := line.new(previous_start_time, previous_session_low, x2_prev_main, previous_session_low, color=lower_line_col, xloc=xloc.bar_time)
prev_l75_line := line.new(previous_start_time, previous_session_low, x2_prev_main, previous_session_low, color=lower_line_col, xloc=xloc.bar_time)
prev_u25_line := line.new(previous_start_time, previous_session_high, x2_prev_main, previous_session_high, color=upper_line_col, xloc=xloc.bar_time)
prev_u50_line := line.new(previous_start_time, previous_session_high, x2_prev_main, previous_session_high, color=upper_line_col, xloc=xloc.bar_time)
prev_u75_line := line.new(previous_start_time, previous_session_high, x2_prev_main, previous_session_high, color=upper_line_col, xloc=xloc.bar_time)
prev_uhigh_line := line.new(previous_start_time, previous_session_high, x2_prev_main, previous_session_high, color=upper_line_col, xloc=xloc.bar_time)
prev_uq1_25_line := line.new(previous_start_time, previous_session_high, x2_prev_sub, previous_session_high, color=upper_line_col, xloc=xloc.bar_time)
prev_uq1_50_line := line.new(previous_start_time, previous_session_high, x2_prev_sub, previous_session_high, color=upper_line_col, xloc=xloc.bar_time)
prev_uq1_75_line := line.new(previous_start_time, previous_session_high, x2_prev_sub, previous_session_high, color=upper_line_col, xloc=xloc.bar_time)
prev_uq23_25_line := line.new(previous_start_time, previous_session_high, x2_prev_sub, previous_session_high, color=upper_line_col, xloc=xloc.bar_time)
prev_uq23_50_line := line.new(previous_start_time, previous_session_high, x2_prev_sub, previous_session_high, color=upper_line_col, xloc=xloc.bar_time)
prev_uq23_75_line := line.new(previous_start_time, previous_session_high, x2_prev_sub, previous_session_high, color=upper_line_col, xloc=xloc.bar_time)
prev_uq4_25_line := line.new(previous_start_time, previous_session_high, x2_prev_sub, previous_session_high, color=upper_line_col, xloc=xloc.bar_time)
prev_uq4_50_line := line.new(previous_start_time, previous_session_high, x2_prev_sub, previous_session_high, color=upper_line_col, xloc=xloc.bar_time)
prev_uq4_75_line := line.new(previous_start_time, previous_session_high, x2_prev_sub, previous_session_high, color=upper_line_col, xloc=xloc.bar_time)
prev_lq1_25_line := line.new(previous_start_time, previous_session_low, x2_prev_sub, previous_session_low, color=lower_line_col, xloc=xloc.bar_time)
prev_lq1_50_line := line.new(previous_start_time, previous_session_low, x2_prev_sub, previous_session_low, color=lower_line_col, xloc=xloc.bar_time)
prev_lq1_75_line := line.new(previous_start_time, previous_session_low, x2_prev_sub, previous_session_low, color=lower_line_col, xloc=xloc.bar_time)
prev_lq23_25_line := line.new(previous_start_time, previous_session_low, x2_prev_sub, previous_session_low, color=lower_line_col, xloc=xloc.bar_time)
prev_lq23_50_line := line.new(previous_start_time, previous_session_low, x2_prev_sub, previous_session_low, color=lower_line_col, xloc=xloc.bar_time)
prev_lq23_75_line := line.new(previous_start_time, previous_session_low, x2_prev_sub, previous_session_low, color=lower_line_col, xloc=xloc.bar_time)
prev_lq4_25_line := line.new(previous_start_time, previous_session_low, x2_prev_sub, previous_session_low, color=lower_line_col, xloc=xloc.bar_time)
prev_lq4_50_line := line.new(previous_start_time, previous_session_low, x2_prev_sub, previous_session_low, color=lower_line_col, xloc=xloc.bar_time)
prev_lq4_75_line := line.new(previous_start_time, previous_session_low, x2_prev_sub, previous_session_low, color=lower_line_col, xloc=xloc.bar_time)
prev_lower_q1_bottom_box := box.new(previous_start_time, previous_session_open, x2_prev_main, previous_session_low, bgcolor=trans, border_color=na, xloc=xloc.bar_time)
prev_lower_q1_middle_box := box.new(previous_start_time, previous_session_open, x2_prev_main, previous_session_low, bgcolor=trans, border_color=na, xloc=xloc.bar_time)
prev_lower_q1_top_box := box.new(previous_start_time, previous_session_open, x2_prev_main, previous_session_low, bgcolor=trans, border_color=na, xloc=xloc.bar_time)
prev_lower_q23_box := box.new(previous_start_time, previous_session_open, x2_prev_main, previous_session_low, bgcolor=trans, border_color=na, xloc=xloc.bar_time)
prev_lower_q4_bottom_box := box.new(previous_start_time, previous_session_open, x2_prev_main, previous_session_low, bgcolor=trans, border_color=na, xloc=xloc.bar_time)
prev_lower_q4_middle_box := box.new(previous_start_time, previous_session_open, x2_prev_main, previous_session_low, bgcolor=trans, border_color=na, xloc=xloc.bar_time)
prev_lower_q4_top_box := box.new(previous_start_time, previous_session_open, x2_prev_main, previous_session_low, bgcolor=trans, border_color=na, xloc=xloc.bar_time)
prev_upper_q1_bottom_box := box.new(previous_start_time, previous_session_high, x2_prev_main, previous_session_open, bgcolor=trans, border_color=na, xloc=xloc.bar_time)
prev_upper_q1_middle_box := box.new(previous_start_time, previous_session_high, x2_prev_main, previous_session_open, bgcolor=trans, border_color=na, xloc=xloc.bar_time)
prev_upper_q1_top_box := box.new(previous_start_time, previous_session_high, x2_prev_main, previous_session_open, bgcolor=trans, border_color=na, xloc=xloc.bar_time)
prev_upper_q23_box := box.new(previous_start_time, previous_session_high, x2_prev_main, previous_session_open, bgcolor=trans, border_color=na, xloc=xloc.bar_time)
prev_upper_q4_bottom_box := box.new(previous_start_time, previous_session_high, x2_prev_main, previous_session_open, bgcolor=trans, border_color=na, xloc=xloc.bar_time)
prev_upper_q4_middle_box := box.new(previous_start_time, previous_session_high, x2_prev_main, previous_session_open, bgcolor=trans, border_color=na, xloc=xloc.bar_time)
prev_upper_q4_top_box := box.new(previous_start_time, previous_session_high, x2_prev_main, previous_session_open, bgcolor=trans, border_color=na, xloc=xloc.bar_time)
prev_open_line := line.new(previous_start_time, previous_session_open, x2_prev_main, previous_session_open, color=open_col, width = open_width, xloc=xloc.bar_time)
curr_high_label := label.new(x2, session_high, "hl", style=label.style_label_left, color=trans, textcolor=upper_line_col, xloc=xloc.bar_time)
curr_low_label := label.new(x2, session_low, "hl", style=label.style_label_left, color=trans, textcolor=lower_line_col, xloc=xloc.bar_time)
curr_u25_label := label.new(x2, u25, "25%", style=label.style_label_left, color=trans, textcolor=upper_line_col, xloc=xloc.bar_time)
curr_u50_label := label.new(x2, u50, "50%", style=label.style_label_left, color=trans, textcolor=upper_line_col, xloc=xloc.bar_time)
curr_u75_label := label.new(x2, u75, "75%", style=label.style_label_left, color=trans, textcolor=upper_line_col, xloc=xloc.bar_time)
curr_l25_label := label.new(x2, l25, "75%", style=label.style_label_left, color=trans, textcolor=lower_line_col, xloc=xloc.bar_time)
curr_l50_label := label.new(x2, l50, "50%", style=label.style_label_left, color=trans, textcolor=lower_line_col, xloc=xloc.bar_time)
curr_l75_label := label.new(x2, l75, "25%", style=label.style_label_left, color=trans, textcolor=lower_line_col, xloc=xloc.bar_time)
prev_high_label := label.new(x2_prev_main, previous_session_high, "phl", style=label.style_label_left, color=trans, textcolor=upper_line_col, xloc=xloc.bar_time)
prev_low_label := label.new(x2_prev_main, previous_session_low, "phl", style=label.style_label_left, color=trans, textcolor=lower_line_col, xloc=xloc.bar_time)
prev_u25_label := label.new(x2_prev_main, prev_u25, "p25%", style=label.style_label_left, color=trans, textcolor=upper_line_col, xloc=xloc.bar_time)
prev_u50_label := label.new(x2_prev_main, prev_u50, "p50%", style=label.style_label_left, color=trans, textcolor=upper_line_col, xloc=xloc.bar_time)
prev_u75_label := label.new(x2_prev_main, prev_u75, "p75%", style=label.style_label_left, color=trans, textcolor=upper_line_col, xloc=xloc.bar_time)
prev_l25_label := label.new(x2_prev_main, prev_l25, "p75%", style=label.style_label_left, color=trans, textcolor=lower_line_col, xloc=xloc.bar_time)
prev_l50_label := label.new(x2_prev_main, prev_l50, "p50%", style=label.style_label_left, color=trans, textcolor=lower_line_col, xloc=xloc.bar_time)
prev_l75_label := label.new(x2_prev_main, prev_l75, "p25%", style=label.style_label_left, color=trans, textcolor=lower_line_col, xloc=xloc.bar_time)
// Update x2 for current
line.set_x2(low_line, x2)
line.set_x2(l25_line, x2)
line.set_x2(l50_line, x2)
line.set_x2(l75_line, x2)
line.set_x2(u25_line, x2)
line.set_x2(u50_line, x2)
line.set_x2(u75_line, x2)
line.set_x2(uhigh_line, x2)
line.set_x2(uq1_25_line, x2)
line.set_x2(uq1_50_line, x2)
line.set_x2(uq1_75_line, x2)
line.set_x2(uq23_25_line, x2)
line.set_x2(uq23_50_line, x2)
line.set_x2(uq23_75_line, x2)
line.set_x2(uq4_25_line, x2)
line.set_x2(uq4_50_line, x2)
line.set_x2(uq4_75_line, x2)
line.set_x2(lq1_25_line, x2)
line.set_x2(lq1_50_line, x2)
line.set_x2(lq1_75_line, x2)
line.set_x2(lq23_25_line, x2)
line.set_x2(lq23_50_line, x2)
line.set_x2(lq23_75_line, x2)
line.set_x2(lq4_25_line, x2)
line.set_x2(lq4_50_line, x2)
line.set_x2(lq4_75_line, x2)
line.set_x2(open_line, open_x2)
box.set_right(lower_q1_bottom_box, x2)
box.set_right(lower_q1_middle_box, x2)
box.set_right(lower_q1_top_box, x2)
box.set_right(lower_q23_box, x2)
box.set_right(lower_q4_bottom_box, x2)
box.set_right(lower_q4_middle_box, x2)
box.set_right(lower_q4_top_box, x2)
box.set_right(upper_q1_bottom_box, x2)
box.set_right(upper_q1_middle_box, x2)
box.set_right(upper_q1_top_box, x2)
box.set_right(upper_q23_box, x2)
box.set_right(upper_q4_bottom_box, x2)
box.set_right(upper_q4_middle_box, x2)
box.set_right(upper_q4_top_box, x2)
// Update x2 for previous
line.set_x2(prev_low_line, x2_prev_main)
line.set_x2(prev_l25_line, x2_prev_main)
line.set_x2(prev_l50_line, x2_prev_main)
line.set_x2(prev_l75_line, x2_prev_main)
line.set_x2(prev_u25_line, x2_prev_main)
line.set_x2(prev_u50_line, x2_prev_main)
line.set_x2(prev_u75_line, x2_prev_main)
line.set_x2(prev_uhigh_line, x2_prev_main)
line.set_x2(prev_uq1_25_line, x2_prev_sub)
line.set_x2(prev_uq1_50_line, x2_prev_sub)
line.set_x2(prev_uq1_75_line, x2_prev_sub)
line.set_x2(prev_uq23_25_line, x2_prev_sub)
line.set_x2(prev_uq23_50_line, x2_prev_sub)
line.set_x2(prev_uq23_75_line, x2_prev_sub)
line.set_x2(prev_uq4_25_line, x2_prev_sub)
line.set_x2(prev_uq4_50_line, x2_prev_sub)
line.set_x2(prev_uq4_75_line, x2_prev_sub)
line.set_x2(prev_lq1_25_line, x2_prev_sub)
line.set_x2(prev_lq1_50_line, x2_prev_sub)
line.set_x2(prev_lq1_75_line, x2_prev_sub)
line.set_x2(prev_lq23_25_line, x2_prev_sub)
line.set_x2(prev_lq23_50_line, x2_prev_sub)
line.set_x2(prev_lq23_75_line, x2_prev_sub)
line.set_x2(prev_lq4_25_line, x2_prev_sub)
line.set_x2(prev_lq4_50_line, x2_prev_sub)
line.set_x2(prev_lq4_75_line, x2_prev_sub)
line.set_x2(prev_open_line, x2_prev_main)
box.set_right(prev_lower_q1_bottom_box, x2_prev_main)
box.set_right(prev_lower_q1_middle_box, x2_prev_main)
box.set_right(prev_lower_q1_top_box, x2_prev_main)
box.set_right(prev_lower_q23_box, x2_prev_main)
box.set_right(prev_lower_q4_bottom_box, x2_prev_main)
box.set_right(prev_lower_q4_middle_box, x2_prev_main)
box.set_right(prev_lower_q4_top_box, x2_prev_main)
box.set_right(prev_upper_q1_bottom_box, x2_prev_main)
box.set_right(prev_upper_q1_middle_box, x2_prev_main)
box.set_right(prev_upper_q1_top_box, x2_prev_main)
box.set_right(prev_upper_q23_box, x2_prev_main)
box.set_right(prev_upper_q4_bottom_box, x2_prev_main)
box.set_right(prev_upper_q4_middle_box, x2_prev_main)
box.set_right(prev_upper_q4_top_box, x2_prev_main)
// Set line positions
line.set_y1(low_line, show_current ? session_low : na)
line.set_y2(low_line, show_current ? session_low : na)
line.set_y1(l25_line, show_current ? l25 : na)
line.set_y2(l25_line, show_current ? l25 : na)
line.set_y1(l50_line, show_current ? l50 : na)
line.set_y2(l50_line, show_current ? l50 : na)
line.set_y1(l75_line, show_current ? l75 : na)
line.set_y2(l75_line, show_current ? l75 : na)
line.set_y1(u25_line, show_current ? u25 : na)
line.set_y2(u25_line, show_current ? u25 : na)
line.set_y1(u50_line, show_current ? u50 : na)
line.set_y2(u50_line, show_current ? u50 : na)
line.set_y1(u75_line, show_current ? u75 : na)
line.set_y2(u75_line, show_current ? u75 : na)
line.set_y1(uhigh_line, show_current ? session_high : na)
line.set_y2(uhigh_line, show_current ? session_high : na)
line.set_y1(uq1_25_line, show_current and upper_subquadrants ? uq1_25 : na)
line.set_y2(uq1_25_line, show_current and upper_subquadrants ? uq1_25 : na)
line.set_y1(uq1_50_line, show_current and upper_subquadrants and not (show_25_75 and upper_top_low_subquadrants) ? uq1_50 : na)
line.set_y2(uq1_50_line, show_current and upper_subquadrants and not (show_25_75 and upper_top_low_subquadrants) ? uq1_50 : na)
line.set_y1(uq1_75_line, show_current and upper_subquadrants ? uq1_75 : na)
line.set_y2(uq1_75_line, show_current and upper_subquadrants ? uq1_75 : na)
line.set_y1(uq23_25_line, show_current and upper_subquadrants and not show_25_75 ? uq23_25 : na)
line.set_y2(uq23_25_line, show_current and upper_subquadrants and not show_25_75 ? uq23_25 : na)
line.set_y1(uq23_50_line, show_current and upper_subquadrants and not show_25_75 ? uq23_50 : na)
line.set_y2(uq23_50_line, show_current and upper_subquadrants and not show_25_75 ? uq23_50 : na)
line.set_y1(uq23_75_line, show_current and upper_subquadrants and not show_25_75 ? uq23_75 : na)
line.set_y2(uq23_75_line, show_current and upper_subquadrants and not show_25_75 ? uq23_75 : na)
line.set_y1(uq4_25_line, show_current and upper_subquadrants ? uq4_25 : na)
line.set_y2(uq4_25_line, show_current and upper_subquadrants ? uq4_25 : na)
line.set_y1(uq4_50_line, show_current and upper_subquadrants and not (show_25_75 and upper_top_low_subquadrants) ? uq4_50 : na)
line.set_y2(uq4_50_line, show_current and upper_subquadrants and not (show_25_75 and upper_top_low_subquadrants) ? uq4_50 : na)
line.set_y1(uq4_75_line, show_current and upper_subquadrants ? uq4_75 : na)
line.set_y2(uq4_75_line, show_current and upper_subquadrants ? uq4_75 : na)
line.set_y1(lq1_25_line, show_current and lower_subquadrants ? lq1_25 : na)
line.set_y2(lq1_25_line, show_current and lower_subquadrants ? lq1_25 : na)
line.set_y1(lq1_50_line, show_current and lower_subquadrants and not (show_25_75 and lower_top_low_subquadrants) ? lq1_50 : na)
line.set_y2(lq1_50_line, show_current and lower_subquadrants and not (show_25_75 and lower_top_low_subquadrants) ? lq1_50 : na)
line.set_y1(lq1_75_line, show_current and lower_subquadrants ? lq1_75 : na)
line.set_y2(lq1_75_line, show_current and lower_subquadrants ? lq1_75 : na)
line.set_y1(lq23_25_line, show_current and lower_subquadrants and not show_25_75 ? lq23_25 : na)
line.set_y2(lq23_25_line, show_current and lower_subquadrants and not show_25_75 ? lq23_25 : na)
line.set_y1(lq23_50_line, show_current and lower_subquadrants and not show_25_75 ? lq23_50 : na)
line.set_y2(lq23_50_line, show_current and lower_subquadrants and not show_25_75 ? lq23_50 : na)
line.set_y1(lq23_75_line, show_current and lower_subquadrants and not show_25_75 ? lq23_75 : na)
line.set_y2(lq23_75_line, show_current and lower_subquadrants and not show_25_75 ? lq23_75 : na)
line.set_y1(lq4_25_line, show_current and lower_subquadrants ? lq4_25 : na)
line.set_y2(lq4_25_line, show_current and lower_subquadrants ? lq4_25 : na)
line.set_y1(lq4_50_line, show_current and lower_subquadrants and not (show_25_75 and lower_top_low_subquadrants) ? lq4_50 : na)
line.set_y2(lq4_50_line, show_current and lower_subquadrants and not (show_25_75 and lower_top_low_subquadrants) ? lq4_50 : na)
line.set_y1(lq4_75_line, show_current and lower_subquadrants ? lq4_75 : na)
line.set_y2(lq4_75_line, show_current and lower_subquadrants ? lq4_75 : na)
line.set_y1(open_line, show_current ? session_open : na)
line.set_y2(open_line, show_current ? session_open : na)
// Set previous line positions
line.set_y1(prev_low_line, previous_session_low)
line.set_y2(prev_low_line, previous_session_low)
line.set_y1(prev_l25_line, prev_l25)
line.set_y2(prev_l25_line, prev_l25)
line.set_y1(prev_l50_line, prev_l50)
line.set_y2(prev_l50_line, prev_l50)
line.set_y1(prev_l75_line, prev_l75)
line.set_y2(prev_l75_line, prev_l75)
line.set_y1(prev_u25_line, prev_u25)
line.set_y2(prev_u25_line, prev_u25)
line.set_y1(prev_u50_line, prev_u50)
line.set_y2(prev_u50_line, prev_u50)
line.set_y1(prev_u75_line, prev_u75)
line.set_y2(prev_u75_line, prev_u75)
line.set_y1(prev_uhigh_line, previous_session_high)
line.set_y2(prev_uhigh_line, previous_session_high)
line.set_y1(prev_uq1_25_line, upper_subquadrants ? prev_uq1_25 : na)
line.set_y2(prev_uq1_25_line, upper_subquadrants ? prev_uq1_25 : na)
line.set_y1(prev_uq1_50_line, upper_subquadrants and not (show_25_75 and upper_top_low_subquadrants) ? prev_uq1_50 : na)
line.set_y2(prev_uq1_50_line, upper_subquadrants and not (show_25_75 and upper_top_low_subquadrants) ? prev_uq1_50 : na)
line.set_y1(prev_uq1_75_line, upper_subquadrants ? prev_uq1_75 : na)
line.set_y2(prev_uq1_75_line, upper_subquadrants ? prev_uq1_75 : na)
line.set_y1(prev_uq23_25_line, upper_subquadrants and not show_25_75 ? prev_uq23_25 : na)
line.set_y2(prev_uq23_25_line, upper_subquadrants and not show_25_75 ? prev_uq23_25 : na)
line.set_y1(prev_uq23_50_line, upper_subquadrants and not show_25_75 ? prev_uq23_50 : na)
line.set_y2(prev_uq23_50_line, upper_subquadrants and not show_25_75 ? prev_uq23_50 : na)
line.set_y1(prev_uq23_75_line, upper_subquadrants and not show_25_75 ? prev_uq23_75 : na)
line.set_y2(prev_uq23_75_line, upper_subquadrants and not show_25_75 ? prev_uq23_75 : na)
line.set_y1(prev_uq4_25_line, upper_subquadrants ? prev_uq4_25 : na)
line.set_y2(prev_uq4_25_line, upper_subquadrants ? prev_uq4_25 : na)
line.set_y1(prev_uq4_50_line, upper_subquadrants and not (show_25_75 and upper_top_low_subquadrants) ? prev_uq4_50 : na)
line.set_y2(prev_uq4_50_line, upper_subquadrants and not (show_25_75 and upper_top_low_subquadrants) ? prev_uq4_50 : na)
line.set_y1(prev_uq4_75_line, upper_subquadrants ? prev_uq4_75 : na)
line.set_y2(prev_uq4_75_line, upper_subquadrants ? prev_uq4_75 : na)
line.set_y1(prev_lq1_25_line, lower_subquadrants ? prev_lq1_25 : na)
line.set_y2(prev_lq1_25_line, lower_subquadrants ? prev_lq1_25 : na)
line.set_y1(prev_lq1_50_line, lower_subquadrants and not (show_25_75 and lower_top_low_subquadrants) ? prev_lq1_50 : na)
line.set_y2(prev_lq1_50_line, lower_subquadrants and not (show_25_75 and lower_top_low_subquadrants) ? prev_lq1_50 : na)
line.set_y1(prev_lq1_75_line, lower_subquadrants ? prev_lq1_75 : na)
line.set_y2(prev_lq1_75_line, lower_subquadrants ? prev_lq1_75 : na)
line.set_y1(prev_lq23_25_line, lower_subquadrants and not show_25_75 ? prev_lq23_25 : na)
line.set_y2(prev_lq23_25_line, lower_subquadrants and not show_25_75 ? prev_lq23_25 : na)
line.set_y1(prev_lq23_50_line, lower_subquadrants and not show_25_75 ? prev_lq23_50 : na)
line.set_y2(prev_lq23_50_line, lower_subquadrants and not show_25_75 ? prev_lq23_50 : na)
line.set_y1(prev_lq23_75_line, lower_subquadrants and not show_25_75 ? prev_lq23_75 : na)
line.set_y2(prev_lq23_75_line, lower_subquadrants and not show_25_75 ? prev_lq23_75 : na)
line.set_y1(prev_lq4_25_line, lower_subquadrants ? prev_lq4_25 : na)
line.set_y2(prev_lq4_25_line, lower_subquadrants ? prev_lq4_25 : na)
line.set_y1(prev_lq4_50_line, lower_subquadrants and not (show_25_75 and lower_top_low_subquadrants) ? prev_lq4_50 : na)
line.set_y2(prev_lq4_50_line, lower_subquadrants and not (show_25_75 and lower_top_low_subquadrants) ? prev_lq4_50 : na)
line.set_y1(prev_lq4_75_line, lower_subquadrants ? prev_lq4_75 : na)
line.set_y2(prev_lq4_75_line, lower_subquadrants ? prev_lq4_75 : na)
line.set_y1(prev_open_line, previous_session_open)
line.set_y2(prev_open_line, previous_session_open)
// Set box positions
box.set_bottom(lower_q1_bottom_box, session_low)
box.set_top(lower_q1_bottom_box, lq1_25)
box.set_bottom(lower_q1_middle_box, lq1_25)
box.set_top(lower_q1_middle_box, lq1_75)
box.set_bottom(lower_q1_top_box, lq1_75)
box.set_top(lower_q1_top_box, l25)
box.set_bottom(lower_q23_box, l25)
box.set_top(lower_q23_box, l75)
box.set_bottom(lower_q4_bottom_box, l75)
box.set_top(lower_q4_bottom_box, lq4_25)
box.set_bottom(lower_q4_middle_box, lq4_25)
box.set_top(lower_q4_middle_box, lq4_75)
box.set_bottom(lower_q4_top_box, lq4_75)
box.set_top(lower_q4_top_box, session_open)
box.set_bottom(upper_q1_bottom_box, session_open)
box.set_top(upper_q1_bottom_box, uq1_25)
box.set_bottom(upper_q1_middle_box, uq1_25)
box.set_top(upper_q1_middle_box, uq1_75)
box.set_bottom(upper_q1_top_box, uq1_75)
box.set_top(upper_q1_top_box, u25)
box.set_bottom(upper_q23_box, u25)
box.set_top(upper_q23_box, u75)
box.set_bottom(upper_q4_bottom_box, u75)
box.set_top(upper_q4_bottom_box, uq4_25)
box.set_bottom(upper_q4_middle_box, uq4_25)
box.set_top(upper_q4_middle_box, uq4_75)
box.set_bottom(upper_q4_top_box, uq4_75)
box.set_top(upper_q4_top_box, session_high)
// Set previous box positions
box.set_bottom(prev_lower_q1_bottom_box, previous_session_low)
box.set_top(prev_lower_q1_bottom_box, prev_lq1_25)
box.set_bottom(prev_lower_q1_middle_box, prev_lq1_25)
box.set_top(prev_lower_q1_middle_box, prev_lq1_75)
box.set_bottom(prev_lower_q1_top_box, prev_lq1_75)
box.set_top(prev_lower_q1_top_box, prev_l25)
box.set_bottom(prev_lower_q23_box, prev_l25)
box.set_top(prev_lower_q23_box, prev_l75)
box.set_bottom(prev_lower_q4_bottom_box, prev_l75)
box.set_top(prev_lower_q4_bottom_box, prev_lq4_25)
box.set_bottom(prev_lower_q4_middle_box, prev_lq4_25)
box.set_top(prev_lower_q4_middle_box, prev_lq4_75)
box.set_bottom(prev_lower_q4_top_box, prev_lq4_75)
box.set_top(prev_lower_q4_top_box, previous_session_open)
box.set_bottom(prev_upper_q1_bottom_box, previous_session_open)
box.set_top(prev_upper_q1_bottom_box, prev_uq1_25)
box.set_bottom(prev_upper_q1_middle_box, prev_uq1_25)
box.set_top(prev_upper_q1_middle_box, prev_uq1_75)
box.set_bottom(prev_upper_q1_top_box, prev_uq1_75)
box.set_top(prev_upper_q1_top_box, prev_u25)
box.set_bottom(prev_upper_q23_box, prev_u25)
box.set_top(prev_upper_q23_box, prev_u75)
box.set_bottom(prev_upper_q4_bottom_box, prev_u75)
box.set_top(prev_upper_q4_bottom_box, prev_uq4_25)
box.set_bottom(prev_upper_q4_middle_box, prev_uq4_25)
box.set_top(prev_upper_q4_middle_box, prev_uq4_75)
box.set_bottom(prev_upper_q4_top_box, prev_uq4_75)
box.set_top(prev_upper_q4_top_box, previous_session_high)
// Set box colors
box.set_bgcolor(lower_q1_bottom_box, show_current and show_q1 ? lower_bg_col : trans)
box.set_bgcolor(lower_q1_middle_box, show_current and show_q1 and not (show_25_75 and lower_top_low_subquadrants) ? lower_bg_col : trans)
box.set_bgcolor(lower_q1_top_box, show_current and show_q1 ? lower_bg_col : trans)
box.set_bgcolor(lower_q23_box, show_current and show_q23 ? lower_bg_col : trans)
box.set_bgcolor(lower_q4_bottom_box, show_current and show_q4 ? lower_bg_col : trans)
box.set_bgcolor(lower_q4_middle_box, show_current and show_q4 and not (show_25_75 and lower_top_low_subquadrants) ? lower_bg_col : trans)
box.set_bgcolor(lower_q4_top_box, show_current and show_q4 ? lower_bg_col : trans)
box.set_bgcolor(upper_q1_bottom_box, show_current and show_q1 ? upper_bg_col : trans)
box.set_bgcolor(upper_q1_middle_box, show_current and show_q1 and not (show_25_75 and upper_top_low_subquadrants) ? upper_bg_col : trans)
box.set_bgcolor(upper_q1_top_box, show_current and show_q1 ? upper_bg_col : trans)
box.set_bgcolor(upper_q23_box, show_current and show_q23 ? upper_bg_col : trans)
box.set_bgcolor(upper_q4_bottom_box, show_current and show_q4 ? upper_bg_col : trans)
box.set_bgcolor(upper_q4_middle_box, show_current and show_q4 and not (show_25_75 and upper_top_low_subquadrants) ? upper_bg_col : trans)
box.set_bgcolor(upper_q4_top_box, show_current and show_q4 ? upper_bg_col : trans)
// Set previous box colors
box.set_bgcolor(prev_lower_q1_bottom_box, extend_main_only ? trans : (show_q1 ? lower_bg_col : trans))
box.set_bgcolor(prev_lower_q1_middle_box, extend_main_only ? trans : (show_q1 and not (show_25_75 and lower_top_low_subquadrants) ? lower_bg_col : trans))
box.set_bgcolor(prev_lower_q1_top_box, extend_main_only ? trans : (show_q1 ? lower_bg_col : trans))
box.set_bgcolor(prev_lower_q23_box, extend_main_only ? trans : (show_q23 ? lower_bg_col : trans))
box.set_bgcolor(prev_lower_q4_bottom_box, extend_main_only ? trans : (show_q4 ? lower_bg_col : trans))
box.set_bgcolor(prev_lower_q4_middle_box, extend_main_only ? trans : (show_q4 and not (show_25_75 and lower_top_low_subquadrants) ? lower_bg_col : trans))
box.set_bgcolor(prev_lower_q4_top_box, extend_main_only ? trans : (show_q4 ? lower_bg_col : trans))
box.set_bgcolor(prev_upper_q1_bottom_box, extend_main_only ? trans : (show_q1 ? upper_bg_col : trans))
box.set_bgcolor(prev_upper_q1_middle_box, extend_main_only ? trans : (show_q1 and not (show_25_75 and upper_top_low_subquadrants) ? upper_bg_col : trans))
box.set_bgcolor(prev_upper_q1_top_box, extend_main_only ? trans : (show_q1 ? upper_bg_col : trans))
box.set_bgcolor(prev_upper_q23_box, extend_main_only ? trans : (show_q23 ? upper_bg_col : trans))
box.set_bgcolor(prev_upper_q4_bottom_box, extend_main_only ? trans : (show_q4 ? upper_bg_col : trans))
box.set_bgcolor(prev_upper_q4_middle_box, extend_main_only ? trans : (show_q4 and not (show_25_75 and upper_top_low_subquadrants) ? upper_bg_col : trans))
box.set_bgcolor(prev_upper_q4_top_box, extend_main_only ? trans : (show_q4 ? upper_bg_col : trans))
// Update labels
label.set_x(curr_high_label, x2)
label.set_y(curr_high_label, show_current ? session_high : na)
label.set_x(curr_low_label, x2)
label.set_y(curr_low_label, show_current ? session_low : na)
label.set_x(curr_u25_label, x2)
label.set_y(curr_u25_label, show_current ? u25 : na)
label.set_x(curr_u50_label, x2)
label.set_y(curr_u50_label, show_current ? u50 : na)
label.set_x(curr_u75_label, x2)
label.set_y(curr_u75_label, show_current ? u75 : na)
label.set_x(curr_l25_label, x2)
label.set_y(curr_l25_label, show_current ? l25 : na)
label.set_x(curr_l50_label, x2)
label.set_y(curr_l50_label, show_current ? l50 : na)
label.set_x(curr_l75_label, x2)
label.set_y(curr_l75_label, show_current ? l75 : na)
label.set_x(prev_high_label, x2_prev_main)
label.set_y(prev_high_label, extend_last ? previous_session_high : na)
label.set_x(prev_low_label, x2_prev_main)
label.set_y(prev_low_label, extend_last ? previous_session_low : na)
label.set_x(prev_u25_label, x2_prev_main)
label.set_y(prev_u25_label, extend_last ? prev_u25 : na)
label.set_x(prev_u50_label, x2_prev_main)
label.set_y(prev_u50_label, extend_last ? prev_u50 : na)
label.set_x(prev_u75_label, x2_prev_main)
label.set_y(prev_u75_label, extend_last ? prev_u75 : na)
label.set_x(prev_l25_label, x2_prev_main)
label.set_y(prev_l25_label, extend_last ? prev_l25 : na)
label.set_x(prev_l50_label, x2_prev_main)
label.set_y(prev_l50_label, extend_last ? prev_l50 : na)
label.set_x(prev_l75_label, x2_prev_main)
label.set_y(prev_l75_label, extend_last ? prev_l75 : na)
// Alarm conditions for current session
if enable_alarms and alarm_curr
if low <= u25 and high >= u25
alert("Price touched current upper 25%")
if low <= u50 and high >= u50
alert("Price touched current upper 50%")
if low <= u75 and high >= u75
alert("Price touched current upper 75%")
if low <= l25 and high >= l25
alert("Price touched current lower 75%")
if low <= l50 and high >= l50
alert("Price touched current lower 50%")
if low <= l75 and high >= l75
alert("Price touched current lower 25%")
// Alarm conditions for previous session
if enable_alarms and alarm_prev
if low <= previous_session_high and high >= previous_session_high
alert("Price touched previous high")
if low <= previous_session_low and high >= previous_session_low
alert("Price touched previous low")
if low <= prev_u25 and high >= prev_u25
alert("Price touched previous upper 25%")
if low <= prev_u50 and high >= prev_u50
alert("Price touched previous upper 50%")
if low <= prev_u75 and high >= prev_u75
alert("Price touched previous upper 75%")
if low <= prev_l25 and high >= prev_l25
alert("Price touched previous lower 75%")
if low <= prev_l50 and high >= prev_l50
alert("Price touched previous lower 50%")
if low <= prev_l75 and high >= prev_l75
alert("Price touched previous lower 25%")
if low <= previous_session_open and high >= previous_session_open
alert("Price touched previous open")
Effort HeatmapThe Effort Heatmap visualizes where meaningful, same-direction volume occurred inside an imbalance during strong directional movement.
Instead of analyzing total bar volume or traditional volume-at-price distributions, this tool reconstructs a simplified internal volume profile using lower-timeframe data.
When a Fair Value Gap forms during a high-volume displacement, the script highlights the portions of the imbalance candle where directional effort was concentrated and projects those regions forward as a heatmap.
The purpose of this indicator is not to predict price or represent institutional activity, but to offer a visual way to study how the market delivered volume inside a move that created an imbalance.
How It Works
1. Lower-Timeframe Volume Extraction
The indicator retrieves open, close, and volume data from a selected lower timeframe.
Only sub-candles that move in the same direction as the previous bar are considered, ensuring the heatmap reflects directional effort—not mixed volume.
2. Candle Body Binning
The FVG candle is divided into multiple horizontal bins.
Each lower-timeframe sub-candle contributes volume proportionally to the bins it overlaps, creating a vertical volume distribution for that bar.
3. Imbalance (FVG) Detection
A simple 3-bar displacement logic detects bullish or bearish imbalances.
An optional Z-Score filter ensures the heatmap only forms when volume is relatively elevated compared to recent history.
4. Heatmap Projection
When a qualifying imbalance occurs:
• The FVG bar’s volume distribution is normalized
• Only areas with relatively elevated volume are displayed
• Colored heatmap boxes are created and extend forward
• These boxes remain until price trades into or through them
This allows traders to observe how price interacts with past zones of concentrated directional effort.
What Makes It Different
Most volume tools focus on fixed session profiles, market-wide volume-at-price calculations, or bar-level volume totals.
The Effort Heatmap instead reconstructs a per-bar vertical volume distribution using lower-timeframe price action and displays it only when displacement occurs.
Rather than treating the candle as a single block of volume, the indicator highlights where inside the candle body volume was delivered while moving in the displacement direction.
This creates a unique visualization of directional effort that conventional profiles, OB/FVG indicators, and classic oscillators do not show.
How to Use It
1. Apply to any timeframe: The indicator works on all chart timeframes, but gains more detail when higher timeframes are used in combination with lower-timeframe volume data.
2. Identify displacement moments: When a bullish or bearish FVG forms with a high volume Z-Score, the heatmap will appear.
3. Observe the heatmap structure:
Each horizontal band represents the relative concentration of same-direction volume inside the previous candle.
4. Watch how price interacts with these zones:
Heatmap areas extend until price touches or trades through them, at which point they stop extending and are finalized.
5. Combine with your own analysis:
These areas can be used to study...
...how past directional volume clusters influence current movement
...structural reactions to zones of prior effort
...which parts of a displacement candle were most active
The indicator is a visual study tool, not a signal generator.
Settings
• Volume Source Timeframe
Chooses the lower timeframe used to reconstruct internal volume. Smaller timeframes give more detail; larger timeframes give smoother profiles.
• Z-Score Lookback
Controls how many bars are used to measure relative volume. Larger values make the volume filter stricter.
• Z-Score Threshold
Minimum relative-volume strength required to draw a heatmap. Higher values show only high-effort moves.
• Volume Filter (%)
Removes weaker bins based on how much volume they contain compared to the strongest one. Higher percentages = fewer but more meaningful zones.
• Bullish / Bearish Colors
Sets the base color for heatmap boxes depending on direction.
HTF/LTF BoxesHTF/LTF Boxes - Multi-Timeframe Range Indicator
A comprehensive multi-timeframe visualization tool that displays up to two independently configurable Higher Timeframe (HTF) boxes with quarterly divisions, customizable Lower Timeframe (LTF) session boxes within HTF ranges, a dedicated opening candle tracker, and HOD/LOD percentage labels.
Key features include:
Dual HTF boxes with open/close/midline levels and optional quarterly time divisions
LTF session boxes with open/close/mid lines and 0.10% extension marks (calculated from box high/low)
Dynamic or static border coloring for bullish/bearish candles
Session-based opening candle highlighting with extension options
Real-time HOD/LOD tracking with percentage-from-open labels
Ideal for traders who need clear visual reference points across multiple timeframes for entries, exits, and key intraday levels.
ZeroTolerance v1Testing only do not use.
VWAP wave. With notifications. Clean set ups. Highlights key areas for swing.
TopGainers Hunter - Volume (Lite)TopGainers Hunter™ develops premium TradingView indicators built for momentum, volatility, and real intraday structure — not predictions or repainting tricks.
Our scripts are engineered from real trading experience, clean code, and practical performance. Whether you are new or advanced, our tools simplify complex markets into clear, actionable decisions. Learn more at 👉 TopGainersHunter.com
✨ TopGainers Hunter – Volume (Lite)
Simple. Clean. Essential volume clarity.
TopGainers Hunter – Volume (Lite) is a minimalist volume tool designed for traders who want fast, readable volume data without the clutter of standard histograms.
This indicator separates volume into two color-coded components:
Green = Buy volume (bullish candles)
Red = Sell volume (bearish candles)
And for quick trend recognition, a white line tracks average volume, helping you instantly see when activity is expanding or fading.
Perfect for:
Momentum traders
Breakout & continuation traders
New traders learning market structure
Anyone who wants a cleaner volume panel
Why this Lite version helps
Many traders overlook volume because histogram bars are noisy and visually overwhelming. This tool fixes that by simplifying volume into a clean, readable display you can trust at a glance.
Features
Clear BUY/SELL color separation
Clean average volume line (white)
No fluff, no extra logic — just what matters
Works on all timeframes and instruments
A simple but powerful tool for understanding market participation.
🔗 Premium Tool
Want the full continuation-momentum system?
Check out TopGainers Hunter™ – White Diamond Momentum Signal at:
www.TopGainersHunter.com
MMS 9/21/50/200 Alignment - EMA9This indicator, used to analyze moving average alignment, would consist of four simple moving averages of 9, 21, 50, and 200 periods. It would generate an alert when these averages are sequentially aligned in ascending or descending order according to price movement, thus indicating a strong trend in the asset's market.
Intellect V01 For Dhan Users - Algo TradeThis Strategy Will give Auto Signals for Buy Sell and Exit. This is Specially made for Nifty/ Banknifty Options Buying. This is Simple & More Powerful Strategy.
Dhan Users Can Directly Link with Their Account thru Webhook for ALGO Trading
Financial Stress Conditions Proxy | QuantLapse📘 Financial Stress Conditions Proxy | QuantLapse
Overview:
The Financial Stress Conditions Proxy (FSCP) by QuantLapse is a multi-factor quantitative indicator that measures systemic financial stress across key macro and liquidity benchmarks.
By blending the High-Yield Spread (BAMLH0A0HYM2), Volatility Index (VIX), Secured Overnight Financing Rate (SOFR), and Reverse Repo Operations (RRPONTSYD) into a unified z-score model, this tool visualizes the market’s underlying tension and relief cycles — conditions often associated with risk-off capitulation and market bottoms.
Each component is normalized via a z-score transformation to express how far current readings deviate from historical means, then averaged into a composite “Financial Stress Score.” The result is a dynamic, color-coded column plot that shifts hue as systemic risk compresses or expands.
Purpose
I built this model to track stress inflection points in the global financial system — particularly to identify moments when macro fear, liquidity withdrawal, and volatility compression converge.
These events often precede bottoming phases across risk assets such as equities and crypto.
The indicator serves as a quantitative proxy for the psychological extremes of the market:
Red tones (high stress): systemic strain, deleveraging, or panic phases — potential long-term opportunity zones.
Yellow-green transition: normalization, improving liquidity conditions.
Blue-teal range: stability and low-stress periods — often mid-cycle.
High Stress zones (Quantitative Tightening) -> Red and Orange
Neutral Zones -> Green and Yellow
Low Stress Zone (Quantitative Easing) --> Green to Blue
How It Works
Inputs & Data Sources
BAMLH0A0HYM2 → High-Yield Corporate Bond Spread (credit stress).
VIX → Implied volatility (equity market fear).
SOFR → Funding rate indicator (short-term liquidity).
RRPONTSYD → Reverse repo operations (systemic liquidity absorption).
Normalization Process
Each data stream is smoothed using a user-defined moving average and standard deviation window (default 150 periods).
A z-score is computed:
𝑍=𝑋−Mean/Standard Deviation
The four z-scores are averaged to produce a single composite stress score.
Color Encoding
The composite score is segmented into 16 calibrated stress bands (from +1.6 to −1.6).
Each band corresponds to a color — red at the top for maximum stress, shifting to bright greens and teals as stress subsides.
Colors are assigned dynamically to the plotted columns, creating an intuitive “heat bar” of systemic tension over time.
Interpretation
Rising, bright red columns: liquidity tightening, macro uncertainty, or panic — potential market bottom zones when fear peaks.
Fading yellow → green: stabilization, easing conditions, and early recovery.
Cool blue/teal tones: complacency or extended calm — often late-cycle risk.
Use the FSCP as a macro overlay, not a direct buy/sell trigger.
Its purpose is to provide environmental context — showing when the market is collectively stressed versus when liquidity and confidence return.
Trading Applications
Bottom Detection:
Historically, sustained red/orange conditions have coincided with market capitulation (macro or crypto bottoms).
Watch for color transitions from red → orange → yellow as potential recovery signals.
Risk Management:
Avoid leverage or high exposure when the score is rising rapidly into red zones.
Gradually scale exposure as colors normalize.
Macro Confirmation Tool:
Combine with RSI, breadth indicators, or on-chain data to confirm reversals.
Works well on daily or weekly timeframes for swing and position traders.
Customization
Adjustable lookback periods for mean and standard deviation (default 150).
Works on all markets (equities, crypto, forex) since it sources macroeconomic benchmarks directly.
Can be layered with volatility or liquidity indicators for confirmation.
Why I Built It (originality)
Markets bottom when fear meets exhaustion.
I wanted a tool that quantified that fear in real-time — not by price patterns, but by systemic stress itself.
By merging credit risk, volatility, funding rates, and central bank operations, this model provides a quantitative heartbeat of the financial system — and it visually shows when that heartbeat skips a beat.
In my own trading, I use FSCP to identify macro dislocations and liquidity events that typically precede large recoveries.
It’s not about prediction — it’s about positioning yourself when the system is stretched too far.
Best Practices
Use on higher-timeframe charts (D/W) for context.
Combine with your technical system for entries/exits.
Treat extreme stress as potential accumulation zones, not immediate buy signals.
Allow several sessions of color normalization before confirming reversals.
Disclaimer
This indicator is for educational and research purposes only.
It is not financial advice and does not guarantee future results. Always combine with your own analysis and risk controls before trading decisions.
Summary
The Financial Stress Conditions Proxy translates complex inter-market data into an easy-to-read, color-coded stress bar.
It visually captures the emotional and systemic pulse of global markets — helping traders recognize when panic is peaking and opportunity is quietly forming.
Use it as your quant compass for navigating bottoms in volatile markets.
SMC + KCIndicator Introduction
This script is a unique "hybrid" analysis tool, combining the core elements of "Smart Money Concepts" (SMC) with the classic "Keltner Channels" (KC).
The SMC components are responsible for drawing the market's "structural map," helping you understand the "Why" behind price movements—the hunt for liquidity and the filling of market imbalances.
The KC component provides a volatility-based "dynamic envelope," helping you identify "What" state the market is in—calm, consolidating, trending, or in an extreme overbought/oversold condition.
Core Components (SMC)
Market Structure: Automatically marks "Internal" and "Swing" (External) structures, identifying "Break of Structure" (BOS) and "Change of Character" (CHOCH).
Order Blocks (OB): Automatically draws Internal and Swing Bullish/Bearish Order Blocks, which are key institutional support/resistance zones.
Liquidity:
Equal Highs/Lows (EQH/EQL): Marks "Relative Equal Highs/Lows" as liquidity magnets.
Strong/Weak Highs/Lows (S/W Highs/Lows): Displays the strong and weak swing points in line with the trend.
MTF Highs/Lows: Allows you to plot Daily, Weekly, and Monthly high/low levels on your chart.
Fair Value Gaps (FVG): Auto-identifies market imbalances, which act as potential price targets or pullback S/R zones.
Premium & Discount Zones: Based on the latest swing structure, this divides the price range into expensive "Premium" zones (good for shorts) and cheap "Discount" zones (good for longs).
Core Component (Keltner Channels - KC)
Keltner Channels:
Middle Band (KC1 Middle): A 50-period EMA (by default), acting as the dynamic trend axis (the mean).
KC1 Channels (Upper/Lower): 2.75x ATR from the middle band. Represents the "standard" volatility range.
KC2 Channels (Upper/Lower): 3.75x ATR from the middle band. Represents the "extreme" volatility range. Price hitting this level suggests a potential overbought or oversold state.
2. Operational Suggestions & Strategies (SMC + KC Fusion)
The essence of this indicator is to use SMC to define direction and zones, and use KC to time entries and gauge risk.
1. Strategy 1: KC as "Value Confluence" Filter (Pro-Trend)
This is the highest probability use: combining the SMC concept of "Discount/Premium" with the KC concept of "Oversold/Overbought."
Long Signal Example:
SMC Trend: Market is in a bullish trend (e.g., a series of bullish BOS on the 4H chart).
SMC Zone: Price pulls back into a Discount Zone.
SMC POI: Within this Discount Zone, there is an unmitigated Bullish Order Block or FVG.
KC Confluence (The Key): As price enters this SMC POI, it simultaneously touches or briefly breaks the KC1 Lower Band (2.75 ATR).
Signal Read: This signal is extremely strong. It means price has not only reached a structural SMC support level but is also statistically "oversold" (too far from its mean).
Entry: Drop to a Lower Timeframe (LTF) and wait for an SMC CHOCH to confirm the reversal before entering.
Target: Target the KC1 Upper Band (as a first target), and then the SMC upside liquidity (like an EQH).
2. Strategy 2: KC as "Extreme Reversal" Detector (Counter-Trend/Sweep)
SMC traders pay close attention to "sweeps" of key liquidity (like EQH/EQL). The Keltner Channels can quantify the "extreme" nature of that sweep.
Short Signal Example:
SMC Sweep: Price runs up and sweeps an important EQH (Equal Highs) or a Weekly High.
KC Extreme: While sweeping this liquidity, price violently breaks and closes outside the KC2 Upper Band (3.75 ATR).
Signal Read: The market has not only taken liquidity but has also reached a state of extreme volatility exhaustion. This suggests the price is unsustainable, and a reversal is highly probable.
Entry: Immediately look for a bearish CHOCH on the LTF. Once confirmed, enter short.
Target: Target the KC1 Middle Band (reversion to the mean), and then the first major SMC downside target (like an FVG).
3. Strategy 3: KC as "Trend Confirmation" Tool
An SMC Break of Structure (BOS) is key, but some are false. KC can help filter.
Filtering BOS:
A strong, valid BOS (e.g., bullish BOS) is often accompanied by price breaking the KC1 Upper Band, showing strong momentum and volatility expansion.
If price makes a BOS but fails to reach the KC1 Upper Band, or even struggles at the Middle Band, this may be a "weak BOS," signaling a lack of momentum and a higher chance of a deep pullback.
Riding the Trend:
In a strong SMC bull trend, price should consistently respect and stay above the KC1 Middle Band (50 EMA). Every pullback to this middle band that holds is an SMC trend continuation signal.
J&C Indicator 20/40 MA4H SMA Signal Map (20/40) Strategy
Timeframe: 4-Hour
Overview:
This is a momentum-based trend confirmation system using dual moving averages. The strategy identifies potential entry points when price action aligns with moving average positioning.
LONG Signal:
Triggers when the market demonstrates bullish momentum with price confirming an upside breakout while both moving averages are in a favorable uptrend alignment.
SHORT Signal:
Triggers when the market demonstrates bearish momentum with price confirming a downside breakdown while both moving averages are in a favorable downtrend alignment.
Key Features:
Uses a 20-period and 40-period simple moving average on the 4-hour timeframe
Filters out false signals by requiring multi-factor confirmation
Generates clear visual alerts with background highlighting
Real-time dashboard showing current MA values and trend direction
Sound/notification alerts for immediate signal awareness
Best Used For:
Swing trading on higher timeframes with proper risk management and support from additional confluence factors on your trading setup.
super smc1. Indicator Introduction
This indicator (smc) is a powerful, integrated "Smart Money Concepts" (SMC) analysis tool. It is designed to automatically identify and chart all the core elements that SMC traders rely on to analyze market structure, liquidity, and key price levels.
Unlike tools based on traditional indicators (like MAs, RSI), this indicator focuses purely on price action and market structure. It is not a direct "Buy/Sell" signal indicator, but rather a "market mapping" tool to help you see the footprints left by institutional funds (i.e., "Smart Money").
The indicator includes the following core components:
Market Structure:
Internal vs. External Structure: Automatically marks major "External" swing structures and minor "Internal" swing structures.
BOS / CHOCH: Automatically labels "Break of Structure" (BOS) and "Change of Character" (CHOCH) on the chart, which are essential for judging trend continuation or reversal.
Equal Highs/Lows (EQH / EQL): Automatically identifies "Relative Equal Highs" and "Relative Equal Lows," which act as "magnets" for liquidity.
Swing Points: Marks the high and low points that define the market structure.
Order Blocks (OB):
Automatically draws Bullish and Bearish Order Blocks (OBs). These are the last buying/selling zones before a strong price push, often acting as key future support or resistance.
Breaker Blocks (BB):
Automatically identifies "Breaker Blocks" (BBs). This is an Order Block that failed to hold price, was broken, and subsequently "inverts" to become new resistance/support. (Note: The script's comments mistranslate this as "Bollinger Bands," but its function is that of an SMC "Breaker Block").
Liquidity:
Marks key Swing Highs and Swing Lows as liquidity pools. Price is often drawn to "sweep" these levels.
Fair Value Gaps (FVG):
Automatically identifies and draws FVGs (or Market Imbalances). These are "vacuum" zones left by rapid, one-sided price moves, which price has a high probability of refilling in the future.
Auto Trendlines:
Draws trendlines and parallel channels based on swing points. This helps identify "Trendline Liquidity"—a target that SMC traders expect to be swept.
Multi-Timeframe (MTF) Functionality:
Virtually all components support MTF settings, allowing you to see Order Blocks, FVGs, and Structures from a Higher Timeframe (e.g., 4H) on your current chart (e.g., 15M). This is absolutely central to SMC analysis.
2. Operational Suggestions & Advanced Strategy (The SMC Method)
The core of SMC is "trading with the trend" and understanding why price moves—to seek liquidity.
1. The Core Philosophy: Top-Down Analysis
Establish HTF Narrative (Macro Direction):
Timeframe: 4-Hour (4H) / Daily (D)
Action: Use the "Market Structure" feature to determine the macro trend. Is the market in a series of upward "BOS" (bullish) or downward "BOS" (bearish)?
Find Your HTF Point of Interest (POI):
Timeframe: 4H / 1H
Action: Following the macro trend, wait for a pullback. Look for a high-probability "Point of Interest" (POI).
High-Probability POI = An unmitigated Order Block (OB) + An unmitigated Fair Value Gap (FVG) combined.
Secondary POI = A standalone OB or FVG, or a Breaker Block (BB).
Wait for Liquidity Sweep:
Timeframe: 1H / 15M
Action: This is key. Before price enters your HTF POI, does it "sweep" a nearby liquidity point (e.g., an internal low or "Equal Lows" EQL)?
"Liquidity Sweep -> Entry into POI" is a very strong confirmation signal that the market has "fueled up" and is ready to reverse.
Get Your LTF Confirmation:
Timeframe: 15M / 5M / 1M
Action: NEVER enter blindly just because price touches the HTF POI. Drop to a Lower Timeframe (LTF) and wait for a "Change of Character" (CHOCH).
Example: Price hits your 4H Bullish OB (your HTF POI). On the 5M chart, price was in a downtrend (making Lower Lows, LL). When the price breaks above the last Lower High (LH) on the 5M chart, the indicator will mark a bullish CHOCH.
The Entry:
Timeframe: 15M / 5M
Action: After the LTF CHOCH, the reversal is confirmed. Now, wait for a small pullback to the newly-formed LTF POI (e.g., the 5M Order Block or FVG that caused the CHOCH), and enter there.
2. Trade Strategy Example (Long)
Macro (4H): Market structure is bullish. The indicator is printing a series of BOS to the upside on the 4H chart.
POI (4H): Price pulls back. You identify an unmitigated 4H Order Block below (drawn automatically).
Sweep (1H): Price falls, and before entering the 4H OB, it first sweeps a 1H swing low (Liquidity is taken).
Confirmation (5M): Price taps into the 4H OB and bounces. On the 5M chart, it breaks the last swing high of the pullback. The indicator marks a green CHOCH.
Entry (5M): Wait for price to pull back to the 5M Order Block that caused the 5M CHOCH.
Stop-Loss: Place your stop below the low of the 4H OB or the 5M swing low.
Take-Profit: Target upside liquidity—the 4H Relative Equal Highs (EQH) or the next Bearish FVG.
ATR or % Based Trailing Stop for Delta Exchange (trade_crush)This indicator calculates and visually displays a dynamic trailing stop line on the chart based on either the Average True Range (ATR) or a fixed percentage of the current close price. Designed especially for futures or crypto traders using Delta Exchange, it helps determine where to place trailing stop loss orders to manage risk effectively.
Proyeccion Cuantitativa 6m - 3 escenarios“The chart displays three 6-month projected price paths based on trend and volatility: a conservative lower curve, a moderate expected path, and an aggressive upper scenario.”
MultiSymbol StochRSI+LinReg Scanner (3/5/10m) - 6 symbols (v6)3 5 10 dk aralığında en dip seviyede RSI en düşük iken alarm veren gösterge
TopGainers Hunter - Simple Moving Averages (Lite)TopGainers Hunter™ develops premium TradingView indicators built for momentum, volatility, and real intraday structure — not predictions or repainting tricks.
Our scripts are engineered from real trading experience, clean code, and practical performance. Whether you are new or advanced, our tools simplify complex markets into clear, actionable decisions. Learn more at 👉 www.TopGainersHunter.com
TopGainers Hunter – Simple Moving Averages (Lite)
A clean, beginner-friendly moving averages overlay designed to give traders a clear visual understanding of market structure without unnecessary clutter.
This lightweight version includes the most commonly used SMAs: 8, 13, 20, 50, 100, 200, plus an optional 20 EMA — all color-coded by slope for instant trend recognition. This is a simple, but yet powerful tool that would help lots of new traders to navigate the way. Before my time when I first started trading, long ago, there were no free-clean Moving Averages indicators like this exist. If they do, we would have to pay for them, $50/month just to use it. There were other free ones, but you would have to add 3-5 indicators just to get all the relevant moving averages in one place: 8, 13, 20, 50, 100 & 200. Good luck to your new journey and I hope this helps.
Why this tool helps traders
Most beginners struggle with messy charts and confusing indicators.
This script 100% user ready & right out the box by giving you:
✔ Clean, color-coded moving averages
✔ Quick visual confirmation of trend direction
✔ Easy identification of pullbacks & momentum shifts
✔ No signals or alerts — just structure and clarity
✔ Suitable for any timeframe or asset class
Whether you scalp, day trade, or swing trade, this tool helps you stay aligned with the trend and avoid fighting the larger move.
Included Moving Averages
8 SMA – short-term aggressiveness
13 SMA – micro-trend smoother
20 SMA – core momentum line
50 SMA – major institutional trend
100 SMA – long-term structure
200 SMA – market regime indicator
20 EMA – optional fast trend reactiveness
All lines use adaptive slope-based colors so you can instantly see whether momentum is positive, negative, or neutral.
Perfect for:
New traders learning market structure
Traders who want a clean chart
Anyone who needs a simple, fast trend visualization
Crypto, stocks, forex, futures — everything works
⭐ About the Author
This indicator is part of the TopGainers Hunter ecosystem — a collection of tools designed for clarity, momentum detection, and smart intraday decision-making.
⭐ Looking for the full momentum system?
TopGainers Hunter™ – White Diamond Momentum System
A continuation-momentum detector built to catch explosive moves on the day’s strongest Top Gainers.
Invite-only access available at
👉 www.TopGainersHunter.com
One signal. Pure continuation. No alert = no trade.
Liquidity Sweep This indicator is a precision ICT Liquidity Sweep Detector. It:
✔ Finds real swing highs and lows
✔ Detects true stop runs
✔ Verifies strong wick rejection
✔ Confirms reversals
✔ Filters out weak/noisy wicks
✔ Avoids repeated/clustered sweeps
✔ Shows only the best most recent sweep
✔ Displays arrow + label + line cleanly
Firegenie Gold BotHow It Works
This stripped-back version of my "Vantage" indicator logic is designed to do one thing well: identify high-quality momentum breaks on XAUUSD and trade them with disciplined risk management. Almost all the complexity of the full algorithm has been removed so users can see the core idea clearly.
The core concept
The bot waits for signs that gold has just made a strong push into a fresh extreme during the active session and may be ready to snap back. When a valid setup appears, the bot prepares a trade with predefined stop loss and take profit levels based on volatility (ATR). If price confirms the reversal, it enters automatically and manages the exit.
It never overtrades, it never fights momentum blindly, and it does not chase entries. One or two trades per day maximum.
________________________________________
1. Session logic
The bot divides the day into two parts:
• Pre-session (1800–0345 London time)
No trades allowed. It simply looks at how price behaved during this quiet period and decides whether the general drift was bullish or bearish.
• Active session (everything outside pre-session)
This is where trading is allowed. The bot resets its internal counters and keeps track of the highs and lows made during the session.
Only the active session produces trades.
________________________________________
2. When it looks for a trade
A potential setup can only form when:
• the bot is not already in a trade
• the daily limit (max 2 positions) has not been reached
• the current day is not blocked due to major events (FOMC, holidays, etc.)
• price is making a fresh high or low relative to recent bars
• volatility is elevated (using a Williams Vix-Fix style calculation)
• short-term and medium-term EMAs agree on direction
The bot isn’t trying to predict tops or bottoms blindly. It waits for:
A strong push into a fresh extreme, combined with a volatility spike that often marks exhaustion.
This is the heart of the strategy.
________________________________________
3. How entries actually trigger
The bot prepares a setup as soon as the push candle qualifies, but it does not enter immediately. The entry only triggers if price retraces back through the open of the setup candle.
In other words:
• Long entry: price must dip below the setup candle’s open
• Short entry: price must rise above the setup candle’s open
This prevents chasing. It forces the bot to buy low after a high-volatility push down, or sell high after a high-volatility push up.
If price never retraces through the setup level, no entry is taken.
________________________________________
4. Stop loss and take profit
Stops and targets are dynamic.
• Stop loss: ATR × fixed multiplier
• Take profit: reward-to-risk (1.8R in this version)
• TP zone: 90 percent of TP, used for early break-even logic
• Break-even: if price moves far enough towards target, the stop is pulled to entry
Everything is placed the moment the trade triggers, and the bot manages it from there.
________________________________________
5. Trade management
Once a trade is active, the bot monitors four things:
1. Full TP hit
2. TP-zone hit + break-even activated
3. Stop loss hit
4. Emergency stop (rare edge case)
When the bot exits, it logs key stats and won’t re-enter until conditions reset.
________________________________________
6. Daily rhythm
The bot is built around discipline, not activity.
• Up to two positions per day.
• Only during the active session.
• Never trades during pre-session.
• Avoids known high-risk days entirely.
• Each closed trade updates win/loss/breakeven counts and streaks.
This helps keep results stable and avoids death by overtrading.
________________________________________
7. What the user sees on the chart
You’ll see:
• Entry flags
• Take profit markers
• Stop loss crosses
• Lines for SL, TP, BE-threshold, open-level
• A simple stats panel summarising performance
It’s designed to be easy to follow visually, even if you ignore the hundreds of lines powering the engine.
________________________________________
This version of the bot:
identifies high-volatility exhaustion at fresh extremes, waits for a confirmation retrace, enters with volatility-based risk, and exits cleanly with fixed rules.
It’s a simplified expression of the Vantage philosophy:
trade fewer setups, trade only the cleanest reversals, and let discipline do the heavy lifting.
Wolfe Wave PatternHello All!
For a while now, some of my followers have been asking me to develop Wolfe Wave Pattern . Here it's at your service as open-source and public indicator.
How it works?
- On each bar/tick it checks zigzag waves by using base period and updates the array that is used to keep zigzag levels and locations. Base period in the settings is the minimum zigzag period
- Then it searches if there is new bullish/bearish Wolfe Wave pattern according to last wave direction
- Before searching the pattern it calculates all possible 1234 waves. So any wave in 12345 uses base period or higher. it means that it search all possible candidates. This algorithm is much better than using a few zigzag periods.
- After getting all possible candidates, it checks if any of the found candidates is suitable for Wolfe Wave pattern and keeps them in a matrix
- if there are suitable candidate(s) it shows the latest one and triggers the alert
- it also follows the targets and if the price hits any of the target it extends the line and trigger the alert
- it doesn't check if any of the patterns hits stop-loss.
Options:
Base Period: minimum period to create the zigzag
Error Rate: there are usually so few perfect patterns, so we better consider deviation. if error rate is low than it finds less pattern with more accuracy, if error rate is high than it finds more pattern with less accuracy
- The other options are used for coloring the patterns and lines
Some examples:
P.S. I didn't have enough time to test the indicator, so please drop a comment if you see any issue while using it
Enjoy!





















