TraderForge - Genesis Daily ATR Opening RangeClean, current-day ATR projection only.
Genesis Daily ATR Opening Range draws today’s Open ± ATR as two flat, full-session lines using a dynamic line.new() logic. No historical overlays, just a sharp, focused volatility envelope for intraday setups, PCS/CCS planning, and scalp zones.
TraderForge – Simple indicators. Powerful results.
Indicateurs et stratégies
TraderForge - Everest Auto Top & BottomEverest is a price action tool designed to help traders instantly spot market structure by automatically plotting swing highs and lows. It detects key reversal points using built-in pivot logic and visually marks each top and bottom on your chart with clean labels and connecting lines.
Customizable sensitivity lets you fine-tune the indicator to match any timeframe or asset. Clean visual markers and dashed swing connectors help you quickly recognize market direction and key reversal zones.
Everest works across all assets — from SPX and futures to crypto and stocks — making it a versatile companion for intraday scalpers or swing traders alike.
Whether you’re tracking higher highs and lower lows or identifying fresh support and resistance, Everest keeps your structure clear and your chart clean.
TraderForge – Simple indicators. Powerful results.
Santo Graal SMC-FVGReading Structures (BOS & CHoCH)
BOS (Break of Structure): shows the trend is still rolling.
BOS up → bullish trend.
BOS down → bearish trend.
CHoCH (Change of Character): heads‑up for a possible flip.
CHoCH up → start of an uptrend.
CHoCH down → start of a downtrend.
Playing with FVG (Fair Value Gaps)
The tool auto‑marks the fair value gaps for you.
Entry: when price comes back to fill/mitigate the gap.
Confirmation: if the gap holds, it backs up the trend direction.
Pro tip: when the bands stick tight (purple), buckle up — a big move is about to pop.
ART Customizable Overbought Oversold indicatorThis toolkit will help you identify RSI levels on either extremes, you can customize them.
P6●智能资金概念交易系统//@version=5
indicator("P6●智能资金概念交易系统", overlay=true, max_boxes_count = 500, max_labels_count = 500)
// === 参数分类标题 ===
// --------------------------
// 1. 基础指标设置
// --------------------------
// 2. 范围过滤器 设置
// --------------------------
// 3. ADX 趋势过滤器 设置
// --------------------------
// 4. 趋势线 设置
// --------------------------
// 5. 支撑与阻力 设置
// --------------------------
// 6. PMA 设置
// --------------------------
// 7. 交易信息表格 设置
// --------------------------
// 8. 顶部规避 设置
// --------------------------
// 9. 底部规避 设置
// --------------------------
// 10. RSI 动量指标 设置
// --------------------------
// 11. 多时间框架 设置
// --------------------------
// === 显示/隐藏选项 ===
showRangeFilter = input.bool(true, title="显示 范围过滤器", group="1. 基础指标设置")
showADXFilter = input.bool(true, title="启用 ADX 趋势过滤器", group="1. 基础指标设置")
showTrendLines = input.bool(false, title="显示 趋势线", group="1. 基础指标设置")
showSupRes = input.bool(true, title="显示 支撑与阻力", group="1. 基础指标设置")
showPMA = input.bool(true, title="显示 多周期移动平均线", group="1. 基础指标设置")
showTable = input.bool(true, title="显示 交易信息表格", group="1. 基础指标设置")
showTopAvoidance = input.bool(false, title="启用 顶部规避系统", group="1. 基础指标设置")
showBottomAvoidance = input.bool(false, title="启用 底部规避系统", group="1. 基础指标设置")
showRSI = input.bool(false, title="启用 RSI 动量指标", group="1. 基础指标设置")
showMTF = input.bool(true, title="启用 多时间框架分析", group="1. 基础指标设置")
// === RSI 动量指标 设置 ===
rsiLength = input.int(14, title="RSI 周期", minval=1, group="10. RSI 动量指标 设置")
rsiOverbought = input.float(70.0, title="超买阈值", minval=50, maxval=90, step=1, group="10. RSI 动量指标 设置")
rsiOversold = input.float(30.0, title="超卖阈值", minval=10, maxval=50, step=1, group="10. RSI 动量指标 设置")
rsiNeutralUpper = input.float(60.0, title="中性区间上沿", minval=50, maxval=70, step=1, group="10. RSI 动量指标 设置")
rsiNeutralLower = input.float(40.0, title="中性区间下沿", minval=30, maxval=50, step=1, group="10. RSI 动量指标 设置")
// === 多时间框架设置 ===
mtfEnable1m = input.bool(true, title="启用 1分钟", group="11. 多时间框架 设置")
mtfEnable5m = input.bool(true, title="启用 5分钟", group="11. 多时间框架 设置")
mtfEnable15m = input.bool(true, title="启用 15分钟", group="11. 多时间框架 设置")
mtfEnable1h = input.bool(true, title="启用 1小时", group="11. 多时间框架 设置")
mtfEnable4h = input.bool(true, title="启用 4小时", group="11. 多时间框架 设置")
// === RSI 计算与状态判断 ===
rsiValue = ta.rsi(close, rsiLength)
rsiPrevious = ta.rsi(close , rsiLength)
// RSI 动量状态判断
getRSIStatus() =>
status = "动量中性"
// 动量回落条件:RSI从高位下降或处于下降趋势
fallCondition1 = rsiValue < rsiPrevious and rsiValue > rsiNeutralUpper
fallCondition2 = rsiValue >= rsiOverbought and rsiValue < rsiPrevious
fallCondition3 = rsiPrevious >= rsiOverbought and rsiValue < rsiOverbought and rsiValue < rsiPrevious
if fallCondition1 or fallCondition2 or fallCondition3
status := "动量回落"
// 动量回升条件:RSI从低位上升或处于上升趋势
riseCondition1 = rsiValue > rsiPrevious and rsiValue < rsiNeutralLower
riseCondition2 = rsiValue <= rsiOversold and rsiValue > rsiPrevious
riseCondition3 = rsiPrevious <= rsiOversold and rsiValue > rsiOversold and rsiValue > rsiPrevious
if riseCondition1 or riseCondition2 or riseCondition3
status := "动量回升"
// 动量中性条件:RSI在中性区间或无明确趋势
if rsiValue >= rsiNeutralLower and rsiValue <= rsiNeutralUpper
status := "动量中性"
status
rsiStatus = getRSIStatus()
// RSI 信号与其他指标结合
rsiSupportsBuy = rsiStatus == "动量回升" or (rsiValue <= rsiOversold and rsiValue > rsiPrevious)
rsiSupportssell = rsiStatus == "动量回落" or (rsiValue >= rsiOverbought and rsiValue < rsiPrevious)
// === 多时间框架数据获取 ===
// 简化的多时间框架趋势计算
calcSimpleTrend(src) =>
ema21 = ta.ema(src, 21)
ema50 = ta.ema(src, 50)
trend = src > ema21 and ema21 > ema50 ? 1 : src < ema21 and ema21 < ema50 ? -1 : 0
trend
// 获取各时间框架的趋势数据
trend1m = showMTF and mtfEnable1m ? request.security(syminfo.tickerid, "1", calcSimpleTrend(close)) : 0
trend5m = showMTF and mtfEnable5m ? request.security(syminfo.tickerid, "5", calcSimpleTrend(close)) : 0
trend15m = showMTF and mtfEnable15m ? request.security(syminfo.tickerid, "15", calcSimpleTrend(close)) : 0
trend1h = showMTF and mtfEnable1h ? request.security(syminfo.tickerid, "60", calcSimpleTrend(close)) : 0
trend4h = showMTF and mtfEnable4h ? request.security(syminfo.tickerid, "240", calcSimpleTrend(close)) : 0
// === 多时间框架趋势判断函数 ===
getTrendDirection(trend) =>
if trend > 0
"多头倾向"
else if trend < 0
"空头倾向"
else
"震荡"
// 获取各时间框架趋势方向
trend1mDir = getTrendDirection(trend1m)
trend5mDir = getTrendDirection(trend5m)
trend15mDir = getTrendDirection(trend15m)
trend1hDir = getTrendDirection(trend1h)
trend4hDir = getTrendDirection(trend4h)
// === 顶部规避系统 ===
ma_period_top = input.int(10, 'MA Period (Length)', group='8. 顶部规避 设置')
topThreshold = input.int(85, 'VAR顶部阈值', minval=70, maxval=95, step=1, group='8. 顶部规避 设置')
// 计算VAR指标 - 顶部(检测上涨动能)
pre_price_top = close
VAR_top = ta.sma(math.max(close-pre_price_top,0), ma_period_top) / ta.sma(math.abs(close-pre_price_top), ma_period_top) * 100
// 顶部信号 - 当上涨动能达到高位时
isTop = VAR_top > topThreshold and VAR_top <= topThreshold
// 图表显示顶部标记
plotshape(series=showTopAvoidance and isTop, title="顶", style=shape.labeldown, location=location.abovebar,
color=color.new(color.purple, 0), textcolor=color.white, size=size.normal, text="顶")
// === 底部规避系统 ===
ma_period_bottom = input.int(14, 'MA Period (Length)', group='9. 底部规避 设置')
bottomThreshold = input.int(15, 'VAR底部阈值', minval=5, maxval=30, step=1, group='9. 底部规避 设置')
// 计算VAR指标 - 底部(检测下跌动能)
pre_price_bottom = close
VAR_bottom = ta.sma(math.max(pre_price_bottom-close,0), ma_period_bottom) / ta.sma(math.abs(close-pre_price_bottom), ma_period_bottom) * 100
// 底部信号 - 当下跌动能达到高位时
isBottom = VAR_bottom > bottomThreshold and VAR_bottom <= bottomThreshold
// 图表显示底部标记
plotshape(series=showBottomAvoidance and isBottom, title="底", style=shape.labelup, location=location.belowbar,
color=color.new(color.orange, 0), textcolor=color.white, size=size.normal, text="底")
// === 范围过滤器 部分 ===
upColor = color.white
midColor = #90bff9
downColor = color.blue
src = input(defval=close, title="数据源", group="2. 范围过滤器 设置")
per = input.int(defval=100, minval=1, title="采样周期", group="2. 范围过滤器 设置")
mult = input.float(defval=3.0, minval=0.1, title="区间倍数", group="2. 范围过滤器 设置")
smoothrng(x, t, m) =>
wper = t * 2 - 1
avrng = ta.ema(math.abs(x - x ), t)
smoothrng = ta.ema(avrng, wper) * m
smoothrng
smrng = smoothrng(src, per, mult)
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
rngfilt
filt = rngfilt(src, smrng)
upward = 0.0
upward := filt > filt ? nz(upward ) + 1 : filt < filt ? 0 : nz(upward )
downward = 0.0
downward := filt < filt ? nz(downward ) + 1 : filt > filt ? 0 : nz(downward )
hband = filt + smrng
lband = filt - smrng
filtcolor = upward > 0 ? upColor : downward > 0 ? downColor : midColor
barcolor_ = src > filt and src > src and upward > 0 ? upColor :
src > filt and src < src and upward > 0 ? upColor :
src < filt and src < src and downward > 0 ? downColor :
src < filt and src > src and downward > 0 ? downColor : midColor
longCond = bool(na)
shortCond = bool(na)
longCond := src > filt and src > src and upward > 0 or
src > filt and src < src and upward > 0
shortCond := src < filt and src < src and downward > 0 or
src < filt and src > src and downward > 0
CondIni = 0
CondIni := longCond ? 1 : shortCond ? -1 : CondIni
// === ADX 趋势过滤器 部分 ===
adxLength = input.int(defval=14, minval=1, title="ADX 周期", group="3. ADX 趋势过滤器 设置")
adxThreshold = input.float(defval=25.0, minval=0, maxval=100, step=0.5, title="ADX 阈值", tooltip="ADX大于此值才允许交易信号", group="3. ADX 趋势过滤器 设置")
// 简化的ADX计算 - 更准确的方法
calcADX(len) =>
up = ta.change(high)
down = -ta.change(low)
plusDM = na(up) ? na : (up > down and up > 0 ? up : 0)
minusDM = na(down) ? na : (down > up and down > 0 ? down : 0)
truerange = ta.rma(ta.tr, len)
plus = fixnan(100 * ta.rma(plusDM, len) / truerange)
minus = fixnan(100 * ta.rma(minusDM, len) / truerange)
sum = plus + minus
adx = 100 * ta.rma(math.abs(plus - minus) / (sum == 0 ? 1 : sum), len)
= calcADX(adxLength)
// ADX状态判断
adxStrong = adxValue >= adxThreshold
adxTrendUp = diPlus > diMinus
adxTrendDown = diMinus > diPlus
// 修改信号生成逻辑,加入顶部和底部规避以及RSI确认
longCondition = longCond and CondIni == -1 and (not showADXFilter or adxStrong) and (not showTopAvoidance or not isTop) and (not showRSI or rsiSupportsBuy)
shortCondition = shortCond and CondIni == 1 and (not showADXFilter or adxStrong) and (not showBottomAvoidance or not isBottom) and (not showRSI or rsiSupportssell)
// === 记录买卖信号价格 ===
var float entryPrice = na
var string entryType = na
var float entryTime = na
// 当出现买入信号时记录
if longCondition
entryPrice := close
entryType := "多单"
entryTime := time
// 当出现卖出信号时记录
if shortCondition
entryPrice := close
entryType := "空单"
entryTime := time
// === 趋势颜色逻辑 ===
var trendColor = color.gray
if longCondition
trendColor := color.green
else if shortCondition
trendColor := color.red
// ADX线绘制(可选)- 已隐藏显示
adxColor = adxStrong ? (adxTrendUp ? color.green : color.red) : color.gray
// plot(showADXLine and showADXFilter ? adxValue : na, title="平均方向指数", color=adxColor, linewidth=1)
// hline(showADXLine and showADXFilter ? adxThreshold : na, title="ADX阈值线", color=color.yellow, linestyle=hline.style_dashed)
// 绘图部分 - 已隐藏线条显示,保留功能
// filtplot = plot(showRangeFilter ? filt : na, color=trendColor, linewidth=2, title="区间过滤器")
// hbandplot = plot(showRangeFilter ? hband : na, color=color.new(trendColor, 30), title="上轨线", linewidth=1)
// lbandplot = plot(showRangeFilter ? lband : na, color=color.new(trendColor, 30), title="下轨线", linewidth=1)
// barcolor(na) - 已隐藏K线颜色
plotshape(showRangeFilter and longCondition, title="买入信号", text="买", textcolor=color.white, style=shape.labelup, size=size.small, location=location.belowbar, color=color.new(color.green, 20))
plotshape(showRangeFilter and shortCondition, title="卖出信号", text="卖", textcolor=color.white, style=shape.labeldown, size=size.small, location=location.abovebar, color=color.new(color.red, 20))
// === 趋势线 部分 ===
length_tl = input.int(14, '分型回溯长度', group="4. 趋势线 设置")
mult_tl = input.float(1., '斜率系数', minval = 0, step = .1, group="4. 趋势线 设置")
calcMethod = input.string('平均真实波幅', '斜率计算方法', options = , group="4. 趋势线 设置")
backpaint = input(true, tooltip = '回溯显示:将可视元素向历史偏移,禁用后可查看实时信号。', group="4. 趋势线 设置")
upCss = input.color(color.teal, '上升趋势线颜色', group = "4. 趋势线 设置")
dnCss = input.color(color.red, '下降趋势线颜色', group = "4. 趋势线 设置")
showExt = input(true, '显示延长线', group="4. 趋势线 设置")
var upper_tl = 0.
var lower_tl = 0.
var slope_ph_tl = 0.
var slope_pl_tl = 0.
var offset_tl = backpaint ? length_tl : 0
n = bar_index
src_tl = close
ph = ta.pivothigh(length_tl, length_tl)
pl = ta.pivotlow(length_tl, length_tl)
slope = switch calcMethod
'平均真实波幅' => ta.atr(length_tl) / length_tl * mult_tl
'标准差' => ta.stdev(src_tl, length_tl) / length_tl * mult_tl
'线性回归' => math.abs(ta.sma(src_tl * n, length_tl) - ta.sma(src_tl, length_tl) * ta.sma(n, length_tl)) / ta.variance(n, length_tl) / 2 * mult_tl
slope_ph_tl := ph ? slope : slope_ph_tl
slope_pl_tl := pl ? slope : slope_pl_tl
upper_tl := ph ? ph : upper_tl - slope_ph_tl
lower_tl := pl ? pl : lower_tl + slope_pl_tl
var upos = 0
var dnos = 0
upos := ph ? 0 : close > upper_tl - slope_ph_tl * length_tl ? 1 : upos
dnos := pl ? 0 : close < lower_tl + slope_pl_tl * length_tl ? 1 : dnos
var uptl = line.new(na,na,na,na, color = upCss, style = line.style_dashed, extend = extend.right)
var dntl = line.new(na,na,na,na, color = dnCss, style = line.style_dashed, extend = extend.right)
if ph and showExt and showTrendLines
line.set_xy1(uptl, n-offset_tl, backpaint ? ph : upper_tl - slope_ph_tl * length_tl)
line.set_xy2(uptl, n-offset_tl+1, backpaint ? ph - slope : upper_tl - slope_ph_tl * (length_tl+1))
if pl and showExt and showTrendLines
line.set_xy1(dntl, n-offset_tl, backpaint ? pl : lower_tl + slope_pl_tl * length_tl)
line.set_xy2(dntl, n-offset_tl+1, backpaint ? pl + slope : lower_tl + slope_pl_tl * (length_tl+1))
plot(showTrendLines ? (backpaint ? upper_tl : upper_tl - slope_ph_tl * length_tl) : na, '上升趋势线', color = ph ? na : upCss, offset = -offset_tl)
plot(showTrendLines ? (backpaint ? lower_tl : lower_tl + slope_pl_tl * length_tl) : na, '下降趋势线', color = pl ? na : dnCss, offset = -offset_tl)
// 趋势线突破也需要ADX确认,并加入顶部和底部规避以及RSI确认
trendLineBuySignal = showTrendLines and upos > upos and (not showADXFilter or adxStrong) and (not showTopAvoidance or not isTop) and (not showRSI or rsiSupportsBuy)
trendLineSellSignal = showTrendLines and dnos > dnos and (not showADXFilter or adxStrong) and (not showBottomAvoidance or not isBottom) and (not showRSI or rsiSupportssell)
plotshape(trendLineBuySignal ? low : na, "上轨突破"
, shape.labelup
, location.absolute
, upCss
, text = "突"
, textcolor = color.white
, size = size.tiny)
plotshape(trendLineSellSignal ? high : na, "下轨突破"
, shape.labeldown
, location.absolute
, dnCss
, text = "突"
, textcolor = color.white
, size = size.tiny)
alertcondition(trendLineBuySignal, '上轨突破', '价格向上突破下趋势线')
alertcondition(trendLineSellSignal, '下轨突破', '价格向下突破上趋势线')
// === 支撑与阻力 部分 ===
g_sr = '5. 支撑与阻力'
g_c = '条件'
g_st = '样式'
t_r = 'K线确认:仅在K线收盘时生成警报(延后1根K线)。 高点与低点:默认情况下,突破/回踩系统使用当前收盘价判断,选择高点与低点后将使用高低点判断条件,不再重绘,结果会不同。'
t_rv = '每当检测到潜在回踩时,指标会判断回踩事件即将发生。此输入用于设置在潜在回踩激活时,最大允许检测多少根K线。 例如,出现潜在回踩标签时,该标签允许存在多少根K线以确认回踩?此功能防止回踩警报在10根K线后才触发导致不准确。'
input_lookback = input.int(defval = 20, title = '回溯区间', minval = 1, tooltip = '检测分型事件的K线数量。', group = g_sr)
input_retSince = input.int(defval = 2, title = '突破后K线数', minval = 1, tooltip = '突破后多少根K线内检测回踩。', group = g_sr)
input_retValid = input.int(defval = 2, title = '回踩检测限制', minval = 1, tooltip = t_rv, group = g_sr)
input_breakout = input.bool(defval = true, title = '显示突破', group = g_c)
input_retest = input.bool(defval = true, title = '显示回踩', group = g_c)
input_repType = input.string(defval = '开启', title = '重绘模式', options = , tooltip = t_r, group = g_c)
input_outL = input.string(defval = line.style_dotted, title = '边框样式', group = g_st, options = )
input_extend = input.string(defval = extend.none, title = '延长方向', group = g_st, options = )
input_labelType = input.string(defval = '详细', title = '标签类型', options = , group = g_st)
input_labelSize = input.string(defval = size.small, title = '标签大小', options = , group = g_st)
st_break_lb_co1 = input.color(defval = color.lime , title = '空头突破标签颜色' ,inline = 'st_break_lb_co', group = g_st)
st_break_lb_co2 = input.color(defval = color.new(color.lime,40) , title = '' ,inline = 'st_break_lb_co', group = g_st)
lg_break_lb_co1 = input.color(defval = color.red , title = '多头突破标签颜色' ,inline = 'lg_break_lb_co', group = g_st)
lg_break_lb_co2 = input.color(defval = color.new(color.red,40) , title = '' ,inline = 'lg_break_lb_co', group = g_st)
st_retest_lb_co1 = input.color(defval = color.lime , title = '空头回踩标签颜色' ,inline = 'st_retest_lb_col', group = g_st)
st_retest_lb_co2 = input.color(defval = color.new(color.lime,40) , title = '' ,inline = 'st_retest_lb_col', group = g_st)
lg_retest_lb_co1 = input.color(defval = color.red , title = '多头回踩标签颜色' ,inline = 'lg_retest_lb_co', group = g_st)
lg_retest_lb_co2 = input.color(defval = color.new(color.red,40) , title = '' ,inline = 'lg_retest_lb_co', group = g_st)
input_plColor1 = input.color(defval = color.lime, title = '支撑方框颜色', inline = 'pl_Color', group = g_st)
input_plColor2 = input.color(defval = color.new(color.lime,85), title = '', inline = 'pl_Color', group = g_st)
input_phColor1 = input.color(defval = color.red, title = '阻力方框颜色', inline = 'ph_Color', group = g_st)
input_phColor2 = input.color(defval = color.new(color.red,85), title = '', inline = 'ph_Color', group = g_st)
input_override = input.bool(defval = false, title = '自定义文字颜色', inline = '覆盖', group = g_st)
input_textColor = input.color(defval = color.white, title = '', inline = '覆盖', group = g_st)
bb = input_lookback
// 兼容label与英文选项
rTon = input_repType == '开启'
rTcc = input_repType == '关闭:K线确认'
rThv = input_repType == '关闭:高低点'
breakText = input_labelType == '简洁' ? '突' : '突破'
// 分型
rs_pl = fixnan(ta.pivotlow(low, bb, bb))
rs_ph = fixnan(ta.pivothigh(high, bb, bb))
// Box 高度
s_yLoc = low > low ? low : low
r_yLoc = high > high ? high : high
//-----------------------------------------------------------------------------
// 函数
//-----------------------------------------------------------------------------
drawBox(condition, y1, y2, color,bgcolor) =>
var box drawBox = na
if condition and showSupRes // 仅在显示开关打开时绘制
box.set_right(drawBox, bar_index - bb)
drawBox.set_extend(extend.none)
drawBox := box.new(bar_index - bb, y1, bar_index, y2, color, bgcolor = bgcolor, border_style = input_outL, extend = input_extend)
updateBox(box) =>
if barstate.isconfirmed and showSupRes
box.set_right(box, bar_index + 5)
breakLabel(y, txt_col,lb_col, style, textform) =>
if showSupRes
label.new(bar_index, y, textform, textcolor = input_override ? input_textColor : txt_col, style = style, color = lb_col, size = input_labelSize)
retestCondition(breakout, condition) =>
ta.barssince(na(breakout)) > input_retSince and condition
repaint(c1, c2, c3) => rTon ? c1 : rThv ? c2 : rTcc ? c3 : na
//-----------------------------------------------------------------------------
// 绘制与更新区间
//-----------------------------------------------------------------------------
= drawBox(ta.change(rs_pl), s_yLoc, rs_pl, input_plColor1,input_plColor2)
= drawBox(ta.change(rs_ph), rs_ph, r_yLoc, input_phColor1,input_phColor2)
sTop = box.get_top(sBox), rTop = box.get_top(rBox)
sBot = box.get_bottom(sBox), rBot = box.get_bottom(rBox)
if showSupRes
updateBox(sBox), updateBox(rBox)
//-----------------------------------------------------------------------------
// 突破事件 - 加入顶部和底部规避以及RSI确认
//-----------------------------------------------------------------------------
var bool sBreak = na
var bool rBreak = na
cu = repaint(ta.crossunder(close, box.get_bottom(sBox)), ta.crossunder(low, box.get_bottom(sBox)), ta.crossunder(close, box.get_bottom(sBox)) and barstate.isconfirmed)
co = repaint(ta.crossover(close, box.get_top(rBox)), ta.crossover(high, box.get_top(rBox)), ta.crossover(close, box.get_top(rBox)) and barstate.isconfirmed)
switch
cu and na(sBreak) and showSupRes and (not showADXFilter or adxStrong) and (not showBottomAvoidance or not isBottom) and (not showRSI or rsiSupportssell) =>
sBreak := true
if input_breakout
breakLabel(sBot, st_break_lb_co1,st_break_lb_co2, label.style_label_upper_right, breakText)
co and na(rBreak) and showSupRes and (not showADXFilter or adxStrong) and (not showTopAvoidance or not isTop) and (not showRSI or rsiSupportsBuy) =>
rBreak := true
if input_breakout
breakLabel(rTop, lg_break_lb_co1,lg_break_lb_co2, label.style_label_lower_right, breakText)
if ta.change(rs_pl) and showSupRes
if na(sBreak)
box.delete(sBox )
sBreak := na
if ta.change(rs_ph) and showSupRes
if na(rBreak)
box.delete(rBox )
rBreak := na
//-----------------------------------------------------------------------------
// 回踩事件
//-----------------------------------------------------------------------------
s1 = retestCondition(sBreak, high >= sTop and close <= sBot)
s2 = retestCondition(sBreak, high >= sTop and close >= sBot and close <= sTop)
s3 = retestCondition(sBreak, high >= sBot and high <= sTop)
s4 = retestCondition(sBreak, high >= sBot and high <= sTop and close < sBot)
r1 = retestCondition(rBreak, low <= rBot and close >= rTop)
r2 = retestCondition(rBreak, low <= rBot and close <= rTop and close >= rBot)
r3 = retestCondition(rBreak, low <= rTop and low >= rBot)
r4 = retestCondition(rBreak, low <= rTop and low >= rBot and close > rTop)
retestEvent(c1, c2, c3, c4, y1, y2, txt_col,lb_col, style, pType) =>
if input_retest and showSupRes
var bool retOccurred = na
retActive = c1 or c2 or c3 or c4
retEvent = retActive and not retActive
retValue = ta.valuewhen(retEvent, y1, 0)
if pType == 'ph' ? y2 < ta.valuewhen(retEvent, y2, 0) : y2 > ta.valuewhen(retEvent, y2, 0)
retEvent := retActive
retValue := ta.valuewhen(retEvent, y1, 0)
retSince = ta.barssince(retEvent)
var retLabel = array.new()
if retEvent
retOccurred := na
array.push(retLabel, label.new(bar_index - retSince, y2 , text = input_labelType == '简洁' ? '潜回' : '潜在回踩', color = lb_col, style = style, textcolor = input_override ? input_textColor : txt_col, size = input_labelSize))
if array.size(retLabel) == 2
label.delete(array.first(retLabel))
array.shift(retLabel)
retConditions = pType == 'ph' ? repaint(close >= retValue, high >= retValue, close >= retValue and barstate.isconfirmed) : repaint(close <= retValue, low <= retValue, close <= retValue and barstate.isconfirmed)
retValid = ta.barssince(retEvent) > 0 and ta.barssince(retEvent) <= input_retValid and retConditions and not retOccurred and (not showADXFilter or adxStrong) and (not showRSI or (pType == 'ph' ? rsiSupportsBuy : rsiSupportssell))
if retValid
label.new(bar_index - retSince, y2 , text = input_labelType == '简洁' ? '回' : '回踩', color = lb_col, style = style, textcolor = input_override ? input_textColor : txt_col, size = input_labelSize)
retOccurred := true
if retValid or ta.barssince(retEvent) > input_retValid
label.delete(array.first(retLabel))
if pType == 'ph' and ta.change(rs_ph) and retOccurred
box.set_right(rBox , bar_index - retSince)
retOccurred := na
if pType == 'pl' and ta.change(rs_pl) and retOccurred
box.set_right(sBox , bar_index - retSince)
retOccurred := na
else
= retestEvent(r1, r2, r3, r4, high, low, lg_retest_lb_co1,lg_retest_lb_co2, label.style_label_upper_left, 'ph')
= retestEvent(s1, s2, s3, s4, low, high, st_retest_lb_co1,st_retest_lb_co2, label.style_label_lower_left, 'pl')
//-----------------------------------------------------------------------------
// 警报
//-----------------------------------------------------------------------------
// 买卖信号警报条件
buySignal = showTrendLines and trendLineBuySignal
sellSignal = showTrendLines and trendLineSellSignal
// 添加买卖信号的警报条件
alertcondition(buySignal, title='买入信号', message='范围过滤器买入信号:上轨突破')
alertcondition(sellSignal, title='卖出信号', message='范围过滤器卖出信号:下轨突破')
alertcondition((showSupRes and ta.change(rs_pl)), '新支撑位')
alertcondition((showSupRes and ta.change(rs_ph)), '新阻力位')
alertcondition((showSupRes and ta.barssince(na(sBreak)) == 1), '支撑位突破')
alertcondition((showSupRes and ta.barssince(na(rBreak)) == 1), '阻力位突破')
alertcondition((showSupRes and sRetValid), '支撑位回踩')
alertcondition((showSupRes and sRetEvent), '潜在支撑回踩')
alertcondition((showSupRes and rRetValid), '阻力位回踩')
alertcondition((showSupRes and rRetEvent), '潜在阻力回踩')
AllAlerts(condition, message) =>
if condition and showSupRes
alert(message)
AllAlerts(ta.change(rs_pl), '新支撑位')
AllAlerts(ta.change(rs_ph), '新阻力位')
AllAlerts(ta.barssince(na(sBreak)) == 1, '支撑位突破')
AllAlerts(ta.barssince(na(rBreak)) == 1, '阻力位突破')
AllAlerts(sRetValid, '支撑位回踩')
AllAlerts(sRetEvent, '潜在支撑回踩')
AllAlerts(rRetValid, '阻力位回踩')
AllAlerts(rRetEvent, '潜在阻力回踩')
AllAlerts(buySignal, '买入信号:上轨突破')
AllAlerts(sellSignal, '卖出信号:下轨突破')
// === 多周期移动平均线 部分 ===
// === 公共函数 ===
strRoundValue(num) =>
strv = ''
if num >= 100000
strv := str.tostring(num/1000, '#千')
else if (num < 100000) and (num >= 100)
strv := str.tostring(num, '#')
else if (num < 100) and (num >= 1)
strv := str.tostring(num, '#.##')
else if (num < 1) and (num >= 0.01)
strv := str.tostring(num, '#.####')
else if (num < 0.01) and (num >= 0.0001)
strv := str.tostring(num, '#.######')
else if (num < 0.0001) and (num >= 0.000001)
strv := str.tostring(num, '#.########')
(strv)
defaultFunction(func, src, len, alma_offst, alma_sigma) =>
has_len = false
ma = ta.swma(close)
if func == '自适应移动平均'
ma := ta.alma(src, len, alma_offst, alma_sigma)
has_len := true
else if func == '指数移动平均'
ma := ta.ema(src, len)
has_len := true
else if func == '修正移动平均'
ma := ta.rma(src, len)
has_len := true
else if func == '简单移动平均'
ma := ta.sma(src, len)
has_len := true
else if func == '对称加权移动平均'
ma := ta.swma(src)
has_len := false
else if func == '成交量加权平均价'
ma := ta.vwap(src)
has_len := false
else if func == '成交量加权移动平均'
ma := ta.vwma(src, len)
has_len := true
else if func == '加权移动平均'
ma := ta.wma(src, len)
has_len := true
def_fn = input.string(title='默认移动平均线', defval='指数移动平均', options= , group="6. PMA 设置")
ma1_on = input.bool(inline='均线1', title='启用移动平均线1', defval=false, group="6. PMA 设置")
ma2_on = input.bool(inline='均线2', title='启用移动平均线2', defval=true, group="6. PMA 设置")
ma3_on = input.bool(inline='均线3', title='启用移动平均线3', defval=true, group="6. PMA 设置")
ma4_on = input.bool(inline='均线4', title='启用移动平均线4', defval=true, group="6. PMA 设置")
ma5_on = input.bool(inline='均线5', title='启用移动平均线5', defval=true, group="6. PMA 设置")
ma6_on = input.bool(inline='均线6', title='启用移动平均线6', defval=true, group="6. PMA 设置")
ma7_on = input.bool(inline='均线7', title='启用移动平均线7', defval=true, group="6. PMA 设置")
ma1_fn = input.string(inline='均线1', title='', defval='默认', options= , group="6. PMA 设置")
ma2_fn = input.string(inline='均线2', title='', defval='默认', options= , group="6. PMA 设置")
ma3_fn = input.string(inline='均线3', title='', defval='默认', options= , group="6. PMA 设置")
ma4_fn = input.string(inline='均线4', title='', defval='默认', options= , group="6. PMA 设置")
ma5_fn = input.string(inline='均线5', title='', defval='默认', options= , group="6. PMA 设置")
ma6_fn = input.string(inline='均线6', title='', defval='默认', options= , group="6. PMA 设置")
ma7_fn = input.string(inline='均线7', title='', defval='默认', options= , group="6. PMA 设置")
ma1_len = input.int(inline='均线1', title='', defval=12, minval=1, group="6. PMA 设置")
ma2_len = input.int(inline='均线2', title='', defval=144, minval=1, group="6. PMA 设置")
ma3_len = input.int(inline='均线3', title='', defval=169, minval=1, group="6. PMA 设置")
ma4_len = input.int(inline='均线4', title='', defval=288, minval=1, group="6. PMA 设置")
ma5_len = input.int(inline='均线5', title='', defval=338, minval=1, group="6. PMA 设置")
ma6_len = input.int(inline='均线6', title='', defval=576, minval=1, group="6. PMA 设置")
ma7_len = input.int(inline='均线7', title='', defval=676, minval=1, group="6. PMA 设置")
alma1_offst = input.float(group='均线1其他设置', inline='均线11', title='自适应偏移', defval=0.85, minval=-1, maxval=1, step=0.01)
alma1_sigma = input.float(group='均线1其他设置', inline='均线11', title=', 西格玛', defval=6, minval=0, maxval=100, step=0.01)
ma1_src = input.source(group='均线1其他设置', inline='均线12', title='数据源', defval=close)
ma1_plt_offst = input.int(group='均线1其他设置', inline='均线12', title=', 绘图偏移', defval=0, minval=-500, maxval=500)
alma2_offst = input.float(group='均线2其他设置', inline='均线21', title='自适应偏移', defval=0.85, minval=-1, maxval=1, step=0.01)
alma2_sigma = input.float(group='均线2其他设置', inline='均线21', title='西格玛', defval=6, minval=0, maxval=100, step=0.01)
ma2_src = input.source(group='均线2其他设置', inline='均线22', title='数据源', defval=close)
ma2_plt_offst = input.int(group='均线2其他设置', inline='均线22', title='绘图偏移', defval=0, minval=-500, maxval=500)
alma3_offst = input.float(group='均线3其他设置', inline='均线31', title='自适应偏移', defval=0.85, minval=-1, maxval=1, step=0.01)
alma3_sigma = input.float(group='均线3其他设置', inline='均线31', title='西格玛', defval=6, minval=0, maxval=100, step=0.01)
ma3_src = input.source(group='均线3其他设置', inline='均线32', title='数据源', defval=close)
ma3_plt_offst = input.int(group='均线3其他设置', inline='均线32', title='绘图偏移', defval=0, minval=-500, maxval=500)
alma4_offst = input.float(group='均线4其他设置', inline='均线41', title='自适应偏移', defval=0.85, minval=-1, maxval=1, step=0.01)
alma4_sigma = input.float(group='均线4其他设置', inline='均线41', title='西格玛', defval=6, minval=0, maxval=100, step=0.01)
ma4_src = input.source(group='均线4其他设置', inline='均线42', title='数据源', defval=close)
ma4_plt_offst = input.int(group='均线4其他设置', inline='均线42', title='绘图偏移', defval=0, minval=-500, maxval=500)
alma5_offst = input.float(group='均线5其他设置', inline='均线51', title='自适应偏移', defval=0.85, minval=-1, maxval=1, step=0.01)
alma5_sigma = input.float(group='均线5其他设置', inline='均线51', title='西格玛', defval=6, minval=0, maxval=100, step=0.01)
ma5_src = input.source(group='均线5其他设置', inline='均线52', title='数据源', defval=close)
ma5_plt_offst = input.int(group='均线5其他设置', inline='均线52', title='绘图偏移', defval=0, minval=-500, maxval=500)
alma6_offst = input.float(group='均线6其他设置', inline='均线61', title='自适应偏移', defval=0.85, minval=-1, maxval=1, step=0.01)
alma6_sigma = input.float(group='均线6其他设置', inline='均线61', title='西格玛', defval=6, minval=0, maxval=100, step=0.01)
ma6_src = input.source(group='均线6其他设置', inline='均线62', title='数据源', defval=close)
ma6_plt_offst = input.int(group='均线6其他设置', inline='均线62', title='绘图偏移', defval=0, minval=-500, maxval=500)
alma7_offst = input.float(group='均线7其他设置', inline='均线71', title='自适应偏移', defval=0.85, minval=-1, maxval=1, step=0.01)
alma7_sigma = input.float(group='均线7其他设置', inline='均线71', title='西格玛', defval=6, minval=0, maxval=100, step=0.01)
ma7_src = input.source(group='均线7其他设置', inline='均线72', title='数据源', defval=close)
ma7_plt_offst = input.int(group='均线7其他设置', inline='均线72', title='绘图偏移', defval=0, minval=-500, maxval=500)
fill_12_on = input.bool(title='启用均线1-2填充', defval=false, group="6. PMA 设置")
fill_23_on = input.bool(title='启用均线2-3填充', defval=true, group="6. PMA 设置")
fill_34_on = input.bool(title='启用均线3-4填充', defval=false, group="6. PMA 设置")
fill_45_on = input.bool(title='启用均线4-5填充', defval=true, group="6. PMA 设置")
fill_56_on = input.bool(title='启用均线5-6填充', defval=false, group="6. PMA 设置")
fill_67_on = input.bool(title='启用均线6-7填充', defval=true, group="6. PMA 设置")
// === 计算移动平均线 ===
= defaultFunction(def_fn, ma1_src, ma1_len, alma1_offst, alma1_sigma)
= defaultFunction(def_fn, ma2_src, ma2_len, alma2_offst, alma2_sigma)
= defaultFunction(def_fn, ma3_src, ma3_len, alma3_offst, alma3_sigma)
= defaultFunction(def_fn, ma4_src, ma4_len, alma4_offst, alma4_sigma)
= defaultFunction(def_fn, ma5_src, ma5_len, alma5_offst, alma5_sigma)
= defaultFunction(def_fn, ma6_src, ma6_len, alma6_offst, alma6_sigma)
= defaultFunction(def_fn, ma7_src, ma7_len, alma7_offst, alma7_sigma)
// === 均线类型切换 ===
if ma1_fn != '默认'
if ma1_fn == '自适应移动平均'
ma1 := ta.alma(ma1_src, ma1_len, alma1_offst, alma1_sigma)
ma1_has_len := true
else if ma1_fn == '指数移动平均'
ma1 := ta.ema(ma1_src, ma1_len)
ma1_has_len := true
else if ma1_fn == '修正移动平均'
ma1 := ta.rma(ma1_src, ma1_len)
ma1_has_len := true
else if ma1_fn == '简单移动平均'
ma1 := ta.sma(ma1_src, ma1_len)
ma1_has_len := true
else if ma1_fn == '对称加权移动平均'
ma1 := ta.swma(ma1_src)
ma1_has_len := false
else if ma1_fn == '成交量加权平均价'
ma1 := ta.vwap(ma1_src)
ma1_has_len := false
else if ma1_fn == '成交量加权移动平均'
ma1 := ta.vwma(ma1_src, ma1_len)
ma1_has_len := true
else if ma1_fn == '加权移动平均'
ma1 := ta.wma(ma1_src, ma1_len)
ma1_has_len := true
if ma2_fn != '默认'
if ma2_fn == '自适应移动平均'
ma2 := ta.alma(ma2_src, ma2_len, alma2_offst, alma2_sigma)
ma2_has_len := true
else if ma2_fn == '指数移动平均'
ma2 := ta.ema(ma2_src, ma2_len)
ma2_has_len := true
else if ma2_fn == '修正移动平均'
ma2 := ta.rma(ma2_src, ma2_len)
ma2_has_len := true
else if ma2_fn == '简单移动平均'
ma2 := ta.sma(ma2_src, ma2_len)
ma2_has_len := true
else if ma2_fn == '对称加权移动平均'
ma2 := ta.swma(ma2_src)
ma2_has_len := false
else if ma2_fn == '成交量加权平均价'
ma2 := ta.vwap(ma2_src)
ma2_has_len := false
else if ma2_fn == '成交量加权移动平均'
ma2 := ta.vwma(ma2_src, ma2_len)
ma2_has_len := true
else if ma2_fn == '加权移动平均'
ma2 := ta.wma(ma2_src, ma2_len)
ma2_has_len := true
if ma3_fn != '默认'
if ma3_fn == '自适应移动平均'
ma3 := ta.alma(ma3_src, ma3_len, alma3_offst, alma3_sigma)
ma3_has_len := true
else if ma3_fn == '指数移动平均'
ma3 := ta.ema(ma3_src, ma3_len)
ma3_has_len := true
else if ma3_fn == '修正移动平均'
ma3 := ta.rma(ma3_src, ma3_len)
ma3_has_len := true
else if ma3_fn == '简单移动平均'
ma3 := ta.sma(ma3_src, ma3_len)
ma3_has_len := true
else if ma3_fn == '对称加权移动平均'
ma3 := ta.swma(ma3_src)
ma3_has_len := false
else if ma3_fn == '成交量加权平均价'
ma3 := ta.vwap(ma3_src)
ma3_has_len := false
else if ma3_fn == '成交量加权移动平均'
ma3 := ta.vwma(ma3_src, ma3_len)
ma3_has_len := true
else if ma3_fn == '加权移动平均'
ma3 := ta.wma(ma3_src, ma3_len)
ma3_has_len := true
if ma4_fn != '默认'
if ma4_fn == '自适应移动平均'
ma4 := ta.alma(ma4_src, ma4_len, alma4_offst, alma4_sigma)
ma4_has_len := true
else if ma4_fn == '指数移动平均'
ma4 := ta.ema(ma4_src, ma4_len)
ma4_has_len := true
else if ma4_fn == '修正移动平均'
ma4 := ta.rma(ma4_src, ma4_len)
ma4_has_len := true
else if ma4_fn == '简单移动平均'
ma4 := ta.sma(ma4_src, ma4_len)
ma4_has_len := true
else if ma4_fn == '对称加权移动平均'
ma4 := ta.swma(ma4_src)
ma4_has_len := false
else if ma4_fn == '成交量加权平均价'
ma4 := ta.vwap(ma4_src)
ma4_has_len := false
else if ma4_fn == '成交量加权移动平均'
ma4 := ta.vwma(ma4_src, ma4_len)
ma4_has_len := true
else if ma4_fn == '加权移动平均'
ma4 := ta.wma(ma4_src, ma4_len)
ma4_has_len := true
if ma5_fn != '默认'
if ma5_fn == '自适应移动平均'
ma5 := ta.alma(ma5_src, ma5_len, alma5_offst, alma5_sigma)
ma5_has_len := true
else if ma5_fn == '指数移动平均'
ma5 := ta.ema(ma5_src, ma5_len)
ma5_has_len := true
else if ma5_fn == '修正移动平均'
ma5 := ta.rma(ma5_src, ma5_len)
ma5_has_len := true
else if ma5_fn == '简单移动平均'
ma5 := ta.sma(ma5_src, ma5_len)
ma5_has_len := true
else if ma5_fn == '对称加权移动平均'
ma5 := ta.swma(ma5_src)
ma5_has_len := false
else if ma5_fn == '成交量加权平均价'
ma5 := ta.vwap(ma5_src)
ma5_has_len := false
else if ma5_fn == '成交量加权移动平均'
ma5 := ta.vwma(ma5_src, ma5_len)
ma5_has_len := true
else if ma5_fn == '加权移动平均'
ma5 := ta.wma(ma5_src, ma5_len)
ma5_has_len := true
if ma6_fn != '默认'
if ma6_fn == '自适应移动平均'
ma6 := ta.alma(ma6_src, ma6_len, alma6_offst, alma6_sigma)
ma6_has_len := true
else if ma6_fn == '指数移动平均'
ma6 := ta.ema(ma6_src, ma6_len)
ma6_has_len := true
else if ma6_fn == '修正移动平均'
ma6 := ta.rma(ma6_src, ma6_len)
ma6_has_len := true
else if ma6_fn == '简单移动平均'
ma6 := ta.sma(ma6_src, ma6_len)
ma6_has_len := true
else if ma6_fn == '对称加权移动平均'
ma6 := ta.swma(ma6_src)
ma6_has_len := false
else if ma6_fn == '成交量加权平均价'
ma6 := ta.vwap(ma6_src)
ma6_has_len := false
else if ma6_fn == '成交量加权移动平均'
ma6 := ta.vwma(ma6_src, ma6_len)
ma6_has_len := true
else if ma6_fn == '加权移动平均'
ma6 := ta.wma(ma6_src, ma6_len)
ma6_has_len := true
if ma7_fn != '默认'
if ma7_fn == '自适应移动平均'
ma7 := ta.alma(ma7_src, ma7_len, alma7_offst, alma7_sigma)
ma7_has_len := true
else if ma7_fn == '指数移动平均'
ma7 := ta.ema(ma7_src, ma7_len)
ma7_has_len := true
else if ma7_fn == '修正移动平均'
ma7 := ta.rma(ma7_src, ma7_len)
ma7_has_len := true
else if ma7_fn == '简单移动平均'
ma7 := ta.sma(ma7_src, ma7_len)
ma7_has_len := true
else if ma7_fn == '对称加权移动平均'
ma7 := ta.swma(ma7_src)
ma7_has_len := false
else if ma7_fn == '成交量加权平均价'
ma7 := ta.vwap(ma7_src)
ma7_has_len := false
else if ma7_fn == '成交量加权移动平均'
ma7 := ta.vwma(ma7_src, ma7_len)
ma7_has_len := true
else if ma7_fn == '加权移动平均'
ma7 := ta.wma(ma7_src, ma7_len)
ma7_has_len := true
// === 均线颜色 ===
ma1_clr = color.new(color.fuchsia, 0)
ma2_clr = color.new(color.aqua, 0)
ma3_clr = color.new(color.yellow, 0)
ma4_clr = color.new(color.blue, 0)
ma5_clr = color.new(color.orange, 0)
ma6_clr = color.new(color.green, 0)
ma7_clr = color.new(color.red, 0)
// === 均线全局绘图 ===
p1 = plot(series=showPMA and ma1_on ? ma1 : na, title="均线1", color=ma1_clr, trackprice=false, offset=ma1_plt_offst, linewidth=2)
p2 = plot(series=showPMA and ma2_on ? ma2 : na, title="均线2", color=ma2_clr, trackprice=false, offset=ma2_plt_offst, linewidth=2)
p3 = plot(series=showPMA and ma3_on ? ma3 : na, title="均线3", color=ma3_clr, trackprice=false, offset=ma3_plt_offst, linewidth=2)
p4 = plot(series=showPMA and ma4_on ? ma4 : na, title="均线4", color=ma4_clr, trackprice=false, offset=ma4_plt_offst, linewidth=2)
p5 = plot(series=showPMA and ma5_on ? ma5 : na, title="均线5", color=ma5_clr, trackprice=false, offset=ma5_plt_offst, linewidth=2)
p6 = plot(series=showPMA and ma6_on ? ma6 : na, title="均线6", color=ma6_clr, trackprice=false, offset=ma6_plt_offst, linewidth=2)
p7 = plot(series=showPMA and ma7_on ? ma7 : na, title="均线7", color=ma7_clr, trackprice=false, offset=ma7_plt_offst, linewidth=2)
// === 多周期移动平均线 填充渲染 ===
fill(p1, p2, color=showPMA and ma1_on and ma2_on and fill_12_on ? color.new(color.purple, 70) : na, title="均线1-2填充")
fill(p2, p3, color=showPMA and ma2_on and ma3_on and fill_23_on ? color.new(color.blue, 70) : na, title="均线2-3填充")
fill(p3, p4, color=showPMA and ma3_on and ma4_on and fill_34_on ? color.new(color.teal, 70) : na, title="均线3-4填充")
fill(p4, p5, color=showPMA and ma4_on and ma5_on and fill_45_on ? color.new(color.green, 70) : na, title="均线4-5填充")
fill(p5, p6, color=showPMA and ma5_on and ma6_on and fill_56_on ? color.new(color.yellow, 70) : na, title="均线5-6填充")
fill(p6, p7, color=showPMA and ma6_on and ma7_on and fill_67_on ? color.new(color.orange, 70) : na, title="均线6-7填充")
// === 交易信息表格 部分 ===
// 表格参数设置 - 修改默认大小为中等
tablePos = input.string("右上角", title="表格位置", options= , group="7. 交易信息表格 设置")
tableSize = input.string("中等", title="表格大小", options= , group="7. 交易信息表格 设置")
showTargets = input.bool(true, title="显示止盈目标", group="7. 交易信息表格 设置")
showRatio = input.bool(true, title="显示盈亏比", group="7. 交易信息表格 设置")
// 辅助函数
getTablePosition() =>
switch tablePos
"右上角" => position.top_right
"右下角" => position.bottom_right
"左上角" => position.top_left
"左下角" => position.bottom_left
getTableSize() =>
switch tableSize
"小" => size.small
"中等" => size.normal
"大" => size.large
formatPrice(price) =>
if na(price)
"N/A"
else
str.tostring(price, "#.####")
calcStopLossPercentage(entryPrice, stopLoss, entryType) =>
if na(entryPrice) or na(stopLoss) or na(entryType)
""
else
pct = 0.0
if entryType == "多单"
pct := (stopLoss - entryPrice) / entryPrice * 100
else if entryType == "空单"
pct := (entryPrice - stopLoss) / entryPrice * 100
" (" + str.tostring(pct, "#.##") + "%)"
calcTakeProfitPercentage(entryPrice, takeProfit, entryType) =>
if na(entryPrice) or na(takeProfit) or na(entryType)
""
else
pct = 0.0
if entryType == "多单"
pct := (takeProfit - entryPrice) / entryPrice * 100
else if entryType == "空单"
pct := (entryPrice - takeProfit) / entryPrice * 100
" (+" + str.tostring(pct, "#.##") + "%)"
calcUnrealizedPnL(entryPrice, currentPrice, entryType) =>
if na(entryPrice) or na(currentPrice) or na(entryType)
""
else
priceDiff = currentPrice - entryPrice
pct = (currentPrice - entryPrice) / entryPrice * 100
if entryType == "多单"
if pct > 0
" (" + formatPrice(priceDiff) + ", +" + str.tostring(pct, "#.##") + "%)"
else
" (" + formatPrice(priceDiff) + ", " + str.tostring(pct, "#.##") + "%)"
else if entryType == "空单"
// 对于空单,价差符号相反
if pct < 0
" (" + formatPrice(-priceDiff) + ", +" + str.tostring(-pct, "#.##") + "%)"
else
" (" + formatPrice(-priceDiff) + ", " + str.tostring(-pct, "#.##") + "%)"
else
""
// RSI状态颜色函数
getRSIStatusColor() =>
switch rsiStatus
"动量回升" => // 绿色
"动量回落" => // 红色
"动量中性" => // 黄色
=> // 默认灰色
// 多时间框架趋势颜色函数
getTrendColor(trendDirection) =>
switch trendDirection
"多头倾向" => // 绿色
"空头倾向" => // 红色
"震荡" => // 黄色
=> // 默认灰色
// === 蓝紫科幻风格表格 ===
// 创建蓝紫色主题的表格
var infoTable = table.new(getTablePosition(), columns=2, rows=26,
bgcolor=color.new(#0f0a1a, 5),
border_width=3,
border_color=color.new(#6633ff, 40),
frame_width=2,
frame_color=color.new(#9966ff, 30))
if showTable and barstate.islast
// 确定止盈止损位
var float stopLoss = na
var float takeProfit1 = na
var float takeProfit2 = na
if not na(entryType)
if entryType == "多单"
stopLoss := na(sBot) ? entryPrice * 0.98 : sBot
takeProfit1 := na(rTop) ? entryPrice * 1.02 : rTop
takeProfit2 := entryPrice * 1.05
else if entryType == "空单"
stopLoss := na(rTop) ? entryPrice * 1.02 : rTop
takeProfit1 := na(sBot) ? entryPrice * 0.98 : sBot
takeProfit2 := entryPrice * 0.95
// 计算盈亏比
riskRewardRatio = na(entryPrice) or na(stopLoss) or na(takeProfit1) ? na :
math.abs(takeProfit1 - entryPrice) / math.abs(entryPrice - stopLoss)
riskRewardStr = na(riskRewardRatio) ? "N/A" : "1:" + str.tostring(riskRewardRatio, "#.##")
rowIndex = 0
// === 作者联系信息行 - 最顶部,大字体 ===
table.cell(infoTable, 0, rowIndex, "合作联系作者", text_color=color.new(#ffcc99, 0),
text_size=size.normal, bgcolor=color.new(#1a1a0d, 0))
table.cell(infoTable, 1, rowIndex, "qq2390107445", text_color=color.new(#66ff99, 0),
text_size=size.normal, bgcolor=color.new(#0d2619, 0))
rowIndex += 1
// === 表格标题行 - 蓝紫主题 ===
table.cell(infoTable, 0, rowIndex, "⚡ P6●智能资金概念交易系统", text_color=color.new(#ccccff, 0),
text_size=getTableSize(), bgcolor=color.new(#1a0d33, 0))
table.cell(infoTable, 1, rowIndex, "『" + syminfo.ticker + "』", text_color=color.new(#9966ff, 0),
text_size=size.normal, bgcolor=color.new(#1a0d33, 0))
rowIndex += 1
// === 当前价格与浮盈浮亏行 - 蓝紫主题 ===
unrealizedPnL = calcUnrealizedPnL(entryPrice, close, entryType)
// 浮盈浮亏颜色逻辑
pnlColor = color.new(#ccccff, 0)
pnlBgColor = color.new(#0d0d1a, 0)
if not na(entryPrice)
if entryType == "多单"
if close > entryPrice
pnlColor := color.new(#66ff99, 0)
pnlBgColor := color.new(#0d2619, 0)
else
pnlColor := color.new(#ff6699, 0)
pnlBgColor := color.new(#260d19, 0)
else if entryType == "空单"
if close < entryPrice
pnlColor := color.new(#66ff99, 0)
pnlBgColor := color.new(#0d2619, 0)
else
pnlColor := color.new(#ff6699, 0)
pnlBgColor := color.new(#260d19, 0)
table.cell(infoTable, 0, rowIndex, "当前价格", text_color=color.new(#b3b3ff, 0),
text_size=getTableSize(), bgcolor=color.new(#0d0d1a, 0))
table.cell(infoTable, 1, rowIndex, formatPrice(close) + unrealizedPnL,
text_color=pnlColor,
text_size=getTableSize(), bgcolor=pnlBgColor)
rowIndex += 1
// === 趋势状态与进场价格行 - 蓝紫主题 ===
trendStatus = na(entryType) ? "待机中" : entryType == "多单" ? "多头执行" : "空头执行"
trendIcon = entryType == "多单" ? " ▲" : entryType == "空单" ? " ▼" : " ●"
trendBgColor = entryType == "多单" ? color.new(#1a4d1a, 0) :
entryType == "空单" ? color.new(#4d1a1a, 0) :
color.new(#1a1a4d, 0)
trendTextColor = entryType == "多单" ? color.new(#66ff99, 0) :
entryType == "空单" ? color.new(#ff6699, 0) :
color.new(#9999ff, 0)
table.cell(infoTable, 0, rowIndex, "交易状态", text_color=color.new(#b3b3ff, 0),
text_size=getTableSize(), bgcolor=color.new(#0d0d1a, 0))
table.cell(infoTable, 1, rowIndex, trendStatus + trendIcon, text_color=trendTextColor,
text_size=getTableSize(), bgcolor=trendBgColor)
rowIndex += 1
// === 进场价格行 - 蓝紫主题 ===
table.cell(infoTable, 0, rowIndex, "进场价位", text_color=color.new(#b3b3ff, 0),
text_size=getTableSize(), bgcolor=color.new(#0d0d1a, 0))
table.cell(infoTable, 1, rowIndex, formatPrice(entryPrice),
text_color=color.new(#ffcc99, 0),
text_size=getTableSize(), bgcolor=color.new(#1a1a0d, 0))
rowIndex += 1
// === 多时间框架分析 - 独立行显示 ===
if showMTF
// 多时间框架标题行
table.cell(infoTable, 0, rowIndex, "━━ 多时间框架趋势 ━━", text_color=color.new(#ccccff, 0),
text_size=getTableSize(), bgcolor=color.new(#1a0d33, 0))
table.cell(infoTable, 1, rowIndex, "━━━━━━━━━━━━━━━━━━━━", text_color=color.new(#6633ff, 0),
text_size=getTableSize(), bgcolor=color.new(#1a0d33, 0))
rowIndex += 1
// 1分钟趋势
if mtfEnable1m
= getTrendColor(trend1mDir)
trend1mIcon = trend1mDir == "多头倾向" ? " ▲" : trend1mDir == "空头倾向" ? " ▼" : " ●"
table.cell(infoTable, 0, rowIndex, "1分钟", text_color=color.new(#b3b3ff, 0),
text_size=getTableSize(), bgcolor=color.new(#0d0d1a, 0))
table.cell(infoTable, 1, rowIndex, trend1mDir + trend1mIcon, text_color=trend1mTextColor,
text_size=getTableSize(), bgcolor=trend1mBgColor)
rowIndex += 1
// 5分钟趋势
if mtfEnable5m
= getTrendColor(trend5mDir)
trend5mIcon = trend5mDir == "多头倾向" ? " ▲" : trend5mDir == "空头倾向" ? " ▼" : " ●"
table.cell(infoTable, 0, rowIndex, "5分钟", text_color=color.new(#b3b3ff, 0),
text_size=getTableSize(), bgcolor=color.new(#0d0d1a, 0))
table.cell(infoTable, 1, rowIndex, trend5mDir + trend5mIcon, text_color=trend5mTextColor,
text_size=getTableSize(), bgcolor=trend5mBgColor)
rowIndex += 1
// 15分钟趋势
if mtfEnable15m
= getTrendColor(trend15mDir)
trend15mIcon = trend15mDir == "多头倾向" ? " ▲" : trend15mDir == "空头倾向" ? " ▼" : " ●"
table.cell(infoTable, 0, rowIndex, "15分钟", text_color=color.new(#b3b3ff, 0),
text_size=getTableSize(), bgcolor=color.new(#0d0d1a, 0))
table.cell(infoTable, 1, rowIndex, trend15mDir + trend15mIcon, text_color=trend15mTextColor,
text_size=getTableSize(), bgcolor=trend15mBgColor)
rowIndex += 1
// 1小时趋势
if mtfEnable1h
= getTrendColor(trend1hDir)
trend1hIcon = trend1hDir == "多头倾向" ? " ▲" : trend1hDir == "空头倾向" ? " ▼" : " ●"
table.cell(infoTable, 0, rowIndex, "1小时", text_color=color.new(#b3b3ff, 0),
text_size=getTableSize(), bgcolor=color.new(#0d0d1a, 0))
table.cell(infoTable, 1, rowIndex, trend1hDir + trend1hIcon, text_color=trend1hTextColor,
text_size=getTableSize(), bgcolor=trend1hBgColor)
rowIndex += 1
// 4小时趋势
if mtfEnable4h
= getTrendColor(trend4hDir)
trend4hIcon = trend4hDir == "多头倾向" ? " ▲" : trend4hDir == "空头倾向" ? " ▼" : " ●"
table.cell(infoTable, 0, rowIndex, "4小时", text_color=color.new(#b3b3ff, 0),
text_size=getTableSize(), bgcolor=color.new(#0d0d1a, 0))
table.cell(infoTable, 1, rowIndex, trend4hDir + trend4hIcon, text_color=trend4hTextColor,
text_size=getTableSize(), bgcolor=trend4hBgColor)
rowIndex += 1
// === RSI 动量状态行 - 蓝紫主题 ===
rsiTextColor = color.new(#ccccff, 0)
rsiBgColor = color.new(#0d0d1a, 0)
if rsiStatus == "动量回升"
rsiTextColor := color.new(#66ff99, 0)
rsiBgColor := color.new(#0d2619, 0)
else if rsiStatus == "动量回落"
rsiTextColor := color.new(#ff6699, 0)
rsiBgColor := color.new(#260d19, 0)
else
rsiTextColor := color.new(#ffcc99, 0)
rsiBgColor := color.new(#1a1a0d, 0)
rsiIcon = rsiStatus == "动量回升" ? " ▲" : rsiStatus == "动量回落" ? " ▼" : " ●"
rsiDisplayText = rsiStatus + rsiIcon + " (" + str.tostring(rsiValue, "#.#") + ")"
table.cell(infoTable, 0, rowIndex, "RSI动量", text_color=color.new(#b3b3ff, 0),
text_size=getTableSize(), bgcolor=color.new(#0d0d1a, 0))
table.cell(infoTable, 1, rowIndex, rsiDisplayText, text_color=rsiTextColor,
text_size=getTableSize(), bgcolor=rsiBgColor)
rowIndex += 1
// === 风险管理分割线 ===
table.cell(infoTable, 0, rowIndex, "━━ 风险管理 ━━", text_color=color.new(#ccccff, 0),
text_size=getTableSize(), bgcolor=color.new(#1a0d33, 0))
table.cell(infoTable, 1, rowIndex, "━━━━━━━━━━━━━━━━━━━━", text_color=color.new(#6633ff, 0),
text_size=getTableSize(), bgcolor=color.new(#1a0d33, 0))
rowIndex += 1
// === 止损行 - 蓝紫主题 ===
slPct = calcStopLossPercentage(entryPrice, stopLoss, entryType)
table.cell(infoTable, 0, rowIndex, "止损价位", text_color=color.new(#b3b3ff, 0),
text_size=getTableSize(), bgcolor=color.new(#0d0d1a, 0))
table.cell(infoTable, 1, rowIndex, formatPrice(stopLoss) + slPct,
text_color=color.new(#ff6699, 0),
text_size=getTableSize(), bgcolor=color.new(#330d1a, 0))
rowIndex += 1
// 止盈目标行
if showTargets
// === 目标位1 - 蓝紫主题 ===
tp1Pct = calcTakeProfitPercentage(entryPrice, takeProfit1, entryType)
tp1Reached = na(takeProfit1) ? false :
(entryType == "多单" ? high >= takeProfit1 : low <= takeProfit1)
tp1Icon = tp1Reached ? " ✓" : ""
tp1Color = tp1Reached ? color.new(#66ff99, 0) : color.new(#99ccff, 0)
tp1BgColor = tp1Reached ? color.new(#0d2619, 0) : color.new(#0d1a26, 0)
table.cell(infoTable, 0, rowIndex, "止盈目标1", text_color=color.new(#b3b3ff, 0),
text_size=getTableSize(), bgcolor=color.new(#0d0d1a, 0))
table.cell(infoTable, 1, rowIndex, formatPrice(takeProfit1) + tp1Pct + tp1Icon,
text_color=tp1Color,
text_size=getTableSize(), bgcolor=tp1BgColor)
rowIndex += 1
// === 目标2 - 蓝紫主题 ===
tp2Pct = calcTakeProfitPercentage(entryPrice, takeProfit2, entryType)
tp2Reached = na(takeProfit2) ? false :
(entryType == "多单" ? high >= takeProfit2 : low <= takeProfit2)
tp2Icon = tp2Reached ? " ✓" : ""
tp2Color = tp2Reached ? color.new(#66ff99, 0) : color.new(#cc99ff, 0)
tp2BgColor = tp2Reached ? color.new(#0d2619, 0) : color.new(#1a0d26, 0)
table.cell(infoTable, 0, rowIndex, "止盈目标2", text_color=color.new(#b3b3ff, 0),
text_size=getTableSize(), bgcolor=color.new(#0d0d1a, 0))
table.cell(infoTable, 1, rowIndex, formatPrice(takeProfit2) + tp2Pct + tp2Icon,
text_color=tp2Color,
text_size=getTableSize(), bgcolor=tp2BgColor)
rowIndex += 1
// === 盈亏比行 - 蓝紫主题 ===
if showRatio
rrColor = color.new(#9999ff, 0)
rrBgColor = color.new(#0d0d1a, 0)
if not na(riskRewardRatio)
if riskRewardRatio >= 2
rrColor := color.new(#66ff99, 0)
rrBgColor := color.new(#0d2619, 0)
else if riskRewardRatio >= 1
rrColor := color.new(#ffcc99, 0)
rrBgColor := color.new(#1a1a0d, 0)
else
rrColor := color.new(#ff9966, 0)
rrBgColor := color.new(#1a1a0d, 0)
table.cell(infoTable, 0, rowIndex, "盈亏比例", text_color=color.new(#b3b3ff, 0),
text_size=getTableSize(), bgcolor=color.new(#0d0d1a, 0))
table.cell(infoTable, 1, rowIndex, riskRewardStr,
text_color=rrColor,
text_size=getTableSize(), bgcolor=rrBgColor)
rowIndex += 1
// === 免责声明行 - 蓝紫主题 ===
table.cell(infoTable, 0, rowIndex, "⚠ 风险提示", text_color=color.new(#9999ff, 0),
text_size=size.small, bgcolor=color.new(#0d0d1a, 0))
table.cell(infoTable, 1, rowIndex, "仅供参考,不构成投资建议,盈亏自负",
text_color=color.new(#9999ff, 0),
text_size=size.small, bgcolor=color.new(#1a1a4d, 0))
Stock Relative Strength Rotation Graph🔄 Visualizing Market Rotation & Momentum (Stock RSRG)
This tool visualizes the sector rotation of your watchlist on a single graph. Instead of checking 40 different charts, you can see the entire market cycle in one view. It plots Relative Strength (Trend) vs. Momentum (Velocity) to identify which assets are leading the market and which are lagging.
📜 Credits & Disclaimer
Original Code: Adapted from the open-source " Relative Strength Scatter Plot " by LuxAlgo.
Trademark: This tool is inspired by Relative Rotation Graphs®. Relative Rotation Graphs® is a registered trademark of JOOS Holdings B.V. This script is neither endorsed, nor sponsored, nor affiliated with them.
📊 How It Works (The Math)
The script calculates two metrics for every symbol against a benchmark (Default: SPX):
X-Axis (RS-Ratio): Is the trend stronger than the benchmark? (>100 = Yes)
Y-Axis (RS-Momentum): Is the trend accelerating? (>100 = Yes)
🧩 The 4 Market Quadrants
🟩 Leading (Top-Right): Strong Trend + Accelerating. (Best for holding).
🟦 Improving (Top-Left): Weak Trend + Accelerating. (Best for entries).
⬜ Weakening (Bottom-Right): Strong Trend + Decelerating. (Watch for exits).
🟥 Lagging (Bottom-Left): Weak Trend + Decelerating. (Avoid).
✨ Significant Improvements
This open-source version adds unique features not found in standard rotation scripts:
📝 Quick-Input Engine: Paste up to 40 symbols as a single comma-separated list (e.g., NVDA, AMD, TSLA). No more individual input boxes.
🎯 Quadrant Filtering: You can now hide specific quadrants (like "Lagging") to clear the noise and focus only on actionable setups.
🐛 Trajectory Trails: Visualizes the historical path of the rotation so you can see the direction of momentum.
🛠️ How to Use
Paste Watchlist: Go to settings and paste your symbols (e.g., US Sectors: XLK, XLF, XLE...).
Find Entries: Look for tails moving from Improving ➔ Leading.
Find Exits: Be cautious when tails move from Leading ➔ Weakening.
Zoom: Use the "Scatter Plot Resolution" setting to zoom in or out if dots are bunched up.
HOKO,PSPHOKO is a multifunctional chart-overlay designed to display clean market context and detect PSP (Price-Structure Projection) signals based on candle-body direction differences between the main symbol and two reference indices.
The indicator provides two core features:
1. Header Display (Symbol / Timeframe / Date / Mode System)
HOKO allows full customization of on-chart informational headers, including:
Symbol name
Timeframe (auto-formatted)
Indicator name (HOKO)
Date (Pretty or Numeric)
Multiple layout modes (6 total)
Adjustable text size, alignment, padding, row spacing, and screen position
Dynamic rendering using table objects
This creates a clean and professional display suitable for screenshots, analysis, and multi-chart layouts.
2. PSP Logic (Price Structure Projection)
The PSP engine compares the main chart’s candle direction to two reference symbols (default: ES1! and YM1!).
A violation occurs when the main candle is bullish while the reference candle is bearish, or vice-versa.
The script:
Calculates ATR-based dynamic marker offsets
Stores the last 3 bars
Detects Swing High PSP and Swing Low PSP based on a 3-candle swing structure
Confirms signals only if the middle candle contains a violation
Draws markers above/below the swing point with fully customizable shapes, colors, and sizes
Supports two symbols independently (Symbol 1 / Symbol 2)
Automatically deletes old labels based on a user-defined max-bar limit
This makes PSP easy to visualize and helps identify inflection points where internal weakness or strength appears before price shifts.
Key Features
Clean customizable chart header
Pretty or numeric date formats
Multiple layout modes (vertical or one-line display)
PSP detection from ES/YM divergence logic
Swing-based confirmation for higher-quality signals
Dynamic ATR offset for accurate visual spacing
Lightweight and optimized with automatic cleanup
Works on any market and any timeframe
Purpose
HOKO helps traders quickly understand market context while highlighting potential turning points caused by structural divergence between major indices. It is ideal for intraday traders using ICT-style logic, smart money concepts, or divergence-based confirmation models.
YCGH Crypto ultimate Breakout StrategyAdvanced Momentum Breakout Strategy - Optimized for crypto markets, proven effective on equities
Core Features:
Multi-layered signal generation combining volatility expansion and momentum confirmation
Adaptive risk management with dynamic stops, profit targets, and trailing mechanisms
Systematic position sizing with configurable leverage (designed for perpetual/margin trading)
Volatility regime filters to avoid false breakouts during low-momentum periods
Optional trend alignment for directional bias confirmation
Comprehensive backtesting with realistic slippage and commission modeling
Daily drawdown limits for capital preservation
Performance:
Applicable across multiple timeframes (1H, 4H, Daily)
Works on both spot and derivatives markets
Long and short position capability
Interested in using this strategy? This is a paid service. For access to the complete script and implementation support, email: brijamohanjha@gmail.com
Jefe ORBOpening Range Breakout (ORB) Indicator — Description
The Opening Range Breakout (ORB) Indicator automatically plots the high, low, and midpoint of the opening range for any market and any timeframe. This tool is ideal for intraday traders who rely on the initial price discovery window to identify direction, trend bias, liquidity sweeps, and breakout opportunities.
Features include:
Custom Opening Range start and end times
Opening Range High / Low / Mid lines
Optional session shading
Alerts for ORH/ORL breaks
Works across equities, futures, and crypto
This indicator lets traders tailor the ORB to 1m, 5m, 15m, 30m, or custom opening windows depending on their strategy.
How to Set the Time Correctly (IMPORTANT)
TradingView handles time based on two different factors:
The time zone of the chart/exchange
The time zone selected inside the indicator settings
Your ORB will ONLY plot correctly if your input times match the indicator’s chosen timezone—not your computer’s timezone.
Example: Matching NYSE Open While Trading From PST
NYSE opens at 9:30 AM Eastern Time
In Pacific Time (PST), this is 6:30 AM
In UTC, this is 14:30
If your indicator is set to use UTC, you must enter the ORB Start = 14:30 in order for the lines to align with the actual New York session open.
This is why, even though you personally trade in PST, you may need to use 14:30 when your chart or your indicator timezone is UTC.
Best Practice for Correct ORB Time Inputs
Choose your indicator timezone first, then enter the ORB start/end times in THAT zone:
If Indicator Timezone = America/New_York
Enter 09:30 for the ORB start
No conversion needed
If Indicator Timezone = America/Los_Angeles (PST)
Enter 06:30 for the ORB start
Matches NY open automatically
If Indicator Timezone = UTC
Enter 14:30 for the ORB start
This is 9:30 ET converted to UTC
The indicator intentionally allows manual timezone control so traders can align the opening range across global markets without depending on the chart's display timezone.
FVG — Major Gaps OnlyA gap is an area on the price chart where no trading occurred, so the candle jumps from one level to another without filling the intermediate prices.
In traditional markets (stocks, indices), gaps often occur due to overnight trading halts.
DarkPool FlowDarkPool Flow is a professional-grade technical analysis tool designed to align retail traders with the dominant "smart money" flow. Unlike standard moving average crossovers that often generate false signals during consolidation, this script employs a multi-layered filtering engine to isolate high-probability trends.
The core philosophy of this indicator is that Trends are fractal. A sustainable move on a lower timeframe must be supported by momentum on a higher timeframe. By comparing a "Fast Signal Trend" against a "Slow Anchor Trend" (e.g., Daily vs. Weekly), the script identifies the market bias used by institutional algorithms.
This edition features a Smart Recovery Engine, ensuring that valid trends are not missed simply because momentum started slowly, and a Dynamic Cloud that visually represents the strength of the trend spread.
Key Features
1. Auto-Adaptive Timeframe Logic
The script eliminates the guesswork of Multi-Timeframe (MTF) selection. By enabling "Auto-Adapt," the indicator detects your current chart timeframe and automatically maps it to the mathematically correct institutional pairings:
Scalping (<15m): Uses 15-Minute Trend vs. 1-Hour Anchor.
Day Trading (15m - 1H): Uses 4-Hour Trend vs. Daily Anchor.
Swing Trading (4H - Daily): Uses Daily Trend vs. Weekly Anchor (The classic "Golden" setup).
Investing (Weekly): Uses 21-Week EMA vs. 50-Week SMA (Bull Market Support Band logic).
2. Smart Recovery Signal Engine
Standard crossover scripts often miss major moves if the specific breakout candle has low volume or weak ADX. This script utilizes a state-machine logic that "remembers" the trend direction. If a trend begins during low volatility (gray candles), the script waits. The moment volatility and momentum confirm the move, a Smart Recovery Signal is triggered, allowing you to enter an existing trend safely.
3. Chop Protection (Gray Candles)
Preservation of capital is the priority. The script analyzes the Average Directional Index (ADX) and Volatility (ATR).
Colored Candles (Green/Red): The market is trending with sufficient strength. Trading is permitted.
Gray Candles: The market is in a low-energy chop or consolidation (ADX < 20). Trading is discouraged.
4. Dynamic Trend Cloud
The space between the Fast and Slow trends is filled with a dynamic cloud.
Darker/Opaque Cloud: Indicates a widening spread, suggesting accelerating momentum.
Lighter/Transparent Cloud: Indicates a narrowing spread, suggesting the trend may be weakening or consolidating.
5. Pullback & Retest Signals (+)
While triangles mark the start of a trend, the Plus (+) signs mark low-risk opportunities to add to a position. These appear when price dips into the cloud, finds support at the "Fair Value" zone, and closes back in the direction of the trend with confirmed momentum.
User Guide & Strategy
Setup
Add the indicator to your chart.
For Beginners: Enable "Auto-Adaptive Timeframes" in the settings.
For Advanced Users: Disable Auto-Adapt and manually configure your Fast/Slow pairings (Default is Daily 50 EMA / Weekly 50 EMA).
Signal Mode: Choose "First Breakout Only" for a cleaner chart, or "All Signals" if you wish to see re-entry points during choppy starts.
Long Entry Criteria (Buy)
Trend: The Cloud must be Green (Fast Trend > Slow Trend).
Signal: A Green Triangle appears below the bar.
Confirmation: The signal candle must not be Gray.
Re-Entry: A small Green (+) sign appears, indicating a successful test of the cloud support.
Short Entry Criteria (Sell)
Trend: The Cloud must be Red (Fast Trend < Slow Trend).
Signal: A Red Triangle appears above the bar.
Confirmation: The signal candle must not be Gray.
Re-Entry: A small Red (+) sign appears, indicating a successful test of the cloud resistance.
Stop Loss & Risk Management
Stop Loss: A standard institutional stop loss is placed just beyond the Slow Trend Line (the outer edge of the cloud). If price closes beyond the Slow Trend, the macro thesis is invalid.
Take Profit: Target liquidity pools or use a trailing stop based on the Fast Trend line.
Settings Overview
Mode Selection: Toggle between Auto-Adaptive logic or Manual control.
Manual Configuration: Define the specific Timeframe, Length, and Type (EMA, SMA, WMA) for both Fast and Slow trends.
Signal Logic: Toggle "Show Pullback Signals" on/off. Switch between "First Breakout" or "All Signals."
Quality Filters: Toggle individual filters (ATR, RSI, ADX) to adjust sensitivity. Turning these off makes the script more responsive but increases false signals.
Visual Style: Customize colors for Bullish, Bearish, and Neutral (Gray) states. Adjust cloud transparency.
Disclaimer
Risk Warning: Trading financial markets involves a high degree of risk and is not suitable for all investors. You could lose some or all of your initial investment.
Educational Use Only: This script and the information provided herein are for educational and informational purposes only. They do not constitute financial advice, investment advice, trading advice, or any other recommendation.
No Guarantee: Past performance of any trading system or methodology is not necessarily indicative of future results. The "Institutional Trend" indicator is a tool to assist in technical analysis, not a crystal ball. The creators of this script assume no responsibility or liability for any trading losses or damages incurred as a result of using this tool. Always perform your own due diligence and consult with a qualified financial advisor before making investment decisions.
Precision Trade Manager🔥Precision Trade Manager is a complete execution - planning and trade-management system for TradingView.
It gives you full control over entry, stop-loss, position sizing, risk %, multi-TP planning (1–5), live tracking, realized profit, floating P&L, RR, and account % change — all directly on your chart.
Because this tool has many features and workflows, the TradingView description is too short to explain everything properly.
For that reason, please read the two PDF guides below before using the indicator.
They explain exactly how the tool works, how to set it up correctly, and how to avoid mistakes when planning or managing trades.
📘 PDF 1 — Quick Start Guide (Read First)
drive.google.com
This guide explains the core workflow step-by-step:
✔ How to add the tool to the chart
✔ How to configure assets, contract size, account balance, and trading costs
✔ How to set Entry, SL, and your risk %
✔ How to set TP1–TP5 using RR mode or manual mode
✔ How partials work
✔ How LIVE TRACKING mode works
✔ How to reset and prepare your next trade
This PDF teaches you the correct operational flow, so you understand how Precision Trade Manager behaves on the chart and why certain features exist.
Reading this first prevents confusion and ensures you use the tool correctly.
📙 PDF 2 — Feature Overview & Visual Examples
drive.google.com
This PDF gives a full breakdown of everything the tool is capable of:
✔ Real-time dashboard metrics (pips, lots, RR, profit, % account)
✔ Partial TP tracking with green checkmarks and locked profit
✔ Floating vs. locked mode
✔ Pip/point/currency conversions across Gold, Forex, Indices, and Crypto
✔ Example charts for US30, EURUSD, and XAUUSD
✔ A direct comparison against the TradingView Long/Short tool
This document is visual. It shows real examples of the tool in action so you understand what to expect once you’re using it live on your chart.

It is highly recommended to look through this PDF before your first trade. It will help you understand the dashboard, interpret every metric, and recognize the benefits versus the default TradingView tools.
(The tool has many (!) tooltips, hower mouse over each. To get a clear description of what each function/button/box do)
CIS Swing Trade Zones (All-in-One)It help you to expalin all the high and low and it will also give y0ou the fibo level tat is useful
Periodis ProIntroduction
The Algorion Periodis Pro represents a paradigm shift in professional trend analysis. Unlike traditional indicators that force the market to fit into rigid, pre-defined settings (like a 14-period MA), this system allows the market to dictate its own parameters.
By combining a Proprietary Anchored Framework with specific temporal resets, Algorion Periodis Pro captures the "natural rhythm" of price action, offering a view of the market that is mathematically synchronized with the current trading session, day, or week.
Core Methodology: The "Zero-Parameter" Philosophy
The true power of Algorion Periodis Pro lies in its unique approach to signal generation. It does not rely on arbitrary user inputs. Instead, it features two distinct, self-adaptive lines that construct themselves in real-time:
1. The Self-Constructing Inertia Line (Adaptive EMA): This line is not calculated using a fixed lookback period. Instead, it builds itself from the ground up starting at each reset point. It accepts the market’s raw price action as its sole instruction set, naturally deriving its own smoothing coefficients based on the speed and flow of the current trend. It represents the market’s "Inertia."
2. The Proprietary Efficiency Filter: The second line utilizes a highly advanced, parameter-free algorithm. It "listens" to the market's noise and volatility levels to determine its own sensitivity. When price is clean, it tightens; when price is chaotic, it relaxes.
The Result: Two lines that are not imposed on the market, but are born from the market. Their interaction reveals the true fair value without the lag caused by human bias.
Features & Functionality
The "Heartbeat" of Volatility (Heatmap Bands): Standard deviation bands often lag. Algorion Periodis Pro, however, calculates the Accumulated Volatility from the anchor point.
These bands represent the "breathing room" the market requires for the current period.
Info Box Dashboard: The panel in the corner displays the Base Volatility State. This value (measured in Ticks/Pips/Points) is the precise distance between the Main Line and the first Deviation Band. This is the current "Volatility Unit" of the asset.
Dual-Set Chronology:
Set 1 (Tactical): Captures the immediate, intraday pulse (Default: 600 Minutes).
Set 2 (Strategic): Captures the broader structural intent (Default: Weekly).
Smart Confluence Coloring: Bars are painted Green or Red only when a "Council of Factors"—including the slopes of both adaptive lines and internal trend metrics—agree on the direction. This filters out weak, non-committal price action.
Strategic Usage: Volatility-Synchronized Trading
Because the Deviation Bands are derived from the market's natural volatility accumulation, they serve as the perfect coordinate system for Risk Management:
Risk (Stop Loss): Use the Base Volatility Unit (the distance of one band) as your natural stop-loss distance. This places your stop outside the current "noise floor" of the market.
Reward (Targets): Target the outer bands.
Band 1-2: High-probability scalping targets during standard moves.
Band 3+: Targets for expansion moves.
Level-to-Level Trading: In a trending market, price often climbs the "ladder" of these bands. A breakout above Band 1 often targets Band 2. When price extends to the outer limits (Band 6 or 7), it often signals a statistical exhaustion, offering a mean-reversion opportunity back to the Main Line.
Configuration
Main Line Switches: Toggle the Main and Secondary lines On/Off for both sets to suit your visual preference.
Reset Frequency: Define the life-cycle of the calculation (Minutes, Daily, Weekly).
Confluence Threshold: Adjust the strictness of the Bar Coloring (voting factors).
Signal Markers: Toggle discrete Buy/Sell shapes based on the structural trend.
Disclaimer
This tool is for informational purposes only. The proprietary algorithms contained herein calculate derived values from past price action and cannot predict future market movements with certainty. Past performance is not indicative of future results. Always manage risk.
PRO Trade Manager//@version=5
indicator("PRO Trade Manager", shorttitle="PRO Trade Manager", overlay=false)
// ============================================================================
// INPUTS
//This code and all related materials are the exclusive property of Trade Confident LLC. Any reproduction, distribution, modification, or unauthorized use of this code, in whole or in part, is strictly prohibited without the express written consent of Trade Confident LLC. Violations may result in civil and/or criminal penalties to the fullest extent of the law.
// © Trade Confident LLC. All rights reserved.
// ============================================================================
// Moving Average Settings
maLength = input.int(15, "Signal Strength", minval=1, tooltip="Length of the moving average to measure deviation from (lower = more sensitive)")
maType = "SMA" // Fixed to SMA, no longer user-selectable
// Deviation Settings
deviationLength = input.int(20, "Deviation Period", minval=1, tooltip="Lookback period for standard deviation calculation")
// Signal Frequency dropdown - controls both upper and lower thresholds
signalFrequency = input.string("More/Good Accuracy", "Signal Frequency", options= ,
tooltip="Normal/Highest Accuracy = ±2.0 StdDev | More/Good Accuracy = ±1.5 StdDev | Most/Moderate Accuracy = ±1.0 StdDev")
// Set thresholds based on selected frequency
upperThreshold = signalFrequency == "Most/Moderate Accuracy" ? 1.0 : signalFrequency == "More/Good Accuracy" ? 1.5 : 2.0
lowerThreshold = signalFrequency == "Most/Moderate Accuracy" ? -1.0 : signalFrequency == "More/Good Accuracy" ? -1.5 : -2.0
// Continuation Signal Settings
atrMultiplier = input.float(2.0, "TP/DCA Market Breakout Detection", minval=0, step=0.5, tooltip="Number of ATR moves required to trigger continuation signals (Set to 0 to disable)")
// Visual Settings
showMA = false // MA display removed from settings
showSignals = input.bool(true, "Show Alert Signals", tooltip="Show visual signals when price is overextended")
// ============================================================================
// CALCULATIONS
// ============================================================================
// Calculate Moving Average based on type
ma = switch maType
"SMA" => ta.sma(close, maLength)
"EMA" => ta.ema(close, maLength)
"WMA" => ta.wma(close, maLength)
"VWMA" => ta.vwma(close, maLength)
=> ta.sma(close, maLength)
// Calculate deviation from MA
deviation = close - ma
// Calculate standard deviation
stdDev = ta.stdev(close, deviationLength)
// Calculate number of standard deviations away from MA
deviationScore = stdDev != 0 ? deviation / stdDev : 0
// Smooth the deviation score slightly for cleaner signals
smoothedDeviation = ta.ema(deviationScore, 3)
// ============================================================================
// SIGNALS
// ============================================================================
// Overextended conditions
overextendedHigh = smoothedDeviation >= upperThreshold
overextendedLow = smoothedDeviation <= lowerThreshold
// Signal triggers (crossing into overextended territory)
bullishSignal = ta.crossunder(smoothedDeviation, lowerThreshold)
bearishSignal = ta.crossover(smoothedDeviation, upperThreshold)
// Track if we're in bright histogram zones
isBrightGreen = smoothedDeviation <= lowerThreshold
isBrightRed = smoothedDeviation >= upperThreshold
// Track if we were in bright zone on previous bar
wasBrightGreen = smoothedDeviation <= lowerThreshold
wasBrightRed = smoothedDeviation >= upperThreshold
// Detect oscillator turning up after bright green (buy signal)
// Trigger if we were in bright green and oscillator turns up, even if no longer bright green
oscillatorTurningUp = smoothedDeviation > smoothedDeviation
buySignal = barstate.isconfirmed and wasBrightGreen and oscillatorTurningUp and smoothedDeviation <= smoothedDeviation
// Detect oscillator turning down after bright red (sell signal)
// Trigger if we were in bright red and oscillator turns down, even if no longer bright red
oscillatorTurningDown = smoothedDeviation < smoothedDeviation
sellSignal = barstate.isconfirmed and wasBrightRed and oscillatorTurningDown and smoothedDeviation >= smoothedDeviation
// ============================================================================
// ATR-BASED CONTINUATION SIGNALS
// ============================================================================
// Calculate ATR for distance measurement
atrLength = 14
atr = ta.atr(atrLength)
// Track price levels when ANY sell or buy signal occurs (original or continuation)
var float lastSellPrice = na
var float lastBuyPrice = na
// Initialize tracking on original signals
if sellSignal
lastSellPrice := close
if buySignal
lastBuyPrice := close
// Continuation Sell Signal: Price moved up by ATR multiplier from last red dot
// Disabled when atrMultiplier is set to 0
continuationSell = atrMultiplier > 0 and barstate.isconfirmed and not na(lastSellPrice) and close >= lastSellPrice + (atrMultiplier * atr)
// Continuation Buy Signal: Price moved down by ATR multiplier from last green dot
// Disabled when atrMultiplier is set to 0
continuationBuy = atrMultiplier > 0 and barstate.isconfirmed and not na(lastBuyPrice) and close <= lastBuyPrice - (atrMultiplier * atr)
// Update reference prices when continuation signals trigger (reset the 3 ATR counter)
if continuationSell
lastSellPrice := close
if continuationBuy
lastBuyPrice := close
// Combine original and continuation signals for plotting
allBuySignals = buySignal or continuationBuy
allSellSignals = sellSignal or continuationSell
// Track if a signal occurred to keep it visible on dashboard
// Signals trigger at barstate.isconfirmed (bar close)
var bool showBuyOnDashboard = false
var bool showSellOnDashboard = false
// Update dashboard flags immediately when signals occur
if allBuySignals
showBuyOnDashboard := true
showSellOnDashboard := false
else if allSellSignals
showSellOnDashboard := true
showBuyOnDashboard := false
else if barstate.isconfirmed
// Reset flags on bar close if no new signal
showBuyOnDashboard := false
showSellOnDashboard := false
// ============================================================================
// PLOTTING
// ============================================================================
// Professional color scheme
var color colorBullish = #00C853 // Professional green
var color colorBearish = #FF1744 // Professional red
var color colorNeutral = #2962FF // Professional blue
var color colorGrid = #363A45 // Dark gray for lines
var color colorBackground = #1E222D // Chart background
// Dynamic line color based on value
lineColor = smoothedDeviation > upperThreshold ? colorBearish :
smoothedDeviation < lowerThreshold ? colorBullish :
smoothedDeviation > 0 ? color.new(colorBearish, 50) :
color.new(colorBullish, 50)
// Plot the deviation oscillator with dynamic coloring
plot(smoothedDeviation, "Deviation Score", color=lineColor, linewidth=2)
// Plot zero line
hline(0, "Zero Line", color=color.new(colorGrid, 0), linestyle=hline.style_solid, linewidth=1)
// Subtle fill for overextended zones (without visible threshold lines)
upperLine = hline(upperThreshold, "Upper Threshold", color=color.new(color.gray, 100), linestyle=hline.style_dashed, linewidth=1)
lowerLine = hline(lowerThreshold, "Lower Threshold", color=color.new(color.gray, 100), linestyle=hline.style_dashed, linewidth=1)
fill(upperLine, hline(3), color=color.new(colorBearish, 95), title="Overextended High Zone")
fill(lowerLine, hline(-3), color=color.new(colorBullish, 95), title="Overextended Low Zone")
// Histogram style visualization (optional alternative)
histogramColor = smoothedDeviation >= upperThreshold ? color.new(colorBearish, 20) :
smoothedDeviation <= lowerThreshold ? color.new(colorBullish, 20) :
smoothedDeviation > 0 ? color.new(colorBearish, 80) :
color.new(colorBullish, 80)
plot(smoothedDeviation, "Histogram", color=histogramColor, style=plot.style_histogram, linewidth=3)
// ============================================================================
// BUY/SELL SIGNAL MARKERS
// ============================================================================
// Plot buy signals at -3.5 level (includes both initial and extended signals)
plot(allBuySignals ? -3.5 : na, title="Buy Signal", style=plot.style_circles,
color=color.new(colorBullish, 0), linewidth=4)
// Plot sell signals at 3.5 level (includes both initial and extended signals)
plot(allSellSignals ? 3.5 : na, title="Sell Signal", style=plot.style_circles,
color=color.new(colorBearish, 0), linewidth=4)
// ============================================================================
// ALERTS - SIMPLIFIED TO ONLY TWO ALERTS
// ============================================================================
// Alert 1: Long Entry/Short TP - fires on ANY green dot (original or continuation)
alertcondition(allBuySignals, "Long Entry/Short TP", "Long Entry/Short TP")
// Alert 2: Long TP/Short Entry - fires on ANY red dot (original or continuation)
alertcondition(allSellSignals, "Long TP/Short Entry", "Long TP/Short Entry")
// ============================================================================
// DATA DISPLAY
// ============================================================================
// Create a professional table for current readings
var color tableBgColor = #1a2332 // Dark blue background
var table infoTable = table.new(position.middle_right, 2, 2, border_width=1,
border_color=color.new(#2962FF, 30),
frame_width=1,
frame_color=color.new(#2962FF, 30))
if barstate.islast
// Determine status
statusText = overextendedHigh ? "OVEREXTENDED ↓" :
overextendedLow ? "OVEREXTENDED ↑" :
smoothedDeviation > 0 ? "Buyers In Control" : "Sellers In Control"
statusColor = overextendedHigh ? color.new(colorBearish, 0) :
overextendedLow ? color.new(colorBullish, 0) :
color.white
// Background color for status cell
statusBgColor = color.new(tableBgColor, 0)
// Status Row
table.cell(infoTable, 0, 0, "Status",
bgcolor=color.new(tableBgColor, 0),
text_color=color.white,
text_size=size.normal)
table.cell(infoTable, 1, 0, statusText,
bgcolor=statusBgColor,
text_color=statusColor,
text_size=size.normal)
// Signal Row - always show
table.cell(infoTable, 0, 1, "Signal",
bgcolor=color.new(tableBgColor, 0),
text_color=color.white,
text_size=size.normal)
// Show signal if flags are set (will stay visible during the bar)
if showBuyOnDashboard or showSellOnDashboard
// Green dot (buy signal) = "Long Entry/Short TP" with arrow up, white text on green background
// Red dot (sell signal) = "Long TP/Short Entry" with arrow down, white text on red background
signalText = showBuyOnDashboard ? "↑ Long Entry/Short TP" : "↓ Long TP/Short Entry"
signalColor = showBuyOnDashboard ? color.new(colorBullish, 0) : color.new(colorBearish, 0)
table.cell(infoTable, 1, 1, signalText,
bgcolor=signalColor,
text_color=color.white,
text_size=size.normal)
else
table.cell(infoTable, 1, 1, "Watching...",
bgcolor=color.new(tableBgColor, 0),
text_color=color.new(color.white, 60),
text_size=size.normal)
YM Ultimate SNIPER v8.1# YM Ultimate SNIPER v8.1 - SNIPER STRICT EDITION
## 🎯 CHANGELOG: What's New in v8.1
### The Problem We Fixed
**GOD MODE was handing out awards like participation trophies.** Too many wicky, indecisive candles were getting GOD MODE status just because they had enough confluence points. A GOD MODE candle should show **CLEAR DOMINANCE** - fat body, minimal adverse wick, consistent pressure throughout formation.
---
## 🔥 MAJOR CHANGES
### 1. CANDLE DOMINANCE INDEX (CDI) - NEW METRIC
The CDI quantifies "who won the candle" on a 0-10 scale:
```
CDI COMPONENTS:
├── Body Score (0-4 pts): How fat is the body?
├── Adverse Wick Score (0-3 pts): How small is the wick against direction?
├── Favorable Wick Score (0-2 pts): Clean entry side?
└── Closing Strength (0-1 pt): Did it close near the extreme?
CDI RATINGS:
├── 8.0+ = 🔥 DOMINANT (ideal for GOD MODE)
├── 6.0-7.9 = ✓✓ STRONG
├── 4.0-5.9 = ✓ ACCEPTABLE
└── <4.0 = WEAK (not GOD MODE worthy)
```
### 2. STRICT GOD MODE GATES (6 GATES)
**Score alone no longer qualifies for GOD MODE.** Now a candle must pass ALL 6 gates:
| Gate | Requirement | Default |
|------|-------------|---------|
| **1. Score** | Must meet GOD MODE threshold | ≥9.0 |
| **2. Body** | Body ratio must be "fat" | ≥70% |
| **3. Adverse Wick** | Wick against direction must be small | ≤20% |
| **4. Delta** | Buy/sell dominance must be strong | ≥70% |
| **5. Session** | Must be in active session (configurable) | LDN/NY/PWR |
| **6. Pressure** | Intrabar pressure must be consistent | Same side dominated early AND late |
**If ANY gate fails, GOD MODE is DENIED** - even with a 10/10 score!
### 3. 30-BAR SIGNAL DISPLAY LIMIT
**Past signals are now hidden.** Only the last 30 bars show tier markers, sweeps, and absorption signals. This keeps the chart clean and focused on recent action.
```
WHAT'S HIDDEN AFTER 30 BARS:
├── Tier signals (S/A/B/Z)
├── GOD MODE markers
├── Liquidity sweep diamonds
├── Absorption crosses
└── Stop/Target lines
WHAT ALWAYS SHOWS:
├── FVG/IFVG zones (structural)
├── Order Blocks (structural)
├── Session markers (context)
└── Session background colors
```
**Configurable:** Change "Show Signals: Last N Bars" in settings (10-100)
### 4. PRESSURE CONSISTENCY TRACKING
New intrabar analysis that tracks if the **same side dominated throughout the candle**:
```
CANDLE FORMATION ANALYSIS:
├── First Half: Who dominated? (earlyBuyVol vs earlySellVol)
├── Second Half: Who dominated? (lateBuyVol vs lateSellVol)
└── Consistent? = Same side won BOTH halves
PRESSURE CONSISTENT = Buyers dominated early AND late
OR Sellers dominated early AND late
PRESSURE MIXED = Buyers dominated early, sellers late
OR Sellers dominated early, buyers late
```
**GOD MODE requires consistent pressure** when intrabar analysis is enabled.
### 5. GOD MODE DENIAL REASON IN TABLE
When a candle scores 9.0+ but fails a gate, the table now shows **WHY**:
```
DENIAL REASONS:
├── "DENIED: WICK" = Adverse wick too large (>20%)
├── "DENIED: DELTA" = Delta dominance too weak (<70%)
├── "DENIED: SESSION" = Not in active session
├── "DENIED: VOLUME" = Volume below 1.5x
└── "DENIED: PRESSURE" = Mixed pressure during formation
```
---
## 📊 NEW TABLE SECTIONS
### CANDLE QUALITY Section (NEW)
```
══ CANDLE QUALITY ══
Body | 78% | FAT
Adv Wick | 12% | CLEAN
CDI | 8.2/10 | 🔥
```
### INTRABAR Section (UPDATED)
```
══ INTRABAR ══
IB Data | 12 bars | ✓
IB Delta | 74% BUY | 🔥
Pressure | CONSISTENT | ✓ ← NEW
```
---
## ⚙️ NEW SETTINGS
### CANDLE DOMINANCE (v8.1) Group
```
GOD MODE: Min Body Ratio = 0.70 (body must be 70%+ of range)
GOD MODE: Max Adverse Wick = 0.20 (wick against direction ≤20%)
GOD MODE: Min Delta Dominance = 0.70 (70%+ buy/sell dominance)
GOD MODE: Min Intrabar Delta = 0.68 (intrabar delta ≥68%)
GOD MODE: Require Active Session = ON
GOD MODE: Require 1.5x+ Volume = ON
```
### SIGNAL DISPLAY (v8.1) Group
```
Show Signals: Last N Bars = 30
Show Historical FVG/OB Zones = ON (zones always visible)
```
---
## 🎯 PRACTICAL IMPACT
### Before v8.1 (Too Many False GOD MODE)
```
Candle: 35 point move, score 9.2, BUT:
- Body only 55% of range (thin)
- Upper wick 35% (buyers got pushed back hard)
- Intrabar showed mixed pressure
RESULT: GOD MODE ⚡ (WRONG!)
```
### After v8.1 (Strict GOD MODE)
```
Same candle: Score 9.2, but:
- Gate 2 FAILED: Body 55% < 70% required
- Gate 3 FAILED: Wick 35% > 20% allowed
- Gate 6 FAILED: Pressure inconsistent
RESULT: DENIED: WICK (Correct - this was a fake-out candle)
```
---
## 🏆 THE NEW GOD MODE STANDARD
A TRUE GOD MODE candle must show:
1. **HIGH SCORE** (≥9.0) - Multiple confluence factors aligned
2. **FAT BODY** (≥70%) - Clear directional commitment
3. **CLEAN WICKS** (≤20% adverse) - Minimal pushback
4. **STRONG DELTA** (≥70%) - One side clearly dominated
5. **IN SESSION** - Institutional participation
6. **CONSISTENT PRESSURE** - Same side controlled throughout
**Translation:** *"Institutions stepped in with size, pushed hard in one direction, and never let up. No hesitation, no give-back. This is a candle that means business."*
---
## 📈 YM/MYM OPTIMIZATION NOTES
The default settings are tuned for YM's characteristics:
- Lower volatility than NQ/GC/BTC → Tighter gates work better
- 50 pts for S-Tier is already conservative
- 70% body ratio filters out the indecisive noise
- Session requirement is crucial - YM moves on institutional flow
### Low Volume Conditions
The strict gates actually **help** in low volume:
- Wicky candles (common in low vol) get filtered
- Pressure consistency catches fake moves
- CDI prevents thin-body noise from triggering
---
## 🚀 QUICK START
1. Apply v8.1 to your 5-minute YM chart
2. Set intrabar to "1" (1-minute) or "100T" (tick)
3. Watch the CANDLE QUALITY section in the table
4. GOD MODE will now be RARE - but TRUSTWORTHY
5. Check the DENIAL reason if score is 9+ but no ⚡
---
*v8.1 SNIPER STRICT EDITION - "Fat Candles Only"*
*© Alexandro Disla*
DXY Volatility Ranges TableThe Dollar Index (DXY) measures the US dollar's value against a basket of six major currencies, including the Euro, Japanese Yen, British Pound, Canadian Dollar, Swedish Krona, and Swiss Franc. Here are some key ranges for the DXY:
- Historical Highs and Lows:
- All-time high: 164.720 in February 1985
- All-time low: 70.698 on March 16, 2008
- Recent Trends:
- Current value: around 99.603 (as of December 5, 2025)
- 52-week high: 129.670 (November 8, 1985)
- 52-week low: 94.650 (projected target by some analysts)
- Volatility Ranges:
- Low volatility: DXY < 95
- Moderate volatility: DXY between 95-105
- High volatility: DXY > 105
- Support and Resistance Levels:
- Support: around 94.650 and 90.00
- Resistance: around 100.15/35 and 105.00
JRien Position Sizer (Real-Time) — ATR / LOD / Manual % $ RiskReal time position sizing based on real time potential entry price and calculations based on max risk. Usable on multi timeframes. You can also input manually your entry and stop based on your own discretion. I usually use a spreadsheet to calculate these things but wanted a way to see this in real time without needing to type out Entry, ATR, Stops, etc - TradingView has all this information already so why not just have it automatically update!
4 Stop Types:
ATR Based Stop
Based on the stocks ATR (mainly used on daily charts but options if you use other timeframe ATR) and uses a multiple of that ATR to base the plot. Many traders use less than 0.6ATR to base your stop as a rule and max entry 60% from LOD as another rule.
Manual Percent Stop
You're able to input your desired % stop and this will dynamically move with the current entry (last) price.
Manual Price Stop
You're able to input your desired price $ stop and this will dynamically move with the current entry (last) price.
Low of Day (LOD) Stop
Calculates your position based on if you were to have your stop at LOD and also calculates % of ATR away from LOD. Many swing traders use LOD for their stop so this moving dynamically with the current LOD and automatically calculating this is useful.
Calculates:
Entry (Last)
ATR (14 | D)
ATR Stop Price
Manual Stop Percent
Manual Stop Price
Final Stop
Risk per Share ($)
Shares by Risk
Shares by Stake
Final Shares
Final Position Cost
Potential Stop Loss
LOD Price
Loss at LOD
LOD Risk % of Account
LOD dist as % of ATR
Customizable table - can hide items, change color and size.
Also an option to hide historical data - so plots start at market open!
Let me know if any calculations are incorrect, good luck!
- JRien
Paneksu Smart Liquidity & SessionsOVERVIEW:
This indicator is designed for ICT/SMC traders. It visualizes key trading
sessions (Asia, London, New York) and automatically marks significant
High/Low liquidity pools.
KEY FEATURES:
1. Smart Liquidity: Liquidity lines extend into the future and automatically
stop drawing (cut off) once the price sweeps the level. This ensures
only untested liquidity is shown.
2. Precision Anchoring: Lines originate exactly from the pivot High/Low
timestamp for maximum accuracy on higher timeframes.
3. Main Session Focus: Allows you to hide the background box of your
active trading session for the current day to keep the chart clean,
while still showing historical data.
4. Auto-Timeframe: Visuals are automatically disabled on timeframes
higher than 5 minutes to prevent clutter.
SETTINGS:
- Main Trading Session: Select the session you trade to hide its current box.
- Show History: Toggle to keep old swept lines or show only fresh ones.
Santo Graal MMAQuick summary: Blue line above and open = buy Blue line below and open = sell Bands stuck together (purple) = get ready, it’s about to blow!
That’s literally it. Stick to these 3 simple rules and this indicator prints money all year long.
Best timeframes (2025):
5min & 15min → mini index, mini dollar, crypto
1h & 4h → crypto (BTC, SOL, ETH) and stocks
Daily → swing trades lasting weeks (crazy profits with just a few trades)
Yong Fin Growth on ChartBridge the gap between Fundamental Analysis and Technical Price Action.
Yong Fin Growth on Chart is the ultimate tool for "Hybrid Traders" and investors who need to visualize financial performance directly alongside price movements. Stop switching tabs between news sites and your charts—get the full context of why a stock is moving, right where it happens.
This indicator overlays key financial metrics onto your chart, triggered precisely by Earnings Announcements. It allows you to instantly correlate price reactions with fundamental catalysts like Revenue Growth, Margin Expansion, or EPS surprises.
Key Features:
🔹 1. Smart Earnings Trigger The indicator automatically detects Earnings Announcement dates and plots a data label on the exact bar.
Stocks: Aligns with the specific earnings release date to show immediate price reaction.
Funds/ETFs: Supports Fiscal Period End dates for broader instrument analysis.
Includes a vertical line option to visually separate fiscal periods for easy backtesting.
🔹 2. 5 Fully Customizable Data Slots Configure up to 5 independent slots to track the metrics that matter to your strategy. Choose from a comprehensive list including:
Growth: Revenue, Net Income, EBITDA, EPS.
Efficiency: Gross Margin (GPM), Net Margin (NPM), ROE, ROA.
Valuation: P/E, P/S, P/BV, EV/EBITDA, and Implied P/E.
Health: Cash, Debt, Net Debt, Free Cash Flow (FCF).
🔹 3. Dynamic Growth Coloring & Thresholds Instantly identify trend changes with intelligent color coding.
Comparison Modes: Toggle between YoY (Year-over-Year) or QoQ (Quarter-over-Quarter) growth logic.
Custom Thresholds: Define your own standards. For example, set the label to turn Green only if growth exceeds +15%, or Red if it falls below -5%. This helps filter out noise and highlights significant fundamental shifts.
🔹 4. Flexible Period Selection Analyze data across different timeframes to suit your trading style:
FQ: Fiscal Quarter (Short-term momentum)
FY: Fiscal Year (Long-term trend)
TTM: Trailing Twelve Months (Ideal for smooth Valuation ratios)
FH: Fiscal Half (For securities reporting semi-annually)
How to Use:
Add to Chart: Apply the indicator to any stock symbol.
Configure Slots: Go to settings and select the 5 metrics you want to monitor (e.g., Rev, Net Profit, GPM, NPM, P/E).
Set Color Logic: Choose whether you want to color-code based on YoY or QoQ growth.
Analyze: Look for the labels.
Are margins expanding while price is consolidating?
Did the price drop despite a "Green" label? (Market expectations vs. Reality)
Use the vertical lines to see how the trend changed after previous earnings reports.
"Stop guessing. Let the fundamentals guide your technical entries."
Disclaimer: This tool is for educational and analytical purposes only. Past performance does not guarantee future results. Please conduct your own due diligence.
---------------------------------
เชื่อมช่องว่างระหว่างการวิเคราะห์ปัจจัยพื้นฐาน (Fundamental) และกราฟราคาทางเทคนิค (Technical Price Action)
Yong Fin Growth on Chart คือเครื่องมือที่ดีที่สุดสำหรับ "นักลงทุนสายผสม (Hybrid Traders)" และนักลงทุนที่ต้องการเห็นผลประกอบการทางการเงินซ้อนทับไปกับการเคลื่อนไหวของราคาโดยตรง หยุดเสียเวลาสลับหน้าจอไปมาระหว่างเว็บข่าวและกราฟของคุณ—รับรู้บริบททั้งหมดว่าทำไมหุ้นถึงวิ่ง ได้ทันทีบนหน้าจอนี้
อินดิเคเตอร์นี้จะวางค่าทางการเงินที่สำคัญลงบนกราฟ โดยถูกกระตุ้น (Trigger) อย่างแม่นยำด้วย วันประกาศงบ (Earnings Announcements) ช่วยให้คุณเชื่อมโยงปฏิกิริยาของราคา เข้ากับปัจจัยพื้นฐานที่เป็นตัวขับเคลื่อนได้ทันที เช่น การเติบโตของรายได้, การขยายตัวของอัตรากำไร (Margin), หรือกำไรต่อหุ้น (EPS) ที่เซอร์ไพรส์ตลาด
ฟีเจอร์หลัก:
🔹 1. Smart Earnings Trigger (ตัวระบุวันงบออกอัจฉริยะ) อินดิเคเตอร์จะตรวจจับวันประกาศงบอัตโนมัติและพลอตป้ายข้อมูล (Label) ลงบนแท่งเทียนนั้นเป๊ะๆ
หุ้นรายตัว: ตรงกับวันประกาศผลประกอบการจริง เพื่อดูปฏิกิริยาราคาทันที
กองทุน/ETFs: รองรับวันปิดรอบบัญชี (Fiscal Period End) สำหรับการวิเคราะห์สินทรัพย์ประเภทอื่นๆ
มีออปชั่นเส้นแนวตั้ง เพื่อแบ่งช่วงเวลางบแต่ละรอบ ให้ดูย้อนหลัง (Backtest) ได้ง่าย
🔹 2. 5 Fully Customizable Data Slots (ช่องข้อมูลปรับแต่งได้ 5 ช่อง) ตั้งค่าได้ถึง 5 ช่องอิสระ เพื่อติดตามตัวเลขที่สำคัญต่อกลยุทธ์ของคุณ เลือกจากรายการที่ครอบคลุม เช่น:
การเติบโต (Growth): Revenue, Net Income, EBITDA, EPS
ประสิทธิภาพ (Efficiency): Gross Margin (GPM), Net Margin (NPM), ROE, ROA
มูลค่า (Valuation): P/E, P/S, P/BV, EV/EBITDA, และ Implied P/E (ค่าพิเศษที่คุณใส่สูตรไว้)
สุขภาพการเงิน (Health): Cash, Debt, Net Debt, Free Cash Flow (FCF)
🔹 3. Dynamic Growth Coloring & Thresholds (ระบบสีและการตั้งเกณฑ์) ระบุการเปลี่ยนเทรนด์ได้ทันทีด้วยรหัสสีอัจฉริยะ
โหมดเปรียบเทียบ: เลือกสลับได้ระหว่าง YoY (เทียบปีก่อน) หรือ QoQ (เทียบไตรมาสก่อน)
เกณฑ์ที่กำหนดเอง (Custom Thresholds): กำหนดมาตรฐานของคุณเอง ตัวอย่างเช่น ตั้งค่าให้ป้ายเป็น สีเขียว เฉพาะเมื่อโตเกิน +15% หรือเป็น สีแดง เมื่อต่ำกว่า -5% สิ่งนี้ช่วยกรอง Noise และเน้นเฉพาะการเปลี่ยนแปลงพื้นฐานที่มีนัยสำคัญ
🔹 4. Flexible Period Selection (เลือกช่วงเวลาได้ยืดหยุ่น) วิเคราะห์ข้อมูลในกรอบเวลาที่แตกต่างกันตามสไตล์การเทรด:
FQ: รายไตรมาส (Fiscal Quarter) - ดูโมเมนตัมระยะสั้น
FY: รายปี (Fiscal Year) - ดูเทรนด์ระยะยาว
TTM: 12 เดือนย้อนหลัง (Trailing Twelve Months) - เหมาะสำหรับดูค่า Valuation Ratio ให้สมูท
FH: ครึ่งปี (Fiscal Half) - สำหรับหลักทรัพย์ที่ส่งงบแบบครึ่งปี
วิธีใช้งาน:
Add to Chart: ใส่อินดิเคเตอร์ลงในกราฟหุ้นตัวใดก็ได้
Configure Slots: ไปที่การตั้งค่าและเลือก 5 ค่าที่คุณต้องการเฝ้าดู (เช่น Rev, Net Profit, GPM, NPM, P/E)
Set Color Logic: เลือกตรรกะสี ว่าจะให้อิงตามการเติบโตแบบ YoY หรือ QoQ
Analyze: สังเกตป้ายข้อมูล
อัตรากำไร (Margin) ขยายตัวในขณะที่ราคากำลังพักตัวอยู่หรือเปล่า?
ราคาดิ่งลงทั้งๆ ที่ป้ายเป็น "สีเขียว" หรือไม่? (ความคาดหวังตลาด vs ความจริง)
ใช้เส้นแนวตั้งเพื่อดูว่าเทรนด์เปลี่ยนไปอย่างไรหลังจากงบออกในรอบก่อนๆ
"เลิกเดา ให้ปัจจัยพื้นฐานนำทางจุดเข้าซื้อทางเทคนิคของคุณ"
คำเตือน: เครื่องมือนี้มีไว้เพื่อการศึกษาและวิเคราะห์ข้อมูลเท่านั้น ผลการดำเนินงานในอดีตไม่การันตีผลลัพธ์ในอนาคต โปรดศึกษาข้อมูลด้วยตนเอง
Estrategia Trend Following: 52w/26w BreakoutThis is a classic long-term Trend Following strategy, heavily inspired by the Donchian Channel system and the legendary "Turtle Trading" rules. It is designed to capture major market moves (bull runs) while filtering out short-term market noise and volatility.
This script is ideal for investors and swing traders who prefer a "hands-off" approach, looking to catch large trends rather than day-trading small fluctuations.
How it Works:
1. Entry Condition (The Breakout):
52-Week High: The strategy enters a Long position when the price breaks above the highest high of the last 252 trading days (approx. 1 year).
SuperTrend Filter: An additional filter using the SuperTrend indicator ensures that the breakout is supported by positive momentum, helping to reduce false signals during choppy lateral markets.
2. Exit Condition (The Trailing Stop):
26-Week Low: The strategy ignores short-term corrections. It only closes the position if the price closes below the lowest low of the last 126 trading days (approx. 6 months).
This wide stop allows the trade to "breathe" and stay open during significant pullbacks, ensuring you stay in the trend for as long as possible.
Features & Settings:
Customizable Lookback Periods: You can adjust the Entry (default 252 days) and Exit (default 126 days) periods in the settings menu.
Visual Aids:
Blue Line: Represents the 1-Year High (Entry Threshold).
Red Line: Represents the 6-Month Low (Dynamic Stop Loss).
Channel Shading: Visualizes the trading range between the high and low.
Labels: Clearly marks "BUY" and "EXIT" points on the chart.
Recommended Usage:
Timeframe: Daily (1D). This logic is designed for daily candles.
Assets: Works best on assets with strong trending characteristics (e.g., Bitcoin/Crypto, Tech Stocks, Indices like SPX/NDX, and Commodities).
Patience Required: This strategy generates very few signals. It may stay quiet for months and then hold a position for over a year.
RoseTree M2 IndexM2 Money Supply Indicator with 10-Week Offset
This indicator tracks the expansion and contraction of M2 money supply with a 10-week offset, revealing strong correlation with Bitcoin price action. While other traders rely on standard 108/80 day offsets, our modified approach helps front-run market participants as this relationship has become widely recognized alpha.
Use this in combination with our systematic indicators to:
Project potential medium-term market trends
Position before major liquidity-driven moves
Identify divergences that signal potential trend changes
The indicator provides valuable insight into how expanding/contracting liquidity environments affect crypto markets, giving you a meaningful edge in anticipating broader market direction.






















