Tìm kiếm tập lệnh với "xauusd黄金实时价格"
Previous candle - D-T.R.A.D.I.N.G//@version=6
indicator("Previous candle - byDen (Body % line & Wick size) ", overlay=true, max_boxes_count=200, max_lines_count=200, max_labels_count=200)
// ---------------- Inputs ----------------
showHighLow = input.bool(true, "Show High/Low lines")
showHLBox = input.bool(true, "Show High-Low Box (full range)")
showMidLine = input.bool(true, "Show Middle Line")
showCloseLine = input.bool(true, "Show Close Line")
showBodyPct = input.bool(true, "Show Body % Line")
enableWickBox = input.bool(true, "Show Wick-Body Box (previous candle)")
keepLastWick = input.bool(false, "Keep last Wick-Box when disabled")
bodyPct = input.float(25.0, "Body % Level", step=0.1, minval=0.0, maxval=100.0)
// colors / styles
cHighLow = input.color(color.white, "H/L Line Color")
hlStyleStr = input.string("solid", "H/L Style", options= )
hlWidth = input.int(1, "H/L Width", minval=1, maxval=5)
cMid = input.color(color.yellow, "Mid Line Color")
midStyleStr = input.string("dashed", "Mid Style", options= )
midWidth = input.int(1, "Mid Width", minval=1, maxval=5)
cClose = input.color(color.yellow, "Close Line Color")
closeStyleStr = input.string("dotted", "Close Style", options= )
closeWidth = input.int(1, "Close Width", minval=1, maxval=5)
cBoxBorder = input.color(color.red, "HL Box Border")
cBoxFill = color.new(input.color(color.gray, "HL Box Fill"), 85)
cBullBox = color.new(input.color(color.green, "Bull WickBox"), 80)
cBearBox = color.new(input.color(color.red, "Bear WickBox"), 80)
cWboxBorder = input.color(color.white, "WickBox Border")
cBodyPct = input.color(color.blue, "Body % Line Color")
bodyPctStyle = input.string("dashed", "Body % Line Style", options= )
bodyPctWidth = input.int(1, "Body % Line Width", minval=1, maxval=5)
// table colors / pip size
cPipBox = input.color(color.new(color.blue, 80), "Table Background Color")
cPipText = input.color(color.white, "Table Text Color")
pipSize = input.float(0.1, "Pip size (XAUUSD=0.1)", step=0.01)
wickLabelText = input.string("Wick", "Opis za wick")
bodyLabelText = input.string("H/L-Body%", "Opis za H/L-Body%")
descFontSizeStr = input.string("small", "Table Description Font Size", options= )
valFontSizeStr = input.string("normal", "Table Value Font Size", options= )
// custom texts for line labels
txtHigh = input.string("High", "Label Text - High")
txtLow = input.string("Low", "Label Text - Low")
txtMid = input.string("Mid", "Label Text - Mid")
txtClose = input.string("Close", "Label Text - Close")
txtBody = input.string("Body%", "Label Text - Body %")
lineFontSizeStr = input.string("small", "Line Label Font Size", options= )
lineLabelPos = input.string("above", "Line Label Position", options= )
lineLabelAlign = input.string("center", "Line Label Align", options= )
// ---------------- Candle Display Options ----------------
highDisplay = input.string("Both", "High Line Display", options= )
lowDisplay = input.string("Both", "Low Line Display", options= )
midDisplay = input.string("Both", "Mid Line Display", options= )
closeDisplay = input.string("Both", "Close Line Display", options= )
bodyDisplay = input.string("Both", "Body % Line Display", options= )
hlBoxDisplay = input.string("Both", "HL Box Display", options= )
wickBoxDisplay = input.string("Both", "Wick Box Display", options= )
// timeframe filter
enabledTFs = input.string("1,5,15,30,60,240,D", "Enable on timeframes")
// ---------------- Helpers ----------------
is_tf_enabled(tfStr) =>
str.contains("," + enabledTFs + ",", "," + tfStr + ",")
line_style_from_str(s) =>
s == "dotted" ? line.style_dotted : s == "dashed" ? line.style_dashed : line.style_solid
get_font_size(fs) =>
fs == "tiny" ? size.tiny : fs == "small" ? size.small : fs == "large" ? size.large : fs == "huge" ? size.huge : size.normal
get_label_style(a) =>
a == "left" ? label.style_label_left : a == "right" ? label.style_label_right : label.style_label_center
get_y_pos(basePrice, pos) =>
pos == "above" ? basePrice + (syminfo.mintick * 10) : basePrice - (syminfo.mintick * 10)
// ---------------- Data ----------------
tf = timeframe.period
= request.security(syminfo.tickerid, tf, , lookahead=barmerge.lookahead_off)
midLevel = (prevH + prevL) / 2
isBull = prevC > prevO
// ---------------- Persistent ----------------
var line lHigh = na
var line lLow = na
var line lMid = na
var line lClose = na
var line lBodyPct = na
var box bHL = na
var box wickBox = na
var table wickTable = na
var label labHigh = na
var label labLow = na
var label labMid = na
var label labClose = na
var label labBodyPct = na
offsetBars = input.int(20, "Bars right", minval=1, maxval=500)
leftX_base = bar_index
rightX_base = bar_index + offsetBars
if na(wickTable)
wickTable := table.new(position.bottom_right, 2, 2, border_width=1, frame_color=color.white)
// ---------------- DRAW ----------------
if barstate.isconfirmed and is_tf_enabled(tf)
// delete previous labels
if not na(labHigh)
label.delete(labHigh)
labHigh := na
if not na(labLow)
label.delete(labLow)
labLow := na
if not na(labMid)
label.delete(labMid)
labMid := na
if not na(labClose)
label.delete(labClose)
labClose := na
if not na(labBodyPct)
label.delete(labBodyPct)
labBodyPct := na
// --- DRAW HIGH ---
drawHigh = (highDisplay=="Both") or (highDisplay=="Bullish" and isBull) or (highDisplay=="Bearish" and not isBull)
if showHighLow and drawHigh
if not na(lHigh)
line.delete(lHigh)
lHigh := line.new(leftX_base, prevH, rightX_base, prevH, xloc=xloc.bar_index, color=cHighLow, width=hlWidth, style=line_style_from_str(hlStyleStr))
labHigh := label.new(rightX_base, get_y_pos(prevH,lineLabelPos), txtHigh, xloc=xloc.bar_index, yloc=yloc.price, style=get_label_style(lineLabelAlign), textcolor=cHighLow, size=get_font_size(lineFontSizeStr))
// --- DRAW LOW ---
drawLow = (lowDisplay=="Both") or (lowDisplay=="Bullish" and isBull) or (lowDisplay=="Bearish" and not isBull)
if showHighLow and drawLow
if not na(lLow)
line.delete(lLow)
lLow := line.new(leftX_base, prevL, rightX_base, prevL, xloc=xloc.bar_index, color=cHighLow, width=hlWidth, style=line_style_from_str(hlStyleStr))
labLow := label.new(rightX_base, get_y_pos(prevL,lineLabelPos), txtLow, xloc=xloc.bar_index, yloc=yloc.price, style=get_label_style(lineLabelAlign), textcolor=cHighLow, size=get_font_size(lineFontSizeStr))
// --- DRAW MID ---
drawMid = (midDisplay=="Both") or (midDisplay=="Bullish" and isBull) or (midDisplay=="Bearish" and not isBull)
if showMidLine and drawMid
if not na(lMid)
line.delete(lMid)
lMid := line.new(leftX_base, midLevel, rightX_base, midLevel, xloc=xloc.bar_index, color=cMid, width=midWidth, style=line_style_from_str(midStyleStr))
labMid := label.new(rightX_base, get_y_pos(midLevel,lineLabelPos), txtMid, xloc=xloc.bar_index, yloc=yloc.price, style=get_label_style(lineLabelAlign), textcolor=cMid, size=get_font_size(lineFontSizeStr))
// --- DRAW CLOSE ---
drawClose = (closeDisplay=="Both") or (closeDisplay=="Bullish" and isBull) or (closeDisplay=="Bearish" and not isBull)
if showCloseLine and drawClose
if not na(lClose)
line.delete(lClose)
lClose := line.new(leftX_base, prevC, rightX_base, prevC, xloc=xloc.bar_index, color=cClose, width=closeWidth, style=line_style_from_str(closeStyleStr))
labClose := label.new(rightX_base, get_y_pos(prevC,lineLabelPos), txtClose, xloc=xloc.bar_index, yloc=yloc.price, style=get_label_style(lineLabelAlign), textcolor=cClose, size=get_font_size(lineFontSizeStr))
// --- DRAW BODY% ---
float bodySize = math.abs(prevC-prevO)
float levelPct = na
drawBody = (bodyDisplay=="Both") or (bodyDisplay=="Bullish" and isBull) or (bodyDisplay=="Bearish" and not isBull)
if showBodyPct and bodySize>0 and drawBody
if not na(lBodyPct)
line.delete(lBodyPct)
levelPct := isBull ? (prevC - (bodyPct/100)*bodySize) : (prevC + (bodyPct/100)*bodySize)
lBodyPct := line.new(leftX_base, levelPct, rightX_base, levelPct, xloc=xloc.bar_index, color=cBodyPct, width=bodyPctWidth, style=line_style_from_str(bodyPctStyle))
labBodyPct := label.new(rightX_base, get_y_pos(levelPct,lineLabelPos), txtBody, xloc=xloc.bar_index, yloc=yloc.price, style=get_label_style(lineLabelAlign), textcolor=cBodyPct, size=get_font_size(lineFontSizeStr))
// --- BOXES ---
drawHLBox = (hlBoxDisplay=="Both") or (hlBoxDisplay=="Bullish" and isBull) or (hlBoxDisplay=="Bearish" and not isBull)
if showHLBox and drawHLBox
if not na(bHL)
box.delete(bHL)
bHL := box.new(leftX_base, prevH, rightX_base, prevL, xloc=xloc.bar_index, border_color=cBoxBorder, bgcolor=cBoxFill)
drawWickBox = (wickBoxDisplay=="Both") or (wickBoxDisplay=="Bullish" and isBull) or (wickBoxDisplay=="Bearish" and not isBull)
if enableWickBox and drawWickBox
float topP = isBull ? prevH : prevC
float botP = isBull ? prevC : prevL
if not na(topP) and not na(botP)
if not na(wickBox)
box.delete(wickBox)
wickBox := box.new(leftX_base, topP, rightX_base, botP, xloc=xloc.bar_index, border_color=cWboxBorder, bgcolor=(isBull?cBullBox:cBearBox))
else if not enableWickBox and not keepLastWick and not na(wickBox)
box.delete(wickBox)
wickBox := na
// --- TABLE (vedno na obeh) ---
float wickPips = isBull ? prevH-prevC : prevC-prevL
float bodyPips = na
if not na(levelPct)
bodyPips := isBull ? math.round((prevH-levelPct)/pipSize) : math.round((levelPct-prevL)/pipSize)
table.cell(wickTable, 0, 0, wickLabelText, text_color=cPipText, bgcolor=cPipBox, text_size=get_font_size(descFontSizeStr))
table.cell(wickTable, 1, 0, str.tostring(wickPips/pipSize), text_color=cPipText, bgcolor=cPipBox, text_size=get_font_size(valFontSizeStr))
if not na(bodyPips)
table.cell(wickTable, 0, 1, bodyLabelText, text_color=cPipText, bgcolor=cPipBox, text_size=get_font_size(descFontSizeStr))
table.cell(wickTable, 1, 1, str.tostring(bodyPips), text_color=cPipText, bgcolor=cPipBox, text_size=get_font_size(valFontSizeStr))
Previous candle - byDen (Body % line & Wick size)
//@version=6
indicator("Previous candle - byDen (Body % line & Wick size) ", overlay=true, max_boxes_count=200, max_lines_count=200, max_labels_count=200)
// ---------------- Inputs ----------------
showHighLow = input.bool(true, "Show High/Low lines")
showHLBox = input.bool(true, "Show High-Low Box (full range)")
showMidLine = input.bool(true, "Show Middle Line")
showCloseLine = input.bool(true, "Show Close Line")
showBodyPct = input.bool(true, "Show Body % Line")
enableWickBox = input.bool(true, "Show Wick-Body Box (previous candle)")
keepLastWick = input.bool(false, "Keep last Wick-Box when disabled")
bodyPct = input.float(25.0, "Body % Level", step=0.1, minval=0.0, maxval=100.0)
// colors / styles
cHighLow = input.color(color.white, "H/L Line Color")
hlStyleStr = input.string("solid", "H/L Style", options= )
hlWidth = input.int(1, "H/L Width", minval=1, maxval=5)
cMid = input.color(color.yellow, "Mid Line Color")
midStyleStr = input.string("dashed", "Mid Style", options= )
midWidth = input.int(1, "Mid Width", minval=1, maxval=5)
cClose = input.color(color.yellow, "Close Line Color")
closeStyleStr = input.string("dotted", "Close Style", options= )
closeWidth = input.int(1, "Close Width", minval=1, maxval=5)
cBoxBorder = input.color(color.red, "HL Box Border")
cBoxFill = color.new(input.color(color.gray, "HL Box Fill"), 85)
cBullBox = color.new(input.color(color.green, "Bull WickBox"), 80)
cBearBox = color.new(input.color(color.red, "Bear WickBox"), 80)
cWboxBorder = input.color(color.white, "WickBox Border")
cBodyPct = input.color(color.blue, "Body % Line Color")
bodyPctStyle = input.string("dashed", "Body % Line Style", options= )
bodyPctWidth = input.int(1, "Body % Line Width", minval=1, maxval=5)
// wick label
cPipBox = input.color(color.new(color.blue, 80), "Wick Box Color")
cPipText = input.color(color.white, "Wick Text Color")
pipSize = input.float(0.1, "Pip size (XAUUSD=0.1)", step=0.01)
// Label settings
showLabels = input.bool(true, "Show Line Labels")
labelAbove = input.bool(true, "Labels Above Line?")
fontSizeStr = input.string("normal", "Label Font Size", options= )
labelAlignX = input.string("center", "Label Alignment", options= )
// custom texts for labels
txtHigh = input.string("High", "Label Text - High")
txtLow = input.string("Low", "Label Text - Low")
txtMid = input.string("Mid", "Label Text - Mid")
txtClose = input.string("Close", "Label Text - Close")
txtBody = input.string("Body %", "Label Text - Body %")
// Wick pips font size (same options)
wickFontSizeStr = input.string("normal", "Wick Pips Font Size", options= )
// timeframe filter
enabledTFs = input.string("1,5,15,30,60,240,D", "Enable on timeframes")
// ---------------- Helpers ----------------
is_tf_enabled(tfStr) =>
str.contains("," + enabledTFs + ",", "," + tfStr + ",")
line_style_from_str(s) =>
s == "dotted" ? line.style_dotted : s == "dashed" ? line.style_dashed : line.style_solid
get_label_style(_align) =>
_align == "left" ? label.style_label_left : _align == "right" ? label.style_label_right : label.style_label_center
get_font_size(fs) =>
if fs == "tiny"
size.tiny
else if fs == "small"
size.small
else if fs == "large"
size.large
else if fs == "huge"
size.huge
else
size.normal
// ---------------- Data ----------------
tf = timeframe.period
= request.security(syminfo.tickerid, tf, , lookahead=barmerge.lookahead_off)
midLevel = (prevH + prevL) / 2
isBull = prevC > prevO
// ---------------- Persistent ----------------
var line lHigh = na
var line lLow = na
var line lMid = na
var line lClose = na
var line lBodyPct = na
var box bHL = na
var box wickBox = na
var table wickTable = na
// labels
var label labHigh = na
var label labLow = na
var label labMid = na
var label labClose = na
var label labBody = na
offsetBars = input.int(20, "Bars right", minval=1, maxval=500)
leftX_base = bar_index
rightX_base = bar_index + offsetBars
if na(wickTable)
wickTable := table.new(position.bottom_right, 1, 1, border_width=1, frame_color=color.white)
// ---------------- DRAW ----------------
if barstate.isconfirmed and is_tf_enabled(tf)
// clean old labels
if not na(labHigh)
label.delete(labHigh)
if not na(labLow)
label.delete(labLow)
if not na(labMid)
label.delete(labMid)
if not na(labClose)
label.delete(labClose)
if not na(labBody)
label.delete(labBody)
// style for labels
labStyle = get_label_style(labelAlignX)
labSize = get_font_size(fontSizeStr)
wickSize = get_font_size(wickFontSizeStr)
yOffset = labelAbove ? 1 : -1
if showHighLow
if not na(lHigh)
line.delete(lHigh)
if not na(lLow)
line.delete(lLow)
lHigh := line.new(leftX_base, prevH, rightX_base, prevH, xloc=xloc.bar_index, color=cHighLow, width=hlWidth, style=line_style_from_str(hlStyleStr))
lLow := line.new(leftX_base, prevL, rightX_base, prevL, xloc=xloc.bar_index, color=cHighLow, width=hlWidth, style=line_style_from_str(hlStyleStr))
if showLabels
labHigh := label.new(rightX_base, prevH + yOffset*syminfo.mintick, txtHigh, xloc=xloc.bar_index, yloc=yloc.price, style=labStyle, textcolor=cHighLow, size=labSize)
labLow := label.new(rightX_base, prevL + yOffset*syminfo.mintick, txtLow, xloc=xloc.bar_index, yloc=yloc.price, style=labStyle, textcolor=cHighLow, size=labSize)
if showMidLine
if not na(lMid)
line.delete(lMid)
lMid := line.new(leftX_base, midLevel, rightX_base, midLevel, xloc=xloc.bar_index, color=cMid, width=midWidth, style=line_style_from_str(midStyleStr))
if showLabels
labMid := label.new(rightX_base, midLevel + yOffset*syminfo.mintick, txtMid, xloc=xloc.bar_index, yloc=yloc.price, style=labStyle, textcolor=cMid, size=labSize)
if showCloseLine
if not na(lClose)
line.delete(lClose)
lClose := line.new(leftX_base, prevC, rightX_base, prevC, xloc=xloc.bar_index, color=cClose, width=closeWidth, style=line_style_from_str(closeStyleStr))
if showLabels
labClose := label.new(rightX_base, prevC + yOffset*syminfo.mintick, txtClose, xloc=xloc.bar_index, yloc=yloc.price, style=labStyle, textcolor=cClose, size=labSize)
if showBodyPct
if not na(lBodyPct)
line.delete(lBodyPct)
float bodySize = math.abs(prevC - prevO)
if bodySize > 0
float levelPct = isBull ? (prevC - (bodyPct/100.0) * bodySize) : (prevC + (bodyPct/100.0) * bodySize)
lBodyPct := line.new(leftX_base, levelPct, rightX_base, levelPct, xloc=xloc.bar_index, color=cBodyPct, width=bodyPctWidth, style=line_style_from_str(bodyPctStyle))
if showLabels
labBody := label.new(rightX_base, levelPct + yOffset*syminfo.mintick, txtBody + " " + str.tostring(bodyPct), xloc=xloc.bar_index, yloc=yloc.price, style=labStyle, textcolor=cBodyPct, size=labSize)
if showHLBox
if not na(bHL)
box.delete(bHL)
bHL := box.new(leftX_base, prevH, rightX_base, prevL, xloc=xloc.bar_index, border_color=cBoxBorder, bgcolor=cBoxFill)
if not enableWickBox
if not na(wickBox) and not keepLastWick
box.delete(wickBox)
wickBox := na
else
float topP = isBull ? prevH : prevC
float botP = isBull ? prevC : prevL
if not na(topP) and not na(botP)
if not na(wickBox)
box.delete(wickBox)
wickBox := box.new(leftX_base, topP, rightX_base, botP, xloc=xloc.bar_index, border_color=cWboxBorder, bgcolor=(isBull ? cBullBox : cBearBox))
// wick izračun (v pipih)
float wickPips = isBull ? prevH - prevC : prevC - prevL
float wickInPips = math.round(wickPips / pipSize)
// prikaži samo številko v desnem spodnjem kotu (z nastavljivo velikostjo)
table.cell(wickTable, 0, 0, str.tostring(wickInPips), text_color=cPipText, bgcolor=cPipBox, text_size=wickSize)
MACD Forecast [Titans_Invest]MACD Forecast — The Future of MACD in Trading
The MACD has always been one of the most powerful tools in technical analysis.
But what if you could see where it’s going, instead of just reacting to what has already happened?
Introducing MACD Forecast — the natural evolution of the MACD Full , now taken to the next level. It’s the world’s first MACD designed not only to analyze the present but also to predict the future behavior of momentum.
By combining the classic MACD structure with projections powered by Linear Regression, this indicator gives traders an anticipatory, predictive view, redefining what’s possible in technical analysis.
Forget lagging indicators.
This is the smartest, most advanced, and most accurate MACD ever created.
🍟 WHY MACD FORECAST IS REVOLUTIONARY
Unlike the traditional MACD, which only reflects current and past price dynamics, the MACD Forecast uses regression-based projection models to anticipate where the MACD line, signal line, and histogram are heading.
This means traders can:
• See MACD crossovers before they happen.
• Spot trend reversals earlier than most.
• Gain an unprecedented timing advantage in both discretionary and automated trading.
In other words: this indicator lets you trade ahead of time.
🔮 FORECAST ENGINE — POWERED BY LINEAR REGRESSION
At its core, the MACD Forecast integrates Linear Regression (ta.linreg) to project the MACD’s future behavior with exceptional accuracy.
Projection Modes:
• Flat Projection: Assumes trend continuity at the current level.
• LinReg Projection: Applies linear regression across N periods to mathematically forecast momentum shifts.
This dual system offers both a conservative and adaptive view of market direction.
📐 ACCURACY WITH FULL CUSTOMIZATION
Just like the MACD Full, this new version comes with 20 customizable buy-entry conditions and 20 sell-entry conditions — now enhanced with forecast-based rules that anticipate crossovers and trend reversals.
You’re not just reacting — you’re strategizing ahead of time.
⯁ HOW TO USE MACD FORECAST❓
The MACD Forecast is built on the same foundation as the classic MACD, but with predictive capabilities.
Step 1 — Spot Predicted Crossovers:
Watch for forecasted bullish or bearish crossovers. These signals anticipate when the MACD line will cross the signal line in the future, letting you prepare trades before the move.
Step 2 — Confirm with Histogram Projection:
Use the projected histogram to validate momentum direction. A rising histogram signals strengthening bullish momentum, while a falling projection points to weakening or bearish conditions.
Step 3 — Combine with Multi-Timeframe Analysis:
Use forecasts across multiple timeframes to confirm signal strength (e.g., a 1h forecast aligned with a 4h forecast).
Step 4 — Set Entry Conditions & Automation:
Customize your buy/sell rules with the 20 forecast-based conditions and enable automation for bots or alerts.
Step 5 — Trade Ahead of the Market:
By preparing for future momentum shifts instead of reacting to the past, you’ll always stay one step ahead of lagging traders.
🤖 BUILT FOR AUTOMATION AND BOTS 🤖
Whether for manual trading, quantitative strategies, or advanced algorithms, the MACD Forecast was designed to integrate seamlessly with automated systems.
With predictive logic at its core, your strategies can finally react to what’s coming, not just what already happened.
🥇 WHY THIS INDICATOR IS UNIQUE 🥇
• World’s first MACD with Linear Regression Forecasting
• Predictive Crossovers (before they appear on the chart)
• Maximum flexibility with Long & Short combinations — 20+ fully configurable conditions for tailor-made strategies
• Fully automatable for quantitative systems and advanced bots
This isn’t just an update.
It’s the final evolution of the MACD.
______________________________________________________
🔹 CONDITIONS TO BUY 📈
______________________________________________________
• Signal Validity: The signal will remain valid for X bars .
• Signal Sequence: Configurable as AND or OR .
🔹 MACD > Signal Smoothing
🔹 MACD < Signal Smoothing
🔹 Histogram > 0
🔹 Histogram < 0
🔹 Histogram Positive
🔹 Histogram Negative
🔹 MACD > 0
🔹 MACD < 0
🔹 Signal > 0
🔹 Signal < 0
🔹 MACD > Histogram
🔹 MACD < Histogram
🔹 Signal > Histogram
🔹 Signal < Histogram
🔹 MACD (Crossover) Signal
🔹 MACD (Crossunder) Signal
🔹 MACD (Crossover) 0
🔹 MACD (Crossunder) 0
🔹 Signal (Crossover) 0
🔹 Signal (Crossunder) 0
🔮 MACD (Crossover) Signal Forecast
🔮 MACD (Crossunder) Signal Forecast
______________________________________________________
______________________________________________________
🔸 CONDITIONS TO SELL 📉
______________________________________________________
• Signal Validity: The signal will remain valid for X bars .
• Signal Sequence: Configurable as AND or OR .
🔸 MACD > Signal Smoothing
🔸 MACD < Signal Smoothing
🔸 Histogram > 0
🔸 Histogram < 0
🔸 Histogram Positive
🔸 Histogram Negative
🔸 MACD > 0
🔸 MACD < 0
🔸 Signal > 0
🔸 Signal < 0
🔸 MACD > Histogram
🔸 MACD < Histogram
🔸 Signal > Histogram
🔸 Signal < Histogram
🔸 MACD (Crossover) Signal
🔸 MACD (Crossunder) Signal
🔸 MACD (Crossover) 0
🔸 MACD (Crossunder) 0
🔸 Signal (Crossover) 0
🔸 Signal (Crossunder) 0
🔮 MACD (Crossover) Signal Forecast
🔮 MACD (Crossunder) Signal Forecast
______________________________________________________
______________________________________________________
🔮 Linear Regression Function 🔮
______________________________________________________
• Our indicator includes MACD forecasts powered by linear regression.
Forecast Types:
• Flat: Assumes prices will stay the same.
• Linreg: Makes a 'Linear Regression' forecast for n periods.
Technical Information:
• Function: ta.linreg()
Parameters:
• source: Source price series.
• length: Number of bars (period).
• offset : Offset.
• return: Linear regression curve.
______________________________________________________
______________________________________________________
⯁ UNIQUE FEATURES
______________________________________________________
Linear Regression: (Forecast)
Signal Validity: The signal will remain valid for X bars
Signal Sequence: Configurable as AND/OR
Table of Conditions: BUY/SELL
Conditions Label: BUY/SELL
Plot Labels in the graph above: BUY/SELL
Automate & Monitor Signals/Alerts: BUY/SELL
Linear Regression (Forecast)
Signal Validity: The signal will remain valid for X bars
Signal Sequence: Configurable as AND/OR
Table of Conditions: BUY/SELL
Conditions Label: BUY/SELL
Plot Labels in the graph above: BUY/SELL
Automate & Monitor Signals/Alerts: BUY/SELL
______________________________________________________
📜 SCRIPT : MACD Forecast
🎴 Art by : @Titans_Invest & @DiFlip
👨💻 Dev by : @Titans_Invest & @DiFlip
🎑 Titans Invest — The Wizards Without Gloves 🧤
✨ Enjoy!
______________________________________________________
o Mission 🗺
• Inspire Traders to manifest Magic in the Market.
o Vision 𐓏
• To elevate collective Energy 𐓷𐓏
🎗️ In memory of João Guilherme — your light will live on forever.
Gold Lagging (N days)This indicator overlays the price of gold (XAUUSD) on any chart with a customizable lag in days. You can choose the price source (open, high, low, close, hlc3, ohlc4), shift the series by a set number of daily bars, and optionally normalize the values so that the first visible bar equals 100. The original gold line can also be displayed alongside the lagged series for direct comparison.
It is especially useful for analyzing delayed correlations between gold and other assets, observing shifts in safe-haven demand, or testing hypotheses about lagging market reactions. Since the lag is calculated on daily data, it remains consistent even if applied on intraday charts, while the indicator itself can be plotted on a separate price scale for clarity.
이 지표는 금(XAUUSD) 가격을 원하는 차트 위에 N일 지연된 형태로 표시합니다. 가격 소스(시가, 고가, 저가, 종가, hlc3, ohlc4)를 선택할 수 있으며, 지정한 일 수만큼 시리즈를 뒤로 이동시킬 수 있습니다. 또한 첫 값 기준으로 100에 맞춰 정규화하거나, 원래 금 가격선을 함께 표시해 비교할 수도 있습니다.
금과 다른 자산 간의 지연 상관관계를 분석하거나 안전자산 수요 변화를 관찰할 때 유용하며, 시장 반응의 시차 효과를 검증하는 데에도 활용할 수 있습니다. 지연은 일봉 데이터 기준으로 계산되므로 단기 차트에 적용해도 일 단위 기준이 유지되며, 별도의 가격 스케일에 표시되어 가독성을 높일 수 있습니다.
AI Trading Alerts v6 — SL/TP + Confidence + Panel (Fixed)Overview
This Pine Script is designed to identify high-probability trading opportunities in Forex, commodities, and crypto markets. It combines EMA trend filters, RSI, and Stochastic RSI, with automatic stop-loss (SL) & take-profit (TP) suggestions, and provides a confidence panel to quickly assess the trade setup strength.
It also includes TradingView alert conditions so you can set up notifications for Long/Short setups and EMA crosses.
⚙️ Features
EMA Trend Filter
Uses EMA 50, 100, 200 for trend confirmation.
Bull trend = EMA50 > EMA100 > EMA200
Bear trend = EMA50 < EMA100 < EMA200
RSI Filter
Bullish trades require RSI > 50
Bearish trades require RSI < 50
Stochastic RSI Filter
Prevents entries during overbought/oversold extremes.
Bullish entry only if %K and %D < 80
Bearish entry only if %K and %D > 20
EMA Proximity Check
Price must be near EMA50 (within ATR × adjustable multiplier).
Signals
Continuation Signals:
Long if all bullish conditions align.
Short if all bearish conditions align.
Cross Events:
Long Cross when price crosses above EMA50 in bull trend.
Short Cross when price crosses below EMA50 in bear trend.
Automatic SL/TP Suggestions
SL size adjusts depending on asset:
Gold/Silver (XAU/XAG): 5 pts
Bitcoin/Ethereum: 100 pts
FX pairs (default): 20 pts
TP = SL × Risk:Reward ratio (default 1:2).
Confidence Score (0–4)
Based on conditions met (trend, RSI, Stoch, EMA proximity).
Labels:
Strongest (4/4)
Strong (3/4)
Medium (2/4)
Low (1/4)
Visual Panel on Chart
Shows ✅/❌ for each condition (trend, RSI, Stoch, EMA proximity, signal now).
Confidence row with color-coded strength.
Alerts
Long Setup
Short Setup
Long Cross
Short Cross
🖥️ How to Use
1. Add the Script
Open TradingView → Pine Editor.
Paste the full script.
Click Add to chart.
Save as "AI Trading Alerts v6 — SL/TP + Confidence + Panel".
2. Configure Inputs
EMA Lengths: Default 50/100/200 (works well for swing trading).
RSI Length: 14 (standard).
Stochastic Length/K/D: Default 14/3/3.
Risk:Reward Ratio: Default 2.0 (can change to 1.5, 3.0, etc.).
EMA Proximity Threshold: Default 0.20 × ATR (adjust to be stricter/looser).
3. Read the Panel
Top-right of chart, you’ll see ✅ or ❌ for:
Trend → Are EMAs aligned?
RSI → Above 50 (bull) or below 50 (bear)?
Stoch OK → Not extreme?
Near EMA50 → Close enough to EMA50?
Above/Below OK → Price position vs. EMA50 matches trend?
Signal Now → Entry triggered?
Confidence row:
🟢 Green = Strongest
🟩 Light green = Strong
🟧 Orange = Medium
🟨 Yellow = Low
⬜ Gray = None
4. Alerts Setup
Go to TradingView Alerts (⏰ icon).
Choose the script under “Condition”.
Select alert type:
Long Setup
Short Setup
Long Cross
Short Cross
Set notification method (popup, sound, email, mobile).
Click Create.
Now TradingView will notify you automatically when signals appear.
5. Example Workflow
Wait for Confidence = Strong/Strongest.
Check if market session supports volatility (e.g., XAU in London/NY).
Review SL/TP suggestions:
Long → Entry: current price, SL: close - risk_pts, TP: close + risk_pts × RR.
Short → Entry: current price, SL: close + risk_pts, TP: close - risk_pts × RR.
Adjust based on your own price action analysis.
📊 Best Practices
Use on H1 + D1 combo → align higher timeframe bias with intraday entries.
Risk only 1–2% of account per trade (position sizing required).
Filter with market sessions (Asia, Europe, US).
Strongest signals work best with trending pairs (e.g., XAUUSD, USDJPY, BTCUSD).
VOLUME Full [Titans_Invest]VOLUME Full
Designed for traders who want to take volume analysis to the next level.
This version delivers deeper insight into volume activity, integrating multiple customizable filters to highlight key buying and selling pressure. It's a comprehensive solution for volume-based decision-making.
⯁ WHAT IS THE VOLUME❓
The Volume indicator is a fundamental technical analysis tool that measures the number of shares or contracts traded in a security or market during a given period. It helps traders and investors understand the strength or weakness of a price movement, confirm trends, and predict potential reversals. Volume is typically displayed as a histogram below a price chart, with each bar representing the volume traded during a specific time interval.
⯁ HOW TO USE THE VOLUME❓
The Volume indicator can be used in several ways to enhance trading decisions:
• Trend Confirmation: High volume during a price move confirms the strength of that trend, while low volume can indicate a weak or unsustainable trend.
• Breakouts: A price breakout from a pattern or range accompanied by high volume is more likely to be valid and sustainable.
• Divergence: When the price moves in one direction and volume moves in the opposite direction, it can signal a potential reversal.
• Overbought/Oversold Conditions: Extreme volume levels can sometimes indicate that an asset is overbought or oversold, though this is less straightforward than with oscillators like the RSI.
⯁ ENTRY CONDITIONS
The conditions below are fully flexible and allow for complete customization of the signal.
______________________________________________________
🔹 CONDITIONS TO BUY 📈
______________________________________________________
▪︎ Signal Validity: The signal will remain valid for X bars .
▪︎ Signal Sequence: Configurable as AND or OR .
🔹 volume Positive
🔹 volume Negative
🔹 volume > volume
🔹 volume < volume
🔹 volume > volume_MA
🔹 volume > volume_MA * Trigger Signal (close > open)
🔹 volume > volume_MA * Trigger Signal (Keep State P)
🔹 volume > volume_MA * Trigger Signal (close < open)
🔹 volume > volume_MA * Trigger Signal (Keep State N)
______________________________________________________
______________________________________________________
🔸 CONDITIONS TO SELL 📉
______________________________________________________
▪︎ Signal Validity: The signal will remain valid for X bars .
▪︎ Signal Sequence: Configurable as AND or OR .
🔸 volume Positive
🔸 volume Negative
🔸 volume > volume
🔸 volume < volume
🔸 volume > volume_MA
🔸 volume > volume_MA * Trigger Signal (close > open)
🔸 volume > volume_MA * Trigger Signal (Keep State P)
🔸 volume > volume_MA * Trigger Signal (close < open)
🔸 volume > volume_MA * Trigger Signal (Keep State N)
______________________________________________________
______________________________________________________
🤖 AUTOMATION 🤖
• You can automate the BUY and SELL signals of this indicator.
______________________________________________________
______________________________________________________
⯁ UNIQUE FEATURES
______________________________________________________
Signal Validity: The signal will remain valid for X bars
Signal Sequence: Configurable as AND/OR
Condition Table: BUY/SELL
Condition Labels: BUY/SELL
Plot Labels in the Graph Above: BUY/SELL
Displays Positive & Negative Volume.
Automate and Monitor Signals/Alerts: BUY/SELL
Signal Validity: The signal will remain valid for X bars
Signal Sequence: Configurable as AND/OR
Table of Conditions: BUY/SELL
Conditions Label: BUY/SELL
Plot Labels in the graph above: BUY/SELL
Displays Positive & Negative Volume.
Automate & Monitor Signals/Alerts: BUY/SELL
______________________________________________________
📜 SCRIPT : VOLUME Full
🎴 Art by : @Titans_Invest & @DiFlip
👨💻 Dev by : @Titans_Invest & @DiFlip
🎑 Titans Invest — The Wizards Without Gloves 🧤
✨ Enjoy!
______________________________________________________
o Mission 🗺
• Inspire Traders to manifest Magic in the Market.
o Vision 𐓏
• To elevate collective Energy 𐓷𐓏
ORB + Session VWAP Pro (London & NY) — fixedORB + Session VWAP Pro (London & NY) — Listing copy (EN)
What it is
A clean, non-repainting intraday tool that fuses the classic Opening Range Breakout (ORB) with a session-anchored VWAP filter for London and New York. It highlights only the higher-quality breakouts (above/below session VWAP), adds an optional retest confirmation, and scores each signal with an intuitive Confidence metric (0–100).
Why it works
• ORB provides the day’s first actionable structure (range high/low).
• Session VWAP filters “cheap” breaks and favors flows aligned with session value.
• Optional retest reduces first-tick whipsaws.
• Confidence blends breakout depth (vs ATR), VWAP slope and band distance.
Key visuals
• LDN/NY OR High/Low (line break style) + optional OR boxes.
• Active Session VWAP (resets per signal window; falls back to daily VWAP outside).
• Optional VWAP bands (stdev or %).
• Session shading (London/NY windows).
• Signal markers (LDN BUY/SELL, NY BUY/SELL) fired with cooldown.
Signals
• London Long / Short: Break of LDN OR High/Low ± ATR buffer, aligned with VWAP side.
• NY Long / Short: Same logic during NY window.
• Retest (optional): Requires a tag back to the OR level ± tolerance before confirmation.
• Confidence: 0–100; gate via Min Confidence (default 55).
Inputs that matter
• Open Range Length (min): Default 15.
• London/NY times & timezones.
• ATR buffer & retest tolerance.
• Bands mode: Stdev (with lookback) or % (e.g., 1%).
• Signal cooldown: Avoids clutter on fast moves.
Non-repaint policy
• OR lines build within fixed time windows using the current bar’s timestamp.
• VWAP is cumulative within the session window; no lookahead.
• All ta.crossover/ta.crossunder are precomputed every bar (no conditional execution).
• Signals are based on live bar values, not future bars.
⸻
Quick start (examples)
1) EURUSD, London momentum
• Chart: 5m or 15m.
• OR: 15 min starting 08:00 Europe/London.
• Signals: Use defaults; keep ATR buffer = 0.2 and Retest = ON, Min Confidence ≥ 55.
• Play:
• BUY when price breaks LDN OR High + buffer and stays above VWAP; retest confirms.
• Trail behind VWAP or band #1; partials into band #2.
2) NAS100, New York breakout & run
• Chart: 5m.
• NY window: 09:30 America/New_York, OR = 15 min.
• Retest OFF on high momentum days; Min Confidence ≥ 60.
• Use band mode Stdev, bandLen=50, show ±1/±2.
• Momentum continuation: add on pullbacks that hold above VWAP after the breakout.
3) XAUUSD, London fake & VWAP fade
• Chart: 5m.
• Keep Retest ON; accept only shorts that break OR Low but retest fails back under VWAP.
• Confidence gate ≥ 50 to allow more mean-reversion setups.
⸻
Pro tips
• Adjust ATR buffer to the instrument: FX 0.15–0.25, indices 0.20–0.35, metals 0.20–0.30.
• Retest ON for choppy conditions; OFF for news momentum.
• Use VWAP bands: take partials at ±1; stretch targets at ±2/±3.
• Session timezones are explicit (London/New York). Ensure they match your instrument’s behavior.
• Pair with a higher-TF bias (e.g., 1H/4H trend) for directional filtering.
⸻
Alerts (ready to use)
• ORB+SVWAP — LDN Long, LDN Short, NY Long, NY Short
(Respect your cooldown; alerts fire only after confirmation and confidence gate.)
⸻
Known limits & notes
• Designed for intraday. On 1D+ charts, session windows compress.
• If your broker session differs from London/NY clocks on a holiday, adjust input times.
• Session-anchored VWAP uses the script’s signal window, not exchange sessions, by design.
DynamoSent DynamoSent Pro+ — Professional Listing (Preview)
— Adaptive Macro Sentiment (v6)
— Export, Adaptive Lookback, Confidence, Boxes, Heatmap + Dynamic OB/OS
Preview / Experimental build. I’m actively refining this tool—your feedback is gold.
If you spot edge cases, want new presets, or have market-specific ideas, please comment or DM me on TradingView.
⸻
What it is
DynamoSent Pro+ is an adaptive, non-repainting macro sentiment engine that compresses VIX, DXY and a price-based activity proxy (e.g., SPX/sector ETF/your symbol) into a 0–100 sentiment line. It scales context by volatility (ATR%) and can self-calibrate with rolling quantile OB/OS. On top of that, it adds confidence scoring, a plain-English Context Coach, MTF agreement, exportable sentiment for other indicators, and a clean Light/Dark UI.
Why it’s different
• Adaptive lookback tracks regime changes: when volatility rises, we lengthen context; when it falls, we shorten—less whipsaw, more relevance.
• Dynamic OB/OS (quantiles) self-calibrates to each instrument’s distribution—no arbitrary 30/70 lines.
• MTF agreement + Confidence gate reduce false positives by highlighting alignment across timeframes.
• Exportable output: hidden plot “DynamoSent Export” can be selected as input.source in your other Pine scripts.
• Non-repainting rigor: all request.security() calls use lookahead_off + gaps_on; signals wait for bar close.
Key visuals
• Sentiment line (0–100), OB/OS zones (static or dynamic), optional TF1/TF2 overlays.
• Regime boxes (Overbought / Oversold / Neutral) that update live without repaint.
• Info Panel with confidence heat, regime, trend arrow, MTF readout, and Coach sentence.
• Session heat (Asia/EU/US) to match intraday behavior.
• Light/Dark theme switch in Inputs (auto-contrasted labels & headers).
⸻
How to use (examples & recipes)
1) EURUSD (swing / intraday blend)
• Preset: EURUSD 1H Swing
• Chart: 1H; TF1=1H, TF2=4H (default).
• Proxies: Defaults work (VIX=D, DXY=60, Proxy=D).
• Dynamic OB/OS: ON at 20/80; Confidence ≥ 55–60.
• Playbook:
• When sentiment crosses above 50 + margin with Δ ≥ signalK and MTF agreement ≥ 0.5, treat as trend breakout.
• In Oversold with rising Coach & TF agreement, take fade longs back toward mid-range.
• Alerts: Enable Breakout Long/Short and Fade; keep cooldown 8–12 bars.
2) SPY (daytrading)
• Preset: SPY 15m Daytrade; Chart: 15m.
• VIX (D) matters more; preset weights already favor it.
• Start with static 30/70; later try dynamic 25/75 for adaptive thresholds.
• Use Coach: in US session, when it says “Overbought + MTF agree → sell rallies / chase breakouts”, lean momentum-continuation after pullbacks.
3) BTCUSD (crypto, 24/7)
• Preset: BTCUSD 1H; Chart: 1H.
• DXY and BTC.D inform macro tone; keep Carry-forward ON to bridge sparse ticks.
• Prefer Dynamic OB/OS (15/85) for wider swings.
• Fade signals on weekend chop; Breakout when Confidence > 60 and MTF ≥ 1.0.
4) XAUUSD (gold, macro blend)
• Preset: XAUUSD 4H; Chart: 4H.
• Weights tilt to DXY and US10Y (handled by preset).
• Coach + MTF helps separate trend legs from news pops.
⸻
Best practices
• Theme: Switch Light/Dark in Inputs; the panel adapts contrast automatically.
• Export: In another script → Source → DynamoSent Pro+ → DynamoSent Export. Build your own filters/strategies atop the same sentiment.
• Dynamic vs Static OB/OS:
• Static 30/70: fast, universal baseline.
• Dynamic (quantiles): instrument-aware; use 20/80 (default) or 15/85 for choppy markets.
• Confidence gate: Start at 50–60% to filter noise; raise when you want only A-grade setups.
• Adaptive Lookback: Keep ON. For ultra-liquid indices, you can switch it OFF and set a fixed lookback.
⸻
Non-repainting & safety notes
• All request.security() calls use lookahead=barmerge.lookahead_off and gaps=barmerge.gaps_on.
• No forward references; signals & regime flips are confirmed on bar close.
• History-dependent funcs (ta.change, ta.percentile_linear_interpolation, etc.) are computed each bar (not conditionally).
• Adaptive lookback is clamped ≥ 1 to avoid lowest/highest errors.
• Missing-data warning triggers only when all proxies are NA for a streak; carry-forward can bridge small gaps without repaint.
⸻
Known limits & tips
• If a proxy symbol isn’t available on your plan/exchange, you’ll see the NA warning: choose a different symbol via Symbol Search, or keep Carry-forward ON (it defaults to neutral where needed).
• Intraday VIX is sparse—using Daily is intentional.
• Dynamic OB/OS needs enough history (see dynLenFloor). On short histories it gracefully falls back to static levels.
Thanks for trying the preview. Your comments drive the roadmap—presets, new proxies, extra alerts, and integrations.
Bollinger Adaptive Trend Navigator [QuantAlgo]🟢 Overview
The Bollinger Adaptive Trend Navigator synthesizes volatility channel analysis with variable smoothing mechanics to generate trend identification signals. It uses price positioning within Bollinger Band structures to modify moving average responsiveness, while incorporating ATR calculations to establish trend line boundaries that constrain movement during volatile periods. The adaptive nature makes this indicator particularly valuable for traders and investors working across various asset classes including stocks, forex, commodities, and cryptocurrencies, with effectiveness spanning multiple timeframes from intraday scalping to longer-term position analysis.
🟢 How It Works
The core mechanism calculates price position within Bollinger Bands and uses this positioning to create an adaptive smoothing factor:
bbPosition = bbUpper != bbLower ? (source - bbLower) / (bbUpper - bbLower) : 0.5
adaptiveFactor = (bbPosition - 0.5) * 2 * adaptiveMultiplier * bandWidthRatio
alpha = math.max(0.01, math.min(0.5, 2.0 / (bbPeriod + 1) * (1 + math.abs(adaptiveFactor))))
This adaptive coefficient drives an exponential moving average that responds more aggressively when price approaches Bollinger Band extremes:
var float adaptiveTrend = source
adaptiveTrend := alpha * source + (1 - alpha) * nz(adaptiveTrend , source)
finalTrend = 0.7 * adaptiveTrend + 0.3 * smoothedCenter
ATR-based volatility boundaries constrain the final trend line to prevent excessive movement during volatile periods:
volatility = ta.atr(volatilityPeriod)
upperBound = bollingerTrendValue + (volatility * volatilityMultiplier)
lowerBound = bollingerTrendValue - (volatility * volatilityMultiplier)
The trend line direction determines bullish or bearish states through simple slope comparison, with the final output displaying color-coded signals based on the synthesis of Bollinger positioning, adaptive smoothing, and volatility constraints (green = long/buy, red = short/sell).
🟢 Signal Interpretation
Rising Trend Line (Green): Indicates upward direction based on Bollinger positioning and adaptive smoothing = Potential long/buy opportunity
Falling Trend Line (Red): Indicates downward direction based on Bollinger positioning and adaptive smoothing = Potential short/sell opportunity
Built-in Alert System: Automated notifications trigger when bullish or bearish states change, allowing you to act on significant development without constantly monitoring the charts
Candle Coloring: Optional feature applies trend colors to price bars for visual consistency
Configuration Presets: Three parameter sets available - Default (standard settings), Scalping (faster response), and Swing Trading (slower response)
Mongoose Global Conflict Risk Index v1Overview
The Mongoose Global Conflict Risk Index v1 is a multi-asset composite indicator designed to track the early pricing of geopolitical stress and potential conflict risk across global markets. By combining signals from safe havens, volatility indices, energy markets, and emerging market equities, the index provides a normalized 0–10 score with clear bias classifications (Neutral, Caution, Elevated, High, Shock).
This tool is not predictive of headlines but captures when markets are clustering around conflict-sensitive assets before events are widely recognized.
Methodology
The indicator calculates rolling rate-of-change z-scores for eight conflict-sensitive assets:
Gold (XAUUSD) – classic safe haven
US Dollar Index (DXY) – global reserve currency flows
VIX (Equity Volatility) – S&P 500 implied volatility
OVX (Crude Oil Volatility Index) – energy stress gauge
Crude Oil (CL1!) – WTI front contract
Natural Gas (NG1!) – energy security proxy, especially Europe
EEM (Emerging Markets ETF) – global risk capital flight
FXI (China ETF) – Asia/China proxy risk
Rules:
Safe havens and vol indices trigger when z-score > threshold.
Energy triggers when z-score > threshold.
Risk assets trigger when z-score < –threshold.
Each trigger is assigned a weight, summed, normalized, and scaled 0–10.
Bias classification:
0–2: Neutral
2–4: Caution
4–6: Elevated
6–8: High
8–10: Conflict Risk-On
How to Use
Timeframes:
Daily (1D) for strategic signals and early warnings.
4H for event shocks (missiles, sanctions, sudden escalations).
Weekly (1W) for sustained trends and macro build-ups.
What to Look For:
A single trigger (for example, Gold ON) may be noise.
A cluster of 2–3 triggers across Gold, USD, VIX, and Energy often marks early stress pricing.
Elevated readings (>4) = caution; High (>6) = rotation into havens; Shock (>8) = market conviction of conflict risk.
Practical Application:
Monitor as a heatmap of global stress.
Combine with fundamental or headline tracking.
Use alert conditions at ≥4, ≥6, ≥8 for systematic monitoring.
Notes
This indicator is for informational and educational purposes only.
It is not financial advice and should be used in conjunction with other analysis methods.
cd_indiCATor_CxGeneral:
This indicator is the redesigned, simplified, and feature-enhanced version of the previously shared indicators:
cd_cisd_market_Cx, cd_HTF_Bias_Cx, cd_sweep&cisd_Cx, cd_SMT_Sweep_CISD_Cx, and cd_RSI_divergence_Cx.
Within the holistic setup, the indicator tracks:
• HTF bias
• Market structure (trend) in the current timeframe
• Divergence between selected pairs (SMT)
• Divergence between price and RSI values
• Whether the price is in an important area (FVG, iFVG, and Volume Imbalance)
• Whether the price is at a key level
• Whether the price is within a user-defined special timeframe
The main condition and trigger of the setup is an HTF sweep with CISD confirmation on the aligned timeframe.
When the main condition occurs, the indicator provides the user with a real-time market status summary, enriched with other data.
________________________________________
What’s new?
-In the SMT module:
• Triad SMT analysis (e.g.: NQ1!, ES1!, and YM1!)
• Dyad SMT analysis (e.g.: EURUSD, GBPUSD)
• Alternative pair definition and divergence analysis for non-correlated assets
o For crypto assets (xxxUSDT <--> xxxUSDT.P) (e.g.: SOLUSDT.P, SOLUSDT)
o For stocks, divergence analysis by comparing the asset with its value in another currency
(BIST:xxx <--> BIST:xxx / EURTRY), (BAT:xxx <--> BAT:xxx / EURUSD)
-Special timeframe definition
-Configurable multi-option alarm center
-Alternative summary presentation (check list / status table / stickers)
________________________________________
Details and usage:
The user needs to configure four main sections:
• Pair and correlated pairs
• Timeframes (Auto / Manual)
• Alarm center
• Visual arrangement and selections
Pair Selections:
The user should adjust trading pairs according to their trade preferences.
Examples:
• Triad: NQ1!-ES1!-YM1!, BTC-ETH-Total3
• Dyad: NAS100-US500, XAUUSD-XAGUSD, XRPUSDT-XLMUSDT
Single pairs:
-Crypto Assets:
If crypto assets are not in the triad or dyad list, they are automatically matched as:
Perpetual <--> Spot (e.g.: DOGEUSDT.P <--> DOGEUSDT)
If the asset is already defined in a dyad list (e.g., DOGE – SHIB), the dyad definition takes priority.
________________________________________
-Stocks:
If stocks are defined in the dyad list (e.g.: BIST:THYAO <--> BIST:PGSUS), the dyad definition takes priority.
If not defined, the stock is compared with its value in the selected currency.
For example, in the Turkish Stock Exchange:
BIST:FENER stock, if EUR is chosen from the menu, is compared as BIST:FENER / OANDA:EURTRY.
Here, “OANDA” and the stock market currency (TRY) are automatically applied for the exchange rate.
For NYSE:XOM, its pair will be NYSE:XOM / EURUSD.
________________________________________
Timeframes:
By default, the menu is set to “Auto.” In this mode, aligned timeframes are automatically selected.
Aligned timeframes (LTF-HTF):
1m-15m, 3m-30m, 5m-1h, 15m-4h, 1h-D, 4h-W, D-M
Example: if monitoring the chart on 5m:
• 1h sweep + 5m CISD confirmation
• D sweep + 1h CISD confirmation (bias)
• 5m market structure
• 1h SMT and 1h RSI divergence analysis
For manual selections, the user must define the timeframes for Sweep and HTF bias.
FVG, iFVG, and Volume Imbalance timeframes must be manually set in both modes.
________________________________________
Alarm Center:
The user can choose according to preferred criteria.
Each row has options.
“Yes” → included in alarm condition.
“No” → not included in alarm condition.
If special timeframe criteria are added to the alarm, the hour range must also be entered in the same row, and the “Special Zone” tab (default: -4) should be checked.
Key level timeframes and plot options must be set manually.
Example alarm setup:
Alongside the main Sweep + CISD condition, if we also want HTF bias + Trend alignment + key level (W, D) and special timeframe (09:00–11:00), we should set up the menu as follows:
________________________________________
Visual Arrangement and Selections:
Users can control visibility with checkboxes according to their preferences.
In the Table & Sticker tab, table options and labels can be controlled.
• Summary Table has two options: Check list and Status Table
• From the HTF bias section, real-time bias and HTF sweep zone (optional) are displayed
• The RSI divergence section only shows divergence analysis results
• The SMT 2 sub-section only functions when triad is selected
Labels are shown on the bar where the sweep + CISD condition occurs, displaying the current situation.
With the Check box option, all criteria’s real-time status is shown (True/False).
Status Table provides a real-time summary table.
Although the menu may look crowded, most settings only need to be adjusted once during initial use.
________________________________________
What’s next?
• Suggestions from users
• Standard deviation projection
• Mitigation/order blocks (cd special mtg)
• PSP /TPD
________________________________________
Final note:
Every additional criterion in the alarm settings will affect alarm frequency.
Multiple conditions occurring at the same time is not, by itself, sufficient to enter a trade—you should always apply your own judgment.
Looking forward to your feedback and suggestions.
Happy trading! 🎉
Stop Loss Advisor📊 Stop Loss Advisor - Advanced Risk Management Tool
A sophisticated Pine Script v5 indicator designed to suggest optimal stop loss distances based on market volatility, combining ATR and Standard Deviation analysis for precise risk management.
🎯 What Makes This Different from Bollinger Bands?
While Bollinger Bands focus on mean reversion and overbought/oversold conditions using a moving average center line, this indicator is specifically designed for risk management . It creates dynamic bands around the current price to suggest where NOT to place your stop loss, preventing you from being stopped out by normal market noise.
⚡ Key Features
Dynamic ATR Calculation - Fully customizable ATR periods with adaptive volatility filtering
Standard Deviation Integration - Optional StdDev component for enhanced statistical accuracy
Multiple Combination Modes - Average, Maximum, ATR Weighted, or StdDev Weighted
Flexible Price Sources - Choose from Close, HL2, HLC3, or OHLC4
Automatic Pip Calculation - Works across all instruments with automatic pip value detection
Smart Alerts System - Get notified when suggested stop loss exceeds your base risk tolerance
Real-time Information Table - Displays current values and risk status
Visual Labels - Shows exact pip distances directly on chart
Band Smoothing - Prevents erratic movements with customizable averaging
📈 How It Works
ATR Analysis : Calculates Average True Range to measure current market volatility
Statistical Enhancement : Optionally combines with Standard Deviation for more robust calculations
Dynamic Bands : Creates upper and lower bands that expand/contract with volatility
Pip Conversion : Automatically converts distances to pips for easy interpretation
Risk Assessment : Compares suggested distances with your base stop loss tolerance
🔧 Customization Options
ATR Settings:
Customizable ATR period (default: 14)
Adjustable multiplier with 0.1 step precision
Optional volatility filtering for enhanced sensitivity
Standard Deviation (Optional):
Independent period and multiplier settings
Multiple price source options
Four combination modes with ATR
Visual Customization:
Fully customizable colors for all elements
Multiple line styles (solid, dashed, dotted)
Optional band filling with transparency control
Show/hide ATR line overlay
Configurable band smoothing
💡 Perfect For
Forex Traders - Especially effective on major pairs and XAUUSD
Risk Managers - Calculate optimal stop distances before entering trades
Scalpers - Avoid being stopped out by normal market fluctuations
Swing Traders - Adapt stop losses to current volatility conditions
📊 Indicator Values
The information table displays:
Current ATR Value (in pips)
Suggested Long Stop Loss (distance in pips)
Suggested Short Stop Loss (distance in pips)
Risk Status - "SAFE" or "HIGH RISK" based on your base tolerance
Standard Deviation Value (when enabled)
Combination Method (when using both ATR and StdDev)
⚠️ Important Notes
This indicator suggests minimum stop loss distances, not entry/exit signals
Always combine with your trading strategy and risk management rules
Do not use as a standalone trading system
Backtesting recommended before live implementation
Default settings work well for most scenarios, but optimization is encouraged
🎨 Default Configuration
ATR Period: 14
ATR Multiplier: 2.0
Price Source: Close
Base Stop Loss: 20 pips
Band Smoothing: 3 periods
Standard Deviation: Optional (20 period, 2.0 multiplier)
🚀 Getting Started
Add the indicator to your chart
Set your base stop loss tolerance in the settings
Choose your preferred price source and ATR parameters
Enable Standard Deviation for enhanced accuracy (optional)
Monitor the information table for real-time risk assessment
Use the suggested distances as minimum stop loss levels
Pro Tip: In low volatility markets, the bands will contract suggesting tighter stops. In high volatility periods, they expand warning you to use wider stops to avoid being stopped out by normal price action.
📝 Version History & Updates
This indicator is actively maintained and updated based on user feedback. Future enhancements may include multi-timeframe analysis, trend-based asymmetric bands, and additional statistical measures.
Transform your risk management approach with data-driven stop loss suggestions that adapt to real market conditions!
Iani SMC Sniper XAU v2.2 (Long+Short + News Countdown, v6)Iani SMC Sniper v2.6 — Anytime • Auto Pip • FVG 50% • OB • News Panel
Smart-Money Concepts made simple for intraday XAU/USD (works on any symbol).
Finds BOS, 50% FVG “sniper” entries, optional Order Blocks, London H/L, news countdown, and a mini info panel.
What it does
BOS (Break of Structure): detects bullish/bearish BOS after London sweep logic.
FVG 50% entries: plots precise long/short entry dots at the midpoint of the gap.
Auto TP/SL: TP = RR × risk, SL below/above recent swing with a small buffer.
Order Blocks (optional): marks the last opposite candle after BOS and alerts on OB revisit.
London High/Low: tracks session range; session filter is optional.
News countdown: shows next event time and minutes left (user-selectable timezone).
Mini Panel: top-left table with Trend (last BOS), Next news, R:R, Pip size.
Inputs (key)
Auto pip size: uses syminfo.mintick. Manual override available.
Risk:Reward (RR): default 2.0.
Pivot length: swing sensitivity.
Sessions: enable if you want signals only 12:00–20:00 (symbol timezone). Off = anytime.
News timezone: pick your own (e.g., Europe/Brussels, America/New_York).
Absolute & daily times: add your events (strings like 2025-09-17 20:00 or 14:30,16:00…).
Show labels/levels/OBs: toggle on/off.
Alerts included
BOS Bullish / BOS Bearish
BUY Entry / SELL Entry (return to 50% FVG)
Bullish OB revisit / Bearish OB revisit
TP Long/Short reached, SL Long/Short hit
NEWS WARNING (warning window only; does not block signals)
To use: Add Alert → Condition: this indicator → choose any of the alertconditions.
Best use
Bias: H1 for structure.
Execution: M15 (standard) or M5 (aggressive).
Works great on XAUUSD, but is symbol-agnostic (auto pip adapts).
Notes
News times display in the timezone you pick in settings.
OBs are a simple implementation meant for quick visual guidance.
Labels: BUY/SELL near entries, TP/SL on set and when hit, BOS up/down.
Risk disclaimer
This tool is for education only. Not financial advice. Backtest and manage risk.
HTF Books Lines for LTF Charts
⸻
📜 日本語説明文
HTF Books Lines for LTF Charts
このインジケーターは、ゴールドの5分足に1時間足のBooksラインを表示するために作成しました。
ドルストレートの通貨ペアであれば同様に利用可能だと思います。
上位足で検出したBooksライン(買い/売り)を下位足チャートに重ねて表示し、ラインが有効である間は強調表示、無効化された際には無効化ラインとして残すことも可能です。
いずれの時間足でも使用できるため、ご自身のトレードスタイルに合わせて設定を切り替えて検証してみてください。
⸻
📜 English Description
HTF Books Lines for LTF Charts
This indicator was originally created to display 1-hour Books lines on the 5-minute chart of Gold (XAUUSD).
It should also work on other USD-related pairs (major dollar crosses).
The indicator plots higher-timeframe Books lines (buy/sell) directly onto a lower-timeframe chart. Active lines are displayed with strong emphasis, and once invalidated they can optionally remain as inactive lines.
It can be applied to any timeframe combination, so please test and adjust it according to your own trading style.
⸻
RSI Trend Navigator [QuantAlgo]🟢 Overview
The RSI Trend Navigator integrates RSI momentum calculations with adaptive exponential moving averages and ATR-based volatility bands to generate trend-following signals. The indicator applies variable smoothing coefficients based on RSI readings and incorporates normalized momentum adjustments to position a trend line that responds to both price action and underlying momentum conditions.
🟢 How It Works
The indicator begins by calculating and smoothing the RSI to reduce short-term fluctuations while preserving momentum information:
rsiValue = ta.rsi(source, rsiPeriod)
smoothedRSI = ta.ema(rsiValue, rsiSmoothing)
normalizedRSI = (smoothedRSI - 50) / 50
It then creates an adaptive smoothing coefficient that varies based on RSI positioning relative to the midpoint:
adaptiveAlpha = smoothedRSI > 50 ? 2.0 / (trendPeriod * 0.5 + 1) : 2.0 / (trendPeriod * 1.5 + 1)
This coefficient drives an adaptive trend calculation that responds more quickly when RSI indicates bullish momentum and more slowly during bearish conditions:
var float adaptiveTrend = source
adaptiveTrend := adaptiveAlpha * source + (1 - adaptiveAlpha) * nz(adaptiveTrend , source)
The normalized RSI values are converted into price-based adjustments using ATR for volatility scaling:
rsiAdjustment = normalizedRSI * ta.atr(14) * sensitivity
rsiTrendValue = adaptiveTrend + rsiAdjustment
ATR-based bands are constructed around this RSI-adjusted trend value to create dynamic boundaries that constrain trend line positioning:
atr = ta.atr(atrPeriod)
deviation = atr * atrMultiplier
upperBound = rsiTrendValue + deviation
lowerBound = rsiTrendValue - deviation
The trend line positioning uses these band constraints to determine its final value:
if upperBound < trendLine
trendLine := upperBound
if lowerBound > trendLine
trendLine := lowerBound
Signal generation occurs through directional comparison of the trend line against its previous value to establish bullish and bearish states:
trendUp = trendLine > trendLine
trendDown = trendLine < trendLine
if trendUp
isBullish := true
isBearish := false
else if trendDown
isBullish := false
isBearish := true
The final output colors the trend line green during bullish states and red during bearish states, creating visual buy/long and sell/short opportunity signals based on the combined RSI momentum and volatility-adjusted trend positioning.
🟢 Signal Interpretation
Rising Trend Line (Green): Indicates upward momentum where RSI influence and adaptive smoothing favor continued price advancement = Potential buy/long positions
Declining Trend Line (Red): Indicates downward momentum where RSI influence and adaptive smoothing favor continued price decline = Potential sell/short positions
Flattening Trend Lines: Occur when momentum weakens and the trend line slope approaches neutral, suggesting potential consolidation before the next move
Built-in Alert System: Automated notifications trigger when bullish or bearish states change, sending "RSI Trend Bullish Signal" or "RSI Trend Bearish Signal" messages for timely entry/exit
Color Bar Candles Option: Optional candle coloring feature that applies the same green/red trend colors to price bars, providing additional visual confirmation of the current trend direction
Bitcoin vs. Gold correlation with lagBTC vs Gold (Lag) + Correlation — multi-timeframe, publication notes
What it does
Plots Gold on the same chart as Bitcoin, with a configurable lead/lag.
Lets you choose how the series is displayed:
Gold shifted forward (+lag on chart) — shows gold ahead of BTC on the time axis (visual offset).
Gold aligned to BTC (gold lag) — standard alignment; gold is lagged for calculation and plotted in place.
BTC 200D Lag (BTC shifted forward) — visualizes BTC shifted forward (like popular “BTC 200D Lag” charts).
Computes Pearson correlations between BTC (no lag) and Gold (with lag) over multiple lookback windows equivalent to:
30d, 60d, 90d, 180d, 365d, 2y (730d), 3y (1095d), 5y (1825d).
Shows a table with the correlation values, automatically scaled to the current timeframe.
Why this is useful
A common macro claim is that BTC tends to follow Gold with a delay (e.g., ~200 trading days). This tool lets you:
Visually advance Gold (or BTC) to see that lead-lag relationship on the chart.
Quantify the relationship with rolling correlations.
Switch timeframes (D/W/M/…): everything automatically stays in sync.
Quick start
Open a BTC chart (any exchange).
Add the indicator.
Set Gold symbol (default TVC:GOLD; alternatives: OANDA:XAUUSD, COMEX:GC1!, etc.).
Choose Lag value and Lag unit (Days/Weeks/Months/Years/Bars).
Pick Visual Mode:
To mirror those “BTC 200D Lag” posts: choose “BTC 200D Lag (BTC shifted forward)” with 200 Days.
To view Gold 200D ahead of BTC: select “Gold shifted forward (+lag on chart)” with 200 Days.
Keep Rebase to 100 ON for an apples-to-apples visual scale. (You can move the study to the left price scale if needed.)
Inputs
Gold symbol: external series to pair with BTC.
Lag value: numeric value.
Lag unit: Days, Weeks, Months (≈30d), Years (≈365d), or direct Bars.
Visual mode:
Gold shifted forward (+lag on chart) → gold is offset to the right by the lag (visual only).
Gold aligned to BTC (gold lag) → standard plot (no visual offset); correlations still use lagged gold.
BTC 200D Lag (BTC shifted forward) → BTC is offset to the right by the lag (visual only).
Rebase to 100 (visual): rescales each series to 100 on its first valid bar for clearer comparison.
Show gold without lag (debug): optional reference line.
Show price tag for gold (lag): toggles the track price label.
Timeframe handling
The study uses the current chart timeframe for both BTC and Gold (timeframe.period).
Lag in time units (Days/Weeks/Months/Years) is internally converted to an integer number of bars of the active timeframe (using timeframe.in_seconds).
Example: on W (weekly), 200 days ≈ 29 bars.
On intraday timeframes, days are converted proportionally.
Correlation math
Correlation = ta.correlation(BTC, Gold_lagged, length_in_bars)
Lookback lengths are the bar-equivalents of 30/60/90/180/365/730/1095/1825 days in the active timeframe.
Important: correlations are computed on prices (not returns). If you prefer returns-based correlation (often more statistically robust), duplicate the script and replace price inputs with change(close) or ta.roc(close, 1).
Reading the table
Window: nominal day label (e.g., 30d, 1y, 5y).
Bars (TF): how many bars that window equals on the current timeframe.
Correlation: Pearson coefficient . Background tint shows intensity and sign.
Tips & caveats
Visual offsets (offset=) move series on screen only; they don’t affect the math. The math always uses BTC (no lag) × Gold (lagged).
With large lags on high timeframes, early bars will be na (normal). Scroll forward / reduce lag.
If your Gold feed doesn’t load, try an alternative symbol that your plan supports.
Rebase to 100 helps visibility when BTC ($100k) and Gold ($2k) share a scale.
Months/Years use 30/365-day approximations. For exact control, use Days or Bars.
Correlations on very short lengths or sparse data can be unstable; consider the longer windows for sturdier signals.
This is a visual/analytical tool, not a trading signal. Always apply independent risk management.
Suggested setups
Replicate “BTC 200D Lag” charts:
Visual Mode: BTC 200D Lag (BTC shifted forward)
Lag: 200 Days
Rebase: ON
Gold leads BTC (Gold ahead):
Visual Mode: Gold shifted forward (+lag on chart)
Lag: 200 Days
Rebase: ON
Compatibility: Pine v6, overlay study.
Best with: BTCUSD (any exchange) + a reliable Gold feed.
Author’s note: Lead-lag relationships are not stable over time; treat correlations as descriptive, not predictive.
Dynamic Swing Anchored VWAP STRAT (Zeiierman/PineIndicators)Dynamic Swing Anchored VWAP STRATEGY — Zeiierman × PineIndicators (Pine Script v6)
A pivot-to-pivot Anchored VWAP strategy that adapts to volatility, enters long on bullish structure, and closes on bearish structure. Built for TradingView in Pine Script v6.
Full credits to zeiierman.
Repainting notice: The original indicator logic is repainting. Swing labels (HH/HL/LH/LL) are finalized after enough bars have printed, so labels do not occur in real time. It is not possible to execute at historical label points. Treat results as educational and validate with Bar Replay and paper trading before considering any discretionary use.
Concept
The script identifies swing highs/lows over a user-defined lookback ( Swing Period ). When structure flips (most recent swing low is newer than the most recent swing high, or vice versa), a new regime begins.
At each confirmed pivot, a fresh Anchored VWAP segment is started and updated bar-by-bar using an EWMA-style decay on price×volume and volume.
Responsiveness is controlled by Adaptive Price Tracking (APT) . Optionally, APT auto-adjusts with an ATR ratio so that high volatility accelerates responsiveness and low volatility smooths it.
Longs are opened/held in bullish regimes and closed when the regime turns bearish. No short positions are taken by design.
How it works (under the hood)
Swing detection: Uses ta.highestbars / ta.lowestbars over prd to update swing highs (ph) and lows (pl), plus their bar indices (phL, plL).
Regime logic: If phL > plL → bullish regime; else → bearish regime. A change in this condition triggers a re-anchor of the VWAP at the newest pivot.
Adaptive VWAP math: APT is converted to an exponential decay factor ( alphaFromAPT ), then applied to running sums of price×volume and volume, producing the current VWAP estimate.
Rendering: Each pivot-anchored VWAP segment is drawn as a polyline and color-coded by regime. Optional structure labels (HH/HL/LH/LL) annotate the swing character.
Orders: On bullish flips, strategy.entry("L") opens/maintains a long; on bearish flips, strategy.close("L") exits.
Inputs & controls
Swing Period (prd) — Higher values identify larger, slower swings; lower values catch more frequent pivots but add noise.
Adaptive Price Tracking (APT) — Governs the VWAP’s “half-life.” Smaller APT → faster/closer to price; larger APT → smoother/stabler.
Adapt APT by ATR ratio — When enabled, APT scales with volatility so the VWAP speeds up in turbulent markets and slows down in quiet markets.
Volatility Bias — Tunes the strength of APT’s response to volatility (above 1 = stronger effect; below 1 = milder).
Style settings — Colors for swing labels and VWAP segments, plus line width for visibility.
Trade logic summary
Entry: Long when the swing structure turns bullish (latest swing low is more recent than the last swing high).
Exit: Close the long when structure turns bearish.
Position size: qty = strategy.equity / close × 5 (dynamic sizing; scales with account equity and instrument price). Consider reducing the multiplier for a more conservative profile.
Recommended workflow
Apply to instruments with reliable volume (equities, futures, crypto; FX tick volume can work but varies by broker).
Start on your preferred timeframe. Intraday often benefits from smaller APT (more reactive); higher timeframes may prefer larger APT (smoother).
Begin with defaults ( prd=50, APT=20 ); then toggle “Adapt by ATR” and vary Volatility Bias to observe how segments tighten/loosen.
Use Bar Replay to watch how pivots confirm and how the strategy re-anchors VWAP at those confirmations.
Layer your own risk rules (stops/targets, max position cap, session filters) before any discretionary use.
Practical tips
Context filter: Consider combining with a higher-timeframe bias (e.g., daily trend) and using this strategy as an entry timing layer.
First pivot preference: Some traders prefer only the first bullish pivot after a bearish regime (and vice versa) to reduce whipsaw in choppy ranges.
Deviations: You can add VWAP deviation bands to pre-plan partial exits or re-entries on mean-reversion pulls.
Sessions: Session-based filters (RTH vs. ETH) can materially change behavior on futures and equities.
Extending the script (ideas)
Add stops/targets (e.g., ATR stop below last swing low; partial profits at k×VWAP deviation).
Introduce mirrored short logic for two-sided testing.
Include alert conditions for regime flips or for price-VWAP interactions.
Incorporate HTF confirmation (e.g., only long when daily VWAP slope ≥ 0).
Throttle entries (e.g., once per regime flip) to avoid over-trading in ranges.
Known limitations
Repainting: Swing labels and pivot confirmations depend on future bars; historical labels can look “perfect.” Treat them as annotations, not executable signals.
Execution realism: Strategy includes commission and slippage fields, yet actual fills differ by venue/liquidity.
No guarantees: Past behavior does not imply future results. This publication is for research/education only and not financial advice.
Defaults (backtest environment)
Initial capital: 10,000
Commission value: 0.01
Slippage: 1
Overlay: true
Max bars back: 5000; Max labels/polylines set for deep swing histories
Quick checklist
Add to chart and verify that the instrument has volume.
Use defaults, then tune APT and Volatility Bias with/without ATR adaptation.
Observe how each pivot re-anchors VWAP and how regime flips drive entries/exits.
Paper trade across several symbols/timeframes before any discretionary decisions.
Attribution & license
Original indicator concept and logic: Zeiierman — please credit the author.
Strategy wrapper and publication: PineIndicators .
License: CC BY-NC-SA 4.0 (Attribution-NonCommercial-ShareAlike). Respect the license when forking or publishing derivatives.
SMC Pro (Wellington) v1.4.2This SMC indicator combines BOS/CHoCH, OBs, FVGs, liquidity, and Premium/Discount with confirmation on the 1H (EMA200).
Entries only appear when 3+ confluences align, filtering noise and delivering clear signals.
✅ Ready-to-use alerts (LONG, SHORT, or unified)
✅ Real-time HUD
✅ Strategy tailored for XAUUSD
Retail Sentiment Indicator - Multi-Asset CFD & Fear/Greed IndexRetail Sentiment Indicator - Multi-Asset CFD & Fear/Greed Index
Overview
The Retail Sentiment Indicator provides real-time sentiment data for major financial instruments including stocks, forex, commodities, and cryptocurrencies. This indicator displays retail trader positioning and market sentiment using CFD data and fear/greed indices.
Methodology and Scale Calculation
This indicator operates on a **-50 to +50 scale** with zero representing perfect market equilibrium.
Scale Interpretation:
- **Zero (0)**: Market balance - exactly 50% of investors buying, 50% selling
- **Positive values**: Majority buying pressure
- Example: If 63% of investors are buying, the indicator shows +13 (63 - 50 = +13)
- **Negative values**: Majority selling pressure
- Example: If 92% of investors are selling, the indicator shows -42 (50 - 92 = -42)
BTC Fear & Greed Index Scaling:
The original `BTC FEAR&GREED` index is natively scaled from 0-100 by its creator. In our indicator, this data has been rescaled to also fit the -50 to +50 range for consistency with other sentiment data sources.
This unified scaling approach allows for direct comparison across all instruments and data sources within the indicator.
-Important Data Source Selection-
Bitcoin (BTC) Data Sources
When viewing Bitcoin charts, the indicator offers **two different data sources**:
1. **Default Auto-Mode**: `BTCUSD Retail CFD` - Retail CFD traders sentiment data (automatically loaded).
2. **Manual Selection**: `BTC FEAR&GREED` - Fear & Greed Index from website: alternative dot me
**To access BTC Fear & Greed Index**: Input settings -> disable checkbox "Auto-load Sentiment Data" -> manually select "BTC FEAR&GREED" from the dropdown menu.
US Stock Market Data Sources
For US stocks and indices (S&P 500, NASDAQ, Dow Jones), there are **two data source options**:
1. **Default Auto-Mode**: Individual retail CFD sentiment data for each instrument
2. **Manual Selection**: `SNN FEAR&GREED` - SNN's Fear & Greed Index covering the overall US market sentiment. SNN was used as the name to avoid any potential trademark infringement.
**To access SNN Fear & Greed Index**: When viewing US market charts, disable in input settings checkbox "Auto-load Sentiment Data" and manually select "SNN FEAR&GREED" from the dropdown menu.
This distinction allows traders to choose between **instrument-specific retail sentiment** (auto-mode) or **broader market sentiment indices** (manual selection).
Features
- **Auto-Detection**: Automatically loads sentiment data based on the current chart symbol
- **Manual Selection**: Choose from 40+ supported instruments when auto-detection is unavailable
- **Multiple Data Sources**: Combines retail CFD sentiment with Fear & Greed indices
- **Visual Zones**: Clear greed/fear zones with color-coded backgrounds
- **Real-time Updates**: Live sentiment data from merged data sources
Supported Instruments
Major Indices
- S&P 500, NASDAQ, Dow Jones 30, DAX
Forex Pairs
- Major pairs: EURUSD, GBPUSD, USDJPY, USDCHF, USDCAD
- Cross pairs: EURJPY, GBPJPY, AUDUSD, NZDUSD, and 20+ others
Commodities
- Precious metals: Gold (XAUUSD), Silver (XAGUSD)
- Energy: WTI Oil
- Agricultural: Wheat, Coffee
- Industrial: Copper
Cryptocurrencies
- Bitcoin (BTC) sentiment data
- BTC & SNN Fear & Greed indices
How to Use
1. **Auto Mode** (Default): Enable "Auto-load Sentiment Data" to automatically display sentiment for the current chart symbol
2. **Manual Mode**: Disable auto-load and select from the dropdown menu for specific instruments
3. **Interpretation**:
- Values above 0 (green) indicate retail greed/bullish sentiment
- Values below 0 (red) indicate retail fear/bearish sentiment
- Fear & Greed indices use 0-100 scale (50 is neutral)
Data Sources
This indicator uses curated sentiment data from retail CFD providers and established fear/greed indices. Data is updated regularly and sourced from reputable financial data providers.
Trading Strategy & Market Philosophy
Contrarian Trading Approach
The primary purpose of this indicator is based on the fundamental market principle that **the majority of retail investors are often wrong**, and markets typically move opposite to the positions held by the majority of market participants.
Key Strategy Guidelines:
- **Contrarian Signal**: When the majority of users are positioned on one side of the market, there is statistically greater market advantage in taking positions in the opposite direction
- **Trend Exhaustion Signal**: An interesting observed phenomenon occurs when, during a long-lasting trend where the majority of investors have consistently been on the wrong side, the Sentiment indicator suddenly shows that the majority has flipped and opened positions in the direction of that long-running trend. This is often a signal of fuel exhaustion for further movement in that direction
Interpretation Examples
- High greed readings (majority bullish) → Consider bearish opportunities
- High fear readings (majority bearish) → Consider bullish opportunities
- Sudden sentiment flip during established trends → Potential trend reversal signal
Technical Notes
- Built with PineScript v6
- Dynamic symbol detection with fallback options
- Optimized for performance with minimal resource usage
- Color-coded visualization with customizable zones
Data Sources & Expansion
Acknowledgments
We extend our gratitude to **TradingView** for enabling the use of custom data feeds based on GitHub repositories, making this comprehensive sentiment analysis possible.
Data Expansion Opportunities
As the operator of this indicator, I am **open to suggestions for new data sources** that could be integrated and published. If you have ideas for additional instruments or sentiment data:
How to Submit Suggestions:
1. Send a **private message** with your proposal
2. Include: **instrument/data type**, **source**, and **brief description**
3. If technically feasible, we will work to import and publish the data
Data Infrastructure Status
Current Data Upload Process:
Please note that sentiment data uploads may occasionally experience minor interruptions. However, this should not pose significant issues as sentiment data typically changes gradually rather than rapidly.
Infrastructure Development:
We are actively working on establishing permanent cloud-based infrastructure to ensure continuous, automated data collection and upload processes. This will provide more reliable and consistent data availability in the future.
Disclaimer
This indicator is for educational and informational purposes only. Sentiment data should be used as part of a comprehensive trading strategy and not as the sole basis for trading decisions. Past performance does not guarantee future results. The contrarian approach described is a market theory and may not always produce profitable results.
buy sell ultra systemWhat it is
EMA-POC Momentum System Ultra combines a proven trend stack (EMA 20/50/238), a price-of-control layer (POC via Bar-POC or VWAP alternative), and a momentum trigger (RSI) to surface higher-quality entries only when multiple, independent conditions align. This is not a cosmetic mashup; each component gates the others.
How components work together
Trend (EMA 20/50/238): Defines short/medium/long bias and filters counter-trend signals.
POC (Bar-POC or Alt-POC/VWAP): Locates the most-traded/weighted price area; a neutral band around POC helps avoid chop.
Control background: Above POC → buyers likely in control; below → sellers.
Momentum (RSI): Entry arrows print only when RSI confirms with trend and price location vs POC; optional “cross 50” requirement reduces noise.
Optional HTF trend: Confluence with a higher-timeframe EMA stack for stricter filtering.
Why it’s original/useful
Signals require confluence of (1) EMA trend stack, (2) POC location and neutral-zone filtering, (3) momentum confirmation, (4) optional slope and distance-to-POC checks, and (5) optional HTF trend. This reduces false positives compared with using any layer in isolation.
How to use
Markets/TFs: Built for XAUUSD (Gold) and US30. Works 1m–1h for intraday; 2h–4h for swing.
Entries:
Long: EMA stack bullish, price above POC, not in neutral band, RSI condition true → “Buy” arrow.
Short: Opposite conditions → “Sell” arrow.
Stops/Targets (suggested):
Initial stop beyond POC/neutral band or recent swing.
First target around 1R; trail with EMA20/50 or structure breaks.
Settings to tune:
POC Mode: Bar-POC (highest-volume bar’s close over lookback) or Alt-POC (VWAP).
Neutral Band %: 0.10–0.35 typical intraday.
Min distance from POC: 0.10–0.50% helps avoid low-RR entries right at POC.
RSI: Choose “cross 50” for stricter triggers or simple >/< 50 for more signals.
HTF trend: Turn on for extra confluence.
Alerts:
Buy Signal and Sell Signal (separate), or one Combined Buy/Sell alert.
Set to “Once per bar close” if you want only confirmed arrows.
Repainting / limitations
Shapes can move until bar close (standard Pine behavior) when using intrabar conditions; final confirmation at close. No system guarantees profitability—forward test and adapt to your market/instrument.
Clean chart
The published chart contains only this script so outputs are easy to identify.
Versions / updates
Use Publish → Update for minor changes; do not create new publications for small tweaks. If you fork to preserve older behavior, explain why and how your fork differs.
Changelog
v1.1 – Tuning for Gold/US30, neutral-band & distance filters, optional HTF trend, combined alert.
v1.0 – Initial public release (EMA stack + POC modes + RSI + alerts).
License & credits
Open-source for learning and improvement. Please credit on forks and explain modifications in your description.
Sequential Pattern Strength [QuantAlgo]🟢 Overview
The Sequential Pattern Strength indicator measures the power and sustainability of consecutive price movements by tracking unbroken sequences of up or down closes. It incorporates sequence quality assessment, price extension analysis, and automatic exhaustion detection to help traders identify when strong trends are losing momentum and approaching potential reversal or continuation points.
🟢 How It Works
The indicator's key insight lies in its sequential pattern tracking system, where pattern strength is measured by analyzing consecutive price movements and their sustainability:
if close > close
upSequence := upSequence + 1
downSequence := 0
else if close < close
downSequence := downSequence + 1
upSequence := 0
The system calculates sequence quality by measuring how "perfect" the consecutive moves are:
perfectMoves = math.max(upSequence, downSequence)
totalMoves = math.abs(bar_index - ta.valuewhen(upSequence == 1 or downSequence == 1, bar_index, 0))
sequenceQuality = totalMoves > 0 ? perfectMoves / totalMoves : 1.0
First, it tracks price extension from the sequence starting point:
priceExtension = (close - sequenceStartPrice) / sequenceStartPrice * 100
Then, pattern exhaustion is identified when sequences become overextended:
isExhausted = math.abs(currentSequence) >= maxSequence or
math.abs(priceExtension) > resetThreshold * math.abs(currentSequence)
Finally, the pattern strength combines sequence length, quality, and price movement with momentum enhancement:
patternStrength = currentSequence * sequenceQuality * (1 + math.abs(priceExtension) / 10)
enhancedSignal = patternStrength + momentum * 10
signal = ta.ema(enhancedSignal, smooth)
This creates a sequence-based momentum indicator that combines consecutive movement analysis with pattern sustainability assessment, providing traders with both directional signals and exhaustion insights for entry/exit timing.
🟢 Signal Interpretation
Positive Values (Above Zero): Sequential pattern strength indicating bullish momentum with consecutive upward price movements and sustained buying pressure = Long/Buy opportunities
Negative Values (Below Zero): Sequential pattern strength indicating bearish momentum with consecutive downward price movements and sustained selling pressure = Short/Sell opportunities
Zero Line Crosses: Pattern transitions between bullish and bearish regimes, indicating potential trend changes or momentum shifts when sequences break
Upper Threshold Zone: Area above maximum sequence threshold (2x maxSequence) indicating extremely strong bullish patterns approaching exhaustion levels
Lower Threshold Zone: Area below negative threshold (-2x maxSequence) indicating extremely strong bearish patterns approaching exhaustion levels
BTC Macro Composite Global liquidity Index -OffsetThis indicator is based on the thesis that Bitcoin price movements are heavily influenced by macro liquidity trends. It calculates a weighted composite index based on the following components:
• Global Liquidity (41%): Sum of central bank balance sheets (Fed , ECB , BoJ , and PBoC ), adjusted to USD.
• Investor Risk Appetite (22%): Derived from the Copper/Gold ratio, inverse VIX (as a risk-on signal), and the spread between High Yield and Investment Grade bonds (HY vs IG OAS).
• Gold Sensitivity (15–20%): Combines the XAUUSD price with BTC/Gold ratio to reflect the historical influence of gold on Bitcoin pricing.
Each component is normalized and then offset forward by 90 days to attempt predictive alignment with Bitcoin’s price.
The goal is to identify macro inflection points with high predictive value for BTC. It is not a trading signal generator but rather a macro trend context indicator.
❗ Important: This script should be used with caution. It does not account for geopolitical shocks, regulatory events, or internal BTC market structure (e.g., miner behavior, on-chain metrics).
💡 How to use:
• Use on the 1D timeframe.
• Look for divergences between BTC price and the macro index.
• Apply in confluence with other technical or fundamental frameworks.
🔍 Originality:
While similar components exist in macro dashboards, this script combines them uniquely using time-forward offsets and custom weighting specifically tailored for BTC behavior.