ICT SMC Liquidity Grabs and OBsICT SMC Liquidity Grabs + OB + Fibonacci OTE Levels
Smart Money Concepts Trading Assistant
This script is built for traders who follow ICT (Inner Circle Trader) and Smart Money Concepts. It intelligently combines three critical components of SMC trading: Liquidity Grabs, Order Blocks, and Fibonacci-based Optimal Trade Entry (OTE) zones — giving traders visual cues for potential high-probability reversals and entry points.
🔍 What This Script Does:
Detects Liquidity Grabs
Identifies swing highs/lows where price sweeps liquidity, then immediately reverses.
Labels them with orange markers when price takes out previous highs/lows but closes back inside.
Draws Order Blocks
After a liquidity grab, the script looks for strong bullish or bearish candles and automatically highlights the OB zone.
These OB zones are visualized with transparent colored boxes extending several bars forward.
Plots Fibonacci OTE Levels
Uses recent swing high/low pivots to dynamically draw customizable OTE retracement levels (e.g., 62% and 75%) for both long and short setups.
Highlights Optimal Entry Zones
Marks valid OTE-based buy/sell opportunities only when:
Liquidity has been taken,
Price enters the OTE zone,
And a strong confirming candle appears.
Adds visual zones, trade labels, and optional alerts for each qualified entry.
Includes Take Profit Targets
Automatically calculates take-profit levels based on previous structure and risk-reward ratios.
TP1 is the previous swing, and TP2 is an extended R-multiple (customizable by user).
⚙️ Customization Options:
Toggle each feature (Liquidity Grabs, OBs, Fibonacci Levels)
Adjust Fibonacci levels (default: 62% and 75%)
Set lookback period for liquidity checks
Customize the R-multiple for TP2 levels
💡 How to Use:
Enable desired features from the input panel.
Watch for Buy/Sell OTE zones highlighted in green/red.
Confirm with liquidity sweep and OB support for stronger signals.
Use the automatically generated TP levels to manage risk.
🚀 What Makes It Unique:
Unlike other open-source mashups, this script synchronizes multiple SMC concepts into a single tool that:
Waits for high-confidence conditions (not just blind fib or OB detection)
Validates entries using multiple confluences
Visually marks actionable setups
Automates trade management zones
Whether you're trend-trading, scalping, or swing trading ICT-style, this tool offers a streamlined, smart-money-aligned workflow directly on your chart.
Chỉ báo và chiến lược
Oath KeeperOath Keeper - Advanced Money Flow & Market Dynamics Indicator
A sophisticated indicator that analyzes market dynamics through money flow patterns, volume analysis, and liquidation detection to identify high-probability trading opportunities.
Core Features:
• Smart Money Flow Analysis: Proprietary calculation of institutional money movement
• Volume-Enhanced Signals: Multi-timeframe volume confirmation
• Liquidation Detection: Identifies potential forced liquidation events
• Advanced Signal Classification: Regular, Super, and Fakeout signals
Signal Types:
1. Regular Signals (Green/Purple Circles)
• Volume-confirmed momentum shifts
• Money flow threshold breaches
• Institutional participation confirmation
2. Super Signals (Green/Purple Squares)
• Deep oversold/overbought reversals
• High-volume rejection patterns
• Liquidation event confirmation
3. Fakeout Signals (Red X)
• Rapid sentiment shifts
• Trap detection
• False breakout warnings
Visual Components:
• Dynamic Money Flow Line (White/Purple)
• Order Flow Clouds (Green/Red with high transparency)
• Reference Levels (20, 50, 80)
• Multi-type Signal Markers
• Color-coded momentum visualization
Interpretation Guide:
• Green Cloud: Bullish money flow dominance
• Red Cloud: Bearish money flow dominance
• Circle Markers: Standard reversals
• Square Markers: High-conviction moves
• X Markers: Potential trap zones
Best Practices:
• Most effective on 1H+ timeframes
• Use with major trading pairs
• Wait for candle close confirmation
• Combine with support/resistance levels
• Monitor volume confirmation
• Use multiple timeframe analysis
This indicator helps traders identify institutional money flow, potential liquidation events, and market reversals by analyzing volume patterns and money flow dynamics, providing multiple confirmation layers for trade decisions.
Note: Performance varies with market conditions and timeframes. Always employ proper risk management.
📊 Wyckoff - Spring + UT + Khang cu//@version=5
indicator("📊 Wyckoff - Spring + UT + Khang cu", overlay=true)
// === Tham so nguoi dung ===
lookback = input.int(50, "Tim ho tro/khang cu trong X nen", minval=5)
rangePerc = input.float(0.005, "Nguong gan ho tro/khang cu (%)", step=0.001)
volMultiplier = input.float(1.5, "Nguong Volume cao", step=0.1)
wickRatio = input.float(2.0, "Ty le bong/than", step=0.1)
avgVolLength = input.int(20, "So nen tinh volume trung binh", minval=1)
showLabel = input.bool(true, "Hien thi nhan")
showResLine = input.bool(true, "Hien thi duong khang cu")
// === Tinh toan volume va vung gia ===
avgVol = ta.sma(volume, avgVolLength)
resistance = ta.highest(high, lookback)
support = ta.lowest(low, lookback)
candleBody = math.abs(close - open)
upperWick = high - math.max(open, close)
lowerWick = math.min(open, close) - low
// === Phat hien UpThrust (UT) ===
isNearRes = high >= resistance * (1 - rangePerc)
isUT = upperWick > wickRatio * candleBody and close < open and volume > avgVol * volMultiplier and isNearRes
// === Phat hien Spring ===
isNearSup = low <= support * (1 + rangePerc)
isSpring = lowerWick > wickRatio * candleBody and close > open and volume > avgVol * volMultiplier and isNearSup
// === Hien thi nhan tren bieu do ===
plotshape(isUT and showLabel, title="UT", location=location.abovebar, color=color.red, style=shape.labeldown, text="UT", textcolor=color.white)
plotshape(isSpring and showLabel, title="Spring", location=location.belowbar, color=color.green, style=shape.labelup, text="Spring", textcolor=color.white)
// === To mau nen: do cho UT + Spring, xam cho nen khac ===
barcolor(isUT or isSpring ? color.rgb(255, 0, 0) : color.new(color.gray, 60))
// === Ve duong khang cu ===
var line resLine = na
if (showResLine)
if na(resLine)
resLine := line.new(x1=bar_index, y1=resistance, x2=bar_index + 1, y2=resistance, extend=extend.right, color=color.orange, style=line.style_dashed)
else
line.set_xy1(resLine, bar_index, resistance)
line.set_xy2(resLine, bar_index + 1, resistance)
ballenas by ErnestoWhat does this indicator do?
High Volume:
Calculates the average volume of the last n candles (configurable).
Marks candles with volume greater than the average multiplied by a factor (adjustable).
Candle Body:
Marks candles with a large body compared to their range (adjustable ratio).
Direction:
Green circle (buy): When the candle is bullish (close > open) and meets high volume and a large body.
Red circle (sell): When the candle is bearish (close < open) with high volume and a large body.
Automatic alerts: You will receive an alert when an institutional buy or sell is detected.
📊 How to use it?
Open the Pine Editor in TradingView.
Copy and paste this code.
Click Save and then Add to Chart.
Configure alerts according to your needs.
With this, you'll have a real-time indicator that displays circles on the candle itself when large volume purchases or sales are detected.
Chande Composite Momentum Index [LazyBear]This is a Updated Version of the original indikator from lazy bear!
It has added a clear buy signal if the there is a bullish momentum under the -25 Level!
The buy is only confirmed if the SMA length 2 is sideways or up to prevent opening Trades in a ongoing Downtrend!
the Buy Singnals you find below, the green Dots.
Let me knwo if i shouldd add a sell also or should do any Changes.
Volume_volatility_24)📊 TechData24h (24h Technical Metrics)
This TradingView indicator displays and alerts on key daily metrics for the current trading instrument, including:
Volume (24h, Yesterday, Day Before Yesterday)
Price Change (%) over 24h
Volatility (%) over 24h
Volume Change (%) vs Yesterday and Day Before
Correlation with BTC (custom symbol & timeframe)
🔔 Custom Alerts:
You can define your own percentage thresholds for both positive and negative changes. Alerts will trigger when:
Price change exceeds or drops below a set threshold
Volatility crosses a threshold
Volume increases or decreases significantly
Correlation with BTC moves beyond limits
📋 Table Dashboard:
All selected metrics are shown in a 2-column dashboard at the bottom left of the chart, with color-coded values based on increase/decrease.
Market Session Boxes with Volume Delta [algo_aakash]This script highlights four key forex trading sessions — Tokyo, London, New York, and Sydney — by drawing color-coded boxes directly on the chart. For each session, it shows:
High and low of the session
Total volume traded
Volume delta (bullish vs bearish pressure)
Optional extension of session highs/lows into future candles
Cleanly labeled time range and stats
Users can:
Select which sessions to display
Customize session times (in UTC+0)
Choose colors per session
Toggle session labels and extension lines
Use Case: Designed to help intraday and short-term traders visualize market rhythm, liquidity zones, and session-based volatility. The volume delta metric adds an extra layer of sentiment analysis.
This tool works best on intraday timeframes like 15m, 30m, or 1H.
Disclaimer:
This indicator is for educational and visual analysis purposes. It does not constitute trading advice or guarantee results. Always conduct your own analysis before making trading decisions.
MaterialPaletteMaterialPalette Library
█ OVERVIEW
This Pine Script® library provides a convenient way to access and utilize colors based on the popular Material Design color system directly within your TradingView scripts. It offers a comprehensive set of functions to retrieve specific shades of various base colors, allowing developers to create visually consistent and aesthetically pleasing indicators and strategies.
By importing this library, you gain access to functions that generate colors based on saturation, darkness level, and opacity, simplifying the process of managing color palettes in your projects.
█ FEATURES
Provides exported functions for 18 base Material Design colors (e.g., `red()`, `blue()`, `green()`, `amber()`, etc.).
Each color function allows selection from multiple shades based on `saturationLevel` (int) and `darkLevel` (int).
All color functions accept an `opacity` parameter (integer, 0-100).
Includes a `tone()` function for quick access to predefined base tones (e.g., `tone("red")`).
Offers a consistent and organized approach to using Material Design colors in Pine Script®.
Includes detailed `@function`, `@param`, and `@returns` annotations within the code for comprehensive documentation.
█ HOW TO USE
To use this library in your own Pine Script® indicator or strategy, you first need to import it using the `import` statement.
1. Import the Library:
Add the following line at the beginning of your script. Remember to replace `mastertop_astray` with the actual TradingView username the library is published under, and `VERSION` with the specific version number of the library you wish to use (you can find this on the library's script page).
import mastertop_astray/MaterialPalette/VERSION as mp
// Example: import mastertop_astray/MaterialPalette/1 as mp
*(We use `mp` as a short alias for `MaterialPalette` for convenience)*
2. Call Exported Functions:
Once imported, you can call the exported functions using the alias (`mp.` prefix).
//@version=6
indicator("My Indicator Using MaterialPalette")
import mastertop_astray/MaterialPalette/VERSION as mp // Replace VERSION
// --- Get Colors ---
// Get a specific shade: Dark Red (darkLevel=3), highest saturation (13), fully opaque (0)
darkRed = mp.red(13, 3, 0)
// Get another shade: Light Blue (lightLevel=1), medium saturation (e.g., 7), 50% opacity
lightBlueTransparent = mp.lightBlue(7, 1, 50)
// Get a base tone color: Green, fully opaque
baseGreen = mp.tone("green", 0)
// Get another base tone: Amber, 80% opacity
amberToneTransparent = mp.tone("amber", 80)
// --- Use Colors in Plotting ---
plot(close, color = darkRed, title = "Close Line")
plot(sma(close, 20), color = lightBlueTransparent, title = "SMA 20")
bgcolor(close > open ? mp.green(1, 2, 90) : mp.red(1, 2, 90)) // Use light shades for background
// Use a base tone
hline(100, "Upper Band", color = amberToneTransparent)
█ EXPORTED FUNCTIONS
This library provides two main categories of functions:
1. Color Shade Generators (`red()` to `blueGrey()`):
Includes: 18 functions for base colors (`red()`, `pink()`, ..., `blueGrey()`).
Purpose: Generate specific shades of the base color according to Material Design palettes.
Parameter `saturationLevel` (int): Controls color intensity/saturation. The valid range and default value vary depending on the specific color function (typically 1-13 or 1-9). Please check the `@param` annotation in the code for each function.
Parameter `darkLevel` (int): Sets the lightness/darkness of the shade (1: Light, 2: Medium/Base, 3: Dark). Default is 2.
Parameter `opacity` (int): Sets the color's transparency (0 = Opaque, 100 = Invisible). Default is 0.
Returns: The calculated `color` value.
Note: For exact default values and valid saturation ranges for each specific color function, refer to the detailed `@param` annotations within the library's source code.
2. Base Tone Function (`tone()`):
Purpose: Retrieve a single, predefined base color tone from the palette.
Parameter `colorName` (simple string): The text name identifying the desired base color (e.g., 'red', 'blue', 'green', 'light_blue').
Parameter `opacity` (int): Sets the color's transparency (0 = Opaque, 100 = Invisible). Default is 0.
Returns: The corresponding base tone `color`.
Note: Please consult the function's implementation in the source code for the complete list of valid `colorName` strings.
█ VISUALIZATION TABLE (For Demonstration)
The library's source code includes logic (within an `if barstate.islast` block) that generates a large table displaying all available color shades.
Important: This table will only appear on your chart if you add the entire library code itself directly as an indicator. This is primarily intended for demonstration, reference, and development purposes to visualize the palette. When using the library normally via the `import` statement in your own scripts, this table code is not executed or needed.
█ SUMMARY
The `MaterialPalette` library offers a structured and easy way for Pine Script® developers to incorporate Material Design colors into their TradingView scripts, enhancing visual appeal and consistency. Please refer to the detailed comments within the code for specifics on parameter ranges and available tones.
This source code is subject to the terms of the Mozilla Public License 2.0.
© mastertop_astray
Volume Range Profile with Fair Value (Zeiierman)// This work is licensed under a Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) creativecommons.org
// © Zeiierman {
//@version=6
indicator("Volume Range Profile with Fair Value (Zeiierman)", overlay=true, max_boxes_count=200, max_lines_count=10, max_labels_count=10)
//~~}
//~~ Tooltips for Inputs {
var string t1 = "Defines how many historical bars to consider when calculating the highest high and lowest low for the volume range zones. A larger value creates broader zones and more stable volume profiles, while a smaller value reacts quicker to price shifts."
var string t2 = "Controls how much of the full price range (from high to low) is allocated for the volume zones. A smaller value makes zones narrower and more focused on extremes; a higher value widens the zones to capture more volume."
var string t3 = "Sets the number of horizontal volume bins in each zone. More bins give finer granularity, while fewer bins make the volume histogram more generalized. Increasing too much may impact performance."
var string t4 = "Color used to fill the upper (typically sell) volume zone background. Lower transparency means stronger visual emphasis."
var string t5 = "Color used to fill the lower (typically buy) volume zone background. Adjust transparency to make it more or less visible against chart elements."
var string t6 = "Color used for the most active bin (POC – Point of Control). This bin represents where the most volume was traded within the zone."
var string t7 = "Toggle to display a dashed midline inside each volume zone. Helps visually separate the upper and lower halves of each zone."
var string t8 = "Color for the zone midlines. A more visible color helps with separation, especially on dark or noisy charts."
var string t9 = "When enabled, adds a label showing the percentage of total zone volume that occurred inside the POC bin."
var string t10 = "When enabled, displays labels showing the total Buy or Sell volume accumulated in each respective zone. Useful for reading directional volume pressure directly on the chart."
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Inputs {
len = input.int(100, "Lookback Period", minval=2, group="Period & Zones", tooltip=t1)
zoneP = input.float(30.0, "Zone Width (% of Range)", minval=1, maxval=50, step=0.5, group="Period & Zones", tooltip=t2)
bins = input.int(10, "Bins per Zone", minval=1, maxval=50, group="Volume Profile", tooltip=t3)
clrUp = input.color(color.new(color.red, 80), "Upper Zone Color", group="Visuals", tooltip=t4)
clrLo = input.color(color.new(color.lime, 80), "Lower Zone Color", group="Visuals", tooltip=t5)
clrPOC = input.color(color.new(color.white, 0), "POC Bin Color", group="Visuals", tooltip=t6)
showMid = input.bool(true, "Show Zone Midline", group="Visuals", tooltip=t7)
clrMid = input.color(color.new(color.orange, 0), "Midline Color", group="Visuals", tooltip=t8)
showPOClbl = input.bool(true, "Show POC % Label", group="Visuals", tooltip=t9)
showTotlbl = input.bool(true, "Show Total Vol Label", group="Visuals", tooltip=t10)
lblClr = color.white
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Globals {
var array allBoxes = array.new_box(0)
var array allLines = array.new_line(0)
var array allLabels = array.new_label(0)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Helpers {
f_formatVol(_v) =>
suf = ""
x = _v
if _v >= 1e9
suf := "B"
x := _v / 1e9
else if _v >= 1e6
suf := "M"
x := _v / 1e6
else if _v >= 1e3
suf := "K"
x := _v / 1e3
str.format("{0,number,#.###}{1}", x, suf)
f_clearDrawings() =>
for b in allBoxes
box.delete(b)
array.clear(allBoxes)
for l in allLines
line.delete(l)
array.clear(allLines)
for lb in allLabels
label.delete(lb)
array.clear(allLabels)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Zone calculation with distributed volume + buy/sell per bin {
f_zone() =>
hh = ta.highest(high, len)
ll = ta.lowest( low, len)
rng = hh - ll
zh = rng * zoneP / 100
ut = hh
ub = hh - zh
lt = ll + zh
lbz = ll
bs = zh / bins
volsU = array.new_float(bins, 0.0)
volsL = array.new_float(bins, 0.0)
buyU = array.new_float(bins, 0.0)
sellU = array.new_float(bins, 0.0)
buyL = array.new_float(bins, 0.0)
sellL = array.new_float(bins, 0.0)
totU = 0.0
totL = 0.0
for i = 0 to len - 1
bh = high
bl = low
v = volume
isBuy = close >= open
// Upper zone overlap
if bh >= ub and bl <= ut
br = bh - bl
if br <= syminfo.mintick
price = hl2
if price >= ub and price <= ut
j = math.floor((ut - price) / bs)
j := math.min(math.max(j, 0), bins - 1)
array.set(volsU, j, array.get(volsU, j) + v)
if isBuy
array.set(buyU, j, array.get(buyU, j) + v)
else
array.set(sellU, j, array.get(sellU, j) + v)
totU := totU + v
else
for j = 0 to bins - 1
binT = ut - j * bs
binB = binT - bs
ov = math.min(bh, binT) - math.max(bl, binB)
if ov > 0
frac = ov / br
cvol = v * frac
array.set(volsU, j, array.get(volsU, j) + cvol)
if isBuy
array.set(buyU, j, array.get(buyU, j) + cvol)
else
array.set(sellU, j, array.get(sellU, j) + cvol)
totU := totU + cvol
// Lower zone overlap
if bh >= lbz and bl <= lt
br2 = bh - bl
if br2 <= syminfo.mintick
price = hl2
if price >= lbz and price <= lt
j2 = math.floor((price - lbz) / bs)
j2 := math.min(math.max(j2, 0), bins - 1)
array.set(volsL, j2, array.get(volsL, j2) + v)
if isBuy
array.set(buyL, j2, array.get(buyL, j2) + v)
else
array.set(sellL, j2, array.get(sellL, j2) + v)
totL := totL + v
else
for j2 = 0 to bins - 1
binB2 = lbz + j2 * bs
binT2 = binB2 + bs
ov2 = math.min(bh, binT2) - math.max(bl, binB2)
if ov2 > 0
frac2 = ov2 / br2
cvol2 = v * frac2
array.set(volsL, j2, array.get(volsL, j2) + cvol2)
if isBuy
array.set(buyL, j2, array.get(buyL, j2) + cvol2)
else
array.set(sellL, j2, array.get(sellL, j2) + cvol2)
totL := totL + cvol2
pocU = 0
pocL = 0
maxU = 0.0
maxL = 0.0
for j = 0 to bins - 1
u = array.get(volsU, j)
l = array.get(volsL, j)
if u > maxU
maxU := u
pocU := j
if l > maxL
maxL := l
pocL := j
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Main {
f_clearDrawings()
hh = ta.highest(high, len)
ll = ta.lowest( low, len)
if hh - ll <= syminfo.mintick * bins
runtime.error("Range too small")
= f_zone()
startBar = bar_index - len + 1
histW = math.round(len * 0.5)
rightB = startBar - 2
leftB = rightB - histW
zoneEnd = bar_index + 1
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// Draw boxes {
bU = box.new(leftB, ut, zoneEnd, ub, border_color=na, bgcolor=clrUp)
bL = box.new(leftB, lt, zoneEnd, lbz, border_color=na, bgcolor=clrLo)
array.push(allBoxes, bU)
array.push(allBoxes, bL)
// Draw upper bins
pocVolU = totU > 0 ? array.get(volsU, pocU) : 0.0
for j = 0 to bins - 1
volj = array.get(volsU, j)
ratio = pocVolU > 0 ? volj / pocVolU : 0.0
wBars = math.max(1, math.ceil(histW * ratio))
x0 = math.max(leftB, rightB - wBars)
yT = ut - j * bs
yB = yT - bs
col = j == pocU ? clrPOC : color.new(clrUp, 50)
b = box.new(x0, yT, rightB, yB, border_color=color.new(color.red,30), bgcolor=col)
array.push(allBoxes, b)
// Draw lower bins
pocVolL = totL > 0 ? array.get(volsL, pocL) : 0.0
for j = 0 to bins - 1
volj = array.get(volsL, j)
ratio = pocVolL > 0 ? volj / pocVolL : 0.0
wBars = math.max(1, math.ceil(histW * ratio))
x0 = math.max(leftB, rightB - wBars)
yB2 = lbz + j * bs
yT2 = yB2 + bs
col2 = j == pocL ? clrPOC : color.new(clrLo, 50)
b2 = box.new(x0, yT2, rightB, yB2, border_color=color.new(color.lime,30), bgcolor=col2)
array.push(allBoxes, b2)
// Midlines
if showMid
mU = (ut + ub) / 2
mL = (lt + lbz) / 2
lnU = line.new(startBar, mU, zoneEnd, mU, color=clrMid, style=line.style_dashed)
lnL = line.new(startBar, mL, zoneEnd, mL, color=clrMid, style=line.style_dashed)
array.push(allLines, lnU)
array.push(allLines, lnL)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Draw Total‑Volume Labels {
if showTotlbl
// Upper zone: total Sell volume
totalSellU = array.sum(sellU)
if totalSellU > 0
labU = label.new(
startBar + histW/2, ut + bs,
"Sell Vol: " + f_formatVol(totalSellU),
xloc = xloc.bar_index,
style = label.style_label_center,
color = color.red,
textcolor = color.white,
size = size.normal
)
array.push(allLabels, labU)
// Lower zone: total Buy volume
totalBuyL = array.sum(buyL)
if totalBuyL > 0
labL = label.new(
startBar + histW/2, lbz - bs,
"Buy Vol: " + f_formatVol(totalBuyL),
xloc = xloc.bar_index,
style = label.style_label_center,
color = color.green,
textcolor = color.white,
size = size.normal
)
array.push(allLabels, labL)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Draw POC Vol % {
xLab = zoneEnd + 1
// Upper zone POC
if totU > 0
pvU = array.get(volsU, pocU)
bvU = array.get(buyU, pocU)
svU = array.get(sellU, pocU)
buyPctU = pvU > 0 ? bvU / pvU * 100 : 0
sellPctU = pvU > 0 ? svU / pvU * 100 : 0
totalPctU= pvU / totU * 100
txtU = "POC Vol: " +
"Buy " + str.format("{0,number,#.##}%", buyPctU) + " " +
"Sell " + str.format("{0,number,#.##}%", sellPctU) + " " +
"Total " + str.format("{0,number,#.##}%", totalPctU)
colU = buyPctU >= sellPctU ? color.green : color.red
labPOCU = label.new(
xLab, ut - (pocU + 0.5) * bs, txtU,
xloc = xloc.bar_index,
style = label.style_label_left,
color = colU,
textcolor = color.white,
size = size.small
)
array.push(allLabels, labPOCU)
// Lower zone POC
if totL > 0
pvL = array.get(volsL, pocL)
bvL = array.get(buyL, pocL)
svL = array.get(sellL, pocL)
buyPctL = pvL > 0 ? bvL / pvL * 100 : 0
sellPctL = pvL > 0 ? svL / pvL * 100 : 0
totalPctL = pvL / totL * 100
txtL = "POC Vol: " +
"Buy " + str.format("{0,number,#.##}%", buyPctL) + " " +
"Sell " + str.format("{0,number,#.##}%", sellPctL) + " " +
"Total " + str.format("{0,number,#.##}%", totalPctL)
colL = buyPctL >= sellPctL ? color.green : color.red
labPOCL = label.new(
xLab, lbz + (pocL + 0.5) * bs, txtL,
xloc = xloc.bar_index,
style = label.style_label_left,
color = colL,
textcolor = color.white,
size = size.small
)
array.push(allLabels, labPOCL)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ 6. POC‑volume trend line {
pocPrice = ut - (pocU + 0.5) * bs
avgPocPrice = ta.sma(pocPrice, len)
delta = avgPocPrice - avgPocPrice
lineColor = delta >= 0 ? color.green : color.red
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// ~~ Plot {
plot(
avgPocPrice,
title = "Fair value - drifting over time.",
color = lineColor,
linewidth = 1,
style = plot.style_line
)
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
Compare Strength with SLOPE Description
This indicator compares the relative strength between the current asset and a benchmark (e.g., BTC vs. ETH or AAPL vs. SPY) using a linear regression slope of their ratio over time.
The ratio is calculated as: close / benchmark
A linear regression slope is computed over a user-defined window
The slope represents trend strength: if it’s rising, the current asset is outperforming the benchmark
Plots
Gray Line: The raw ratio between the asset and benchmark
Orange Line: The slope of the ratio (shows momentum)
Background Color :
Green: The asset is significantly stronger than the benchmark
Red: The asset is significantly weaker than the benchmark
No color: No clear trend
Settings
Slope Window Length: Number of candles used in the regression (default = 10)
Slope Threshold: Sensitivity of trend detection. Smaller values detect weaker trends.
Example Use Cases
Style Rotation Strategy: Use the slope to determine whether "Growth" or "Value" style is leading.
Pair Trading / Relative Performance: Track which asset is leading in a pair (e.g., BTC vs ETH).
Factor Timing: Serve as a timing model to allocate between different sectors or factors.
Happy trading!
Intraday Long Stoploss DistanceWhile working on intraday 1-minute charts i found it distracting to calculate the stoploss distance from the current price so i created an overlay indicator that plots the values of the last 15 minute and 30 minutes low for safe SL placement so you can get a rough idea of Risk management and lot size to use.
Still in early phases. Few more updates coming soon .stay updated.
*Not a financial advice.
Custom Cancel Size PatternObjective:
This TradingView indicator identifies a specific 3-candle pattern based on candle size (measured using True Range) and highlights the third candle (or later) when the pattern is complete.
---
The 3-Candle Pattern Logic:
1. Candle 1 (two candles ago)
Its True Range (TR) must be greater than the current Average True Range (ATR).
This means it's a relatively large candle — we're looking for strong movement here.
2. Candle 2 (one candle ago)
Its TR must be less than the ATR.
This suggests a "cooling off" or a smaller move.
3. Candle 3 (the current candle)
Its TR must be at least 2 times bigger than Candle 2's TR.
This means a breakout or strong move again, following the smaller candle.
---
What the Indicator Does:
Detects this 3-candle pattern as new candles form.
Highlights the third candle (the current one) with a green color and a label beneath it that says "Pattern".
Optionally colors the bar green (you can customize this if you want a different visual style).
---
What You’ll See on the Chart:
When the conditions are met:
A green bar (if bar coloring is enabled).
A label below the bar that says “Pattern” appears under the third candle.
Nifty in USD//@version=5
indicator("Nifty in USD", overlay=true)
plot(close / request.security("FX_IDC:USDINR", timeframe.period, close), color=color.orange, title="Nifty/USD")
MACD + VWAP Strategy (6–9 PM & 7–8:30 AM EST)//@version=5
strategy("MACD + VWAP Strategy (6–9 PM & 7–8:30 AM EST)", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=100)
// === Inputs ===
macdFast = input.int(12, title="MACD Fast Length")
macdSlow = input.int(26, title="MACD Slow Length")
macdSignal = input.int(9, title="MACD Signal Length")
stopLossPts = input.float(10, title="Stop Loss (pts)")
takeProfitPts = input.float(25, title="Take Profit (pts)")
// === Indicators ===
= ta.macd(close, macdFast, macdSlow, macdSignal)
vwapLine = ta.vwap(close)
atrVal = ta.atr(14)
// === Time Filter ===
t = time("America/New_York")
hourEST = hour(t)
minuteEST = minute(t)
eveningSession = hourEST >= 18 and hourEST < 21 // 6:00 PM to 9:00 PM
morningSession = (hourEST == 7) or (hourEST == 8 and minuteEST < 30) // 7:00–8:30 AM
inSession = eveningSession or morningSession
// === Entry Conditions with Session Filter ===
longCondition = ta.crossover(macdLine, signalLine) and close > vwapLine and atrVal > 1.2 and inSession
shortCondition = ta.crossunder(macdLine, signalLine) and close < vwapLine and atrVal > 1.2 and inSession
if (longCondition)
strategy.entry("Long", strategy.long)
if (shortCondition)
strategy.entry("Short", strategy.short)
// === Exit Conditions ===
exitLong = ta.crossunder(macdLine, signalLine)
exitShort = ta.crossover(macdLine, signalLine)
if (exitLong)
strategy.close("Long")
if (exitShort)
strategy.close("Short")
// === Risk Management ===
strategy.exit("TP/SL Long", from_entry="Long", limit=close + takeProfitPts, stop=close - stopLossPts)
strategy.exit("TP/SL Short", from_entry="Short", limit=close - takeProfitPts, stop=close + stopLossPts)
// === Plotting ===
plot(vwapLine, title="VWAP", color=color.orange, linewidth=2)
// === Visuals ===
plotshape(longCondition, title="Long Entry", location=location.belowbar, color=color.green, style=shape.arrowup, size=size.small)
plotshape(shortCondition, title="Short Entry", location=location.abovebar, color=color.red, style=shape.arrowdown, size=size.small)
bgcolor(strategy.position_size > 0 ? color.new(color.green, 85) : na)
bgcolor(strategy.position_size < 0 ? color.new(color.red, 85) : na)
20-Bar Breakout + 20-Day High/LowIt marks High/Low of last 20 days and also breakout of high low of last 20 bars on any timeframe
VWAP and MA Mean Reversion Strategy with ATR Stop LossVWAP and MA Mean reversion Strategy with ATR Stop losss_J
Umesh BC IST 3:30 AM Session Tracker + 4H Candles📌 IST 3:30 AM Session Tracker + 4H Candle Marker
This indicator is designed for traders who follow Indian Standard Time (IST) and want precise session tracking and 4H candle insights.
🔧 Features:
🕒 Daily Session Start at 3:30 AM IST
Automatically detects and marks the beginning of each new trading day based on 3:30 AM IST, not midnight.
Displays session Open, High, and Low lines.
Background shading for each session.
Customizable alert when a new day starts.
🟧 4H Candle Start Markers (IST Time)
Identifies every new 4-hour candle that starts at:
3:30, 7:30, 11:30, 3:30 PM, 7:30 PM, 11:30 PM IST
Adds a vertical line and label ("🟧 4H") above the candle.
Plots a dynamic line for the 4H candle's opening price.
Includes optional alert for new 4H candles.
🔔 Alerts Included:
"🕒 New IST Day Start": Triggers at 3:30 AM IST.
"🟧 New 4H Candle": Triggers at each 4H candle start (IST).
✅ Best for:
Intraday, swing, and institutional traders using IST-based analysis.
Those wanting more accurate daily sessions and clear candle structuring.
Lower High Trendline with Swing Points// @version=5
indicator("Lower High Trendline with Swing Points", overlay=true)
// Input parameters
length = input.int(50, "Lookback Length", minval=10, maxval=500, step=10)
swingLookback = input.int(5, "Swing Lookback", minval=2, maxval=20, step=1)
lineColor = input.color(color.red, "Trendline Color")
lineWidth = input.int(2, "Line Width", minval=1, maxval=5)
// Arrays to store swing highs
var float swingHighs = array.new_float(0)
var int swingBars = array.new_int(0)
var line trendLine = na
// Function to detect swing highs
isSwingHigh = high >= ta.highest(high , swingLookback) and high > ta.highest(high, swingLookback)
// Detect and store swing highs
if isSwingHigh and high < ta.highest(high, length)
array.push(swingHighs, high)
array.push(swingBars, bar_index)
// Keep arrays within lookback length
if array.size(swingHighs) > 2
array.shift(swingHighs)
array.shift(swingBars)
// Update trendline with latest two swing highs
if array.size(swingHighs) >= 2
// Get the latest two swing points
float high1 = array.get(swingHighs, array.size(swingHighs) - 1)
float high2 = array.get(swingHighs, array.size(swingHighs) - 2)
int bar1 = array.get(swingBars, array.size(swingBars) - 1)
int bar2 = array.get(swingBars, array.size(swingBars) - 2)
// Ensure high2 is higher than high1 for lower high
if high2 > high1
if na(trendLine)
trendLine := line.new(bar2, high2, bar1, high1, xloc.bar_index, color=lineColor, width=lineWidth)
else
line.set_xy1(trendLine, bar2, high2)
line.set_xy2(trendLine, bar1, high1)
line.set_color(trendLine, lineColor)
line.set_width(trendLine, lineWidth)
// Clean up old trendline if no new swing highs within lookback
if bar_index - array.get(swingBars, array.size(swingBars) - 1) > length
if not na(trendLine)
line.delete(trendLine)
array.clear(swingHighs)
array.clear(swingBars)
trendLine := na
// Plot labels for swing highs
if isSwingHigh and high < ta.highest(high, length)
label.new(bar_index, high, "SH", color=color.red, style=label.style_label_down, textcolor=color.white)
RNDR Volume-Based TriggersTo determine volume in and practice a stop if the volume doesn't support the uptrend
Multi Timeframe ATR, CCI & RSIMulti Timeframe ATR, CCI & RSI (MTF IND)
This indicator displays ATR, CCI, and RSI values from a custom selected timeframe in a clean table overlay.
It helps monitor volatility and momentum from higher/lower timeframes directly on your current chart.
Features:
• Select custom timeframe for all indicators (e.g., 1D, 1W, 65m, etc.)
• ATR with selectable smoothing type (RMA, SMA, EMA, WMA)
• CCI & RSI with trend arrows (▲ rising, ▼ falling, ▬ neutral)
• Compact summary table