Confluence Retournement Haussier - Ultimate V1This indicator was originally designed to visualize the right moment to enter a position. I buy stocks when they are falling, at the bottom before they rebound.
The 30‑minute chart with its 100 EMA was used as the baseline, but it can be applied to multiple timeframes. I even used it on a 1‑second chart for a ticker, and when there is volume it works wonderfully.
It’s up to you to check whether it fits the ticker you’re analyzing by testing it on historical data.
Drawback: it takes up screen space. Feel free to improve it.
See a ticker in freefall and wonder whether it’s a good time to buy or if it will keep falling? Switch your chart to 30 minutes and watch for triangles and green circles to start appearing.
You could call it momentum. Your background begins to show color when there is confluence. If it stays black, don’t buy.
Already in the trade and the screen turns black? Sell, and wait for the colors to return before buying back in
指標和策略
Week high / Week low (Mo–Fr)The indicator tracks the weekly high and low levels of the market starting from Monday 00:00 and updates them throughout the week until Friday. It draws horizontal lines across the chart representing:
Weekly High
Weekly Low
Each level also displays a label that can be positioned in different ways depending on user settings.
🧠 How it works step-by-step
1. Every Monday a new week starts
When a new week begins:
The script stores the current candle’s high as the initial weekHigh
And the current candle’s low as weekLow
Previous week's lines and labels are deleted
New horizontal lines are created and extended to the right
Labels (for high & low) are placed initially at the start of the week
2. During Monday–Friday
On every candle:
If a new higher price is reached → weekly high updates
If a new lower price is reached → weekly low updates
The horizontal line moves to the new value
A saved index remembers where that high/low was created
3. Label Position Control
The user can choose how labels should be anchored:
Mode Meaning
Update point Label stays where the high/low occurred
Right edge Label always moves to the current bar (right end of week)
Right offset Like Right edge but shifted further right by X bars
You can also customize:
label background color
label text color
label size
whether the label points up/down (above or below the line)
line color, style, and width
4. Weekend behavior
On Saturday, the script stops extending the lines, effectively freezing the weekly high and low for that completed week.
Summary
This indicator is useful for traders who want automatic weekly levels, visually clean chart structure, and customizable label placement. It tracks market structure weekly, keeps levels persistent across the chart, and lets you choose exactly how those levels appear.
If you want, I can also create:
✔ previous week high/low
✔ midline (50% of the range)
✔ alerts when price breaks the weekly high/low
✔ highlight liquidity sweeps
Session, Weekly, Daily LevelsScroll down for hungarian description!
Magyar leíráshoz görgess lejjebb!
Overview
This script provides a unified market structure mapping tool that automatically identifies and visualizes key intraday, daily, and weekly reference levels. It helps traders contextualize price action throughout the trading week by marking true session opens, previous day highs/lows, weekly highs/lows, and weekday opens, all with accurate historical anchoring and correct timezone handling.
What This Script Does
1. Intraday Session Opens (Tokyo, London, New York)
- Detects the exact candle where each session opens.
- Draws horizontal rays with labels.
- Automatically clears lines at the start of each new day.
- Uses a custom local-to-exchange timezone conversion system.
2. Weekly Levels
- Last week high and low (precise bar anchoring, not HTF aggregation)
- Current week open (also Monday open)
- Auto-reset on new week
- Levels are always drawn from the true candle where they formed.
3. Previous Day High & Low
- Continuously tracks intraday highs and lows.
- On a new day, stores yesterday’s values and anchors rays to the exact bars.
- Levels remain visible for the full current day and reset the next day.
4. Weekday Opens (Tue–Fri)
- Captures the exact opening price of Tuesday–Friday.
- Monday open = Week open, so it is not shown separately.
- Auto-reset on new week.
Timezone Logic (Original Feature)
The script converts:
local session times → exchange timezone → chart timestamps
It works correctly regardless of chart timezone or instrument exchange location.
Line Drawing Logic
- Finds the exact bar_index where each level forms.
- Draws rays extending to the right.
- Labels are placed ahead of price.
- Safe updating prevents “bar index too far” errors.
How to Use
- Identify daily/weekly structure.
- Track bias relative to session opens.
- Observe reactions around weekday opens.
- Compare price action to last week's range.
Originality
- Custom timezone conversion engine.
- True historical bar anchoring.
- Fully automated weekly/daily structural resets.
- Independent styling for each level type.
- Not a mashup; all components follow one unified logic.
Limitations
- Does not predict trend or direction.
- Structural tool only.
Summary
A precise and reliable market structure tool that unifies weekly, daily, and intraday reference levels with full timezone automation and true-candle anchoring.
MAGYAR LEÍRÁS
--------------
Áttekintés
Ez az indikátor egy összetett piaci szerkezet-feltérképező eszköz, amely automatikusan megjeleníti a legfontosabb intraday, napi és heti referenciaértékeket. A célja, hogy a kereskedő tisztán lássa a piac aktuális környezetét: hol nyíltak a főbb devizapiaci szekciók, hogyan alakult a tegnapi tartomány, hol volt a múlt heti csúcs/mélypont, és hogyan nyitottak az egyes hétköznapok.
Mit tud a script?
1. Szekciónyitások (Tokyo, London, New York)
- Megkeresi a pontos gyertyát, amely a szekciónyitáskori árat tartalmazza.
- Vízszintes vonalat és címkét rajzol.
- Minden nap elején automatikusan törli a korábbi nap szintjeit.
- Egyedi időzóna-konverziós rendszerrel működik (helyi idő → tőzsdei idő → chart idő).
2. Heti szintek
- Múlt heti maximum és minimum (pontos gyertyapontra horgonyozva)
- Aktuális heti nyitóár (egyben a hétfői nyitó is)
- Új hét kezdetekor automatikusan frissül.
- A múlt heti high/low nem fix időpontra, hanem a valódi gyertyára kerül.
3. Előző napi High és Low
- Folyamatosan követi a napi maximumot és minimumot.
- Napváltáskor elmenti és pontos gyertyáról indítja a ray-t.
- A szintek a teljes nap folyamán megmaradnak, majd a következő nap törlődnek.
4. Hétköznapok nyitóárai (Kedd–Péntek)
- A kedd, szerda, csütörtök és péntek nyitóárát rögzíti és megjeleníti.
- A hétfői nyitó a Week Open, ezért külön nem jelenik meg.
- Heti váltáskor automatikusan törlődnek.
Időzóna-kezelés (egyedi megoldás)
A script a felhasználó helyi idejét átszámítja az instrumentum tőzsdei időzónájára, majd a chartra vetíti.
Ez biztosítja, hogy minden szekciónyitás helyesen jelenik meg, bármely chart vagy instrumentum esetén.
Vonalrajzolási logika
- A szintek a valódi bar_index alapján kerülnek rögzítésre.
- Jobbra nyúló ray-eket rajzol.
- A címkék mindig a jobb oldalon, előre helyezve jelennek meg.
- Biztonságos frissítési rendszer akadályozza meg a hibákat (pl. “bar index too far”).
Használat
- Napi/heti szerkezet meghatározása.
- Bias követése a session openekhez viszonyítva.
- Reakciók figyelése a hétköznapok nyitóárai körül.
- Összevetés a múlt heti tartománnyal.
Eredetiség
- Egyedi időzóna-kezelő motor.
- Igazi gyertyapont-alapú horgonyzás.
- Automatikus napi/heti reset.
- Minden szint külön stílusban konfigurálható.
- Nem mashup; egységes rendszer.
Összegzés
Professzionális, pontos eszköz a piaci szerkezet feltérképezésére, amely egyesíti a heti, napi és intraday szinteket, teljes időzóna-automatizálással és gyertyapontra horgonyzott kijelölésekkel.
Buy-Sell Arrows – SuperTrend Entries OnlyRecommended Rules for "Buy Calls Only + Exit Fast on Downtrend"
Signal from SuperTrend Script Your Action (Calls Only)
Green BUY arrow → Enter calls (ATM or slightly OTM, 21–45 DTE)
Red SELL arrow → Immediately exit the call (market order or tight stop) — do NOT wait
No position between signals Stay in cash — no calls open during red SuperTrend phases
DXY Volatility Ranges TableThe Dollar Index (DXY) measures the US dollar's value against a basket of six major currencies, including the Euro, Japanese Yen, British Pound, Canadian Dollar, Swedish Krona, and Swiss Franc. Here are some key ranges for the DXY:
- Historical Highs and Lows:
- All-time high: 164.720 in February 1985
- All-time low: 70.698 on March 16, 2008
- Recent Trends:
- Current value: around 99.603 (as of December 5, 2025)
- 52-week high: 129.670 (November 8, 1985)
- 52-week low: 94.650 (projected target by some analysts)
- Volatility Ranges:
- Low volatility: DXY < 95
- Moderate volatility: DXY between 95-105
- High volatility: DXY > 105
- Support and Resistance Levels:
- Support: around 94.650 and 90.00
- Resistance: around 100.15/35 and 105.00
Momentum Permission + Pivot Entry + Exit (v1.4 FULL)//@version=5
indicator("Momentum Permission + Pivot Entry + Exit (v1.4 FULL)", overlay=true)
// ──────────────────────────────────────────────
// Inputs
// ──────────────────────────────────────────────
smaLength = input.int(50, "SMA Length")
relVolThresh = input.float(1.3, "Relative Volume Threshold")
pivotLookback = input.int(3, "Pivot Lookback Bars")
// ──────────────────────────────────────────────
// Core Calculations
// ──────────────────────────────────────────────
sma50 = ta.sma(close, smaLength)
vwap = ta.vwap(close)
relVol = volume / ta.sma(volume, 10)
aboveSMA = close > sma50
aboveVWAP = close > vwap
relStrong = relVol > relVolThresh
greenCandle = close > open
crossUp = ta.crossover(close, sma50)
// ──────────────────────────────────────────────
// One-Time Daily Permission
// ──────────────────────────────────────────────
var bool permission = false
if ta.change(time("D"))
permission := false
permitSignal = crossUp and aboveVWAP and relStrong and not permission
if permitSignal
permission := true
// ──────────────────────────────────────────────
// Entry: Pivot Break Continuation
// ──────────────────────────────────────────────
pivotHighBreak = close > ta.highest(high , pivotLookback)
entrySignal = (
permission and
aboveSMA and
aboveVWAP and
relStrong and
greenCandle and
pivotHighBreak
)
// ──────────────────────────────────────────────
// Exit: Trend Exhaustion / VWAP Breakdown
// ──────────────────────────────────────────────
smaChange = sma50 - sma50
exitSignal = (
permission and
close < vwap and
close < open and
relStrong and
smaChange < 0
)
// ──────────────────────────────────────────────
// VISUAL PLOTS (same as before)
// ──────────────────────────────────────────────
plot(sma50, title="SMA50", color=color.orange, linewidth=2)
plot(vwap, title="VWAP", color=color.new(color.blue, 0), linewidth=2)
plotshape(
permitSignal,
title="Trend Permission",
style=shape.triangleup,
location=location.belowbar,
color=color.new(color.green, 0),
size=size.large,
text="PERMIT"
)
plotshape(
entrySignal,
title="Entry Trigger",
style=shape.triangleup,
location=location.abovebar,
color=color.new(color.aqua, 0),
size=size.normal,
text="ENTRY"
)
plotshape(
exitSignal,
title="Exit Signal",
style=shape.triangledown,
location=location.abovebar,
color=color.new(color.red, 0),
size=size.large,
text="EXIT"
)
// ──────────────────────────────────────────────
// SCREENER OUTPUT (persistent 0/1 for the day)
// ──────────────────────────────────────────────
var bool permitToday = false
var bool entryToday = false
var bool exitToday = false
if ta.change(time("D"))
permitToday := false
entryToday := false
exitToday := false
if permitSignal
permitToday := true
if entrySignal
entryToday := true
if exitSignal
exitToday := true
// Hidden plots for screener columns
plot(permitToday ? 1 : 0, title="PERMIT", display=display.none)
plot(entryToday ? 1 : 0, title="ENTRY", display=display.none)
plot(exitToday ? 1 : 0, title="EXIT", display=display.none)
// Alerts
alertcondition(permitSignal, title="PERMIT", message="Momentum PERMISSION fired")
alertcondition(entrySignal, title="ENTRY", message="Momentum ENTRY fired")
alertcondition(exitSignal, title="EXIT", message="Momentum EXIT fired")
ART Customizable Overbought Oversold indicatorThis toolkit will help you identify RSI levels on either extremes, you can customize them.
Buyer-Seller Locomotive IndexBuyer-Seller Locomotive Index (BSLI)
An original indicator that measures buyer and seller pressure, momentum shifts, and structural control in the market.
Overview
The Buyer-Seller Locomotive Index evaluates candle-level positioning relative to an adaptive EMA-based reference price. It calculates bull vs bear strength percentages and Total Power momentum using fast and slow EMAs, providing insight into which side currently dominates market structure. By combining pressure analysis with momentum smoothing, BSLI highlights both the intensity and direction of market control.
Features
Bull/Bear Strength Percentages: Normalized 0–100 values showing current dominance and threshold-based high-strength alerts.
Total Power Momentum: Fast and slow EMA crossover signals with a histogram to visualize expansion or contraction of pressure.
Visual Markers: Optional fight diamonds highlight candles intersecting the reference price, while dynamic labels show the exact strength percentages.
Crossover Signals: Circles mark potential shifts in momentum, helping to identify early transitions in market control.
Customizable Display: Users can toggle labels, markers, and histogram visibility for a clean or detailed chart view.
How to Use
BSLI provides traders with a multi-layered view of market structure:
Observe shifts in buyer vs seller dominance.
Spot early momentum transitions before trends become obvious.
Confirm price structure with Total Power and strength percentages.
Highlight periods of compression, conflict, or indecision for additional context.
This indicator is intended as a supportive analysis tool. Traders should combine it with personal methodology, risk management, and other analysis techniques. It is not a standalone trade signal.
Important Notes
Measures relative pressure, not absolute volume.
Percentages reflect current structure, not predicted price direction.
Signals are contextual; do not rely solely on crossovers for trading decisions.
Uses no lookahead; all calculations are based on completed bars.
Results may vary by asset, timeframe, and market volatility.
Originality
BSLI uniquely combines adaptive pressure extraction, normalized strength percentages, dual-EMA power momentum, conflict detection, and integrated labeling. This multi-component approach provides a clear and actionable view of the evolving balance between buyers and sellers, supporting both short-term and structural analysis.
Multi-Timeframe QuartilesThis indicator helps you identify the position of price in comparison with distance to key reference levels on multiple timeframes. Statistically, when the price is opening in the lower quartile of a timeframe, there is a higher chance for that previous low to be taken, depending on the market structure already formed
Buy & Sell Arrows - MACD + Best_Solve WPRMACD + Best_Solve Williams %R – Aggressive Trend-Reversal Catcher
(Allow Signals Even in Overbought/Oversold Zones)
This indicator combines the classic MACD histogram with Best_Solve’s popular custom Williams %R (a 0–100 momentum oscillator that behaves more like a fast Stochastic) to deliver clean, high-conviction entry signals on daily (and higher) timeframes.
Core Logic – Only TWO conditions are required
BUY (large green arrow below bar)
MACD histogram is green (bullish momentum)
Williams %R fast line is crossing above OR already above its EMA
SELL (large red arrow above bar)
MACD histogram is red (bearish momentum)
Williams %R fast line is crossing below OR already below its EMA
Unlike most oscillators, this version deliberately removes the traditional “do not buy when overbought / do not sell when oversold” filters. This allows the script to catch powerful trend reversals and explosive moves immediately — even on violent earnings gaps or panic sell-offs (example: META’s -11 % drop on Oct 30 2025 triggered an instant sell even though %R was deeply oversold).
Built-in Clean-Signal Logic
No consecutive buys or sells — each new signal must be preceded by the opposite direction.
This keeps the chart extremely clean and prevents whipsaw clusters during strong trends.
Best Use Cases
Daily and 4H swing trading on stocks, indices, crypto, forex
Excellent for catching sharp reversals after earnings, news events, or overextended moves
Works especially well on high-beta names and growth stocks
Visuals
Large green/red arrows with “BUY” / “SELL” text (your favorite style)
Subtle transparent MACD histogram overlaid on price for instant momentum context
Ready-to-use alerts (“Buy Alert” / “Sell Alert”)
Set it, alert it, trade it — one of the cleanest and most responsive daily reversal systems you’ll find.
Enjoy the edge!
Crypto Anchored VWAP (Swing High/Low)Crypto Anchored VWAP (Swing High/Low)
This indicator provides an automatic Anchored VWAP system designed specifically for highly volatile assets such as cryptocurrencies (ETH, BTC, SOL, etc.).
Unlike traditional AVWAP tools that require manual date input, this script automatically anchors VWAP to the most recent swing high and swing low, making it ideal for real-time trend tracking and intraday/4H structure analysis.
How It Works
The script detects local swing lows and swing highs based on user-defined swing length.
When a new swing point appears, an Anchored VWAP is initialized from that specific candle.
As price evolves, the AVWAP dynamically becomes:
A trend boundary
A fair-value line
A mean-reversion attractor
Traders can use these levels to identify:
Trend continuation
Breakout confirmation
Mean reversion pullbacks
Overextended expansions
Included Features
✔ Auto-Anchored VWAP from swing low
✔ Auto-Anchored VWAP from swing high
✔ Standard deviation bands (1σ) for volatility context
✔ Designed for Crypto 4H / 1H / 15m
✔ Works on any asset & any timeframe
How To Use
1. Trend Direction
Price above Swing-Low VWAP → Bullish bias
Price below Swing-High VWAP → Bearish bias
2. Trade Setups
Break → Retest → Hold above AVWAP = Trend continuation long
Reject from AVWAP / σ band = Mean-reversion short setup
AVWAP zone → High probability liquidity reaction
3. Volatility Bands
Price touching +1σ = extension
Price returning to 0σ = mean reversion
Price breaking −1σ = trend weakening
Inputs
Swing Length: determines sensitivity of swing high/low detection
(Default: 5)
Best Use Cases
ETH 4H trend following
BTC structure shifts
Altcoin volatility filtering
Identifying institutional "cost basis" zones
Confirming breakouts / fakeouts
Notes
This is not a trading system by itself but a structural tool meant to help traders understand trend and value location. Always combine AVWAP with market structure, volume, and risk management.
Disclaimer
This script is for educational and informational purposes only. It does not constitute financial advice or a recommendation to buy or sell any asset. Use at your own discretion.
Jefe ORBOpening Range Breakout (ORB) Indicator — Description
The Opening Range Breakout (ORB) Indicator automatically plots the high, low, and midpoint of the opening range for any market and any timeframe. This tool is ideal for intraday traders who rely on the initial price discovery window to identify direction, trend bias, liquidity sweeps, and breakout opportunities.
Features include:
Custom Opening Range start and end times
Opening Range High / Low / Mid lines
Optional session shading
Alerts for ORH/ORL breaks
Works across equities, futures, and crypto
This indicator lets traders tailor the ORB to 1m, 5m, 15m, 30m, or custom opening windows depending on their strategy.
How to Set the Time Correctly (IMPORTANT)
TradingView handles time based on two different factors:
The time zone of the chart/exchange
The time zone selected inside the indicator settings
Your ORB will ONLY plot correctly if your input times match the indicator’s chosen timezone—not your computer’s timezone.
Example: Matching NYSE Open While Trading From PST
NYSE opens at 9:30 AM Eastern Time
In Pacific Time (PST), this is 6:30 AM
In UTC, this is 14:30
If your indicator is set to use UTC, you must enter the ORB Start = 14:30 in order for the lines to align with the actual New York session open.
This is why, even though you personally trade in PST, you may need to use 14:30 when your chart or your indicator timezone is UTC.
Best Practice for Correct ORB Time Inputs
Choose your indicator timezone first, then enter the ORB start/end times in THAT zone:
If Indicator Timezone = America/New_York
Enter 09:30 for the ORB start
No conversion needed
If Indicator Timezone = America/Los_Angeles (PST)
Enter 06:30 for the ORB start
Matches NY open automatically
If Indicator Timezone = UTC
Enter 14:30 for the ORB start
This is 9:30 ET converted to UTC
The indicator intentionally allows manual timezone control so traders can align the opening range across global markets without depending on the chart's display timezone.
Price Action Concepts [RUDYINDICATOR]/// This work is licensed under a Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) creativecommons.org
// © RUDYBANK INDICATOR - formerly know as RUDY INDICATOR
//@version=5
indicator("Price Action Concepts ", shorttitle = "RUDYINDICATOR-V1
- Price Action RUDYINDICATOR ", overlay = true, max_lines_count = 500, max_labels_count = 500, max_boxes_count = 500, max_bars_back = 500, max_polylines_count = 100)
//-----------------------------------------------------------------------------{
//Boolean set
//-----------------------------------------------------------------------------{
s_BOS = 0
s_CHoCH = 1
i_BOS = 2
i_CHoCH = 3
i_pp_CHoCH = 4
green_candle = 5
red_candle = 6
s_CHoCHP = 7
i_CHoCHP = 8
boolean =
array.from(
false
, false
, false
, false
, false
, false
, false
, false
, false
)
//-----------------------------------------------------------------------------{
// User inputs
//-----------------------------------------------------------------------------{
show_swing_ms = input.string ("All" , "Swing        " , inline = "1", group = "MARKET STRUCTURE" , options = )
show_internal_ms = input.string ("All" , "Internal     " , inline = "2", group = "MARKET STRUCTURE" , options = )
internal_r_lookback = input.int (5 , "" , inline = "2", group = "MARKET STRUCTURE" , minval = 2)
swing_r_lookback = input.int (50 , "" , inline = "1", group = "MARKET STRUCTURE" , minval = 2)
ms_mode = input.string ("Manual" , "Market Structure Mode" , inline = "a", group = "MARKET STRUCTURE" , tooltip = " Use selected lenght Use automatic lenght" ,options = )
show_mtf_str = input.bool (true , "MTF Scanner" , inline = "9", group = "MARKET STRUCTURE" , tooltip = "Display Multi-Timeframe Market Structure Trend Directions. Green = Bullish. Red = Bearish")
show_eql = input.bool (false , "Show EQH/EQL" , inline = "6", group = "MARKET STRUCTURE")
plotcandle_bool = input.bool (false , "Plotcandle" , inline = "3", group = "MARKET STRUCTURE" , tooltip = "Displays a cleaner colored candlestick chart in place of the default candles. (requires hiding the current ticker candles)")
barcolor_bool = input.bool (false , "Bar Color" , inline = "4", group = "MARKET STRUCTURE" , tooltip = "Color the candle bodies according to market strucutre trend")
i_ms_up_BOS = input.color (#089981 , "" , inline = "2", group = "MARKET STRUCTURE")
i_ms_dn_BOS = input.color (#f23645 , "" , inline = "2", group = "MARKET STRUCTURE")
s_ms_up_BOS = input.color (#089981 , "" , inline = "1", group = "MARKET STRUCTURE")
s_ms_dn_BOS = input.color (#f23645 , "" , inline = "1", group = "MARKET STRUCTURE")
lvl_daily = input.bool (false , "Day   " , inline = "1", group = "HIGHS & LOWS MTF")
lvl_weekly = input.bool (false , "Week " , inline = "2", group = "HIGHS & LOWS MTF")
lvl_monthly = input.bool (false , "Month" , inline = "3", group = "HIGHS & LOWS MTF")
lvl_yearly = input.bool (false , "Year  " , inline = "4", group = "HIGHS & LOWS MTF")
css_d = input.color (color.blue , "" , inline = "1", group = "HIGHS & LOWS MTF")
css_w = input.color (color.blue , "" , inline = "2", group = "HIGHS & LOWS MTF")
css_m = input.color (color.blue , "" , inline = "3", group = "HIGHS & LOWS MTF")
css_y = input.color (color.blue , "" , inline = "4", group = "HIGHS & LOWS MTF")
s_d = input.string ('⎯⎯⎯' , '' , inline = '1', group = 'HIGHS & LOWS MTF' , options = )
s_w = input.string ('⎯⎯⎯' , '' , inline = '2', group = 'HIGHS & LOWS MTF' , options = )
s_m = input.string ('⎯⎯⎯' , '' , inline = '3', group = 'HIGHS & LOWS MTF' , options = )
s_y = input.string ('⎯⎯⎯' , '' , inline = '4', group = 'HIGHS & LOWS MTF' , options = )
ob_show = input.bool (true , "Show Last    " , inline = "1", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Display volumetric order blocks on the chart Ammount of volumetric order blocks to show")
ob_num = input.int (5 , "" , inline = "1", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Orderblocks number", minval = 1, maxval = 10)
ob_metrics_show = input.bool (true , "Internal Buy/Sell Activity" , inline = "2", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Display volume metrics that have formed the orderblock")
css_metric_up = input.color (color.new(#089981, 50) , "         " , inline = "2", group = "VOLUMETRIC ORDER BLOCKS")
css_metric_dn = input.color (color.new(#f23645 , 50) , "" , inline = "2", group = "VOLUMETRIC ORDER BLOCKS")
ob_swings = input.bool (false , "Swing Order Blocks" , inline = "a", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Display swing volumetric order blocks")
css_swing_up = input.color (color.new(color.gray , 90) , "                 " , inline = "a", group = "VOLUMETRIC ORDER BLOCKS")
css_swing_dn = input.color (color.new(color.silver, 90) , "" , inline = "a", group = "VOLUMETRIC ORDER BLOCKS")
ob_filter = input.string ("None" , "Filtering             " , inline = "d", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Filter out volumetric order blocks by BOS/CHoCH/CHoCH+", options = )
ob_mitigation = input.string ("Absolute" , "Mitigation           " , inline = "4", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Trigger to remove volumetric order blocks", options = )
ob_pos = input.string ("Precise" , "Positioning          " , inline = "k", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Position of the Order Block Cover the whole candle Cover half candle Adjust to volatility Same as Accurate but more precise", options = )
use_grayscale = input.bool (false , "Grayscale" , inline = "6", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Use gray as basic order blocks color")
use_show_metric = input.bool (true , "Show Metrics" , inline = "7", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Show volume associated with the orderblock and his relevance")
use_middle_line = input.bool (true , "Show Middle-Line" , inline = "8", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Show mid-line order blocks")
use_overlap = input.bool (true , "Hide Overlap" , inline = "9", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Hide overlapping order blocks")
use_overlap_method = input.string ("Previous" , "Overlap Method    " , inline = "Z", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = " Preserve the most recent volumetric order blocks Preserve the previous volumetric order blocks", options = )
ob_bull_css = input.color (color.new(#089981 , 90) , "" , inline = "1", group = "VOLUMETRIC ORDER BLOCKS")
ob_bear_css = input.color (color.new(#f23645 , 90) , "" , inline = "1", group = "VOLUMETRIC ORDER BLOCKS")
show_acc_dist_zone = input.bool (false , "" , inline = "1", group = "Accumulation And Distribution")
zone_mode = input.string ("Fast" , "" , inline = "1", group = "Accumulation And Distribution" , tooltip = " Find small zone pattern formation Find bigger zone pattern formation" ,options = )
acc_css = input.color (color.new(#089981 , 60) , "" , inline = "1", group = "Accumulation And Distribution")
dist_css = input.color (color.new(#f23645 , 60) , "" , inline = "1", group = "Accumulation And Distribution")
show_lbl = input.bool (false , "Show swing point" , inline = "1", group = "High and Low" , tooltip = "Display swing point")
show_mtb = input.bool (false , "Show High/Low/Equilibrium" , inline = "2", group = "High and Low" , tooltip = "Display Strong/Weak High And Low and Equilibrium")
toplvl = input.color (color.red , "Premium Zone   " , inline = "3", group = "High and Low")
midlvl = input.color (color.gray , "Equilibrium Zone" , inline = "4", group = "High and Low")
btmlvl = input.color (#089981 , "Discount Zone    " , inline = "5", group = "High and Low")
fvg_enable = input.bool (false , "        " , inline = "1", group = "FAIR VALUE GAP" , tooltip = "Display fair value gap")
what_fvg = input.string ("FVG" , "" , inline = "1", group = "FAIR VALUE GAP" , tooltip = "Display fair value gap", options = )
fvg_num = input.int (5 , "Show Last  " , inline = "1a", group = "FAIR VALUE GAP" , tooltip = "Number of fvg to show")
fvg_upcss = input.color (color.new(#089981, 80) , "" , inline = "1", group = "FAIR VALUE GAP")
fvg_dncss = input.color (color.new(color.red , 80) , "" , inline = "1", group = "FAIR VALUE GAP")
fvg_extend = input.int (10 , "Extend FVG" , inline = "2", group = "FAIR VALUE GAP" , tooltip = "Extend the display of the FVG.")
fvg_src = input.string ("Close" , "Mitigation  " , inline = "3", group = "FAIR VALUE GAP" , tooltip = " Use the close of the body as trigger Use the extreme point of the body as trigger", options = )
fvg_tf = input.timeframe ("" , "Timeframe " , inline = "4", group = "FAIR VALUE GAP" , tooltip = "Timeframe of the fair value gap")
t = color.t (ob_bull_css)
invcol = color.new (color.white , 100)
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - UDT }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
type bar
float o = open
float c = close
float h = high
float l = low
float v = volume
int n = bar_index
int t = time
type Zphl
line top
line bottom
label top_label
label bottom_label
bool stopcross
bool sbottomcross
bool itopcross
bool ibottomcross
string txtup
string txtdn
float topy
float bottomy
float topx
float bottomx
float tup
float tdn
int tupx
int tdnx
float itopy
float itopx
float ibottomy
float ibottomx
float uV
float dV
type FVG
box box
line ln
bool bull
float top
float btm
int left
int right
type ms
float p
int n
float l
type msDraw
int n
float p
color css
string txt
bool bull
type obC
float top
float btm
int left
float avg
float dV
float cV
int wM
int blVP
int brVP
int dir
float h
float l
int n
type obD
box ob
box eOB
box blB
box brB
line mL
type zone
chart.point points
float p
int c
int t
type hqlzone
box pbx
box ebx
box lbx
label plb
label elb
label lbl
type ehl
float pt
int t
float pb
int b
type pattern
string found = "None"
bool isfound = false
int period = 0
bool bull = false
type alerts
bool chochswing = false
bool chochplusswing = false
bool swingbos = false
bool chochplus = false
bool choch = false
bool bos = false
bool equal = false
bool ob = false
bool swingob = false
bool zone = false
bool fvg = false
bool obtouch = false
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - End }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - General Setup }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
bar b = bar.new()
var pattern p = pattern.new()
alerts blalert = alerts.new()
alerts bralert = alerts.new()
if p.isfound
p.period += 1
if p.period == 50
p.period := 0
p.found := "None"
p.isfound := false
p.bull := na
switch
b.c > b.o => boolean.set(green_candle, true)
b.c < b.o => boolean.set(red_candle , true)
f_zscore(src, lookback) =>
(src - ta.sma(src, lookback)) / ta.stdev(src, lookback)
var int iLen = internal_r_lookback
var int sLen = swing_r_lookback
vv = f_zscore(((close - close ) / close ) * 100,iLen)
if ms_mode == "Dynamic"
switch
vv >= 1.5 or vv <= -1.5 => iLen := 10
vv >= 1.6 or vv <= -1.6 => iLen := 9
vv >= 1.7 or vv <= -1.7 => iLen := 8
vv >= 1.8 or vv <= -1.8 => iLen := 7
vv >= 1.9 or vv <= -1.9 => iLen := 6
vv >= 2.0 or vv <= -2.0 => iLen := 5
=> iLen
var msline = array.new(0)
iH = ta.pivothigh(high, iLen, iLen)
sH = ta.pivothigh(high, sLen, sLen)
iL = ta.pivotlow (low , iLen, iLen)
sL = ta.pivotlow (low , sLen, sLen)
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - End }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - ARRAYS }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
hl () =>
= request.security(syminfo.tickerid , 'D' , hl() , lookahead = barmerge.lookahead_on)
= request.security(syminfo.tickerid , 'W' , hl() , lookahead = barmerge.lookahead_on)
= request.security(syminfo.tickerid , 'M' , hl() , lookahead = barmerge.lookahead_on)
= request.security(syminfo.tickerid , '12M', hl() , lookahead = barmerge.lookahead_on)
lstyle(style) =>
out = switch style
'⎯⎯⎯' => line.style_solid
'----' => line.style_dashed
'····' => line.style_dotted
mtfphl(h, l ,tf ,css, pdhl_style) =>
var line hl = line.new(
na
, na
, na
, na
, xloc = xloc.bar_time
, color = css
, style = lstyle(pdhl_style)
)
var line ll = line.new(
na
, na
, na
, na
, xloc = xloc.bar_time
, color = css
, style = lstyle(pdhl_style)
)
var label lbl = label.new(
na
, na
, xloc = xloc.bar_time
, text = str.format('P{0}L', tf)
, color = invcol
, textcolor = css
, size = size.small
, style = label.style_label_left
)
var label hlb = label.new(
na
, na
, xloc = xloc.bar_time
, text = str.format('P{0}H', tf)
, color = invcol
, textcolor = css
, size = size.small
, style = label.style_label_left
)
hy = ta.valuewhen(h != h , h , 1)
hx = ta.valuewhen(h == high , time , 1)
ly = ta.valuewhen(l != l , l , 1)
lx = ta.valuewhen(l == low , time , 1)
if barstate.islast
extension = time + (time - time ) * 50
line.set_xy1(hl , hx , hy)
line.set_xy2(hl , extension , hy)
label.set_xy(hlb, extension , hy)
line.set_xy1(ll , lx , ly)
line.set_xy2(ll , extension , ly)
label.set_xy(lbl, extension , ly)
if lvl_daily
mtfphl(pdh , pdl , 'D' , css_d, s_d)
if lvl_weekly
mtfphl(pwh , pwl , 'W' , css_w, s_w)
if lvl_monthly
mtfphl(pmh , pml, 'M' , css_m, s_m)
if lvl_yearly
mtfphl(pyh , pyl , '12M', css_y, s_y)
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - End }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - Market Structure }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
method darkcss(color css, float factor, bool bull) =>
blue = color.b(css) * (1 - factor)
red = color.r(css) * (1 - factor)
green = color.g(css) * (1 - factor)
color.rgb(red, green, blue, 0)
method f_line(msDraw d, size, style) =>
var line id = na
var label lbl = na
id := line.new(
d.n
, d.p
, b.n
, d.p
, color = d.css
, width = 1
, style = style
)
if msline.size() >= 250
line.delete(msline.shift())
msline.push(id)
lbl := label.new(
int(math.avg(d.n, b.n))
, d.p
, d.txt
, color = invcol
, textcolor = d.css
, style = d.bull ? label.style_label_down : label.style_label_up
, size = size
, text_font_family = font.family_monospace
)
structure(bool mtf) =>
msDraw drw = na
bool isdrw = false
bool isdrwS = false
var color css = na
var color icss = na
var int itrend = 0
var int trend = 0
bool bull_ob = false
bool bear_ob = false
bool s_bull_ob = false
bool s_bear_ob = false
n = bar_index
var ms up = ms.new(
array.new()
, array.new< int >()
, array.new()
)
var ms dn = ms.new(
array.new()
, array.new< int >()
, array.new()
)
var ms sup = ms.new(
array.new()
, array.new< int >()
, array.new()
)
var ms sdn = ms.new(
array.new()
, array.new< int >()
, array.new()
)
switch show_swing_ms
"All" => boolean.set(s_BOS , true ), boolean.set(s_CHoCH, true ) , boolean.set(s_CHoCHP, true )
"CHoCH" => boolean.set(s_BOS , false), boolean.set(s_CHoCH, true ) , boolean.set(s_CHoCHP, false )
"CHoCH+" => boolean.set(s_BOS , false), boolean.set(s_CHoCH, false) , boolean.set(s_CHoCHP, true )
"BOS" => boolean.set(s_BOS , true ), boolean.set(s_CHoCH, false) , boolean.set(s_CHoCHP, false )
"None" => boolean.set(s_BOS , false), boolean.set(s_CHoCH, false) , boolean.set(s_CHoCHP, false )
=> na
switch show_internal_ms
"All" => boolean.set(i_BOS, true ), boolean.set(i_CHoCH, true ), boolean.set(i_CHoCHP, true )
"CHoCH" => boolean.set(i_BOS, false), boolean.set(i_CHoCH, true ), boolean.set(i_CHoCHP, false)
"CHoCH+" => boolean.set(i_BOS, false), boolean.set(i_CHoCH, false ), boolean.set(i_CHoCHP, true )
"BOS" => boolean.set(i_BOS, true ), boolean.set(i_CHoCH, false ), boolean.set(i_CHoCHP, false)
"None" => boolean.set(i_BOS, false), boolean.set(i_CHoCH, false ), boolean.set(i_CHoCHP, false)
=> na
switch
iH =>
up.p.unshift(b.h )
up.l.unshift(b.h )
up.n.unshift(n )
iL =>
dn.p.unshift(b.l )
dn.l.unshift(b.l )
dn.n.unshift(n )
sL =>
sdn.p.unshift(b.l )
sdn.l.unshift(b.l )
sdn.n.unshift(n )
sH =>
sup.p.unshift(b.h )
sup.l.unshift(b.h )
sup.n.unshift(n )
// INTERNAL BULLISH STRUCTURE
if up.p.size() > 0 and dn.l.size() > 1
if ta.crossover(b.c, up.p.first())
bool CHoCH = na
string txt = na
if itrend < 0
CHoCH := true
switch
not CHoCH =>
txt := "BOS"
css := i_ms_up_BOS
blalert.bos := true
if boolean.get(i_BOS) and mtf == false and na(drw)
isdrw := true
drw := msDraw.new(
up.n.first()
, up.p.first()
, i_ms_up_BOS
, txt
, true
)
CHoCH =>
dn.l.first() > dn.l.get(1) ? blalert.chochplus : blalert.choch
txt := dn.l.first() > dn.l.get(1) ? "CHoCH+" : "CHoCH"
css := i_ms_up_BOS.darkcss(0.25, true)
if (dn.l.first() > dn.l.get(1) ? boolean.get(i_CHoCHP) : boolean.get(i_CHoCH)) and mtf == false and na(drw)
isdrw := true
drw := msDraw.new(
up.n.first()
, up.p.first()
, i_ms_up_BOS.darkcss(0.25, true)
, txt
, true
)
if mtf == false
switch
ob_filter == "None" => bull_ob := true
ob_filter == "BOS" and txt == "BOS" => bull_ob := true
ob_filter == "CHoCH" and txt == "CHoCH" => bull_ob := true
ob_filter == "CHoCH+" and txt == "CHoCH+" => bull_ob := true
itrend := 1
up.n.clear()
up.p.clear()
// INTERNAL BEARISH STRUCTURE
if dn.p.size() > 0 and up.l.size() > 1
if ta.crossunder(b.c, dn.p.first())
bool CHoCH = na
string txt = na
if itrend > 0
CHoCH := true
switch
not CHoCH =>
bralert.bos := true
txt := "BOS"
css := i_ms_dn_BOS
if boolean.get(i_BOS) and mtf == false and na(drw)
isdrw := true
drw := msDraw.new(
dn.n.first()
, dn.p.first()
, i_ms_dn_BOS
, txt
, false
)
CHoCH =>
if up.l.first() < up.l.get(1)
bralert.chochplus := true
else
bralert.choch := true
txt := up.l.first() < up.l.get(1) ? "CHoCH+" : "CHoCH"
css := i_ms_dn_BOS.darkcss(0.25, false)
if (up.l.first() < up.l.get(1) ? boolean.get(i_CHoCHP) : boolean.get(i_CHoCH)) and mtf == false and na(drw)
isdrw := true
drw := msDraw.new(
dn.n.first()
, dn.p.first()
, i_ms_dn_BOS.darkcss(0.25, false)
, txt
, false
)
if mtf == false
switch
ob_filter == "None" => bear_ob := true
ob_filter == "BOS" and txt == "BOS" => bear_ob := true
ob_filter == "CHoCH" and txt == "CHoCH" => bear_ob := true
ob_filter == "CHoCH+" and txt == "CHoCH+" => bear_ob := true
itrend := -1
dn.n.clear()
dn.p.clear()
// SWING BULLISH STRUCTURE
if sup.p.size() > 0 and sdn.l.size() > 1
if ta.crossover(b.c, sup.p.first())
bool CHoCH = na
string txt = na
if trend < 0
CHoCH := true
switch
not CHoCH =>
blalert.swingbos := true
txt := "BOS"
icss := s_ms_up_BOS
if boolean.get(s_BOS) and mtf == false and na(drw)
isdrwS := true
drw := msDraw.new(
sup.n.first()
, sup.p.first()
, s_ms_up_BOS
, txt
, true
)
CHoCH =>
if sdn.l.first() > sdn.l.get(1)
blalert.chochplusswing := true
else
blalert.chochswing := true
txt := sdn.l.first() > sdn.l.get(1) ? "CHoCH+" : "CHoCH"
icss := s_ms_up_BOS.darkcss(0.25, true)
if (sdn.l.first() > sdn.l.get(1) ? boolean.get(s_CHoCHP) : boolean.get(s_CHoCH)) and mtf == false and na(drw)
isdrwS := true
drw := msDraw.new(
sup.n.first()
, sup.p.first()
, s_ms_up_BOS.darkcss(0.25, true)
, txt
, true
)
if mtf == false
switch
ob_filter == "None" => s_bull_ob := true
ob_filter == "BOS" and txt == "BOS" => s_bull_ob := true
ob_filter == "CHoCH" and txt == "CHoCH" => s_bull_ob := true
ob_filter == "CHoCH+" and txt == "CHoCH+" => s_bull_ob := true
trend := 1
sup.n.clear()
sup.p.clear()
// SWING BEARISH STRUCTURE
if sdn.p.size() > 0 and sup.l.size() > 1
if ta.crossunder(b.c, sdn.p.first())
bool CHoCH = na
string txt = na
if trend > 0
CHoCH := true
switch
not CHoCH =>
bralert.swingbos := true
txt := "BOS"
icss := s_ms_dn_BOS
if boolean.get(s_BOS) and mtf == false and na(drw)
isdrwS := true
drw := msDraw.new(
sdn.n.first()
, sdn.p.first()
, s_ms_dn_BOS
, txt
, false
)
CHoCH =>
if sup.l.first() < sup.l.get(1)
bralert.chochplusswing := true
else
bralert.chochswing := true
txt := sup.l.first() < sup.l.get(1) ? "CHoCH+" : "CHoCH"
icss := s_ms_dn_BOS.darkcss(0.25, false)
if (sup.l.first() < sup.l.get(1) ? boolean.get(s_CHoCHP) : boolean.get(s_CHoCH)) and mtf == false and na(drw)
isdrwS := true
drw := msDraw.new(
sdn.n.first()
, sdn.p.first()
, s_ms_dn_BOS.darkcss(0.25, false)
, txt
, false
)
if mtf == false
switch
ob_filter == "None" => s_bear_ob := true
ob_filter == "BOS" and txt == "BOS" => s_bear_ob := true
ob_filter == "CHoCH" and txt == "CHoCH" => s_bear_ob := true
ob_filter == "CHoCH+" and txt == "CHoCH+" => s_bear_ob := true
trend := -1
sdn.n.clear()
sdn.p.clear()
= structure(false)
if isdrw
f_line(drw, size.small, line.style_dashed)
if isdrwS
f_line(drw, size.small, line.style_solid)
= request.security("", "15" , structure(true))
= request.security("", "60" , structure(true))
= request.security("", "240" , structure(true))
= request.security("", "1440" , structure(true))
if show_mtf_str
var tab = table.new(position = position.top_right, columns = 10, rows = 10, bgcolor = na, frame_color = color.rgb(54, 58, 69, 0), frame_width = 1, border_color = color.rgb(54, 58, 69, 100), border_width = 1)
table.cell(tab, 0, 1, text = "15" , text_color = color.silver, text_halign = text.align_center, text_size = size.normal, bgcolor = chart.bg_color, text_font_family = font.family_monospace, width = 2)
table.cell(tab, 0, 2, text = "1H" , text_color = color.silver, text_halign = text.align_center, text_size = size.normal, bgcolor = chart.bg_color, text_font_family = font.family_monospace, width = 2)
table.cell(tab, 0, 3, text = "4H" , text_color = color.silver, text_halign = text.align_center, text_size = size.normal, bgcolor = chart.bg_color, text_font_family = font.family_monospace, width = 2)
table.cell(tab, 0, 4, text = "1D" , text_color = color.silver, text_halign = text.align_center, text_size = size.normal, bgcolor = chart.bg_color, text_font_family = font.family_monospace, width = 2)
table.cell(tab, 1, 1, text = itrend15 == 1 ? "BULLISH" : itrend15 == -1 ? "BEARISH" : na , text_halign = text.align_center, text_size = size.normal, text_color = itrend15 == 1 ? i_ms_up_BOS.darkcss(-0.25, true) : itrend15 == -1 ? i_ms_dn_BOS.darkcss(0.25, false) : color.gray, bgcolor = chart.bg_color, text_font_family = font.family_monospace)
table.cell(tab, 1, 2, text = itrend1H == 1 ? "BULLISH" : itrend1H == -1 ? "BEARISH" : na , text_halign = text.align_center, text_size = size.normal, text_color = itrend1H == 1 ? i_ms_up_BOS.darkcss(-0.25, true) : itrend1H == -1 ? i_ms_dn_BOS.darkcss(0.25, false) : color.gray, bgcolor = chart.bg_color, text_font_family = font.family_monospace)
table.cell(tab, 1, 3, text = itrend4H == 1 ? "BULLISH" : itrend4H == -1 ? "BEARISH" : na , text_halign = text.align_center, text_size = size.normal, text_color = itrend4H == 1 ? i_ms_up_BOS.darkcss(-0.25, true) : itrend4H == -1 ? i_ms_dn_BOS.darkcss(0.25, false) : color.gray, bgcolor = chart.bg_color, text_font_family = font.family_monospace)
table.cell(tab, 1, 4, text = itrend1D == 1 ? "BULLISH" : itrend1D == -1 ? "BEARISH" : na , text_halign = text.align_center, text_size = size.normal, text_color = itrend1D == 1 ? i_ms_up_BOS.darkcss(-0.25, true) : itrend1D == -1 ? i_ms_dn_BOS.darkcss(0.25, false) : color.gray, bgcolor = chart.bg_color, text_font_family = font.family_monospace)
table.cell(tab, 0, 5, text = "Detected Pattern", text_halign = text.align_center, text_size = size.normal, text_color = color.silver, bgcolor = chart.bg_color, text_font_family = font.family_monospace)
table.cell(tab, 0, 6, text = p.found, text_halign = text.align_center, text_size = size.normal, text_color = na(p.bull) ? color.white : p.bull ? i_ms_up_BOS.darkcss(-0.25, true) : p.bull == false ? i_ms_dn_BOS.darkcss(0.25, false) : na, bgcolor = chart.bg_color, text_font_family = font.family_monospace)
table.merge_cells(tab, 0, 5, 1, 5)
table.merge_cells(tab, 0, 6, 1, 6)
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - End }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - Strong/Weak High/Low And Equilibrium }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
var phl = Zphl.new(
na
, na
, label.new(na , na , color = invcol , textcolor = i_ms_dn_BOS , style = label.style_label_down , size = size.tiny , text = "")
, label.new(na , na , color = invcol , textcolor = i_ms_up_BOS , style = label.style_label_up , size = size.tiny , text = "")
, true
, true
, true
, true
, ""
, ""
, 0
, 0
, 0
, 0
, high
, low
, 0
, 0
, 0
, 0
, 0
, 0
, na
, na
)
zhl(len)=>
upper = ta.highest(len)
lower = ta.lowest(len)
var float out = 0
out := b.h > upper ? 0 : b.l < lower ? 1 : out
top = out == 0 and out != 0 ? b.h : 0
btm = out == 1 and out != 1 ? b.l : 0
= zhl(sLen)
= zhl(iLen)
upphl(trend) =>
var label lbl = label.new(
na
, na
, color = invcol
, textcolor = toplvl
, style = label.style_label_down
, size = size.small
)
if top
phl.stopcross := true
phl.txtup := top > phl.topy ? "HH" : "HL"
if show_lbl
topl = label.new(
b.n - swing_r_lookback
, top
, phl.txtup
, color = invcol
, textcolor = toplvl
, style = label.style_label_down
, size = size.small
)
line.delete(phl.top )
phl.top := line.new(
b.n - sLen
, top
, b.n
, top
, color = toplvl)
phl.topy := top
phl.topx := b.n - sLen
phl.tup := top
phl.tupx := b.n - sLen
if itop
phl.itopcross := true
phl.itopy := itop
phl.itopx := b.n - iLen
phl.tup := math.max(high, phl.tup)
phl.tupx := phl.tup == high ? b.n : phl.tupx
phl.uV := phl.tup != phl.tup ? b.v : phl.uV
if barstate.islast
line.set_xy1(
phl.top
, phl.tupx
, phl.tup
)
line.set_xy2(
phl.top
, b.n + 50
, phl.tup
)
label.set_x(
lbl
, b.n + 50
)
label.set_y(
lbl
, phl.tup
)
dist = math.abs(phl.uV / (phl.uV + phl.dV)) * 100
label.set_text (lbl, trend < 0
? "Strong High | " + str.tostring(phl.uV, format.volume) + " (" + str.tostring(math.round(dist,0)) + "%)"
: "Weak High | " + str.tostring(phl.uV, format.volume) + " (" + str.tostring(math.round(dist,0)) + "%)")
dnphl(trend) =>
var label lbl = label.new(
na
, na
, color = invcol
, textcolor = btmlvl
, style = label.style_label_up
, size = size.small
)
if btm
phl.sbottomcross := true
phl.txtdn := btm > phl.bottomy ? "LH" : "LL"
if show_lbl
btml = label.new(
b.n - swing_r_lookback
, btm, phl.txtdn
, color = invcol
, textcolor = btmlvl
, style = label.style_label_up
, size = size.small
)
line.delete(phl.bottom )
phl.bottom := line.new(
b.n - sLen
, btm
, b.n
, btm
, color = btmlvl
)
phl.bottomy := btm
phl.bottomx := b.n - sLen
phl.tdn := btm
phl.tdnx := b.n - sLen
if ibtm
phl.ibottomcross := true
phl.ibottomy := ibtm
phl.ibottomx := b.n - iLen
phl.tdn := math.min(low, phl.tdn)
phl.tdnx := phl.tdn == low ? b.n : phl.tdnx
phl.dV := phl.tdn != phl.tdn ? b.v : phl.dV
if barstate.islast
line.set_xy1(
phl.bottom
, phl.tdnx
, phl.tdn
)
line.set_xy2(
phl.bottom
, b.n + 50
, phl.tdn
)
label.set_x(
lbl
, b.n + 50
)
label.set_y(
lbl
, phl.tdn
)
dist = math.abs(phl.dV / (phl.uV + phl.dV)) * 100
label.set_text (lbl, trend > 0
? "Strong Low | " + str.tostring(phl.dV, format.volume) + " (" + str.tostring(math.round(dist,0)) + "%)"
: "Weak Low | " + str.tostring(phl.uV, format.volume) + " (" + str.tostring(math.round(dist,0)) + "%)")
midphl() =>
avg = math.avg(phl.bottom.get_y2(), phl.top.get_y2())
var line l = line.new(
y1 = avg
, y2 = avg
, x1 = b.n - sLen
, x2 = b.n + 50
, color = midlvl
, style = line.style_solid
)
var label lbl = label.new(
x = b.n + 50
, y = avg
, text = "Equilibrium"
, style = label.style_label_left
, color = invcol
, textcolor = midlvl
, size = size.small
)
if barstate.islast
more = (phl.bottom.get_x1() + phl.bottom.get_x2()) > (phl.top.get_x1() + phl.top.get_x2()) ? phl.top.get_x1() : phl.bottom.get_x1()
line.set_xy1(l , more , avg)
line.set_xy2(l , b.n + 50, avg)
label.set_x (lbl , b.n + 50 )
label.set_y (lbl , avg )
dist = math.abs((l.get_y2() - close) / close) * 100
label.set_text (lbl, "Equilibrium (" + str.tostring(math.round(dist,0)) + "%)")
hqlzone() =>
if barstate.islast
var hqlzone dZone = hqlzone.new(
box.new(
na
, na
, na
, na
, bgcolor = color.new(toplvl, 70)
, border_color = na
)
, box.new(
na
, na
, na
, na
, bgcolor = color.new(midlvl, 70)
, border_color = na
)
, box.new(
na
, na
, na
, na
, bgcolor = color.new(btmlvl, 70)
, border_color = na
)
, label.new(na, na, text = "Premium" , color = invcol, textcolor = toplvl, style = label.style_label_down, size = size.small)
, label.new(na, na, text = "Equilibrium", color = invcol, textcolor = midlvl, style = label.style_label_left, size = size.small)
, label.new(na, na, text = "Discount" , color = invcol, textcolor = btmlvl, style = label.style_label_up , size = size.small)
)
dZone.pbx.set_lefttop(int(math.max(phl.topx, phl.bottomx)) , phl.tup)
dZone.pbx.set_rightbottom(b.n + 50 , 0.95 * phl.tup + 0.05 * phl.tdn)
dZone.ebx.set_lefttop(int(math.max(phl.topx, phl.bottomx)), 0.525 * phl.tup + 0.475 * phl.tdn)
dZone.ebx.set_rightbottom(b.n + 50 , 0.525 * phl.tdn + 0.475 * phl.tup)
dZone.lbx.set_lefttop(int(math.max(phl.topx, phl.bottomx)), 0.95 * phl.tdn + 0.05 * phl.tup)
dZone.lbx.set_rightbottom(b.n + 50 , phl.tdn)
dZone.plb.set_xy( int(math.avg(math.max(phl.topx, phl.bottomx), int(b.n + 50))) , phl.tup)
dZone.elb.set_xy( int(b.n + 50) , math.avg(phl.tup, phl.tdn))
dZone.lbl.set_xy( int(math.avg(math.max(phl.topx, phl.bottomx), int(b.n + 50))) , phl.tdn)
if show_mtb
upphl (trend)
dnphl (trend)
hqlzone()
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - End }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - Volumetric Order Block }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
method eB(box b, bool ext, color css, bool swing) =>
b.unshift(
box.new(
na
, na
, na
, na
, xloc = xloc.bar_time
, text_font_family = font.family_monospace
, extend = ext ? extend.right : extend.none
, border_color = swing ? color.new(css, 0) : color.new(color.white,100)
, bgcolor = css
, border_width = 1
)
)
method eL(line l, bool ext, bool solid, color css) =>
l.unshift(
line.new(
na
, na
, na
, na
, width = 1
, color = css
, xloc = xloc.bar_time
, extend = ext ? extend.right : extend.none
, style = solid ? line.style_solid : line.style_dashed
)
)
method drawVOB(bool cdn, bool bull, color css, int loc, bool swing) =>
= request.security(
syminfo.tickerid
, ""
,
, lookahead = barmerge.lookahead_off
)
var obC obj = obC.new(
array.new()
, array.new()
, array.new< int >()
, array.new()
, array.new()
, array.new()
, array.new< int >()
, array.new< int >()
, array.new< int >()
, array.new< int >()
, array.new()
, array.new()
, array.new< int >()
)
var obD draw = obD.new(
array.new()
, array.new()
, array.new()
, array.new()
, array.new()
)
if barstate.isfirst
for i = 0 to ob_num - 1
draw.mL .eL(false, false, use_grayscale ? color.new(color.gray, 0) : color.new(css,0))
draw.ob .eB(false, use_grayscale ? color.new(color.gray, 90) : css, swing)
draw.blB.eB(false, css_metric_up , swing)
draw.brB.eB(false, css_metric_dn , swing)
draw.eOB.eB(true , use_grayscale ? color.new(color.gray, 90) : css, swing)
float pos = ob_pos == "Full"
? (bull ? high : low)
: ob_pos == "Middle"
? ohlc4
: ob_pos == "Accurate"
? hl2
: hl2
if cdn
obj.h.clear()
obj.l.clear()
obj.n.clear()
for i = 0 to math.abs((loc - b.n)) - 1
obj.h.push(hH )
obj.l.push(lL )
obj.n.push(b.t )
// obj.h.reverse()
// obj.l.reverse()
int iU = obj.l.indexof(obj.l.min()) + 1
int iD = obj.h.indexof(obj.h.max()) + 1
obj.dir.unshift(
bull
? (b.c > b.o ? 1 : -1)
: (b.c > b.o ? 1 : -1)
)
obj.top.unshift(
bull
? pos
: obj.h.max()
)
obj.btm.unshift(
bull
? obj.l.min()
: pos
)
obj.left.unshift(
bull
? obj.n.get(obj.l.indexof(obj.l.min()))
: obj.n.get(obj.h.indexof(obj.h.max()))
)
obj.avg.unshift(
math.avg(obj.top.first(), obj.btm.first())
)
obj.cV.unshift(
bull
? b.v
: b.v
)
if ob_pos == "Precise"
switch bull
true =>
if obj.avg.get(0) < (b.c < b.o ? b.c : b.o ) and obj.top.get(0) > hlcc4
obj.top.set(0, obj.avg.get(0))
obj.avg.set(0, math.avg(obj.top.first(), obj.btm.first()))
false =>
if obj.avg.get(0) > (b.c < b.o ? b.o : b.c ) and obj.btm.get(0) < hlcc4
obj.btm.set(0, obj.avg.get(0))
obj.avg.set(0, math.avg(obj.top.first(), obj.btm.first()))
obj.blVP.unshift ( 0 )
obj.brVP.unshift ( 0 )
obj.wM .unshift ( 1 )
if use_overlap
int rmP = use_overlap_method == "Recent" ? 1 : 0
if obj.avg.size() > 1
if bull
? obj.btm.first() < obj.top.get(1)
: obj.top.first() > obj.btm.get(1)
obj.wM .remove(rmP)
obj.cV .remove(rmP)
obj.dir .remove(rmP)
obj.top .remove(rmP)
obj.avg .remove(rmP)
obj.btm .remove(rmP)
obj.left .remove(rmP)
obj.blVP .remove(rmP)
obj.brVP .remove(rmP)
if barstate.isconfirmed
for x = 0 to ob_num - 1
tg = switch ob_mitigation
"Middle" => obj.avg
"Absolute" => bull ? obj.btm : obj.top
for in tg
if (bull ? cC < pt : cC > pt)
obj.wM .remove(idx)
obj.cV .remove(idx)
obj.dir .remove(idx)
obj.top .remove(idx)
obj.avg .remove(idx)
obj.btm .remove(idx)
obj.left .remove(idx)
obj.blVP .remove(idx)
obj.brVP .remove(idx)
if barstate.islast
if obj.avg.size() > 0
// Alert
if bull
? ta.crossunder(low , obj.top.get(0))
: ta.crossover (high, obj.btm.get(0))
switch bull
true => blalert.obtouch := true
false => bralert.obtouch := true
float tV = 0
obj.dV.clear()
seq = math.min(ob_num - 1, obj.avg.size() - 1)
for j = 0 to seq
tV += obj.cV.get(j)
if j == seq
for y = 0 to seq
obj.dV.unshift(
math.floor(
(obj.cV.get(y) / tV) * 100)
)
obj.dV.reverse()
for i = 0 to math.min(ob_num - 1, obj.avg.size() - 1)
dmL = draw.mL .get(i)
dOB = draw.ob .get(i)
dblB = draw.blB.get(i)
dbrB = draw.brB.get(i)
deOB = draw.eOB.get(i)
dOB.set_lefttop (obj.left .get(i) , obj.top.get(i))
deOB.set_lefttop (b.t , obj.top.get(i))
dOB.set_rightbottom (b.t , obj.btm.get(i))
deOB.set_rightbottom(b.t + (b.t - b.t ) * 100 , obj.btm.get(i))
if use_middle_line
dmL.set_xy1(obj.left.get(i), obj.avg.get(i))
dmL.set_xy2(b.t , obj.avg.get(i))
if ob_metrics_show
dblB.set_lefttop (obj.left.get(i), obj.top.get(i))
dbrB.set_lefttop (obj.left.get(i), obj.avg.get(i))
dblB.set_rightbottom(obj.left.get(i), obj.avg.get(i))
dbrB.set_rightbottom(obj.left.get(i), obj.btm.get(i))
rpBL = dblB.get_right()
rpBR = dbrB.get_right()
dbrB.set_right(rpBR + (b.t - b.t ) * obj.brVP.get(i))
dblB.set_right(rpBL + (b.t - b.t ) * obj.blVP.get(i))
if use_show_metric
txt = switch
obj.cV.get(i) >= 1000000000 => str.tostring(math.round(obj.cV.get(i) / 1000000000,3)) + "B"
obj.cV.get(i) >= 1000000 => str.tostring(math.round(obj.cV.get(i) / 1000000,3)) + "M"
obj.cV.get(i) >= 1000 => str.tostring(math.round(obj.cV.get(i) / 1000,3)) + "K"
obj.cV.get(i) < 1000 => str.tostring(math.round(obj.cV.get(i)))
deOB.set_text(
str.tostring(
txt + " (" + str.tostring(obj.dV.get(i)) + "%)")
)
deOB.set_text_size (size.auto)
deOB.set_text_halign(text.align_left)
deOB.set_text_color (use_grayscale ? color.silver : color.new(css, 0))
if ob_metrics_show and barstate.isconfirmed
if obj.wM.size() > 0
for i = 0 to obj.avg.size() - 1
switch obj.dir.get(i)
1 =>
switch obj.wM.get(i)
1 => obj.blVP.set(i, obj.blVP.get(i) + 1), obj.wM.set(i, 2)
2 => obj.blVP.set(i, obj.blVP.get(i) + 1), obj.wM.set(i, 3)
3 => obj.brVP.set(i, obj.brVP.get(i) + 1), obj.wM.set(i, 1)
-1 =>
switch obj.wM.get(i)
1 => obj.brVP.set(i, obj.brVP.get(i) + 1), obj.wM.set(i, 2)
2 => obj.brVP.set(i, obj.brVP.get(i) + 1), obj.wM.set(i, 3)
3 => obj.blVP.set(i, obj.blVP.get(i) + 1), obj.wM.set(i, 1)
var hN = array.new(1, b.n)
var lN = array.new(1, b.n)
var hS = array.new(1, b.n)
var lS = array.new(1, b.n)
if iH
hN.pop()
hN.unshift(int(b.n ))
if iL
lN.pop()
lN.unshift(int(b.n ))
if sH
hS.pop()
hS.unshift(int(b.n ))
if sL
lS.pop()
lS.unshift(int(b.n ))
if ob_show
bull_ob.drawVOB(true , ob_bull_css, hN.first(), false)
bear_ob.drawVOB(false, ob_bear_css, lN.first(), false)
if ob_swings
s_bull_ob.drawVOB(true , css_swing_up, hS.first(), true)
s_bear_ob.drawVOB(false, css_swing_dn, lS.first(), true)
if bull_ob
blalert.ob := true
if bear_ob
bralert.ob := true
if s_bull_ob
blalert.swingob := true
if s_bear_ob
blalert.swingob := true
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - End }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - FVG | VI | OG }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
ghl() => request.security(syminfo.tickerid, fvg_tf, [high , low , close , open ])
tfG() => request.security(syminfo.tickerid, fvg_tf, )
cG(bool bull) =>
= ghl()
= tfG()
var FVG draw = FVG.new(
array.new()
, array.new()
)
var FVG cords = array.new()
float pup = na
float pdn = na
bool cdn = na
int pos = 2
cc = timeframe.change(fvg_tf)
if barstate.isfirst
for i = 0 to fvg_num - 1
draw.box.unshift(box.new (na, na, na, na, border_color = color.new(color.white, 100), xloc = xloc.bar_time))
draw.ln.unshift (line.new(na, na, na, na, xloc = xloc.bar_time, width = 1, style = line.style_solid))
switch what_fvg
"FVG" =>
pup := bull ? gl : l
pdn := bull ? h : gh
cdn := bull ? gl > h and cc : gh < l and cc
pos := 2
"VI" =>
pup := bull
? (gc > go
? go
: gc)
: (gc > go
? go
: gc )
pdn := bull
? (gc > go
? gc
: go )
: (gc > go
? gc
: go)
cdn := bull
? go > gc and gh >
TMT Support & Resistance - Hitesh NimjeTMT Support & Resistance - HiteshNimje Indicator
Overview
The TMT Support & Resistance indicator is a professional pivot point analysis tool that automatically calculates and displays key support and resistance levels across multiple timeframe perspectives. It offers various pivot point calculation methods and provides customizable visual elements for comprehensive technical analysis.
Key Features
Pivot Point Calculation Methods
1. Traditional Pivot Points
Standard pivot point calculation using Previous Period High, Low, and Close
Creates P, S1, S2, S3, R1, R2, R3 levels
Most widely used method for day trading and swing trading
2. Fibonacci Pivot Points
Incorporates Fibonacci retracement levels (38.2%, 61.8%)
Uses traditional pivot as base with Fibonacci extensions
Popular among traders following Fibonacci analysis
3. Woodie Pivot Points
Alternative calculation method with different weighting
Emphasizes opening price in calculations
Preferred by some intraday traders
4. Classic Pivot Points
Similar to traditional but with different level calculations
Balanced approach to support/resistance identification
Timeframe Options
* Auto: Automatically selects optimal timeframe based on chart timeframe
Intraday ≤15min → Daily
Intraday >15min → Weekly
Daily → Monthly
* Fixed Timeframes: Daily, Weekly, Monthly, Quarterly, Yearly
* Extended Periods: Biyearly, Triyearly, Quinquennially, Decennially
Level Management System
Support Levels (Blue Colored)
* TMT Support 1 (S1): First major support level
* TMT Support 2 (S2): Second support level
* TMT Support 3 (S3): Third support level
* TMT Support 4 (S4): Fourth support level (Traditional/Camarilla only)
* TMT Support 5 (S5): Fifth support level (Traditional/Camarilla only)
Resistance Levels (Black Colored)
* TMT Resistance 1 (R1): First major resistance level
* TMT Resistance 2 (R2): Second resistance level
* TMT Resistance 3 (R3): Third resistance level
* TMT Resistance 4 (R4): Fourth resistance level (Traditional/Camarilla only)
* TMT Resistance 5 (R5): Fifth resistance level (Traditional/Camarilla only)
Central Pivot (Orange Colored)
* Pivot Point (P): Central price level used for S/R calculations
Customization Options
Display Settings
* Show Labels: Toggle pivot level identification labels
* Show Prices: Display actual price values next to levels
* Labels Position: Choose between Left or Right positioning
* Line Width: Adjustable thickness (1-100 pixels) for all pivot lines
Data Source Options
* Use Daily-based Values:
ON: Uses official daily OHLC values for calculations
OFF: Uses intraday data with extended hours consideration
* Number of Pivots Back: Historical pivot display (1-200 levels)
Color Customization
* Individual color selection for each support/resistance level
* Default colors: Supports (Blue), Resistances (Black), Pivot (Orange)
* Full color picker integration for all levels
Technical Features
Smart Display Logic
* Intraday Charts: Automatically uses daily-based calculations when intraday data is insufficient
* Multi-timeframe Compatibility: Adapts to chart timeframe and pivot timeframe differences
* Extended Hours Handling: Incorporates extended trading hours when enabled on chart
Dynamic Level Management
* Real-time Updates: Levels update as new data becomes available
* Historical Tracking: Maintains configurable number of historical pivot periods
* Automatic Cleanup: Removes old pivot graphics when limit is exceeded
Visual Elements
* Time-based Lines: Lines extend across full time periods for clear visual reference
* Price Labels: Contextual information showing level names and prices
* Professional Styling: Clean, professional appearance suitable for any trading style
Use Cases
Day Trading Applications
* Session Management: Use daily pivots for intraday trading decisions
* Range Trading: Camarilla levels excellent for range-bound strategies
* Breakout Confirmation: Use pivot breaks as entry/exit signals
Swing Trading Applications
* Weekly/Monthly Pivots: Identify key levels for multi-day positions
* Trend Analysis: Track how price interacts with higher timeframe pivots
* Risk Management: Set stop-losses and take-profits at pivot levels
Long-term Trading Applications
* Quarterly/Yearly Pivots: Major institutional levels for position trading
* Support/Resistance Maps: Create comprehensive price level roadmap
* Market Structure Analysis: Understand price behavior around key levels
Benefits for Traders
Professional Analysis
* Multiple Methodologies: Choose pivot calculation that matches trading style
* Timeframe Flexibility: Analyze from multiple temporal perspectives
* Historical Context: See how price has historically responded to pivot levels
Risk Management
* Level Identification: Clear visual reference for stop-loss placement
* Position Sizing: Use pivot distances for risk/reward calculations
* Entry Timing: Identify optimal entry points near support/resistance
Market Understanding
* Psychological Levels: Understand where market participants react
* Volume Confirmation: Cross-reference pivot levels with volume data
* Trend Continuation: Identify pivot levels that may continue or reverse trends
Technical Specifications
* Pine Script Version: 6
* Overlay: True (displays on price chart)
* Performance: Optimized for up to 200 historical pivot periods
* Compatibility: All trading instruments and timeframes
* Data Source: OHLC-based pivot calculations with security function integration
Trading Strategy Integration
1. Support/Resistance Trading: Enter trades at S1/R1 with stops beyond S2/R2
2. Pivot Bounce Strategy: Trade bounces from established pivot levels
3. Range Trading: Use Camarilla pivots for tight range strategies
4. Breakout Strategy: Enter breakouts with confirmation from pivot breaks
5. Multiple Timeframe Analysis: Combine daily, weekly, and monthly pivots for comprehensive analysis
This indicator serves as a comprehensive support and resistance analysis tool, providing traders with institutional-quality pivot point analysis across multiple calculation methods and timeframes. It combines professional-grade pivot point calculations with intuitive customization options, making it suitable for traders of all experience levels and trading styles.
TRADING DISCLAIMER
RISK WARNING
Trading involves substantial risk of loss and is not suitable for all investors. Past performance is not indicative of future results. You should carefully consider whether trading is suitable for you in light of your circumstances, knowledge, and financial resources.
NO FINANCIAL ADVICE
This indicator is provided for educational and informational purposes only. It does not constitute:
* Financial advice or investment recommendations
* Buy/sell signals or trading signals
* Professional investment advice
* Legal, tax, or accounting guidance
LIMITATIONS AND DISCLAIMERS
Technical Analysis Limitations
* Pivot points are mathematical calculations based on historical price data
* No guarantee of accuracy of price levels or calculations
* Markets can and do behave irrationally for extended periods
* Past performance does not guarantee future results
* Technical analysis should be used in conjunction with fundamental analysis
Data and Calculation Disclaimers
* Calculations are based on available price data at the time of calculation
* Data quality and availability may affect accuracy
* Pivot levels may differ when calculated on different timeframes
* Gaps and irregular market conditions may cause level failures
* Extended hours trading may affect intraday pivot calculations
Market Risks
* Extreme market volatility can invalidate all technical levels
* News events, economic announcements, and market manipulation can cause gaps
* Liquidity issues may prevent execution at calculated levels
* Currency fluctuations, inflation, and interest rate changes affect all levels
* Black swan events and market crashes cannot be predicted by technical analysis
USER RESPONSIBILITIES
Due Diligence
* You are solely responsible for your trading decisions
* Conduct your own research before using this indicator
* Verify calculations with multiple sources before trading
* Consider multiple timeframes and confirm levels with other technical tools
* Never rely solely on one indicator for trading decisions
Risk Management
* Always use proper risk management and position sizing
* Set appropriate stop-losses for all positions
* Never risk more than you can afford to lose
* Consider the inherent risks of leverage and margin trading
* Diversify your portfolio and trading strategies
Professional Consultation
* Consult with qualified financial advisors before trading
* Consider your tax obligations and legal requirements
* Understand the regulations in your jurisdiction
* Seek professional advice for complex trading strategies
LIMITATION OF LIABILITY
Indemnification
The creator and distributor of this indicator shall not be liable for:
* Any trading losses, whether direct or indirect
* Inaccurate or delayed price data
* System failures or technical malfunctions
* Loss of data or profits
* Interruption of service or connectivity issues
No Warranty
This indicator is provided "as is" without warranties of any kind:
* No guarantee of accuracy or completeness
* No warranty of uninterrupted or error-free operation
* No warranty of merchantability or fitness for a particular purpose
* The software may contain bugs or errors
Maximum Liability
In no event shall the liability exceed the purchase price (if any) paid for this indicator. This limitation applies regardless of the theory of liability, whether contract, tort, negligence, or otherwise.
REGULATORY COMPLIANCE
Jurisdiction-Specific Risks
* Regulations vary by country and region
* Some jurisdictions prohibit or restrict certain trading strategies
* Tax implications differ based on your location and trading frequency
* Commodity futures and options trading may have additional requirements
* Currency trading may be regulated differently than stock trading
Professional Trading
* If you are a professional trader, ensure compliance with all applicable regulations
* Adhere to fiduciary duties and best execution requirements
* Maintain required records and reporting
* Follow market abuse regulations and insider trading laws
TECHNICAL SPECIFICATIONS
Data Sources
* Calculations based on TradingView data feeds
* Data accuracy depends on broker and exchange reporting
* Historical data may be subject to adjustments and corrections
* Real-time data may have delays depending on data providers
Software Limitations
* Internet connectivity required for proper operation
* Software updates may change calculations or functionality
* TradingView platform dependencies may affect performance
* Third-party integrations may introduce additional risks
MONEY MANAGEMENT RECOMMENDATIONS
Conservative Approach
* Risk only 1-2% of capital per trade
* Use position sizing based on volatility
* Maintain adequate cash reserves
* Avoid over-leveraging accounts
Portfolio Management
* Diversify across multiple strategies
* Don't put all capital into one approach
* Regularly review and adjust trading strategies
* Maintain detailed trading records
FINAL LEGAL NOTICES
Acceptance of Terms
* By using this indicator, you acknowledge that you have read and understood this disclaimer
* You agree to assume all risks associated with trading
* You confirm that you are legally permitted to trade in your jurisdiction
Updates and Changes
* This disclaimer may be updated without notice
* Continued use constitutes acceptance of any changes
* It is your responsibility to stay informed of updates
Governing Law
* This disclaimer shall be governed by the laws of the jurisdiction where the indicator was created
* Any disputes shall be resolved in the appropriate courts
* Severability clause: If any part of this disclaimer is invalid, the remainder remains enforceable
REMEMBER: THERE ARE NO GUARANTEES IN TRADING. THE MAJORITY OF RETAIL TRADERS LOSE MONEY. TRADE AT YOUR OWN RISK.
Contact Information:
* Creator: Hitesh_Nimje
* Phone: Contact@8087192915
* Source: Thought Magic Trading
© HiteshNimje - All Rights Reserved
This disclaimer should be prominently displayed whenever the indicator is shared, sold, or distributed to ensure users are fully aware of the risks and limitations involved in trading.
Multi-TF Candle Gap DetectorHigh timeframe gap detector, these work well to identify key levels to trade from
Daily Dual Pivots (Std + Fib) Extended by Jackel
簡介: 這個指標旨在為日內交易者提供最強大的支撐與阻力參考。它將市場上最常用的兩種 Pivot Points 計算方式——標準 (Standard) 與 斐波那契 (Fibonacci)——結合在同一個圖表中,讓你一眼就能看出關鍵的價格匯聚點 (Confluence Areas)。
主要特色:
雙重系統並存:
標準 Pivot (Standard):以 實線 (Solid Lines) 顯示。這是機構與大部分交易者使用的傳統支撐阻力位。
斐波那契 Pivot (Fibonacci):以 圓點/虛線 (Dotted Lines) 顯示。利用 Fib 黃金比例 (0.382, 0.618) 計算出的潛在反轉位。
清晰的視覺區分:標準版使用暖色系 (紅/綠/橙),Fib 版使用冷色系 (藍/紫),互不干擾,清晰易讀。
可選擴展關卡 (S4-S5 / R4-R5):預設顯示 P, R1-R3, S1-S3。如果市場波動劇烈,你可以在設定中開啟 "Show Extra Levels" 來顯示 R4/R5 及 S4/S5。
自動隱藏歷史:預設只顯示「當日」的線條,保持圖表整潔。如需回測,可開啟「顯示歷史數據」選項。
如何使用:
當 實線 (Standard) 與 虛線 (Fib) 重疊或非常接近時,該區域通常具有更強的支撐或阻力效力。
適用於 15分鐘、1小時或 4小時圖表操作日內交易。
Introduction: This indicator is designed for intraday traders who need precise Support & Resistance levels. It combines the two most popular Pivot Point calculation methods—Standard (Traditional) and Fibonacci—into a single chart, allowing you to easily identify key areas of confluence.
Key Features:
Dual System Strategy:
Standard Pivots: Displayed as Solid Lines. These represent the traditional structural levels used by most traders and institutions.
Fibonacci Pivots: Displayed as Dotted/Circle Lines. These use key Fibonacci ratios (0.382, 0.618) to identify potential reversal zones.
Visual Clarity: Different line styles and color groups allow you to distinguish between Standard and Fib levels instantly without chart clutter.
Extended Levels (Optional): By default, it shows P, R1-R3, and S1-S3. In highly volatile markets, you can enable "Show Extra Levels" in the settings to reveal S4/S5 and R4/R5.
Clean Chart: By default, it only shows levels for the current day. You can enable "Show History" in the settings if you need to backtest.
How to Use:
Look for Confluence: When a Solid Line (Standard) and a Dotted Line (Fib) overlap or are very close to each other, it indicates a very strong Support or Resistance zone.
Best used on 15m, 1H, or 4H charts for intraday analysis.
HH HL LH LL + BOS / CHoCHHH HL LH LL + BOS / CHoCH Structure Indicator (ATR Adaptive)
This indicator provides a complete market structure framework using swing-based pivots, real-time trend detection, BOS (Break of Structure), CHoCH (Change of Character), and optional ATR-adaptive swing sensitivity.
🔹 Core Features
1. Market Structure Labels
The script detects and labels:
HH – Higher High
LH – Lower High
HL – Higher Low
LL – Lower Low
These labels help visualize trend continuation or weakness in structure.
Each label type can be individually toggled ON/OFF in settings.
2. ATR-Based Adaptive Swing Length (Optional)
Swing pivots can be calculated using:
A fixed manual swing length, or
A dynamic ATR-based swing length that adjusts automatically to volatility.
Increasing volatility → longer swings
Decreasing volatility → tighter swings
This makes structure detection more stable and timeframe-adaptive.
3. Close-Based Break of Structure (BOS)
The indicator identifies a BOS when:
Price closes above the previous swing high (Bullish BOS↑)
Price closes below the previous swing low (Bearish BOS↓)
BOS labels can be turned ON/OFF without affecting internal calculations.
4. CHoCH (Change of Character)
CHoCH is triggered when a BOS occurs against the current trend, indicating a potential trend reversal:
CHoCH↑ – Bearish → Bullish reversal
CHoCH↓ – Bullish → Bearish reversal
CHoCH remains active even when BOS labels are turned off.
5. Alerts
The indicator provides alert conditions for:
CHoCH↑ (Bullish Trend Shift)
CHoCH↓ (Bearish Trend Shift)
This allows traders to automate notifications for significant trend changes.
6. Trend State Tracking
The script internally tracks the current structure-based trend:
Uptrend
Downtrend
Undefined
The trend updates dynamically based on real BOS events.
7. Fully Backwards Compatible
The indicator generates structure, BOS, and CHoCH even when scrolling back deep in chart history, thanks to extended max_bars_back handling.
Summary
This tool provides a complete, flexible, and non-repainting framework for market structure analysis, suitable for:
SMC/ICT traders
Swing & intraday traders
Trend traders
Price action analysts
With adaptive swing detection, clean structure labeling, BOS/CHoCH logic, and alert integration, the indicator helps traders understand market transitions with clarity and precision.
HOKO,PSPHOKO is a multifunctional chart-overlay designed to display clean market context and detect PSP (Price-Structure Projection) signals based on candle-body direction differences between the main symbol and two reference indices.
The indicator provides two core features:
1. Header Display (Symbol / Timeframe / Date / Mode System)
HOKO allows full customization of on-chart informational headers, including:
Symbol name
Timeframe (auto-formatted)
Indicator name (HOKO)
Date (Pretty or Numeric)
Multiple layout modes (6 total)
Adjustable text size, alignment, padding, row spacing, and screen position
Dynamic rendering using table objects
This creates a clean and professional display suitable for screenshots, analysis, and multi-chart layouts.
2. PSP Logic (Price Structure Projection)
The PSP engine compares the main chart’s candle direction to two reference symbols (default: ES1! and YM1!).
A violation occurs when the main candle is bullish while the reference candle is bearish, or vice-versa.
The script:
Calculates ATR-based dynamic marker offsets
Stores the last 3 bars
Detects Swing High PSP and Swing Low PSP based on a 3-candle swing structure
Confirms signals only if the middle candle contains a violation
Draws markers above/below the swing point with fully customizable shapes, colors, and sizes
Supports two symbols independently (Symbol 1 / Symbol 2)
Automatically deletes old labels based on a user-defined max-bar limit
This makes PSP easy to visualize and helps identify inflection points where internal weakness or strength appears before price shifts.
Key Features
Clean customizable chart header
Pretty or numeric date formats
Multiple layout modes (vertical or one-line display)
PSP detection from ES/YM divergence logic
Swing-based confirmation for higher-quality signals
Dynamic ATR offset for accurate visual spacing
Lightweight and optimized with automatic cleanup
Works on any market and any timeframe
Purpose
HOKO helps traders quickly understand market context while highlighting potential turning points caused by structural divergence between major indices. It is ideal for intraday traders using ICT-style logic, smart money concepts, or divergence-based confirmation models.
Multi-Pivot Plotter//================================================================================
//📌 Manual Pivot Plotter (4 Sets: P, R1–R3, S1–S3)
// - Up to 4 indices
// - Each index: Name + P/S/R values
// - One shared Style block: colors, visibility, line width (applies to all indices)
// - Lines start at 00:00 UTC+8 and extend a few bars
// - Labels at line end or start, with optional "Index Name" and price value
//================================================================================
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!
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)






















