CRT (Candle Range Theory)+ Daily Bias - Milana Trades Overview
This indicator combines Candle Range Theory (CRT) with a Daily & Weekly Bias model, providing traders with both short-term CRT candle detection and higher-timeframe directional context. It is designed to help traders identify liquidity traps, potential reversals, and overall market bias in a structured and visual way.
🔹 1. Candle Range Theory (CRT)
The CRT module focuses on detecting CRT candles (false breakouts) and marking key high/low ranges.
Bullish CRT :
Occurs when the price makes a lower low compared to the previous candle but closes bullish (close > open).
→ Signals potential upside reversal.
Bearish CRT :
Occurs when the price makes a higher high compared to the previous candle but closes bearish (close < open).
→ Signals potential downside reversal.
When a CRT is detected:
The indicator plots dotted lines and levels from the trap candle’s high/low.
Labels (CRT, CRT H, CRT L) are drawn for easy visualization.
Previous CRT levels/labels can be cleared automatically if desired.
Alerts are triggered once a trap is confirmed (on candle close).
🔹 2. Daily & Weekly Bias
The bias model provides directional context based on daily and weekly candle close
Bias is determined by analyzing:
Breaks of previous highs/lows.
Failed breaks (false moves beyond prior levels).
Inside bars (neutral conditions).
Possible Bias States:
The logic Daily BIAS
Close Above PDH → BULLISH
Close Below PDL → BEARISH
Failed Close Above → BEARISH
Failed Close Below → BULLISH
Inside Range → NEUTRAL
Both Daily and Weekly bias are calculated and displayed in a structured table.
⚠️ Important Note on Daily Bias
The Daily Bias provided by this indicator should be treated as a technical reference, not an absolute signal. Market structure is complex, and automatic bias detection may not always capture context such as news events, liquidity zones, or higher-timeframe confluence.
👉 Always prioritize your own market analysis and discretion over the indicator’s bias. Use the Daily/Weekly bias as a guideline to support your view, rather than as a rule to follow blindly.
🔹 3. Bias Table
A clean on-chart table (top-right corner by default) displays:
Timeframe (Daily / Weekly).
Current bias (Bullish, Bearish, Neutral).
The table is fully customizable:
Colors (header, text, row backgrounds).
Option to show/hide Daily or Weekly bias.
🔹 4. Alerts
The indicator supports real-time alerts:
Bearish CRT detected
Bullish CRT detected
These alerts trigger only on confirmed candle closes, ensuring reliable signals.
🔹 5. Settings
CRT Module
Length → How many bars CRT levels extend.
Clear Broken → Automatically clear past CRT lines when a new trap is detected.
Trap Candle Colors → Define bullish/bearish trap highlight colors.
CRT Line/Label Styling → Customize line style, width, label size, and text/background colors.
Bias Module
Show Table → Enable/disable bias table.
Show Daily / Show Weekly Bias → Toggle specific timeframes.
Colors → Set bullish, bearish, and neutral bias colors.
Table Styling → Customize background, border, header, and row colors.
🔹 6. How to Use
Look for trap candle signals (CRT labels) near important liquidity levels.
Use the Daily & Weekly bias table to confirm whether the broader trend supports the trap signal.
Align CRT signals with bias direction for higher-probability setups.
Use alerts to stay notified of trap events without monitoring the chart constantly.
See the levels. Feel the flow
אינדיקטורים ואסטרטגיות
Seasonal Pattern DecoderSeasonal Pattern Decoder
The Seasonal Pattern Decoder is a powerful tool designed for traders and analysts who want to uncover and leverage seasonal tendencies in financial markets. Instead of cluttering your chart with complex visuals, this indicator presents a clean, intuitive table that summarizes historical monthly performance, allowing you to spot recurring patterns at a glance.
How It Works
The indicator fetches historical monthly data for any symbol and calculates the percentage return for each month over a specified number of years. It then organizes this data into a comprehensive table, providing a clear, year-by-year and month-by-month breakdown of performance.
Key Features
Historical Performance Table: Displays monthly returns for up to a user-defined number of years, making it easy to compare performance across different periods.
Color-Coded Heatmap: Each cell is colored based on the performance of the month. Strong positive returns are shaded in green, while strong negative returns are shaded in red, allowing for immediate visual analysis of monthly strength or weakness.
Annual Summary: A "Σ" column shows the total percentage return for each full calendar year.
AVG Row: Calculates and displays the average return for each month across all the years shown in the table.
WR Row: Shows the "Win Rate" for each month, which is the percentage of time that month had a positive return. This is crucial for identifying high-probability seasonal trends.
How to Use
Add the "Seasonal Pattern Decoder" indicator to your chart. Note that it works best on Daily, Weekly, or Monthly timeframes. A warning message will be displayed on intraday charts.
In the indicator settings, adjust the "Lookback Period" to control how many years of historical data you want to analyze.
Use the "Show Years Descending" option to sort the table from the most recent year to the oldest.
The "Heat Range" setting allows you to adjust the sensitivity of the color-coding to fit the volatility of the asset you are analyzing.
This tool is ideal for confirming trading biases, developing seasonal strategies, or simply gaining a deeper understanding of an asset's typical behavior throughout the year.
## Disclaimer
This indicator is designed as a technical analysis tool and should be used in conjunction with other forms of analysis and proper risk management.
Past performance does not guarantee future results, and traders should thoroughly test any strategy before implementing it with real capital.
Market Structure 2.0- Zig Zag , BoS and Supply/Demand ZonesMarket Structure 2.0- Zig Zag, BoS and Supply/Demand
Unlock the full picture of market structure with this all-in-one indicator. At its core, it’s built around precise price action reversals, detected through smart engulfment of highs and lows. Every reversal acts as a single, powerful trigger that automatically maps out supply and demand zones and structural levels (swing high/lows, BoS and market shift) — everything you need to understand the market at a glance.
Whether you’re scanning for trend continuation, identifying structural levels for entries and exits, or marking key areas for Fibonacci retracements, this indicator simplifies it all. BoS signals help you ride the prevailing trend, zones highlight areas of interest, and swing highs/lows give you structural context — all perfectly aligned with each other, all as a result of price-action based reversals.
Want to see the bigger picture? The HTF input lets you track higher timeframe structures right on your current chart, giving you an edge for live trading. Just remember: for consistent results, refresh your chart before observing HTF structure, and use caution when back-testing, as higher timeframe patterns may appear inconsistent in bar-replay (refresh chart regularly for accurate results). Also, be aware that supply/demand zones are most accurate on the chosen timeframes raw timeframe (for example if using 4h on HTF input, 4h supply/demand zones are more accurate when observing 4h chart and may show discrepancy on lower timeframes).
With this tool, the chaos of the market is transformed into a clean, actionable map — all guided by the same unique reversal logic.
Real-Time Alerts
This indicator doesn’t just visualize market structure — it actively notifies you when critical events occur, so you can observe passively without being glued to the charts. Alerts are fully customizable and cover every key element of market behavior:
Supply & Demand Zones
• New Supply Zone (Bullish) – Triggers when a fresh supply area forms.
• New Demand Zone (Bearish) – Alerts you to newly established demand.
Internal Shifts & Swing Points
• Bullish Internal Shift – Detects bullish price shifts across all swing lows.
• Bearish Internal Shift – Detects bearish shifts across all swing highs.
• Higher Highs (HH) / Higher Lows (HL) / Lower Highs (LH) / Lower Lows (LL) – Track critical swing points with precise conditions to avoid false signals.
• Liquidity Sweeps (LS) – Alerts when price sweeps stop-loss areas, signaling potential traps or continuation setups.
Market Structure & Breaks of Structure (BoS)
• Bullish / Bearish BoS – Highlights breaks in structure that confirm trend continuation or reversals.
• Bullish / Bearish Market Shifts – Flags larger trend changes detected by the indicator’s unique reversal logic.
Alerts can be triggered on LTF , MTF , or HTF charts, giving you flexibility to match your trading style. Each alert is configurable, so you receive only the notifications that matter to you — whether it’s swing points, market shifts, or key supply and demand levels.
With these alerts, you’re not just watching the market — you’re anticipating it.
🌊 Big Wave Motion Detector — Main TFs Only (1m/5m/1H/4H/1D)Big Wave Motion Detector 🌊 — Main Timeframes Only
What it does
Scans motion by measuring percent change across the main timeframes: 1m, 5m, 1H, 4H, 1D. Results are shown in a compact on-chart table with direction arrows, optional heatmap coloring, and a clear summary of which TF is making the biggest wave right now.
How it measures change
Choose your basis in settings:
Close → Previous Close (classic return for that TF), or
Open → Current Price (live) for more intrabar responsiveness.
“Since Daily Open %” gives extra context (same value on each row because it’s daily).
Table columns
Timeframe – 1m, 5m, 1H, 4H, 1D
Change % – percent move for that TF (heatmap optional)
Dir – ▲ up / ▼ down (toggle)
Note –
✅ Big Wave! (between Min & Max)
🚀 Too Fast! (above Max)
🔄 Warming Up (medium)
🐢 Small Moves
😴 Sleepy…
Since D Open % – optional daily context
Summary – shows the largest absolute move and its TF
Key inputs
Min / Max Big Wave % – define your wave band (e.g., 5–15%).
Change Basis – Close→Prev Close vs Open→Now (live).
Heatmap / Arrows / Daily Column / Decimals – presentation tweaks.
Alerts (static messages)
Any TF Big Wave
Individual: 1m / 5m / 1H / 4H / 1D
Tips
For scalps, tighten the band (e.g., 1–5%).
For swings, widen it (e.g., 5–15%+).
For most reliable alerts, use On bar close (HTFs finalize at their bar close).
Notes
This build intentionally excludes 15m and 12H (main TFs only).
Values on higher TF rows will update as those bars develop (especially in Open→Now mode).
Disclaimer
Educational only—no financial advice. Always test before using live.
Concise SMA Golden/Death_Crossconcise golden/death cross
When SMA 50 crosses over SMA 200, it indicates a bull market.
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))
HA + EMA Entry/Exit (First Wick Candle Exit)Strategy Logic -
Entry Signals:
BUY: HA candle crosses above 50 EMA
SELL: HA candle crosses below 50 EMA
Exit Signals:
Exit Long: After a BUY, trigger when:
HA candle is solid red (haClose < haOpen)
Candle has a lower wick (haLow < haClose)
Exit Short: After a SELL, trigger when:
HA candle is solid green (haClose > haOpen)
Candle has an upper wick (haHigh > haClose)
Updated -
After a BUY signal:
Look for a red Heikin Ashi candle (haClose < haOpen)
It must have only a lower wick:
✅ haLow < haClose (lower wick exists)
✅ haHigh == haOpen (no upper wick)
After a SELL signal:
Look for a green Heikin Ashi candle (haClose > haOpen)
It must have only an upper wick:
✅ haHigh > haClose (upper wick exists)
✅ haLow == haOpen (no lower wick)
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)
Golden/Death CrossGolden Cross = When 3MA crosses up 3MA
Death Cross = When 5MA crosses down 5MA
A simple indicator to know when the Bull / Bear Market starts in the short term.
2MA Cross with Glow Effects 2MA Cross with Glow Effects
Overview
This indicator enhances the classic moving average crossover strategy with a dynamic and visually appealing "glow" effect. It plots two customisable moving averages on the chart and illuminates the area around them when a crossover occurs, providing a clear and intuitive signal for potential trend changes.
Features
Dual Moving Averages: Configure two independent moving averages to suit your trading style.
Multiple MA Types: Choose from a wide range of moving average types for each line, including:
SMA (Simple Moving Average)
EMA (Exponential Moving Average)
WMA (Weighted Moving Average)
VWMA (Volume-Weighted Moving Average)
RMA (Relative Moving Average)
HMA (Hull Moving Average)
ALMA (Arnaud Legoux Moving Average)
LSMA (Least Squares Moving Average)
Customisable Appearance: Adjust the length, line width, and color for each moving average.
Unique Glow Effect: A configurable glow appears around the moving averages during a crossover, providing an unmistakable visual cue. You can control the intensity and width of this effect.
How It Works
The core of the indicator is the calculation of two moving averages based on the user's selected type and length. The script continuously monitors the relationship between these two MAs.
The "glow" is a sophisticated visual effect achieved by using Pine Script's `fill()` function to create a smooth, colored gradient around the MA lines. The glow is conditionally rendered:
When the first moving average (MA1) crosses above the second (MA2), MA1 will glow above its line.
When MA1 crosses below MA2, it will glow below its line.
The same logic is applied to MA2, creating a dual-glow effect that clearly shows which MA is dominant.
To ensure a consistent visual appearance across different chart timeframes, the indicator incorporates a `tfMultiplier` that automatically adjusts the glow's width.
How to Use
This indicator can be used in the same way as a standard moving average crossover strategy
Bullish Signal: Look for the shorter-period moving average to cross above the longer-period moving average. The glow effect will make this event highly visible.
Bearish Signal: Look for the shorter-period moving average to cross below the longer-period moving average.
Traders can use this for trend identification, entry/exit signals, and as a component of a more comprehensive trading system. For example, a common setup is using a 20-period EMA and a 50-period EMA to capture medium-term trends.
Disclaimer
This indicator is designed as a technical analysis tool and should be used in conjunction with other forms of analysis and proper risk management.
Past performance does not guarantee future results, and traders should thoroughly test any strategy before implementing it with real capital.
Bộ lọc Stoch RSI + MACD + Volume + MFI//@version=6
indicator("Bộ lọc Stoch RSI + MACD + Volume + MFI", overlay=false)
// Input
lenStoch = input.int(14, "Stoch RSI Length")
lenMACD = input.int(12, "MACD Fast Length")
lenSignal = input.int(9, "MACD Signal Length")
lenMFI = input.int(14, "MFI Length")
minVol = input.int(1000000, "Khối lượng tối thiểu")
// Stochastic RSI
k = ta.stoch(close, high, low, lenStoch)
d = ta.sma(k, 3)
// MACD
macd = ta.ema(close, lenMACD) - ta.ema(close, 26)
signal = ta.ema(macd, lenSignal)
// ✅ MFI (chỉ cần volume và length)
mfi = ta.mfi(volume, lenMFI)
// Điều kiện lọc
buyCond = (k < 20 and macd > signal and volume > minVol and mfi > 60)
sellCond = (k > 80 and macd < signal and mfi < 40)
// Xuất tín hiệu
plotchar(buyCond, "BUY", "▲", location=location.bottom, color=color.green, size=size.large)
plotchar(sellCond, "SELL", "▼", location=location.top, color=color.red, size=size.large)
Plot Other Symbol Volume + MAPlot Other Symbol Volume + MA:
- Watch other chart volume on current chart like a built-in tradingview volume
Normalized Portfolio TrackerThis script lets you create, visualize, and track a custom portfolio of up to 15 assets directly on TradingView.
It calculates a synthetic "portfolio index" by combining multiple tickers with user-defined weights, automatically normalizing them so the total allocation always equals 100%.
All assets are scaled to a common starting point, allowing you to compare your portfolio’s performance versus any benchmark like SPY, QQQ, or BTC.
🚀 Goal
This script helps traders and investors:
• Understand the combined performance of their portfolio.
• Normalize diverse assets into a single synthetic chart .
• Make portfolio-level insights without relying on external spreadsheets.
🎯 Use Cases
• Backtest your portfolio allocations directly on the chart.
• Compare your portfolio vs. benchmarks like SPY, QQQ, BTC.
• Track thematic baskets (commodities, EV supply chain, regional ETFs).
• Visualize how each component contributes to overall performance.
📊 Features
• Weighted Portfolio Performance : Combines selected assets into a synthetic value series.
• Base Price Alignment : Each asset is normalized to its starting price at the chosen date.
• Dynamic Portfolio Table : Displays symbols, normalized weights (%), equivalent shares (based on each asset’s start price, sums to 100 shares), and a total row that always sums to 100%.
• Multi-Asset Support : Works with stocks, ETFs, indices, crypto, or any TradingView-compatible symbol.
⚙️ Configuration
Flexible Portfolio Setup
• Add up to 15 assets with custom weight inputs.
• You can enter any arbitrary numbers (e.g. 30, 15, 55).
• The script automatically normalizes all weights so the total allocation always equals 100%.
Start Date Selection
• Choose any custom start date to normalize all assets.
• The portfolio value is then scaled relative to the main chart symbol, so you can directly compare portfolio performance against benchmarks like SPY or QQQ.
Chart Styles
• Candlestick chart
• Heikin Ashi chart
• Line chart
Custom Display
• Adjustable colors and line widths
• Optionally display asset list, normalized weights, and equivalent shares
⚙️ How It Works
• Fetch OHLC data for each asset.
• Normalizes weights internally so totals = 100%.
• Stores each asset’s base price at the selected start date.
• Calculates equivalent “shares” for each allocation.
• Builds a synthetic portfolio value series by summing weighted contributions.
• Renders as Candlestick, Heikin Ashi, or Line chart.
• Adds a portfolio info table for clarity.
⚠️ Notes
• This script is for visualization only . It does not place trades or auto-rebalance.
• Weight inputs are automatically normalized, so you don’t need to enter exact percentages.
EMA SIMPLEThis indicator displays a configurable Exponential Moving Average (EMA) that helps identify trend direction and potential dynamic support/resistance zones.
The EMA gives more weight to recent prices, reacting faster to market changes compared to the Simple Moving Average (SMA). This makes it useful for:
Detecting short- and medium-term trends.
Filtering trades in the direction of the prevailing trend.
Pinpointing more precise entries and exits when compared to price action.
Features:
Configurable period (default: 50).
Customizable line color and thickness.
Adapts to any timeframe (scalping, intraday, swing).
How to use it:
Price above the EMA → bullish trend.
Price below the EMA → bearish trend.
Price crossing the EMA may signal potential reversals or pullbacks.
Phân tích Đa Khung Thời gian
//@version=5
indicator("Phân tích Đa Khung Thời gian", shorttitle="Manual Analysis", overlay=true)
// ============== INPUTS CHO BẢNG PHÂN TÍCH XU HƯỚNG ==============
monthlyTrend = input.string("Bullish", title="Xu hướng Monthly", options= )
weeklyTrend = input.string("Bullish", title="Xu hướng Weekly", options= )
dailyTrend = input.string("Bullish", title="Xu hướng Daily", options= )
h4Trend = input.string("Bullish", title="Xu hướng H4", options= )
h1Trend = input.string("Bullish", title="Xu hướng H1", options= )
m30Trend = input.string("Bullish", title="Xu hướng M30", options= )
m15Trend = input.string("Bullish", title="Xu hướng M15", options= )
m5Trend = input.string("Bullish", title="Xu hướng M5", options= )
m1Trend = input.string("Bullish", title="Xu hướng M1", options= )
// Mảng chứa nhãn và xu hướng
labels = array.from("Mn", "W", "D", "H4", "H1", "M30", "M15", "M5", "M1")
trends = array.from(monthlyTrend, weeklyTrend, dailyTrend, h4Trend, h1Trend, m30Trend, m15Trend, m5Trend, m1Trend)
// ============== TẠO VÀ CẬP NHẬT BẢNG DUY NHẤT ==============
// Sắp xếp bảng nằm ngang
var table manual_analysis_table = table.new(position.top_right, array.size(labels), 2, bgcolor=color.new(color.black, 80), border_width=1)
if barstate.islast
// TIÊU ĐỀ HÀNG ĐẦU TIÊN (Nhãn khung thời gian)
for i = 0 to array.size(labels) - 1
table.cell(manual_analysis_table, i, 0, array.get(labels, i), text_color=color.white, bgcolor=color.new(color.blue, 50), text_size=size.small)
// ĐỔ DỮ LIỆU XU HƯỚNG VÀO HÀNG THỨ HAI
for i = 0 to array.size(trends) - 1
trendStatus = array.get(trends, i)
trendColor = trendStatus == "Bullish" ? color.green : color.red
trendSymbol = trendStatus == "Bullish" ? "▲" : "▼"
table.cell(manual_analysis_table, i, 1, trendSymbol, text_color=trendColor)
Candle count, with simple numberWhat it does
Counts the length of same-color candle streaks (consecutive bullish or bearish bars) and prints the running number above each bar:
e.g., “1, 2, 3…”; when color flips, it restarts at “1”.
Prime numbers (2, 3, 5, 7, 11, 13) are emphasized by rendering one size step larger and with a user-selected color.
Labels are pinned to each bar (anchored by bar index and price), so they do not drift when you pan or zoom the chart.
How it works
Determines candle direction: bullish if close > open, bearish if close < open.
If the current bar has the same direction as the previous bar, the counter increments; otherwise it resets to 1.
For values 2, 3, 5, 7, 11, 13 the number is highlighted (bigger + custom color).
Each number is drawn just above the bar’s High with a configurable offset.
The script does not repaint on history. During the live bar, the number updates in real time (as expected).
Settings
Digits size — Base text size (Tiny / Small / Normal / Large / Huge).
Prime numbers are automatically shown one step larger than the base size.
Offset above bar (ticks) — Vertical offset from the bar’s High, in instrument ticks.
Prime numbers color — Text color used specifically for prime numbers (non-prime digits are white).
How to read & use it
Rising momentum. Long streaks (e.g., 5–7+) suggest strong directional moves with few pullbacks.
Early pause/mean-reversion hints. After a long streak, the appearance of the opposite color (counter resets to “1”) often coincides with a pause or minor retrace.
Research & statistics. Quickly see which streak lengths are common on your market/timeframe (e.g., “How often do 3–5 bar runs occur?”).
Trade management. You can tie partial exits to specific streak lengths (2, 3, 5…) or reduce risk when the counter flips back to “1”.
Why it’s useful
Provides a clean, numeric view of momentum with zero smoothing or lag.
Works on any symbol and timeframe.
Prime-number emphasis makes important counts pop at a glance.
Pinned labels stay exactly above their bars, ensuring stable, readable visuals at any zoom level.
Notes
Doji bars (close == open) are treated as no direction and reset the streak.
This is a context tool, not a standalone buy/sell signal. Combine it with your entry/exit framework.
Very dense charts may hit platform label limits; the script raises the limit, but extremely long histories on very low timeframes can still be heavy.
Bull/Bear Ownership — MTF Alignment (v6)Bull/Bear Ownership — MTF Alignment (v6)
Scores who “owns” the market (bulls vs bears) across multiple timeframes and rolls it into a single 0–100 alignment score (50 = neutral). Uses bullish-bar share, body dominance, and regression slope (ATR-normalized). Includes faint MTF trend lines, bar paints, mini table, badge, and 4 alert conditions.
Full description
What it does
This tool measures bull/bear ownership on up to 7 selectable timeframes and combines them into one easy alignment meter.
For each TF it computes:
Share of bullish bars over a lookback (0–1).
Body dominance (−1…+1) = avg(bull bodies) − avg(bear bodies) scaled by total bodies.
Trend slope (−1…+1) = linear regression slope normalized by ATR (dimensionless strength).
These pieces are blended into a per-TF score (−10…+10), weighted by your TF weights, and normalized to a composite 0…100:
Higher = stronger multi-TF bull ownership
Lower = stronger multi-TF bear ownership
50 = neutral / mixed
Visuals
Optional faint regression “trend lines” per TF (green/red by direction).
Bar paints on GO / NO-GO thresholds (default 70 / 30).
Floating badge with the live % and stack state.
Mini table showing each TF’s score % and notes (majority bull/bear, body Δ%, slope×ATR).
Inputs
Timeframes: 7 slots, each with enable + weight (1–5).
Ownership calc: Lookback (bars), slope length, ATR length, blend weights (body vs slope).
Display: trend lines toggle, opacity, bar paints, badge, table, table corner.
Thresholds: GO (bullish) / NO-GO (bearish).
Alerts
GO ✅ (composite ≥ threshold)
NO-GO 🛑 (composite ≤ threshold)
ALL TFs UP ✔ (every enabled TF bullish)
ALL TFs DOWN ✖ (every enabled TF bearish)
Tips
Use a ladder like 60/120/180/240/D (1h/2h/3h/4h/1D).
Give higher TFs more weight for trend trading; raise body dominance weight for “who’s in control,” or slope weight for momentum.
Set ownLen = 1 if you want “who owned the last bar” per TF.
Tune GO/NO-GO for your asset & timeframe; 70/30 is a solid start.
Notes
This is an analysis tool, not financial advice. Backtest and combine with your risk management. uwu 💜
Franja de pre-mercadoThis indicator highlights the entire period from the end of the regular New York trading session through the overnight and pre-market, until the market reopens the next morning.
By default, the highlighted band starts at 16:30 New York time (15 minutes after the official close at 16:15) and continues without interruption through the night until 09:30 New York time, when the regular session begins.
🔹 Works for both futures and stocks (you can adjust the closing time if needed: 16:15 for futures, 16:00 for equities).
🔹 Option to include or exclude weekends.
🔹 Optional highlight for the last hour of RTH (e.g. 15:15–16:15 NY).
🔹 Fully customizable colors and offsets.
This tool helps traders clearly separate the overnight activity and pre-market moves from the main session, making it easier to analyze price action and market structure.
Tight 5-10 SMA Wedge ScannerIndicator for helping filter out high growth momentum names to look for stocks that are consolidating near the 5 & 10 SMA. Do a general scan first using trading view scanner 1,3,6 month performance > 30%, Price > 20,50,200 SMA, ADR > 3%, Price * Vol > 5M. Copy this into a watchlist and head over to tradingview website and access Pine screener under Products -> Screeners -> Pine. Select your watchlist with your stocks and add this indicator after favoriting it, select SMA Spread % set to below value 3 or whatever number you want, select Price Diff % set to below value 5 or whatever number you want. Now you listed should be significantly reduced to names that are close to breaking out and flagging.
BarCounterTrack up to 3 horizontal lines and see how many bars each level has hit 📈. Color-code lines 🎨 and monitor bar counts in a floating table. Perfect for spotting key price levels and their historical frequency!