SWEEP HTF CANDLE - BY LIONLEE - 0792281999// This source code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org
// © CandelaCharts
//@version=6
indicator("CandelaCharts - HTF Sweeps", shorttitle = "CandelaCharts - HTF Sweeps", overlay = true, max_lines_count = 500, max_labels_count = 500, max_boxes_count = 500, max_bars_back = 500, max_polylines_count = 100)
// # ========================================================================= #
// # | Colors |
// # ========================================================================= #
//#region
// # Core -------------------------------------------------------------------- #
colors_white = color.white
colors_black = color.black
colors_purple = color.purple
colors_red = color.red
colors_gray = color.gray
colors_blue = color.blue
colors_orange = color.orange
colors_green = color.green
color_transparent = #ffffff00
//#endregion
// # ========================================================================= #
// # | End |
// # ========================================================================= #
// # ========================================================================= #
// # | Inputs |
// # ========================================================================= #
//#region
// # General ----------------------------------------------------------------- #
general_font = input.string("Monospace", "Text ", options = , inline = "1.0", group = "General")
general_text = input.string("Tiny", "", options = , inline = "1.0", group = "General")
general_brand_show = input.bool(false, "Hide Brand", group = "General")
htf_sweeps_tf_1_show = input.bool(true, "HTF I ", inline = "1.0", group = "Timeframes")
htf_sweeps_tf_1_tf = input.timeframe("15", "", inline = "1.0", group = "Timeframes")
htf_sweeps_tf_1_number = input.int(10, "", inline = "1.0", group = "Timeframes", minval = 1, maxval = 60)
htf_sweeps_tf_1_map = input.bool(false, "M", inline = "1.0", group = "Timeframes", tooltip = "Map this HTF to LTF")
htf_sweeps_tf_2_show = input.bool(true, "HTF II ", inline = "2.0", group = "Timeframes")
htf_sweeps_tf_2_tf = input.timeframe("60", "", inline = "2.0", group = "Timeframes")
htf_sweeps_tf_2_number = input.int(8, "", inline = "2.0", group = "Timeframes", minval = 1, maxval = 60)
htf_sweeps_tf_2_map = input.bool(true, "M", inline = "2.0", group = "Timeframes")
htf_sweeps_tf_3_show = input.bool(true, "HTF III ", inline = "3.0", group = "Timeframes")
htf_sweeps_tf_3_tf = input.timeframe("240", "", inline = "3.0", group = "Timeframes")
htf_sweeps_tf_3_number = input.int(6, "", inline = "3.0", group = "Timeframes", minval = 1, maxval = 60)
htf_sweeps_tf_3_map = input.bool(false, "M", inline = "3.0", group = "Timeframes")
htf_sweeps_tf_4_show = input.bool(true, "HTF IV ", inline = "4.0", group = "Timeframes")
htf_sweeps_tf_4_tf = input.timeframe("1D", "", inline = "4.0", group = "Timeframes")
htf_sweeps_tf_4_number = input.int(4, "", inline = "4.0", group = "Timeframes", minval = 1, maxval = 60)
htf_sweeps_tf_4_map = input.bool(false, "M", inline = "4.0", group = "Timeframes")
htf_sweeps_tf_5_show = input.bool(true, "HTF V ", inline = "5.0", group = "Timeframes")
htf_sweeps_tf_5_tf = input.timeframe("1W", "", inline = "5.0", group = "Timeframes")
htf_sweeps_tf_5_number = input.int(2, "", inline = "5.0", group = "Timeframes", minval = 1, maxval = 60)
htf_sweeps_tf_5_map = input.bool(false, "M", inline = "5.0", group = "Timeframes")
htf_sweeps_tf_6_show = input.bool(false, "HTF VI ", inline = "6.0", group = "Timeframes")
htf_sweeps_tf_6_tf = input.timeframe("1M", "", inline = "6.0", group = "Timeframes")
htf_sweeps_tf_6_number = input.int(1, "", inline = "6.0", group = "Timeframes", minval = 1, maxval = 60)
htf_sweeps_tf_6_map = input.bool(false, "M", inline = "6.0", group = "Timeframes")
htf_sweeps_bull_color = input.color(colors_green, "Coloring ", inline = "1.0", group = "HTF")
htf_sweeps_bear_color = input.color(colors_black, "", inline = "1.0", group = "HTF")
htf_sweeps_wick_border_color = input.color(colors_black, "", inline = "1.0", group = "HTF")
htf_sweeps_offset = input.int(10, "Offset ", minval = 1, inline = "2.0", group = "HTF", tooltip = "The distance from the current chart candles.")
htf_sweeps_space = input.int(1, "Space ", minval = 1, inline = "3.0", maxval = 4, group = "HTF", tooltip = "Space between candles")
htf_sweeps_margin = input.int(10, "Margin ", minval = 1, inline = "4.0", group = "HTF", tooltip = "The distance between HTF group candles.")
htf_sweeps_candle_width = input.string("Small", "Size ", inline = "5.0", group = "HTF", options = , tooltip = "Candle size")
htf_sweeps_label_show = input.bool(true, "Labels ", inline = "6.0", group = "HTF")
htf_sweeps_label_size = input.string("Large", "", inline = "6.0", group = "HTF", options = )
htf_sweeps_label_position = input.string("Top", "", inline = "6.0", group = "HTF", options = , tooltip = " - Size of the label - Position of the label - Text color of the label")
htf_sweeps_label_color = input.color(colors_black, "", inline = "6.0", group = "HTF")
// htf_sweeps_bias_show = input.bool(true, "Bias ", inline = "6.0", group = "HTF")
// htf_sweeps_bias_bull_color = input.color(colors_green, "", inline = "6.0", group = "HTF")
// htf_sweeps_bias_bear_color = input.color(colors_red, "", inline = "6.0", group = "HTF")
// htf_sweeps_time_show = input.bool(true, "Time ", inline = "7.0", group = "HTF")
// htf_sweeps_time_color = input.color(colors_gray, "", inline = "7.0", group = "HTF")
htf_sweeps_ltf_trace_h_l_show = input.bool(true, "H/L Line ", inline = "1.0", group="LTF")
htf_sweeps_ltf_trace_h_l_style = input.string('····', '', options = , inline = "1.0", group="LTF")
htf_sweeps_ltf_trace_h_l_width = input.int(1, '', inline = "1.0", minval = 0, maxval = 4, group="LTF")
htf_sweeps_ltf_trace_h_l_color = input.color(color.new(colors_gray, 50), "", inline = "1.0", group="LTF")
htf_sweeps_ltf_trace_o_c_line_show = input.bool(true, "O/C Line ", inline = "2.0", group = "LTF")
htf_sweeps_ltf_trace_o_c_line_style = input.string('⎯⎯⎯', "", options = , inline = "2.0", group = "LTF")
htf_sweeps_ltf_trace_o_c_line_width = input.int(1, '', inline = "2.0", minval = 0, maxval = 4, group = "LTF")
htf_sweeps_ltf_trace_o_c_line_color = input.color(color.new(colors_gray, 50), "", inline = "2.0", group = "LTF")
htf_sweeps_sweep_show = input.bool(true, "Sweep ", inline = "1.0", group = "Sweep")
htf_sweeps_sweep_ltf_show = input.bool(true, "LTF ", inline = "1.0", group = "Sweep")
htf_sweeps_sweep_htf_show = input.bool(true, "HTF", inline = "1.0", group = "Sweep", tooltip = "Show sweeps. - Show sweeps on LTF. - Show sweeps on HTF.")
htf_sweeps_sweep_line_style = input.string('⎯⎯⎯', " ", options = , inline = "1.1", group = "Sweep")
htf_sweeps_sweep_line_width = input.int(1, '', inline = "1.1", group = "Sweep")
htf_sweeps_sweep_line_color = input.color(colors_black, "", inline = "1.1", group = "Sweep")
htf_sweeps_i_sweep_show = input.bool(false, "I-sweep ", inline = "2.0", group = "Sweep")
htf_sweeps_i_sweep_ltf_show = input.bool(true, "LTF ", inline = "2.0", group = "Sweep")
htf_sweeps_i_sweep_htf_show = input.bool(true, "HTF", inline = "2.0", group = "Sweep", tooltip = "Show invalidated sweeps. - Show invalidated sweeps on LTF. - Show invalidated sweeps on HTF.")
htf_sweeps_i_sweep_line_style = input.string('----', " ", options = , inline = "2.1", group = "Sweep")
htf_sweeps_i_sweep_line_width = input.int(1, '', inline = "2.1", group = "Sweep")
htf_sweeps_i_sweep_line_color = input.color(colors_gray, "", inline = "2.1", group = "Sweep")
htf_sweeps_real_time_sweep_show = input.bool(false, "Real-time", inline = "3.0", group = "Sweep", tooltip = "Control visibility of Real-time Sweeps on LTF and HTF")
// htf_sweeps_dashboard_info_show = input.bool(true, "Panel ", inline = "1.0", group = "Dashboard")
// htf_sweeps_dashboard_info_position = input.string("Bottom Center", "", options = , inline = "1.0", group = "Dashboard", tooltip = "The dashboard will display only the HTF that is mapped to LTF")
htf_sweeps_alerts_sweep_formation = input.bool(false, "Sweep Formation", inline = "1.0", group = "Alerts")
htf_sweeps_alerts_sweep_invalidation = input.bool(false, "Sweep Invalidation", inline = "2.0", group = "Alerts")
//#endregion
// # ========================================================================= #
// # | End |
// # ========================================================================= #
// # ========================================================================= #
// # | UDTs |
// # ========================================================================= #
//#region
type UDT_Store
line bin_ln
box bin_box
label bin_lbl
polyline bin_polyline
type UDT_Sweep
string tf
int x1
float y
int x2
bool bull
// sweep is invalidated
bool invalidated = false
// id of htf candle, that invalidated sweep
int invalidated_on
// if sweep is invalidated on candle that forms a sweep, then sweep will be removed
bool removed = false
// mark sweep as formed after last candle that forms a sweep is closed and sweep was not invalidated
bool formed = false
type UDT_HTF_Candle
int num
int index
string tf
// real coordinates of HTF candle
float o
float c
float h
float l
int o_idx
int c_idx
int h_idx
int l_idx
int ot
int ct
// position of HTF candle on chart
int candle_left
int candle_rigth
float candle_top
float candle_bottom
int wick_x
int shift
bool is_closed
array htf_sweeps
array ltf_sweeps
bool bull
bool bull_sweep
bool bear_sweep
//#endregion
// # ========================================================================= #
// # | End |
// # ========================================================================= #
// # ========================================================================= #
// # | Bin |
// # ========================================================================= #
//#region
var UDT_Store bin = UDT_Store.new(
bin_ln = array.new()
, bin_box = array.new()
, bin_lbl = array.new()
, bin_polyline = array.new()
)
method clean_bin(UDT_Store store) =>
for obj in store.bin_ln
obj.delete()
for obj in store.bin_box
obj.delete()
for obj in store.bin_lbl
obj.delete()
for obj in store.bin_polyline
obj.delete()
store.bin_ln.clear()
store.bin_box.clear()
store.bin_lbl.clear()
store.bin_polyline.clear()
//#endregion
// # ========================================================================= #
// # | End |
// # ========================================================================= #
// # ========================================================================= #
// # | Functions |
// # ========================================================================= #
//#region
method text_size(string size) =>
out = switch size
"Tiny" => size.tiny
"Small" => size.small
"Normal" => size.normal
"Large" => size.large
"Huge" => size.huge
"Auto" => size.auto
out
method line_style(string style) =>
out = switch style
'⎯⎯⎯' => line.style_solid
'----' => line.style_dashed
'····' => line.style_dotted
method font_style(string font) =>
out = switch font
'Default' => font.family_default
'Monospace' => font.family_monospace
method candle_size(string size) =>
out = switch size
'Tiny' => 2
'Small' => 4
'Medium' => 6
'Large' => 8
'Huge' => 10
out
method tf_label(string tf) =>
tfl = tf
if tfl == ''
tfl := timeframe.period
out = switch tfl
'1' => '1m'
'2' => '2m'
'3' => '3m'
'5' => '5m'
'10' => '10m'
'15' => '15m'
'20' => '20m'
'30' => '30m'
'45' => '45m'
'60' => '1H'
'90' => '90m'
'120' => '2H'
'180' => '3H'
'240' => '4H'
'480' => '8H'
'540' => '9H'
'720' => '12H'
=> tfl
out
const string default_tz = "America/New_York"
var string htf_sweeps_tz = default_tz
get_short_dayofweek(int d) =>
switch d
dayofweek.monday => 'MON'
dayofweek.tuesday => 'TUE'
dayofweek.wednesday => 'WED'
dayofweek.thursday => 'THU'
dayofweek.friday => 'FRI'
dayofweek.saturday => 'SAT'
dayofweek.sunday => 'SUN'
=> ''
get_week_of_month(int t) =>
y = year(t)
m = month(t)
d = dayofmonth(t)
// Timestamp of first day of the same month
firstDay = timestamp(y, m, 1, 0, 0)
// Day of month index starting from 0 → (0–30)
dayIndex = d - 1
// Week index starting from 0 → (0–4)
weekIndex = int(dayIndex / 7)
// Week number starting from 1 → (1–5)
str.tostring(weekIndex + 1)
get_short_month(int t) =>
var string months = array.from(
"JAN", "FEB", "MAR", "APR", "MAY", "JUN",
"JUL", "AUG", "SEP", "OCT", "NOV", "DEC")
m = month(t)
m >= 1 and m <= array.size(months) ? array.get(months, m - 1) : ""
method candle_time_label(UDT_HTF_Candle candle) =>
string lbl = ""
if timeframe.in_seconds(candle.tf) >= timeframe.in_seconds("12M")
lbl := str.format_time(candle.ot, "yyyy", htf_sweeps_tz)
else if timeframe.in_seconds(candle.tf) >= timeframe.in_seconds("1M")
lbl := get_short_month(candle.ot)
else if timeframe.in_seconds(candle.tf) >= timeframe.in_seconds("1W")
lbl := get_week_of_month(candle.ot)
else if timeframe.in_seconds(candle.tf) >= timeframe.in_seconds("1D")
// Get date components in the selected timezone
y = year(candle.ot, htf_sweeps_tz)
m = month(candle.ot, htf_sweeps_tz)
d = dayofmonth(candle.ot, htf_sweeps_tz)
// Create timestamp at noon for that date in the selected timezone (using noon to avoid timezone edge cases)
date_ts = timestamp(htf_sweeps_tz, y, m, d, 12, 0, 0)
// Add 1 day to account for timezone offset
date_ts := date_ts + 86400000
// Get day of week for that date
lbl := get_short_dayofweek(dayofweek(date_ts, htf_sweeps_tz))
else
lbl := str.format_time(candle.ot, "HH:mm", htf_sweeps_tz)
lbl
// Returns formatted remaining time until current HTF candle close.
// Format: " HH:MM:SS"
get_htf_remaining_time(int from, string tf, string ses, string tz) =>
ct = time_close(tf, ses, na(tz) ? "" : tz)
if na(ct) or na(from)
""
else
// Remaining time in ms (clamped to 0 so it never goes negative)
remaining_ms = math.max(ct - from, 0)
// Total whole seconds remaining
remaining_sec = int(remaining_ms / 1000)
// Unit constants (seconds)
sec_per_min = 60
sec_per_hour = 60 * sec_per_min
sec_per_day = 24 * sec_per_hour
sec_per_month = 30 * sec_per_day
sec_per_year = 365 * sec_per_day
// Break down into Y / M / D / H / M / S (all ints)
years = int(remaining_sec / sec_per_year)
rem_after_years = remaining_sec % sec_per_year
months = int(rem_after_years / sec_per_month)
rem_after_months = rem_after_years % sec_per_month
days = int(rem_after_months / sec_per_day)
rem_after_days = rem_after_months % sec_per_day
hours = int(rem_after_days / sec_per_hour)
rem_after_hours = rem_after_days % sec_per_hour
minutes = int(rem_after_hours / sec_per_min)
seconds = rem_after_hours % sec_per_min
// Only show non-zero units
year_str = years > 0 ? str.format("{0}Y ", str.tostring(years, "#")) : ""
month_str = months > 0 ? str.format("{0}M ", str.tostring(months, "#")) : ""
day_str = days > 0 ? str.format("{0}D ", str.tostring(days, "#")) : ""
time_str = str.format("{0}:{1}:{2}",
str.tostring(hours, "00"),
str.tostring(minutes, "00"),
str.tostring(seconds, "00"))
year_str + month_str + day_str + time_str
//#endregion
// # ========================================================================= #
// # | End |
// # ========================================================================= #
// # ========================================================================= #
// # | Variables |
// # ========================================================================= #
//#region
var ltf = timeframe.period
var htf_1_candles = array.new()
var htf_2_candles = array.new()
var htf_3_candles = array.new()
var htf_4_candles = array.new()
var htf_5_candles = array.new()
var htf_6_candles = array.new()
var htf_candle_width = candle_size(htf_sweeps_candle_width)
//#endregion
// # ========================================================================= #
// # | End |
// # ========================================================================= #
// # ========================================================================= #
// # | Alert Methods |
// # ========================================================================= #
//#region
method enable_sweep_formed_alert(UDT_Sweep sweep) =>
if not na(sweep) and htf_sweeps_alerts_sweep_formation
if not sweep.invalidated
if sweep.bull
alert(str.format("Bullish HTF Sweep ({0}) formed on {1}. Price level {2, number, currency}", tf_label(sweep.tf), syminfo.ticker, sweep.y))
else
alert(str.format("Bearish HTF Sweep ({0}) formed on {1}. Price level {2, number, currency}", tf_label(sweep.tf), syminfo.ticker, sweep.y))
sweep
method enable_sweep_invalidated_alert(UDT_Sweep sweep) =>
if not na(sweep) and htf_sweeps_alerts_sweep_invalidation
if not sweep.invalidated
if sweep.bull
alert(str.format("Bullish HTF Sweep ({0}) invalidated on {1}. Price level {2, number, currency}", tf_label(sweep.tf), syminfo.ticker, sweep.y))
else
alert(str.format("Bearish HTF Sweep ({0}) invalidated on {1}. Price level {2, number, currency}", tf_label(sweep.tf), syminfo.ticker, sweep.y))
sweep
//#endregion
// # ========================================================================= #
// # | End |
// # ========================================================================= #
// # ========================================================================= #
// # | HTF Sweeps |
// # ========================================================================= #
//#region
method session_begins(string tf, string ses, string tz) =>
ta.change(time(tf, ses, na(tz) ? "" : tz))!= 0
method in_session(string tf, string ses, string tz) =>
t = time(tf, ses, na(tz) ? "" : tz)
ct = time_close(tf, ses, na(tz) ? "" : tz)
not na(t) and not na(ct)
method position_ltf_sweeps(array htf_candles) =>
count = htf_candles.size()
if count == 1
candle = htf_candles.get(0)
for in candle.ltf_sweeps
sweep.x2 := candle.c_idx
if count >= 2
candle = htf_candles.get(1)
next_candle = htf_candles.get(0)
for in candle.ltf_sweeps
sweep.x2 := next_candle.c_idx
htf_candles
method position_htf_sweeps(array htf_candles, int buffer) =>
count = htf_candles.size()
if count > 1
c_last = htf_candles.get(0)
for in htf_candles
for in candle.htf_sweeps
sweep.x2 := c_last.candle_rigth + buffer
sweep.x1 := candle.wick_x
htf_candles
method invalidate_sweep(UDT_Sweep sweep, UDT_HTF_Candle c2) =>
c2_bull = c2.bull
// if body of next candle cross sweep
invalidated = not na(sweep.y) and (sweep.bull ? (c2_bull ? sweep.y < c2.c : sweep.y < c2.o) : (c2_bull ? sweep.y > c2.o : sweep.y > c2.c))
invalidated
method invalidate_sweeps(array htf_candles) =>
count = htf_candles.size()
if count > 1
for i = count - 1 to 1
c1 = htf_candles.get(i)
for in c1.ltf_sweeps
if not sweep.removed and na(sweep.invalidated_on)
for k = i - 1 to 0
c2 = htf_candles.get(k)
htf_sweep = c1.htf_sweeps.get(j)
invalidated = sweep.invalidate_sweep(c2)
// invalidation by candle of sweep
if sweep.x2 <= c2.c_idx and sweep.x2 > c2.o_idx
if not c2.is_closed
if not sweep.invalidated and htf_sweeps_real_time_sweep_show
sweep.enable_sweep_invalidated_alert()
sweep.invalidated := invalidated
htf_sweep.invalidated := sweep.invalidated
else
if invalidated and na(sweep.invalidated_on)
sweep.invalidated_on := invalidated ? c2.o_idx : na
htf_sweep.invalidated_on := sweep.invalidated_on
break
else if na(sweep.invalidated_on)
// invalidation by the next candle
if not c2.is_closed
if not sweep.invalidated and htf_sweeps_real_time_sweep_show
sweep.enable_sweep_invalidated_alert()
sweep.invalidated := invalidated
htf_sweep.invalidated := sweep.invalidated
else
if invalidated
if not sweep.invalidated
sweep.enable_sweep_invalidated_alert()
sweep.invalidated := invalidated
sweep.invalidated_on := invalidated ? c2.o_idx : na
htf_sweep.invalidated := sweep.invalidated
htf_sweep.invalidated_on := sweep.invalidated_on
break
// filter removed sweeps
c2 = htf_candles.get(i - 1)
if not sweep.formed and not sweep.removed
if c2.is_closed
htf_sweep = c1.htf_sweeps.get(j)
if sweep.invalidated and not na(sweep.invalidated_on)
// if sweep is invalidated on candle that forms a sweep, then sweep will be removed
if not sweep.formed
sweep.removed := true
htf_sweep.removed := true
else
// mark sweep as formed after last candle that forms a sweep is closed and sweep was not invalidated
if not sweep.formed
sweep.formed := true
htf_sweep.formed := true
htf_candles
detect_sweep(UDT_HTF_Candle c1, UDT_HTF_Candle c2) =>
c1_bull = c1.bull
c2_bull = c2.bull
bull_sweep_in_range = c2_bull ? (c1_bull ? (c2.c < c1.h) : (c2.c < c1.h)) : (c1_bull ? (c2.o < c1.h) : (c2.o < c1.h))
is_bull_sweep = c2.h > c1.h and bull_sweep_in_range
bear_sweep_in_range = c2_bull ? (c1_bull ? (c2.o > c1.l) : (c2.o > c1.l)) : (c1_bull ? (c2.c > c1.l) : (c2.c > c1.l))
is_bear_sweep = c2.l < c1.l and bear_sweep_in_range
if is_bull_sweep
if not c1.bull_sweep
htf_sweep = UDT_Sweep.new(x1=c1.h_idx, x2=c2.c_idx, y=c1.h, bull=true, tf=c1.tf)
ltf_sweep = UDT_Sweep.new(x1=c1.h_idx, x2=c2.c_idx, y=c1.h, bull=true, tf=c1.tf)
c1.htf_sweeps.push(htf_sweep)
c1.ltf_sweeps.push(ltf_sweep)
c1.bull_sweep := true
ltf_sweep.enable_sweep_formed_alert()
else if is_bear_sweep
if not c1.bear_sweep
htf_sweep = UDT_Sweep.new(x1=c1.l_idx, x2=c2.c_idx, y=c1.l, bull=false, tf=c1.tf)
ltf_sweep = UDT_Sweep.new(x1=c1.l_idx, x2=c2.c_idx, y=c1.l, bull=false, tf=c1.tf)
c1.htf_sweeps.push(htf_sweep)
c1.ltf_sweeps.push(ltf_sweep)
c1.bear_sweep := true
ltf_sweep.enable_sweep_formed_alert()
method detect_sweeps(array htf_candles) =>
count = htf_candles.size()
if count > 1
size = math.min(4, count - 1)
for i = size to 1
c1 = htf_candles.get(i)
c2 = htf_candles.get(i - 1)
if not c2.is_closed and c1.htf_sweeps.size() <= 2
detect_sweep(c1, c2)
htf_candles.position_ltf_sweeps()
htf_candles.invalidate_sweeps()
htf_candles
method draw_sweep(UDT_Sweep sweep, bool ltf) =>
if sweep.invalidated
if htf_sweeps_i_sweep_show
if ltf and htf_sweeps_i_sweep_ltf_show or not ltf and htf_sweeps_i_sweep_htf_show
if htf_sweeps_real_time_sweep_show ? true : not sweep.removed and not na(sweep.invalidated_on)
bin.bin_ln.push(line.new(x1=sweep.x1, y1=sweep.y, x2=sweep.x2, y2=sweep.y, xloc = xloc.bar_index, color = htf_sweeps_i_sweep_line_color, style = line_style(htf_sweeps_i_sweep_line_style), width = htf_sweeps_i_sweep_line_width))
else
if htf_sweeps_sweep_show
if ltf and htf_sweeps_sweep_ltf_show or not ltf and htf_sweeps_sweep_htf_show
bin.bin_ln.push(line.new(x1=sweep.x1, y1=sweep.y, x2=sweep.x2, y2=sweep.y, xloc = xloc.bar_index, color = htf_sweeps_sweep_line_color, style = line_style(htf_sweeps_sweep_line_style), width = htf_sweeps_sweep_line_width))
sweep
is_bullish_candle(float c, float o, float h, float l) =>
if c == o
math.abs(o - h) < math.abs(o - l)
else
c > o
method add_htf_candle(array htf_candles, UDT_HTF_Candle candle, int total_candles_number)=>
if not na(candle)
if htf_candles.size() >= total_candles_number
htf_candles.pop()
htf_candles.unshift(candle)
htf_candles
method detect_htf_candle(array htf_candles, string tf, string ltf) =>
UDT_HTF_Candle htf_candle = na
if session_begins(tf, "", na) or htf_candles.size()==0
UDT_HTF_Candle candle = UDT_HTF_Candle.new(tf = tf, htf_sweeps = array.new(), ltf_sweeps = array.new())
candle.o := open
candle.c := close
candle.h := high
candle.l := low
candle.o_idx := bar_index
candle.c_idx := bar_index
candle.h_idx := bar_index
candle.l_idx := bar_index
candle.ot := time
candle.bull := is_bullish_candle(candle.c, candle.o, candle.h, candle.l)
if htf_candles.size() > 0
last_candle = htf_candles.get(0)
last_candle.is_closed := true
last_candle.ct := time
htf_candle := candle
else if in_session(tf, "", na) and htf_candles.size()>0
candle = htf_candles.first()
candle.c := close
candle.c_idx := bar_index + 1
candle.ct := time
if high > candle.h
candle.h := high
candle.h_idx := bar_index
if low < candle.l
candle.l := low
candle.l_idx := bar_index
candle.bull := is_bullish_candle(candle.c, candle.o, candle.h, candle.l)
htf_candle
get_htf_candle_shift(int candle_index, int offset, int buffer, int width, int candles_amount)=>
offset + (width + buffer) * (candles_amount - candle_index - 1)
method position_htf_candle(UDT_HTF_Candle candle, int candle_index, int offset, int buffer, int width, int candles_amount) =>
candle.shift := get_htf_candle_shift(candle_index, offset, buffer, width, candles_amount)
candle.candle_left := last_bar_index + candle.shift
candle.candle_rigth := candle.candle_left + width
candle.candle_top := math.max(candle.o, candle.c)
candle.candle_bottom := math.min(candle.o, candle.c)
candle.wick_x := candle.candle_left + width/2
candle
method position_htf_candles(array htf_candles, int shift) =>
candles_amount = htf_candles.size()
for in htf_candles
candle.position_htf_candle(index, shift, htf_sweeps_space, htf_candle_width, candles_amount)
method draw_htf_candle(UDT_HTF_Candle candle) =>
candle_color = candle.bull ? htf_sweeps_bull_color : htf_sweeps_bear_color
bin.bin_box.push(box.new(left=candle.candle_left, top=candle.candle_top, right=candle.candle_rigth, bottom=candle.candle_bottom, border_color = htf_sweeps_wick_border_color, border_width = 1, bgcolor = candle_color))
bin.bin_ln.push(line.new(x1=candle.wick_x, y1=candle.h, x2=candle.wick_x, y2=candle.candle_top, color = htf_sweeps_wick_border_color))
bin.bin_ln.push(line.new(x1=candle.wick_x, y1=candle.candle_bottom, x2=candle.wick_x, y2=candle.l, color = htf_sweeps_wick_border_color))
candle
method draw_htf_label(array htf_candles, string tf) =>
float y_top = na
float y_bottom = na
int x_min = na
int x_max = na
for in htf_candles
switch htf_sweeps_label_position
"Both" =>
y_top := na(y_top) ? candle.h : math.max(y_top, candle.h)
y_bottom := na(y_bottom) ? candle.l : math.min(y_bottom, candle.l)
"Top" =>
y_top := na(y_top) ? candle.h : math.max(y_top, candle.h)
"Bottom" =>
y_bottom := na(y_bottom) ? candle.l : math.min(y_bottom, candle.l)
x_min := na(x_min) ? candle.wick_x : math.min(x_min, candle.wick_x)
x_max := na(x_max) ? candle.wick_x : math.max(x_max, candle.wick_x)
// time label for HTF candle
txt = candle.candle_time_label()
bin.bin_lbl.push(label.new(x = candle.wick_x, y = candle.l, text = txt, tooltip = str.format("HTF candle open {0}", str.format_time(candle.ot, "yyyy-MM-dd HH:mm Z", htf_sweeps_tz)), xloc=xloc.bar_index, color=color_transparent, style = label.style_label_up, textcolor = htf_sweeps_label_color, size=text_size("Tiny"), text_font_family=font_style(general_font)))
x = math.round(math.avg(x_min, x_max))
txt = tf_label(tf)
remaining_ms = get_htf_remaining_time(timenow, tf, "", na)
if not na(y_top)
bin.bin_lbl.push(label.new(x = x, y = y_top, text = txt, tooltip = str.format("HTF {0}", txt), xloc=xloc.bar_index, color=color_transparent, style=label.style_label_down, textcolor=htf_sweeps_label_color, size=text_size(htf_sweeps_label_size), text_font_family=font_style(general_font)))
bin.bin_lbl.push(label.new(x = x, y = y_top, text = remaining_ms, tooltip = str.format("Time remaining until active HTF candle close {0}", remaining_ms), xloc=xloc.bar_index, color=color_transparent, style=label.style_label_down, textcolor=htf_sweeps_label_color, size=text_size("Tiny"), text_font_family=font_style(general_font)))
if not na(y_bottom)
bin.bin_lbl.push(label.new(x = x, y = y_bottom, text = txt, tooltip = str.format("HTF {0}", txt), xloc=xloc.bar_index, color=color_transparent, style=label.style_label_up, textcolor=htf_sweeps_label_color, size=text_size(htf_sweeps_label_size), text_font_family=font_style(general_font)))
// if htf_sweeps_bias_show and htf_candles.size() > 1
// c1 = htf_candles.get(0)
// c2 = htf_candles.get(1)
// bullish = c1.h > c2.h and c1.l > c2.l
// bearish = c1.h < c2.h and c1.l < c2.l
// bin.bin_lbl.push(label.new(x = x, y = na(y_top) ? y_bottom : y_top, text = " ", xloc=xloc.bar_index, color = bullish ? htf_sweeps_bias_bull_color : htf_sweeps_bias_bear_color, style = bullish ? label.style_arrowup : label.style_arrowdown, size = size.normal))
htf_candles
method draw_ltf_open_close_line(UDT_HTF_Candle candle) =>
y1 = math.min(candle.o, candle.c)
y2 = math.max(candle.c, candle.o)
bin.bin_ln.push(line.new(x1=candle.ot, y1=y1, x2=candle.ot, y2=y2, xloc = xloc.bar_time, extend = extend.both, color = htf_sweeps_ltf_trace_o_c_line_color, style = line_style(htf_sweeps_ltf_trace_o_c_line_style), width = htf_sweeps_ltf_trace_o_c_line_width))
candle
method draw_ltf_high_line(UDT_HTF_Candle candle) =>
bin.bin_ln.push(line.new(x1=candle.ot, y1=candle.h, x2=candle.ct, y2=candle.h, xloc = xloc.bar_time, extend = extend.none, color = htf_sweeps_ltf_trace_h_l_color, style = line_style(htf_sweeps_ltf_trace_h_l_style), width = htf_sweeps_ltf_trace_h_l_width))
candle
method draw_ltf_low_line(UDT_HTF_Candle candle) =>
bin.bin_ln.push(line.new(x1=candle.ot, y1=candle.l, x2=candle.ct, y2=candle.l, xloc = xloc.bar_time, extend = extend.none, color = htf_sweeps_ltf_trace_h_l_color, style = line_style(htf_sweeps_ltf_trace_h_l_style), width = htf_sweeps_ltf_trace_h_l_width))
candle
method plot_ltf(array htf_candles) =>
for in htf_candles
if htf_sweeps_ltf_trace_o_c_line_show
candle.draw_ltf_open_close_line()
if htf_sweeps_ltf_trace_h_l_show
candle.draw_ltf_high_line()
candle.draw_ltf_low_line()
for in candle.ltf_sweeps
ltf_sweep.draw_sweep(true)
htf_candles
method plot_htf(array htf_candles, string tf, bool ltf_map) =>
htf_candles.position_htf_sweeps(htf_sweeps_space)
for in htf_candles
candle.draw_htf_candle()
for in candle.htf_sweeps
htf_sweep.draw_sweep(false)
if htf_sweeps_label_show
htf_candles.draw_htf_label(tf)
if ltf_map
htf_candles.plot_ltf()
htf_candles
//#endregion
// # ========================================================================= #
// # | End |
// # ========================================================================= #
// # ========================================================================= #
// # | Plotting |
// # ========================================================================= #
//#region
bin.clean_bin()
var tf_1_show = htf_sweeps_tf_1_show and timeframe.in_seconds(timeframe.period) < timeframe.in_seconds(htf_sweeps_tf_1_tf)
var tf_2_show = htf_sweeps_tf_2_show and timeframe.in_seconds(timeframe.period) < timeframe.in_seconds(htf_sweeps_tf_2_tf)
var tf_3_show = htf_sweeps_tf_3_show and timeframe.in_seconds(timeframe.period) < timeframe.in_seconds(htf_sweeps_tf_3_tf)
var tf_4_show = htf_sweeps_tf_4_show and timeframe.in_seconds(timeframe.period) < timeframe.in_seconds(htf_sweeps_tf_4_tf)
var tf_5_show = htf_sweeps_tf_5_show and timeframe.in_seconds(timeframe.period) < timeframe.in_seconds(htf_sweeps_tf_5_tf)
var tf_6_show = htf_sweeps_tf_6_show and timeframe.in_seconds(timeframe.period) < timeframe.in_seconds(htf_sweeps_tf_6_tf)
if tf_1_show
htf_1_candle = htf_1_candles.detect_htf_candle(htf_sweeps_tf_1_tf, ltf)
htf_1_candles.add_htf_candle(htf_1_candle, htf_sweeps_tf_1_number)
htf_1_candles.detect_sweeps()
if tf_2_show
htf_2_candle = htf_2_candles.detect_htf_candle(htf_sweeps_tf_2_tf, ltf)
htf_2_candles.add_htf_candle(htf_2_candle, htf_sweeps_tf_2_number)
htf_2_candles.detect_sweeps()
if tf_3_show
htf_3_candle = htf_3_candles.detect_htf_candle(htf_sweeps_tf_3_tf, ltf)
htf_3_candles.add_htf_candle(htf_3_candle, htf_sweeps_tf_3_number)
htf_3_candles.detect_sweeps()
if tf_4_show
htf_4_candle = htf_4_candles.detect_htf_candle(htf_sweeps_tf_4_tf, ltf)
htf_4_candles.add_htf_candle(htf_4_candle, htf_sweeps_tf_4_number)
htf_4_candles.detect_sweeps()
if tf_5_show
htf_5_candle = htf_5_candles.detect_htf_candle(htf_sweeps_tf_5_tf, ltf)
htf_5_candles.add_htf_candle(htf_5_candle, htf_sweeps_tf_5_number)
htf_5_candles.detect_sweeps()
if tf_6_show
htf_6_candle = htf_6_candles.detect_htf_candle(htf_sweeps_tf_6_tf, ltf)
htf_6_candles.add_htf_candle(htf_6_candle, htf_sweeps_tf_6_number)
htf_6_candles.detect_sweeps()
if barstate.islast
offset = htf_sweeps_offset
if tf_1_show
htf_1_candles.position_htf_candles(offset)
htf_1_candles.plot_htf(htf_sweeps_tf_1_tf, htf_sweeps_tf_1_map)
offset += get_htf_candle_shift(0, htf_sweeps_margin, htf_sweeps_space, htf_candle_width, htf_sweeps_tf_1_number)
if tf_2_show
htf_2_candles.position_htf_candles(offset)
htf_2_candles.plot_htf(htf_sweeps_tf_2_tf, htf_sweeps_tf_2_map)
offset += get_htf_candle_shift(0, htf_sweeps_margin, htf_sweeps_space, htf_candle_width, htf_sweeps_tf_2_number)
if tf_3_show
htf_3_candles.position_htf_candles(offset)
htf_3_candles.plot_htf(htf_sweeps_tf_3_tf, htf_sweeps_tf_3_map)
offset += get_htf_candle_shift(0, htf_sweeps_margin, htf_sweeps_space, htf_candle_width, htf_sweeps_tf_3_number)
if tf_4_show
htf_4_candles.position_htf_candles(offset)
htf_4_candles.plot_htf(htf_sweeps_tf_4_tf, htf_sweeps_tf_4_map)
offset += get_htf_candle_shift(0, htf_sweeps_margin, htf_sweeps_space, htf_candle_width, htf_sweeps_tf_4_number)
if tf_5_show
htf_5_candles.position_htf_candles(offset)
htf_5_candles.plot_htf(htf_sweeps_tf_5_tf, htf_sweeps_tf_5_map)
offset += get_htf_candle_shift(0, htf_sweeps_margin, htf_sweeps_space, htf_candle_width, htf_sweeps_tf_5_number)
if tf_6_show
htf_6_candles.position_htf_candles(offset)
htf_6_candles.plot_htf(htf_sweeps_tf_6_tf, htf_sweeps_tf_6_map)
//#endregion
// # ========================================================================= #
// # | End |
// # ========================================================================= #
// # ========================================================================= #
// # | Brand |
// # ========================================================================= #
//#region
if barstate.isfirst and general_brand_show == false
var table brand = table.new(position.bottom_right, 1, 1, bgcolor = chart.bg_color)
table.cell(brand, 0, 0, "© CandelaCharts", text_color = colors_gray, text_halign = text.align_center, text_size = text_size(general_text), text_font_family = font_style(general_font))
//#endregion
// # ========================================================================= #
// # | End |
// # ========================================================================= #
Candlestick analysis
GAYBEAR SWING Clean v6 mobile-safeHow to Use Sniper Swing — Clean v6 (Mobile-Safe)
Purpose
Sniper Swing — Clean v6 is a trend-aligned swing indicator designed to help traders identify high-probability entries and exits while minimizing noise. It works best in trending or gently rotating markets and is optimized for mobile charting.
A. Chart Setup
Recommended:
Timeframes: 5m–1h for active trading, 4h–Daily for swing trading
Instruments: Liquid equities, indices, and major ETFs
The indicator plots:
SMA 9 (entry trigger)
EMA 20 (trend and momentum)
Optional SMA 50 (higher-timeframe bias)
B. Buy (Long) Signal — How to Act
A BUY label appears when price reclaims short-term structure.
How to trade it:
Wait for price to cross above the SMA 9
Confirm EMA 20 is rising (and above SMA 50 if enabled)
Optional: Confirm price is closing above EMA 20
Enter on:
The close of the signal candle, or
A minor pullback that holds above SMA 9
Best context:
Higher lows
EMA 20 sloping upward
RSI not overbought
C. Sell / Short Signal — How to Act
The indicator offers two sell modes:
1) CrossUnder SMA 9 (Fast Exit)
Use in strong trends or fast markets
Exit longs or enter shorts when price loses SMA 9
2) AccuSell (Structure-Based)
Use in choppy or topping markets
Requires:
Loss of SMA 9 plus
Structural weakness (lower highs/lows, RSI < 50, or EMA 20 turning down)
How to trade it:
Exit longs when sell label appears
Aggressive traders may enter short positions
Conservative traders wait for follow-through
D. RSI Arrows — Context Only
OB arrows warn of potential exhaustion
OS arrows suggest relief or bounce zones
RSI does not trigger trades — it informs patience and risk
E. Position Coloring & State
Green candles = long bias
Purple candles = short bias
Background tint reinforces short exposure
Coloring persists until the opposite signal prints
This helps visually manage trades without staring at labels.
F. Risk Management (User-Defined)
The indicator does not manage stops or targets.
Common approaches:
Stop below recent swing low (longs)
Stop above recent swing high (shorts)
Scale partials near RSI OB/OS zones
G. When Not to Use It
Extremely low-volume chop
News-driven spikes
Range-bound micro consolidations
2. Explain It Like You’re 10 👶📈
Imagine the chart is a road, and the price is a car.
🟢 Green = Go
When the car drives above the yellow line, that means it’s probably going up.
The indicator says:
“Okay, the car looks like it wants to go forward. You can hop in.”
That’s a BUY.
🟣 Purple = Uh-Oh
When the car falls below the yellow line, it might start going down.
The indicator says:
“Careful… the car is slowing down or turning around.”
That’s a SELL.
🔵 Blue Line = Wind Direction
The blue line shows which way the wind is blowing.
If the wind blows up → going up is easier
If the wind blows down → going down is easier
You want to go with the wind, not fight it.
🔺 Red & Green Arrows = Too Fast / Too Slow
Red arrow = “The car is going too fast, might need a break”
Green arrow = “The car is tired, might bounce”
They don’t tell you to go or stop — they just say “pay attention.”
🎨 Colors Help You Remember
Green bars = you’re riding up
Purple bars = you’re riding down
Gray = nothing exciting happening
🚨 Important Rule
This tool doesn’t drive the car for you.
It just says:
“Now might be a good time.”
You still decide when to get in and when to get out
LSDE Zones PRO v2 | Enhanced SMCLSDE Zones PRO v2 | Enhanced SMC
Professional Smart Money Concepts (SMC) toolkit designed for institutional-level price action trading with automated zone management and real-time market structure analysis.
LSDE Zones PRO v2 addresses a critical challenge faced by price action traders: simultaneously tracking multiple institutional concepts (liquidity, market structure, order flow zones) while filtering high-probability setups in real-time. Rather than using these SMC elements in isolation, this indicator integrates them into a cohesive framework that reveals institutional footprints and trade entry zones.
Core Integration & Unique Implementation
Liquidity Sweep Detection with Anti-Spam Logic:
Unlike basic liquidity plotters, this system tracks equal highs/lows within a dynamic lookback period and detects actual sweeps using wick-to-body ratio analysis (default 30% threshold). The anti-spam cooldown (minimum 3-bar spacing) prevents false positives during choppy markets. When price sweeps liquidity then reverses with conviction, it signals institutional stop-hunts—a key SMC principle often missed by manual analysis.
Multi-Confirmation Market Structure (MSS & BOS):
Market structure detection uses a confirmation bar system (default 2 bars) to avoid premature signals. MSS (structure shift) requires sustained breaks with optional volume validation (1.5x average), while BOS (continuation) uses a 5-bar cooldown to prevent label spam. This dual-layer confirmation reduces false breaks common in standard pivot-based systems.
Volume-Filtered Fair Value Gaps (FVG):
FVGs are detected using 3-candle gap analysis with mandatory volume confirmation (1.2x average) and body percentage filters (>50% body-to-range ratio). The auto-mitigation feature tracks when price fills gaps, converting them to invalidated zones (gray). Maximum active FVG limit (user-defined, default 20) ensures chart clarity. This filtering separates institutional imbalances from noise—critical since not all gaps are tradeable.
Enhanced Order Blocks with Breaker Logic:
Order blocks detect the last opposing candle before strong directional moves (1.5x body size increase, >60% body percentage, high volume). When an OB is broken, it automatically converts to a Breaker Block—a reversal zone where institutional orders flip. This dynamic transformation (OB → Breaker) isn't available in standard OB indicators and provides counter-trend entry opportunities.
Displacement Detection:
Identifies explosive candle moves (2x average range, >70% body, high volume) that signal institutional positioning. These "displacement candles" often precede FVG creation and order block formation—providing early warnings of trend shifts.
Dynamic Premium/Discount Zones:
Unlike static Fibonacci tools, this system updates ranges every candle based on swing highs/lows within a lookback period (default 100 bars). Zones reset per session/daily/weekly (user-selectable) and automatically expand when new highs/lows form. The 25%/50%/75% levels act as institutional value areas—premium zones for sells, discount for buys.
Session-Aware Architecture:
Tracks London/NY/Asian sessions with automatic high/low marking and session labels. Combined with PDH/PDL (Previous Day High/Low) levels, this creates a time-based context layer. Institutional activity patterns differ by session—London for liquidity sweeps, NY for breakouts—making session filtering essential for SMC accuracy.
Comprehensive Statistics Dashboard:
Real-time table displays active trend, current zone (premium/discount/equilibrium), session status, active FVG/OB count, and volume conditions. This at-a-glance analysis prevents information overload while maintaining full situational awareness.
Why This Combination Matters
SMC trading requires tracking 5+ concepts simultaneously (liquidity, structure, zones, volume, sessions). Manual analysis leads to missed setups or analysis paralysis. This indicator synthesizes these elements into actionable signals—liquidity sweeps near discount OBs in high-volume sessions become high-probability reversal setups. The auto-mitigation and breaker conversion reduce monitoring overhead, letting traders focus on execution.
Usage: Optimized for 1-15 minute charts on forex, indices, and crypto. All features toggleable for strategy customization.
Disclaimer: This is an analytical and educational tool; all trading involves risk and should be based on individual analysis.
ST Order Block EngineAdvanced order block detection based on displacement and structural validation.
Asia/London 2026 HI/LO Trading Strategy Application
Asia Range: Often serves as the "accumulation" phase. Look for New York to sweep the Asia High/Low before a trend reversal.
London High/Low: These often form the "High or Low of the Day" (HOD/LOD). Using these rays helps you stay on the right side of the daily bias.
Defect Warrior Premium: Non-Engulf Signal + MTF Bias + Plan & DaOverview
Defect Warrior Premium is a closed-source indicator that generates confirmed buy/sell signals on a selected signal timeframe (default: H1) and provides an integrated trade plan (Entry/SL/TP) plus a monthly points dashboard.
It is designed to reduce noisy signals by combining a proprietary “non-engulf” candle condition with multi-timeframe bias, adaptive VIDYA bands, and supply/demand proximity.
Core Concept (How it works)
This script builds a signal only when all layers align:
Defect Candle Condition (Signal TF)
Candle body ratio must be within a defined range.
Candle must be non-engulfing vs the previous candle (the body does not fully cover the previous body range).
Direction is based on candle close vs open (bull/bear).
Market Bias Filters (Optional)
MTF EMA bias: price vs EMA on higher timeframes (HTF1/HTF2).
VIDYA bias: adaptive VIDYA trend state (price relative to VIDYA) with dynamic band width (ATR/Stdev).
Supply/Demand Zone Proximity (Optional)
Demand/Supply zones are derived from pivot structure on the signal timeframe.
Entry is allowed only when price is near the relevant zone using a proximity buffer (Points or ATR-multiple).
Confirmed & De-duplicated Signals
Signals can be restricted to signal-timeframe bar close (non-repainting execution style).
Includes protection against repeated alerts when Signal TF ≠ chart TF (one signal per new Signal TF bar).
Trade Plan (Entry / SL / TP)
When a signal triggers, the script can plot a plan with:
Entry: Close or Mid-Body
Stop-loss modes: Candle-based / Zone-based / ATR-multiple / Fixed points / Fixed %
Take-profit targets: TP1/TP2/TP3 using configurable risk-reward (R:R) multipliers
Visual plan lines and a compact plan card label (Entry/SL/TP + R:R)
Dashboard (Monthly, Points-based, Net PnL)
The OrcaTrade Dashboard tracks monthly performance in points:
A trade is counted only after price touches the Entry.
A “Win” is counted only when price touches TP1 after Entry has been touched.
Net PnL is calculated in points and deducts SL hits (wins are not reduced by SL logic).
Point conversion is configurable (Point Value).
Alerts & Automation
Built-in alert conditions for confirmed BUY/SELL.
Optional JSON alert output for automation workflows (e.g., webhooks / scripts).
How to use
Apply on any chart timeframe. Set Signal TF (default H1).
Keep the chart clean and use the plan labels/lines to understand Entry/SL/TP.
Enable/disable filters (Zones, EMA bias, VIDYA bias) depending on your market and risk preference.
Notes & Limitations
This is an analytical tool, not financial advice.
Signals are based on candle/structure confirmation; fast news spikes may cause slippage-like behavior on back-analysis.
Zone proximity is pivot-based and depends on historical swing structure.
Thuan_Bot_Scap_V6_Standard_LogicRieng Tu khong chia se ra ngoai
do toi viet qua ngan hay sao ma nó ko cho public
BreakoutRhythmFXBreakoutRhythmFX (BRFX)
=========================
## 📊 Capture the Rhythm of the Market
**BreakoutRhythmFX (BRFX)** is a sophisticated volatility-based trading system designed to dominate **Opening Range Breakouts**. Unlike standard ORB indicators, BRFX integrates a **Quality Grade Algorithm**, **Multi-Session Logic**, and a **Dynamic Balance Point** to filter out false breakouts and identify high-probability momentum moves.
Whether you are trading **XAUUSD (Gold), Indices (US30/NAS100), or Forex**, BRFX helps you visualize the market's daily "rhythm" by defining key volatility boxes and projecting Fibonacci-based targets.
---
## 🌟 Key Features
### 1. 🧠 Algorithmic Quality Grading (The 6-Star System)
Stop taking blind breakouts. Every signal is automatically analyzed and graded from **0 to 6 Stars** based on six confluence factors. The higher the grade, the stronger the probability.
* **MA Alignment:** Is price trending above/below the Session Moving Average?
* **DBP Alignment:** Is price on the correct side of the Dynamic Balance Point?
* **Volume Surge:** Is there a sudden influx of volume (>1.2x average)?
* **Range Stability:** Is the Opening Range tight enough (ATR check) to allow expansion?
* **Candle Strength:** Is the breakout candle a solid body or just a wick?
* **RSI Confluence:** Momentum confirmation (avoiding overbought/oversold traps).
### 2. 🕒 Multi-Session Architecture
Trade multiple sessions in a single day without changing settings.
* **Primary Custom Session:** (e.g., London Open).
* **Secondary & Tertiary Sessions:** (e.g., NY Open, Tokyo Open).
* **Priority Logic:** Intelligent handling of overlapping sessions to minimize chart clutter.
### 3. 🎯 Fibonacci Expansion Targets
Automatically projects Take Profit levels based on the width of the Opening Range.
* **TP 1-5:** Uses Fibonacci expansions (1.618, 2.618, etc.) to predict exhaustion points.
* **Dynamic RR:** Displays Risk-to-Reward ratios for every target.
### 4. ⚖️ Dynamic Balance Point (DBP)
A higher-timeframe trend filter that keeps you on the right side of the market.
* **Modes:** Scalping, Day Trading, Swing, or Manual.
* **Logic:** Acts as a "Line in the Sand". If Price > DBP, focus on Buy Breakouts.
### 5. 🛡️ Strategic Stop Levels
Includes calculation for "Stop-to-Buy" and "Stop-to-Sell" zones, providing logical invalidation points for your trades or areas for reversal entries.
### 6. 📉 Statistical Intelligence Panel
A dashboard that tells you the bias of the day at a glance.
* **Volatility Stats:** Are we in a compression or expansion phase?
* **Directional Hit Rate:** Historical tracking of breakout directions.
* **Range Analysis:** Measures the Opening Range in Pips/Points.
---
## 🛠️ How to Trade with BRFX
1. **Wait for the Box:** Allow the Opening Range (e.g., first 1 hour) to form.
2. **Check the Grade:** When a **▲ Breakout Signal** appears, look at the star rating.
* **1-3 Stars:** Risky / Contra-trend. Use caution.
* **4-6 Stars:** High Probability / Confluence. "Grade A" Setup.
3. **Confirm with DBP:** Ideally, a Buy Breakout should be above the Gray/Green DBP line.
4. **Execute & Target:** Entering at the breakout, target TP1 or TP2. If Momentum is strong (Volume Surge), trail to TP3.
---
## ⚙️ Configuration
* **Customization:** Fully customizable colors, line styles, and session times.
* **Timezones:** Supports UTC offsets to match your server time.
* **Asset Optimized:** Includes specific Pip calculation adjustments for Gold (XAU) vs JPY vs Standard Forex.
---
**Disclaimer:**
*This indicator is for educational purposes only. Past performance (Quality Grades/Stats) does not guarantee future results. Always use proper risk management.*
IBPDA Time Markers Daily OnlyThis indicator plots IBPDA (Interbank Price Delivery Algorithm) time markers based on true bar counts, not calendar days.
Unlike many time-cycle tools that rely on calendar arithmetic, this script calculates 20 / 40 / 60 daily candles, ensuring accuracy across:
market holidays
shortened sessions
exchange-specific trading calendars
It is intentionally restricted to the Daily timeframe, where each bar represents one completed trading session.
🔍 What This Indicator Does
Draws vertical lines at:
−20 / −40 / −60 bars (exact historical daily candles)
+20 / +40 / +60 bars (future projections for planning)
Uses bar index–based logic, not calendar dates
Prevents misuse by enforcing Daily timeframe only
Draws lines once per chart load to avoid clutter and object limits
⚙️ Key Design Choices (Important)
Past markers are exact
Past levels use time , which means “n completed daily sessions ago” — no approximation.
Future markers are projected
Since future bars do not exist yet, forward levels are projected using a configurable day-step. These are meant for time-window awareness, not precision forecasting.
No repainting
All levels are fixed once drawn.
🧠 How to Use (Best Practice)
IBPDA time levels are time magnets, not trade signals.
They work best when combined with:
Higher-timeframe PD arrays (weekly/monthly highs & lows)
Fair Value Gaps (FVGs)
Liquidity pools
Market structure shifts
Watch for price expansion, liquidity events, or displacement occurring near these time markers.
🛑 Limitations (By Design)
Daily timeframe only
Future levels are projections (exchange calendars cannot be predicted perfectly)
This script does not generate buy/sell signals
🎯 Intended Audience
This indicator is designed for:
ICT / SMC traders
Index futures traders (NQ, ES, YM, etc.)
Swing traders and position traders
Traders who respect time as a variable, not just price
🧩 Notes
Best used as a contextual framework, not a standalone strategy
Clean, lightweight, and safe for long-term chart usage
Built with strict Pine Script v5 compatibility and publishing standards
Titan Command: Macro-Quant Sniper EngineTITAN COMMAND: Macro-Quant Sniper Engine
==========================================
## ⚔️ Institutional Intelligence for the Retail Trader
**Titan Command** is not just an indicator; it is a comprehensive **Algorithmic Trading Operating System** designed to bridge the gap between retail technical analysis and institutional global macro strategies.
Built on the philosophy that *"Price is the slave of Macroeconomics"*, this engine fuses real-time economic data (Yields, DXY, VIX) with advanced quantitative statistics (Z-Scores, Bayesian Probability) to deliver high-precision execution on lower timeframes (specifically optimized for **XAUUSD M5**).
---
## 🧠 The 4-Pillar Architecture
This script operates like a virtual "Hedge Fund Team" inside your chart, consisting of four distinct logic engines that run simultaneously:
### 1. 🌐 The Macro Analyst (Regime Filter)
It doesn't just look at the chart. It "steps out" to analyze the global money flow in real-time.
* **Data Fusion:** Monitors **US10Y** (Bond Yields), **DXY** (Dollar Strength), **VIX** (Fear Index), and **SPX** (Risk Sentiment).
* **Logic:** Detects "Risk-On" vs "Risk-Off" regimes. If Global Macro dictates that Gold should fall (e.g., Yields spiking), the system blocks Buy signals to prevent "Bull Traps".
### 2. 🧮 The Quant Engine (Statistical Core)
Opinions are replaced by math.
* **Z-Score Normalization:** Normalizes price and volume data to detect statistical anomalies (>2 Sigma events).
* **Bayesian Probability:** Calculates a real-time **Confidence Score (0-100%)** based on available evidence. Only setups with high statistical probability trigger a signal.
### 3. 🛡️ The Risk Manager (Capital Protection)
Your safety net against market chaos.
* **Volatility Targeting:** Automatically calculates position size recommendations based on current market volatility (ATR).
* *Calm Market:* Normal Risk.
* *Chaos/News:* Reduces risk to ~0.5% automatically.
* **Smart Take Profit:** Projects dynamic targets based on volatility and quantitative price projection models.
### 4. 🎯 The Sniper (Execution & Timing)
The trigger puller. Once Macro and Quant give the "All Clear", this engine hunts for millisecond-perfect entries.
* **VPA 2.0 (Volume Price Analysis):** Distinguishes between **Ignition** (True Moves) and **Churn** (Manipulation).
* **Advanced Divergence Engine:** Detects both **Regular** (Reversal) and **Hidden** (Continuation) divergences with a "Smart Memory" window to sync with entry signals.
---
## 📖 Visual Legend (How to Trade)
The chart is annotated with "Institutional Footprints" to guide your decisions:
### 🚦 Signal Triggers
* 🚀 **IGNITION / BUY**: A high-confidence trend start. Supported by "Ignition Volume" and Macro confirmation.
* *Action:* **ENTRY BUY**.
* ⚡ **DIV+ SELL**: A confirmed reversal short. Supported by structural weakness and bearish divergence.
* *Action:* **ENTRY SELL**.
### 🔍 Market Structure (Divergence)
* 💎 **BULLISH DIV (Diamond):** Price making lower lows while momentum rises. Represents "Value/Discount".
* *Context:* Watch for Buy setups.
* 💣 **BEARISH DIV (Bomb):** Price making higher highs while momentum fades. Represents "Danger/Top".
* *Context:* Tighten stops on Longs, prepare to Short.
### 📊 Volume Events
* 💥 **CLIMAX:** Massive volume with little price progress. Sign of exhaustion.
* *Action:* **TAKE PROFIT**.
* 🌀 **CHURN:** Confusing volume activity (High Effort / Low Result).
* *Action:* **WAIT & SEE**.
---
## ⚙️ Key Features
* **Dynamic Dashboard:** Displays Macro Status, Confidence Score, Rec. Risk, and key levels.
* **Session Filters:** Enhances signals during London/NY "Kill Zones".
* **Risk Regimes:** Background color adapts to visualize market sentiment (Green=Risk-On, Red=Risk-Off).
## ⚠️ Disclaimer
*This tool is for educational and analytical purposes only. Trading financial markets involves significant risk. The "Confidence Score" is a statistical probability derived from past data, not a guarantee of future performance. Always use proper risk management.*
RICH SCANNER PRO this scanner for rich club only not for everyone.
Rich Scanner is an intelligent market scanning and analysis system, designed to help traders identify the highest-probability trading opportunities with speed and precision.
It relies on advanced analytical algorithms that automatically filter the market to deliver clear, data-driven signals — with no randomness or guesswork.
🚀 What does Rich Scanner offer?
🔍 Real-time market scanning to detect strong opportunities
🎯 Precise entry and exit signals with built-in risk filtering
⏱️ Support for multiple timeframes and different trading styles
📊 Suitable for Scalping, Intraday, and Swing Trading
🧠 Reduced noise and confusion, turning analysis into clear decisions
💎 Why Rich Scanner?
Because it doesn’t just display data — it transforms data into executable opportunities, giving you a clearer market perspective and helping you trade with confidence and discipline.
Rich Scanner — Trade Smarter, Decide Clearer, Achieve Stronger Results. 📈✨
Apollo Volume Candles [ArdiNSC]Apollo Volume Candles
Volume tells the truth. This indicator puts that truth directly on your candles.
───────────────────────────────
The Problem
Standard candles treat all moves equally. A breakout on 3x average volume looks identical to one on 0.3x volume. But they're not the same — one has conviction, the other is noise.
───────────────────────────────
The Solution
Apollo Volume Candles colors your candles by relative volume intensity:
Bright candles = High volume (real participation)
Normal candles = Average volume
Faded candles = Low volume (weak conviction)
One glance tells you whether a move matters.
───────────────────────────────
Key Features
Volume-Weighted Candle Coloring
Candles automatically adjust opacity based on relative volume. No extra indicators cluttering your chart — the information is embedded in the price action itself.
Exhaustion Detection
When consecutive bars print climactic volume (3x+ average), a small marker appears warning of potential exhaustion. These clusters often occur at blow-off tops and capitulation bottoms.
Relative Volume Dashboard
Clean panel showing current and previous bar volume ratios, status classification, and active signals.
Additional Markers (Optional)
- Confirmed breakout detection with volume + structure filters
- Single climactic volume bar flags
- Volume dry-up zones (compression before expansion)
All optional markers are off by default for a clean chart.
───────────────────────────────
Volume Classifications
≥ 3.0x average → Climactic → Bright + potential exhaustion
≥ 1.5x average → High → Bright
0.4x - 1.5x → Normal → Standard opacity
< 0.4x average → Low → Faded
───────────────────────────────
Practical Use
Filtering breakouts — A bright candle breaking resistance has real participation behind it. A faded candle breaking the same level is suspect.
Spotting reversals — Consecutive climactic volume bars after an extended move often mark exhaustion — the final push before reversal.
Reading consolidation — Faded candles during ranges show decreasing participation. When volume returns, direction is chosen.
───────────────────────────────
Settings
- Adjustable volume lookback and thresholds
- Multiple averaging methods (SMA/EMA/RMA)
- Toggle individual markers
- Customizable colors
- Movable dashboard
───────────────────────────────
Note
Requires volume data. Works best on liquid markets with consistent volume reporting.
───────────────────────────────
Part of the Apollo Trading indicator suite.
Asian Range & ICT KillzonesThis indicator was created to support my own trading by making ICT kill zones easy to identify at a glance, while clearly highlighting the Asian range highs and lows when price transitions into those kill zones for potential trade opportunities. It is designed purely as a visual aid and trading tool. I am not responsible for any errors, malfunctions, or inaccuracies within the indicator, nor for any financial decisions, losses, or outcomes resulting from its use. Use at your own risk.
Cheers, Elias G.
Prime UltimateWill Write description and instructions soon, please wait for more info or contact me if you have questions
Thuan_Bot_Scap V2Apply the Script: Open the Pine Editor, paste the code, and click "Add to Chart" to initialize the strategy on your desired timeframe.
Set the Timeframe: For optimal scalping results, this strategy is best utilized on lower timeframes such as 1-minute or 5-minute charts.
Configure RSI Parameters: Adjust the RSI Length and extreme levels (Oversold/Overbought) in the settings menu to match the current market volatility.
Manage Trade Values: Customize your Take Profit (TP) and Stop Loss (SL) values under the "Trade Settings" group to align with your risk management plan.
Monitor the Dashboard: Use the on-screen Dashboard to track real-time performance metrics, including the total number of closed trades and historical win rate.
Identify Entry Signals: Look for the horizontal signal lines and visual boxes; a Green box represents a Long position, while a Red box indicates a Short position.
Verify Visual Levels: Ensure the TP (Green Label) and SL (Red Label) are correctly positioned relative to your Entry (Blue Label) on the active candle.
Adjust Dashboard Placement: You can change the Dashboard’s position (e.g., Top Right or Bottom Left) in the inputs to prevent it from obstructing price action.
Observe Price Action Patterns: The strategy triggers entries based on a combination of RSI momentum and candle formations like Pin Bars or Engulfing patterns.
Analyze Historical Performance: Use the built-in "Strategy Tester" tab at the bottom of TradingView to review how the parameters performed during past market conditions.
Dynamic Risk and RewardThe Dynamic Equity Projection (DEP Map) is an institutional-grade visual execution tool designed to automate risk-to-reward mapping directly on your chart. Unlike standard drawing tools, it is context-aware—calculating volatility and trend bias in real-time to provide a "live" projection of your trade's potential.Core Logic & Intelligence1. Trend-Filtered SentimentThe indicator uses a 200-period Exponential Moving Average (EMA) as a directional filter.Bullish Map: If the current price is above the EMA, the DEP Map projects a green "Long" zone.Bearish Map: If the price is below the EMA, it instantly flips to a red "Short" zone.This helps traders stay aligned with the primary market momentum, avoiding the trap of "trading against the tide."2. Volatility-Adaptive Risk (ATR)Rather than using arbitrary point distances, the DEP Map utilizes the Average True Range (ATR).It measures the market's "noise" level over the last 14 bars.The Stop Loss is set at a multiplier (default 1.5x) of this volatility, ensuring your stop is wide enough to survive market breathing but tight enough to maintain a high R:R.Technical FeaturesFeatureDescriptionProfessional BenefitProjection BoxA dynamic rectangle that extends into the "future" (right-side offset).Keeps the current price action clear while providing a visual goalpost for the trade.Persistent LogicUses advanced var object handling to prevent "ghosting" or label stacking.Ensures a clean, high-performance chart interface without clutter.R:R Equity LadderSegments the profit zone into specific milestones: 1.0, 2.0, 3.0, and the "Equity Target" (5.0).Allows for precise partial profit-taking and psychological target setting.Dashed SL LineA high-contrast red dashed line indicating the invalidation point.Provides an immediate visual cue of the trade's total risk.How to Use the DEP MapIdentify the Bias: Observe the color of the box. A green box suggests looking for buying opportunities; a red box suggests selling.Verify the Levels: The labels on the right edge of the box provide the exact price points for your Stop Loss and Take Profit orders.Execute & Manage:R:R 1.0: The "Safety Point." Many traders move their stop to breakeven here.R:R 2.0 - 3.0: The "Standard Exit." This is where the bulk of the trade's profit is usually captured.Equity Target: The "Home Run." Reserved for high-conviction trend extensions.
ICT Liquidity Sweep [KTY] ICT Liquidity Sweep
Hi, I'm Kim Thank You 👋
KTY = Kim Thank You (김땡큐)
Detects sweep candles that grab liquidity at swing highs/lows and reverse back inside.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 FEATURES
- Liquidity Sweep Detection
- Wick breaks level + Close inside = Sweep ✅
- Break and close outside = Real breakout (no sweep)
- Visual Display
- ⇩: High liquidity swept (BSL)
- ⇧: Low liquidity swept (SSL)
- Sweep line connects liquidity level to sweep candle
- Vertical line marks sweep candle wick area
- Multi-Timeframe
- LTF and HTF sweep detection
- HTF sweeps are more significant
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ HOW TO USE
- ⇩ detected → Check for potential bearish reversal
- ⇧ detected → Check for potential bullish reversal
- Combine with OB/FVG for better accuracy
- HTF sweeps carry more weight than LTF
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💡 TIPS
- Sweeps indicate smart money grabbing liquidity
- Wait for confirmation before entering
- Multiple sweeps at same level = stronger signal
- Use with market structure for confluence
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ DISCLAIMER
This indicator is for educational purposes only.
Not financial advice. Always do your own research.
SMC Range Box + HTF Matrix [AMD] # SMC Range Box + HTF Matrix
## Overview
**SMC Range Matrix** is a comprehensive Smart Money Concepts (SMC) indicator designed for ICT/SMC traders. It combines multi-timeframe range analysis with advanced Fair Value Gap detection, Inverted FVG tracking, Volume Imbalance zones, and AMD (Accumulation-Manipulation-Distribution) phase detection — all in one powerful tool.
---
## 🔥 Key Features
### 📦 Multi-Timeframe Range Boxes
- Display **1H, 4H, and Daily** candle ranges as visual boxes
- Up to **5 boxes per timeframe** for historical context
- **Bullish/Bearish color coding** based on candle direction
- **Time labels** showing when each range started
- **Range size display** in pips/points
- **Sweep markers** when previous highs/lows are taken
### 📊 Fair Value Gaps (FVG)
- **Auto Threshold Filter** — Only shows significant FVGs, filters out noise
- **Multi-Timeframe Support** — Display FVGs from any timeframe on your current chart
- **Smart Mitigation** — FVGs automatically removed when filled (customizable fill %)
- **Near Price Filter** — Only shows FVGs within X ATR of current price
- **Bullish & Bearish FVG** detection with customizable colors
### 🔄 Inverted Fair Value Gaps (IFVG)
- **Automatic IFVG Detection** — When price closes through an FVG, it converts to IFVG
- **Role Reversal Logic**:
- Bullish FVG → Price closes below → Becomes **Bearish IFVG** (Resistance)
- Bearish FVG → Price closes above → Becomes **Bullish IFVG** (Support)
- **Consequent Encroachment (CE) Line** — 50% level marked for optimal entry (ICT concept)
- **IFVG Invalidation** — Automatically removes IFVG when broken
### 📈 Volume Imbalance (VI)
- Detects gaps between consecutive candle bodies
- **Auto-removal** when mitigated
- Separate color settings for bullish/bearish VI
### ⚖️ Equilibrium Lines
- **50% level** of each range box
- Dynamic color based on price position (support/resistance)
- Helps identify premium/discount zones
### 🎯 AMD Phase Detection
- **Accumulation** — Tight range, consolidation phase
- **Manipulation** — Liquidity sweep with rejection
- **Distribution** — Strong directional move
- Labels displayed on each range box
---
## 🎨 Customization
### Theme Presets
- **Ocean** — Cool blue tones
- **Forest** — Natural green shades
- **Monochrome** — Clean grayscale
- **Neon** — Vibrant colors
- **Custom** — Full color control
### Fully Customizable
- Individual colors for each timeframe
- Border width and styles
- Label sizes and visibility toggles
- FVG/VI transparency and borders
---
## ⚙️ Settings Guide
### FVG Settings
| Setting | Description |
|---------|-------------|
| FVG Timeframe | Leave blank for current TF, or select specific timeframe |
| Auto Threshold | Filters insignificant FVGs based on bar movement % |
| Fill % to Remove | FVG removed when filled by this percentage (default 50%) |
| Near Price Filter | Only show FVGs within X ATR from current price |
| Show CE Line | Display 50% Consequent Encroachment line on IFVGs |
### Range Box Settings
| Setting | Description |
|---------|-------------|
| Boxes to Show | Number of historical boxes (1-5) per timeframe |
| Show Sweep Markers | Highlight when previous high/low is swept |
| Show Time Label | Display start time of each range |
---
## 📖 How to Use
### For ICT/SMC Trading:
1. **Identify the range** — Use 4H or Daily boxes to see the current dealing range
2. **Watch for FVGs** — These are potential entry zones
3. **Monitor IFVG formation** — When FVG fails, it becomes support/resistance
4. **Use CE level** — 50% of IFVG is optimal entry per ICT methodology
5. **Check AMD phase** — Understand current market phase before entry
### For Liquidity Trading:
1. Look for **sweep markers** on range boxes
2. Wait for **manipulation phase** detection
3. Enter on **IFVG retest** at CE level
4. Target opposite side of the range
---
## 🔔 Best Practices
- Use **4H boxes** for swing trading context
- Use **1H boxes** for intraday entries
- Enable **Auto Threshold** to reduce FVG clutter
- Set **Fill % to 50-70%** based on your trading style
- Combine with your own bias analysis (HTF trend, news, etc.)
---
## ⚠️ Disclaimer
This indicator is for educational purposes only. It does not constitute financial advice. Always do your own analysis and manage your risk properly. Past performance does not guarantee future results.
---
## 📝 Release Notes
**v8**
- Added LuxAlgo-style FVG detection with Auto Threshold
- Added Multi-Timeframe FVG support
- Improved IFVG logic — proper inversion detection
- Added Consequent Encroachment (CE) line for IFVGs
- Fixed fill tracking to not interfere with inversion
- Added Volume Imbalance detection
- Added AMD phase detection
- Multiple theme presets
---
## 💬 Feedback
If you find this indicator helpful, please leave a like and comment! Your feedback helps improve future versions.
**Tags:** #SMC #ICT #FVG #IFVG #SmartMoney #OrderFlow #LiquiditySweep #AMD #PriceAction #InstitutionalTrading
MTF Market Bias & Alignment Dashboard📊 Multi-Timeframe Market Bias Dashboard (Bullish / Bearish)
Overview
The Multi-Timeframe Market Bias Dashboard is an original professional decision-support indicator designed to instantly display bullish or bearish market conditions across higher, intraday, and lower timeframes—all in one compact, movable dashboard.
Instead of manually switching between timeframes and mentally tracking trend conditions, this indicator consolidates that information into a single visual panel, allowing traders to assess market alignment, conflicts, strength, and confidence at a glance.
This tool is intended to save time, reduce analysis friction, and improve directional clarity, especially for traders who incorporate multi-timeframe analysis into their strategy.
🔹 Timeframe Grouping Logic
The indicator automatically analyzes and groups timeframes into three sections:
Higher Timeframe (HTF)
Monthly
Weekly
Intraday Timeframe (ITF)
Daily
4 Hour
1 Hour
Lower Timeframe (LTF)
15 Minute
5 Minute
3 Minute
Each timeframe is evaluated independently and displayed as Bullish, Bearish, or Neutral, and each group produces an aggregated bias based on the average state of its included timeframes.
🔹 Market Bias Determination
For each timeframe, the indicator determines trend direction using:
Multi-EMA confirmation (trend structure validation)
Trend slope and continuation logic
Price position relative to key EMAs
Group Bias Rules:
All bullish → Bullish
All bearish → Bearish
Mixed signals → Neutral
This ensures clear, logical classification without repainting or timeframe dependency.
🔹 Confidence Scoring
Each group includes a confidence score, reflecting:
Strength of trend agreement across timeframes
EMA alignment consistency
Momentum confirmation
This allows traders to quickly distinguish between:
High-confidence directional environments
Choppy or mixed-signal conditions
🔹 Trend Strength Classification
Trend strength is displayed as:
Strong
Weak
Strength is calculated using:
EMA separation
Directional persistence
Volatility normalization
This helps identify whether a bullish or bearish bias is decisive or fragile.
🔹 Alignment & Conflict Detection
The dashboard automatically highlights:
HTF / ITF / LTF alignment
Higher-timeframe vs lower-timeframe conflicts
Alerts include:
Alignment confirmations (trend stacking)
Conflict warnings when lower timeframes oppose higher-timeframe bias
This feature is especially useful for:
Avoiding counter-trend trades
Timing pullbacks within dominant trends
🔹 Real-Time, Non-Repainting Behavior
Timeframe data is locked to its native resolution
Values do not change when switching chart timeframes
Updates only occur when the underlying timeframe structure genuinely changes
This ensures reliability and consistency across all chart views.
🔹 Visual Dashboard
Clean, modern table-style interface
Fully movable and adjustable on the chart
Color-coded bias, confidence, and strength indicators
Designed for clarity without clutter
⚠️ Important Notes
This indicator is not a trading strategy
It does not provide buy or sell signals
It is a context and bias tool meant to support discretionary or systematic trading decisions
✅ Best Use Cases
Multi-timeframe trend traders
Intraday traders aligning with higher-timeframe bias
Scalpers filtering trades based on HTF direction
Traders who want instant market context without chart hopping
⚠️ Disclaimer
This indicator is a technical analysis tool and does not constitute financial advice. Always manage risk responsibly.
6:00 PM Open [FocusBro] @MaxMaserati
MMM 18:00 OPEN @FocusBro @MaxMaserati is a specialized institutional trading tool derived directly from the proven Max Maserati Model (MMM) framework. This indicator was built to execute the specific strategy used by Focus Bro, a top MMM student who generated over $200,000 from PropFirms by mastering the critical dynamics of the 18:00 ET session.
Unlike standard session indicators, this tool focuses on the "Anchor Point" of the futures trading day, providing the exact context needed to replicate high-probability setups in the post-market and overnight sessions.
🚀 Key Features
1. The Focus Bro "Anchor" System
Session Box: Automatically draws a customizable range box for the 18:00 ET opening candle, extending forward to visualize the session's initial balance.
OHLC Lines: Projects Open, High, Low, and Close lines from the 18:00 candle into the future, acting as the key pivots for the strategy.
Settlement Line: Projects the previous day's Settlement Price forward (+5 bars) to instantly spot the "Gap & Go" plays that are central to the Focus Bro approach.
Bias Coloring: Dynamic coloring (Green/Red) based on whether the 18:00 candle was Bullish or Bearish.
2. Institutional Gap Analysis (13:00 - 20:00 Window)
Detects specific "Fair Value" anomalies during the critical PM session window (1:00 PM – 8:00 PM ET):
UPG (Unfair Pricing Gaps): Highlights rapid moves that skipped price discovery.
OG (Opening Gaps): Marks gaps formed specifically at the open of new candles.
VI (Volume Imbalances): Identifies overlapping candle wicks/bodies that indicate unfinished business.
Auto-Cleanup: Features an optional "Hide Filled" mode to keep your chart clean by removing gaps once price has rebalanced them.
3. Higher Timeframe (HTF) Integration
Multi-Timeframe Gaps: Displays UPGs from higher timeframes (default 15m) directly on your lower timeframe chart.
Contextual Labels: Clearly labels gaps with their timeframe origin (e.g., "UPG 15", "UPG 60").
4. Professional Analysis Table
A sleek, deep-black data table provides real-time institutional metrics:
Open Price & Bias: Instant read on whether the market is Bullish or Bearish relative to the 18:00 Open.
Gap Context: Analyzes the gap between the 17:00 Close and 18:00 Open (Gap Up/Down/Flat) and current price position relative to it.
Settlement Status: Tracks if price is holding above or below the official Settlement level.
Volume Momentum: Compares 18:00 volume vs. 16:59 volume to gauge institutional participation strength.
Initial Balance: Tracks the 18:00–19:00 range status (Forming vs. Done).
🛠️ Customization
Fully Modular: Toggle every element On/Off (Box, Individual OHLC Lines, Gaps).
Smart Styling: Control colors, line styles (Solid/Dotted), widths, and text sizes for every component.
MMM Candle Logic: Optional candle coloring based on "MMM Concepts" (Neutral/Expanders) to visualize market state.
FOCUS all in one (N-TABLOUH)It took me hours and hours to build this indicator
so it shows the important stuff we need to watch as traders! Here you see a price label with a countdown,
how much the asset has retraced from its high or low,
and the total session range.
You also get 4h separators to show the move, keeping you aware of the 4/8 or 12h window. Plus, there is a table showing the assets you want to trade so we don't have to go flip charts and waste time
Fair Value Gaps & Order Blocks by MiraajTech Academy
Unlock the power of Institutional Order Flow with MiraajTech Academy custom SMC Indicator.
The Fair Value Gaps & Order Blocks by MiraajTech Academy-indicator is specifically designed to help traders identify where "Big Money" is entering the market. Instead of guessing where support and resistance might be, this script mathematically calculates high-probability zones based on volume and price inefficiencies.
🔍 Key Features
Smart Order Blocks (OB): Automatically detects the last candle before a significant move. These zones act as "supply" or "demand" areas where institutions have left their footprints.
Fair Value Gaps (FVG): Highlights price imbalances (gaps) that the market often seeks to "fill" before continuing its trend.
Volume Metrics: Displays the actual volume traded within each zone, giving you a clear signal of how "heavy" a level is.
Mitigation Tracking: The script knows when a zone has been "tapped" or broken, cleaning up your chart so you only focus on relevant, fresh levels.
Breaker Structures: Identifies when an old support zone turns into new resistance (and vice versa).
🛠️ How it helps you trade
Identify Support/Resistance: Use the Bullish (Green) and Bearish (Red) zones to find precise entry and exit points.
Price Magnet: Use the FVG (Imbalance) zones as targets. Price loves to return to these areas to balance the market.
Trend Confirmation: When price respects a Volume Zone and moves away with high volume, you have confirmation of the trend direction.
📥 How to get access
This indicator is exclusive to the MiraajTech Trading Academy community.
Sign up: Join our Limited Free Membership on Whop.
TradingView Username: Drop your TradingView username in the designated area on Whop.
Activate: You will find the script under "Indicators" -> "Invite-only scripts" on your TradingView chart once we have granted you access.
Link: whop.com
Multi Market VWAP SystemMulti‑VWAP — Adaptive, Multi‑Session Anchored VWAP Suite
Multi‑VWAP is a comprehensive, multi‑session Volume‑Weighted Average Price engine designed for traders who rely on precise, session‑aware VWAP levels across equities, futures, and crypto.
Built for Pine Script v6, it handles complex market structures, custom anchor dates, and non‑standard trading sessions with robust error‑tolerant logic.
What This Indicator Does
This tool calculates and displays a full suite of anchored VWAPs, including:
Standard Period VWAPs
- Daily
- Weekly
- Monthly
- Yearly
To‑Date VWAPs
- Week‑to‑Date (WTD)
- Month‑to‑Date (MTD)
- Year‑to‑Date (YTD)
Custom Anchored VWAP
- Anchor to any user‑selected date
- Automatically recalculates from the first bar of that date
- Works across all markets, including 24/7 crypto
Multi‑Day Rolling VWAPs
Optional rolling VWAPs for:
- 2‑day
- 3‑day
- 4‑day
- 5‑day
- 10‑day
- 20‑day
- 50‑day
Each VWAP can be toggled individually for a clean, customizable chart.
Key Features
✔ Market‑Adaptive Session Handling
Automatically adjusts for:
- Regular equities sessions
- Futures extended hours
- 24/7 crypto markets
- Holidays (via MarketHolidays library)
✔ Clean, Efficient, Pine v6 Architecture
- No deprecated functions
- No array overflows
- No undefined variables
- Defensive programming for unsupported markets
- Optimized for performance on lower‑timeframe charts
✔ Visual Clarity & Control
- Independent color and visibility toggles
- Optional labels showing VWAP values
- Smart timestamp anchoring for all VWAP types
- Minimal chart clutter with maximum information density
Who This Indicator Is For
This tool is ideal for traders who rely on VWAP structure for:
- Intraday mean‑reversion
- Swing anchoring
- Multi‑session bias
- Institutional level mapping
- Crypto VWAP structure where no “session” exists
If you use VWAP as a core part of your workflow, this script gives you the flexibility and precision needed for modern multi‑market trading.
Notes
- This script does not repaint.
- All VWAPs are calculated using standard cumulative volume‑weighted methodology.
- Custom date VWAP begins at the first bar of the selected date on the chart’s timeframe.






















