Мой скрипт// © Buzzara
// =================================
// PLEASE SUPPORT THE TEAM
// =================================
//
// Telegram: t.me
a_trade// =================================
//@version=5
VERSION = ' Buzzara2.0'
strategy('ALGOX V6_1_24', shorttitle = '🚀〄 Buzzara2.0 〄🚀'+ VERSION, overlay = true, explicit_plot_zorder = true, pyramiding = 0, default_qty_type = strategy.percent_of_equity, initial_capital = 1000, default_qty_value = 1, calc_on_every_tick = false, process_orders_on_close = true)
G_SCRIPT01 = '■ ' + 'SAIYAN OCC'
//#region ———— <↓↓↓ G_SCRIPT01 ↓↓↓> {
// === INPUTS ===
res = input.timeframe('15', 'TIMEFRAME', group ="NON REPAINT")
useRes = input(true, 'Use Alternate Signals')
intRes = input(10, 'Multiplier for Alernate Signals')
basisType = input.string('ALMA', 'MA Type: ', options= )
basisLen = input.int(50, 'MA Period', minval=1)
offsetSigma = input.int(5, 'Offset for LSMA / Sigma for ALMA', minval=0)
offsetALMA = input.float(2, 'Offset for ALMA', minval=0, step=0.01)
scolor = input(false, 'Show coloured Bars to indicate Trend?')
delayOffset = input.int(0, 'Delay Open/Close MA', minval=0, step=1,
tooltip = 'Forces Non-Repainting')
tradeType = input.string('BOTH', 'What trades should be taken : ',
options = )
//=== /INPUTS ===
h = input(false, 'Signals for Heikin Ashi Candles')
//INDICATOR SETTINGS
swing_length = input.int(10, 'Swing High/Low Length', group = 'Settings', minval = 1, maxval = 50)
history_of_demand_to_keep = input.int(20, 'History To Keep', minval = 5, maxval = 50)
box_width = input.float(2.5, 'Supply/Demand Box Width', group = 'Settings', minval = 1, maxval = 10, step = 0.5)
//INDICATOR VISUAL SETTINGS
show_zigzag = input.bool(false, 'Show Zig Zag', group = 'Visual Settings', inline = '1')
show_price_action_labels = input.bool(false, 'Show Price Action Labels', group = 'Visual Settings', inline = '2')
supply_color = input.color(#00000000, 'Supply', group = 'Visual Settings', inline = '3')
supply_outline_color = input.color(#00000000, 'Outline', group = 'Visual Settings', inline = '3')
demand_color = input.color(#00000000, 'Demand', group = 'Visual Settings', inline = '4')
demand_outline_color = input.color(#00000000, 'Outline', group = 'Visual Settings', inline = '4')
bos_label_color = input.color(#00000000, 'BOS Label', group = 'Visual Settings', inline = '5')
poi_label_color = input.color(#00000000, 'POI Label', group = 'Visual Settings', inline = '7')
poi_border_color = input.color(#00000000, 'POI border', group = 'Visual Settings', inline = '7')
swing_type_color = input.color(#00000000, 'Price Action Label', group = 'Visual Settings', inline = '8')
zigzag_color = input.color(#00000000, 'Zig Zag', group = 'Visual Settings', inline = '9')
//END SETTINGS
// FUNCTION TO ADD NEW AND REMOVE LAST IN ARRAY
f_array_add_pop(array, new_value_to_add) =>
array.unshift(array, new_value_to_add)
array.pop(array)
// FUNCTION SWING H & L LABELS
f_sh_sl_labels(array, swing_type) =>
var string label_text = na
if swing_type == 1
if array.get(array, 0) >= array.get(array, 1)
label_text := 'HH'
else
label_text := 'LH'
label.new(
bar_index - swing_length,
array.get(array,0),
text = label_text,
style = label.style_label_down,
textcolor = swing_type_color,
color = swing_type_color,
size = size.tiny)
else if swing_type == -1
if array.get(array, 0) >= array.get(array, 1)
label_text := 'HL'
else
label_text := 'LL'
label.new(
bar_index - swing_length,
array.get(array,0),
text = label_text,
style = label.style_label_up,
textcolor = swing_type_color,
color = swing_type_color,
size = size.tiny)
// FUNCTION MAKE SURE SUPPLY ISNT OVERLAPPING
f_check_overlapping(new_poi, box_array, atrValue) =>
atr_threshold = atrValue * 2
okay_to_draw = true
for i = 0 to array.size(box_array) - 1
top = box.get_top(array.get(box_array, i))
bottom = box.get_bottom(array.get(box_array, i))
poi = (top + bottom) / 2
upper_boundary = poi + atr_threshold
lower_boundary = poi - atr_threshold
if new_poi >= lower_boundary and new_poi <= upper_boundary
okay_to_draw := false
break
else
okay_to_draw := true
okay_to_draw
// FUNCTION TO DRAW SUPPLY OR DEMAND ZONE
f_supply_demand(value_array, bn_array, box_array, label_array, box_type, atrValue) =>
atr_buffer = atrValue * (box_width / 10)
box_left = array.get(bn_array, 0)
box_right = bar_index
var float box_top = 0.00
var float box_bottom = 0.00
var float poi = 0.00
if box_type == 1
box_top := array.get(value_array, 0)
box_bottom := box_top - atr_buffer
poi := (box_top + box_bottom) / 2
else if box_type == -1
box_bottom := array.get(value_array, 0)
box_top := box_bottom + atr_buffer
poi := (box_top + box_bottom) / 2
okay_to_draw = f_check_overlapping(poi, box_array, atrValue)
// okay_to_draw = true
//delete oldest box, and then create a new box and add it to the array
if box_type == 1 and okay_to_draw
box.delete( array.get(box_array, array.size(box_array) - 1) )
f_array_add_pop(box_array, box.new( left = box_left, top = box_top, right = box_right, bottom = box_bottom, border_color = supply_outline_color,
bgcolor = supply_color, extend = extend.right, text = 'SUPPLY', text_halign = text.align_center, text_valign = text.align_center, text_color = poi_label_color, text_size = size.small, xloc = xloc.bar_index))
box.delete( array.get(label_array, array.size(label_array) - 1) )
f_array_add_pop(label_array, box.new( left = box_left, top = poi, right = box_right, bottom = poi, border_color = poi_border_color,
bgcolor = poi_border_color, extend = extend.right, text = 'POI', text_halign = text.align_left, text_valign = text.align_center, text_color = poi_label_color, text_size = size.small, xloc = xloc.bar_index))
else if box_type == -1 and okay_to_draw
box.delete( array.get(box_array, array.size(box_array) - 1) )
f_array_add_pop(box_array, box.new( left = box_left, top = box_top, right = box_right, bottom = box_bottom, border_color = demand_outline_color,
bgcolor = demand_color, extend = extend.right, text = 'DEMAND', text_halign = text.align_center, text_valign = text.align_center, text_color = poi_label_color, text_size = size.small, xloc = xloc.bar_index))
box.delete( array.get(label_array, array.size(label_array) - 1) )
f_array_add_pop(label_array, box.new( left = box_left, top = poi, right = box_right, bottom = poi, border_color = poi_border_color,
bgcolor = poi_border_color, extend = extend.right, text = 'POI', text_halign = text.align_left, text_valign = text.align_center, text_color = poi_label_color, text_size = size.small, xloc = xloc.bar_index))
// FUNCTION TO CHANGE SUPPLY/DEMAND TO A BOS IF BROKEN
f_sd_to_bos(box_array, bos_array, label_array, zone_type) =>
if zone_type == 1
for i = 0 to array.size(box_array) - 1
level_to_break = box.get_top(array.get(box_array,i))
// if ta.crossover(close, level_to_break)
if close >= level_to_break
copied_box = box.copy(array.get(box_array,i))
f_array_add_pop(bos_array, copied_box)
mid = (box.get_top(array.get(box_array,i)) + box.get_bottom(array.get(box_array,i))) / 2
box.set_top(array.get(bos_array,0), mid)
box.set_bottom(array.get(bos_array,0), mid)
box.set_extend( array.get(bos_array,0), extend.none)
box.set_right( array.get(bos_array,0), bar_index)
box.set_text( array.get(bos_array,0), 'BOS' )
box.set_text_color( array.get(bos_array,0), bos_label_color)
box.set_text_size( array.get(bos_array,0), size.small)
box.set_text_halign( array.get(bos_array,0), text.align_center)
box.set_text_valign( array.get(bos_array,0), text.align_center)
box.delete(array.get(box_array, i))
box.delete(array.get(label_array, i))
if zone_type == -1
for i = 0 to array.size(box_array) - 1
level_to_break = box.get_bottom(array.get(box_array,i))
// if ta.crossunder(close, level_to_break)
if close <= level_to_break
copied_box = box.copy(array.get(box_array,i))
f_array_add_pop(bos_array, copied_box)
mid = (box.get_top(array.get(box_array,i)) + box.get_bottom(array.get(box_array,i))) / 2
box.set_top(array.get(bos_array,0), mid)
box.set_bottom(array.get(bos_array,0), mid)
box.set_extend( array.get(bos_array,0), extend.none)
box.set_right( array.get(bos_array,0), bar_index)
box.set_text( array.get(bos_array,0), 'BOS' )
box.set_text_color( array.get(bos_array,0), bos_label_color)
box.set_text_size( array.get(bos_array,0), size.small)
box.set_text_halign( array.get(bos_array,0), text.align_center)
box.set_text_valign( array.get(bos_array,0), text.align_center)
box.delete(array.get(box_array, i))
box.delete(array.get(label_array, i))
// FUNCTION MANAGE CURRENT BOXES BY CHANGING ENDPOINT
f_extend_box_endpoint(box_array) =>
for i = 0 to array.size(box_array) - 1
box.set_right(array.get(box_array, i), bar_index + 100)
//
stratRes = timeframe.ismonthly ? str.tostring(timeframe.multiplier * intRes, '###M') :
timeframe.isweekly ? str.tostring(timeframe.multiplier * intRes, '###W') :
timeframe.isdaily ? str.tostring(timeframe.multiplier * intRes, '###D') :
timeframe.isintraday ? str.tostring(timeframe.multiplier * intRes, '####') :
'60'
src = h ? request.security(ticker.heikinashi(syminfo.tickerid),
timeframe.period, close, lookahead = barmerge.lookahead_off) : close
// CALCULATE ATR
atrValue = ta.atr(50)
// CALCULATE SWING HIGHS & SWING LOWS
swing_high = ta.pivothigh(high, swing_length, swing_length)
swing_low = ta.pivotlow(low, swing_length, swing_length)
// ARRAYS FOR SWING H/L & BN
var swing_high_values = array.new_float(5,0.00)
var swing_low_values = array.new_float(5,0.00)
var swing_high_bns = array.new_int(5,0)
var swing_low_bns = array.new_int(5,0)
// ARRAYS FOR SUPPLY / DEMAND
var current_supply_box = array.new_box(history_of_demand_to_keep, na)
var current_demand_box = array.new_box(history_of_demand_to_keep, na)
// ARRAYS FOR SUPPLY / DEMAND POI LABELS
var current_supply_poi = array.new_box(history_of_demand_to_keep, na)
var current_demand_poi = array.new_box(history_of_demand_to_keep, na)
// ARRAYS FOR BOS
var supply_bos = array.new_box(5, na)
var demand_bos = array.new_box(5, na)
//END CALCULATIONS
// NEW SWING HIGH
if not na(swing_high)
//MANAGE SWING HIGH VALUES
f_array_add_pop(swing_high_values, swing_high)
f_array_add_pop(swing_high_bns, bar_index )
if show_price_action_labels
f_sh_sl_labels(swing_high_values, 1)
f_supply_demand(swing_high_values, swing_high_bns, current_supply_box, current_supply_poi, 1, atrValue)
// NEW SWING LOW
else if not na(swing_low)
//MANAGE SWING LOW VALUES
f_array_add_pop(swing_low_values, swing_low)
f_array_add_pop(swing_low_bns, bar_index )
if show_price_action_labels
f_sh_sl_labels(swing_low_values, -1)
f_supply_demand(swing_low_values, swing_low_bns, current_demand_box, current_demand_poi, -1, atrValue)
f_sd_to_bos(current_supply_box, supply_bos, current_supply_poi, 1)
f_sd_to_bos(current_demand_box, demand_bos, current_demand_poi, -1)
f_extend_box_endpoint(current_supply_box)
f_extend_box_endpoint(current_demand_box)
channelBal = input.bool(false, "Channel Balance", group = "CHART")
lr_slope(_src, _len) =>
x = 0.0, y = 0.0, x2 = 0.0, xy = 0.0
for i = 0 to _len - 1
val = _src
per = i + 1
x += per
y += val
x2 += per * per
xy += val * per
_slp = (_len * xy - x * y) / (_len * x2 - x * x)
_avg = y / _len
_int = _avg - _slp * x / _len + _slp
lr_dev(_src, _len, _slp, _avg, _int) =>
upDev = 0.0, dnDev = 0.0
val = _int
for j = 0 to _len - 1
price = high - val
if price > upDev
upDev := price
price := val - low
if price > dnDev
dnDev := price
price := _src
val += _slp
//
= ta.kc(close, 80, 10.5)
= ta.kc(close, 80, 9.5)
= ta.kc(close, 80, 8)
= ta.kc(close, 80, 3)
barsL = 10
barsR = 10
pivotHigh = fixnan(ta.pivothigh(barsL, barsR) )
pivotLow = fixnan(ta.pivotlow(barsL, barsR) )
source = close, period = 150
= lr_slope(source, period)
= lr_dev(source, period, s, a, i)
y1 = low - (ta.atr(30) * 2), y1B = low - ta.atr(30)
y2 = high + (ta.atr(30) * 2), y2B = high + ta.atr(30)
x1 = bar_index - period + 1, _y1 = i + s * (period - 1), x2 = bar_index, _y2 = i
//Functions
//Line Style function
get_line_style(style) =>
out = switch style
'???' => line.style_solid
'----' => line.style_dashed
' ' => line.style_dotted
//Function to get order block coordinates
get_coordinates(condition, top, btm, ob_val)=>
var ob_top = array.new_float(0)
var ob_btm = array.new_float(0)
var ob_avg = array.new_float(0)
var ob_left = array.new_int(0)
float ob = na
//Append coordinates to arrays
if condition
avg = math.avg(top, btm)
array.unshift(ob_top, top)
array.unshift(ob_btm, btm)
array.unshift(ob_avg, avg)
ob := ob_val
//Function to remove mitigated order blocks from coordinate arrays
remove_mitigated(ob_top, ob_btm, ob_left, ob_avg, target, bull)=>
mitigated = false
target_array = bull ? ob_btm : ob_top
for element in target_array
idx = array.indexof(target_array, element)
if (bull ? target < element : target > element)
mitigated := true
array.remove(ob_top, idx)
array.remove(ob_btm, idx)
array.remove(ob_avg, idx)
array.remove(ob_left, idx)
mitigated
//Function to set order blocks
set_order_blocks(ob_top, ob_btm, ob_left, ob_avg, ext_last, bg_css, border_css, lvl_css)=>
var ob_box = array.new_box(0)
var ob_lvl = array.new_line(0)
//Global elements
var os = 0
var target_bull = 0.
var target_bear = 0.
// Create non-repainting security function
rp_security(_symbol, _res, _src) =>
request.security(_symbol, _res, _src )
htfHigh = rp_security(syminfo.tickerid, res, high)
htfLow = rp_security(syminfo.tickerid, res, low)
// Main Indicator
// Functions
smoothrng(x, t, m) =>
wper = t * 2 - 1
avrng = ta.ema(math.abs(x - x ), t)
smoothrng = ta.ema(avrng, wper) * m
rngfilt(x, r) =>
rngfilt = x
rngfilt := x > nz(rngfilt ) ? x - r < nz(rngfilt ) ? nz(rngfilt ) : x - r : x + r > nz(rngfilt ) ? nz(rngfilt ) : x + r
percWidth(len, perc) => (ta.highest(len) - ta.lowest(len)) * perc / 100
securityNoRep(sym, res, src) => request.security(sym, res, src, barmerge.gaps_off, barmerge.lookahead_on)
swingPoints(prd) =>
pivHi = ta.pivothigh(prd, prd)
pivLo = ta.pivotlow (prd, prd)
last_pivHi = ta.valuewhen(pivHi, pivHi, 1)
last_pivLo = ta.valuewhen(pivLo, pivLo, 1)
hh = pivHi and pivHi > last_pivHi ? pivHi : na
lh = pivHi and pivHi < last_pivHi ? pivHi : na
hl = pivLo and pivLo > last_pivLo ? pivLo : na
ll = pivLo and pivLo < last_pivLo ? pivLo : na
f_chartTfInMinutes() =>
float _resInMinutes = timeframe.multiplier * (
timeframe.isseconds ? 1 :
timeframe.isminutes ? 1. :
timeframe.isdaily ? 60. * 24 :
timeframe.isweekly ? 60. * 24 * 7 :
timeframe.ismonthly ? 60. * 24 * 30.4375 : na)
f_kc(src, len, sensitivity) =>
basis = ta.sma(src, len)
span = ta.atr(len)
wavetrend(src, chlLen, avgLen) =>
esa = ta.ema(src, chlLen)
d = ta.ema(math.abs(src - esa), chlLen)
ci = (src - esa) / (0.015 * d)
wt1 = ta.ema(ci, avgLen)
wt2 = ta.sma(wt1, 3)
f_top_fractal(_src) => _src < _src and _src < _src and _src > _src and _src > _src
f_bot_fractal(_src) => _src > _src and _src > _src and _src < _src and _src < _src
top_fractal = f_top_fractal(src)
bot_fractal = f_bot_fractal(src)
f_fractalize (_src) => top_fractal ? 1 : bot_fractal ? -1 : 0
f_findDivs(src, topLimit, botLimit) =>
fractalTop = f_fractalize(src) > 0 and src >= topLimit ? src : na
fractalBot = f_fractalize(src) < 0 and src <= botLimit ? src : na
highPrev = ta.valuewhen(fractalTop, src , 0)
highPrice = ta.valuewhen(fractalTop, high , 0)
lowPrev = ta.valuewhen(fractalBot, src , 0)
lowPrice = ta.valuewhen(fractalBot, low , 0)
bearSignal = fractalTop and high > highPrice and src < highPrev
bullSignal = fractalBot and low < lowPrice and src > lowPrev
// Get user input
enableSR = input(false , "SR On/Off", group="SR")
colorSup = input(#00000000 , "Support Color", group="SR")
colorRes = input(#00000000 , "Resistance Color", group="SR")
strengthSR = input.int(2 , "S/R Strength", 1, group="SR")
lineStyle = input.string("Dotted", "Line Style", , group="SR")
lineWidth = input.int(2 , "S/R Line Width", 1, group="SR")
useZones = input(true , "Zones On/Off", group="SR")
useHLZones = input(true , "High Low Zones On/Off", group="SR")
zoneWidth = input.int(2 , "Zone Width %", 0,
tooltip = "it's calculated using % of the distance between highest/lowest in last 300 bars", group="SR")
expandSR = input(true , "Expand SR")
// Get components
rb = 10
prd = 284
ChannelW = 10
label_loc = 55
style = lineStyle == "Solid" ? line.style_solid :
lineStyle == "Dotted" ? line.style_dotted : line.style_dashed
ph = ta.pivothigh(rb, rb)
pl = ta.pivotlow (rb, rb)
sr_levels = array.new_float(21, na)
prdhighest = ta.highest(prd)
prdlowest = ta.lowest(prd)
cwidth = percWidth(prd, ChannelW)
zonePerc = percWidth(300, zoneWidth)
aas = array.new_bool(41, true)
u1 = 0.0, u1 := nz(u1 )
d1 = 0.0, d1 := nz(d1 )
highestph = 0.0, highestph := highestph
lowestpl = 0.0, lowestpl := lowestpl
var sr_levs = array.new_float(21, na)
label hlabel = na, label.delete(hlabel )
label llabel = na, label.delete(llabel )
var sr_lines = array.new_line(21, na)
var sr_linesH = array.new_line(21, na)
var sr_linesL = array.new_line(21, na)
var sr_linesF = array.new_linefill(21, na)
var sr_labels = array.new_label(21, na)
if (not na(ph) or not na(pl))
for x = 0 to array.size(sr_levels) - 1
array.set(sr_levels, x, na)
highestph := prdlowest
lowestpl := prdhighest
countpp = 0
for x = 0 to prd
if na(close )
break
if not na(ph ) or not na(pl )
highestph := math.max(highestph, nz(ph , prdlowest), nz(pl , prdlowest))
lowestpl := math.min(lowestpl, nz(ph , prdhighest), nz(pl , prdhighest))
countpp += 1
if countpp > 40
break
if array.get(aas, countpp)
upl = (not na(ph ) and (ph != 0) ? high : low ) + cwidth
dnl = (not na(ph ) and (ph != 0) ? high : low ) - cwidth
u1 := countpp == 1 ? upl : u1
d1 := countpp == 1 ? dnl : d1
tmp = array.new_bool(41, true)
cnt = 0
tpoint = 0
for xx = 0 to prd
if na(close )
break
if not na(ph ) or not na(pl )
chg = false
cnt += 1
if cnt > 40
break
if array.get(aas, cnt)
if not na(ph )
if high <= upl and high >= dnl
tpoint += 1
chg := true
if not na(pl )
if low <= upl and low >= dnl
tpoint += 1
chg := true
if chg and cnt < 41
array.set(tmp, cnt, false)
if tpoint >= strengthSR
for g = 0 to 40 by 1
if not array.get(tmp, g)
array.set(aas, g, false)
if (not na(ph ) and countpp < 21)
array.set(sr_levels, countpp, high )
if (not na(pl ) and countpp < 21)
array.set(sr_levels, countpp, low )
// Plot
var line highest_ = na, line.delete(highest_)
var line lowest_ = na, line.delete(lowest_)
var line highest_fill1 = na, line.delete(highest_fill1)
var line highest_fill2 = na, line.delete(highest_fill2)
var line lowest_fill1 = na, line.delete(lowest_fill1)
var line lowest_fill2 = na, line.delete(lowest_fill2)
hi_col = close >= highestph ? colorSup : colorRes
lo_col = close >= lowestpl ? colorSup : colorRes
if enableSR
highest_ := line.new(bar_index - 311, highestph, bar_index, highestph, xloc.bar_index, expandSR ? extend.both : extend.right, hi_col, style, lineWidth)
lowest_ := line.new(bar_index - 311, lowestpl , bar_index, lowestpl , xloc.bar_index, expandSR ? extend.both : extend.right, lo_col, style, lineWidth)
if useHLZones
highest_fill1 := line.new(bar_index - 311, highestph + zonePerc, bar_index, highestph + zonePerc, xloc.bar_index, expandSR ? extend.both : extend.right, na)
highest_fill2 := line.new(bar_index - 311, highestph - zonePerc, bar_index, highestph - zonePerc, xloc.bar_index, expandSR ? extend.both : extend.right, na)
lowest_fill1 := line.new(bar_index - 311, lowestpl + zonePerc , bar_index, lowestpl + zonePerc , xloc.bar_index, expandSR ? extend.both : extend.right, na)
lowest_fill2 := line.new(bar_index - 311, lowestpl - zonePerc , bar_index, lowestpl - zonePerc , xloc.bar_index, expandSR ? extend.both : extend.right, na)
linefill.new(highest_fill1, highest_fill2, hi_col)
linefill.new(lowest_fill1 , lowest_fill2 , lo_col)
if (not na(ph) or not na(pl))
for x = 0 to array.size(sr_lines) - 1
array.set(sr_levs, x, array.get(sr_levels, x))
for x = 0 to array.size(sr_lines) - 1
line.delete(array.get(sr_lines, x))
line.delete(array.get(sr_linesH, x))
line.delete(array.get(sr_linesL, x))
linefill.delete(array.get(sr_linesF, x))
if (not na(array.get(sr_levs, x)) and enableSR)
line_col = close >= array.get(sr_levs, x) ? colorSup : colorRes
array.set(sr_lines, x, line.new(bar_index - 355, array.get(sr_levs, x), bar_index, array.get(sr_levs, x), xloc.bar_index, expandSR ? extend.both : extend.right, line_col, style, lineWidth))
if useZones
array.set(sr_linesH, x, line.new(bar_index - 355, array.get(sr_levs, x) + zonePerc, bar_index, array.get(sr_levs, x) + zonePerc, xloc.bar_index, expandSR ? extend.both : extend.right, na))
array.set(sr_linesL, x, line.new(bar_index - 355, array.get(sr_levs, x) - zonePerc, bar_index, array.get(sr_levs, x) - zonePerc, xloc.bar_index, expandSR ? extend.both : extend.right, na))
array.set(sr_linesF, x, linefill.new(array.get(sr_linesH, x), array.get(sr_linesL, x), line_col))
for x = 0 to array.size(sr_labels) - 1
label.delete(array.get(sr_labels, x))
if (not na(array.get(sr_levs, x)) and enableSR)
lab_loc = close >= array.get(sr_levs, x) ? label.style_label_up : label.style_label_down
lab_col = close >= array.get(sr_levs, x) ? colorSup : colorRes
array.set(sr_labels, x, label.new(bar_index + label_loc, array.get(sr_levs, x), str.tostring(math.round_to_mintick(array.get(sr_levs, x))), color=lab_col , textcolor=#000000, style=lab_loc))
hlabel := enableSR ? label.new(bar_index + label_loc + math.round(math.sign(label_loc)) * 20, highestph, "High Level : " + str.tostring(highestph), color=hi_col, textcolor=#000000, style=label.style_label_down) : na
llabel := enableSR ? label.new(bar_index + label_loc + math.round(math.sign(label_loc)) * 20, lowestpl , "Low Level : " + str.tostring(lowestpl) , color=lo_col, textcolor=#000000, style=label.style_label_up ) : na
// Get components
rsi = ta.rsi(close, 28)
//rsiOb = rsi > 78 and rsi > ta.ema(rsi, 10)
//rsiOs = rsi < 27 and rsi < ta.ema(rsi, 10)
rsiOb = rsi > 65 and rsi > ta.ema(rsi, 10)
rsiOs = rsi < 35 and rsi < ta.ema(rsi, 10)
dHigh = securityNoRep(syminfo.tickerid, "D", high )
dLow = securityNoRep(syminfo.tickerid, "D", low )
dClose = securityNoRep(syminfo.tickerid, "D", close )
ema = ta.ema(close, 144)
emaBull = close > ema
equal_tf(res) => str.tonumber(res) == f_chartTfInMinutes() and not timeframe.isseconds
higher_tf(res) => str.tonumber(res) > f_chartTfInMinutes() or timeframe.isseconds
too_small_tf(res) => (timeframe.isweekly and res=="1") or (timeframe.ismonthly and str.tonumber(res) < 10)
securityNoRep1(sym, res, src) =>
bool bull_ = na
bull_ := equal_tf(res) ? src : bull_
bull_ := higher_tf(res) ? request.security(sym, res, src, barmerge.gaps_off, barmerge.lookahead_on) : bull_
bull_array = request.security_lower_tf(syminfo.tickerid, higher_tf(res) ? str.tostring(f_chartTfInMinutes()) + (timeframe.isseconds ? "S" : "") : too_small_tf(res) ? (timeframe.isweekly ? "3" : "10") : res, src)
if array.size(bull_array) > 1 and not equal_tf(res) and not higher_tf(res)
bull_ := array.pop(bull_array)
array.clear(bull_array)
bull_
// === BASE FUNCTIONS ===
// Returns MA input selection variant, default to SMA if blank or typo.
variant(type, src, len, offSig, offALMA) =>
v1 = ta.sma(src, len) // Simple
v2 = ta.ema(src, len) // Exponential
v3 = 2 * v2 - ta.ema(v2, len) // Double Exponential
v4 = 3 * (v2 - ta.ema(v2, len)) + ta.ema(ta.ema(v2, len), len) // Triple Exponential
v5 = ta.wma(src, len) // Weighted
v6 = ta.vwma(src, len) // Volume Weighted
v7 = 0.0
sma_1 = ta.sma(src, len) // Smoothed
v7 := na(v7 ) ? sma_1 : (v7 * (len - 1) + src) / len
v8 = ta.wma(2 * ta.wma(src, len / 2) - ta.wma(src, len), math.round(math.sqrt(len))) // Hull
v9 = ta.linreg(src, len, offSig) // Least Squares
v10 = ta.alma(src, len, offALMA, offSig) // Arnaud Legoux
v11 = ta.sma(v1, len) // Triangular (extreme smooth)
// SuperSmoother filter
// 2013 John F. Ehlers
a1 = math.exp(-1.414 * 3.14159 / len)
b1 = 2 * a1 * math.cos(1.414 * 3.14159 / len)
c2 = b1
c3 = -a1 * a1
c1 = 1 - c2 - c3
v12 = 0.0
v12 := c1 * (src + nz(src )) / 2 + c2 * nz(v12 ) + c3 * nz(v12 )
type == 'EMA' ? v2 : type == 'DEMA' ? v3 : type == 'TEMA' ? v4 : type == 'WMA' ? v5 : type == 'VWMA' ? v6 : type == 'SMMA' ? v7 : type == 'HullMA' ? v8 : type == 'LSMA' ? v9 : type == 'ALMA' ? v10 : type == 'TMA' ? v11 : type == 'SSMA' ? v12 : v1
// security wrapper for repeat calls
reso(exp, use, res) =>
security_1 = request.security(syminfo.tickerid, res, exp, gaps = barmerge.gaps_off, lookahead = barmerge.lookahead_on)
use ? security_1 : exp
// === /BASE FUNCTIONS ===
// === SERIES SETUP ===
closeSeries = variant(basisType, close , basisLen, offsetSigma, offsetALMA)
openSeries = variant(basisType, open , basisLen, offsetSigma, offsetALMA)
// === /SERIES ===
// Get Alternate resolution Series if selected.
closeSeriesAlt = reso(closeSeries, useRes, stratRes)
openSeriesAlt = reso(openSeries, useRes, stratRes)
//
lxTrigger = false
sxTrigger = false
leTrigger = ta.crossover (closeSeriesAlt, openSeriesAlt)
seTrigger = ta.crossunder(closeSeriesAlt, openSeriesAlt)
G_RISK = '■ ' + 'Risk Management'
//#region ———— <↓↓↓ G_RISK ↓↓↓> {
// ———————————
//Tooltip
T_LVL = '(%) Exit Level'
T_QTY = '(%) Adjust trade exit volume'
T_MSG = 'Paste JSON message for your bot'
//Webhook Message
O_LEMSG = 'Long Entry'
O_LXMSGSL = 'Long SL'
O_LXMSGTP1 = 'Long TP1'
O_LXMSGTP2 = 'Long TP2'
O_LXMSGTP3 = 'Long TP3'
O_LXMSG = 'Long Exit'
O_SEMSG = 'Short Entry'
O_SXMSGSL = 'Short SL'
O_SXMSGA = 'Short TP1'
O_SXMSGB = 'Short TP2'
O_SXMSGC = 'Short TP3'
O_SXMSGX = 'Short Exit'
// ——————————— | | | Line length guide |
i_lxLvlTP1 = input.float (0.2, 'Level TP1' , group = G_RISK,
tooltip = T_LVL)
i_lxQtyTP1 = input.float (80.0, 'Qty TP1' , group = G_RISK,
tooltip = T_QTY)
i_lxLvlTP2 = input.float (0.5, 'Level TP2' , group = G_RISK,
tooltip = T_LVL)
i_lxQtyTP2 = input.float (10.0, 'Qty TP2' , group = G_RISK,
tooltip = T_QTY)
i_lxLvlTP3 = input.float (7.0, 'Level TP3' , group = G_RISK,
tooltip = T_LVL)
i_lxQtyTP3 = input.float (2, 'Qty TP3' , group = G_RISK,
tooltip = T_QTY)
i_lxLvlSL = input.float (0.5, 'Stop Loss' , group = G_RISK,
tooltip = T_LVL)
i_sxLvlTP1 = i_lxLvlTP1
i_sxQtyTP1 = i_lxQtyTP1
i_sxLvlTP2 = i_lxLvlTP2
i_sxQtyTP2 = i_lxQtyTP2
i_sxLvlTP3 = i_lxLvlTP3
i_sxQtyTP3 = i_lxQtyTP3
i_sxLvlSL = i_lxLvlSL
G_MSG = '■ ' + 'Webhook Message'
i_leMsg = input.string (O_LEMSG ,'Long Entry' , group = G_MSG, tooltip = T_MSG)
i_lxMsgSL = input.string (O_LXMSGSL ,'Long SL' , group = G_MSG, tooltip = T_MSG)
i_lxMsgTP1 = input.string (O_LXMSGTP1,'Long TP1' , group = G_MSG, tooltip = T_MSG)
i_lxMsgTP2 = input.string (O_LXMSGTP2,'Long TP2' , group = G_MSG, tooltip = T_MSG)
i_lxMsgTP3 = input.string (O_LXMSGTP3,'Long TP3' , group = G_MSG, tooltip = T_MSG)
i_lxMsg = input.string (O_LXMSG ,'Long Exit' , group = G_MSG, tooltip = T_MSG)
i_seMsg = input.string (O_SEMSG ,'Short Entry' , group = G_MSG, tooltip = T_MSG)
i_sxMsgSL = input.string (O_SXMSGSL ,'Short SL' , group = G_MSG, tooltip = T_MSG)
i_sxMsgTP1 = input.string (O_SXMSGA ,'Short TP1' , group = G_MSG, tooltip = T_MSG)
i_sxMsgTP2 = input.string (O_SXMSGB ,'Short TP2' , group = G_MSG, tooltip = T_MSG)
i_sxMsgTP3 = input.string (O_SXMSGC ,'Short TP3' , group = G_MSG, tooltip = T_MSG)
i_sxMsg = input.string (O_SXMSGX ,'Short Exit' , group = G_MSG, tooltip = T_MSG)
i_src = close
G_DISPLAY = 'Display'
//
i_alertOn = input.bool (true, 'Alert Labels On/Off' , group = G_DISPLAY)
i_barColOn = input.bool (true, 'Bar Color On/Off' , group = G_DISPLAY)
// ———————————
// @function Calculate the Take Profit line, and the crossover or crossunder
f_tp(_condition, _conditionValue, _leTrigger, _seTrigger, _src, _lxLvlTP, _sxLvlTP)=>
var float _tpLine = 0.0
_topLvl = _src + (_src * (_lxLvlTP / 100))
_botLvl = _src - (_src * (_sxLvlTP / 100))
_tpLine := _condition != _conditionValue and _leTrigger ? _topLvl :
_condition != -_conditionValue and _seTrigger ? _botLvl :
nz(_tpLine )
// @function Similar to "ta.crossover" or "ta.crossunder"
f_cross(_scr1, _scr2, _over)=>
_cross = _over ? _scr1 > _scr2 and _scr1 < _scr2 :
_scr1 < _scr2 and _scr1 > _scr2
// ———————————
//
var float condition = 0.0
var float slLine = 0.0
var float entryLine = 0.0
//
entryLine := leTrigger and condition <= 0.0 ? close :
seTrigger and condition >= 0.0 ? close : nz(entryLine )
//
slTopLvl = i_src + (i_src * (i_lxLvlSL / 100))
slBotLvl = i_src - (i_src * (i_sxLvlSL / 100))
slLine := condition <= 0.0 and leTrigger ? slBotLvl :
condition >= 0.0 and seTrigger ? slTopLvl : nz(slLine )
slLong = f_cross(low, slLine, false)
slShort = f_cross(high, slLine, true )
//
= f_tp(condition, 1.2,leTrigger, seTrigger, i_src, i_lxLvlTP3, i_sxLvlTP3)
= f_tp(condition, 1.1,leTrigger, seTrigger, i_src, i_lxLvlTP2, i_sxLvlTP2)
= f_tp(condition, 1.0,leTrigger, seTrigger, i_src, i_lxLvlTP1, i_sxLvlTP1)
tp3Long = f_cross(high, tp3Line, true )
tp3Short = f_cross(low, tp3Line, false)
tp2Long = f_cross(high, tp2Line, true )
tp2Short = f_cross(low, tp2Line, false)
tp1Long = f_cross(high, tp1Line, true )
tp1Short = f_cross(low, tp1Line, false)
switch
leTrigger and condition <= 0.0 => condition := 1.0
seTrigger and condition >= 0.0 => condition := -1.0
tp3Long and condition == 1.2 => condition := 1.3
tp3Short and condition == -1.2 => condition := -1.3
tp2Long and condition == 1.1 => condition := 1.2
tp2Short and condition == -1.1 => condition := -1.2
tp1Long and condition == 1.0 => condition := 1.1
tp1Short and condition == -1.0 => condition := -1.1
slLong and condition >= 1.0 => condition := 0.0
slShort and condition <= -1.0 => condition := 0.0
lxTrigger and condition >= 1.0 => condition := 0.0
sxTrigger and condition <= -1.0 => condition := 0.0
longE = leTrigger and condition <= 0.0 and condition == 1.0
shortE = seTrigger and condition >= 0.0 and condition == -1.0
longX = lxTrigger and condition >= 1.0 and condition == 0.0
shortX = sxTrigger and condition <= -1.0 and condition == 0.0
longSL = slLong and condition >= 1.0 and condition == 0.0
shortSL = slShort and condition <= -1.0 and condition == 0.0
longTP3 = tp3Long and condition == 1.2 and condition == 1.3
shortTP3 = tp3Short and condition == -1.2 and condition == -1.3
longTP2 = tp2Long and condition == 1.1 and condition == 1.2
shortTP2 = tp2Short and condition == -1.1 and condition == -1.2
longTP1 = tp1Long and condition == 1.0 and condition == 1.1
shortTP1 = tp1Short and condition == -1.0 and condition == -1.1
// ——————————— {
//
if strategy.position_size <= 0 and longE and barstate.isconfirmed
strategy.entry(
'Long',
strategy.long,
alert_message = i_leMsg,
comment = 'LE')
if strategy.position_size > 0 and condition == 1.0
strategy.exit(
id = 'LXTP1',
from_entry = 'Long',
qty_percent = i_lxQtyTP1,
limit = tp1Line,
stop = slLine,
comment_profit = 'LXTP1',
comment_loss = 'SL',
alert_profit = i_lxMsgTP1,
alert_loss = i_lxMsgSL)
if strategy.position_size > 0 and condition == 1.1
strategy.exit(
id = 'LXTP2',
from_entry = 'Long',
qty_percent = i_lxQtyTP2,
limit = tp2Line,
stop = slLine,
comment_profit = 'LXTP2',
comment_loss = 'SL',
alert_profit = i_lxMsgTP2,
alert_loss = i_lxMsgSL)
if strategy.position_size > 0 and condition == 1.2
strategy.exit(
id = 'LXTP3',
from_entry = 'Long',
qty_percent = i_lxQtyTP3,
limit = tp3Line,
stop = slLine,
comment_profit = 'LXTP3',
comment_loss = 'SL',
alert_profit = i_lxMsgTP3,
alert_loss = i_lxMsgSL)
if longX
strategy.close(
'Long',
alert_message = i_lxMsg,
comment = 'LX')
//
if strategy.position_size >= 0 and shortE and barstate.isconfirmed
strategy.entry(
'Short',
strategy.short,
alert_message = i_leMsg,
comment = 'SE')
if strategy.position_size < 0 and condition == -1.0
strategy.exit(
id = 'SXTP1',
from_entry = 'Short',
qty_percent = i_sxQtyTP1,
limit = tp1Line,
stop = slLine,
comment_profit = 'SXTP1',
comment_loss = 'SL',
alert_profit = i_sxMsgTP1,
alert_loss = i_sxMsgSL)
if strategy.position_size < 0 and condition == -1.1
strategy.exit(
id = 'SXTP2',
from_entry = 'Short',
qty_percent = i_sxQtyTP2,
limit = tp2Line,
stop = slLine,
comment_profit = 'SXTP2',
comment_loss = 'SL',
alert_profit = i_sxMsgTP2,
alert_loss = i_sxMsgSL)
if strategy.position_size < 0 and condition == -1.2
strategy.exit(
id = 'SXTP3',
from_entry = 'Short',
qty_percent = i_sxQtyTP3,
limit = tp3Line,
stop = slLine,
comment_profit = 'SXTP3',
comment_loss = 'SL',
alert_profit = i_sxMsgTP3,
alert_loss = i_sxMsgSL)
if shortX
strategy.close(
'Short',
alert_message = i_sxMsg,
comment = 'SX')
// ———————————
c_tp = leTrigger or seTrigger ? na :
condition == 0.0 ? na : color.green
c_entry = leTrigger or seTrigger ? na :
condition == 0.0 ? na : color.blue
c_sl = leTrigger or seTrigger ? na :
condition == 0.0 ? na : color.red
p_tp1Line = plot (
condition == 1.0 or
condition == -1.0 ? tp1Line : na,
title = "TP Line 1",
color = c_tp,
linewidth = 1,
style = plot.style_linebr)
p_tp2Line = plot (
condition == 1.0 or
condition == -1.0 or
condition == 1.1 or
condition == -1.1 ? tp2Line : na,
title = "TP Line 2",
color = c_tp,
linewidth = 1,
style = plot.style_linebr)
p_tp3Line = plot (
condition == 1.0 or
condition == -1.0 or
condition == 1.1 or
condition == -1.1 or
condition == 1.2 or
condition == -1.2 ? tp3Line : na,
title = "TP Line 3",
color = c_tp,
linewidth = 1,
style = plot.style_linebr)
p_entryLine = plot (
condition >= 1.0 or
condition <= -1.0 ? entryLine : na,
title = "Entry Line",
color = c_entry,
linewidth = 1,
style = plot.style_linebr)
p_slLine = plot (
condition == 1.0 or
condition == -1.0 or
condition == 1.1 or
condition == -1.1 or
condition == 1.2 or
condition == -1.2 ? slLine : na,
title = "SL Line",
color = c_sl,
linewidth = 1,
style = plot.style_linebr)
fill(
p_tp3Line, p_entryLine,
color = leTrigger or seTrigger ? na :color.new(color.green, 90))
fill(
p_entryLine, p_slLine,
color = leTrigger or seTrigger ? na :color.new(color.red, 90))
//
plotshape(
i_alertOn and longE,
title = 'Long',
text = 'Long',
textcolor = color.white,
color = color.green,
style = shape.labelup,
size = size.tiny,
location = location.belowbar)
plotshape(
i_alertOn and shortE,
title = 'Short',
text = 'Short',
textcolor = color.white,
color = color.red,
style = shape.labeldown,
size = size.tiny,
location = location.abovebar)
plotshape(
i_alertOn and (longX or shortX) ? close : na,
title = 'Close',
text = 'Close',
textcolor = color.white,
color = color.gray,
style = shape.labelup,
size = size.tiny,
location = location.absolute)
l_tp = i_alertOn and (longTP1 or shortTP1) ? close : na
plotshape(
l_tp,
title = "TP1 Cross",
text = "TP1",
textcolor = color.white,
color = color.olive,
style = shape.labelup,
size = size.tiny,
location = location.absolute)
plotshape(
i_alertOn and (longTP2 or shortTP2) ? close : na,
title = "TP2 Cross",
text = "TP2",
textcolor = color.white,
color = color.olive,
style = shape.labelup,
size = size.tiny,
location = location.absolute)
plotshape(
i_alertOn and (longTP3 or shortTP3) ? close : na,
title = "TP3 Cross",
text = "TP3",
textcolor = color.white,
color = color.olive,
style = shape.labelup,
size = size.tiny,
location = location.absolute)
plotshape(
i_alertOn and (longSL or shortSL) ? close : na,
title = "SL Cross",
text = "SL",
textcolor = color.white,
color = color.maroon,
style = shape.labelup,
size = size.tiny,
location = location.absolute)
//
plot(
na,
title = "─── ───",
editable = false,
display = display.data_window)
plot(
condition,
title = "condition",
editable = false,
display = display.data_window)
plot(
strategy.position_size * 100,
title = ".position_size",
editable = false,
display = display.data_window)
//#endregion }
// ——————————— <↑↑↑ G_RISK ↑↑↑>
//#region ———— <↓↓↓ G_SCRIPT02 ↓↓↓> {
// @function Queues a new element in an array and de-queues its first element.
f_qDq(_array, _val) =>
array.push(_array, _val)
_return = array.shift(_array)
_return
var line a_slLine = array.new_line(1)
var line a_entryLine = array.new_line(1)
var line a_tp3Line = array.new_line(1)
var line a_tp2Line = array.new_line(1)
var line a_tp1Line = array.new_line(1)
var label a_slLabel = array.new_label(1)
var label a_tp3label = array.new_label(1)
var label a_tp2label = array.new_label(1)
var label a_tp1label = array.new_label(1)
var label a_entryLabel = array.new_label(1)
newEntry = longE or shortE
entryIndex = 1
entryIndex := newEntry ? bar_index : nz(entryIndex )
lasTrade = bar_index >= entryIndex
l_right = 10
line.delete(
f_qDq(a_slLine,
line.new(
entryIndex,
slLine,
last_bar_index + l_right,
slLine,
style = line.style_solid,
color = c_sl)))
line.delete(
f_qDq(a_entryLine,
line.new(
entryIndex,
entryLine,
last_bar_index + l_right,
entryLine,
style = line.style_solid,
color = color.blue)))
line.delete(
f_qDq(a_tp3Line,
line.new(
entryIndex,
tp3Line,
last_bar_index + l_right,
tp3Line,
style = line.style_solid,
color = c_tp)))
line.delete(
f_qDq(a_tp2Line,
line.new(
entryIndex,
tp2Line,
last_bar_index + l_right,
tp2Line,
style = line.style_solid,
color = c_tp)))
line.delete(
f_qDq(a_tp1Line,
line.new(
entryIndex,
tp1Line,
last_bar_index + l_right,
tp1Line,
style = line.style_solid,
color = c_tp)))
label.delete(
f_qDq(a_slLabel,
label.new(
last_bar_index + l_right,
slLine,
'SL: ' + str.tostring(slLine, '##.###'),
style = label.style_label_left,
textcolor = color.white,
color = c_sl)))
label.delete(
f_qDq(a_entryLabel,
label.new(
last_bar_index + l_right,
entryLine,
'Entry: ' + str.tostring(entryLine, '##.###'),
style = label.style_label_left,
textcolor = color.white,
color = color.blue)))
label.delete(
f_qDq(a_tp3label,
label.new(
last_bar_index + l_right,
tp3Line,
'TP3: ' + str.tostring(tp3Line, '##.###'),
style = label.style_label_left,
textcolor = color.white,
color = c_tp)))
label.delete(
f_qDq(a_tp2label,
label.new(
last_bar_index + l_right,
tp2Line,
'TP2: ' + str.tostring(tp2Line, '##.###'),
style = label.style_label_left,
textcolor = color.white,
color = c_tp)))
label.delete(
f_qDq(a_tp1label,
label.new(
last_bar_index + l_right,
tp1Line,
'TP1: ' + str.tostring(tp1Line, '##.###'),
style = label.style_label_left,
textcolor = color.white,
color = c_tp)))
// ———————————
//
if longE or shortE or longX or shortX
alert(message = 'Any Alert', freq = alert.freq_once_per_bar_close)
if longE
alert(message = 'Long Entry', freq = alert.freq_once_per_bar_close)
if shortE
alert(message = 'Short Entry', freq = alert.freq_once_per_bar_close)
if longX
alert(message = 'Long Exit', freq = alert.freq_once_per_bar_close)
if shortX
alert(message = 'Short Exit', freq = alert.freq_once_per_bar_close)
//#endregion }
// ——————————— <↑↑↑ G_SCRIPT03 ↑↑↑>
Indicadores e estratégias
Gimme!2Gimme!@ make yo profit go Boom ! . Got trand wo, got singal wo but, need to learn wo. Small step we go mind set before compound for sure. Gimme Gimme Gimme Gimme ya ya tata.
ICT Key Session & MacrosMarks Key ICT timings and sessions and silver bullet timings plots all macro timings for Forex and Gold
Momentum Flow TP11/@version=5
indicator('Momentum Flow TP11', overlay=false)
//----------------------------------------------------------------------------------------------------
// Momentum Flow------------------------------------------------------------------------------------------
grp1 = "Momentum Flow"
lenFastF = input.int(7, title='FEMA', minval=1, group=grp1)
lenSlowF = input.int(25, title='SEMA', minval=1, group=grp1)
srcF = input.source(close, title='Source', group=grp1)
FundflowF(s, fastLenF, slowLenF, sigLenF) =>
fastF = ta.ema(s, fastLenF)
slowF = ta.ema(s, slowLenF)
femaF = fastF - slowF
sigF = ta.ema(femaF, sigLenF)
lenSigF = 9
= FundflowF(srcF, lenFastF, lenSlowF, lenSigF)
candleColorF = macF >= macF ? #1cff00 : #ff0000
sigColorF = signalF > signalF ? #1cff00 : #ff0000
plotcandle(open=macF , close=macF, high=macF, low=macF , color=candleColorF)
//----------------------------------------------------------------------------------------------------
//2Line------------------------------------------------------------------------------------------------
grp2 = "2Line"
ma(source, length, type) =>
switch type
"SMA" => ta.sma(source, length)
"EMA" => ta.ema(source, length)
"SMMA (RMA)" => ta.rma(source, length)
"WMA" => ta.wma(source, length)
"VWMA" => ta.vwma(source, length)
typeMAE = input.string(title="Method MA", defval = "EMA", options= , group=grp2)
len1E = input.int(5, title="Length 1", group=grp2)
len2E = input.int(56, title="Length 2", group=grp2)
col1E = input.color(color.blue, title="Color 1", group=grp2)
col2E = input.color(#1cff00, title="Color 2", group=grp2)
iE = input.bool(true, "2Line On/Off ?", group=grp2)
plot(ma(macF, len1E, typeMAE), color=col1E,linewidth=2)
plot(ma(macF, len2E, typeMAE), color=col2E,linewidth=2)
//----------------------------------------------------------------------------------------------------
//FBB-------------------------------------------------------------------------------------------------
grp3="Bands"
typeMAFB = input.string(title="Method FB", defval = "VWMA", options= , group=grp3)
srcMAFB = input.source(hlc3, title="Source Fibo BB", group=grp3)
lenFB = input.int(200, title="Length Fibo BB", group=grp3)
colFB = input.color(color.fuchsia, title="Color Fibo BB", group=grp3)
iFB = input.bool(true, title="MA Fibo BB On/Off ?", group=grp3)
basisFB = ma(macF, lenFB, typeMAFB)
plot(iFB ? basisFB : na, color=colFB,linewidth=2)
//----------------------------------------------------------------------------------------------------
//BB--------------------------------------------------------------------------------------------------
grp4="Swing Bands"
typeMABB = input.string(title="Method BB", defval = "SMA", options= , group=grp4)
lenMABB = input.int(39, title="Length BB", group=grp4)
multBB = input.float(2.0, title="Multiplier BB", group=grp4)
colBasisBB = input.color(color.rgb(245, 243, 242, 100), title="Color Basis BB", group=grp4)
colUpperBB = input.color(#0ed4b3, title="Color Upper BB", group=grp4)
colLowerBB = input.color(#f3f2ed00, title="Color Lower BB", group=grp4)
iBB = input.bool(true, title="BB On/Off ?", group=grp4)
basisBB = ma(macF, lenMABB, typeMABB)
devBB = ta.stdev(macF, lenMABB)
upperBB = basisBB+(multBB*devBB)
lowerBB = basisBB-(multBB*devBB)
plot(iBB ? basisBB : na, color=colBasisBB)
plot(iBB ? upperBB : na, color=colUpperBB,linewidth=2)
plot(iBB ? lowerBB : na, color=colLowerBB)
hline(0, title="Zero Line", color=color.gray, linestyle = hline.style_dashed)
RSI Divergence signal® [BlackRock_et]RSI Divergence signal® — Overview
Overlay indicator that detects regular and hidden RSI divergences and optionally draws price lines between pivot points.
Includes two engines: a Core RSI(5) divergence module with smoothing and a MOST-style module that mirrors the classic “RSI(14) + pivot” logic. Generates Buy/Sell labels and exposes four alert conditions.
How it works
RSI Core (default):
RSI baseline: RSI(5) zero-centered (–50…+50), optional smoothing (SMA/EMA/WMA).
Pivots: price pivots use pivotLeft=7 / pivotRight=1; RSI pivots are synchronized within pivotSyncBars=5.
Regular divergences:
Bullish: price lower low + RSI higher low.
Bearish: price higher high + RSI lower high.
Hidden divergences (optional):
Hidden Bullish: price higher low + RSI lower low.
Hidden Bearish: price lower high + RSI higher high.
On confirmation, the script can draw a dotted/solid price line between the two pivots and place a label at the second pivot.
MOST-style module (optional):
RSI source RSI(14) on close with lookbackLeft=5 / lookbackRight=5.
Signals only when the previous pivot falls within a time gate (5–60 bars).
Detects regular bullish/bearish divergences and plots labels; optional price lines between the two swing points.
Plots & labels (what you see)
Buy/Sell labels: “B” for bullish, “S” for bearish; hidden divergences add “(H)”.
Optional price lines between the two price pivots (toggleable).
Colors for regular/hidden bull/bear and label styles are user-configurable.
Inputs (user controls)
Show Regular Divergence (Core) — on/off
Show Hidden Divergence (Core) — on/off
Use MOST-style Divergence — on/off
Draw Price Lines — draw/remove lines between pivots
Delete Broken Lines — when new lines overlap older ones, delete older lines instead of downgrading them to dotted
Colors — bull/bear (regular & hidden) and label BG/text colors
Core engine lengths, pivot distances, smoothing and MOST params are locked in code for consistency across users.
Alerts
Four ready-to-use alertconditions:
Buy (Bullish Divergence — Core)
Sell (Bearish Divergence — Core)
Buy (Bullish Divergence — MOST)
Sell (Bearish Divergence — MOST)
Usage notes
Timeframes/markets: Works on any symbol/timeframe; for cleaner pivots, consider H1+ on volatile markets (crypto/FX/indices/equities).
Confirmation timing: Signals appear after pivot confirmation (pivotRight=1) and are evaluated on bar close.
Lines & clutter: If your chart becomes busy, either disable Draw Price Lines or enable Delete Broken Lines.
Chart types: Designed for standard candles; alternative chart types (Heikin Ashi, Renko, Range, etc.) can distort divergence logic.
Not auto-trading: Labels/alerts are contextual indications, not standalone entries. Always confirm with your own rules and risk control.
Limitations
Pivot dependency: Divergences rely on swing identification; changing timeframe or extreme volatility may shift which pivots qualify.
No MTF sources: Signals are computed on the chart’s timeframe; there is no request.security() MTF in this script.
Label/line caps: Internally manages arrays and respects max_lines_count / max_labels_count; excessive history may be trimmed.
Release notes
v1.0 (2025-09-10): Initial public release with Core (regular/hidden) and optional MOST-style divergences, price-line drawing, and four alertconditions.
EMA 200 ± Adjustable %This script plots the 200-period EMA together with two customizable offset lines: EMA200 + % and EMA200 - %. The percentages can be adjusted independently, allowing traders to visualize potential dynamic support and resistance zones around the EMA200.
Today's 5min HH/LL LinesOverview
This indicator identifies the highest high (HH) and lowest low (LL) formed by the first 5 one-minute candles of the current trading day. Once calculated, it plots continuous horizontal lines at those price levels for the remainder of the day.
How it works
The script internally requests 1-minute data for the current symbol, regardless of your chart’s timeframe.
At the start of each new trading day, it resets counters.
It captures the highest high and lowest low across the first five completed 1-minute candles.
After the 5th one-minute bar closes, it draws:
A green horizontal line at the highest high.
A red horizontal line at the lowest low.
These lines extend to the right, covering the entire trading session, and automatically scale with zoom/pan.
At the next session, the old lines are deleted and recalculated for the new day.
Use cases
Helps spot early intraday support and resistance zones.
Useful for breakout or reversal strategies that monitor when price breaches the first 5-minute range (derived from 5x1m bars).
Can be combined with volume, momentum, or candlestick signals for high-probability entries.
Key features
Works on any timeframe — always uses 1-minute data for precision.
Shows lines only for the current day (no clutter from prior sessions).
Lines are dynamic and adaptive — they remain fixed at the calculated price but extend continuously across the chart.
9 EMA + VolumeBest use on 5 minute and 15 minutes timeframe.
Buy when cross over with volume, and retest.
Opening Range Breakout (ORB) Indicator - 30 MinThis powerful and customizable Opening Range Breakout (ORB) Indicator for TradingView helps traders identify and visualize key price levels during the initial trading hours. Designed for flexibility, it provides essential market insights and actionable information directly on your chart.
Key Features:
• Dynamic Opening Range Calculation: Automatically identifies and plots the high and low of a user-defined opening range. This range is crucial for many trading strategies as it often sets the tone for the day.
• Customizable Session & Timezone: Tailor the indicator to any market by specifying the exact opening range time (e.g., 09:30-10:00) and its corresponding timezone (e.g., "America/New_York" for NASDAQ). This ensures accurate range detection regardless of your local time or the asset you are trading.
• Integrated Market Metrics: Gain a comprehensive view of market conditions with built-in displays for:
• Moving Averages (SMAs): Visualize 20-period and 50-period Simple Moving Averages to gauge short-term and medium-term trends.
• Volume-Weighted Average Price (VWAP): Understand the average price of an asset weighted by volume, a key institutional benchmark.
• Relative Volume (RVOL): Monitor current volume activity compared to its average, with a customizable threshold to identify significant volume surges.
• Visual Cues & Signals: The indicator provides clear visual signals directly on the chart for important price actions related to the opening range, including breakouts, target hits, stop hits, and potential re-entry points. These visual aids help in quick decision-making.
• Comprehensive Information Table: A convenient, real-time table displayed on your chart summarizes critical metrics at a glance, such as:
• OR High and Low
• Relative Volume status
• Current Trend (Bullish/Bearish)
• Price position relative to VWAP
• Signal status
• Suggested position sizing (based on user-defined risk parameters)
• Customizable Alerts: Set up various alerts for key events, such as opening range breakouts, entry signals, and profit target or stop-loss hits. Stay informed without constantly monitoring the chart.
• Flexible Settings: Adjust numerous parameters through the indicator settings, including EMA lengths, RVOL thresholds, signal visibility, level displays, and an optional higher timeframe bias filter.
This ORB Indicator is an indispensable tool for traders looking to leverage the power of opening range analysis combined with essential technical metrics for informed trading decisions. Its robust design and customizable features make it suitable for various trading styles and market conditions.
Risk Management: Take Profit (TP) and Stop Loss (SL) Configuration
Effective risk management is crucial for any trading strategy. This ORB indicator provides configurable options to help you manage your trades with defined Take Profit and Stop Loss levels.
•Account Risk Percentage: You can define your Account Risk % in the indicator settings. This input allows you to specify what percentage of your hypothetical account balance you are willing to risk per trade. The indicator uses this value to suggest appropriate position sizing, helping you maintain consistent risk management.
•Target 1R (TP1) Configuration: The first Take Profit target (TP1) is dynamically set at 50% of the Opening Range (OR) distance from your entry point. This means if the OR is 10 cents, TP1 will be 5 cents from your entry. The Scale Out % at 1R input allows you to set a percentage for scaling out of your position when the price reaches this first target, helping to secure partial profits and reduce risk.
• Dynamic Stop Loss (SL) & Trailing:
•Initially, the Stop Loss is dynamically calculated based on the Opening Range structure to protect your capital.
•Crucially, after TP1 is hit, the Stop Loss is automatically updated to a more favorable position (e.g., break-even or a trailing stop) to further protect your profits and reduce risk on the remaining position. This helps in securing gains as the trade progresses.
•Visual Level Displays: When Show Stop/Target Levels is enabled, the indicator visually plots these calculated Stop Loss and Take Profit levels directly on your chart. This provides a clear visual representation of your risk and reward parameters for each potential trade setup.
By utilizing these configurable risk management features, traders can integrate their preferred risk parameters directly into their analysis, allowing for more disciplined and controlled trading decisions.
Super Signals (High Accuracy)Test it and you will juge it by yourself..a high winrate +90%
NO REPAINTING, NO LAGGING
BNCS Ultimate Pro--- BNCS Ultimate Pro ---
This is a powerful, multi-module trading indicator designed to precisely identify trend-following and reversal signals. By leveraging a suite of advanced confirmation engines and filters, this indicator provides high-probability trading opportunities across various market conditions.
**Key Features:**
* **Accurate Buy/Sell Signals:** Clear and easy-to-understand signals for both trend and reversal trading modes.
* **Multi-Module Confirmation:** Utilizes 5 distinct trend engines to enhance signal accuracy and filter out noise.
* **Advanced Filters:** Includes Higher Timeframe, Candle Rejection, and a Primary Trend filter to avoid false signals in unfavorable conditions.
* **Live Dashboard:** Get a real-time overview of the current market trend, strength, and upcoming signal status directly on your chart.
* **Fully Customizable:** Tailor the indicator to your personal trading style by enabling or disabling any engine or filter.
**How to Use:**
* **Continuation Mode:** Works best in trending markets. It provides signals in the direction of the established trend.
* **Reversal Mode:** Ideal for identifying potential tops and bottoms in ranging or sideways markets.
* Always practice proper risk management and confirm signals with your own analysis.
**Contact for Access:**
This is an invite-only script. If you are interested in gaining access, please contact me via:
* **Telegram:**
* **Link:**
* **Email:**
---
**Disclaimer:**
This indicator is for educational purposes only and does not constitute financial advice. Trading involves significant financial risk, and you are solely responsible for your decisions. This script is for personal use only. Copying, reselling, or sharing it is strictly prohibited.
---
3CRGANG - Sessions3CRGANG - Sessions
This indicator displays a table showing the status of major global trading sessions (NYSE, LSE, FSE, ASX, TSE, HKSE) with real-time updates, customizable timezones, and visualization settings. It includes holiday detection, session alerts, and detailed tooltips for weekly schedules, tailored for stocks, forex, futures, crypto, commodities, and indices.
Features:
Sessions Table: Displays the status of six major exchanges (New York, London, Frankfurt, Sydney, Tokyo, Hong Kong) with color-coded indicators for active, pre-open, and closed states.
Timezone Support: Choose from a wide range of global timezones to align session times with your local time.
Visualization Options: Select device template (Desktop, Tablet, Mobile) and color theme (Light or Dark) for optimal display.
Holiday Detection: Integrates holiday schedules for each exchange, including half-day closures (e.g., Lunar New Year for HKSE), with alerts for session closures.
Session Alerts: Configurable alerts for pre-open (30 or 5 minutes), open, pre-close (30 or 5 minutes), close, and holiday events for each exchange.
Tooltips: Detailed weekly schedules in tooltips, showing session times, holidays, and time until open/close in the user’s timezone.
Time Settings:
Timezone: Select from global timezones (e.g., UTC+3 Jerusalem, UTC-4 New York).
Time Format: Choose between Standard (12-hour with AM/PM) or Military (24-hour) time.
Visualization Setup:
Device: Select Desktop, Tablet, or Mobile template to adjust table size and text.
Color Theme: Choose Light or Dark theme for visual elements.
Sessions Dashboard:
Sessions Table Position: Set the position of the sessions table (e.g., top-right, bottom-center).
Notifications Settings:
Enable Alerts: Toggle alerts for NYSE, LSE, FSE, ASX, TSE, and HKSE sessions (pre-open, open, pre-close, close, and holiday events).
Notes:
Session Status: Active sessions are highlighted with exchange-specific colors (e.g., green for NYSE, cyan for LSE), pre-open sessions in yellow, and closed sessions in grey.
Holiday Handling: Automatically adjusts for full and half-day holidays, with early close times applied (e.g., HKSE Lunar New Year).
Tooltip Details: Shows a weekly schedule for each exchange, including open/close times, holiday notes, and time until the next session event in the user’s timezone.
Market Detection: Supports various asset types (stocks, forex, futures, crypto, commodities, indices) with accurate session detection for regular (RTH), extended (ETH), and electronic trading hours.
Performance: Ensure sufficient chart history for accurate session and holiday calculations.
Usage: Customize the table position, device template, and alerts to suit your trading needs. Use tooltips to monitor session schedules and upcoming events.
NISHIN 12NISHIN 12 – First 30-Minute Session High/Low (Asian & European Sessions)
NISHIN 12 is a price action–based indicator that highlights the first 30 minutes (3 × 10-minute candles) of two key trading sessions in IST (Indian Standard Time):
Asian Session → 5:30 AM – 6:00 AM IST
European Session → 12:30 PM – 1:00 PM IST
📌 After the first 30 minutes, the indicator automatically locks the session high and low and extends them forward as support and resistance levels.
Features:
Marks the high and low of the first 30 minutes of Asian and European sessions.
Customizable colors and line extensions.
Alerts for breakouts above session highs or breakdowns below session lows.
Helps intraday traders spot early volatility zones and plan trades.
This indicator is ideal for breakout traders, scalpers, and intraday price action traders who rely on session-based ranges to make trading decisions.
⚡ Use it along with your trading strategy for improved precision and risk management.
Auto Reference Relative Valuation Oscillator📌 Auto Reference Relative Valuation Oscillator
🧠 What does this script do?
This indicator shows whether the current asset is overvalued or undervalued compared to a reference symbol like:
- TVC:DXY – US Dollar Index
- TVC:GOLD – Gold
- CRYPTOCAP:BTC – Total BTC Market Cap
- SP:SPX – S&P 500 Index
- TVC:USOIL – US Crude Oil
It uses the ratio:
price of current asset ÷ price of reference asset
Then normalizes this ratio into a 0–100 oscillator scale .
---
⚙️ Settings:
- Asset Group : Choose your reference symbol by group (Forex, Gold, Crypto, etc.)
- Lookback Period : Period used for calculating high/low bounds (default: 14)
- Upper Bound : Overvaluation threshold (default: 90)
- Lower Bound : Undervaluation threshold (default: 10)
---
📈 How to use:
- Values above 80–90 → Asset is likely overvalued
- Values below 20–10 → Asset is likely undervalued
- Combine with Supply/Demand Zones , and price action to spot high-probability trade entries.
Example:
If the indicator is undervalued AND price touches a demand zone → Potential BUY
If the indicator is overvalued AND price hits a supply zone → Potential
---
✅ Best for:
- Multi-asset traders
- Forex and Crypto trading
- Intermarket analysis
- Confluence with fundamental/macroeconomic models
---
🧩 No coding or setup needed:
Just apply the indicator, choose your asset group, and trade smartly based on valuation.
OI Instant Signals [Real-Time]OI Instant Signals – a one-click overlay that spots aggressive intraday reversals and breakouts by fusing live Open-Interest data with price momentum, volume surges and micro-structure cues.
It watches for four high-conviction setups:
Rising OI + fast price lift → new long-side energy
Rising OI + fast price drop → fresh short-side pressure
Falling OI + sharp counter-move → squeeze / liquidation
RSI extremes + OI inflection → mean-reversion bounce
Signals are delivered the instant the last tick confirms the pattern (or at bar-close if you prefer), each flagged as “Strong”, “Quick” or “Reversal” so you know why it fired. A colour-coded OI histogram, on-bar triangles and a real-time dashboard keep you oriented without leaving the chart.
Set one alert for “Any alert() function call” and you’ll get push notifications the moment buyers or sellers commit size—no manual scanning, no external data feeds.
Super Compute
名称:超级算力(作者:李天天)— 基于改良 SuperTrend 的趋势/动量指标,内置 ATR 阶梯止盈、σ 通道与回撤跟踪,实时标签仅跟踪至 TP1 并在命中时冻结,标签显示方向/开仓价/当前收益(1x)。
Name: Super Compute (by Li Tiantian) — an enhanced SuperTrend-based trend/momentum indicator with ATR ladder take-profits, σ-channel and drawdown trailing; the real-time label tracks only up to TP1 and freezes on hit, showing direction/entry/1× P&L.
概述:指标以量价扩展的 VPT 影子价(out)为核心平滑线,结合开盘 EMA 方向过滤,生成更稳定的买卖信号;适合日内与波段交易,在趋势行情中顺势持有,在震荡中通过更高阈值与过滤降低噪音。
Overview: The indicator centers on a VPT-derived “shadow price” (out) as the smoothing line and validates entries with an open-EMA filter, producing more stable signals; it fits intraday and swing trading—riding trends while reducing noise in ranges via higher thresholds and filtering.
工作原理:先以价差与量能构造并平滑 VPT,得到 out;再用 ATR(st_period) 构造上下阈值 up_lev/dn_lev;依据 close 与阈值的位置与延续规则生成 st_line;当 close 上穿/下破 st_line 且方向与开盘 EMA 一致时触发买/卖。
How it works: Build and smooth a VPT stream to get out; use ATR(st_period) to form up/down thresholds; apply continuation rules to form st_line; trigger long/short when close crosses st_line and aligns with the open-EMA direction filter.
实时标签:入场后持续显示方向、开仓价与当前收益(1x);一旦价格达到 ATR 的 TP1(多:high≥entry+TP1ATR;空:low≤entry−TP1ATR),标签立即冻结保持当时信息,直到下一次入场重置。
Real-time label: After entry, it shows direction, entry, and 1× P&L; once price reaches ATR TP1 (long: high≥entry+TP1ATR; short: low≤entry−TP1ATR), the label freezes, retaining that snapshot until the next entry resets it.
信号模式:可选“允许连续同向”用于趋势加仓式再入场,或“下一信号必须相反”以保持节奏整洁并避免同向重复提示。
Signal mode: Choose “Allow same direction” for trend-add entries or “Force alternation” to keep a clean cadence and avoid repeated same-direction triggers.
止盈体系:三种互补模式——ATR 阶梯(TP1/TP2/TP3,可自定义倍数)、σ 通道触发(回落/回升)、回撤跟踪(运行峰/谷回撤达阈值);可根据品种波动特性灵活切换。
Take-profit system: Three complementary modes—ATR ladder (TP1/TP2/TP3 with custom multipliers), σ-channel fades (reversion after touch), and drawdown trailing (from running peak/trough); switch per instrument volatility profile.
使用方法:1) 添加到图表→选择品种与周期;2) 默认用 ATR 阶梯并观察 TP1 命中率;3) 按波动调整 st_mult/st_period 与 ATR 倍数;4) 依据交易风格选择信号模式;5) 需要可开启开仓价水平线作为价位锚点。
How to use: 1) Add to chart and choose symbol/timeframe; 2) Start with ATR ladder and gauge TP1 hit rate; 3) Tune st_mult/st_period and ATR multipliers per volatility; 4) Pick a signal mode per style; 5) Optionally enable the entry-price line as an anchor.
主要参数:st_mult(SuperTrend 乘数)、st_period(SuperTrend 周期)、tpMode(ATR 阶梯/σ 通道/回撤)、atrLenTP(ATR 长度)、TP1/TP2/TP3 倍数、参考时间框架(分钟)、信号模式、显示实时标签与开仓价线。
Key parameters: st_mult (SuperTrend multiplier), st_period (SuperTrend period), tpMode (ATR ladder/σ-channel/drawdown), atrLenTP (ATR length), TP1/TP2/TP3 multipliers, reference timeframe (minutes), signal mode, show real-time label and entry-price line.
调参建议:高波动时适当上调 st_mult 或 st_period 并提高 atrLenTP,TP1 倍数可略降以更快兑现;趋势持久的 4H/日线可略降 st_mult 提高灵敏度,并提高 TP2/TP3;震荡期可用更高阈值或切换 σ 通道减少假突破。
Tuning tips: In high volatility, raise st_mult or st_period and atrLenTP, slightly lower TP1 multiplier for quicker realization; in persistent 4H/D trends, slightly reduce st_mult for sensitivity and raise TP2/TP3; in ranges, use higher thresholds or σ-channel to cut false breaks.
告警使用:在 TradingView 新建告警时选择本指标的“买入/卖出”“ATR/σ/回撤”相关条件,触发频率建议选“收盘时”以降低未收盘抖动对信号稳定性的影响。
Alerts: When creating an alert in TradingView, choose this indicator’s Buy/Sell or ATR/σ/Drawdown conditions; prefer “On bar close” to reduce intra-bar signal wobble.
收益口径:所有展示收益均按 1×(不加杠杆)计算,不包含手续费、点差与滑点;若实盘使用杠杆,请自行换算并纳入成本。
P&L basis: All displayed gains are at 1× (no leverage), excluding fees, spreads, and slippage; if trading with leverage, convert accordingly and include costs.
适用范围:支持多数品种与周期(加密、外汇、指数、期货、股票);在趋势性更强的周期表现更佳,在极端消息驱动或跳空行情下需配合独立风控。
Scope: Works across most symbols and timeframes (crypto, FX, indices, futures, equities); performs best in trendier frames; under news-driven gaps or shocks, pair with independent risk controls.
注意事项:K线请选择平均K线图
Aslan | Momentum Matrix [6.5]The Aslan Momentum Matrix is a highly adaptive momentum and reversal detection tool built for modern traders. By integrating normalized price action, smart money volume flow, divergence analysis, and multi-factor confluence logic, it offers precise real-time insights into trend strength, potential reversals, and underlying market conviction. The indicator can operate independently or serve as a powerful confirmation engine alongside other systems.
HyperWave Oscillator
The HyperWave Oscillator is the core momentum engine of the Momentum Matrix. It evaluates how far price has deviated from its recent range using a normalized calculation between the high, low, and average. The resulting value is smoothed using either a Simple or Exponential Moving Average, which the user can configure. A secondary smoothing line helps confirm momentum shifts via crossovers and crossunders. This oscillator excels at identifying moments when momentum begins to build or fade, providing early indications of trend continuation or exhaustion.
Divergence Detection
This feature automatically identifies and plots bullish and bearish divergences between price and the oscillator. It evaluates whether recent price highs or lows are out of alignment with the oscillator's internal momentum, signaling potential trend reversals. The sensitivity can be adjusted to detect either short-term or longer-term divergences. Lines are drawn directly on the chart to visually mark divergence zones, adding clarity and precision to your analysis.
Smart Money Flow
The Smart Money Flow module uses a smoothed Money Flow Index (MFI) to highlight the directional bias of volume. It captures the behavior of larger market participants by analyzing how volume aligns with price action over time. Adaptive boundary logic tracks historical average flow levels, allowing the indicator to highlight when current flow is unusually strong or weak. Shaded regions within the oscillator help visualize periods of buying or selling pressure, giving deeper insight into whether a move is supported by real market conviction.
Reversal Factor Engine
This system is designed to capture high-conviction reversal points using a combination of volume surges, oscillator extremes, and confluence from smart money activity. It produces two levels of reversal signals: major signals when all conditions align with strong volume, and minor signals when volume is moderate but momentum and structure suggest a shift. The user can control the strictness of this logic using a 1–10 scale. This feature is particularly effective at catching early trend reversals with a strong risk-to-reward profile.
Confluence Meter
The Confluence Meter is a vertical visual scale displayed next to the oscillator that summarizes alignment between the HyperWave oscillator and Smart Money Flow. When both are in agreement, the meter shows stronger bullish or bearish coloration depending on direction. When there is disagreement, the confluence level weakens. This visual element is designed to provide traders with a quick, intuitive understanding of market alignment without needing to analyze each component separately.
Confluence Area Zones
Confluence Area Zones are shaded regions above and below the oscillator that dynamically appear when both the oscillator and smart money flow are aligned in the same direction. A bullish zone forms when both are positive, while a bearish zone appears when both are negative. These zones help clarify the prevailing directional bias of the market and add contextual depth to momentum signals. When there is no confluence, the zones fade, reducing visual noise on the chart.
Volume-Based Reversal Filtering
Reversal signals are filtered using volume context to ensure they are not triggered during low-activity or indecisive conditions. A moving average of volume is used as a benchmark to determine whether current volume levels are significant enough to validate a reversal. Additional filters, including RSI thresholds and momentum slope, help confirm that reversals are not only statistically likely but also supported by market participation. This filtering increases the reliability of both major and minor reversal signals.
Visualization and Customization
The indicator is designed with clear visual communication in mind. Signals are plotted using distinct shapes and colors, with gradients to show strength and transparency to reduce clutter. Every component can be toggled on or off depending on user preference, allowing traders to tailor the visual layout to suit their workflow. Whether you prefer a clean oscillator or a fully-loaded momentum dashboard, the Momentum Matrix adapts to your needs.
The Aslan Momentum Matrix combines structure, momentum, volume, and institutional logic into a single oscillator framework. Its real strength lies in its ability to adapt to any strategy, whether you're trend following, trading reversals, or managing confluence-based setups. By leveraging advanced volume analytics, real-time divergences, and configurable signal filters, this tool provides a clear, data-backed perspective on market direction and momentum. It’s built for traders who want precision, flexibility, and actionable insight across all market conditions.
Support & Resistance (高成交量箱体)支撑与阻力(高成交量箱体)— 基于成交量方向与枢轴点自动绘制“箱体”支撑/阻力,突破变虚线、保持为实线,并用中文字符“阻/撑”与标签提示突破与回测;作者:李天天;Pine v5,叠加到主图。
Name: Support & Resistance (High-Volume Boxes) — auto-draws “box” support/resistance from directional volume and pivot points; dashed when broken and solid when held, with Chinese glyphs “阻/撑” and labels highlighting breakouts/retests; Author: Li Tiantian; Pine v5, overlay on price.
阻力支撑箱体
原理:以 K 线涨跌判定买卖量,构造“正负成交量”序列;当出现 pivot low 且正量显著 时在低位绘制支撑箱体,出现 pivot high 且负量显著 时在高位绘制阻力箱体;箱体厚度 = ATR(200) × 宽度系数,右边界随时间自适应延展。
Mechanism: classify up/down bars to build a signed volume stream; draw a support box at a pivot low with strong positive volume and a resistance box at a pivot high with strong negative volume; box thickness = ATR(200) × width factor, with the right edge auto-extended over time.
阻力支撑箱体
突破与保持:价格 向上穿越阻力上沿 记为突破阻力,未上破阻力 记为阻力保持;价格 向下穿越支撑下沿 记为跌破支撑,未跌破支撑 记为支撑保持;突破后箱体边框改为虚线并改变底色透明度。
Break & hold: crossing above resistance upper band flags a breakout, failing to close above resistance means it holds; crossing below support lower band flags a breakdown, failing to close below support means it holds; after break, the box switches to dashed border and adjusted fill.
阻力支撑箱体
可视化:图上绘制 “阻力保持=‘阻’(红,K线上方)/ 支撑保持=‘撑’(绿,K线下方)”;当 阻力转支撑 或 支撑转阻力 且保持时,分别用“撑”或“阻”标记;同时在突破当根前一根位置打出 “突破阻力 / 跌破支撑” 标签。
Visualization: plots “阻” (red, above bars) for resistance hold and “撑” (green, below bars) for support hold; when resistance flips to support or support flips to resistance and holds, it prints “撑” or “阻” accordingly; breakout labels (“Break Resistance” / “Break Support”) are printed one bar back at the level.
阻力支撑箱体
参数与设置:回看周期 控制 pivot 灵敏度(越大越稳健);成交量差过滤长度 用于筛除低量噪声(越大越严格);箱体宽度调整 以 ATR(200) 为基准控制箱体厚度;最大箱体数默认 50。
Inputs & settings: Lookback period tunes pivot sensitivity (larger = more robust); volume-delta length filters low-volume noise (larger = stricter); box width factor scales thickness from ATR(200); max box count defaults to 50.
阻力支撑箱体
使用方法:将脚本添加至图表并叠加主图→根据品种与周期调大/调小回看周期与成交量过滤→用箱体边界作为结构位,观察“阻/撑”与标签提示 突破/保持/转换 来辅助判定进出场与止损迁移。
How to use: add to chart (overlay) → calibrate lookback and volume filtering for your symbol/timeframe → treat box bounds as structure levels; read “阻/撑” and labels for break/hold/flip to guide entries and stop adjustments.
阻力支撑箱体
调参建议:波动剧烈或假突破多时,提高回看周期 与 加大过滤长度;趋势单边强时,可略 放宽过滤 以更快识别新箱体;箱体过厚影响精度时,下调 箱体宽度调整。
Tuning tips: in whipsaw/high-noise markets, increase lookback and raise filter length; in strong one-sided trends, loosen filtering to detect fresh boxes earlier; if boxes look too thick, reduce the width factor.
阻力支撑箱体
注意事项:本指标不含 alertcondition,主要依靠可视标记;对象数量受平台上限影响,历史过长或频繁触发时可适当缩短回看或减少过滤开销;仅作为技术参考,不构成交易建议。
Notes: no built-in alertcondition; use the on-chart marks for cues; object counts are platform-limited—trim history or adjust filters if performance/clutter arises; for research only, not investment advice.
Aslan | Price Action Toolkit [6.5]A high-precision suite of tools designed for traders who rely on market structure, liquidity, and smart money concepts. Each component is engineered to provide deeper insight into price behavior across multiple timeframes, helping you make more informed decisions with greater confidence.
🚀| Market Structure (BOS, CHoCH, CHoCH+, EQH/L – Internal & Swing | Multi-Timeframe)
This feature automatically detects critical structural shifts in price, including:
Break of Structure (BOS): Indicates continuation of a trend after surpassing a key swing high or low.
Change of Character (CHoCH): Marks the potential beginning of a reversal in market direction.
CHoCH+: A more aggressive variant of CHoCH with additional confirmation logic.
Equal Highs/Lows (EQH/EQL): Highlights areas of engineered liquidity and potential sweep zones.
The system distinguishes between internal and swing structure and supports multi-timeframe mapping, giving you a complete picture of short-term and long-term market behavior.
📈| Volumetric Order Blocks & Mitigation Methods (Bullish & Bearish)
Order Blocks represent zones where institutional orders are likely placed.
This tool identifies bullish and bearish order blocks with volumetric validation, increasing confidence in their strength.
It includes multiple mitigation techniques—such as close-based or wick-based validation—to help determine whether an order block remains valid or has been absorbed.
💸| Liquidity Concepts
A robust framework for identifying where liquidity is building and how it may be exploited:
Highlights areas where traders are trapped or clustered.
Supports both internal and external liquidity mapping.
Helps traders anticipate stop hunts and engineered price moves.
💰| Trend Line Liquidity Zones
Trendlines often act as liquidity traps. This tool automatically detects zones where price may sweep liquidity resting along diagonal support/resistance levels—commonly used in smart money and stop-hunting strategies.
💎| Imbalance Concepts (MTF) with Multiple Mitigation Methods
Maps out price imbalances (Fair Value Gaps) across multiple timeframes, which often act as magnets for price.
Includes several mitigation techniques to assess whether an imbalance has been filled or still holds relevance—ideal for refining entry and exit zones.
✨| Fair Value Gaps (FVGs)
These represent areas where price moved too aggressively, leaving inefficiencies in the market. The toolkit identifies FVGs in real time, often aligning with institutional re-entry zones for trend continuation or reversals.
🪙| Strong/Weak Highs & Lows
Automatically differentiates between strong and weak highs/lows based on how price interacts with them.
Strong levels suggest continuation.
Weak levels signal vulnerability and potential for being swept.
This provides critical confluence when combined with structure and liquidity analysis.
💹| Premium & Discount Zones
Defines whether price is trading in a premium (overvalued) or discount (undervalued) zone relative to a key range (often based on swing structure). These zones help you frame entries in alignment with institutional pricing models.
💷|Previous Highs/Lows
Tracks and plots important historical levels, including:
Daily High/Low, Monday’s High/Low, Weekly, Monthly, and Quarterly Highs/Lows
These levels are frequently used as targets or reversal zones due to their psychological and algorithmic importance in institutional trading.
Our Price Action Toolkit offers a powerful, data-driven edge for traders who rely on structure, liquidity, and institutional-level insights. By combining advanced market logic with real-time automation, it equips you to read the market with greater clarity, precision, and confidence—across any timeframe or asset. Whether you're trading breakouts, reversals, or liquidity sweeps, this toolkit adapts to your style and sharpens your edge in every market condition.
Intraday @Tharanithar.007PDLHM & Session Break, FX Session, SBT, Fractal, True day open, day light saving with day high low and session high low alert
3CRGANG - CANDLE CLOSE TIMER3CRGANG - CANDLE CLOSE TIMER
This indicator displays a timer for the current candle’s close and a multi-timeframe (MTF) timer table, showing the time remaining for various timeframes. It supports customizable timezones, visualization settings, and alerts for new candle openings and pre-close notifications, with filters for trading sessions and holidays.
Features:
Candle Timer: Displays the time remaining until the current candle closes, with color-coded visuals based on candle direction (green for up, red for down, gold when nearing close).
MTF Timer Table: Shows time remaining for multiple timeframes (M5, M15, M30, H1, H4, D, W, M, Q, Y) with a gradient-colored progress bar (green to red as time decreases).
Timezone Support: Choose from a wide range of timezones to align timer and alerts with your local time.
Visualization Options: Select device template (Desktop, Tablet, Mobile) and color theme (Light or Dark) for optimal display.
Alerts: Configurable alerts for new candle openings and pre-close thresholds across multiple timeframes, with session and holiday filters.
Session and Holiday Filters: Supports major exchanges (NYSE, LSE, FSE, SSX, TSE, HKSE) with holiday schedules and half-day considerations.
Do Not Disturb (DND): Set DND periods to suppress alerts during specific hours.
Time Settings:
Timezone: Select from a list of global timezones (e.g., UTC+3 Jerusalem, UTC-4 New York).
Time Format: Choose between Standard (12-hour with AM/PM) or Military (24-hour) time.
Visualization Setup:
Device: Select Desktop, Tablet, or Mobile template to adjust table sizes.
Color Theme: Choose Light or Dark theme for visual elements.
Timer Dashboard:
Timer Table Position: Set the position of the main timer table (e.g., top-right, bottom-center).
MTF Timer Dashboard:
Hide MTF Timer Table: Toggle visibility (off by default on Mobile template).
MTF Timer Table Position: Set position for the MTF timer table.
Offset Table Position: Adjust the Y-axis offset for the MTF table.
Notifications Settings:
Enable Alerts: Toggle alerts for Yearly, Quarterly, Monthly, Weekly, Daily, H4, H1, M30, and M15 timeframes.
Pre-Alert Threshold: Set the percentage of candle duration remaining for pre-close alerts (0–100%).
DND Settings:
Weekend Alerts: Enable/disable alerts during weekends.
DND Mode: Set start and end times for suppressing alerts.
Session Alerts Filter:
Holiday Alerts: Enable/disable alerts on exchange holidays.
Exchange Alerts: Toggle alerts for NYSE, LSE, FSE, SSX, TSE, and HKSE sessions.
Notes:
The indicator supports various asset types (stocks, forex, futures, crypto, commodities, indices) with tailored session detection.
The MTF timer table is hidden on Mobile template by default to optimize screen space.
Alerts respect user-defined session filters, holiday schedules, and DND settings for major exchanges.
Ensure sufficient chart history for accurate timeframe calculations.
Use the settings to customize timer display, alert behavior, and session filters to match your trading strategy.
Aslan | Signal Engine [6.5]📈| Aslan - Signal Engine
Our flagship Signal Engine is a comprehensive toolkit featuring powerful tools designed to deliver precise real-time signals and confluences. Built to meet the technical analysis needs of traders across all markets, it provides reliable data-driven insights tailored for any trading style.
While it seamlessly complements other technical indicators and analysis methods, the engine is also robust enough to function as a standalone solution. To fully unlock its potential, we recommend exploring all its features gradually, supported by our detailed documentation and personalized mentoring.
🚀| Features
-Three signal models, Designed to work in any market and adapt to all market conditions. Fully customizable to meet your specific trading strategies and needs.
- Trend Following Signals: Follows the momentum of the market.
- Contrarian (Reversal) Signals: Our flagship model, Predicts exact reversal points.
- Kernel Retest Signals: Perfect for confirming the trend following signals
-Signal Filters: Refine and validate signals to reduce noise and improve trade accuracy.
-Volatility bands, Ideal for analyzing market behavior, helping you easily identify whether the market is trending or consolidating.
-Dynamic Kernel S&R, Adaptive and precise levels that adjust based on current market dynamics for better decision-making.
-Heatmap Bar Color: Highlights trend exhaustion, helping you spot potential reversals with ease.
💸| Usage
2 Main signal Models
Contrarian signals are rooted in mean-reversion logic: after a pronounced price movement, they anticipate a pullback, betting on the exhaustion of momentum and a reversion to the mean.
Trend-following signals, on the other hand, operate on the premise that early momentum is likely to persist—recognizing initial strength as a signal that the prevailing trend will continue to unfold.
Both methodologies reflect differing market philosophies - one seeking to capitalize on reversals, the other on sustained directional moves.Both models have inherent limitations when used in isolation. Trend-following signals tend to lag, often confirming moves only after the trend has begun to lose momentum. Conversely, contrarian signals can trigger prematurely, anticipating reversals before the underlying trend has fully played out.
By integrating these two approaches in confluence, we can harness their complementary strengths - mitigating individual weaknesses and crafting a more robust, profitable trading system. A straightforward yet effective strategy involves first waiting for a contrarian signal indicating overbought or oversold conditions. Following this, a confirmation signal on a lower time frame is used to validate the emergence of a new trend, providing a higher-probability entry point.
Contrarian signals tend to perform best in consolidating or balanced markets, where price oscillates within a defined range and mean-reversion strategies have higher probability. In contrast, trend-following signals are more effective in trending or imbalanced markets, where momentum drives sustained directional moves.
Understanding the underlying market context is key to applying each model optimally—and combining them allows for strategic adaptability across varying conditions, The volatility bands can identify these conditions.
🪙| Volatility Bands
These tools measure the volatility profile of the market. When the bands are narrow and contracting, it signals a consolidating phase—a period of low volatility where the market is accumulating liquidity and preparing for a potential breakout. In such conditions, contrarian signals tend to be more effective, capitalizing on mean-reverting price behavior within tight ranges.
Conversely, when the bands are wide and expanding, it indicates a trending market with increased volatility and directional momentum. During these phases, trend-following signals typically outperform, aligning with the prevailing movement and capturing extended price swings.
To read the full documentation, Visit our website.