EMA Market Structure [BOSWaves]// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org
// Join our channel for more free tools: t.me
// This Pine Script® code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org
// © BOSWaves
//@version=6
indicator("EMA Market Structure ", overlay=true, max_lines_count=500, max_labels_count=500, max_boxes_count=500)
// ============================================================================
// Inputs
// ============================================================================
// Ema settings
emaLength = input.int(50, "EMA Length", minval=1, tooltip="Period for the Exponential Moving Average calculation")
emaSource = input.source(close, "EMA Source", tooltip="Price source for EMA calculation (close, open, high, low, etc.)")
colorSmooth = input.int(3, "Color Smoothing", minval=1, group="EMA Style", tooltip="Smoothing period for the EMA color gradient transition")
showEmaGlow = input.bool(true, "EMA Glow Effect", group="EMA Style", tooltip="Display glowing halo effect around the EMA line for enhanced visibility")
// Structure settings
swingLength = input.int(5, "Swing Detection Length", minval=2, group="Structure", tooltip="Number of bars to the left and right to identify swing highs and lows")
swingCooloff = input.int(10, "Swing Marker Cooloff (Bars)", minval=1, group="Structure", tooltip="Minimum number of bars between consecutive swing point markers to reduce visual clutter")
showSwingLines = input.bool(true, "Show Structure Lines", group="Structure", tooltip="Display lines connecting swing highs and swing lows")
showSwingZones = input.bool(true, "Show Structure Zones", group="Structure", tooltip="Display shaded zones between consecutive swing points")
showBOS = input.bool(true, "Show Break of Structure", group="Structure", tooltip="Display BOS labels and stop loss levels when price breaks structure")
bosCooloff = input.int(15, "BOS Cooloff (Bars)", minval=5, maxval=50, group="Structure", tooltip="Minimum number of bars required between consecutive BOS signals to avoid signal spam")
slExtension = input.int(20, "SL Line Extension (Bars)", minval=5, maxval=100, group="Structure", tooltip="Number of bars to extend the stop loss line into the future for visibility")
slBuffer = input.float(0.1, "SL Buffer %", minval=0, maxval=2, step=0.05, group="Structure", tooltip="Additional buffer percentage to add to stop loss level for safety margin")
// Background settings
showBG = input.bool(true, "Show Trend Background", group="EMA Style", tooltip="Display background color based on EMA trend direction")
bgBullColor = input.color(color.new(#00ff88, 96), "Bullish BG", group="EMA Style", tooltip="Background color when EMA is in bullish trend")
bgBearColor = input.color(color.new(#ff3366, 96), "Bearish BG", group="EMA Style", tooltip="Background color when EMA is in bearish trend")
// ============================================================================
// Ema trend filter with gradient color
// ============================================================================
ema = ta.ema(emaSource, emaLength)
// Calculate EMA acceleration for gradient color
emaChange = ema - ema
emaAccel = ta.ema(emaChange, colorSmooth)
// Manual tanh function for normalization
tanh(x) =>
ex = math.exp(2 * x)
(ex - 1) / (ex + 1)
accelNorm = tanh(emaAccel / (ta.atr(14) * 0.01))
// Map normalized accel to hue (60 = green, 120 = yellow/red)
hueRaw = 60 + accelNorm * 60
hue = na(hueRaw ) ? hueRaw : (hueRaw + hueRaw ) / 2
sat = 1.0
val = 1.0
// HSV to RGB conversion
hsv_to_rgb(h, s, v) =>
c = v * s
x = c * (1 - math.abs((h / 60) % 2 - 1))
m = v - c
r = 0.0
g = 0.0
b = 0.0
if (h < 60)
r := c
g := x
b := 0
else if (h < 120)
r := x
g := c
b := 0
else if (h < 180)
r := 0
g := c
b := x
else if (h < 240)
r := 0
g := x
b := c
else if (h < 300)
r := x
g := 0
b := c
else
r := c
g := 0
b := x
color.rgb(int((r + m) * 255), int((g + m) * 255), int((b + m) * 255))
emaColor = hsv_to_rgb(hue, sat, val)
emaTrend = ema > ema ? 1 : ema < ema ? -1 : 0
// EMA with enhanced glow effect using fills
glowOffset = ta.atr(14) * 0.25
emaGlow8 = plot(showEmaGlow ? ema + glowOffset * 8 : na, "EMA Glow 8", color.new(emaColor, 100), 1, display=display.none)
emaGlow7 = plot(showEmaGlow ? ema + glowOffset * 7 : na, "EMA Glow 7", color.new(emaColor, 100), 1, display=display.none)
emaGlow6 = plot(showEmaGlow ? ema + glowOffset * 6 : na, "EMA Glow 6", color.new(emaColor, 100), 1, display=display.none)
emaGlow5 = plot(showEmaGlow ? ema + glowOffset * 5 : na, "EMA Glow 5", color.new(emaColor, 100), 1, display=display.none)
emaGlow4 = plot(showEmaGlow ? ema + glowOffset * 4 : na, "EMA Glow 4", color.new(emaColor, 100), 1, display=display.none)
emaGlow3 = plot(showEmaGlow ? ema + glowOffset * 3 : na, "EMA Glow 3", color.new(emaColor, 100), 1, display=display.none)
emaGlow2 = plot(showEmaGlow ? ema + glowOffset * 2 : na, "EMA Glow 2", color.new(emaColor, 100), 1, display=display.none)
emaGlow1 = plot(showEmaGlow ? ema + glowOffset * 1 : na, "EMA Glow 1", color.new(emaColor, 100), 1, display=display.none)
emaCore = plot(ema, "EMA Core", emaColor, 3)
emaGlow1b = plot(showEmaGlow ? ema - glowOffset * 1 : na, "EMA Glow 1b", color.new(emaColor, 100), 1, display=display.none)
emaGlow2b = plot(showEmaGlow ? ema - glowOffset * 2 : na, "EMA Glow 2b", color.new(emaColor, 100), 1, display=display.none)
emaGlow3b = plot(showEmaGlow ? ema - glowOffset * 3 : na, "EMA Glow 3b", color.new(emaColor, 100), 1, display=display.none)
emaGlow4b = plot(showEmaGlow ? ema - glowOffset * 4 : na, "EMA Glow 4b", color.new(emaColor, 100), 1, display=display.none)
emaGlow5b = plot(showEmaGlow ? ema - glowOffset * 5 : na, "EMA Glow 5b", color.new(emaColor, 100), 1, display=display.none)
emaGlow6b = plot(showEmaGlow ? ema - glowOffset * 6 : na, "EMA Glow 6b", color.new(emaColor, 100), 1, display=display.none)
emaGlow7b = plot(showEmaGlow ? ema - glowOffset * 7 : na, "EMA Glow 7b", color.new(emaColor, 100), 1, display=display.none)
emaGlow8b = plot(showEmaGlow ? ema - glowOffset * 8 : na, "EMA Glow 8b", color.new(emaColor, 100), 1, display=display.none)
// Create glow layers with fills (from outermost to innermost)
fill(emaGlow8, emaGlow7, showEmaGlow ? color.new(emaColor, 97) : na)
fill(emaGlow7, emaGlow6, showEmaGlow ? color.new(emaColor, 95) : na)
fill(emaGlow6, emaGlow5, showEmaGlow ? color.new(emaColor, 93) : na)
fill(emaGlow5, emaGlow4, showEmaGlow ? color.new(emaColor, 90) : na)
fill(emaGlow4, emaGlow3, showEmaGlow ? color.new(emaColor, 87) : na)
fill(emaGlow3, emaGlow2, showEmaGlow ? color.new(emaColor, 83) : na)
fill(emaGlow2, emaGlow1, showEmaGlow ? color.new(emaColor, 78) : na)
fill(emaGlow1, emaCore, showEmaGlow ? color.new(emaColor, 70) : na)
fill(emaCore, emaGlow1b, showEmaGlow ? color.new(emaColor, 70) : na)
fill(emaGlow1b, emaGlow2b, showEmaGlow ? color.new(emaColor, 78) : na)
fill(emaGlow2b, emaGlow3b, showEmaGlow ? color.new(emaColor, 83) : na)
fill(emaGlow3b, emaGlow4b, showEmaGlow ? color.new(emaColor, 87) : na)
fill(emaGlow4b, emaGlow5b, showEmaGlow ? color.new(emaColor, 90) : na)
fill(emaGlow5b, emaGlow6b, showEmaGlow ? color.new(emaColor, 93) : na)
fill(emaGlow6b, emaGlow7b, showEmaGlow ? color.new(emaColor, 95) : na)
fill(emaGlow7b, emaGlow8b, showEmaGlow ? color.new(emaColor, 97) : na)
// ============================================================================
// Swing high/low detection
// ============================================================================
// Swing High/Low Detection
swingHigh = ta.pivothigh(high, swingLength, swingLength)
swingLow = ta.pivotlow(low, swingLength, swingLength)
// Cooloff tracking
var int lastSwingHighPlot = na
var int lastSwingLowPlot = na
// Check if cooloff period has passed
canPlotHigh = na(lastSwingHighPlot) or (bar_index - lastSwingHighPlot) >= swingCooloff
canPlotLow = na(lastSwingLowPlot) or (bar_index - lastSwingLowPlot) >= swingCooloff
// Store swing points
var float lastSwingHigh = na
var int lastSwingHighBar = na
var float lastSwingLow = na
var int lastSwingLowBar = na
// Track previous swing for BOS detection
var float prevSwingHigh = na
var float prevSwingLow = na
// Update swing highs with cooloff
if not na(swingHigh) and canPlotHigh
prevSwingHigh := lastSwingHigh
lastSwingHigh := swingHigh
lastSwingHighBar := bar_index - swingLength
lastSwingHighPlot := bar_index
// Update swing lows with cooloff
if not na(swingLow) and canPlotLow
prevSwingLow := lastSwingLow
lastSwingLow := swingLow
lastSwingLowBar := bar_index - swingLength
lastSwingLowPlot := bar_index
// ============================================================================
// Structure lines & zones
// ============================================================================
var line swingHighLine = na
var line swingLowLine = na
var box swingHighZone = na
var box swingLowZone = na
if showSwingLines
// Draw line connecting swing highs with zones
if not na(swingHigh) and canPlotHigh and not na(prevSwingHigh)
if not na(lastSwingHighBar)
line.delete(swingHighLine)
swingHighLine := line.new(lastSwingHighBar, lastSwingHigh, bar_index - swingLength, swingHigh, color=color.new(#ff3366, 0), width=2, style=line.style_solid)
// Create resistance zone
if showSwingZones
box.delete(swingHighZone)
zoneTop = math.max(lastSwingHigh, swingHigh)
zoneBottom = math.min(lastSwingHigh, swingHigh)
swingHighZone := box.new(lastSwingHighBar, zoneTop, bar_index - swingLength, zoneBottom, border_color=color.new(#ff3366, 80), bgcolor=color.new(#ff3366, 92))
// Draw line connecting swing lows with zones
if not na(swingLow) and canPlotLow and not na(prevSwingLow)
if not na(lastSwingLowBar)
line.delete(swingLowLine)
swingLowLine := line.new(lastSwingLowBar, lastSwingLow, bar_index - swingLength, swingLow, color=color.new(#00ff88, 0), width=2, style=line.style_solid)
// Create support zone
if showSwingZones
box.delete(swingLowZone)
zoneTop = math.max(lastSwingLow, swingLow)
zoneBottom = math.min(lastSwingLow, swingLow)
swingLowZone := box.new(lastSwingLowBar, zoneTop, bar_index - swingLength, zoneBottom, border_color=color.new(#00ff88, 80), bgcolor=color.new(#00ff88, 92))
// ============================================================================
// Break of structure (bos)
// ============================================================================
// Track last BOS bar for cooloff
var int lastBullishBOS = na
var int lastBearishBOS = na
// Check if cooloff period has passed
canPlotBullishBOS = na(lastBullishBOS) or (bar_index - lastBullishBOS) >= bosCooloff
canPlotBearishBOS = na(lastBearishBOS) or (bar_index - lastBearishBOS) >= bosCooloff
// Bullish BOS: Price breaks above previous swing high while EMA is bullish
bullishBOS = showBOS and canPlotBullishBOS and emaTrend == 1 and not na(prevSwingHigh) and close > prevSwingHigh and close <= prevSwingHigh
// Bearish BOS: Price breaks below previous swing low while EMA is bearish
bearishBOS = showBOS and canPlotBearishBOS and emaTrend == -1 and not na(prevSwingLow) and close < prevSwingLow and close >= prevSwingLow
// Update last BOS bars
if bullishBOS
lastBullishBOS := bar_index
if bearishBOS
lastBearishBOS := bar_index
// Plot BOS with enhanced visuals and SL at the candle wick
if bullishBOS
// Calculate SL at the low of the current candle (bottom of wick) with buffer
slLevel = low * (1 - slBuffer/100)
// BOS Label with shadow effect
label.new(bar_index, low, "BOS", style=label.style_label_up, color=color.new(#00ff88, 0), textcolor=color.black, size=size.normal, tooltip="Bullish Break of Structure SL: " + str.tostring(slLevel))
// Main SL line at candle low
line.new(bar_index, slLevel, bar_index + slExtension, slLevel, color=color.new(#00ff88, 0), width=2, style=line.style_dashed, extend=extend.none)
// SL zone box for visual emphasis
box.new(bar_index, slLevel + (slLevel * 0.002), bar_index + slExtension, slLevel - (slLevel * 0.002), border_color=color.new(#00ff88, 60), bgcolor=color.new(#00ff88, 85))
// S/R label
label.new(bar_index + slExtension, slLevel, "S/R", style=label.style_label_left, color=color.new(#00ff88, 0), textcolor=color.black, size=size.tiny)
if bearishBOS
// Calculate SL at the high of the current candle (top of wick) with buffer
slLevel = high * (1 + slBuffer/100)
// BOS Label with shadow effect
label.new(bar_index, high, "BOS", style=label.style_label_down, color=color.new(#ff3366, 0), textcolor=color.white, size=size.normal, tooltip="Bearish Break of Structure SL: " + str.tostring(slLevel))
// Main SL line at candle high
line.new(bar_index, slLevel, bar_index + slExtension, slLevel, color=color.new(#ff3366, 0), width=2, style=line.style_dashed, extend=extend.none)
// SL zone box for visual emphasis
box.new(bar_index, slLevel + (slLevel * 0.002), bar_index + slExtension, slLevel - (slLevel * 0.002), border_color=color.new(#ff3366, 60), bgcolor=color.new(#ff3366, 85))
// S/R label
label.new(bar_index + slExtension, slLevel, "S/R", style=label.style_label_left, color=color.new(#ff3366, 0), textcolor=color.white, size=size.tiny)
// ============================================================================
// Dynamic background zones
// ============================================================================
bgcolor(showBG and emaTrend == 1 ? bgBullColor : showBG and emaTrend == -1 ? bgBearColor : na)
// ============================================================================
// Alerts
// ============================================================================
alertcondition(bullishBOS, "Bullish BOS", "Bullish Break of Structure detected!")
alertcondition(bearishBOS, "Bearish BOS", "Bearish Break of Structure detected!")
alertcondition(emaTrend == 1 and emaTrend != 1, "EMA Bullish", "EMA turned bullish")
alertcondition(emaTrend == -1 and emaTrend != -1, "EMA Bearish", "EMA turned bearish")
// ╔════════════════════════════════╗
// ║ Download at ║
// ╚════════════════════════════════╝
// ███████╗██╗███╗ ███╗██████╗ ██╗ ███████╗
// ██╔════╝██║████╗ ████║██╔══██╗██║ ██╔════╝
// ███████╗██║██╔████╔██║██████╔╝██║ █████╗
// ╚════██║██║██║╚██╔╝██║██╔═══╝ ██║ ██╔══╝
// ███████║██║██║ ╚═╝ ██║██║ ███████╗███████╗
// ╚══════╝╚═╝╚═╝ ╚═╝╚═╝ ╚══════╝╚══════╝
// ███████╗ ██████╗ ██████╗ ███████╗██╗ ██╗
// ██╔════╝██╔═══██╗██╔══██╗██╔════╝╚██╗██╔╝
// █████╗ ██║ ██║██████╔╝█████╗ ╚███╔╝
// ██╔══╝ ██║ ██║██╔══██╗██╔══╝ ██╔██╗
// ██║ ╚██████╔╝██║ ██║███████╗██╔╝ ██╗
// ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
// ████████╗ ██████╗ ██████╗ ██╗ ███████╗
// ╚══██╔══╝██╔═══██╗██╔═══██╗██║ ██╔════╝
// ██║ ██║ ██║██║ ██║██║ ███████╗
// ██║ ██║ ██║██║ ██║██║ ╚════██║
// ██║ ╚██████╔╝╚██████╔╝███████╗███████║
// ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝╚══════╝
// ==========================================================================================
Educational
Multi-Condition Alert System d//@version=5
indicator("Multi-Condition Alert System", shorttitle="MC Alert", overlay=false)
// Timeframe check - Set to 10 minutes
isCorrectTF = timeframe.isintraday and timeframe.multiplier == 10
// EMA Calculations
ema9 = ta.ema(close, 9)
ema21 = ta.ema(close, 21)
ema50 = ta.ema(close, 50)
// MACD Calculations
= ta.macd(close, 12, 26, 9)
// RSI Calculations
rsiValue = ta.rsi(close, 14)
// Define RSI levels (you can adjust these based on your violet/yellow lines)
// Assuming violet is above 50 and yellow is below 50
rsiVioletLevel = 50 // Adjust based on your actual levels
rsiYellowLevel = 50 // Adjust based on your actual levels
// Conditions
emaCondition = ema9 > ema21 and ema9 > ema50
macdCondition = macdLine > signalLine
rsiCondition = rsiValue > rsiVioletLevel and rsiValue > rsiYellowLevel
// All conditions must be true
buySignal = emaCondition and macdCondition and rsiCondition and isCorrectTF
// Plotting for visualization
plot(ema9, color=color.blue, title="EMA 9")
plot(ema21, color=color.orange, title="EMA 21")
plot(ema50, color=color.red, title="EMA 50")
plot(macdLine, color=color.blue, title="MACD Line", style=plot.style_line)
plot(signalLine, color=color.orange, title="Signal Line", style=plot.style_line)
hline(rsiVioletLevel, "RSI Violet Level", color=color.purple)
hline(rsiYellowLevel, "RSI Yellow Level", color=color.yellow)
plot(rsiValue, color=color.white, title="RSI")
// Plot buy signals
plotshape(buySignal ? 1 : na, title="Buy Signal", location=location.bottom,
color=color.green, style=shape.triangleup, size=size.small)
// Alert condition
if buySignal
alert("BUY SIGNAL: EMA 9 > EMA 21 & 50, MACD blue > orange, RSI above levels", alert.freq_once_per_bar)
// Table display
var table signalTable = table.new(position.top_right, 1, 5, bgcolor=color.black,
border_width=1)
if barstate.islast
table.cell(signalTable, 0, 0, "10min TF Check:",
text_color=isCorrectTF ? color.green : color.red)
table.cell(signalTable, 0, 1, "EMA 9 > 21 & 50:",
text_color=emaCondition ? color.green : color.red)
table.cell(signalTable, 0, 2, "MACD Blue > Orange:",
text_color=macdCondition ? color.green : color.red)
table.cell(signalTable, 0, 3, "RSI Condition:",
text_color=rsiCondition ? color.green : color.red)
table.cell(signalTable, 0, 4, "BUY SIGNAL:",
text_color=buySignal ? color.green : color.red)
Daily 9 SMA S/R with Std DevThis indicator plots the Daily 9 Simple Moving Average as dynamic support/resistance on any timeframe, with standard deviation bands to measure trend strength and identify overextended price action.
━━━━━━━━━━━━━━━━━━━━━━
HOW IT WORKS
━━━━━━━━━━━━━━━━━━━━━━
The Daily 9 SMA acts as a key level institutions watch. When price is above it, bullish bias. Below it, bearish bias. Simple.
Standard deviation bands show you:
- 1 StdDev = Strong trend territory
- 2 StdDev = Extreme/overextended - potential reversal zone
━━━━━━━━━━━━━━━━━━━━━━
FEATURES
━━━━━━━━━━━━━━━━━━━━━━
- Daily 9 SMA plotted on any timeframe
- 1 & 2 Standard Deviation bands
- Trend strength scoring (-3 to +3)
- Info table showing current values and trend status
- Visual signals for MA reclaims, losses, and trend entries
━━━━━━━━━━━━━━━━━━━━━━
ALERTS
━━━━━━━━━━━━━━━━━━━━━━
- Price Reclaims Daily 9 SMA
- Price Loses Daily 9 SMA
- Enter Strong Bullish Zone (>1 StdDev)
- Enter Strong Bearish Zone (<1 StdDev)
- Extreme Extension Alerts (2 StdDev)
- Bounce/Rejection at MA
━━━━━━━━━━━━━━━━━━━━━━
HOW TO USE
━━━━━━━━━━━━━━━━━━━━━━
1. Use on lower timeframes (5m, 15m, 1H) to see Daily levels
2. Look for bounces off the Daily 9 SMA for entries
3. Avoid longs when price loses the MA, avoid shorts when price reclaims
4. Use StdDev bands to gauge when price is overextended
━━━━━━━━━━━━━━━━━━━━━━
SETTINGS
━━━━━━━━━━━━━━━━━━━━━━
- MA Length - Default 9
- StdDev Multipliers - Default 1.0 and 2.0
- StdDev Lookback - Default 20
- Customizable colors
Works on any market - Forex, Crypto, Stocks, Futures.
Annual Lump Sum: Yearly & CompoundedAnnual Lump Sum Investment Analyzer (Yearly vs. Compounded)
Overview
This Pine Script indicator simulates a disciplined "Lump Sum" investing strategy. It calculates the performance of buying a fixed dollar amount (e.g., $10,000) on the very first trading day of every year and holding it indefinitely.
Unlike standard backtesters that only show a total percentage, this tool breaks down performance by "Vintage" (the year of purchase), allowing you to see which specific years contributed most to your wealth.
Key Features
Automated Execution: Automatically detects the first trading bar of every new year to simulate a buy.
Dual-Yield Analysis: The table provides two distinct ways to view returns:
Yearly %: How the market performed specifically during that calendar year (Jan 1 to Dec 31).
Compounded %: The total return of that specific year's investment from the moment it was bought until today.
Live Updates: For the current year, the "End Price" and "Yields" update in real-time with market movements.
Portfolio Summary: Displays your Total Invested Capital vs. Total Current Value at the top of the table.
Table Column Breakdown
The dashboard in the bottom-right corner displays the following:
Year: The vintage year of the investment.
Buy Price: The price of the asset on the first trading day of that year.
End Price: The price on the last trading day of that year (or the current price if the year is still active).
Yearly %: The isolated performance of that specific calendar year. (Green = The market ended the year higher than it started).
Compounded %: The "Diamond Hands" return. This shows how much that specific $10,000 tranche is up (or down) right now relative to the current price.
How to Use
Add the script to your chart.
Crucial: Set your chart timeframe to Daily (D). This ensures the script correctly identifies the first trading day of the year.
Open the Settings (Inputs) to adjust:
Annual Investment Amount: Default is $10,000.
Table Size: Adjust text size (Tiny, Small, Normal, Large).
Max Rows: Limit how many historical years are shown to keep the chart clean.
Use Case
This tool is perfect for investors who want to visualize the power of long-term holding. It allows you to see that even if a specific year had a bad "Yearly Yield" (e.g., buying in 2008), the "Compounded Yield" might still be massive today due to time in the market.
Dynamic TP Based on RR - Position ToolSimple indicator that automatically plots the take-profit (TP) level based on the below inputs:
- Entry price
- Stop-loss (SL)
- Risk-to-reward (RR)
The long/short-position drawing tools are simple enough to use, but wanted something that will automatically plot the TP instead. Couldn't find anything basic and free of extra features so built this instead.
This is how I use it.
1 (optional): Use the long/short-position drawing tool to plot the entry and stop-loss levels
2: Enable the indicator and enter the inputs
- Entry
- SL
- RR
3: The TP will automatically plot. Change the RR to your liking.
Daily Dollar Cost Averaging (DCA) Simulator & Yearly PerformanceThis indicator simulates a "Daily Dollar Cost Averaging" strategy directly on your chart. Unlike standard backtesters that trade based on signals, this script calculates the performance of a portfolio where a fixed dollar amount is invested every single day, regardless of price action.
Key Features:
Daily Accumulation: Simulates buying a specific dollar amount (e.g., $10) at the market close every day.
Yearly Breakdown Table: A detailed dashboard displayed on the chart that breaks down performance by year. It tracks total invested, average entry price, total holdings, current value, and PnL percentage for each individual year.
Global Stats: The bottom row of the table summarizes the total performance of the entire strategy since the start date.
Breakeven Line: Plots a yellow line on the chart representing your "Global Average Price." When the current price is above this line, the total strategy is in profit.
How to Use:
Add to chart (Works best on the Daily (D) timeframe).
Open settings to adjust your Daily Investment Amount and Start Year.
The table will automatically update to show how a daily investment strategy would have performed over time.
Day Range with OHLC LabelsThis indicator creates a synthetic daily candlestick that appears to the right of the chart, visually separated from real price bars.
It helps traders quickly view each day’s High, Low, Open, and Close without zooming, scrolling, or switching to higher timeframes.
What This Tool Does
✔ Draws a floating daily candle to the right of the current chart
✔ Displays the true Daily Open, High, Low, and Close
✔ Shows a center-aligned wick representing the full high-low range
✔ Shows a box-style candle body positioned using real OHLC values
✔ Labels the values (O, H, L, C) with large, clear fonts
✔ Automatically updates at each new day
✔ Works on any timeframe
✔ Helps intraday traders track daily structure visually
Why This Indicator Is Useful
This script is ideal for intraday traders who want instant awareness of the current day’s range.
Instead of guessing or drawing manual lines, you get a clean daily candlestick rendered off to the right side, avoiding chart clutter.
Great for:
Range traders
Breakout traders
Liquidity zone analysis
High/Low reference tracking
Traders who prefer non-intrusive visuals
Customization
Adjustable offset: position the candle further right
Configurable colors for wick + body
Large-font labels for easy reading
Automatically clears and redraws cleanly each day
Summary
This tool creates a clear, minimalistic, right-side daily candlestick complete with OHLC labels and centralized wick.
It’s designed to improve chart clarity and support quick decision-making without blocking price candles.
Smart Money Scanner Suite v6 - OptimizedWHAT IT DOES (longer version in the script):
// Identifies "Smart Money Stepping Back" (SMSB) zones where institutions quietly
// build positions without moving the market. Signals appear when ALL 4 conditions align:
//
// 1. OBV DIVERGENCE → Price up/OBV down (distribution) or Price down/OBV up (accumulation)
// 2. LOW VOLUME → Below 1.5x average (stealth activity)
// 3. NEAR VWAP → Within 0.5% (institutional fair value)
// 4. HTF CONFIRMATION → Higher timeframe shows directional momentum
Bayesian Liquidity Pain & Gain [Instit. Vol Weighted]Bayesian Liquidity Pain & Gain Indicator
Stop guessing where support and resistance are.
The Bayesian Liquidity Pain & Gain indicator moves beyond arbitrary lines and raw price action. It quantifies Institutional Intent by calculating the exact price levels where large volume has been accumulated and visualizes the "Pain" (stress) those participants feel when the market moves against them.
The Logic: Quantified Institutional Stress
Institutions don't trade single candles; they accumulate positions over time. This indicator tracks their Volume-Weighted Average Cost Basis to answer two critical questions:
Where did they enter? (The Cost Basis Lines)
Are they underwater? (The Pain Clouds)
By normalizing price distance using volatility (ATR) and statistical deviation (Z-Score), we filter out noise and only highlight zones where "Smart Money" is statistically forced to defend their positions or capitulate.
How to Read the Chart
1. The Cost Basis Lines (Anchors)
• 🟢 Green Line (Buyer Cost Basis): The average price where institutions accumulated long positions. This acts as dynamic Support.
• 🔴 Red Line (Seller Cost Basis): The average price where institutions accumulated short positions. This acts as dynamic Resistance.
2. The Pain Clouds (Signals)
When price moves significantly away from the cost basis (Z-Score > 2.0), "Clouds" appear to visualize the PnL status of the participants:
• 🔴 Red Cloud (Buyer Pain): Price is below the buyer's entry. Buyers are losing money (in the red). This creates a "Discount" zone where they may defend support.
• 🟢 Green Cloud (Seller Pain): Price is above the seller's entry. Sellers are losing money (shorts are squeezed). This indicates strong bullish momentum.
3. The Multi-Timeframe Dashboard
A real-time HUD showing the Z-Score status across 4 timeframes (1m, 5m, 15m, 1h):
• 🟢 Green: Profitable/Neutral (Trend Continuation)
• 🟠 Orange: Warning (Pressure Building)
• 🔴 Red: Critical Pain (High Probability Reversal)
Trading Strategies
Setup 1: The Defensive Bounce (Long)
• Context: Price drops into a 🔴 Red Cloud (Buyer Pain).
• Trigger: Price touches the 🟢 Green Line (Buyer Cost Basis) and shows a rejection wick.
• Logic: Institutional buyers defend their cost basis to avoid realizing losses.
Setup 2: The Short Squeeze (Momentum)
• Context: Price rallies into a 🟢 Green Cloud (Seller Pain).
• Trigger: Price holds above the 🔴 Red Line (Seller Cost Basis).
• Logic: Short sellers are trapped and forced to buy back (cover), fueling the rally.
Fractal Alignment:
For high-conviction trades, wait for the Dashboard to show "Pain" signals on both the 1h (Anchor) and 5m (Trigger) timeframes simultaneously.
Settings
• Memory Length (Default 144): The lookback period for the institutional cost basis. Increase for swing trading, decrease for scalping.
• Sigma Threshold (Default 2.0): The statistical confidence level for "Pain". Higher values = fewer, stronger signals.
• Volume Amp: When enabled, high volume amplifies the pain signal, giving more weight to institutional footprints.
Obsidian Flux Matrix# Obsidian Flux Matrix | JackOfAllTrades
Made with my Senior Level AI Pine Script v6 coding bot for the community!
Narrative Overview
Obsidian Flux Matrix (OFM) is an open-source Pine Script v6 study that fuses social sentiment, higher timeframe trend bias, fair-value-gap detection, liquidity raids, VWAP gravitation, session profiling, and a diagnostic HUD. The layout keeps the obsidian palette so critical overlays stay readable without overwhelming a price chart.
Purpose & Scope
OFM focuses on actionable structure rather than marketing claims. It documents every driver that powers its confluence engine so reviewers understand what triggers each visual.
Core Analytical Pillars
1. Social Pulse Engine
Sentiment Webhook Feed: Accepts normalized scores (-1 to +1). Signals only arm when the EMA-smoothed value exceeds the `sentimentMin` input (0.35 by default).
Volume Confirmation: Requires local volume > 30-bar average × `volSpikeMult` (default 2.0) before sentiment flags.
EMA Cross Validation: Fast EMA 8 crossing above/below slow EMA 21 keeps momentum aligned with flow.
Momentum Alignment: Multi-timeframe momentum composite must agree (positive for longs, negative for shorts).
2. Peer Momentum Heatmap
Multi-Timeframe Blend: RSI + Stoch RSI fetched via request.security() on 1H/4H/1D by default.
Composite Scoring: Each timeframe votes +1/-1/0; totals are clamped between -3 and +3.
Intraday Readability: Configurable band thickness (1-5) so scalpers see context without losing space.
Dynamic Opacity: Stronger agreement boosts column opacity for quick bias checks.
3. Trend & Displacement Framework
Dual EMA Ribbon: Cyan/magenta ribbon highlights immediate posture.
HTF Bias: A higher-timeframe EMA (default 55 on 4H) sets macro direction.
Displacement Score: Body-to-ATR ratio (>1.4 default) detects impulses that seed FVGs or VWAP raids.
ATR Normalization: All thresholds float with volatility so the study adapts to assets and regimes.
4. Intelligent Fair Value Gap (FVG) System
Gap Detection: Three-candle logic (bullish: low > high ; bearish: high < low ) with ATR-sized minimums (0.15 × ATR default).
Overlap Prevention: Price-range checks stop redundant boxes.
Spacing Control: `fvgMinSpacing` (default 5) avoids stacking from the same impulse.
Storage Caps: Max three FVGs per side unless the user widens the limit.
Session Awareness: Kill zone filters keep taps focused on London/NY if desired.
Auto Cleanup: Boxes delete when price closes beyond their invalidation level.
5. VWAP Magnet + Liquidity Raid Engine
Session or Rolling VWAP: Toggle resets to match intraday or rolling preferences.
Equal High/Low Scanner: Looks back 20 bars by default for liquidity pools.
Displacement Filter: ATR multiplier ensures raids represent genuine liquidity sweeps.
Mean Reversion Focus: Signals fire when price displaces back toward VWAP following a raid.
6. Session Range Breakout System
Initial Balance Tracking: First N bars (15 default) define the session box.
Breakout Logic: Requires simultaneous liquidity spikes, nearby FVG activity, and supportive momentum.
Z-Score Volume Filter: >1.5σ by default to filter noisy moves.
7. Lifestyle Liquidity Scanner
Volume Z-Scores: 50-bar baseline highlights statistically significant spikes.
Smart Money Footprints: Bottom-of-chart squares color-code buy vs sell participation.
Panel Memory: HUD logs the last five raid timestamps, direction, and normalized size.
8. Risk Matrix & Diagnostic HUD
HUD Structure: Table in the top-right summarizes HTF bias, sentiment, momentum, range state, liquidity memory, and current risk references.
Signal Tags: Aggregates SPS, FVG, VWAP, Range, and Liquidity states into a compact string.
Risk Metrics: Swing-based stops (5-bar lookback) + ATR targets (1.5× default) keep risk transparent.
Signal Families & Alerts
Social Pulse (SPS): Volume-confirmed sentiment alignment; triangle markers with “SPS”.
Kill-Zone FVG: Session + HTF alignment + FVG tap; arrow markers plus SL/TP labels.
Local FVG: Captures local reversals when HTF bias has not flipped yet.
VWAP Raid: Equal-high/low raids that snap toward VWAP; “VWAP” label markers.
Range Breakout: Initial balance violations with liquidity and imbalance confirmation; circle markers.
Liquidity Spike: Z-score spikes ≥ threshold; square markers along the baseline.
Visual Design & Customization
Theme Palette: Primary background RGB (12,6,24). Accent shading RGB (26,10,48). Long accents RGB (88,174,255). Short accents RGB (219,109,255).
Stylized Candles: Optional overlay using theme colors.
Signal Toggles: Independently enable markers, heatmap, and diagnostics.
Label Spacing: Auto-spacing enforces ≥4-bar gaps to prevent text overlap.
Customization & Workflow Notes
Adjust ATR/FVG thresholds when volatility shifts.
Re-anchor sentiment to your webhook cadence; EMA smoothing (default 5) dampens noise.
Reposition the HUD by editing the `table.new` coordinates.
Use multiples of the chart timeframe for HTF requests to minimize load.
Session inputs accept exchange-local time; align them to your market.
Performance & Compliance
Pure Pine v6: Single-line statements, no `lookahead_on`.
Resource Safe: Arrays trimmed, boxes limited, `request.security` cached.
Repaint Awareness: Signals confirm on close; alerts mirror on-chart logic.
Runtime Safety: Arrays/loops guard against `na`.
Use Cases
Measure when social sentiment aligns with structure.
Plan ICT-style intraday rebalances around session-specific FVG taps.
Fade VWAP raids when displacement shows exhaustion.
Watch initial balance breaks backed by statistical volume.
Keep risk/target references anchored in ATR logic.
Signal Logic Snapshot
Social Pulse Long/Short: `sentimentEMA` gated by `sentimentMin`, `volSpike`, EMA 8/21 cross, and `momoComposite` sign agreement. Keeps hype tied to structural follow-through.
Kill-Zone FVG Long/Short: Requires session filter, HTF EMA bias alignment, and an active FVG tap (`bullFvgTap` / `bearFvgTap`). Labels include swing stops + ATR targets pulled from `swingLookback` and `liqTargetMultiple`.
Local FVG Long/Short: Uses `localBullish` / `localBearish` heuristics (EMA slope, displacement, sequential closes) to surface intraday reversals even when HTF bias has not flipped.
VWAP Raids: Detect equal-high/equal-low sweeps (`raidHigh`, `raidLow`) that revert toward `sessionVwap` or rolling VWAP when displacement exceeds `vwapAlertDisplace`.
Range Breakouts: Combine `rangeComplete`, breakout confirmation, liquidity spikes, and nearby FVG activity for statistically backed initial balance breaks.
Liquidity Spikes: Volume Z-score > `zScoreThreshold` logs direction, size, and timestamp for the HUD and optional review workflows.
Session Logic & VWAP Handling
Kill zone + NY session inputs use TradingView’s session strings; `f_inSession()` drives both visual shading and whether FVG taps are tradeable when `killZoneOnly` is true.
Session VWAP resets using cumulative price × volume sums that restart when the daily timestamp changes; rolling VWAP falls back to `ta.vwap(hlc3)` for instruments where daily resets are less relevant.
Initial balance box (`rangeBars` input) locks once complete, extends forward, and stays on chart to contextualize later liquidity raids or breakouts.
Parameter Reference
Trend: `emaFastLen`, `emaSlowLen`, `htfResolution`, `htfEmaLen`, `showEmaRibbon`, `showHtfBiasLine`.
Momentum: `tf1`, `tf2`, `tf3`, `rsiLen`, `stochLen`, `stochSmooth`, `heatmapHeight`.
Volume/Liquidity: `volLookback`, `volSpikeMult`, `zScoreLen`, `zScoreThreshold`, `equalLookback`.
VWAP & Sessions: `vwapMode`, `showVwapLine`, `vwapAlertDisplace`, `killSession`, `nySession`, `showSessionShade`, `rangeBars`.
FVG/Risk: `fvgMinTicks`, `fvgLookback`, `fvgMinSpacing`, `killZoneOnly`, `liqTargetMultiple`, `swingLookback`.
Visualization Toggles: `showSignalMarkers`, `showHeatmapBand`, `showInfoPanel`, `showStylizedCandles`.
Workflow Recipes
Kill-Zone Continuation: During the defined kill session, look for `killFvgLong` or `killFvgShort` arrows that line up with `sentimentValid` and positive `momoComposite`. Use the HUD’s risk readout to confirm SL/TP distances before entering.
VWAP Raid Fade: Outside kill zone, track `raidToVwapLong/Short`. Confirm the candle body exceeds the displacement multiplier, and price crosses back toward VWAP before considering reversions.
Range Break Monitor: After the initial balance locks, mark `rangeBreakLong/Short` circles only when the momentum band is >0 or <0 respectively and a fresh FVG box sits near price.
Liquidity Spike Review: When the HUD shows “Liquidity” timestamps, hover the plotted squares at chart bottom to see whether spikes were buy/sell oriented and if local FVGs formed immediately after.
Metadata
Author: officialjackofalltrades
Platform: TradingView (Pine Script v6)
Category: Sentiment + Liquidity Intelligence
Hope you Enjoy!
FCPO MASTER v6 – Sideway + Breakout + OB + FVG (TUPLE SAFE)TL;DR cepat
1. Gunakan M5 untuk entry & OB/FVG confirmation.
2. Gunakan M15 untuk confirm trend/false breakout.
3. Gunakan H1 untuk bias arah (overall market).
4. Entry hanya bila signal + OB/FVG/candle rejection (script buatkan).
5. SL 5–8 tick, TP 10–25 tick ikut setup (sideway vs breakout).
6. Follow checklist setiap trade — jangan lompat.
________________________________________
Setup awal (1–2 min)
1. Pasang script FCPO Sideway MASTER – OB + Imbalance + Confirmation di TradingView.
2. Timeframes: buka M5, M15, H1 (susun 3 chart atau 1 chart multi-timeframe).
3. Input default: ATR14, Breakout Buffer 5 tick, RangeLen 20, ADX14, TP12, SL8. (Kau boleh tweak nanti).
4. Aktifkan alerts pada BUY Confirm / SELL Confirm / Sideway Buy / Sideway Sell.
________________________________________
Step-by-step trading process
1) Mulakan dengan H1 — tentukan bias HTF
• Lihat H1 untuk jawapan: Trend Up / Down / Sideway.
• Rule ringkas:
o ADX H1 > 20 + price above H1 EMA → bias Bull
o ADX H1 > 20 + price below H1 EMA → bias Bear
o ADX H1 < 20 → market HTF sideway (no strong bias)
Kenapa: H1 bagi kau idea “kalau breakout pada M5, patut follow atau tolak”.
________________________________________
2) Pergi ke M15 — confirm trend & valid breakout
• M15 kena setuju dengan idea breakout.
o Untuk strong breakout: M15 kena tunjuk candle close di atas/bawah range + volume naik.
o Kalau M5 breakout tapi M15 tak setuju (M15 masih sideway) → treat as fakeout. Jangan masuk.
________________________________________
3) M5 — cari entry & confirmation (OB/FVG + candle)
• M5 adalah tempat kau buat keputusan masuk.
• Tunggu script keluarkan Sideway Buy/Sell atau Breakout Buy/Sell.
• CONFIRM entry mesti ada sekurang-kurangnya 1 dari:
o Bull/Bear Order Block searah signal (script detect).
o FVG / Imbalance zone dipenuhi & price retest.
o Candle rejection (pinbar / bearish/bullish engulfing) pada zone.
Jika tiada confirmation → no trade.
________________________________________
4) Checklist sebelum tekan Buy/Sell (MUST)
• H1 bias tidak melawan trade (prefer sama arah).
• M15 confirm breakout / trend or neutral.
• Script keluarkan signal (sideway or breakout).
• OB or FVG atau candle rejection ada.
• ATR kenaikan jika breakout (untuk breakout trade).
• Volume spike jika breakout.
• Risk:SL <= 2% akaun (position sizing).
Kalau semua ticked → boleh entry.
________________________________________
5) Setting SL / TP & position sizing
• Sideway (scalp): SL = 5–8 tick, TP = 8–12 tick.
• Breakout (trend): SL = 8–12 tick, TP = 15–25+ tick (trail later).
• Position sizing: Risk per trade 1–2%.
o Lot size = (Account Risk RM × 1 tick value) / (SL ticks × tickValue) — (kalau kau gunakan fixed tick value, adjust ikut lot).
(Script tunjuk SL & TP label — follow itu.)
________________________________________
6) Entry types
• A. Sideway Reversal (M5)
o Signal: Sideway Buy / Sideway Sell
o Confirm: OB/FVG or rejection candle at range bottom/top
o Trade: scalp target 8–12 tick, tight SL 5–8 tick
• B. Breakout (M5 entry, M15 confirm)
o Signal: Breakout Buy/Sell (Strong)
o Confirm: ATR expanding + volume spike + M15 alignment
o Trade: trend follow, TP 15–25 tick, trailing stop active
• C. Retest Entry
o Breakout happens, price returns to retest range / OB / FVG → wait for rejection candle then enter. Safer.
________________________________________
7) Trailing & exit rules
• Jika useTrail = true script plots trailing stop (ATR × multiplier).
• Exit rules:
1. Hit TP → close.
2. Hit SL → close.
3. If trailing stop hit → close.
4. If opposing confirmed signal muncul (e.g., SELL confirm while long) → consider close early.
5. If H1 bias flips strongly vs trade → tighten stop or close.
________________________________________
8) Multiple signals & scaling
• Never add to losing position (no averaging down).
• If want scale-in on confirmed trend: add 1 partial size after price moves +10–12 tick in favor and shows continuation candle + no bearish OB/FVG.
• Keep aggregated risk within your max (2–3%).
________________________________________
9) Example trade walkthrough (concrete)
• RangeHigh = 4065, RangeLow = 4035 (contoh).
• Market sideway M5.
Case A — Sideway Sell:
1. Price touches 4064–4065, script shows sidewaySell.
2. Lihat OB: ada bear OB zone di 4062–4066 → confirm.
3. Candle rejection (bearish pinbar) muncul → enter SELL M5.
4. Set SL = 5 tick above rangeHigh = 4070, TP = 10 tick → 4055.
5. Trail jika price turun > 8 tick: aktifkan trailing.
6. Close at TP or trail/SL.
Case B — Breakout Buy:
1. Price closes above 4065 + 5 tick buffer = 4070 on M5. Script shows trueBreakUp.
2. M15 shows candle close above M15 resistance + volume spike → confirm.
3. Enter BUY, SL = 8 tick below entry, TP initial 20 tick, trail with ATR×1.5.
4. Move stop to breakeven after +10 tick, scale out half at +12 tick, leave rest to trail.
________________________________________
10) Journal & review
• Semua trade: record entry time, TF, reason (which confirmations), SL/TP, result, lesson.
• Weekly review: check which confirmation worked best (OB vs FVG vs candle) and tweak settings.
________________________________________
11) Tweaks / optimisations cepat
• Jika terlalu banyak false sideway signals → kurangkan touchDist ke 2 tick.
• Kalau fakeout breakout banyak → tambah tickBuf ke 6–8.
• Nak lebih konservatif → cuma trade breakout yang juga setuju M15.
________________________________________
12) Alerts & execution (practical)
• Pasang alert pada BUY Confirm / SELL Confirm (script).
• Kalau kau guna broker yang support one-click order, siap sediakan template order (SL/TP default).
• Kalau manual, bila alert masuk: buka M5, cepat confirm OB/FVG & candle rejection → entry.
________________________________________
Quick reference table (handy)
• TF utama entry: M5
• Confirm mid-TF: M15
• Bias HTF: H1
• Sideway SL/TP: SL 5–8, TP 8–12
• Breakout SL/TP: SL 8–12, TP 15–25+
• Mandatory confirmation: (Script signal) + (OB or FVG or candle)
Pharma vs Market Monthly Returns (XLV vs SPY)A Bloomberg-style pharma momentum indicator built for TradingView.
This script recreates the “Pharma Index Monthly Returns” chart highlighted by Jordi Visser in his Youtube video — offering a clean, accessible poor man’s Bloomberg version of sector-rotation analysis for users without institutional data feeds.
Features
• XLV monthly returns (absolute mode)
• XLV vs SPY relative monthly returns (market-neutral mode)
• Top 5 strongest months ★ (momentum spikes)
• Top 5 weakest months ★ (capitulation signals)
• Optional 6-month rolling momentum line (regime trend)
• Full history from 1998 (XLV inception)
Use Cases
Ideal for tracking pharma/healthcare sector regimes, macro rotations, biotech cycles, and timing asymmetric entries in innovation themes (AI-pharma, computational drug discovery, biotech moonshots, etc.).
The Quantum Leap: Renko + ML(Note: This indicator uses the BackQuant & SuperTrend which takes a 4-5 seconds to load)
This strategy uses the following indicators (please see source code)
Synthetic Renko: Ignores time and focuses purely on price movement to detect clear trend reversals (Red-to-Green).
ATR (Average True Range): Measures volatility to calculate the Renko brick sizes and SuperTrend sensitivity.
Adaptive SuperTrend: A trend filter that uses volatility clustering to confirm if the market is currently in a "Bearish" state.
RSI (Relative Strength Index): A momentum gauge ensuring the asset is "Oversold" (exhausted) before we consider a setup.
Monthly Pivots: Horizontal support lines based on last month's data acting as price "floors" (S1, S2, S3).
SMA (Simple Moving Average): A 100-bar average ensuring we are strictly buying below the long-term mean (deep value).
BackQuant (KNN): A Machine Learning engine that compares current data to historical patterns to predict immediate momentum.
This is a sophisticated, multi-stage strategy script. It combines "Old School" price action (Renko) with "New School" Machine Learning (KNN and Clustering).
Here is the high-level summary of how we will break this down:
Topic 1: The "Bottom Hunter" Setup. How the script uses Renko bricks and aggressive filtering (SuperTrend, SMA, RSI, Pivots) to find a potential market bottom.
Topic 2: The ML Engine (BackQuant & SuperTrend). How the script uses K-Nearest Neighbors (KNN) to predict momentum and Volatility Clustering to adjust the SuperTrend.
Topic 3: The "Leap" Execution. How the script synchronizes the Setup (Topic 1) with the ML Trigger (Topic 2) using a time window.
Topic 1: The "Bottom Hunter" Setup
This script is designed as a Mean Reversion strategy (often called "catching a falling knife" or "bottom fishing"). It is trying to find the exact moment a downtrend stops and reverses.
Most strategies buy when price is above the 200 SMA or above the SuperTrend. This script does the exact opposite.
The Logic:
Renko Bricks: It simulates Renko bricks internally (without changing your chart view). It waits for a specific pattern: A Red Brick followed immediately by a Green Brick (a reversal).
The "Bearish" Filters: To generate a "WATCH" signal, the following must be true:
Price < SuperTrend: The market must officially be in a downtrend.
Price < SMA: Long-term trend is down.
Price < Monthly Pivot: Price is deeply discounted.
RSI < Threshold: The asset is oversold (exhausted).
Recommended Settings for daily signals for Stocks :
Confirmation : 10. (How many bars after Renko Buy signal the AI has to identify a bullish move).
Percentage : 2 (This is the Renko bar size. This represents 2% move.)
SMA: 100 (Signal must be found below 100 SMA)
Price must be below: PIVOT (This is the monthly Pivot levels)
Donchian 20/10 Screener + Alerts Donchian 20/10 Screener + Alerts identifies stocks breaking their 20-day high.
Includes ADX trend filter to confirm strong momentum.
Plots Donchian high/low lines and marks BUY/SELL signals on chart.
Screener output shows “PASS” for stocks meeting entry criteria.
Supports alerts for entry, exit, and screener signals for easy monitoring.
Monthly DCA & Last 10 YearsThis Pine Script indicator simulates a Monthly Dollar Cost Averaging (DCA) strategy to help long-term investors visualize historical performance. Instead of complex timing, the script automatically executes a hypothetical fixed-dollar purchase (e.g., $100) on the first trading day of every month. It visually marks entry points with green "B" labels and plots a dynamic yellow line representing your Global Break-Even Price, allowing you to instantly see if the current price is above or below your average cost basis. To provide deep insight, it generates a detailed performance table in the bottom-right corner that breaks down metrics year-by-year—including total capital invested, shares/coins accumulated, and Profit/Loss percentage—along with a grand total summary of the entire investment period.
ART Customizable Overbought Oversold indicatorThis toolkit will help you identify RSI levels on either extremes, you can customize them.
White Crow**White Crow — cluster reversal signals + market structure**
> Indicator that helps you read market structure (pivots, trend, last extremes) and spot potential reversals through CCI/RSI signal clusters. This is *not* a standalone trading system and does not guarantee any result — it is a tool for filtering and confirming your own market ideas.
---
## 1. Concept
White Crow combines three core blocks:
1. **Pivots & market structure**
Automatically detects **local tops/bottoms** and derives a *Bullish / Bearish / Sideways* bias from them.
In the top-right corner you see a compact panel with current trend and **Last Bottom / Last Top** prices.
2. **Momentum & overbought/oversold zones**
Inside, the indicator uses:
* **CCI** with fixed levels `+100 / -100`;
* an optional **RSI filter** with overbought/oversold levels (`80 / 20`).
These generate basic *Buy / Close* signals.
3. **Cluster signals Buy X / CloseV**
The script tracks **clusters of signals inside a 4-bar window** and highlights rarer, “amplified” events:
* **Buy X** — cluster buy signal (multiple buy conditions in a row);
* **CloseV** — cluster signal for exit/reversal.
**Buy X and CloseV are the strongest and most reliable signals in this indicator** because they are based on repeated conditions rather than a single bar. They work **best on higher timeframes (1H–4H)**, where they reflect meaningful shifts in order flow instead of noise.
> ⚠️ Important: Buy X and CloseV are *only signals*. They must be used as **one of several confirmation factors** for your own view of market structure (support/resistance, trend, price action, volume, etc.), not as standalone reasons to enter or exit trades.
---
## 2. How it works
### 2.1. Pivots and trend detection
* The indicator builds a **zigzag-like structure**:
after a local high, once price retraces down by a given percentage (`pivotSigma`), a **Top** is marked;
after a local low, once price retraces up by the same percentage, a **Bottom** is marked.
* Using the sequence of recent tops and bottoms, the script determines the trend:
* *Bullish* — the last low is higher than the previous one (HL);
* *Bearish* — the last high is lower than the previous one (LH);
* otherwise — *Sideways*.
* The info table shows:
* **Market Trend** — Bullish / Bearish / Sideways;
* **Last Bottom / Last Top** with adaptive decimal precision (works for crypto, FX, stocks, etc.).
### 2.2. Base Buy / Close signals
* **Long condition (Buy):**
* `CCI < -100` (oversold),
* if RSI filter is enabled — `RSI < 20`.
* **Short/Exit condition (Close):**
* `CCI > +100` (overbought),
* if RSI filter is enabled — `RSI > 80`.
These conditions generate the regular **Buy** and **Close** labels on the chart.
### 2.3. Clusters: Buy X and CloseV
To reduce noise, the indicator evaluates not only the current bar, but also the **last 4 bars**:
* `buy_count` — how many times the long condition was true within the last 4 bars;
* `sell_count` — how many times the short condition was true within the last 4 bars.
Then:
* **Buy X** appears when:
* `buy_count ≥ 2` (conditions for Buy were met on at least 2 of the last 4 bars),
* the time filter between two Buy X signals is satisfied (`Min Bars Between Signals`).
* **CloseV** appears when:
* `sell_count ≥ 2`,
* the required number of bars has passed since the previous CloseV.
> ✅ This is why **Buy X / CloseV are stronger and more trustworthy than single Buy/Close signals**, especially on **1H–4H** timeframes: the market confirms the same overbought/oversold condition several times in a row.
### 2.4. Order Blocks
* When `Show Order Blocks` is enabled, the indicator highlights **impulsive candles** whose body exceeds a threshold based on ATR.
* Colored rectangles mark **potential order blocks** (areas where strong buying or selling previously occurred).
## 3. Inputs and customization
Inputs are grouped in TradingView-friendly categories.
### 3.1. Pivot Settings
* `Show Pivots` — enable/disable **Top / Bottom** markers.
* `Sigma (% retracement)` — pivot sensitivity (minimum retracement in % required to confirm a pivot).
* Colors for Top/Bottom — for visual tuning.
**Tip:**
On H1–H4 you can keep near-default values.
On lower timeframes, reduce `Sigma` if you want more detailed local structure.
### 3.2. CCI / RSI Settings
* `CCI Period` — CCI length (short by default for faster reaction).
* `Enable RSI Filter` / `RSI Period` — toggle and length for RSI filter.
* RSI levels are fixed at **20 / 80** to mark strong oversold/overbought zones.
**Usage:**
* For more conservative entries — keep the RSI filter enabled.
* For more frequent signals (e.g. scalping) — you can disable the RSI filter.
### 3.3. Order Blocks
* `Show Order Blocks` — display order block zones.
* `Block Threshold (ATR multiplier)` — how large a candle must be (vs ATR) to be considered significant.
### 3.4. Signals & Filters
* `Show Buy / Show Buy X / Show Close / Show CloseV` — choose which labels you want to see.
* `Enable Time Filter` — enable minimum spacing between amplified signals.
* `Min Bars Between Signals` — how many bars must pass between two Buy X or two CloseV signals.
**Tip:**
If you see too many amplified signals, increase `Min Bars Between Signals`.
If you want more activity, decrease it.
### 3.5. Alerts
* `Buy Alerts / Buy X Alerts / Close Alerts / CloseV Alerts` — choose which signal types should trigger alerts.
* `One Alert Per Bar` — when enabled, alerts are triggered only once per bar (recommended for H1–H4).
Alerts are generated via `alert()`, with messages that include signal type, ticker, timeframe and current price.
---
## 4. How to trade with White Crow
### 4.1. Recommended timeframes
* 📌 **Main focus: 1H–4H.**
On these timeframes:
* pivots and trend are more stable;
* CCI/RSI reflect meaningful swings;
* **Buy X / CloseV clusters** filter out a lot of intrabar noise.
You can still experiment on M1–M15, but expect more signals and more sensitivity to noise.
### 4.2. Reading the signals step by step
1. **Start with context**
* Look at **Market Trend / Last Bottom / Last Top** in the info panel.
* See where price is relative to these points: near resistance, near support, inside a range, etc.
2. **Identify zones of interest**
* Use pivots and order blocks as potential support/resistance areas.
* Wait for price to approach these zones.
3. **Watch the signals**
* **Buy** — early sign of local oversold conditions.
* **Buy X** — amplified cluster signal; more weight than a single Buy.
* **Close** — early warning of potential exhaustion in the current move.
* **CloseV** — amplified cluster exit/reversal signal.
4. **Practical approach**
* In a *Bullish* trend:
* focus on **Buy / Buy X** near bottoms and demand blocks;
* use **Close / CloseV** for partial profit-taking or tightening stops.
* In a *Bearish* trend:
* focus on **Close / CloseV** near tops and supply blocks;
* use **Buy / Buy X** mainly for countertrend scalps with strict risk control.
---
## 5. Important notes and disclaimer
1. **Buy X / CloseV are stronger — but not “magic” signals.**
They are statistically more meaningful than single Buy/Close signals because:
* they require multiple confirmations within a cluster;
* they are time-filtered.
However, **false signals are still possible**, especially in news spikes and low-liquidity conditions.
2. **Best performance on higher timeframes (1H–4H).**
Here, Buy X and CloseV usually reflect genuine shifts in supply/demand rather than micro noise.
3. **This is a confirmation tool, not a complete system.**
Pro Trading White Crow:
* does not manage risk;
* does not define position size or stop-loss;
* does not replace your own analysis.
Always use its signals as **one of several confluence factors** together with structure, trend, price action, volume, and your trading plan.
4. **Educational purpose only.**
This script and description are for educational and analytical purposes only.
They **do not constitute investment advice or a guarantee of profit**.
You are fully responsible for all trading decisions and risk management.
---
---
## White Crow — кластерные сигналы разворота + структура рынка
> Индикатор помогает читать рыночную структуру (пивоты, тренд, последние экстремумы) и находить потенциальные развороты через кластеры сигналов CCI/RSI. Это *не* готовая торговая система и *не* гарантия результата — а инструмент для фильтрации и подтверждения ваших собственных идей по рынку.
---
## 1. Концепция
White Crow объединяет три ключевых блока:
1. **Пивоты и структура рынка**
Автоматически находит **локальные вершины и впадины** и на их основе формирует трендовое смещение: *Bullish / Bearish / Sideways*.
В правом верхнем углу — компактная панель с текущим трендом и ценами **Last Bottom / Last Top**.
2. **Моментум и зоны перегрева**
Внутри используются:
* **CCI** с фиксированными уровнями `+100 / -100`;
* опциональный **фильтр RSI** с уровнями перепроданности/перекупленности (`20 / 80`).
По ним строятся базовые сигналы *Buy / Close*.
3. **Кластерные сигналы Buy X / CloseV**
Скрипт отслеживает **кластеры сигналов внутри окна в 4 бара** и выделяет более редкие, «усиленные» события:
* **Buy X** — кластерный сигнал покупки (несколько buy-условий подряд);
* **CloseV** — кластерный сигнал выхода/разворота.
Именно **Buy X и CloseV являются наиболее сильными и достоверными сигналами индикатора**, так как возникают при повторяющемся выполнении условий, а не на одном баре. Лучше всего они работают **на старших таймфреймах (1–4 часа)**, где отражают реальное смещение баланса спроса/предложения, а не рыночный шум.
> ⚠️ Важно: Buy X и CloseV — *это всего лишь сигналы*. Они должны использоваться **как один из факторов подтверждения** вашего видения структуры рынка (уровни, тренд, price action, объём и т.д.), а не как единственная причина для входа или выхода.
---
## 2. Как это работает
### 2.1. Пивоты и определение тренда
* Индикатор строит **структуру в стиле зигзага**:
после локального максимума, когда цена откатывает вниз на заданный процент (`pivotSigma`), отмечается **Top**;
после локального минимума, когда цена откатывает вверх на тот же процент, отмечается **Bottom**.
* По последовательности последних вершин и впадин определяется тренд:
* *Bullish* — последний минимум выше предыдущего (HL);
* *Bearish* — последний максимум ниже предыдущего (LH);
* иначе — *Sideways*.
* В информационной таблице отображаются:
* **Market Trend** — Bullish / Bearish / Sideways;
* **Last Bottom / Last Top** с адаптивным количеством знаков (подходит под крипту, форекс, акции и т.д.).
### 2.2. Базовые сигналы Buy / Close
* **Условие для Buy (лонг):**
* `CCI < -100` (зона перепроданности),
* при включённом фильтре — `RSI < 20`.
* **Условие для Close (шорт/выход):**
* `CCI > +100` (зона перекупленности),
* при включённом фильтре — `RSI > 80`.
По этим условиям индикатор рисует обычные метки **Buy** и **Close**.
### 2.3. Кластеры: Buy X и CloseV
Чтобы отсеять лишний шум, индикатор оценивает не только текущий бар, но и **4 последних бара**:
* `buy_count` — сколько раз условие на покупку выполнялось за последние 4 бара;
* `sell_count` — сколько раз условие на продажу/выход выполнялось за последние 4 бара.
Далее:
* **Buy X** появляется, когда:
* `buy_count ≥ 2` (минимум на 2 из 4 баров были условия для покупки),
* соблюдён фильтр по времени между усиленными сигналами (`Min Bars Between Signals`).
* **CloseV** появляется, когда:
* `sell_count ≥ 2`,
* прошло достаточно баров с момента предыдущего CloseV.
> ✅ Поэтому **Buy X и CloseV заметно сильнее и надёжнее одиночных Buy/Close**, особенно на **таймфреймах 1–4 часа**: рынок несколько раз подряд подтверждает один и тот же перегрев/разрядку момента.
### 2.4. Order Blocks
* При включённом `Show Order Blocks` индикатор выделяет **импульсные свечи**, чьё тело больше заданного множителя ATR.
* По таким свечам строятся цветные прямоугольники — **потенциальные блоки ордеров** (области поддержек/сопротивлений, где ранее проходил крупный объём).
---
## 3. Настройки и кастомизация
Настройки сгруппированы в привычные разделы TradingView.
### 3.1. Pivot Settings
* `Show Pivots` — включить/выключить метки **Top / Bottom**.
* `Sigma (% retracement)` — чувствительность к пивотам (минимальная глубина отката в процентах).
* Цвета Top/Bottom — визуальная настройка.
**Совет:**
На H1–H4 можно оставить значения близкие к стандартным.
На младших ТФ уменьшайте `Sigma`, если нужна более детальная структура.
### 3.2. CCI / RSI Settings
* `CCI Period` — период CCI (по умолчанию короткий, для более быстрой реакции).
* `Enable RSI Filter` / `RSI Period` — включение и длина RSI-фильтра.
* Уровни RSI фиксированы: **20 / 80**, выделяя сильную перепроданность/перекупленность.
**Использование:**
* Для более консервативной торговли — держите фильтр RSI включённым.
* Для более частых сигналов (скальпинг и т.п.) — можно фильтр отключить.
### 3.3. Order Blocks
* `Show Order Blocks` — отображение блоков ордеров.
* `Block Threshold (ATR multiplier)` — насколько большой должна быть свеча относительно ATR, чтобы считаться значимой.
### 3.4. Signals & Filters
* `Show Buy / Show Buy X / Show Close / Show CloseV` — выбор типов отображаемых меток.
* `Enable Time Filter` — включение минимального интервала между усиленными сигналами.
* `Min Bars Between Signals` — сколько баров должно пройти между двумя Buy X или двумя CloseV.
**Совет:**
Если усиленных сигналов слишком много — увеличьте `Min Bars Between Signals`.
Если хотите больше активности — уменьшите это значение.
### 3.5. Alerts
* `Buy Alerts / Buy X Alerts / Close Alerts / CloseV Alerts` — выбор типов сигналов для алертов.
* `One Alert Per Bar` — при включении алерты отправляются один раз на бар (рекомендуется для H1–H4).
Алерты формируются через `alert()` с сообщением, включающим тип сигнала, тикер, таймфрейм и текущую цену.
---
## 4. Как использовать White Crow в торговле
### 4.1. Рекомендуемые таймфреймы
* 📌 **Основной фокус: 1–4 часа.**
На этих ТФ:
* структура по пивотам и тренд более стабильны;
* CCI/RSI отражают существенные ценовые колебания;
* кластеры **Buy X / CloseV** лучше отсеивают шум.
На M1–M15 индикатор тоже можно применять, но нужно быть готовым к большему количеству сигналов и чувствительности к микродвижениям.
### 4.2. Пошаговое чтение сигналов
1. **Начните с контекста**
* Посмотрите на **Market Trend / Last Bottom / Last Top** в панели.
* Определите, где находитесь относительно этих уровней: у сопротивления, у поддержки, внутри диапазона и т.п.
2. **Найдите зоны интереса**
* Используйте пивоты и order blocks как потенциальные области спроса/предложения.
* Ждите подхода цены к этим зонам.
3. **Отслеживайте сигналы**
* **Buy** — ранний признак локальной перепроданности.
* **Buy X** — усиленный кластерный сигнал, более значимый, чем одиночный Buy.
* **Close** — ранний сигнал возможного ослабления текущего движения.
* **CloseV** — усиленный кластерный сигнал выхода/разворота.
4. **Практическое применение**
* В *бычьем* тренде:
* фокус на **Buy / Buy X** возле впадин и зон спроса;
* **Close / CloseV** использовать для частичной фиксации и подтягивания стопа.
* В *медвежьем* тренде:
* фокус на **Close / CloseV** возле вершин и зон предложения;
* **Buy / Buy X** — для аккуратных контртрендовых входов с жестким риском.
---
## 5. Важные замечания и дисклеймер
1. **Buy X / CloseV сильнее, но не «волшебные» сигналы.**
Они статистически более значимы, чем одиночные Buy/Close, потому что:
* требуют нескольких подтверждений в кластере;
* фильтруются по времени.
Однако **ложные срабатывания всё равно возможны**, особенно на новостях и в условиях низкой ликвидности.
2. **Оптимальная область применения — старшие ТФ (1–4 часа).**
Здесь Buy X и CloseV обычно отражают реальное изменение баланса спроса/предложения, а не шум.
3. **Это инструмент подтверждения, а не полноценная система.**
Pro Trading White Crow:
* не управляет рисками;
* не считает размер позиции и уровень стоп-лосса;
* не заменяет ваше собственное видение рынка.
Всегда используйте его сигналы **как один из факторов согласованности** вместе со структурой, трендом, price action, объёмом и персональным торговым планом.
4. **Образовательный характер.**
Скрипт и описание предназначены для обучения и анализа графиков.
Они **не являются инвестиционной рекомендацией и не гарантируют прибыль**.
Вы самостоятельно принимаете все торговые решения и несёте полную ответственность за риск.
---
SMC Fib Range Signals [@gyanapravah]SMC Fib Range Signals
This indicator blends Smart Money Concepts (SMC) with a Range Filter Trend System and Fibonacci Retracement & Extensions to generate high-probability automated Buy/Sell signals.
Designed to avoid noise and focus on market structure + trend + price confluence, this tool is ideal for:
1. Intraday traders
2. Swing traders
3. Index & stock traders
4. Crypto & Forex traders
CORE FEATURES
Range Filter Trend Detection
Smooth adaptive filter identifies true trend direction
Visual confirmation:
🟢 Green filter = bullish pressure
🔴 Red filter = bearish pressure
🟡 Yellow filter = neutral
Upper & Lower Bands act as dynamic support/resistance zones
Smart Money Order Blocks (SMC)
Automatically detects important pivot highs & lows
Marks:
OB High → supply / resistance zone
OB Low → demand / support zone
Continuously tracks latest OB levels for live price interaction
Fibonacci Engine
Detects the current swing zone and plots:
Retracement levels
0.236 – 0.382 – 0.500 – 0.618 – 0.786 (editable)
Extension targets
1.272 – 1.618
All levels update dynamically on new market structure and pivots.
SIGNAL ENGINE
This indicator generates signals from three independent confirmation systems:
BUY SIGNALS trigger when:
1. Trend flips bullish (price crosses above the Filter)
2.Bullish trend + price reacts near:
Order Block support
Fibonacci 0.382 / 0.618 levels
Bounce from the Lower Band with trend support
All setups require volume confirmation to filter fake breakouts.
SELL SIGNALS trigger when:
1. Trend flips bearish (price crosses below the Filter)
2. Bearish trend + price reacts near:
Order Block resistance
Fibonacci 0.382 / 0.618 levels
Rejection from the Upper Band with trend support
ALERTS READY
Two built-in alerts:
BUY Alert — fires on bullish signal
SELL Alert — fires on bearish signal
INPUT SETTINGS
Trend Engine
1.Source
2.Sampling Period
3.Range Multiplier
Smart Money
Pivot detection sensitivity (Left / Right bars)
Fibonacci
1.Swing lookback length
2.Editable Fib retracement and extension values
3.Toggle show/hide Fib levels
BEST USE CASE
Works extremely well on:
⏱️ 3M – 15M Intraday scalping
⏱️ 30M – 1H positional entries
⏱️ 4H – D1 swing trading
Tested on:
NIFTY / BANKNIFTY / FINNIFTY
Stocks
Crypto
Forex
DISCLAIMER
This indicator is for educational purposes only.
It does NOT guarantee profits.
Always use:
Proper risk management
Stop-loss rules
Your own confirmation before entering trades.
AUTHOR
Built & shared by @gyanapravah (Odisha, India)
Open-source for learning and community improvement.
World Markets Table
🌍 World Markets Session Table - Track Global Exchanges in Real-Time
Monitor 10 major stock exchanges worldwide with live market status, countdown timers, and customizable themes. Perfect for multi-market traders, global portfolio managers, and anyone trading across time zones.
✨ Key Features
10 Global Exchanges Tracked:
🇺🇸 NYSE & NASDAQ (New York)
🇨🇳 Shanghai Stock Exchange
🇯🇵 Tokyo Stock Exchange
🇭🇰 Hong Kong Stock Exchange
🇬🇧 London Stock Exchange
🇪🇺 Euronext
🇩🇪 Frankfurt (Xetra)
🇨🇦 Toronto Stock Exchange
🇦🇺 Australian Securities Exchange
Real-Time Market Intelligence:
✅ Live OPEN/CLOSED status with colored indicators
⏱️ Countdown timers to market open/close
🗓️ Automatic weekday/weekend detection
🕒 Optional seconds display for precision timing
🎯 Visual status badges (green for open, red for closed)
Full Customization:
📍 6 table positions (top/bottom × left/center/right)
📏 4 size options (tiny, small, normal, large)
🎨 4 professional themes: Dark, Light, Neon, Ocean
🚩 Toggle country flags on/off
💼 Clean, professional table layout
🎨 Professional Themes
Dark Theme: Sleek charcoal design for night trading
Light Theme: Bright, clean interface for daylight charts
Neon Theme: Vibrant cyberpunk aesthetic with electric colors
Ocean Theme: Calming blue palette for focused analysis
💡 Perfect For
Multi-market traders monitoring global sessions simultaneously
Identifying optimal trading windows across time zones
Planning entries/exits around market opens and closes
Portfolio managers tracking international markets
Forex, indices, and commodities traders
Pre-market and after-hours trading planning
⚙️ How It Works
All market times are calculated in UTC and automatically adjust to your local timezone. The indicator overlays your chart without interfering with price action or technical analysis. Simply add it to any chart, customize the appearance, and stay informed about global market hours.
📊 Usage Tips
Place the table in a non-intrusive position to maintain chart clarity
Use countdown timers to prepare for volatility at market open/close
Match the theme to your chart colors for a cohesive workspace
Enable seconds display when precision timing matters most
Note: This is a display-only indicator showing market hours. It does not generate trading signals or plot price data.
Bassi MACD Pro + ADX Filter + Smart Histogram TP + RSIA professional-grade MACD indicator that dramatically reduces false signals by combining four powerful filters:
Key Features
Classic MACD (12,26,9) with clean, high-visibility histogram coloring
ADX + DI filter – only takes trades when ADX > user-defined threshold (default 25) ensuring you trade only in strong trending markets
Smart Histogram Take-Profit logic – automatically detects the exact moment bullish/bearish momentum starts to weaken after a strong move and marks a precise TP level (one TP per trade – no repainting, no multiple signals)
Zero-line crossover confirmation + histogram direction filter – eliminates many whipsaw signals common in regular MACD
Separate RSI pane with overbought/oversold levels and visual markers (for additional confluence – does not interfere with main logic)
Visual Signals
Green “MACD BUY” label + lime triangle = confirmed long entry in strong trend
Red “MACD SELL” label + red triangle = confirmed short entry in strong trend
Small lime/red “TP” triangles = Smart Histogram Take-Profit triggered (perfect exit timing based on momentum fade)
Alert Conditions Included
MACD BUY
MACD SELL
TP Long Hit
TP Short Hit
Combined “Any Signal” alert
Why this version outperforms standard MACD
Most MACD crossovers fail in ranging markets. This script solves that by:
Requiring strong trend (ADX filter)
Confirming histogram is actually growing in the new direction
Waiting for the true zero-line cross with momentum
Giving you an intelligent, non-fixed % take-profit based on real histogram exhaustion
Excellent for swing trading, day trading, crypto, forex, and stocks on any timeframe (works especially well on 1H–4H–Daily).
Clean, fast, no repainting, fully alert-ready.
Add to chart → set your alerts → trade only the highest-probability MACD signals.
Previous 5 Days OHLC + Dates + PricesTitle: Previous 5 Days OHLC Levels (Extended Lines + Labels)
Description:
This indicator automatically plots the Open, High, Low, and Close (OHLC) levels for the previous 5 trading days. Unlike standard daily separators, this tool extends the lines from their historical origin all the way to the current price bar, allowing traders to instantly see how current price action interacts with recent support and resistance levels.
Key Features:
5-Day Lookback: Automatically fetches and plots OHLC data for the last 5 trading sessions.
Extended Lines: Lines extend to the current bar (Right) to visualize immediate Support/Resistance zones.
Smart Labels: Each line is marked with the Day Name, Date, Type (O/H/L/C), and the Exact Price.
Customizable Positioning: Choose to display labels on the Left (start of the day) or the Right (next to current price) to keep your chart clean.
Toggle Visibility: Individually turn on/off Opens, Closes, Highs, or Lows to focus on the data that matters to your strategy.
How to Use:
Trend Analysis: Use previous Highs and Lows to identify potential breakout or breakdown levels.
Range Trading: Identify where price previously opened or closed to find intraday pivots.
Clean Charting: Use the settings to hide labels or specific lines (e.g., hide Opens/Closes to see only the Daily Range).
Settings:
Label Position: Switch between "Left" (historical origin) and "Right" (current price).
Visibility: Checkboxes to show/hide Open, High, Low, Close, and Text Labels.
Style: Fully customizable colors for each level type.
Technical Note: This script is optimized for performance (Pine Script v6). It uses array management and executes drawing logic only on the last bar to minimize resource usage while maintaining real-time accuracy.
SuperTrend Fusion — Trend + Momentum + Volatility FilterSuperTrend Fusion — Trend + Momentum + Volatility Filter
SuperTrend Fusion — ATP is an original, multi-factor trend-filtering tool that enhances the classic SuperTrend by combining three market dimensions in one unified model:
1. Trend direction (SuperTrend)
Provides the base trend structure using ATR-based volatility bands.
2. Momentum confirmation (Average Force – adapted)
An adapted version of an open-source “Average Force” concept published on TradingView by racer8.
This component measures where closing price sits relative to recent highs/lows, smoothed to capture directional pressure.
3. Market condition filtering (Choppiness Index)
Filters out sideways, non-trending zones where SuperTrend alone typically produces false flips.
Together, these components create a cleaner, more selective system that focuses on higher-quality SuperTrend reversals, avoiding the most common whipsaws that occur during low-momentum or high-choppiness periods.
🔍 How it Works
A long signal occurs when:
- SuperTrend flips from downtrend to uptrend
- Momentum (AF) is positive (optional filter)
- The market is trending and not excessively choppy (optional filter)
A short signal triggers under the symmetrical conditions.
Filtered signals are visually marked with subtle “X” markers so traders can understand when a raw SuperTrend flip was rejected by the filters.
The indicator also includes:
Enhanced styling for better visibility
Colored bars during valid signals
Optional background highlight during choppy periods
🎯 What This Indicator Is Designed For
This tool aims to:
- Improve the quality of SuperTrend entries
- Remove many low-probability signals
- Help traders visually identify when the market has the momentum and structure required for cleaner trend continuation
It is not intended to predict markets or guarantee accuracy; rather, it provides structure and clarity for decision-making based on technical rules.
⚙️ Inputs
- ATR Length & Factor (SuperTrend)
- Average Force Period & Smoothing
- Choppiness Length & Threshold
- Option to enable/disable each filter individually
📘 Credits
This script includes an adapted version of an open-source “Average Force” function originally published on TradingView by its author, racer8.
SuperTrend and Choppiness Index components are derived from classical, public-domain formulas.
📌 Important Notes
This indicator is not a strategy and does not guarantee performance.
Signals are based on historical calculations only and do not use lookahead.
Past performance does not guarantee future results.
Always test different assets and timeframes before using in live conditions.
👍 Recommended Usage
For a clean experience:
- Use on standard candlestick charts
- Avoid non-standard chart types (Renko, Heikin Ashi, Kagi, Range)
- Combine with your own risk management and trade planning






















