Advanced Swing High/Low Trend Lines# Advanced Swing High/Low Trend Lines Indicator
## Features:
### Dynamic Trend Lines
This indicator dynamically identifies swing highs and swing lows based on the user-defined `Swing Length`. It then connects these points to create trend lines that visualize the market's direction and key support/resistance levels.
### Customizable Settings
- **Swing Length**: Define the sensitivity for detecting swing highs and lows.
- **Points Required to Draw Trend**: Specify the minimum number of swing highs or lows required to establish a valid trend line.
- **Show Old Trends**: Toggle the visibility of previous trend lines to focus on the current market structure.
- **Line Appearance**: Customize the color, style (`solid`, `dotted`, `dashed`), and width of both trend and support lines.
### Trend Break Detection
- Automatically detects and highlights when the price breaks above a high trend line or below a low trend line.
- The broken trend line changes its color to indicate a trend break, helping traders quickly identify significant market shifts.
### Continuous Updates
- As new swing highs or lows are detected, the indicator updates existing trend lines or creates new ones, ensuring relevance in dynamic market conditions.
- Trend lines extend into the future, projecting potential areas of interest for traders.
## Benefits:
1. **Enhanced Market Visualization**:
- Provides a clear view of market trends, swing points, and potential reversal zones.
2. **Trend Reversal Alerts**:
- Identifies and visually emphasizes trend breaks, enabling proactive trading decisions.
3. **Fully Customizable**:
- Adjust settings to suit your trading style and strategy, ensuring compatibility with various markets and timeframes.
4. **Real-Time Adaptation**:
- Automatically adapts to changing market conditions, maintaining accuracy and relevance.
## Use Cases:
- **Trend Following**: Identify and trade in the direction of established trends.
- **Breakout Trading**: Spot trend breaks and capitalize on momentum shifts.
- **Support and Resistance Analysis**: Use trend lines to identify key levels where price may react.
This indicator is an essential tool for traders seeking to combine technical precision with visual clarity in their analysis.
基本面分析
[Elite Algo Modded]// ALERT READY ON TELEGRAM ==> t.me
//@version=5
indicator(" ", overlay=true, max_lines_count=500, max_labels_count=500, max_boxes_count=350)
// FUNCTIONS
// Close to Close Volatility
f_coc(x, period, sqrtAnnual) =>
mean = ta.sma(x, period)
s = array.new_float(0)
for i = 0 to period - 1 by 1
array.push(s, math.pow(x - mean, 2))
sqrtAnnual * math.sqrt(array.sum(s) / (period - 1))
//
// Parkinson Volatility
f_park(period, sqrtAnnual) =>
var LOG2 = math.log(2)
powLogHighLow = math.pow(math.log(high / low), 2)
sqrtAnnual * math.sqrt(1.0 / period * math.sum(1.0 / (4.0 * LOG2) * powLogHighLow, period))
// Garman Klass Volatility
f_gk(period, sqrtAnnual) =>
var LOG2 = math.log(2)
var SQRT_1_PERIOD = math.sqrt(1 / period)
powLogHighLow = math.pow(math.log(high / low), 2)
powLogCloseOpen = math.pow(math.log(close / open), 2)
tmp = 0.5 * powLogHighLow - (2.0 * LOG2 - 1.0) * powLogCloseOpen
sqrtAnnual * math.sqrt(math.sum(tmp, period)) * SQRT_1_PERIOD
// Rogers Satchell Volatility
f_rsv(period, sqrtAnnual) =>
tmp = math.log(high / close) * math.log(high / open) + math.log(low / close) * math.log(low / open)
sqrtAnnual * math.sqrt(math.sum(tmp, period) / period)
// Garman Klass Yang Zhang Extension Volatility
f_gkyz(period, sqrtAnnual) =>
var LOG2 = math.log(2)
var SQRT_1_PERIOD = math.sqrt(1 / period)
powLogHighLow = math.pow(math.log(high / low), 2)
powLogCloseOpen = math.pow(math.log(close / open), 2)
lastClose = nz(close , close)
powLogOpenClose1 = math.pow(math.log(open / lastClose), 2)
tmp = powLogOpenClose1 + 0.5 * powLogHighLow - (2.0 * LOG2 - 1.0) * powLogCloseOpen
sqrtAnnual * math.sqrt(math.sum(tmp, period)) * SQRT_1_PERIOD
// Yang Zhang Volatility
f_yz(a, period, sqrtAnnual) =>
o = math.log(open) - math.log(nz(close , close))
u = math.log(high) - math.log(open)
d = math.log(low) - math.log(open)
c = math.log(close) - math.log(open)
nMinusOne = period - 1
avgo = ta.sma(o, period)
avgc = ta.sma(c, period)
so = array.new_float(0)
sc = array.new_float(0)
for i = 0 to period - 1 by 1
array.push(so, math.pow(o - avgo, 2))
array.push(sc, math.pow(c - avgc, 2))
sumo = array.sum(so)
sumc = array.sum(sc)
Vo = sumo / nMinusOne
Vc = sumc / nMinusOne
Vrs = math.sum(u * (u - c) + d * (d - c), period) / period
k = (a - 1.0) / (a + (period + 1.0) / nMinusOne)
sqrtAnnual * math.sqrt(Vo + k * Vc + (1.0 - k) * Vrs)
// Exponentially Weighted Volatility
f_ewma(source, period, sqrtAnnual) =>
var lambda = (period - 1) / (period + 1)
squared = math.pow(source, 2)
float v = na
v := lambda * nz(v , squared) + (1.0 - lambda) * squared
sqrtAnnual * math.sqrt(v)
// Mean Absolute Deviation (Adjusted)
f_mad(source, period, sqrtAnnual) =>
var SQRT_HALF_PI = math.sqrt(math.asin(1))
mean = ta.sma(source, period)
S = array.new_float(0)
for i = 0 to period - 1 by 1
array.push(S, math.abs(source - mean))
sumS = array.sum(S)
sqrtAnnual * (sumS / period) * SQRT_HALF_PI
// Median Absolute Deviation
f_mead(source, period, sqrtAnnual) =>
median = ta.percentile_nearest_rank(source, period, 50)
E = 0.0
for i = 0 to period - 1 by 1
E += math.abs(source - median)
E
sqrtAnnual * math.sqrt(2) * (E / period)
//Rescale Function
f_rescale(_src, _size) =>
math.max(0, math.min(_size, int(_src / 100 * _size)))
// label Panel Function
_label(T, color_PnL) =>
label PnL_Label = na
label.delete(PnL_Label )
PnL_Label := label.new(time, 0, text=T, color=color_PnL, textcolor=color.white, size=size.normal, style=label.style_label_left, xloc=xloc.bar_time, textalign=text.align_left)
label.set_x(PnL_Label, label.get_x(PnL_Label) + math.round(ta.change(time) * 3))
// Round Function
Round(src, digits) =>
p = math.pow(10, digits)
math.round(math.abs(src) * p) / p * math.sign(src)
//Options for Inputs
ON = 'On'
OFF = 'Off'
CTC = 'Close to Close'
PKS = 'Parkinson'
GK = 'Garman Klass'
RS = 'Rogers Satchell'
GKYZ = 'Garman Klass Yang Zhang Extension'
YZ = 'Yang Zhang'
EWMA = 'EWMA'
MAD = 'Mean Absolute Deviation'
MAAD = 'Median Absolute Deviation'
L = 'Line'
SL = 'StepLine'
Ar = 'Area'
CL = 'Columns'
// Settings
H = EWMA
period = 10
Annual = 365
a = 1.34
Plen = 365
Pco = ON
sma = ON
malen = 55
bsg = OFF
stl = CL
lT = 3
i_invert = OFF
bg = OFF
sp = OFF
// bgcolor(bg ? color.new(#000000, 20) : na, title='Dark Background', transp=90)
var sqrtAnnual = math.sqrt(Annual) * 100
logr = math.log(close / close )
// Historical Volatiity Models
Hv = if H == CTC
f_coc(logr, period, sqrtAnnual)
else if H == PKS
f_park(period, sqrtAnnual)
else if H == RS
f_rsv(period, sqrtAnnual)
else if H == GK
f_gk(period, sqrtAnnual)
else if H == GKYZ
f_gkyz(period, sqrtAnnual)
else if H == EWMA
f_ewma(logr, period, sqrtAnnual)
else if H == YZ
f_yz(a, period, sqrtAnnual)
else if H == MAD
f_mad(logr, period, sqrtAnnual)
else
// H == "Median Absolute Deviation"
f_mead(logr, period, sqrtAnnual)
pstyle = stl == L ? plot.style_linebr : stl == SL ? plot.style_stepline : stl == Ar ? plot.style_area : stl == CL ? plot.style_columns : plot.style_line
//Hv Stats
avgHV = ta.sma(Hv, malen)
HVP = ta.percentrank(Hv, Plen)
NearZero = HVP < 1.5 ? 1 : 0
HV50 = ta.percentile_nearest_rank(Hv, Plen, 50)
// // Text Functions
// texthv() =>
// ' HV: ' + str.tostring(Round(Hv, 2))
// textphv() =>
// 'HV 50áµ—Ê° Percentile: ' + str.tostring(Round(HV50, 2))
// texthvp() =>
// 'HV Percentile: ' + str.tostring(Round(HVP, 2)) + 'áµ—Ê°'
// // Coloring
// var c_ = array.new_color(na)
// if barstate.isfirst
// array.push(c_, #0effff)
// array.push(c_, #00fdf6)
// array.push(c_, #00fbee)
// array.push(c_, #00f9e4)
// array.push(c_, #00f6db)
// array.push(c_, #00f4d1)
// array.push(c_, #13f1c6)
// array.push(c_, #24efbc)
// array.push(c_, #31ecb1)
// array.push(c_, #3ce9a6)
// array.push(c_, #47e69b)
// array.push(c_, #51e390)
// array.push(c_, #5adf85)
// array.push(c_, #62dc7a)
// array.push(c_, #6ad96e)
// array.push(c_, #72d563)
// array.push(c_, #7ad157)
// array.push(c_, #81cd4b)
// array.push(c_, #88ca3f)
// array.push(c_, #8fc532)
// array.push(c_, #96c123)
// array.push(c_, #9cbd0e)
// array.push(c_, #a3b800)
// array.push(c_, #a9b300)
// array.push(c_, #b0ae00)
// array.push(c_, #b6a900)
// array.push(c_, #bca300)
// array.push(c_, #c29e00)
// array.push(c_, #c29e00)
// array.push(c_, #c89800)
// array.push(c_, #ce9100)
// array.push(c_, #d48b00)
// array.push(c_, #da8400)
// array.push(c_, #df7c00)
// array.push(c_, #e57400)
// array.push(c_, #ea6c00)
// array.push(c_, #ef6200)
// array.push(c_, #f35800)
// array.push(c_, #f74c00)
// array.push(c_, #fb3e00)
// array.push(c_, #ff2d00)
// if i_invert
// array.reverse(c_)
// var sizeOf = array.size(c_) - 1
// colorHV = Pco ? array.get(c_, f_rescale(HVP, sizeOf)) : color.aqua
// Plots
// plot(Hv, 'HV', color=colorHV, linewidth=lT, style=plot.style_line)
// plot(sma ? avgHV : na, 'sma', color=color.new(#FFFFFF, 25), linewidth=2)
//bgcolor(Hv > avgHV ? color.lime : na)
// if sp
// _label(H + texthv() + ' ' + textphv() + ' ' + texthvp() + ' ', #000000c0)
// col2 = HVP >= 1 ? color.yellow : HVP <= 1 and HVP >= 0.5 ? color.orange : HVP <= 0.5 ? #8D0000 : color.silver
// // bgcolor(bsg and NearZero ? col2 : na, transp=50)
//Custrom MAS
maa = avgHV / 100 * 140
mab = avgHV / 100 * 180
mac = avgHV / 100 * 240
mad = avgHV / 100 * 60
mae = avgHV / 100 * 20
// Auto Sensivity Volatility Band Settings
float volatility = 0.0
if Hv < maa and Hv > avgHV // ilk band ust
volatility := 3.15
else if Hv < mab and Hv > maa // ikinci band ust
volatility := 3.5
else if Hv < mac and Hv > mab // ucuncu band ust
volatility := 3.6
else if Hv > mac // volatilite en ust degerde
volatility := 4
else if Hv < maa and Hv > mad // altdaki ilk band
volatility := 3
else if Hv < mad and Hv > mae // altdaki ikinci band
volatility := 2.85
else if Hv < mae // volatilite butun bandlarin anltinda
volatility := 3
//plot(volatility,color = color.red)
// plot(maa, 'maa', color=color.new(color.aqua, 25))
// plot(mab, 'mab', color=color.new(color.aqua, 25))
// plot(mac, 'mac', color=color.new(color.aqua, 25))
// plot(mad, 'mad', color=color.new(color.aqua, 25))
// plot(mae, 'mae', color=color.new(color.aqua, 25))
//-------------- Elite Algo v22 | elitesignals.com -----------------//
// Get user input
enableDashboard = input(true, "Enable Dashboard", group="DASHBOARD SETTINGS")
locationDashboard = input.string("Middle right", "Location", , group="DASHBOARD SETTINGS")
sizeDashboard = input.string("Tiny", "Size", , group="DASHBOARD SETTINGS")
colorBackground = input(#2A2E39, "Bg color", group="DASHBOARD SETTINGS")
colorFrame = input(#2A2E39, "Frame color", group="DASHBOARD SETTINGS")
colorBorder = input(#363A45, "Border color", group="DASHBOARD SETTINGS")
showSignals = input(true, "Show signals", group="BUY AND SELL SIGNALS SETTINGS")
strategy = input.string("Normal", "Strategy", , group="BUY AND SELL SIGNALS SETTINGS")
sensitivity11 = input.float(defval=1.8, title="Sensitivity", minval=1, maxval=20, group = 'Signals')
sensitivity = sensitivity11
auto_button = input.bool(defval = true , title = "Auto Sensitivity", group = 'Signals')
consSignalsFilter = input(false, "Consolidation signals filter", group="BUY AND SELL SIGNALS SETTINGS")
smartSignalsOnly = input(false, "Smart signals only", group="BUY AND SELL SIGNALS SETTINGS")
candleColors = input(false, "Candle colors", group="BUY AND SELL SIGNALS SETTINGS")
momentumCandles = input(false, "Momentum candles", group="BUY AND SELL SIGNALS SETTINGS")
highVolSignals = input(false, "High volume signals only", group="BUY AND SELL SIGNALS SETTINGS")
enableTrailingSL = input(false, "Enable trailing stop-loss", group="RISK MANAGEMENT SETTINGS")
usePercSL = input(false, "% Trailing sl", inline="2", group="RISK MANAGEMENT SETTINGS")
percTrailingSL = input.float(1, "", 0, step=0.1, inline="2", group="RISK MANAGEMENT SETTINGS")
enableSwings = input(false, "Enable Swing High's & Swing's Low's", inline="3", group="RISK MANAGEMENT SETTINGS")
periodSwings = input.int(10, "", 2, inline="3", group="RISK MANAGEMENT SETTINGS")
enableTpSlAreas = input(false, "Enable take profit/stop-loss areas", group="RISK MANAGEMENT SETTINGS")
useTP1 = input(true, "", inline="4", group="RISK MANAGEMENT SETTINGS")
multTP1 = input.float(1, "TP 1", 0, inline="4", group="RISK MANAGEMENT SETTINGS")
useTP2 = input(true, "", inline="5", group="RISK MANAGEMENT SETTINGS")
multTP2 = input.float(2, "TP 2", 0, inline="5", group="RISK MANAGEMENT SETTINGS")
useTP3 = input(true, "", inline="6", group="RISK MANAGEMENT SETTINGS")
multTP3 = input.float(3, "TP 3", 0, inline="6", group="RISK MANAGEMENT SETTINGS")
tpLabels = input(true, "Take profit labels", group="RISK MANAGEMENT SETTINGS")
showTrendCloud = input(true, "Show Trend cloud", group="TREND CLOUD SETTINGS")
periodTrendCloud = input.string("New", "Trend cloud period", , group="TREND CLOUD SETTINGS")
signalsTrendCloud = input(false, "Trend only signals", group="TREND CLOUD SETTINGS")
fastTrendCloud = input(false, "Fast trend cloud", group="TREND CLOUD SETTINGS")
fastTrendCloudLen = input.int(55, "Fast trend cloud", 2, group="TREND CLOUD SETTINGS")
enableAutoTrend = input(false, "Enable Auto Trendlines", group="AUTO TRENDLINES SETTINGS")
srcTrendChannel = input(close, "Trend channel source", group="AUTO TRENDLINES SETTINGS")
lenTrendChannel = input.int(200, "Trend channel loopback", 2, group="AUTO TRENDLINES SETTINGS")
enableSR = input(false, "Enable support and resistance", group="AUTO SUPPORT AND RESISTANCE SETTINGS")
lineSrStyle = input.string("Dashed", "Line Style", , group="AUTO SUPPORT AND RESISTANCE SETTINGS")
lineSrWidth = input.int(2, "Line Width", 1, 4, group="AUTO SUPPORT AND RESISTANCE SETTINGS")
showCons = input(false, "Consolidation Zones", group="CONSOLIDATION ZONES")
lbPeriod = input.int(10, "Loopback Period", 2, 50, group="CONSOLIDATION ZONES")
lenCons = input.int(5, "Min Consolidation Length", 2, 20, group="CONSOLIDATION ZONES")
paintCons = input(true, "Paint Consolidation Area", group="CONSOLIDATION ZONES")
colorZone = input(color.new(color.blue, 70), "Zone Color", group="CONSOLIDATION ZONES")
box_ob = input.bool(false, "Toggle Order Block", group="ORDER BLOCK")
box_hide_gray = input.bool(false, "Hide gray boxes", group="ORDER BLOCK")
bos_type = input.string("High and Low", "MSB trigger", , group="ORDER BLOCK")
box_sv = input.bool(true, "Plot demand boxes", group="ORDER BLOCK")
box_test_delay = input.int(3, "Delay to count test of demand box", 1, group="ORDER BLOCK")
box_fill_delay = input.int(3, "Delay to count fill of demand box", 1, group="ORDER BLOCK")
box_test_sv = input.bool(true, "Dim tested demand boxes", group="ORDER BLOCK")
box_stop_sv = input.bool(true, "Stop plotting filled demand boxes", group="ORDER BLOCK")
eliteVP = input(false, "Elite volume profile", group="ELITE VOLUME PROFILE")
colorBorderVP = input(color.new(color.black, 80), "Border color", group="ELITE VOLUME PROFILE")
colorBuyVP = input(#7F1623, "Buy volume", group="ELITE VOLUME PROFILE")
colorSellVP = input(#00DD00, "Sell volume", group="ELITE VOLUME PROFILE")
offset = input.int(2, "Offset", 2, 20, group="ELITE VOLUME PROFILE")
lookback = input.int(100, "Lookback", 14, 10000, group="ELITE VOLUME PROFILE")
levelNum = input.int(100, "Number of levels", 10, 1000, group="ELITE VOLUME PROFILE")
levelWidth = input.int(50, "Level width", 2, 100, group="ELITE VOLUME PROFILE")
if auto_button == false
sensitivity
else if auto_button == true
sensitivity := volatility
// Functions
f_chartTfInMinutes() =>
float _resInMinutes = timeframe.multiplier * (
timeframe.isseconds ? 1. / 60 :
timeframe.isminutes ? 1. :
timeframe.isdaily ? 60. * 24 :
timeframe.isweekly ? 60. * 24 * 7 :
timeframe.ismonthly ? 60. * 24 * 30.4375 : na)
atr(len) =>
tr = ta.tr
atr = 0.0
atr := nz(atr + (tr - atr ) / len, tr)
supertrend(src, factor, len) =>
atr = ta.atr(len)
upperBand = src + factor * atr
lowerBand = src - factor * atr
prevLowerBand = nz(lowerBand )
prevUpperBand = nz(upperBand )
lowerBand := lowerBand > prevLowerBand or close < prevLowerBand ? lowerBand : prevLowerBand
upperBand := upperBand < prevUpperBand or close > prevUpperBand ? upperBand : prevUpperBand
int direction = na
float superTrend = na
prevSuperTrend = superTrend
if prevSuperTrend == prevUpperBand
direction := close > upperBand ? 1 : -1
else
direction := close < lowerBand ? -1 : 1
superTrend := direction == 1 ? lowerBand : direction == -1 ? upperBand : na
dchannel(len)=>
hh = ta.highest(len)
ll = ta.lowest (len)
trend = 0
trend := close > hh ? 1 : close < ll ? -1 : nz(trend )
trendScalper(show, len1, len2, len3, colorBull, colorBear, colorBarBull, colorBarBear) =>
avgOC = math.avg(open, close)
ha_o = 0.0, ha_o := na(ha_o ) ? avgOC : (ha_o + ohlc4 ) / 2
ema1 = ta.ema(ha_o, len1), ema2 = ta.ema(ha_o, len2), ema3 = ta.ema(ha_o, len3)
ris1 = ema1 > ema1 , ris2 = ema2 > ema2 , ris3 = ema3 > ema3
fal1 = ema1 < ema1 , fal2 = ema2 < ema2 , fal3 = ema3 < ema3
colorEma1 = ris1 ? colorBull : fal1 ? colorBear : na, colorEma2 = ris2 ? colorBull : fal2 ? colorBear : na, colorEma3 = ris3 ? colorBull : fal3 ? colorBear : na
fillEma1 = avgOC > ema1 ? colorBull : avgOC < ema1 ? colorBear : na, fillEma2 = ema1 > ema2 ? colorBull : ema1 < ema2 ? colorBear : na, fillEma3 = ema2 > ema3 ? colorBull : ema2 < ema3 ? colorBear : na
colorBar = close < ema1 and close < ema2 ? colorBarBear : colorBarBull
candlesMom() =>
= ta.macd(close, 12, 26, 9)
(macd > 0 and macd > macd ) or (macd < 0 and macd < macd )
trailingSL(buy, sell, factor, len, usePerc, perc) =>
atr = atr(len)
upperBand = high + (usePerc ? high * (perc / 100) : factor * atr)
lowerBand = low - (usePerc ? low * (perc / 100) : factor * atr)
prevLowerBand = nz(lowerBand )
prevUpperBand = nz(upperBand )
lowerBand := lowerBand > prevLowerBand or buy ? lowerBand : prevLowerBand
upperBand := upperBand < prevUpperBand or sell ? upperBand : prevUpperBand
int direction = na
float stop = na
prevSuperTrend = stop
if prevSuperTrend == prevUpperBand
direction := buy ? 1 : -1
else
direction := sell ? -1 : 1
stop := direction == 1 ? lowerBand : direction == -1 ? upperBand : na
add_to_zz(zz, val, bi) =>
array.unshift(zz, bi)
array.unshift(zz, val)
if array.size(zz) > 12
array.pop(zz)
update_zz(zz, val, bi, dir) =>
if array.size(zz) == 0
add_to_zz(zz, val, bi)
else
if dir == 1 and val > array.get(zz, 0) or dir == -1 and val < array.get(zz, 0)
array.set(zz, 0, val)
array.set(zz, 1, bi)
0
float ph = ta.pivothigh(high, 10, 10)
float pl = ta.pivotlow (low , 10, 10)
LSRstyle = lineSrStyle == "Dashed" ? line.style_dashed : lineSrStyle == "Solid" ? line.style_solid : line.style_dotted
prdhighest = ta.highest(300)
prdlowest = ta.lowest (300)
cwidth = (prdhighest - prdlowest) * 10 / 100
var pivotvals = array.new_float(0)
if ph or pl
array.unshift(pivotvals, ph ? ph : pl)
if array.size(pivotvals) > 20
array.pop(pivotvals)
get_sr_vals(ind) =>
float lo = array.get(pivotvals, ind)
float hi = lo
int numpp = 0
for y = 0 to array.size(pivotvals) - 1 by 1
float cpp = array.get(pivotvals, y)
float wdth = cpp <= lo ? hi - cpp : cpp - lo
if wdth <= cwidth
lo := cpp <= lo ? cpp : lo
hi := cpp > lo ? cpp : hi
numpp += 1
numpp
var sr_up_level = array.new_float(0)
var sr_dn_level = array.new_float(0)
sr_strength = array.new_float(0)
find_loc(strength) =>
ret = array.size(sr_strength)
for i = ret > 0 ? array.size(sr_strength) - 1 : na to 0 by 1
if strength <= array.get(sr_strength, i)
break
ret := i
ret
ret
check_sr(hi, lo, strength) =>
ret = true
for i = 0 to array.size(sr_up_level) > 0 ? array.size(sr_up_level) - 1 : na by 1
if array.get(sr_up_level, i) >= lo and array.get(sr_up_level, i) <= hi or array.get(sr_dn_level, i) >= lo and array.get(sr_dn_level, i) <= hi
if strength >= array.get(sr_strength, i)
array.remove(sr_strength, i)
array.remove(sr_up_level, i)
array.remove(sr_dn_level, i)
ret
else
ret := false
ret
break
ret
// Get components
rsi = ta.rsi(close, 14)
vosc = ta.obv - ta.ema(ta.obv, 20)
bs = ta.ema(nz(math.abs((open - close) / (high - low) * 100)), 3)
ema = ta.ema(close, 200)
emaBull = close > ema
equal_tf(res) => str.tonumber(res) == f_chartTfInMinutes()
higher_tf(res) => str.tonumber(res) > f_chartTfInMinutes()
too_small_tf(res) => (timeframe.isweekly and res=="1") or (timeframe.ismonthly and str.tonumber(res) < 10)
securityNoRep(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()) : 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
TF1Bull = securityNoRep(syminfo.tickerid, "1" , emaBull)
TF3Bull = securityNoRep(syminfo.tickerid, "3" , emaBull)
TF5Bull = securityNoRep(syminfo.tickerid, "5" , emaBull)
TF10Bull = securityNoRep(syminfo.tickerid, "10" , emaBull)
TF15Bull = securityNoRep(syminfo.tickerid, "15" , emaBull)
TF30Bull = securityNoRep(syminfo.tickerid, "30" , emaBull)
TF60Bull = securityNoRep(syminfo.tickerid, "60" , emaBull)
TF120Bull = securityNoRep(syminfo.tickerid, "120" , emaBull)
TF240Bull = securityNoRep(syminfo.tickerid, "240" , emaBull)
TF720Bull = securityNoRep(syminfo.tickerid, "720" , emaBull)
TFDBull = securityNoRep(syminfo.tickerid, "1440", emaBull)
ema150 = ta.ema(close, 150)
ema250 = ta.ema(close, 250)
hma55 = ta.hma(close, 55 )
= ta.macd(close, 12, 26, 9)
supertrend = supertrend(ohlc4, sensitivity, 10)
maintrend = dchannel(30)
confBull = (ta.crossover (close, supertrend) or (ta.crossover (close, supertrend) and maintrend < 0)) and macd > 0 and macd > macd and ema150 > ema250 and hma55 > hma55 and maintrend > 0
confBear = (ta.crossunder(close, supertrend) or (ta.crossunder(close, supertrend) and maintrend > 0)) and macd < 0 and macd < macd and ema150 < ema250 and hma55 < hma55 and maintrend < 0
trendcloud = supertrend(ohlc4, periodTrendCloud == "Long term" ? 7 : 4, 10)
hma = fastTrendCloud ? ta.hma(close, fastTrendCloudLen) : na
none = close > 0
= ta.dmi(14, 14)
consFilter = adx > 20
smartFilter = ta.ema(close, 200)
volFilter = (ta.ema(volume, 25) - ta.ema(volume, 26)) / ta.ema(volume, 26) > 0
trendFilter = trendcloud
bull = (strategy == "Normal" ? ta.crossover (close, supertrend) : confBull and not confBull ) and strategy != "Trend scalper" and (smartSignalsOnly ? close > smartFilter : none) and (consSignalsFilter ? consFilter : none) and (highVolSignals ? volFilter : none) and (signalsTrendCloud ? (periodTrendCloud == "New" ? ema150 > ema250 : close > trendFilter) : none)
bear = (strategy == "Normal" ? ta.crossunder(close, supertrend) : confBear and not confBear ) and strategy != "Trend scalper" and (smartSignalsOnly ? close < smartFilter : none) and (consSignalsFilter ? consFilter : none) and (highVolSignals ? volFilter : none) and (signalsTrendCloud ? (periodTrendCloud == "New" ? ema150 < ema250 : close < trendFilter) : none)
countBull = ta.barssince(bull)
countBear = ta.barssince(bear)
trigger = nz(countBull, bar_index) < nz(countBear, bar_index) ? 1 : 0
= trendScalper(strategy == "Trend scalper" ? true : false, 5, 9, 21, color.green, color.red, #00DD00, #DD0000)
trailingStop = trailingSL(bull, bear, 2.2, 14, usePercSL, percTrailingSL)
float _ph = ta.highestbars(high, periodSwings) == 0 ? high : na
float _pl = ta.lowestbars (low, periodSwings) == 0 ? low : na
var _dir = 0, dir_ = _pl and na(_ph) ? -1 : _dir, _dir := _ph and na(_pl) ? 1 : dir_, dirChg = ta.change(_dir)
var zz = array.new_float(0), zzOld = array.copy(zz)
float zzLive = _ph or _pl ? (dirChg ? add_to_zz(zz, _dir == 1 ? _ph : _pl, bar_index) : update_zz(zz, _dir == 1 ? _ph : _pl, bar_index, _dir)) : na
aA = ta.wma(srcTrendChannel, lenTrendChannel), b = ta.sma(srcTrendChannel, lenTrendChannel)
A = 4 * b - 3 * aA, B = 3 * aA - 2 * b
m = (A - B) / (lenTrendChannel - 1)
d = 0., for i = 0 to lenTrendChannel - 1 by 1
l = B + m * i
d += math.pow(srcTrendChannel - l, 2)
rmse = math.sqrt(d / (lenTrendChannel - 1)) * 2
float hb_ = ta.highestbars(lbPeriod) == 0 ? high : na
float lb_ = ta.lowestbars (lbPeriod) == 0 ? low : na
var int dir = 0
float zz_ = na
float pp = na
var int consCnt = 0
var float condHi = na
var float condLo = na
float H_ = ta.highest(lenCons)
float L_ = ta.lowest (lenCons)
var line lineUp = na
var line lineDn = na
bool breakUp = false
bool breakDn = false
var float pvh1_price = array.new_float(1000, na)
var int pvh1_time = array.new_int (1000, na)
var float pvl1_price = array.new_float(1000, na)
var int pvl1_time = array.new_int (1000, na)
var float pvh2_price = array.new_float(1000, na)
var int pvh2_time = array.new_int (1000, na)
var float pvl2_price = array.new_float(1000, na)
var int pvl2_time = array.new_int (1000, na)
var float htcmrll_price = na
var int htcmrll_time = na
var float ltcmrhh_price = na
var int ltcmrhh_time = na
var box long_boxes = array.new_box()
var box short_boxes = array.new_box()
var float temp_pv_0 = na
var float temp_pv_1 = na
var float temp_pv_2 = na
bool pvh = high < high and high > high
bool pvl = low > low and low < low
int pv1_time = bar_index
float pv1_high = high
float pv1_low = low
float trigger_high = bos_type == "High and Low" ? high : math.max(open, close)
float trigger_low = bos_type == "High and Low" ? low : math.min(open, close)
rangeHigh = ta.highest(high, lookback)
rangeLow = ta.lowest(low, lookback)
rangeHeight = rangeHigh - rangeLow
histogramHeight = rangeHeight / levelNum
histogramLowList = array.new_float(levelNum, na)
histogramHighList = array.new_float(levelNum, na)
histogramBuyVolumeList = array.new_float(levelNum, 0.0)
histogramSellVolumeList = array.new_float(levelNum, 0.0)
var buyBars = array.new_box(365, na)
for i = 0 to 364
box.delete(array.get(buyBars, i))
var sellBars = array.new_box(365, na)
for i = 0 to 364
box.delete(array.get(sellBars, i))
// Colors
green = #00DD00, green50 = color.new(green, 50), green20 = color.new(green, 80)
red = #DD0000, red50 = color.new(red, 50), red20 = color.new(red, 80)
silver = #B2B5BE, silver50 = color.new(silver, 50), silver20 = color.new(silver, 80)
// Plots
atrBand = usePercSL ? (trigger ? low : high) * (percTrailingSL / 100) : ta.atr(14) * 2.2
atrStop = trigger ? low - atrBand : high + atrBand
lastTrade(src) => ta.valuewhen(bull or bear, src, 0)
entry_y = lastTrade(close)
stop_y = lastTrade(atrStop)
tp1_y = (entry_y-lastTrade(atrStop))*multTP1 + entry_y
tp2_y = (entry_y-lastTrade(atrStop))*multTP2 + entry_y
tp3_y = (entry_y-lastTrade(atrStop))*multTP3 + entry_y
labelTpSl(cond, y, txt, color) =>
label labelTpSl = enableTpSlAreas and cond ? label.new(bar_index + 1, y, txt, xloc.bar_index, yloc.price, color, label.style_label_left, color.white, size.normal) : na
label.delete(labelTpSl )
labelTpSl(none, entry_y, "Entry : " + str.tostring(math.round_to_mintick(entry_y)), color.orange)
labelTpSl(none, stop_y , "Stop loss : " + str.tostring(math.round_to_mintick(atrStop)), color.red)
labelTpSl(useTP1 and multTP1 != 0, tp1_y, "TP 1 : " + str.tostring(math.round_to_mintick(tp1_y)), color.green)
labelTpSl(useTP2 and multTP2 != 0, tp2_y, "TP 2 : " + str.tostring(math.round_to_mintick(tp2_y)), color.green)
labelTpSl(useTP3 and multTP3 != 0, tp3_y, "TP 3 : " + str.tostring(math.round_to_mintick(tp3_y)), color.green)
lineTpSl(cond, y, color, style) =>
line lineTpSl = enableTpSlAreas and cond ? line.new(bar_index - (trigger ? countBull : countBear), y, bar_index + 1, y, xloc.bar_index, extend.none, color, style) : na
line.delete(lineTpSl )
lineTpSl(none, entry_y, color.orange, line.style_dashed)
lineTpSl(none, stop_y , color.red , line.style_solid )
lineTpSl(useTP1 and multTP1 != 0, tp1_y, color.green, line.style_dotted)
lineTpSl(useTP2 and multTP2 != 0, tp2_y, color.green, line.style_dotted)
lineTpSl(useTP3 and multTP3 != 0, tp3_y, color.green, line.style_dotted)
var dashboard_loc = locationDashboard == "Top right" ? position.top_right : locationDashboard == "Top left" ? position.top_left : locationDashboard == "Middle right" ? position.middle_right : locationDashboard == "Middle left" ? position.middle_left : locationDashboard == "Bottom right" ? position.bottom_right : position.bottom_left
var dashboard_size = sizeDashboard == "Tiny" ? size.tiny : sizeDashboard == "Small" ? size.small : size.normal
var dashboard = table.new(dashboard_loc, 2, 20, colorBackground, colorFrame, 3, colorBorder, 3)
dashboard_cell(column, row, txt) => table.cell(dashboard, column, row, txt, 0, 0, color.white, text_size=dashboard_size)
dashboard_cell_bg(column, row, col) => table.cell_set_bgcolor(dashboard, column, row, col)
if barstate.islast and enableDashboard
dashboard_cell(0, 0 , "Current strategy")
dashboard_cell(0, 1 , "Current sensitivity")
dashboard_cell(0, 2 , "Current Position")
dashboard_cell(0, 3 , "Current trend")
dashboard_cell(0, 4 , "Trend strength")
dashboard_cell(0, 5 , "Volume")
dashboard_cell(0, 6 , "Volatility")
dashboard_cell(0, 7 , "Momentum")
dashboard_cell(0, 8 , "Timeframe trends📊"), table.merge_cells(dashboard, 0, 8, 1, 8)
dashboard_cell(0, 9 , "1 min")
dashboard_cell(0, 10, "3 min")
dashboard_cell(0, 11, "5 min")
dashboard_cell(0, 12, "10 min")
dashboard_cell(0, 13, "15 min")
dashboard_cell(0, 14, "30 min")
dashboard_cell(0, 15, "1 Hour")
dashboard_cell(0, 16, "2 Hour")
dashboard_cell(0, 17, "4 Hour")
dashboard_cell(0, 18, "12 Hour")
dashboard_cell(0, 19, "Daily")
dashboard_cell(1, 0 , strategy)
dashboard_cell(1, 1 , str.tostring(sensitivity))
dashboard_cell(1, 2 , strategy != "Trend scalper" ? (trigger ? "Buy" : "Sell") : ""), dashboard_cell_bg(1, 2, strategy != "Trend scalper" ? (trigger ? color.green : color.red) : colorBackground)
dashboard_cell(1, 3 , emaBull ? "Bullish" : "Bearish"), dashboard_cell_bg(1, 3, emaBull ? color.green : color.red)
dashboard_cell(1, 4 , str.tostring(bs, "0.0") + " %")
dashboard_cell(1, 5 , vosc > 0 ? "Bullish" : "Bearish"), dashboard_cell_bg(1, 5, vosc > 0 ? color.green : color.red)
dashboard_cell(1, 6 , adx > 20 ? "Trending 🚀" : "Ranging ⚠️"), dashboard_cell_bg(1, 6, adx > 20 ? color.green : color.orange)
dashboard_cell(1, 7 , rsi > 50 ? "Bullish" : "Bearish"), dashboard_cell_bg(1, 7, rsi > 50 ? color.green : color.red)
dashboard_cell(1, 9 , TF1Bull ? "Bullish" : "Bearish"), dashboard_cell_bg(1, 9 , TF1Bull ? color.green : color.red)
dashboard_cell(1, 10, TF3Bull ? "Bullish" : "Bearish"), dashboard_cell_bg(1, 10, TF3Bull ? color.green : color.red)
dashboard_cell(1, 11, TF5Bull ? "Bullish" : "Bearish"), dashboard_cell_bg(1, 11, TF5Bull ? color.green : color.red)
dashboard_cell(1, 12, TF10Bull ? "Bullish" : "Bearish"), dashboard_cell_bg(1, 12, TF10Bull ? color.green : color.red)
dashboard_cell(1, 13, TF15Bull ? "Bullish" : "Bearish"), dashboard_cell_bg(1, 13, TF15Bull ? color.green : color.red)
dashboard_cell(1, 14, TF30Bull ? "Bullish" : "Bearish"), dashboard_cell_bg(1, 14, TF30Bull ? color.green : color.red)
dashboard_cell(1, 15, TF60Bull ? "Bullish" : "Bearish"), dashboard_cell_bg(1, 15, TF60Bull ? color.green : color.red)
dashboard_cell(1, 16, TF120Bull ? "Bullish" : "Bearish"), dashboard_cell_bg(1, 16, TF120Bull ? color.green : color.red)
dashboard_cell(1, 17, TF240Bull ? "Bullish" : "Bearish"), dashboard_cell_bg(1, 17, TF240Bull ? color.green : color.red)
dashboard_cell(1, 18, TF720Bull ? "Bullish" : "Bearish"), dashboard_cell_bg(1, 18, TF720Bull ? color.green : color.red)
dashboard_cell(1, 19, TFDBull ? "Bullish" : "Bearish"), dashboard_cell_bg(1, 19, TFDBull ? color.green : color.red)
l(css, k) =>
line lr = enableAutoTrend ? line.new(bar_index - lenTrendChannel + 1, A + k, bar_index, B + k, extend=extend.right, color=css) : na
line.delete(lr )
l(color.blue, rmse), l(color.blue, 0), l(color.blue, -rmse)
//
//======================================
RV- ProTime Dynamic Trend AnalyzerRV-ProTime Dynamic Trend Analyzer is a state-of-the-art trading indicator meticulously designed to provide unparalleled insights across all timeframes. It combines essential tools for trend, momentum, and key level analysis, making it a one-stop solution for traders. The core feature, Dynamic Multi-Timeframe Supertrend, sets this indicator apart, complemented by additional tools for comprehensive market analysis. Here’s everything this indicator offers:
Key Features:
1. Dynamic Multi-Timeframe Supertrend (Core Feature)
Daily, Weekly, Monthly, and Yearly Supertrends are plotted directly on the chart, providing precise trend direction across multiple timeframes.
Lower timeframe Supertrends are automatically hidden on higher timeframe charts (e.g., Weekly and Monthly ) to reduce clutter and maintain precision, ensuring a clean and actionable view.
These Supertrends help identify major trend reversals, pullbacks, and continuation zones, empowering traders to make informed decisions regardless of the trading horizon.
Whether you’re scalping on intraday charts or strategizing long-term trades, this feature ensures you always have the right trend perspective at your fingertips.
2. Quarterly and Yearly Earnings Table
A built-in table to display Quarterly and Yearly Earnings, allowing traders to incorporate fundamental analysis into their strategies effortlessly.
Provides quick insights into the financial health and performance of stocks, helping traders align with strong-performing assets.
3. RSI & MACD Multi-Timeframe Table
Visualize RSI and MACD values across multiple timeframes, including 1-minute, 5-minute, 15-minute, 1-hour, Daily, Weekly, and Monthly.
This table helps detect overbought/oversold zones and shifts in momentum, offering a robust foundation for entry and exit strategies.
4. Exponential Moving Averages (EMAs)
Includes four customizable EMAs to support moving average crossovers, trend identification, and dynamic support/resistance levels.
Ideal for traders seeking to refine their entries and exits based on trend-following strategies.
5. Fibonacci Pivots
Features two sets of Fibonacci-based Pivot Points for higher and lower timeframes.
These pivots act as critical support and resistance zones, aiding traders in identifying key price levels for potential reversals or breakouts.
6. Auto 52-Week and All-Time High/Low Levels
Automatically plots 52-week highs/lows and all-time highs/lows, with visually distinct candle coloring for added clarity.
Provides immediate identification of stocks reaching pivotal breakout or reversal zones, making it invaluable for trend-following and breakout strategies.
7. User-Friendly Customization
All features are toggleable, allowing traders to customize the indicator based on their unique trading preferences and strategies.
Why This Indicator Stands Out:
The RV-ProTime Dynamic Trend Analyzer isn’t just another indicator—it’s a comprehensive trend detection and market analysis system. The Daily, Weekly, Monthly Supertrends serve as its backbone, offering unmatched flexibility and adaptability for traders across all timeframes. These Supertrends allow traders to:
Identify and align with the prevailing trend at any level.
Avoid conflicting signals by dynamically hiding lower timeframe trends on higher timeframe charts.
Gain an edge in both short-term and long-term trading strategies by providing a consistent view of market direction.
Whether you’re an intraday scalper, swing trader, or position trader, this indicator adapts to your needs, combining the power of trend-following tools with fundamental and technical insights.
Unlock the ultimate trading experience with the RV-ProTime Dynamic Trend Analyzer: backtest the indicator, take trades with the best risk-reward setups, and trade with a stop-loss aligned with your strategy to achieve consistent success!
Fear and Greed Index By EquityPath(DevHunainmq)Description:
🚀 **Fear and Greed Index Indicator for TradingView** 🚀
Unlock the power of **market sentiment analysis** with this sleek and futuristic Fear and Greed Index indicator! 🎯 Designed for traders who want to make data-driven decisions, this indicator visualizes the emotional state of the market directly on your charts. 🌟
🔴 **Fear Zones:** Spot undervalued opportunities as fear dominates the market.
🟠 **Neutral Zones:** Identify consolidation and prepare for breakout moves.
🟢 **Greed Zones:** Detect potential market euphoria and risk of overvaluation.
With gradient backgrounds, dynamic thresholds, and real-time labels, this tool is not just functional but visually stunning. Perfect for any trader looking to incorporate **sentiment analysis** into their strategy. 📈
**Features:**
✅ Easy-to-read Fear and Greed graph 📊
✅ Dynamic color-coded zones (Red for Fear, Green for Greed)
✅ Auto-updating sentiment labels 📍
✅ Designed for all market types (crypto, stocks, forex)
Take control of your trades by understanding **when to buy** and **when to sell** using this powerful indicator. 💡 Let the market sentiment guide your strategy!
---
### Hashtags:
#TradingView #Indicator #FearAndGreedIndex #MarketSentiment #CryptoTrading #ForexTrading #StockTrading #TechnicalAnalysis #TradingTools #FuturisticTrading #SentimentAnalysis #FearZones #GreedZones #TradingStrategy #TradeSmarter #MarketPsychology
High Volatility Crypto StrategyThis strategy indicatore use for high volatile market like crypto for 1 min, 5 min and 15 min interval chart
ICT Strategy with Historical BacktestЛогика входа в сделки:
Теперь условия для входа в Лонг и Шорт проверяются корректно. Мы учитываем, что пробой на старшем таймфрейме (1H или выше) и наличие FVG важны для принятия решения о входе в сделку.
Отображение FVG:
Прямоугольники для FVG теперь правильно отображаются (если активирован флаг show_fvg_boxes). Для бычьего FVG прямоугольники будут зелеными, для медвежьего FVG — красными.
Метки для прогнозируемых сделок:
Добавлены метки "Potential Long" и "Potential Short" для визуализации на графике в точках потенциального входа в сделки.
Создание сделок на истории:
Стратегия теперь должна корректно создавать сделки на исторических данных, учитывая условия FVG и BOS.
High with LineThis indicator, High with line, intends to help users mark out the highs of the last 50 candles.
its not a useful indicator, I am just testing something out.
Support me by using my indicator.
Thank you
Enhanced Support Level StrategyEnhanced Support Level Strategy. Testing the strategy to confirm if it works according to plan. This is a strategy in test. You are fully responsible for the outcome of your trades should you use this strategy.
High Volatility Crypto Strategy with Volume DivergenceHigh Volatility Crypto Strategy with Volume Divergence
AMG Supply and Demand ZonesAMG Supply and Demand Zones Indicator
This indicator identifies and visualizes supply and demand zones on the chart to help traders spot key areas of potential price reversals or continuations. The indicator uses historical price data to calculate zones based on high/low ranges and a customizable ATR-based fuzz factor.
Key Features:
Back Limit: Configurable look-back period to identify zones.
Zone Types: Options to display weak, untested, and turncoat zones.
Customizable Parameters: Adjust fuzz factor and visualization settings.
Usage:
Use this indicator to enhance your trading strategy by identifying key supply and demand areas where price is likely to react.
You can customize this further based on how you envision users benefiting from your indicator. Let me know if you'd like to add or adjust anything!
Accumulated Funding RateAccumulated Funding Rate
for future contract -ve/+ve funding fees that indicate long and short opening so that price differance between Spot and Future is balance buy exchange funding between long and short holder
-ve rate means Short is high so short holder has to pay fees to Long to correction in Price and vise versa
so over the periode of time accumulated rate its indicates the Bubble which can be explode any time to Liquidation of inbalance Long/Short Ratio some time its take longer period but its indicated bubbles direction
maximum -ve rates indicate Short opened from long period of time so when its liquidate/exit
then price will be correct to its original price that was struck due Short holder over the time and then now market will liquidate/exit those unstable Short like 50X/25X leverage and correct the price
Year-over-Year % Change for PCEPILFEHello, traders!
This indicator is specifically for FRED:PCEPILFE , which is a 'Personal Consumption Expenditures (PCE) Index excluding food and energy.'
What this indicator does is compare the monthly data to that of the same month last year to see how it has changed over the year. This comparison method is widely known as YoY(Year-over-Year).
While I made this indicator to use for FRED:PCEPILFE , you may use it for different charts as long as they show monthly data.
FRED:PCEPILFE is one of the main measures of inflation the Federal Reserve uses.
You can see the YoY % change of the PCE Index excluding food and energy in the official website for the Bureau of Labor Statistics, but unfortunately, I couldn't find one in TradingView.
So instead, I decided to make my own indicator showing the changes using FRED:PCEPILFE .
The code is very simple: it compares the data to the data 12 points ago because 12 points would mean 12 months in this chart. We then multiply the result by 100 for percentage.
Doing so, we compare the current month to the same month of the previous year.
Because I am only interested in the YoY % Change of the index, I pulled the indicator all the way up, covering the original chart data entirely. (Or you could achieve the same by simply moving your indicator to the pane above. But this way, the original chart data is also visible.)
I hope this indicator helps you with your analysis. Feel free to ask questions if have any!
God bless!
Comprehensive RSI, MACD & Stochastic Table
RSI, MACD, and Stochastic Multi-Asset Indicator for TradingView
Introduction
The RSI, MACD, and Stochastic Multi-Asset Indicator is a comprehensive tool designed for traders who want to analyze multiple assets simultaneously while utilizing some of the most popular technical indicators. This indicator is tailored for all market types—whether you're trading cryptocurrencies, stocks, forex, or commodities—and provides a consolidated dashboard for faster and more informed decision-making.
This tool combines Relative Strength Index (RSI), Moving Average Convergence Divergence (MACD), and Stochastic Oscillator, three of the most effective momentum and trend-following indicators. It provides a visual, color-coded table for quick insights and alerts for significant buy or sell opportunities.
---
What Does This Indicator Do?
This indicator performs the following key functions:
1. Multi-Asset Analysis: Analyze two assets side by side, allowing you to monitor their momentum, trends, and overbought/oversold conditions simultaneously.
2. Combines Three Powerful Indicators:
RSI: Tracks market momentum and identifies overbought/oversold zones.
MACD: Highlights trend direction and momentum shifts.
Stochastic Oscillator: Provides insights into overbought/oversold zones with smoothing for better accuracy.
3. Color-Coded Dashboard: Displays all indicator values in an easy-to-read table with color coding for quick identification of market conditions.
4. Real-Time Alerts: Generates alerts when strong bullish or bearish conditions are met across multiple indicators.
---
Key Features
1. Customizable Inputs
You can adjust RSI periods, MACD parameters, Stochastic settings, and timeframes to suit your trading style.
Analyze default or custom assets (e.g., BTC/USDT, ETH/USDT).
2. Multi-Timeframe Support
Use this indicator on any timeframe (e.g., 1-minute, 1-hour, daily) to suit your trading strategy.
3. Comprehensive Dashboard
Displays values for RSI, MACD, and Stochastic for two assets in one clean, compact table.
Automatically highlights overbought (red), oversold (green), and neutral (gray) conditions.
4. Buy/Sell Signals
Plots buy/sell signals on the chart when all indicators align in strong bullish or bearish zones.
Example:
Strong Buy: RSI above 50, Stochastic %K above 80, and MACD histogram positive.
Strong Sell: RSI below 50, Stochastic %K below 20, and MACD histogram negative.
5. Real-Time Alerts
Alerts notify you when a strong buy or sell condition is detected, so you don't miss critical trading opportunities.
---
Who Is This Indicator For?
This indicator is perfect for:
Day Traders who need real-time insights across multiple assets.
Swing Traders who want to identify mid-term trends and momentum shifts.
Crypto, Stock, and Forex Traders looking for a consolidated tool that works across all asset classes.
---
How It Works
1. RSI (Relative Strength Index):
Tracks momentum by measuring the speed and change of price movements.
Overbought: RSI > 70 (Red).
Oversold: RSI < 30 (Green).
2. MACD (Moving Average Convergence Divergence):
Combines two exponential moving averages (EMA) to track momentum and trend direction.
Positive Histogram: Bullish momentum.
Negative Histogram: Bearish momentum.
3. Stochastic Oscillator:
Tracks price relative to its high-low range over a specific period.
Overbought: %K > 80.
Oversold: %K < 20.
4. Table View:
Displays indicator values for both assets in an intuitive table format.
Highlights critical zones with color coding.
5. Alerts:
Alerts are triggered when:
RSI, MACD, and Stochastic align in strong bullish or bearish conditions.
These conditions are based on customizable thresholds.
---
How to Use the Indicator
1. Add the Indicator to Your Chart:
After publishing, search for the indicator by its name in TradingView's Indicators tab.
2. Customize Inputs:
Adjust settings for RSI periods, MACD parameters, and Stochastic smoothing to suit your strategy.
3. Interpret the Table:
Check the table for highlighted zones (red for overbought, green for oversold).
Look for bullish or bearish signals in the "Signal" column.
4. Act on Alerts:
Use the real-time alerts to take action when strong conditions are met.
---
Example Use Cases
1. Crypto Day Trading:
Monitor BTC/USDT and ETH/USDT simultaneously for strong bullish or bearish conditions.
Receive alerts when RSI, MACD, and Stochastic align for a potential reversal.
2. Swing Trading Stocks:
Track a stock (e.g., AAPL) and its sector ETF (e.g., QQQ) to find momentum-based opportunities.
3. Forex Scalping:
Identify overbought/oversold conditions across multiple currency pairs.
---
Conclusion
The RSI, MACD, and Stochastic Multi-Asset Indicator simplifies your trading workflow by consolidating multiple technical indicators into one powerful tool. With real-time insights, color-coded visuals, and customizable alerts, this indicator is designed to help you stay ahead in any market.
Whether you're a beginner or an experienced trader, this indicator provides everything you need to make confident trading decisions. Add it to your TradingView chart today and take your analysis to the next level!
---
Make sure to leave your feedback and suggestions so I can continue improving the tool for the community. Happy trading!
Thrax - Pullback based short side scalping⯁ This indicator is built for short trades only.
⤞ Pullback based scalping is a strategy where a trader anticipates a pullback and makes a quick scalp in this pullback. This strategy usually works in a ranging market as probability of pullbacks occurrence in ranging market is quite high.
⤞ The strategy is built by first determining a possible candidate price levels having high chance of pullbacks. This is determined by finding out multiple rejection point and creating a zone around this price. A rejection is considered to be valid only if it comes to this zone after going down by a minimum pullback percentage. Once the price has gone down by this minimum pullback percentage multiple times and reaches the zone again chances of pullback goes high and an indication on chart for the same is given.
⯁ Inputs
⤞ Zone-Top : This input parameter determines the upper range for the price zone.
⤞ Zone bottom : This input parameter determines the lower range for price zone.
⤞ Minimum Pullback : This input parameter determines the minimum pullback percentage required for valid rejection. Below is the recommended settings
⤞ Lookback : lookback period before resetting all the variables
⬦Below is the recommended settings across timeframes
⤞ 15-min : lookback – 24, Pullback – 2, Zone Top Size %– 0.4, Zone Bottom Size % – 0.2
⤞ 5-min : lookback – 50, pullback – 1% - 1.5%, Zone Top Size %– 0.4, Zone Bottom Size % – 0.2
⤞ 1-min : lookback – 100, pullback – 1%, Zone Top Size %– 0.4, Zone Bottom Size % – 0.2
⤞ Anything > 30-min : lookback – 11, pullback – 3%, Zone Top Size %– 0.4, Zone Bottom Size % – 0.2
✵ This indicator gives early pullback detection which can be used in below ways
1. To take short trades in the pullback.
2. To use this to exit an existing position in the next few candles as pullback may be incoming.
📌 Kindly note, it’s not necessary that pullback will happen at the exact point given on the chart. Instead, the indictor gives you early signals for the pullback
⯁ Trade Steup
1. Wait for pullback signal to occur on the chart.
2. Once the pullback warning has been displayed on the chart, you can either straight away enter the short position or wait for next 2-4 candles for initial sign of actual pullback to occurrence.
3. Once you have initiated short trade, since this is pullback-based strategy, a quick scalp should be made and closed as price may resume it’s original direction. If you have risk appetite you can stay in the trade longer and trial the stops if price keeps pulling back.
4. You can zone top as your stop, usually zone top + some% should be used as stop where ‘some %’ is based on your risk appetite.
5. It’s important to note that this indicator gives early sings of pullback so you may actually wait for 2-3 candles post ‘Pullback warning’ occurs on the chart before entering short trade.
SMC breakout With EMAThis indicator is based on the breakout of the BOS and CHOCH levels at SMC method.
You can change the amount of candles of BOS or CHOCH.
This indicator also includes EMA, that you can use it for confirmation of buy or sell transaction.
Also you can use super trend features on this indicator for following your profit.
This indicator is based on the breakdown of the bass and choke points in it.
And this feature allows you to use this indicator in Forex trading as well.
Dynamic Risk Levels with Buy/Sell TextIntroduction
Risk management and making the right decisions while trading can be quite complex. To help you overcome these challenges, we developed the Dynamic Risk Levels and Buy/Sell Text indicator. This indicator aims to simplify your decision-making processes by combining volatility analysis, dynamic risk levels and RSI (Relative Strength Index) signals. This tool, which clearly visualizes buy/sell levels and risk zones on the chart, offers an ideal solution for investors of all levels.
---
Key Features
1. ATR Based Volatility Calculation
The indicator uses the Average True Range (ATR) method to measure market volatility. Combined with Fibonacci's golden ratio (1.618), ATR creates risk levels that dynamically adapt to market conditions.
2. Determining Buy and Sell Levels
The lowest closing price during a specified period is defined as the buy level, and the highest closing price is defined as the sell level.
3. Dynamic Long and Short Risk Levels
Long (buy) risk level: Buy level + (ATR * 1.618)
Short (sell) risk level: Sell level - (ATR * 1.618)
These levels are constantly updated according to the volatility of the market.
4. Additional Filtering with RSI
RSI (Relative Strength Index) filters out false signals by identifying overbought and oversold areas.
Buy Signal: RSI < 30
Sell Signal: RSI > 70
5. Visualization of Buy/Sell Signals
On the chart:
Buy signals are indicated with a green "Buy" label.
Sell signals are marked with a red "Sell" label.
These visualizations help you make quick and easy decisions.
---
Levels Shown on the Chart
1. Dynamic Risk Levels
Long Risk Level (Green Line): Indicates the safe level for buying positions.
Short Risk Level (Red Line): Indicates the safe level for selling positions.
2. Buy and Sell Levels
Buy Level (Blue Line): Indicates the long-term low closing level.
Sell Level (Orange Line): Indicates the long-term high closing level.
---
How to Use?
1. Long Trading Strategy:
A "Buy" signal is generated when the price goes below the long risk level and then goes above it again and RSI < 30.
2. Short Trading Strategy:
A "Sell" signal is generated when the price goes above the short risk level and then goes below it again and RSI > 70.
---
Conclusion
This indicator supports volatility-based risk management by adapting to the dynamic structure of the market and also provides reliable buy/sell signals. The Dynamic Risk Levels and Buy/Sell Text indicator is an ideal tool for investors who want to create a simple and effective trading strategy.
Using this indicator on the TradingView platform, you can make more informed decisions and better manage your risks.
Remember: No indicator is 100% accurate; always analyze market conditions carefully and pay attention to risk management.
Buyside & Sellside Liquidity and FOMO & PANİK]We Added Advanced Features to LuxAlgo’s Buy-Side and Sell-Side Liquidity Indicator
Buy-Side and Sell-Side Liquidity (Liquidity Hunt) indicators are an important tool for understanding market maker manipulations and analyzing price movements in high-volume areas. This indicator from LuxAlgo allows users to better evaluate the market’s liquidity flow. However, we have made some strategic improvements and additions to further enhance the functionality of this powerful tool.
---
Features We Added to the Indicator
1. Liquidity Threshold and Analysis by Time Frames
The user can analyze liquidity movements in different time frames by determining short, medium and long-term periods.
Thanks to the Liquidity Threshold (%) parameter, long (buy) and short (sell) levels are determined according to price change rates.
Volume threshold controls are applied for each period and only high volume movements are taken into account.
2. Detection of Long and Short Liquidity Zones
Buy-Side (Long) Liquidity Zones: Long entry levels below the price are determined and reaction signals are created when the price reaches this level.
Sell-Side (Short) Liquidity Zones: Short entry levels above the price are determined and the levels are visualized on the chart.
These zones are used to detect market maker manipulations in places where liquidity traps may occur.
3. Coloring of High Volume Candles
With volume analysis, high volume candles are marked with different colors to observe the dynamics of price movements more clearly.
For example, candles exceeding volume threshold levels are highlighted with distinct colors such as white, yellow or blue.
4. Analysis of Wick and Volume-Based Long/Short Traps
Long trap and short trap traps are detected based on the length ratios of candle shadows (wick), ATR (Average True Range) and volume change.
These traps are clearly marked on the chart and supported by market psychology signals such as FOMO (fear of missing out) and Panic to the user.
5. Proximity to Liquidity Zones and Alarm Systems
We have added an algorithm that measures how close the price is to the specified liquidity zones. In this way:
Price movements that are less than 2% away from the upper liquidity zone are analyzed.
The same methodology is used for proximity to the middle liquidity zone and lower liquidity zone.
The user is warned when a long trap or short trap occurs with the alarm system.
---
FOMO and Panic Algorithm
These updates include additional parameters to analyze investor psychology:
FOMO (Fear of Missing Out):
A FOMO signal is generated when the RSI level is high, the price is near the upper or middle liquidity zones, and sudden price/volume increases are seen.
This signal allows the investor to avoid making unconscious purchases.
Panic:
A panic signal is triggered when the RSI level is low, the price is near the lower or middle liquidity zones, and sudden decreases are seen.
This is designed to prevent investors from selling hastily.
---
Benefits of the Developments
1. Prevention of Manipulations:
Price movements are analyzed according to liquidity zones, aiming to protect investors against market maker manipulations.
2. Stronger Strategy with Reaction Levels:
Visualization of long and short liquidity zones provides more reliable signals in trading strategies.
3. Understanding Psychological Barriers:
The impact of investor behavior on the market is better analyzed with FOMO and Panic signals.
4. Advanced Filtering Based on Volume and Volatility:
Volume and volatility analysis minimizes false signals.
---
Conclusion
With these updates, LuxAlgo’s original Buy-Side & Sell-Side Liquidity indicator has been made a more powerful tool. Users can make more informed trades by identifying important levels that market makers may target. Combining multiple variables such as volume, liquidity, RSI and psychological barriers, this system provides a more robust analysis, especially in the cryptocurrency market.
Predictive Ranges [LuxAlgo] with BTC/USDT.D AnalysisIn this article, we will take a detailed look at how to customize the LuxAlgo Predictive Ranges indicator used in TradingView, how to make it more useful, and how to integrate additional functions. This indicator is a powerful analysis tool used specifically to predict movements in the BTC/USDT pair and generate buy-sell signals.
1. What is LuxAlgo Predictive Ranges?
The Predictive Ranges indicator developed by LuxAlgo predicts potential buy and sell zones based on the averages and volatility of the price over a certain period of time. This shows how much the price can fluctuate within a certain range and which zones it can move towards. Ranges usually cover two main areas, the upper and lower limits, and provide information on how the price movement will shape between these limits.
2. Extra Features and Enhancements
The above Pine Script code builds on LuxAlgo’s core Predictive Ranges functionality and adds a few important enhancements:
2.1. Comparing BTC and USDT Dominance Ranges
While the original LuxAlgo indicator only works on a specific asset, this customized version also makes predictions on the BTC/USDT pair as well as the USDT market dominance (USDT.D). This way, it is possible to understand how BTC is positioned against the general market movements.
Checking if BTC is in the Upper and Lower Zones: Buy and sell signals are generated based on whether the price of BTC is in the upper or lower zones within certain ranges.
Checking if USDT.D is in the Upper and Lower Zones: Similarly, the market dominance of USDT is also analyzed using these ranges.
The comparison between these two assets allows for more reliable signals to be generated based on market conditions. For example, when the BTC price is in the lower range and USDT.D is in the upper range, this could signal a BTC buying opportunity.
2.2. Fibonacci Levels
Fibonacci levels are widely used to predict potential retracements or bounces in price action. In this indicator, various Fibonacci levels are calculated between the prR2 and prS2 levels. This provides additional guidance for traders on where the price could retrace or bounce.
Fibonacci Levels:
13% (Fib13)
23% (Fib23)
38% (Fib38)
61% (Fib61)
70% (Fib70)
79% (Fib79)
86% (Fib86)
100% (Fib100)
These Fibonacci levels are used to predict potential support and resistance levels in price action.
2.3. RSI and Volume Analysis
RSI (Relative Strength Index) is an oscillator widely used to determine whether the price is overbought or oversold. Another important feature of this indicator is that it can analyze the strength of price movements with the RSI Period and Volume Coefficient settings. Volume analysis in particular provides additional information on whether a movement is sustainable or not. If the volume exceeds the average volume, this usually indicates that the price movement is strong.
RSI values are also calculated in different time frames (15 minutes, 30 minutes, 1 hour, 4 hours, 1 day), helping traders understand short-term and long-term market forces. In addition, the upper and lower threshold values of the RSI are determined, allowing for more clear monitoring of overbought and oversold conditions.
2.4. Indicators and Alarm Conditions on the Chart
The following features have been added to the chart regarding RSI and trend strength:
Rising Strength: The RSI value and the general condition of the price create signals that the trend is rising.
Falling Strength: Similarly, when the RSI value is low and the price is moving down, signals indicating a bearish trend are generated.
Buy and sell signals are generated only when BTC and USDT.D are in opposite zones. This ensures more accurate and reliable signals.
3. Custom Customizations for Users
This indicator can be customized according to the different analysis needs of users:
Length and Factor: Length and Mult factors are used to adjust the sensitivity of the indicator. This is important for customizing the trading strategy.
Timeframe Options: Users can analyze BTC and USDT.D in different timeframes.
RSI and Volume Settings: RSI period, upper and lower thresholds, and volume coefficient can be set by the user.
4. Alarm Conditions
Users can set the following alarm conditions to receive an alarm when certain conditions occur:
Buy Alarm: Triggered when BTC is in the buy zone and USDT.D is in the sell zone.
Sell Alert: Triggered when BTC is in the sell zone and USDT.D is in the buy zone.
Trend Strength Alerts: Rising or falling strength alerts with RSI value and volume.
Conclusion
LuxAlgo's Predictive Ranges indicator is a great way to predict market movements
Price Action BoxGeneral Purpose:
This indicator determines the swing high and swing low levels in a given period and draws supply and demand zones based on these levels. It also adds BOS (Break of Structure) signals in case these zones are broken.
Code Detailing:
1. Settings and User Inputs:
Swing High/Low Length: The period used to determine the swing high and low levels. This can be set by the user.
History To Keep: Specifies the number of supply and demand zones in the past in the indicator.
Supply/Demand Box Width: The width of the supply and demand boxes, i.e. how much width will be left according to the ATR (Average True Range).
Visual Settings: Settings for colors and labels to customize the indicator.
2. Functions:
f_array_add_pop: Adds a new value and removes the oldest value from the array. This function is used to store a certain number of data.
f_sh_sl_labels: Adds labels to swing highs and lows. These labels are labels that indicate price action, such as "HH", "HL", "LH", "LL".
f_check_overlapping: Before drawing a new demand or supply zone, it checks if it overlaps with existing zones. If there is an overlap, a new zone is not drawn.
f_supply_demand: Draws supply and demand zones. This function determines the upper and lower limits of the supply and demand levels and draws a box.
f_sd_to_bos: If the supply or demand zone is broken, it changes the zone to "BOS" (Break of Structure).
f_extend_box_endpoint: Updates the existing supply and demand boxes, extending their right borders to the next bar index.
3. Calculations:
ATR (Average True Range): Used to measure price volatility. This is the value used as the basis for determining the size of supply and demand boxes.
Swing High and Swing Low: Swing highs and lows are calculated using the highest and lowest prices over a given period.
Box Array and POI (Point of Interest): A collection of drawn supply and demand boxes and the levels of interest found within these boxes.
4. Main Calculations and Actions:
New Swing High or Swing Low Formation: If a new swing high or low is formed, these levels are recorded and demand or supply zones are drawn.
Break of Structure (BOS): If price breaks the supply or demand zone, it marks the zone as "BOS".
Extension of Boxes: Supply and demand boxes are continuously extended according to the current bar index.
Visual Features:
Supply and Demand Zones: Supply zones are drawn in red and demand zones in green. A border color is also specified around the zones.
POI Labels: A POI (Point of Interest) label is displayed in the middle of each supply and demand zone.
BOS Labels: BOS label is added above broken supply or demand zones.
Customization with User Inputs:
Show Price Action Labels: An option to set the visibility of price action labels. These labels indicate swing highs and lows.
Different Color and Size Options: Colors for supply and demand zones and colors for POI labels can be customized by the user.
Conclusion:
This Pine Script™ provides a comprehensive tool to monitor supply and demand zones in the market, identify important price levels and analyze price movements in these zones. Based on classic price action methods, it detects supply and demand zones as well as breakouts of these zones.
Supply & Demand Zone AnalyzerTradingView Publication Article: "Supply & Demand Zone Analyzer"
Title:
"Supply & Demand Zone Analyzer: Master Support and Resistance with Precision"
Introduction:
Support and resistance zones are the cornerstone of technical analysis in trading. These zones help identify where price movements may pause or reverse. The Supply & Demand Zone Analyzer is a powerful indicator designed to dynamically detect these critical areas while offering insights into potential breakouts.
In this article, we'll explore how the indicator works, its features, and how to make the most of it.
Features:
Dynamic Support and Resistance Zones:
Automatically plots supply (resistance) and demand (support) zones based on swing highs and swing lows.
Visually highlights these zones directly on your chart.
Breakout Detection:
Identifies when price breaks above a resistance zone or below a support zone.
Displays "Broken Supply" or "Broken Demand" labels for clear recognition.
Customizable Colors and Labels:
Adjust the colors of support, resistance, broken zones, and labels to match your charting style.
Add descriptive text inside the zones.
Proximity Filtering:
Prevents overlapping or closely spaced zones for a cleaner, more interpretable chart.
Fixed Text Size:
Labels inside zones maintain a consistent size, unaffected by chart zooming.
How to Use:
Add the Indicator to Your Chart:
Search for "Supply & Demand Zone Analyzer" on TradingView.
Click "Add to Chart" to enable the indicator.
Adjust Parameters:
Swing Length: Sets the number of candles used to define swing highs and lows.
ATR Period: Configures the period for ATR-based zone width calculation.
Minimum Distance: Defines the minimum distance between zones to avoid overlapping.
Show Broken Zones: Choose whether to display or hide broken support and resistance zones.
Customize Colors:
Modify the default colors for supply, demand, and broken zones in the settings.
Technical Details:
Written in Pine Script, TradingView's proprietary scripting language.
Uses ATR (Average True Range) for dynamic zone width calculation.
Automatically extends zones until they are invalidated by a breakout or removed by proximity filtering.
Who Should Use This?
Beginner Traders:
Learn and visualize critical support and resistance areas easily.
Experienced Traders:
Gain deeper insights with breakout detection and advanced filtering.
Swing and Scalping Traders:
Quickly identify high-probability reversal or breakout zones for short- and medium-term trading.
Example Chart:
(Attach a screenshot of the indicator applied to a chart.)
Conclusion:
The Supply & Demand Zone Analyzer takes the guesswork out of identifying support and resistance. With its user-friendly interface, customizable options, and breakout detection, this indicator is perfect for traders of all experience levels.
Try it out today via our TradingView page and share your feedback or suggestions. Let's master the markets together!
Extra Tips for Publication:
Include backtest results or strategy examples to showcase the indicator's utility.
Highlight practical use cases, like combining the zones with other indicators (e.g., RSI or volume).
Market Structure Break with Retest (Multi-timeframe)Introduction
Analyzing market structure breakouts (MSB) is extremely important, especially for determining trend reversal points. This Pine Script™ detects MSB points in a given time frame and visualizes potential retest zones. It also creates boxes and labels to support buy-sell decisions in these zones.
This script aims to simplify the market analysis process for both beginners and advanced users.
---
Features
1. Timeframe Selection: The user can specify the timeframe he/she wants to analyze.
2. Highs and Lows: Dynamically calculates the highest and lowest prices in the specified time frame.
3. Market Structure Breakout (MSB):
"Bullish Break" when the price exceeds the previous high.
"Bearish Break" when the price falls below the previous low.
4. Retest Zones: Checks whether the price has returned to these levels after the MSB and labels these areas.
5. Visualization:
Draws boxes for breakout zones.
Marks retest points with dynamic labels.
6. Customizability: The user can customize the colors of the boxes, line thickness and analysis period.
---
Areas of Use
Support and Resistance Detection: Ideal for analyzing how the price moves in important support and resistance zones.
Capturing Trend Reversals: Can be used to detect the starting points of uptrends and downtrends.
Retest Strategies: Supports trading decisions by observing the price return to these levels after the breakout.
---
Code Logic
1. Highest and Lowest Prices in Timeframe:
Calculates the highest and lowest prices in the specified timeframe according to the length parameter.
2. Breakout Detection:
Check if the price has broken past the previous high or low.
3. Box and Labels:
Boxes are dynamically created after the breakout.
Labels appear in the retest zones:
4. Customization: User can easily adjust box colors, line thickness and analysis period:
Customize the analysis period and colors according to your own trading strategy.
---
Conclusion
This script helps you optimize your trading strategies by visualizing market structure breakouts and retest zones. It offers a powerful analysis tool with dynamic structure and customizable settings suitable for timeframes.
Start using this tool now to develop new strategies in TradingView and make more informed trading decisions!