DeltaFlow Volume Profile [BigBeluga]🔵 OVERVIEW
The DeltaFlow Volume Profile builds a compact volume profile next to price and enriches every bin with flow context : bullish vs. bearish participation (%), a per-bin Delta % , an optional Delta Heat Map , and a PoC band with the bin’s absolute volume. This lets you see not just where volume clustered, but who (buyers or sellers) dominated inside each price slice.
🔵 CONCEPTS
Binned Volume Profile : Price range over a user-defined LookBack is split into Bins ; each bin aggregates traded volume.
Bull/Bear Split : Within every bin, volume is separated by candle direction into Bull Volume and Bear Volume , then normalized to % of the bin’s displayed size.
Delta % : The difference between Bull % and Bear % for the bin. Positive = buyer dominance; negative = seller dominance.
Delta Heat Map : Bin background shading that scales with both total volume strength and delta bias.
PoC (Point of Control) : The most significant bin gets a PoC band and a label with its absolute volume.
🔵 FEATURES
Profile with Flow : A clean horizontal volume bar per bin plus stacked Bull % and Bear % .
Per-Bin Delta Label : A readable “Δ xx%” tag at the start of each bin shows dominance at a glance.
Delta Heat Map : Optional gradient that intensifies with higher volume and stronger delta.
PoC Highlight : Optional PoC band colored separately, labeled with absolute volume (e.g., “1.23M”).
Configurable Inputs : LookBack, number of Bins (10–100), toggles for Delta, Heat Map, Volume Bars, and PoC color.
Readable Colors : Separate inputs for bullish (volume +) and bearish (volume –) hues.
🔵 HOW TO USE
Set the window : Choose LookBack and Bins to balance detail vs. performance (more bins = finer resolution).
Enable “Volume Bars” to display the bull/bear split as two stacked percent bars inside each bin.
High Bull % near support → constructive demand.
High Bear % near resistance → active supply.
Use Δ labels (toggle “Delta”) to quickly spot bins with clear buyer/seller control; combine with price position for confluence.
Turn on Delta Heat Map to prioritize areas with both large volume and strong imbalance.
Watch the PoC : The PoC band marks the most traded (and often magnet) level; its label shows absolute size for context.
Trade ideas :
Breakout continuation when Δ stays positive across consecutive upper bins.
Reversion risk when price enters a large bearish-Δ cluster below.
Manage risk around the PoC; reactions there can be sharp.
🔵 CONCLUSION
DeltaFlow Volume Profile upgrades a classic profile with flow intelligence. The bull/bear split, explicit Δ %, heat-weighted backdrop, and PoC volume label make dominant participation and key price shelves obvious. Use it to filter levels, time entries with imbalance, and validate breakouts or fades with objective volume-flow evidence.
อินดิเคเตอร์และกลยุทธ์
order block new 113/// This work is licensed under a Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) creativecommons.org
// © RUDYBANK INDICATOR - formerly know as RUDY INDICATOR
//@version=5
indicator("Price Action Concepts ", shorttitle = "RUDYINDICATOR-V1
- Price Action RUDYINDICATOR ", overlay = true, max_lines_count = 500, max_labels_count = 500, max_boxes_count = 500, max_bars_back = 500, max_polylines_count = 100)
//-----------------------------------------------------------------------------{
//Boolean set
//-----------------------------------------------------------------------------{
s_BOS = 0
s_CHoCH = 1
i_BOS = 2
i_CHoCH = 3
i_pp_CHoCH = 4
green_candle = 5
red_candle = 6
s_CHoCHP = 7
i_CHoCHP = 8
boolean =
array.from(
false
, false
, false
, false
, false
, false
, false
, false
, false
)
//-----------------------------------------------------------------------------{
// User inputs
//-----------------------------------------------------------------------------{
show_swing_ms = input.string ("All" , "Swing        " , inline = "1", group = "MARKET STRUCTURE" , options = )
show_internal_ms = input.string ("All" , "Internal     " , inline = "2", group = "MARKET STRUCTURE" , options = )
internal_r_lookback = input.int (5 , "" , inline = "2", group = "MARKET STRUCTURE" , minval = 2)
swing_r_lookback = input.int (50 , "" , inline = "1", group = "MARKET STRUCTURE" , minval = 2)
ms_mode = input.string ("Manual" , "Market Structure Mode" , inline = "a", group = "MARKET STRUCTURE" , tooltip = " Use selected lenght Use automatic lenght" ,options = )
show_mtf_str = input.bool (true , "MTF Scanner" , inline = "9", group = "MARKET STRUCTURE" , tooltip = "Display Multi-Timeframe Market Structure Trend Directions. Green = Bullish. Red = Bearish")
show_eql = input.bool (false , "Show EQH/EQL" , inline = "6", group = "MARKET STRUCTURE")
plotcandle_bool = input.bool (false , "Plotcandle" , inline = "3", group = "MARKET STRUCTURE" , tooltip = "Displays a cleaner colored candlestick chart in place of the default candles. (requires hiding the current ticker candles)")
barcolor_bool = input.bool (false , "Bar Color" , inline = "4", group = "MARKET STRUCTURE" , tooltip = "Color the candle bodies according to market strucutre trend")
i_ms_up_BOS = input.color (#089981 , "" , inline = "2", group = "MARKET STRUCTURE")
i_ms_dn_BOS = input.color (#f23645 , "" , inline = "2", group = "MARKET STRUCTURE")
s_ms_up_BOS = input.color (#089981 , "" , inline = "1", group = "MARKET STRUCTURE")
s_ms_dn_BOS = input.color (#f23645 , "" , inline = "1", group = "MARKET STRUCTURE")
lvl_daily = input.bool (false , "Day   " , inline = "1", group = "HIGHS & LOWS MTF")
lvl_weekly = input.bool (false , "Week " , inline = "2", group = "HIGHS & LOWS MTF")
lvl_monthly = input.bool (false , "Month" , inline = "3", group = "HIGHS & LOWS MTF")
lvl_yearly = input.bool (false , "Year  " , inline = "4", group = "HIGHS & LOWS MTF")
css_d = input.color (color.blue , "" , inline = "1", group = "HIGHS & LOWS MTF")
css_w = input.color (color.blue , "" , inline = "2", group = "HIGHS & LOWS MTF")
css_m = input.color (color.blue , "" , inline = "3", group = "HIGHS & LOWS MTF")
css_y = input.color (color.blue , "" , inline = "4", group = "HIGHS & LOWS MTF")
s_d = input.string ('⎯⎯⎯' , '' , inline = '1', group = 'HIGHS & LOWS MTF' , options = )
s_w = input.string ('⎯⎯⎯' , '' , inline = '2', group = 'HIGHS & LOWS MTF' , options = )
s_m = input.string ('⎯⎯⎯' , '' , inline = '3', group = 'HIGHS & LOWS MTF' , options = )
s_y = input.string ('⎯⎯⎯' , '' , inline = '4', group = 'HIGHS & LOWS MTF' , options = )
ob_show = input.bool (true , "Show Last    " , inline = "1", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Display volumetric order blocks on the chart Ammount of volumetric order blocks to show")
ob_num = input.int (5 , "" , inline = "1", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Orderblocks number", minval = 1, maxval = 10)
ob_metrics_show = input.bool (true , "Internal Buy/Sell Activity" , inline = "2", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Display volume metrics that have formed the orderblock")
css_metric_up = input.color (color.new(#089981, 50) , "         " , inline = "2", group = "VOLUMETRIC ORDER BLOCKS")
css_metric_dn = input.color (color.new(#f23645 , 50) , "" , inline = "2", group = "VOLUMETRIC ORDER BLOCKS")
ob_swings = input.bool (false , "Swing Order Blocks" , inline = "a", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Display swing volumetric order blocks")
css_swing_up = input.color (color.new(color.gray , 90) , "                 " , inline = "a", group = "VOLUMETRIC ORDER BLOCKS")
css_swing_dn = input.color (color.new(color.silver, 90) , "" , inline = "a", group = "VOLUMETRIC ORDER BLOCKS")
ob_filter = input.string ("None" , "Filtering             " , inline = "d", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Filter out volumetric order blocks by BOS/CHoCH/CHoCH+", options = )
ob_mitigation = input.string ("Absolute" , "Mitigation           " , inline = "4", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Trigger to remove volumetric order blocks", options = )
ob_pos = input.string ("Precise" , "Positioning          " , inline = "k", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Position of the Order Block Cover the whole candle Cover half candle Adjust to volatility Same as Accurate but more precise", options = )
use_grayscale = input.bool (false , "Grayscale" , inline = "6", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Use gray as basic order blocks color")
use_show_metric = input.bool (true , "Show Metrics" , inline = "7", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Show volume associated with the orderblock and his relevance")
use_middle_line = input.bool (true , "Show Middle-Line" , inline = "8", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Show mid-line order blocks")
use_overlap = input.bool (true , "Hide Overlap" , inline = "9", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Hide overlapping order blocks")
use_overlap_method = input.string ("Previous" , "Overlap Method    " , inline = "Z", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = " Preserve the most recent volumetric order blocks Preserve the previous volumetric order blocks", options = )
ob_bull_css = input.color (color.new(#089981 , 90) , "" , inline = "1", group = "VOLUMETRIC ORDER BLOCKS")
ob_bear_css = input.color (color.new(#f23645 , 90) , "" , inline = "1", group = "VOLUMETRIC ORDER BLOCKS")
show_acc_dist_zone = input.bool (false , "" , inline = "1", group = "Accumulation And Distribution")
zone_mode = input.string ("Fast" , "" , inline = "1", group = "Accumulation And Distribution" , tooltip = " Find small zone pattern formation Find bigger zone pattern formation" ,options = )
acc_css = input.color (color.new(#089981 , 60) , "" , inline = "1", group = "Accumulation And Distribution")
dist_css = input.color (color.new(#f23645 , 60) , "" , inline = "1", group = "Accumulation And Distribution")
show_lbl = input.bool (false , "Show swing point" , inline = "1", group = "High and Low" , tooltip = "Display swing point")
show_mtb = input.bool (false , "Show High/Low/Equilibrium" , inline = "2", group = "High and Low" , tooltip = "Display Strong/Weak High And Low and Equilibrium")
toplvl = input.color (color.red , "Premium Zone   " , inline = "3", group = "High and Low")
midlvl = input.color (color.gray , "Equilibrium Zone" , inline = "4", group = "High and Low")
btmlvl = input.color (#089981 , "Discount Zone    " , inline = "5", group = "High and Low")
fvg_enable = input.bool (false , "        " , inline = "1", group = "FAIR VALUE GAP" , tooltip = "Display fair value gap")
what_fvg = input.string ("FVG" , "" , inline = "1", group = "FAIR VALUE GAP" , tooltip = "Display fair value gap", options = )
fvg_num = input.int (5 , "Show Last  " , inline = "1a", group = "FAIR VALUE GAP" , tooltip = "Number of fvg to show")
fvg_upcss = input.color (color.new(#089981, 80) , "" , inline = "1", group = "FAIR VALUE GAP")
fvg_dncss = input.color (color.new(color.red , 80) , "" , inline = "1", group = "FAIR VALUE GAP")
fvg_extend = input.int (10 , "Extend FVG" , inline = "2", group = "FAIR VALUE GAP" , tooltip = "Extend the display of the FVG.")
fvg_src = input.string ("Close" , "Mitigation  " , inline = "3", group = "FAIR VALUE GAP" , tooltip = " Use the close of the body as trigger Use the extreme point of the body as trigger", options = )
fvg_tf = input.timeframe ("" , "Timeframe " , inline = "4", group = "FAIR VALUE GAP" , tooltip = "Timeframe of the fair value gap")
t = color.t (ob_bull_css)
invcol = color.new (color.white , 100)
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - UDT }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
type bar
float o = open
float c = close
float h = high
float l = low
float v = volume
int n = bar_index
int t = time
type Zphl
line top
line bottom
label top_label
label bottom_label
bool stopcross
bool sbottomcross
bool itopcross
bool ibottomcross
string txtup
string txtdn
float topy
float bottomy
float topx
float bottomx
float tup
float tdn
int tupx
int tdnx
float itopy
float itopx
float ibottomy
float ibottomx
float uV
float dV
type FVG
box box
line ln
bool bull
float top
float btm
int left
int right
type ms
float p
int n
float l
type msDraw
int n
float p
color css
string txt
bool bull
type obC
float top
float btm
int left
float avg
float dV
float cV
int wM
int blVP
int brVP
int dir
float h
float l
int n
type obD
box ob
box eOB
box blB
box brB
line mL
type zone
chart.point points
float p
int c
int t
type hqlzone
box pbx
box ebx
box lbx
label plb
label elb
label lbl
type ehl
float pt
int t
float pb
int b
type pattern
string found = "None"
bool isfound = false
int period = 0
bool bull = false
type alerts
bool chochswing = false
bool chochplusswing = false
bool swingbos = false
bool chochplus = false
bool choch = false
bool bos = false
bool equal = false
bool ob = false
bool swingob = false
bool zone = false
bool fvg = false
bool obtouch = false
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - End }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - General Setup }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
bar b = bar.new()
var pattern p = pattern.new()
alerts blalert = alerts.new()
alerts bralert = alerts.new()
if p.isfound
p.period += 1
if p.period == 50
p.period := 0
p.found := "None"
p.isfound := false
p.bull := na
switch
b.c > b.o => boolean.set(green_candle, true)
b.c < b.o => boolean.set(red_candle , true)
f_zscore(src, lookback) =>
(src - ta.sma(src, lookback)) / ta.stdev(src, lookback)
var int iLen = internal_r_lookback
var int sLen = swing_r_lookback
vv = f_zscore(((close - close ) / close ) * 100,iLen)
if ms_mode == "Dynamic"
switch
vv >= 1.5 or vv <= -1.5 => iLen := 10
vv >= 1.6 or vv <= -1.6 => iLen := 9
vv >= 1.7 or vv <= -1.7 => iLen := 8
vv >= 1.8 or vv <= -1.8 => iLen := 7
vv >= 1.9 or vv <= -1.9 => iLen := 6
vv >= 2.0 or vv <= -2.0 => iLen := 5
=> iLen
var msline = array.new(0)
iH = ta.pivothigh(high, iLen, iLen)
sH = ta.pivothigh(high, sLen, sLen)
iL = ta.pivotlow (low , iLen, iLen)
sL = ta.pivotlow (low , sLen, sLen)
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - End }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - ARRAYS }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
hl () =>
= request.security(syminfo.tickerid , 'D' , hl() , lookahead = barmerge.lookahead_on)
= request.security(syminfo.tickerid , 'W' , hl() , lookahead = barmerge.lookahead_on)
= request.security(syminfo.tickerid , 'M' , hl() , lookahead = barmerge.lookahead_on)
= request.security(syminfo.tickerid , '12M', hl() , lookahead = barmerge.lookahead_on)
lstyle(style) =>
out = switch style
'⎯⎯⎯' => line.style_solid
'----' => line.style_dashed
'····' => line.style_dotted
mtfphl(h, l ,tf ,css, pdhl_style) =>
var line hl = line.new(
na
, na
, na
, na
, xloc = xloc.bar_time
, color = css
, style = lstyle(pdhl_style)
)
var line ll = line.new(
na
, na
, na
, na
, xloc = xloc.bar_time
, color = css
, style = lstyle(pdhl_style)
)
var label lbl = label.new(
na
, na
, xloc = xloc.bar_time
, text = str.format('P{0}L', tf)
, color = invcol
, textcolor = css
, size = size.small
, style = label.style_label_left
)
var label hlb = label.new(
na
, na
, xloc = xloc.bar_time
, text = str.format('P{0}H', tf)
, color = invcol
, textcolor = css
, size = size.small
, style = label.style_label_left
)
hy = ta.valuewhen(h != h , h , 1)
hx = ta.valuewhen(h == high , time , 1)
ly = ta.valuewhen(l != l , l , 1)
lx = ta.valuewhen(l == low , time , 1)
if barstate.islast
extension = time + (time - time ) * 50
line.set_xy1(hl , hx , hy)
line.set_xy2(hl , extension , hy)
label.set_xy(hlb, extension , hy)
line.set_xy1(ll , lx , ly)
line.set_xy2(ll , extension , ly)
label.set_xy(lbl, extension , ly)
if lvl_daily
mtfphl(pdh , pdl , 'D' , css_d, s_d)
if lvl_weekly
mtfphl(pwh , pwl , 'W' , css_w, s_w)
if lvl_monthly
mtfphl(pmh , pml, 'M' , css_m, s_m)
if lvl_yearly
mtfphl(pyh , pyl , '12M', css_y, s_y)
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - End }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - Market Structure }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
method darkcss(color css, float factor, bool bull) =>
blue = color.b(css) * (1 - factor)
red = color.r(css) * (1 - factor)
green = color.g(css) * (1 - factor)
color.rgb(red, green, blue, 0)
method f_line(msDraw d, size, style) =>
var line id = na
var label lbl = na
id := line.new(
d.n
, d.p
, b.n
, d.p
, color = d.css
, width = 1
, style = style
)
if msline.size() >= 250
line.delete(msline.shift())
msline.push(id)
lbl := label.new(
int(math.avg(d.n, b.n))
, d.p
, d.txt
, color = invcol
, textcolor = d.css
, style = d.bull ? label.style_label_down : label.style_label_up
, size = size
, text_font_family = font.family_monospace
)
structure(bool mtf) =>
msDraw drw = na
bool isdrw = false
bool isdrwS = false
var color css = na
var color icss = na
var int itrend = 0
var int trend = 0
bool bull_ob = false
bool bear_ob = false
bool s_bull_ob = false
bool s_bear_ob = false
n = bar_index
var ms up = ms.new(
array.new()
, array.new< int >()
, array.new()
)
var ms dn = ms.new(
array.new()
, array.new< int >()
, array.new()
)
var ms sup = ms.new(
array.new()
, array.new< int >()
, array.new()
)
var ms sdn = ms.new(
array.new()
, array.new< int >()
, array.new()
)
switch show_swing_ms
"All" => boolean.set(s_BOS , true ), boolean.set(s_CHoCH, true ) , boolean.set(s_CHoCHP, true )
"CHoCH" => boolean.set(s_BOS , false), boolean.set(s_CHoCH, true ) , boolean.set(s_CHoCHP, false )
"CHoCH+" => boolean.set(s_BOS , false), boolean.set(s_CHoCH, false) , boolean.set(s_CHoCHP, true )
"BOS" => boolean.set(s_BOS , true ), boolean.set(s_CHoCH, false) , boolean.set(s_CHoCHP, false )
"None" => boolean.set(s_BOS , false), boolean.set(s_CHoCH, false) , boolean.set(s_CHoCHP, false )
=> na
switch show_internal_ms
"All" => boolean.set(i_BOS, true ), boolean.set(i_CHoCH, true ), boolean.set(i_CHoCHP, true )
"CHoCH" => boolean.set(i_BOS, false), boolean.set(i_CHoCH, true ), boolean.set(i_CHoCHP, false)
"CHoCH+" => boolean.set(i_BOS, false), boolean.set(i_CHoCH, false ), boolean.set(i_CHoCHP, true )
"BOS" => boolean.set(i_BOS, true ), boolean.set(i_CHoCH, false ), boolean.set(i_CHoCHP, false)
"None" => boolean.set(i_BOS, false), boolean.set(i_CHoCH, false ), boolean.set(i_CHoCHP, false)
=> na
switch
iH =>
up.p.unshift(b.h )
up.l.unshift(b.h )
up.n.unshift(n )
iL =>
dn.p.unshift(b.l )
dn.l.unshift(b.l )
dn.n.unshift(n )
sL =>
sdn.p.unshift(b.l )
sdn.l.unshift(b.l )
sdn.n.unshift(n )
sH =>
sup.p.unshift(b.h )
sup.l.unshift(b.h )
sup.n.unshift(n )
// INTERNAL BULLISH STRUCTURE
if up.p.size() > 0 and dn.l.size() > 1
if ta.crossover(b.c, up.p.first())
bool CHoCH = na
string txt = na
if itrend < 0
CHoCH := true
switch
not CHoCH =>
txt := "BOS"
css := i_ms_up_BOS
blalert.bos := true
if boolean.get(i_BOS) and mtf == false and na(drw)
isdrw := true
drw := msDraw.new(
up.n.first()
, up.p.first()
, i_ms_up_BOS
, txt
, true
)
CHoCH =>
dn.l.first() > dn.l.get(1) ? blalert.chochplus : blalert.choch
txt := dn.l.first() > dn.l.get(1) ? "CHoCH+" : "CHoCH"
css := i_ms_up_BOS.darkcss(0.25, true)
if (dn.l.first() > dn.l.get(1) ? boolean.get(i_CHoCHP) : boolean.get(i_CHoCH)) and mtf == false and na(drw)
isdrw := true
drw := msDraw.new(
up.n.first()
, up.p.first()
, i_ms_up_BOS.darkcss(0.25, true)
, txt
, true
)
if mtf == false
switch
ob_filter == "None" => bull_ob := true
ob_filter == "BOS" and txt == "BOS" => bull_ob := true
ob_filter == "CHoCH" and txt == "CHoCH" => bull_ob := true
ob_filter == "CHoCH+" and txt == "CHoCH+" => bull_ob := true
itrend := 1
up.n.clear()
up.p.clear()
// INTERNAL BEARISH STRUCTURE
if dn.p.size() > 0 and up.l.size() > 1
if ta.crossunder(b.c, dn.p.first())
bool CHoCH = na
string txt = na
if itrend > 0
CHoCH := true
switch
not CHoCH =>
bralert.bos := true
txt := "BOS"
css := i_ms_dn_BOS
if boolean.get(i_BOS) and mtf == false and na(drw)
isdrw := true
drw := msDraw.new(
dn.n.first()
, dn.p.first()
, i_ms_dn_BOS
, txt
, false
)
CHoCH =>
if up.l.first() < up.l.get(1)
bralert.chochplus := true
else
bralert.choch := true
txt := up.l.first() < up.l.get(1) ? "CHoCH+" : "CHoCH"
css := i_ms_dn_BOS.darkcss(0.25, false)
if (up.l.first() < up.l.get(1) ? boolean.get(i_CHoCHP) : boolean.get(i_CHoCH)) and mtf == false and na(drw)
isdrw := true
drw := msDraw.new(
dn.n.first()
, dn.p.first()
, i_ms_dn_BOS.darkcss(0.25, false)
, txt
, false
)
if mtf == false
switch
ob_filter == "None" => bear_ob := true
ob_filter == "BOS" and txt == "BOS" => bear_ob := true
ob_filter == "CHoCH" and txt == "CHoCH" => bear_ob := true
ob_filter == "CHoCH+" and txt == "CHoCH+" => bear_ob := true
itrend := -1
dn.n.clear()
dn.p.clear()
// SWING BULLISH STRUCTURE
if sup.p.size() > 0 and sdn.l.size() > 1
if ta.crossover(b.c, sup.p.first())
bool CHoCH = na
string txt = na
if trend < 0
CHoCH := true
switch
not CHoCH =>
blalert.swingbos := true
txt := "BOS"
icss := s_ms_up_BOS
if boolean.get(s_BOS) and mtf == false and na(drw)
isdrwS := true
drw := msDraw.new(
sup.n.first()
, sup.p.first()
, s_ms_up_BOS
, txt
, true
)
CHoCH =>
if sdn.l.first() > sdn.l.get(1)
blalert.chochplusswing := true
else
blalert.chochswing := true
txt := sdn.l.first() > sdn.l.get(1) ? "CHoCH+" : "CHoCH"
icss := s_ms_up_BOS.darkcss(0.25, true)
if (sdn.l.first() > sdn.l.get(1) ? boolean.get(s_CHoCHP) : boolean.get(s_CHoCH)) and mtf == false and na(drw)
isdrwS := true
drw := msDraw.new(
sup.n.first()
, sup.p.first()
, s_ms_up_BOS.darkcss(0.25, true)
, txt
, true
)
if mtf == false
switch
ob_filter == "None" => s_bull_ob := true
ob_filter == "BOS" and txt == "BOS" => s_bull_ob := true
ob_filter == "CHoCH" and txt == "CHoCH" => s_bull_ob := true
ob_filter == "CHoCH+" and txt == "CHoCH+" => s_bull_ob := true
trend := 1
sup.n.clear()
sup.p.clear()
// SWING BEARISH STRUCTURE
if sdn.p.size() > 0 and sup.l.size() > 1
if ta.crossunder(b.c, sdn.p.first())
bool CHoCH = na
string txt = na
if trend > 0
CHoCH := true
switch
not CHoCH =>
bralert.swingbos := true
txt := "BOS"
icss := s_ms_dn_BOS
if boolean.get(s_BOS) and mtf == false and na(drw)
isdrwS := true
drw := msDraw.new(
sdn.n.first()
, sdn.p.first()
, s_ms_dn_BOS
, txt
, false
)
CHoCH =>
if sup.l.first() < sup.l.get(1)
bralert.chochplusswing := true
else
bralert.chochswing := true
txt := sup.l.first() < sup.l.get(1) ? "CHoCH+" : "CHoCH"
icss := s_ms_dn_BOS.darkcss(0.25, false)
if (sup.l.first() < sup.l.get(1) ? boolean.get(s_CHoCHP) : boolean.get(s_CHoCH)) and mtf == false and na(drw)
isdrwS := true
drw := msDraw.new(
sdn.n.first()
, sdn.p.first()
, s_ms_dn_BOS.darkcss(0.25, false)
, txt
, false
)
if mtf == false
switch
ob_filter == "None" => s_bear_ob := true
ob_filter == "BOS" and txt == "BOS" => s_bear_ob := true
ob_filter == "CHoCH" and txt == "CHoCH" => s_bear_ob := true
ob_filter == "CHoCH+" and txt == "CHoCH+" => s_bear_ob := true
trend := -1
sdn.n.clear()
sdn.p.clear()
= structure(false)
if isdrw
f_line(drw, size.small, line.style_dashed)
if isdrwS
f_line(drw, size.small, line.style_solid)
= request.security("", "15" , structure(true))
= request.security("", "60" , structure(true))
= request.security("", "240" , structure(true))
= request.security("", "1440" , structure(true))
if show_mtf_str
var tab = table.new(position = position.top_right, columns = 10, rows = 10, bgcolor = na, frame_color = color.rgb(54, 58, 69, 0), frame_width = 1, border_color = color.rgb(54, 58, 69, 100), border_width = 1)
table.cell(tab, 0, 1, text = "15" , text_color = color.silver, text_halign = text.align_center, text_size = size.normal, bgcolor = chart.bg_color, text_font_family = font.family_monospace, width = 2)
table.cell(tab, 0, 2, text = "1H" , text_color = color.silver, text_halign = text.align_center, text_size = size.normal, bgcolor = chart.bg_color, text_font_family = font.family_monospace, width = 2)
table.cell(tab, 0, 3, text = "4H" , text_color = color.silver, text_halign = text.align_center, text_size = size.normal, bgcolor = chart.bg_color, text_font_family = font.family_monospace, width = 2)
table.cell(tab, 0, 4, text = "1D" , text_color = color.silver, text_halign = text.align_center, text_size = size.normal, bgcolor = chart.bg_color, text_font_family = font.family_monospace, width = 2)
table.cell(tab, 1, 1, text = itrend15 == 1 ? "BULLISH" : itrend15 == -1 ? "BEARISH" : na , text_halign = text.align_center, text_size = size.normal, text_color = itrend15 == 1 ? i_ms_up_BOS.darkcss(-0.25, true) : itrend15 == -1 ? i_ms_dn_BOS.darkcss(0.25, false) : color.gray, bgcolor = chart.bg_color, text_font_family = font.family_monospace)
table.cell(tab, 1, 2, text = itrend1H == 1 ? "BULLISH" : itrend1H == -1 ? "BEARISH" : na , text_halign = text.align_center, text_size = size.normal, text_color = itrend1H == 1 ? i_ms_up_BOS.darkcss(-0.25, true) : itrend1H == -1 ? i_ms_dn_BOS.darkcss(0.25, false) : color.gray, bgcolor = chart.bg_color, text_font_family = font.family_monospace)
table.cell(tab, 1, 3, text = itrend4H == 1 ? "BULLISH" : itrend4H == -1 ? "BEARISH" : na , text_halign = text.align_center, text_size = size.normal, text_color = itrend4H == 1 ? i_ms_up_BOS.darkcss(-0.25, true) : itrend4H == -1 ? i_ms_dn_BOS.darkcss(0.25, false) : color.gray, bgcolor = chart.bg_color, text_font_family = font.family_monospace)
table.cell(tab, 1, 4, text = itrend1D == 1 ? "BULLISH" : itrend1D == -1 ? "BEARISH" : na , text_halign = text.align_center, text_size = size.normal, text_color = itrend1D == 1 ? i_ms_up_BOS.darkcss(-0.25, true) : itrend1D == -1 ? i_ms_dn_BOS.darkcss(0.25, false) : color.gray, bgcolor = chart.bg_color, text_font_family = font.family_monospace)
table.cell(tab, 0, 5, text = "Detected Pattern", text_halign = text.align_center, text_size = size.normal, text_color = color.silver, bgcolor = chart.bg_color, text_font_family = font.family_monospace)
table.cell(tab, 0, 6, text = p.found, text_halign = text.align_center, text_size = size.normal, text_color = na(p.bull) ? color.white : p.bull ? i_ms_up_BOS.darkcss(-0.25, true) : p.bull == false ? i_ms_dn_BOS.darkcss(0.25, false) : na, bgcolor = chart.bg_color, text_font_family = font.family_monospace)
table.merge_cells(tab, 0, 5, 1, 5)
table.merge_cells(tab, 0, 6, 1, 6)
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - End }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - Strong/Weak High/Low And Equilibrium }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
var phl = Zphl.new(
na
, na
, label.new(na , na , color = invcol , textcolor = i_ms_dn_BOS , style = label.style_label_down , size = size.tiny , text = "")
, label.new(na , na , color = invcol , textcolor = i_ms_up_BOS , style = label.style_label_up , size = size.tiny , text = "")
, true
, true
, true
, true
, ""
, ""
, 0
, 0
, 0
, 0
, high
, low
, 0
, 0
, 0
, 0
, 0
, 0
, na
, na
)
zhl(len)=>
upper = ta.highest(len)
lower = ta.lowest(len)
var float out = 0
out := b.h > upper ? 0 : b.l < lower ? 1 : out
top = out == 0 and out != 0 ? b.h : 0
btm = out == 1 and out != 1 ? b.l : 0
= zhl(sLen)
= zhl(iLen)
upphl(trend) =>
var label lbl = label.new(
na
, na
, color = invcol
, textcolor = toplvl
, style = label.style_label_down
, size = size.small
)
if top
phl.stopcross := true
phl.txtup := top > phl.topy ? "HH" : "HL"
if show_lbl
topl = label.new(
b.n - swing_r_lookback
, top
, phl.txtup
, color = invcol
, textcolor = toplvl
, style = label.style_label_down
, size = size.small
)
line.delete(phl.top )
phl.top := line.new(
b.n - sLen
, top
, b.n
, top
, color = toplvl)
phl.topy := top
phl.topx := b.n - sLen
phl.tup := top
phl.tupx := b.n - sLen
if itop
phl.itopcross := true
phl.itopy := itop
phl.itopx := b.n - iLen
phl.tup := math.max(high, phl.tup)
phl.tupx := phl.tup == high ? b.n : phl.tupx
phl.uV := phl.tup != phl.tup ? b.v : phl.uV
if barstate.islast
line.set_xy1(
phl.top
, phl.tupx
, phl.tup
)
line.set_xy2(
phl.top
, b.n + 50
, phl.tup
)
label.set_x(
lbl
, b.n + 50
)
label.set_y(
lbl
, phl.tup
)
dist = math.abs(phl.uV / (phl.uV + phl.dV)) * 100
label.set_text (lbl, trend < 0
? "Strong High | " + str.tostring(phl.uV, format.volume) + " (" + str.tostring(math.round(dist,0)) + "%)"
: "Weak High | " + str.tostring(phl.uV, format.volume) + " (" + str.tostring(math.round(dist,0)) + "%)")
dnphl(trend) =>
var label lbl = label.new(
na
, na
, color = invcol
, textcolor = btmlvl
, style = label.style_label_up
, size = size.small
)
if btm
phl.sbottomcross := true
phl.txtdn := btm > phl.bottomy ? "LH" : "LL"
if show_lbl
btml = label.new(
b.n - swing_r_lookback
, btm, phl.txtdn
, color = invcol
, textcolor = btmlvl
, style = label.style_label_up
, size = size.small
)
line.delete(phl.bottom )
phl.bottom := line.new(
b.n - sLen
, btm
, b.n
, btm
, color = btmlvl
)
phl.bottomy := btm
phl.bottomx := b.n - sLen
phl.tdn := btm
phl.tdnx := b.n - sLen
if ibtm
phl.ibottomcross := true
phl.ibottomy := ibtm
phl.ibottomx := b.n - iLen
phl.tdn := math.min(low, phl.tdn)
phl.tdnx := phl.tdn == low ? b.n : phl.tdnx
phl.dV := phl.tdn != phl.tdn ? b.v : phl.dV
if barstate.islast
line.set_xy1(
phl.bottom
, phl.tdnx
, phl.tdn
)
line.set_xy2(
phl.bottom
, b.n + 50
, phl.tdn
)
label.set_x(
lbl
, b.n + 50
)
label.set_y(
lbl
, phl.tdn
)
dist = math.abs(phl.dV / (phl.uV + phl.dV)) * 100
label.set_text (lbl, trend > 0
? "Strong Low | " + str.tostring(phl.dV, format.volume) + " (" + str.tostring(math.round(dist,0)) + "%)"
: "Weak Low | " + str.tostring(phl.uV, format.volume) + " (" + str.tostring(math.round(dist,0)) + "%)")
midphl() =>
avg = math.avg(phl.bottom.get_y2(), phl.top.get_y2())
var line l = line.new(
y1 = avg
, y2 = avg
, x1 = b.n - sLen
, x2 = b.n + 50
, color = midlvl
, style = line.style_solid
)
var label lbl = label.new(
x = b.n + 50
, y = avg
, text = "Equilibrium"
, style = label.style_label_left
, color = invcol
, textcolor = midlvl
, size = size.small
)
if barstate.islast
more = (phl.bottom.get_x1() + phl.bottom.get_x2()) > (phl.top.get_x1() + phl.top.get_x2()) ? phl.top.get_x1() : phl.bottom.get_x1()
line.set_xy1(l , more , avg)
line.set_xy2(l , b.n + 50, avg)
label.set_x (lbl , b.n + 50 )
label.set_y (lbl , avg )
dist = math.abs((l.get_y2() - close) / close) * 100
label.set_text (lbl, "Equilibrium (" + str.tostring(math.round(dist,0)) + "%)")
hqlzone() =>
if barstate.islast
var hqlzone dZone = hqlzone.new(
box.new(
na
, na
, na
, na
, bgcolor = color.new(toplvl, 70)
, border_color = na
)
, box.new(
na
, na
, na
, na
, bgcolor = color.new(midlvl, 70)
, border_color = na
)
, box.new(
na
, na
, na
, na
, bgcolor = color.new(btmlvl, 70)
, border_color = na
)
, label.new(na, na, text = "Premium" , color = invcol, textcolor = toplvl, style = label.style_label_down, size = size.small)
, label.new(na, na, text = "Equilibrium", color = invcol, textcolor = midlvl, style = label.style_label_left, size = size.small)
, label.new(na, na, text = "Discount" , color = invcol, textcolor = btmlvl, style = label.style_label_up , size = size.small)
)
dZone.pbx.set_lefttop(int(math.max(phl.topx, phl.bottomx)) , phl.tup)
dZone.pbx.set_rightbottom(b.n + 50 , 0.95 * phl.tup + 0.05 * phl.tdn)
dZone.ebx.set_lefttop(int(math.max(phl.topx, phl.bottomx)), 0.525 * phl.tup + 0.475 * phl.tdn)
dZone.ebx.set_rightbottom(b.n + 50 , 0.525 * phl.tdn + 0.475 * phl.tup)
dZone.lbx.set_lefttop(int(math.max(phl.topx, phl.bottomx)), 0.95 * phl.tdn + 0.05 * phl.tup)
dZone.lbx.set_rightbottom(b.n + 50 , phl.tdn)
dZone.plb.set_xy( int(math.avg(math.max(phl.topx, phl.bottomx), int(b.n + 50))) , phl.tup)
dZone.elb.set_xy( int(b.n + 50) , math.avg(phl.tup, phl.tdn))
dZone.lbl.set_xy( int(math.avg(math.max(phl.topx, phl.bottomx), int(b.n + 50))) , phl.tdn)
if show_mtb
upphl (trend)
dnphl (trend)
hqlzone()
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - End }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - Volumetric Order Block }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
method eB(box b, bool ext, color css, bool swing) =>
b.unshift(
box.new(
na
, na
, na
, na
, xloc = xloc.bar_time
, text_font_family = font.family_monospace
, extend = ext ? extend.right : extend.none
, border_color = swing ? color.new(css, 0) : color.new(color.white,100)
, bgcolor = css
, border_width = 1
)
)
method eL(line l, bool ext, bool solid, color css) =>
l.unshift(
line.new(
na
, na
, na
, na
, width = 1
, color = css
, xloc = xloc.bar_time
, extend = ext ? extend.right : extend.none
, style = solid ? line.style_solid : line.style_dashed
)
)
method drawVOB(bool cdn, bool bull, color css, int loc, bool swing) =>
= request.security(
syminfo.tickerid
, ""
,
, lookahead = barmerge.lookahead_off
)
var obC obj = obC.new(
array.new()
, array.new()
, array.new< int >()
, array.new()
, array.new()
, array.new()
, array.new< int >()
, array.new< int >()
, array.new< int >()
, array.new< int >()
, array.new()
, array.new()
, array.new< int >()
)
var obD draw = obD.new(
array.new()
, array.new()
, array.new()
, array.new()
, array.new()
)
if barstate.isfirst
for i = 0 to ob_num - 1
draw.mL .eL(false, false, use_grayscale ? color.new(color.gray, 0) : color.new(css,0))
draw.ob .eB(false, use_grayscale ? color.new(color.gray, 90) : css, swing)
draw.blB.eB(false, css_metric_up , swing)
draw.brB.eB(false, css_metric_dn , swing)
draw.eOB.eB(true , use_grayscale ? color.new(color.gray, 90) : css, swing)
float pos = ob_pos == "Full"
? (bull ? high : low)
: ob_pos == "Middle"
? ohlc4
: ob_pos == "Accurate"
? hl2
: hl2
if cdn
obj.h.clear()
obj.l.clear()
obj.n.clear()
for i = 0 to math.abs((loc - b.n)) - 1
obj.h.push(hH )
obj.l.push(lL )
obj.n.push(b.t )
// obj.h.reverse()
// obj.l.reverse()
int iU = obj.l.indexof(obj.l.min()) + 1
int iD = obj.h.indexof(obj.h.max()) + 1
obj.dir.unshift(
bull
? (b.c > b.o ? 1 : -1)
: (b.c > b.o ? 1 : -1)
)
obj.top.unshift(
bull
? pos
: obj.h.max()
)
obj.btm.unshift(
bull
? obj.l.min()
: pos
)
obj.left.unshift(
bull
? obj.n.get(obj.l.indexof(obj.l.min()))
: obj.n.get(obj.h.indexof(obj.h.max()))
)
obj.avg.unshift(
math.avg(obj.top.first(), obj.btm.first())
)
obj.cV.unshift(
bull
? b.v
: b.v
)
if ob_pos == "Precise"
switch bull
true =>
if obj.avg.get(0) < (b.c < b.o ? b.c : b.o ) and obj.top.get(0) > hlcc4
obj.top.set(0, obj.avg.get(0))
obj.avg.set(0, math.avg(obj.top.first(), obj.btm.first()))
false =>
if obj.avg.get(0) > (b.c < b.o ? b.o : b.c ) and obj.btm.get(0) < hlcc4
obj.btm.set(0, obj.avg.get(0))
obj.avg.set(0, math.avg(obj.top.first(), obj.btm.first()))
obj.blVP.unshift ( 0 )
obj.brVP.unshift ( 0 )
obj.wM .unshift ( 1 )
if use_overlap
int rmP = use_overlap_method == "Recent" ? 1 : 0
if obj.avg.size() > 1
if bull
? obj.btm.first() < obj.top.get(1)
: obj.top.first() > obj.btm.get(1)
obj.wM .remove(rmP)
obj.cV .remove(rmP)
obj.dir .remove(rmP)
obj.top .remove(rmP)
obj.avg .remove(rmP)
obj.btm .remove(rmP)
obj.left .remove(rmP)
obj.blVP .remove(rmP)
obj.brVP .remove(rmP)
if barstate.isconfirmed
for x = 0 to ob_num - 1
tg = switch ob_mitigation
"Middle" => obj.avg
"Absolute" => bull ? obj.btm : obj.top
for in tg
if (bull ? cC < pt : cC > pt)
obj.wM .remove(idx)
obj.cV .remove(idx)
obj.dir .remove(idx)
obj.top .remove(idx)
obj.avg .remove(idx)
obj.btm .remove(idx)
obj.left .remove(idx)
obj.blVP .remove(idx)
obj.brVP .remove(idx)
if barstate.islast
if obj.avg.size() > 0
// Alert
if bull
? ta.crossunder(low , obj.top.get(0))
: ta.crossover (high, obj.btm.get(0))
switch bull
true => blalert.obtouch := true
false => bralert.obtouch := true
float tV = 0
obj.dV.clear()
seq = math.min(ob_num - 1, obj.avg.size() - 1)
for j = 0 to seq
tV += obj.cV.get(j)
if j == seq
for y = 0 to seq
obj.dV.unshift(
math.floor(
(obj.cV.get(y) / tV) * 100)
)
obj.dV.reverse()
for i = 0 to math.min(ob_num - 1, obj.avg.size() - 1)
dmL = draw.mL .get(i)
dOB = draw.ob .get(i)
dblB = draw.blB.get(i)
dbrB = draw.brB.get(i)
deOB = draw.eOB.get(i)
dOB.set_lefttop (obj.left .get(i) , obj.top.get(i))
deOB.set_lefttop (b.t , obj.top.get(i))
dOB.set_rightbottom (b.t , obj.btm.get(i))
deOB.set_rightbottom(b.t + (b.t - b.t ) * 100 , obj.btm.get(i))
if use_middle_line
dmL.set_xy1(obj.left.get(i), obj.avg.get(i))
dmL.set_xy2(b.t , obj.avg.get(i))
if ob_metrics_show
dblB.set_lefttop (obj.left.get(i), obj.top.get(i))
dbrB.set_lefttop (obj.left.get(i), obj.avg.get(i))
dblB.set_rightbottom(obj.left.get(i), obj.avg.get(i))
dbrB.set_rightbottom(obj.left.get(i), obj.btm.get(i))
rpBL = dblB.get_right()
rpBR = dbrB.get_right()
dbrB.set_right(rpBR + (b.t - b.t ) * obj.brVP.get(i))
dblB.set_right(rpBL + (b.t - b.t ) * obj.blVP.get(i))
if use_show_metric
txt = switch
obj.cV.get(i) >= 1000000000 => str.tostring(math.round(obj.cV.get(i) / 1000000000,3)) + "B"
obj.cV.get(i) >= 1000000 => str.tostring(math.round(obj.cV.get(i) / 1000000,3)) + "M"
obj.cV.get(i) >= 1000 => str.tostring(math.round(obj.cV.get(i) / 1000,3)) + "K"
obj.cV.get(i) < 1000 => str.tostring(math.round(obj.cV.get(i)))
deOB.set_text(
str.tostring(
txt + " (" + str.tostring(obj.dV.get(i)) + "%)")
)
deOB.set_text_size (size.auto)
deOB.set_text_halign(text.align_left)
deOB.set_text_color (use_grayscale ? color.silver : color.new(css, 0))
if ob_metrics_show and barstate.isconfirmed
if obj.wM.size() > 0
for i = 0 to obj.avg.size() - 1
switch obj.dir.get(i)
1 =>
switch obj.wM.get(i)
1 => obj.blVP.set(i, obj.blVP.get(i) + 1), obj.wM.set(i, 2)
2 => obj.blVP.set(i, obj.blVP.get(i) + 1), obj.wM.set(i, 3)
3 => obj.brVP.set(i, obj.brVP.get(i) + 1), obj.wM.set(i, 1)
-1 =>
switch obj.wM.get(i)
1 => obj.brVP.set(i, obj.brVP.get(i) + 1), obj.wM.set(i, 2)
2 => obj.brVP.set(i, obj.brVP.get(i) + 1), obj.wM.set(i, 3)
3 => obj.blVP.set(i, obj.blVP.get(i) + 1), obj.wM.set(i, 1)
var hN = array.new(1, b.n)
var lN = array.new(1, b.n)
var hS = array.new(1, b.n)
var lS = array.new(1, b.n)
if iH
hN.pop()
hN.unshift(int(b.n ))
if iL
lN.pop()
lN.unshift(int(b.n ))
if sH
hS.pop()
hS.unshift(int(b.n ))
if sL
lS.pop()
lS.unshift(int(b.n ))
if ob_show
bull_ob.drawVOB(true , ob_bull_css, hN.first(), false)
bear_ob.drawVOB(false, ob_bear_css, lN.first(), false)
if ob_swings
s_bull_ob.drawVOB(true , css_swing_up, hS.first(), true)
s_bear_ob.drawVOB(false, css_swing_dn, lS.first(), true)
if bull_ob
blalert.ob := true
if bear_ob
bralert.ob := true
if s_bull_ob
blalert.swingob := true
if s_bear_ob
blalert.swingob := true
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - End }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - FVG | VI | OG }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
ghl() => request.security(syminfo.tickerid, fvg_tf, [high , low , close , open ])
tfG() => request.security(syminfo.tickerid, fvg_tf, )
cG(bool bull) =>
= ghl()
= tfG()
var FVG draw = FVG.new(
array.new()
, array.new()
)
var FVG cords = array.new()
float pup = na
float pdn = na
bool cdn = na
int pos = 2
cc = timeframe.change(fvg_tf)
if barstate.isfirst
for i = 0 to fvg_num - 1
draw.box.unshift(box.new (na, na, na, na, border_color = color.new(color.white, 100), xloc = xloc.bar_time))
draw.ln.unshift (line.new(na, na, na, na, xloc = xloc.bar_time, width = 1, style = line.style_solid))
switch what_fvg
"FVG" =>
pup := bull ? gl : l
pdn := bull ? h : gh
cdn := bull ? gl > h and cc : gh < l and cc
pos := 2
"VI" =>
pup := bull
? (gc > go
? go
: gc)
: (gc > go
? go
: gc )
pdn := bull
? (gc > go
? gc
: go )
: (gc > go
? gc
: go)
cdn := bull
? go > gc and gh >
Volatility Momentum Score | Lyro RSVolatility Momentum Score | Lyro RS
Overview
The Volatility Momentum Score (VMS) combines price movement and volatility into a single, easy-to-read signal. Using z-scores, standard deviation bands, and flexible display modes, it helps traders identify trends, overbought/oversold conditions, and potential reversals quickly and effectively.
Key Features
Price + Volatility Blend
Tracks price action and volatility with separate z-scores and merges them into a unified momentum score.
Standard Deviation Bands
Upper and lower bands highlight extreme readings.
Adjustable multipliers allow for fine-tuning sensitivity.
Two Signal Modes
Trend Mode: Plots “Long” and “Short” signals when momentum crosses bands.
Reversion Mode: Colors the chart background when the score indicates stretched conditions.
Overbought & Oversold Alerts
▲ markers indicate oversold conditions.
▼ markers indicate overbought conditions.
Custom Colors
Four preset color themes or fully customizable bullish/bearish colors.
Clear Visuals
Dynamic line coloring based on momentum.
Candles recolored at signal points.
Background shading for quick visual assessment.
How It Works
Calculates z-scores for both price and volatility.
Blends the z-scores into a single average score.
Compares the score against dynamic upper and lower bands.
Triggers signals, markers, or background shading depending on the chosen display mode.
Practical Use
Ride trends: Follow Trend Mode signals to align with momentum.
Spot reversals: Watch ▲ and ▼ markers when markets are overextended.
Stay aware: Background shading highlights potentially overheated conditions.
Customization
Set lookback lengths for price, volatility, and bands.
Adjust band multipliers for more or less sensitive signals.
Choose between Trend or Reversion mode based on trading style.
Select color themes or create custom palettes.
⚠️ Disclaimer
This indicator is a technical analysis tool and does not guarantee results. It should be used alongside other methods and proper risk management. The creators are not responsible for any financial decisions based on its signals.
Trading Activity Index (Zeiierman)█ Overview
Trading Activity Index (Zeiierman) is a volume-based market activity meter that transforms dollar-volume into a smooth, normalized “activity index.”
It highlights when market participation is unusually low or high with a dynamic color gradient:
Light Blue → Low Activity (thin participation, low liquidity conditions)
Red/Orange → High Activity (active markets, large trades flowing in)
Additional percentile bands (20/40/60/80%) give context, helping you see whether the current activity level is in the bottom quintile, mid-range, or near historical extremes.
█ How It Works
⚪ Dollar Volume Transformation
Each bar, dollar volume is computed:
float dlrVol = close * volume
float dlrVolAvg = ta.sma(dlrVol, len_form)
Dollar volume = price × volume, smoothed by a configurable SMA window.
The result is log-transformed, compressing large outliers for a more stable signal.
⚪ Rolling Percentiles & Ranking
The log-dollar-volume series is compared to its rolling history (len_hist bars):
float p20 = ta.percentile_linear_interpolation(vscale, len_hist, 20)
float p40 = ta.percentile_linear_interpolation(vscale, len_hist, 40)
float p60 = ta.percentile_linear_interpolation(vscale, len_hist, 60)
float p80 = ta.percentile_linear_interpolation(vscale, len_hist, 80)
A normalized rank (0–1) is produced to color the main Trading Activity line.
█ How to Use
⚪ Detect High-Impact Sessions
Quickly see if today’s session is active or quiet relative to its own history — great for filtering setups that need activity.
⚪ Spot Breakouts & Traps
Combine with price action:
High activity near breakouts = strong follow-through likely.
Low activity breakouts = vulnerable to fake-outs.
⚪ Market Regime Context
Percentile bands help you assess whether participation is building up, in the middle of the range, or drying out — valuable for timing mean-reversion trades.
Above 80th percentile (red/orange) → Market is highly active, breakout trades and trend strategies are favored.
Below 20th percentile (light blue) → Market is quiet; fade moves or wait for expansion.
Watch transitions from blue → orange as a signal of growing institutional participation.
█ Settings
Formation Window (bars) – Number of bars used to average dollar volume before log transform.
History Window (bars) – Lookback period for percentile calculations and rank normalization.
-----------------
Disclaimer
The content provided in my scripts, indicators, ideas, algorithms, and systems is for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or a solicitation to buy or sell any financial instruments. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
mara Dynamic RangeUpdated pp dynamic zone indicator, which helps to provide support/resistance for intra day and swing trade
Bitcoin Cycles IndicatorTrack Bitcoin's cyclical price patterns across multiple timeframes with this cycle analysis tool. The indicator automatically identifies cycle lows and highs, marking them with clear visual labels that show cycle day counts and failed cycle detection.
Key Features:
Multi-Time frame Support - Optimized settings for Daily, Weekly, Monthly, and Custom time frames
Cycle Tracking - Identifies and labels cycle lows (green) and highs (red) with day counts
Failed Cycle Detection - Highlights when cycles break below previous lows
Customizable Settings - Adjust cycle lengths, colors, and display options for each timeframe
Info Box - Real-time cycle information display with current cycle day count
Projection Boxes - Visual cycle length projections for better analysis
Perfect for Bitcoin traders and analysts who want to understand market cycles and timing. Works best on Daily charts for short-term cycles and Weekly/Monthly charts for longer-term analysis.
ZigZag+4 EMA89 Trend Candles + BUY/SELL SCALPThis script combines ZigZag patterns, EMA89 trend detection, and custom buy/sell scalp signals. It helps identify trend direction and potential entry points in trending markets.
Features:
- ZigZag structure points
- EMA89 as dynamic trend filter
- Buy/Sell scalp markers
- HL/HH swing labels
- Works best on 15m–4h timeframes
SMT (DXY) DIVERGENCESThis indicator detects Smart Money Technique (SMT) Divergences between the chart symbol and up to two comparison symbols defined in the settings.
It identifies swing highs and swing lows on correlated/uncorrelated instruments, compares their highs and lows, and determines possible divergences.
🔷 What It Detects
-Bullish SMT Divergence: When the lows of the chart symbol slope in the opposite direction of the comparison symbol’s lows.
-Bearish SMT Divergence: When the highs of the chart symbol slope in the opposite direction of the comparison symbol’s highs.
-Multi-Symbol Compatibility: Ability to compare the main symbol with one or two external tickers (default: DXY and GBPUSD).
-Negative Divergence Option: The inversion feature allows comparison with opposite-moving charts.
🔷 Calculation Logic
-Swing Detection: Swing highs and lows are confirmed using pivot-based logic.
-Comparison: Slopes of highs and lows are calculated for both the chart symbol and the comparison symbols.
-Divergence Identification: If slopes point in opposite directions, an SMT divergence (bullish or bearish) is marked.
-Visualization: Lines and labels (“+ SMT” or “– SMT”) are drawn on the chart. Historical lines can be kept or cleared depending on user settings.
🔷 Visual
Bearish SMT: Downward line with “– SMT” label.
Bullish SMT: Upward line with “+ SMT” label.
Style Options: Predefined color schemes (TLAB, standard, monochrome) or fully customizable colors.
Line Style: Solid, dashed, or dotted.
🔷 Customization Options
-Show Historical: Decide whether past divergences remain visible on the chart.
-Comparison Symbols: Define up to two external tickers, with optional inversion.
-Swing Lengths: Preconfigured pivot lengths automatically adapt to the selected timeframe (Daily, 4H, 1H, 5m/15m).
-Lines & Labels: Enable or disable bullish/bearish SMT divergences and their annotations.
🔷 Indicator Usage
Select the comparison symbol with positive or negative correlation.
Wait for the “+ SMT” or “– SMT” marker to appear on the chart.
Divergences can be used as contextual confluence when studying potential market shifts:
A + SMT marker may suggest bullish divergence.
A – SMT marker may suggest bearish divergence.
Fractal Model (TTrades)Fractal Model - Higher Timeframe Analysis with TTFM Labeling
A higher timeframe candle visualization tool enhanced with TTFM (The Fractal Model) labeling system for pivot-based price action analysis, made popular by Youtuber TTrades
What This Script Does:
This indicator displays higher timeframe candles on your current chart and identifies key pivot formations using the TTFM labeling system. It helps traders understand market structure and potential reversal points through systematic pivot analysis.
Key Features:
Higher Timeframe Visualization : Shows HTF candles without switching timeframes
TTFM Labeling System : Identifies pivot components with C2, C3, and C4 labels
T-Spot Detection : Marks areas where price is likely to form wicks based on pivot logic
Sweep Confirmation : Detects when price sweeps previous levels but closes opposite
Fair Value Gap Detection : Identifies imbalance zones between candle ranges
Alert System : Sends alerts when T-spot formations are confirmed using pivot logic
Silver T-Spot Alerts : Special alerts during specific market hours
How TTFM Labeling Works:
The TTFM system labels pivot formations based on their structure:
C2 : The candle that "sticks out" - the initial move that creates the pivot
C3 / C4 : The distribution candle that continues the reversal (standard pivots)
Alert System:
The indicator provides alerts when:
T-spot formations are created and confirmed
Price sweeps tspot levels with proper confirmation (This signal tries to alert you when a potential wick has formed in the tspot location
Silver T-spot patterns occur during specific market hours
T-spot sweep confirmations are triggered
Practical Usage:
Add the indicator to your chart
Watch for T-spot formations (highlighted zones)
Look for C2, C3, C4 labels to understand pivot structure
Use sweep confirmations for entry timing
Set up alerts for T-spot confirmations and sweeps
Technical Implementation:
Logarithmic Midpoint Calculation:
The T-spot levels are calculated using logarithmic midpoint analysis:
Log Values : log_high = ln(high), log_low = ln(low), log_open = ln(open), log_close = ln(close)
Wick Analysis : upper_wick = log_high - max(log_open, log_close), lower_wick = min(log_open, log_close) - log_low
Body Size : body_size = |log_close - log_open|
Midpoint Logic : If max(upper_wick, lower_wick) > body_size, use wick-based midpoint; otherwise use (log_high + log_low)/2
Final Level : T-spot level = exp(log_mid_level)
T-Spot Formation Conditions:
Standard Bearish : last_closed.h > prev_closed.h AND last_closed.c < prev_closed.h
Standard Bullish : last_closed.l < prev_closed.l AND last_closed.c > prev_closed.l
Expansive Bearish : prev_closed.h > prev_prev_closed.h AND last_closed.c < max(prev_closed.o, prev_closed.c)
Expansive Bullish : prev_closed.l < prev_prev_closed.l AND last_closed.c > min(prev_closed.o, prev_closed.c)
Pro-trend Bearish : last_closed.h > mid_level AND last_closed.h < prev_closed.o AND last_closed.c < prev_closed.l
Pro-trend Bullish : last_closed.l < mid_level AND last_closed.l > prev_closed.o AND last_closed.c > prev_closed.h
Sweep Confirmation Logic:
Pivot Detection : Uses ta.pivothigh(high, 1, 2) and ta.pivotlow(low, 1, 2)
Touch Detection : Price must touch T-spot level (high > level OR open > level) AND close opposite
Confirmation Requirements : Pivot must form before touch, close must break beyond pivot level
Alert Trigger : Sweep confirmed when all conditions are met
Silver T-Spot Conditions:
Special T-spots during specific market hours (4th-5th candle of day or 4th candle after 1PM ET) with additional confirmation requirements.
HTF Auto-Detection:
Automatically selects appropriate higher timeframes: 1m→15m, 3m→30m, 5m→1h, 15m→4h, 30m-1h→1D, 4h-8h→1W, 1D→1M.
Based on HTF Candles by Fadi, enhanced with T-spot detection, sweep logic, TTFM labeling system, and comprehensive alert functionality.
Note: This tool is for educational purposes and should be used in conjunction with proper risk management and market analysis.
BK AK-Warfare Formations👑 Introducing BK AK-Warfare Formations — Form the pride. Take the high ground. Strike with wisdom. 👑
This is my 9th release—built for traders who think like commanders: see the formation, decide the maneuver, deliver the strike.
🎖️ Full Credit
The pattern engine, detection logic, and architecture come from Trendoscope—one of the absolute best coders on TradingView and the original creator of this indicator’s core.
I asked for a few interface upgrades and knew he was driving bigger builds. So I forged the add-ons myself and am releasing them for those who value a cleaner, more tactical read.
My enhancements (on top of Trendoscope):
Label transparency (text + background)
Short-form pattern codes (AC/DC/RC/RWE/...)
Transparency controls for short-form labels
Hover tooltips with full pattern name + bullish/bearish/neutral bias (toggle)
Everything else is Trendoscope. Respect where it’s due.
🧠 What It Does
Auto-detects Channels, Wedges (expanding/contracting), and Triangles (ascending/descending/converging/diverging).
Prints clean battlefield tags (AC, DC, RWE, …) so structure is visible without drowning price.
Hover for the brief: long name + directional bias exactly when you need it.
Multi-zigzag sweep, overlap control, bar-ratio verification, max-pattern caps, dark/light aware palette + custom colors.
🧭 Read the Battlefield
AC — Ascending Channel: trend carry; respect higher-lows and ride the lane.
RWE — Rising Wedge: distribution bias; watch the fracture and the retest.
Converging/Diverging Triangles: compression → expansion; stage entries at the edges.
DC — Descending Channel: late down-leg + momentum shift = tactical long.
Structure is the map. Bias is the compass. Your risk plan is the sword.
🤝 Acknowledgments
Original engine & libraries: Trendoscope (legend).
Enhancement layer (UX): transparency, short codes, tooltip system — BK.
Mentor: A.K. — discipline, patience, and clarity. His standard lives in every decision here.
🫡 Give Forward
Don’t be cheap with your knowledge. If my indicators sharpen your edge:
Teach someone how to read formations with discipline.
Share your process, not just screenshots.
Contribute code, context, or courage to those behind you.
A king’s wisdom multiplies the camp. A lion’s courage protects the pride.
🙏 Final Word
“By wise guidance you will wage your war, and victory lies in many counselors.” — Proverbs 24:6
See the array. Choose the strike. Lead with wisdom.
BK AK-Warfare Formations — where formation meets judgment, and judgment meets execution.
Gd bless. 🙏
BSL/SSL Sweep + FVG Strategy Jobin (c) The New York ATM Model is a structured intraday strategy designed to capture algorithmic stop-hunts and reversals during the New York session open. It focuses on liquidity sweeps—either Buy-Side or Sell-Side—followed by a confirmation using Fair Value Gaps (FVGs).
Volume Delta Oscillator with Divergence█ OVERVIEW
The Volume Delta Oscillator with Divergence is a technical indicator designed for the TradingView platform, helping traders identify potential trend reversal points and market momentum shifts through volume delta analysis and divergence detection. The indicator combines a smoothed volume delta oscillator with moving average-based signals, overbought/oversold levels, and divergence visualization, enhanced by configurable gradients and alerts for quick decision-making.
█ CONCEPT
The core idea of the indicator is to measure net buying or selling pressure through volume delta, smooth it for greater clarity, and detect divergences between price action and the oscillator. The indicator does not use external data, making it a compromise but practical tool for analyzing market dynamics based on available price and volume data. It provides insights into market dynamics, overbought/oversold conditions, and potential reversal points, with an attractive visual presentation.
█ WHY USE IT?
- Divergence detection: Identifies bullish and bearish divergences between price and the oscillator, signaling potential reversals.
- Volume delta analysis: Measures cumulative volume delta to assess buying/selling pressure, expressed as a percentage for cross-market comparability.
- Signal generation: Creates buy/sell signals based on overbought/oversold level crossovers, zero line crossovers, and moving average zero line crossovers.
- Visual clarity: Uses gradients, fills, and dynamic colors for intuitive chart analysis.
- Flexibility: Numerous settings allow adaptation to various markets (e.g., forex, crypto, stocks) and trading strategies.
█ HOW IT WORKS?
- Volume delta calculation: Computes net buying/selling pressure per candle as volume * (close - open) / (high - low), aggregated over a specified period (Cumulative Delta Length).
- Smoothing: Applies an EMA (Smoothing Length) to the cumulative delta percentage, creating a smoother oscillator (Delta Oscillator).
- Moving Average: Calculates an SMA (Moving Average Length) of the smoothed delta for trend confirmation (Moving Average (SMA)).
- Divergence detection: Identifies bullish and bearish divergences by comparing price and oscillator pivot highs/lows within a specified range (Pivot Length).
- Normalization: Delta is expressed as a percentage of total volume, ensuring consistency across instruments and timeframes.
- Signals: Generates signals for:
Crossing the oversold level upward (buy) or overbought level downward (sell).
Crossing the zero line by the oscillator or moving average (buy/sell).
Bullish/bearish divergences, marked with labels.
- Visualization: Draws the oscillator and moving average with dynamic colors, gradient fills, and transparent bands and labels, with configurable overbought/oversold levels.
- Alerts: Built-in alerts for divergence detection, overbought/oversold crossovers, and zero line crossovers (both oscillator and moving average).
█ SETTINGS AND CUSTOMIZATION
- Cumulative Delta Length: Period for aggregating volume delta (default: 14).
- Smoothing Length (EMA): EMA length for smoothing the delta oscillator (default: 2). Higher values smooth the signal but reduce the number of generated signals.
- Moving Average Length (SMA): SMA length for the moving average line (default: 40). Higher values allow SMA to be analyzed as a trend indicator, but require adjusting overbought/oversold levels for MA, as longer MA oscillates less.
- Pivot Length (Left/Right): Number of candles for detecting pivot highs/lows in divergence calculations (default: 2). Higher values can reduce noise but introduce a delay equal to the set value.
- Overbought/Oversold Levels: Thresholds for the oscillator (default: 18/-18) and for the moving average (default: 10/-10). For the moving average, no arrows appear; instead, the band changes color from gray to green (oversold) or red (overbought), which can strengthen entry signals for delta.
- Signal Type: Select signals to display: "Overbought/Oversold", "Zero Line", "MA Zero Line", "All", or "None" (default: Overbought/Oversold).
- Colors and gradients: Customize colors for bullish/bearish oscillator, moving average, zero line, overbought/oversold levels, and divergence labels.
- Transparency: Adjust gradient fill transparency (default: 70) and band/label transparency (default: 40) for consistent appearance.
- Visualizations: Enable/disable the moving average, gradients for zero/overbought/oversold levels, and gradient fills.
█ USAGE EXAMPLES
- Momentum analysis: Observe the delta oscillator above 0 for bullish momentum or below 0 for bearish momentum. The moving average (SMA), being smoothed, reacts more slowly and can confirm trend direction as a noise filter.
- Reversal signals: Look for buy triangles when the oscillator crosses the oversold level upward, especially when the moving average is below the MA oversold threshold. Similarly, look for sell triangles when crossing the overbought level downward, with the moving average above the MA overbought threshold. Divergence labels (bullish/bearish) indicate potential reversals.
- Divergence trading: Use bullish divergence labels (green) for potential buy opportunities and bearish labels (red) for sell opportunities, especially when confirmed by price action or other indicators.
- Customization: Adjust the cumulative delta length, smoothing, and moving average length to specific instruments and timeframes to minimize false signals.
█ NOTES FOR USERS
- Combine the indicator with other tools, such as Fibonacci levels, RSI, or pivot points, to increase accuracy.
- Test different settings for cumulative delta length, smoothing, and moving average length on your chosen instrument and timeframe to find optimal values.
BK AK-Flag Formations🏴☠️ Introducing BK AK-Flag Formations — Raise the standard. Drive the line. Continue the assault. 🏴☠️
Built for traders who exploit momentum with discipline: flagpoles, flags, and pennants detected, tagged, and briefed—so you can press advantage instead of hesitating.
🎖️ Full Credit
The pattern engine, detection logic, and architecture are Trendoscope—one of the absolute best coders on TradingView and the original creator of this indicator’s core. I asked for interface upgrades and knew he was deep in other builds, so I forged the add-ons and released them for the community that values them.
My enhancements (on top of Trendoscope):
Label transparency (text + background)
Short-form labels (BF/BeF/BP/BeP/…)
Transparency controls for short-form labels
Hover tooltips with full pattern name + bullish/bearish bias (toggle)
Everything else is Trendoscope. Respect where it’s due.
🧠 What It Does
Locks onto flags and pennants after strong impulses (flagpoles).
Prints clean battlefield tags (BF, BeF, BP, BeP…) so the setup is obvious without burying price.
Mouse-over for the brief: full pattern name + directional bias exactly when you need it.
Multi-zigzag sweep for micro→macro detection, overlap control, bar-ratio verification, max-pattern caps, dark/light aware palette + custom colors.
🧭 Read the Continuation
BF — Bull Flag: strong pole, orderly pullback; look for break and measured move continuity.
BP — Bull Pennant: tight triangle after thrust; expansion confirms carry.
BeF — Bear Flag: weak rallies in a downtrend; break = continuation lower.
BeP — Bear Pennant: compressed pause beneath resistance; release favors trend.
Standards are not decoration—they are orders.
🤝 Acknowledgments
Original engine & libraries: Trendoscope (legend).
Enhancement layer (UX): transparency, short codes, tooltip system — BK.
Mentor: A.K. — clarity, patience, judgment. His discipline guides every choice here.
🫡 Give Forward
Don’t be cheap with your knowledge. If my indicators sharpen your edge:
Teach someone to read structure with discipline.
Share your process, not just screenshots.
Contribute code, context, or courage to those behind you.
Tools are force multipliers. Character decides how they’re used.
🙏 Final Word
“Plans are established by counsel; by wise guidance wage war.” — Proverbs 20:18
Impulse → formation → continuation.
Raise the banner, hold formation, and execute with wisdom.
BK AK-Flag Formations — when the standard rises, the line advances.
Gd bless. 🙏
Higher High Lower Low Higher High Lower Low 🦉{Phanchai} — TradingView Description
Structure detector with dynamic Support/Resistance, customizable labels, and ready-made alerts (Pine v6).
This script marks market structure turning points — HH (Higher High), HL (Higher Low), LH (Lower High), LL (Lower Low) — and builds segmented Support/Resistance lines from those turns. Labels and colors are fully customizable and the script ships with multiple alert conditions.
What it does
Detects swing pivots using left/right bar windows, then classifies each confirmed swing as HH/HL/LH/LL.
Plots compact labels at the confirmed pivot bars with tooltips (English).
Derives dynamic Support / Resistance : every time structure flips, the previous level is closed and a new segment starts, extending to the right .
Provides alert conditions for any label and for specific first-occurrence shifts (e.g., first HH after a bearish label).
How it works (in short)
A pivot high/low confirms only after Right Bars candles have closed; labels and S/R appear at that confirmation bar.
An internal backbone (zigzag-like) is built from confirmed pivots, with light consistency checks to avoid contradictory sequences.
Structure rules compare the recent five pivots (A…E) to decide HH/HL/LH/LL.
S/R is updated from structure: e.g., in an up leg, new HLs refresh Support; in a down leg, new LHs refresh Resistance.
Alerts included
Any structure label (HH/HL/LH/LL) — Fires on any new label.
First LL after HL/HH — First bearish break after a bullish label.
First HH after LL/LH — First bullish break after a bearish label.
LL or HL formed — Any low-side label.
LH or HH formed — Any high-side label.
HL formed
HH formed
LL formed
LH formed
How to use (quick start)
Add the indicator to your chart.
Choose Left/Right Bars for your timeframe (e.g., 5–10 for intraday; larger for higher timeframes).
Pick your label colors/sizes and S/R style.
Right-click the chart → Add alert… → Condition: this indicator → select the desired alert.
Notes & tips
Because pivots require Right Bars to confirm, labels and S/R appear with a natural delay of that many bars. This avoids repainting.
Raising Left/Right Bars reduces noise and increases the average distance between pivots; lowering them increases sensitivity.
Structure is strict: sometimes you may see two HL (or two LH) in a row if the intermediate opposite swing didn’t qualify as HH/LH (or LL/HL).
S/R segments are drawn with line objects ; they are controlled via Inputs (style/width/color), not the Style tab.
This tool highlights structure; it’s not a standalone entry/exit system. Combine with volume, trend, or risk management rules.
Built with Pine v6. Clean, compact labels; segmented S/R that updates only on confirmed changes; comprehensive alerts ready for automation.
The Maker StrategyDESCRIPTION
The Maker Strategy is a trend-following system built around exponential moving averages (EMAs). By analyzing the alignment of multiple EMAs, the strategy identifies strong bullish or bearish momentum and generates precise entry signals. This method is designed to capture sustained trends while filtering out sideways or noisy market conditions.
USER INPUTS :
• EMA 1 Length (Default: 30)
• EMA 2 Length (Default: 35)
• EMA 3 Length (Default: 40)
• EMA 4 Length (Default: 45)
• EMA 5 Length (Default: 50)
• EMA 6 Length (Default: 60)
LONG CONDITION :
A long signal is triggered when all EMAs are perfectly aligned in ascending order:
EMA1 > EMA2 > EMA3 > EMA4 > EMA5 > EMA6
SHORT CONDITION :
A short signal is triggered when all EMAs are perfectly aligned in descending order:
EMA1 < EMA2 < EMA3 < EMA4 < EMA5 < EMA6
WHY IT IS UNIQUE:
Unlike traditional EMA crossover systems that rely on just 2 or 3 moving averages, The Maker Strategy uses 6 EMAs in sequence. This ensures that trades are only taken when there is clear and strong market momentum. The approach minimizes false signals in ranging markets and focuses on capturing trends with higher probability setups.
HOW USER CAN BENEFIT FROM IT :
• Clear entry alerts for both long and short positions.
• Visual confirmation through candle coloring and EMA band fills.
• Works on multiple timeframes and instruments (stocks, forex, crypto, indices).
• Helps traders stay on the right side of the trend while avoiding whipsaws.
• A simple yet effective tool for those who want a disciplined, rules-based strategy.
EITS - Market StructureThis script marks the Swing Lows and Highs of a chosen pair. H,HH,L,LL,HL,LH will be marked on chart. Have fun!!
WickDomits wickdom, thats all you need to know! it tells when the candle is in control and when its not
Double Median SD Bands | MisinkoMasterThe Double Median SD Bands is a new trend following tool designed to help traders/investors identify trends, follow them and improve their trend following strategies.
How does it work?
1. Calculate the Standard Deviation over n period of the source (this can be the close, high, low, hl2 and so on)
2. Calculate the basic bands like so:
Upper = Source + SD*Multiplier
Lower = Source - SD*Multiplier
3. Get the special lengths (which we will soon need):
half length = n/2 (if it returns a number like 8.5, it will be rounded up to 9)
square root length = √n (if it returns a number with decimals, it will be rounded to the closest integer)
4. Smooth the bands using the medians
1x Median SD Band Upper = median over half length period on the SD Upper Band
1x Median SD Band Lower = median over half length period on the SD Lower Band
Double Median SD Bands is then finished by applying the median to both but with the square root length.
Trend Logic :
If source crosses over the upper band = uptrend reversal
If source crosses below the lower band = downtrend reversal
Why choose this indicator?
Smooth and fast trend capture => this indicator combines the median with the SD Bands in such way to give you the highest amount of speed possible, while making you suffer as low amount of noise as possible.
Easy trend identification => Thanks to the colors changing with trends, it makes it very easy for users to identify signals within or below 1-2 seconds
Hope you all enjoy Gs, if you have any questions are requests DM me :)
Intraday Buy/Sell/Average Zones by Chaitu50cIntraday Buy/Sell/Average Zones by chaitu50c
Timeframe:
Tested on the 5-minute chart.
Recommended timeframe: 5-minute
What it does
This indicator marks intraday Buy (green) and Sell (red) zones made by strong close-confirmed breakouts. These zones act as support/resistance. If price later closes through a zone, the zone changes color from that bar forward (support ↔ resistance). It can flip more than once.
How zones form
Single breakout: an opposite-type candle closes beyond the previous candle’s high/low.
Double breakout: a base candle, then two opposite-type candles, and the second one closes beyond the base high/low.
Zone size
Buy zone: from the combo lowest low up to the nearest open/close of the combo.
Sell zone: from the combo highest high down to the nearest open/close of the combo.
Color shift (optional)
If price closes through a zone, it flips color at that bar and behaves as the other side (support ↔ resistance). Flips can happen again later.
Overlap control
When a new zone overlaps an existing same-color zone in the same session, choose:
Merge (combine), or
Suppress (ignore the new one).
Flipped zones use their current color for this.
Right edge & session
All zones extend to the right (your offset). Detection is limited to your chosen session, and you can show only the last N sessions.
---
How to trade (simple)
A) Initial breakout trade
When a new zone forms, that breakout itself can be a trade idea in the breakout direction, The stoploss will be the zone.
B) Zone breakout trade (flip)
If price later closes out of a zone and it changes color, that breakout is another trade opportunity in the new direction.
C) Retrace & average trade
When price retests a zone, wait for a confirmation candle in the zone’s favor
— bullish close for a green zone, bearish close for a red zone — then average entries inside/near the zone.
Place stops just beyond the opposite edge of the zone.
If the zone flips color, stop averaging; bias changed.
---
Key settings
Breakout type: Single and/or Double
Confirm on Close: strict mode (no intrabar preview) or allow intrabar preview that auto-removes if fail
Color Shift on Breaks: on/off
Same-Type Overlap: Merge/Suppress
Session, Sessions to Display, Right Offset, Colors, Max Zones
Reminder: Best results on the 5-minute timeframe (tested and recommended).
Period Separator + Future LinesDescription
This indicator draws vertical separator lines for each selected timeframe (e.g., daily or hourly) and also projects additional separator lines into the future.
It helps traders visually divide the chart into consistent time periods and see upcoming period boundaries in advance.
Features
- Draws vertical lines at the start of each chosen period (daily by default).
- Extends several separator lines into the future so you can anticipate upcoming sessions.
- Fully customizable: color, style (solid/dashed/dotted), line width, and timeframe can be adjusted from the settings.
- Lines are plotted without distorting auto-scaling, so the chart view remains clean.
Use Case
Ideal for intraday and swing traders who want clear visual time markers and the ability to prepare for upcoming trading sessions.
Iani SMC Sniper XAU v2.2 (Long+Short + News Countdown, v6)Iani SMC Sniper XAU (v2.2) — smart-money logic for XAUUSD.
This indicator hunts “sniper entries” using a simple SMC sequence:
Sweep → BOS → 50% FVG entry
• After London session builds its range, we wait for a liquidity sweep (price dips below London Low for longs / wicks above London High for shorts).
• A BOS confirms direction (close breaks the last swing).
• First FVG that prints after BOS gives the entry at 50% (mid-gap).
• SL anchored to the protective swing (with a small safety buffer). TP is plotted using your Risk:Reward.
News countdown (non-blocking):
The script does not auto-fetch news; you set daily times (e.g., 14:30, 16:00) and/or specific dates (“YYYY-MM-DD HH:MM”). A countdown label shows “NEWS in Xm”. Signals are not blocked—this is just a safety heads-up for prop-firm rules.
Inputs: pivot length, RR, pip size (XAU default 0.10), session filter (after London), news times (recurring & absolute), show/hide levels & labels.
Plots & labels: London High/Low (daily), Entry/SL/TP lines, BOS/Sweep/BUY/SELL markers, news badge.
Alerts: BOS Bull/Bear, BUY/SELL Entry touch, TP/SL hit, NEWS WARNING.
Notes:
• Designed for XAUUSD intraday; works on other symbols if you adjust pip size.
• Uses symbol timezone; adjust your news times for DST if needed.
• Indicator only—no orders, no backtest. Manage risk and execution in MT5/your platform.
Changelog (v2.2): Pine v6, robust time parsing, one-line logical expressions (fixed EOL errors), mirrored short logic, cleaner London H/L reset, countdown label.
Disclaimer: Educational tool, not financial advice. Past performance ≠ future results.
Tags: SMC, ICT, XAUUSD, Gold, Liquidity Sweep, BOS, FVG, London Session, News, Intraday, Scalping, DayTrading.
Edge Algo📈 Indicator Features:
• Provides accurate trades with up to 90% success rate
• Works on all currencies, stocks, crypto, and even futures
• Compatible with all timeframes: 1m / 5m / 15m / 30m / 1h / 1d
• Built on an AI system that detects stop-hunt zones to avoid stop-loss hits
• Gives you entry points, stop-loss (SL), and take-profit (TP) levels
FXHacker BUY SELL SIGNAL V2“FXHacker BUY SELL SIGNAL V2 marks key Nairobi session blocks and detects liquidity sweeps. Traders can choose between Strict CHoCH (confirmation on structure break) or Immediate Sweep (signal at first sweep). Designed to highlight high-probability reversal zones within important time windows.”