Numbers RenkoRenko with Volume and Time in the box was developed by David Weis (Authority on Wyckoff method) and his student.
I like this style (I don't know what it is officially called) because it brings out the potential of Wyckoff method and Renko, and looks beautiful.
I can't find this style Indicator anywhere, so I made something like it, then I named "Numbers Renko" (数字 練行足 in Japanese).
Caution : This indicator only works exactly in Renko Chart.
////////// Numbers Renko General Settings //////////
Volume Divisor : To make good looking Volume Number.
ex) You set 100. When Volume is 0.056, 0.05 x 100 = 5.6. 6 is plotted in the box (Decimal are round off).
Show Only Large Renko Volume : show only Renko Volume which is larger than Average Renko Volume (it is calculated by user selected moving average, option below).
Show Renko Time : "Only Large Renko Time" show only Renko Time which is larger than Average Renko Time (it is calculated by user selected moving average, option below).
EMA period for calculation : This is used to calculate Average Renko Time and Average Renko Volume (These are used to decide Numbers colors and Candles colors). Default is EMA, You can choice SMA.
////////// Numbers Renko Coloring //////////
The Numbers in the box are color coded by compared the current Renko Volume with the Average Renko Volume.
If the current Renko Volume is 2 times larger than the ARV, Color2 will be used. If the current Renko Volume is 1.5 times larger than the ARV, Color1.5 will be used. Color1 If the current Renko Volume is larger than the ARV . Color0.5 is larger than half Athe RV and Color0 is less than or equal to half the ARV. Color1, Color1.5 and Color2 are Large Value, so only these colored Numbers are showed when use "Show Only ~ " option.
Default is Renko Volume based Color coding, You can choice Renko Time based Color coding. Therefore you can use two type coloring at the same time. ex) The Numbers Colors are Renko Volume based. Candle body, border and wick Colors are Renko Time based.
////////// Weis Wave Volume //////////
Show Effort vs Result : Weis Wave Volume divided by Wave Length.
ex) If 100 Up WWV is accumulated between 30 Up Renko Box, 100 / 30 = 3.33... will be 3.3 (Second decimal will be rounded off).
No Result Ratio : If current "Effort vs Result" is "No Result Ratio" times larger than Average Effort vs Result, Square Mark will be show. AEvsR is calculated by 5SMA.
ex) You set 1.5. If Current EvsR is 20 and AEvsR is 10, 20 > 10 x 1.5 then Square Mark will be show.
If the left and right arrows are in the same direction, the right arrow is omitted.
Show Comparison Marks : Show left side arrow by compare current value to previous previous value and show right side small arrow by compare current value to previous value.
ex) Current Up WWV is 17 and Previous Up WWV (previous previous value) is 12, left side arrow is Up. Previous Dn WWV is 20, right side small arrow is Dn.
Large Volume Ratio : If current WWV is "Large Volume Ratio" times larger than Average WWV, Large WWV color is used.
Sample layout
스크립트에서 "足球日本vs中国"에 대해 찾기
DailyDeviationLibrary "DailyDeviation"
Helps in determining the relative deviation from the open of the day compared to the high or low values.
hlcDeltaArrays(daysPrior, maxDeviation, spec, res) Retuns a set of arrays representing the daily deviation of price for a given number of days.
Parameters:
daysPrior : Number of days back to get the close from.
maxDeviation : Maximum deviation before a value is considered an outlier. A value of 0 will not filter results.
spec : session.regular (default), session.extended or other time spec.
res : The resolution (default = '1440').
Returns: Where OH = Open vs High, OL = Open vs Low, and OC = Open vs Close
fromOpen(daysPrior, maxDeviation, comparison, spec, res) Retuns a value representing the deviation from the open (to the high or low) of the current day given number of days to measure from.
Parameters:
daysPrior : Number of days back to get the close from.
maxDeviation : Maximum deviation before a value is considered an outlier. A value of 0 will not filter results.
comparison : The value use in comparison to the current open for the day.
spec : session.regular (default), session.extended or other time spec.
res : The resolution (default = '1440').
Modified ATR Indicator [KL]Modified Average True Range (ATR) Indicator
This indicator displays the ATR with relative highs and relative lows statistically determined.
What is ATR:
To know what ATR is, we need to understand what a True Range (TR) is.
- TR at a given bar is the highest distance between points: a) High vs low, b) High vs Close, and c) Low vs Close.
- ATR is the moving average of TRs over a predefined lookback period; 14 is the most commonly used.
- ATR can be mathematically expressed as:
Why is ATR Important
ATR often used to measure volatility; high volatility is indicated by high ATR, vice versa for low. This is a versatile tool allowing traders to determine entry/exit points, as well as the size of stop losses and when to take profits relative to it.
This is an opinion: Through observations, I have noticed that ATR can also indirectly tell us the levels of relative volume. This intuitively makes sense because in order to increase length of TR, high amounts of capital inflow/outflow is required (graphically speaking, high volume is required in order to make lengths of candle sticks longer). The relationship between ATR and relative volume should hold unless the market is illiquid to the extreme that there is no relationship between volume and price.
That said, knowing the relative lows/highs of ATR is very useful. It can be interpreted as:
- Relative high = high volatility, usually during sell offs
- Relative low = decreasing volume, could indicate price consolidation
Instead of arbitrarily determining whether ATR is high/low, this indicator will determine relative highs and relative lows using a simple statistical model.
How relative high/low is determined by this model
This indicator applies two-tailed hypothesis testing to test whether ATR (ie. say lookback of 14) has greatly deviated from a larger sample size (ie. lookback of 50). Assuming ATR is normally distributed and variance is known, then test statistic (z) can be used to determine whether ATR14 is within the critical area under Null Hypothesis: ATR14 == ATR50. If z falls below/above the left/right critical values (ie. 1.645 for a 90% confidence interval), then this is shown by the indicator through using different colors to plot the ATR line.
Volume X-ray [LucF]█ OVERVIEW
This tool analyzes the relative size of volume reported on intraday vs EOD (end of day) data feeds on historical bars. If you use volume data to make trading decisions, it can help you improve your understanding of its nature and quality, which is especially important if you trade on intraday timeframes.
I often mention, when discussing volume analysis, how it's important for traders to understand the volume data they are using: where it originates, what it includes and does not include. By helping you spot sizeable differences between volume reported on intraday and EOD data feeds for any given instrument, "Volume X-ray" can point you to instruments where you might want to research the causes of the difference.
█ CONCEPTS
The information used to build a chart's historical bars originates from data providers (exchanges, brokers, etc.) who often maintain distinct historical feeds for intraday and EOD timeframes. How volume data is assembled for intraday and EOD feeds varies with instruments, brokers and exchanges. Variations between the two feeds — or their absence — can be due to how instruments are traded in a particular sector and/or the volume reporting policy for the feeds you are using. Instruments from crypto and forex markets, for example, will often display similar volume on both feeds. Stocks will often display variations because block trades or other types of trades may not be included in their intraday volume data. Futures will also typically display variations. It is even possible that volume from different feeds may not be of the same nature, as you can get trade volume (market volume) on one feed and tick volume (transaction counts) on another. You will sometimes be able to find the details of what different feeds contain from the technical information provided by exchanges/brokers on their feeds. This is an example for the NASDAQ feeds . Once you determine which feeds you are using, you can look for the reporting specs for that feed. This is all research you will need to do on your own; "Volume X-ray" will not help you with that part.
You may elect to forego the deep dive in feed information and simply rely on the figure the indicator will calculate for the instruments you trade. One simple — and unproven — way to interpret "Volume X-ray" values is to infer that instruments with larger percentages of intraday/EOD volume ratios are more "democratic" because at intraday timeframes, you are seeing a greater proportion of the actual traded volume for the instrument. This could conceivably lead one to conclude that such volume data is more reliable than on an instrument where intraday volume accounts for only 3% of EOD volume, let's say.
Note that as intraday vs EOD variations exist for historical bars on some instruments, there will typically also be differences between the realtime feeds used on intraday vs 1D or greater timeframes for those same assets. Realtime reporting rules will often be different from historical feed reporting rules, so variations between realtime feeds will often be different from the variations between historical feeds for the same instrument. A deep dive in reporting rules will quickly reveal what a jungle they are for some instruments, yet it is the only way to really understand the volume information our charts display.
█ HOW TO USE IT
The script is very simple and has no inputs. Just add it to 1D charts and it will calculate the proportion of volume reported on the intraday feed over the EOD volume. The plots show the daily values for both volumes: the teal area is the EOD volume, the orange line is the intraday volume. A value representing the average, cumulative intraday/EOD volume percentage for the chart is displayed in the upper-right corner. Its background color changes with the percentage, with brightness levels proportional to the percentage for both the bull color (% >= 50) or the bear color (% < 50). When abnormal conditions are detected, such as missing volume of one kind or the other, a yellow background is used.
Daily and cumulative values are displayed in indicator values and the Data Window.
The indicator loads in a pane, but you can also use it in overlay mode by moving it on the chart with "Move to" in the script's "More" menu, and disabling the plot display from the "Settings/Style" tab.
█ LIMITATIONS
• The script will not run on timeframes >1D because it cannot produce useful values on them.
• The calculation of the cumulative average will vary on different intraday timeframes because of the varying number of days covered by the dataset.
Variations can also occur because of irregularities in reported volume data. That is the reason I recommend using it on 1D charts.
• The script only calculates on historical bars because in real time there is no distinction between intraday and EOD feeds.
• You will see plenty of special cases if you use the indicator on a variety of instruments:
• Some instruments have no intraday volume, while on others it's the opposite.
• Missing information will sometimes appear here and there on datasets.
• Some instruments have higher intraday than EOD volume.
Please do not ask me the reasons for these anomalies; it's your responsibility to find them. I supply a tool that will spot the anomalies for you — nothing more.
█ FOR PINE CODERS
• This script uses a little-known feature of request.security() , which allows us to specify `"1440"` for the `timeframe` argument.
When you do, data from the 1min intrabars of the historical intraday feed is aggregated over one day, as opposed to the usual EOD feed used with `"D"`.
• I use gaps on my request.security() calls. This is useful because at intraday timeframes I can cumulate non- na values only.
• I use fixnan() on some values. For those who don't know about it yet, it eliminates na values from a series, just like not using gaps will do in a request.security() call.
• I like how the new switch structure makes for more readable code than equivalent if structures.
• I wrote my script using the revised recommendations in the Style Guide from the Pine v5 User Manual.
• I use the new runtime.error() to throw an error when the script user tries to use a timeframe >1D.
Why? Because then, my request.security() calls would be returning values from the last 1D intrabar of the dilation of the, let's say, 1W chart bar.
This of course would be of no use whatsoever — and misleading. I encourage all Pine coders fetching HTF data to protect their script users in the same way.
As tool builders, it is our responsibility to shield unsuspecting users of our scripts from contexts where our calcs produce invalid results.
• While we're on the subject of accessing intrabar timeframes, I will add this to the intention of coders falling victim to what appears to be
a new misconception where the mere fact of using intrabar timeframes with request.security() is believed to provide some sort of edge.
This is a fallacy unless you are sending down functions specifically designed to mine values from request.security() 's intrabar context.
These coders do not seem to realize that:
• They are only retrieving information from the last intrabar of the chart bar.
• The already flawed behavior of their scripts on historical bars will not improve on realtime bars. It will actually worsen because in real time,
intrabars are not yet ordered sequentially as they are on historical bars.
• Alerts or strategy orders using intrabar information acquired through request.security() will be using flawed logic and data most of the time.
The situation reminds me of the mania where using Heikin-Ashi charts to backtest was all the rage because it produced magnificent — and flawed — results.
Trading is difficult enough when doing the right things; I hate to see traders infected by lethal beliefs.
Strive to sharpen your "herd immunity", as Lionel Shriver calls it. She also writes: "Be leery of orthodoxy. Hold back from shared cultural enthusiasms."
Be your own trader.
█ THANKS
This indicator would not exist without the invaluable insights from Tim, a member of the Pine team. Thanks Tim!
Relative StrengthThis indicator is called Relative Strength and is no way related to RSI ( Relative strength indicator).
It is simply a ratio of asset A to asset B plotted. Usually it is used to look for strength vs a particular index. Since it is a ratio, all the trendlines work on it. The default index is NIFTY. You can change it any index/script you want to compare:
1. Script vs Index
2. Index vs Index
Market BuySell RatioA script using 1m small candle size (configurable) to compute the volume of buy (up) vs sell (down) candles (instead of actual market buy vs sell orders which are not available in pine script).
It then plots the buy vs sell ratio as an oscillator below the cart.
This gives traders an idea of current order flow in the market.
To compute the small candles this script uses the "Smart Volume" script which can be found here:
CRR - GANAEMAs on the chart (visual trend)
EMA 15 (white), 30 (yellow), 200 (red).
2️⃣ DASH Engine 1m–5m–15m (+ 1H and 1D)
For each TF (1m, 5m, 15m) it calculates a bull/bear score using:
EMA structure (15, 30, 50, 100, 200).
MACD.
RSI.
Relationship with EMA 30 and VWAP.
FVG in favor.
ATR change (volatility **increasing**).
From this it derives:
t1 (1m), t2 (5m), t3 (15m),
t4 (1H) and t5 (1D) (only for EMA200).
It detects:
ALL BULL → “BULLISH - BUYS ONLY”.
ALL BEAR → “BEARISH - SELLS ONLY”.
Otherwise → “NEUTRAL / MIXED”.
In addition:
Calculates BULL TF vs BEAR TF (%) between 1m–5m–15m.
Displays a visual bar 🐂🟩 vs 🐻🟥.
3️⃣ GOLD News (manual)
Special bar that says:
Neutral
BUY (positive)
SELL (negative)
Paints the HUD with color according to the news you select.
4️⃣ NO RETRACEMENT Alerts (beast mode 💣)
Very strict conditions using the 5 TFs:
BUY NO RETRACEMENT if:
4 or more TFs in bull mode (bullTF_all >= 4),
1m ultra bull (EMA bull, RSI>60, MACD bull, high volume, price above EMA15 and VWAP, FVG ≥ 0).
SELL NO RETRACEMENT is the same but bearish.
Creates alerts:
CRR BUY NO RETRACEMENT
CRR SELL NO RETRACEMENT
5️⃣ PRO LITE Patterns: Double Top / Double Bottom
Detects double tops and double bottoms with:
Minimum bar distance.
Tolerance in %. Optional filters:
MACD, RSI, ATR (volatility), volume, FVG.
If everything aligns:
Plots SELL at double top.
Plots BUY at double bottom.
6️⃣ TOP Indicators Block (SMI + WaveTrend + Supertrend)
SMI (momentum), WaveTrend, and Supertrend:
Counts which are in bull mode and which are in bear mode.
Displays:
TOP IND: BULLS XX% | BEARS YY%.
7️⃣ Integrated Internal SMC Module
Structure HH, LH, HL, LL.
BMS (break of structure) and ChoCH (change of character).
Filter with ATR + volume + MACD + gaps.
Internal Fibonacci of the last range (38.2, 50, 61.8).
Dotted yellow lines of the current range (swing high/low).
🧠 In short:
It's your command center for XAUUSD:
Global mode (buy only / sell only / mixed),
% of timeframes favoring bulls/bears,
gold news,
no-lag alerts,
filtered double top/bottom,
TOP indicators,
and complete SMC (structure + BMS/ChoCH + Fibonacci + range)...
all integrated into a single CRAZY RAY RAY HUD
RiskCraft - Advanced Risk Management SystemRiskCraft – Risk Intelligence Dashboard
Trade like you actually respect risk
"I know the setup looks good… but how much am I actually risking right now?"
RiskCraft is an open-source Pine Script v6 indicator that keeps risk transparent directly on the chart. It is not a signal generator; it is a risk desk that calculates size, frames volatility, and reminds you when your behaviour drifts away from the plan.
Core utilities
Calculates professional-style position sizing in real time.
Reads volatility and market regime before position size is confirmed.
Adjusts risk based on the trader’s emotional state and confidence inputs.
Maps session risk across Asian, London, and New York hours.
Draws exactly one stop line and one target line in the preferred direction.
Provides rotating education tips plus contextual warnings when risk escalates.
It is intentionally conservative and keeps you in the game long enough for any separate entry logic to matter.
---
Chart layout checklist
Use a clean chart on a liquid symbol (e.g., AMEX:SPY or major FX pairs).
Main RiskCraft dashboard placed on the right edge.
Session Risk box on the left with UTC time visible.
Floating risk badge above price.
Stop/target guide lines enabled.
Education panel visible in the bottom-right corner.
---
1. On-chart components
Right-side dashboard : account risk %, position size/value, stop, target, risk/reward, regime, trend strength, emotional state, behavioural score, correlation, and preferred trade direction.
Session Risk box : highlights active session (Asian, London, NY), current UTC time, and risk label (High/Med/Low) per session.
Floating risk badge : keeps actual account risk percent visible with colour-coded wording from Ultra Cautious to Very Aggressive.
Stop/target lines : exactly one dashed stop and one dashed target aligned with the preferred bias.
Education panel : rotates core principles and AI-style warnings tied to volatility, risk %, and behaviour flags.
---
2. Volatility engine – ATR with context 📈
atr = ta.atr(atrLength)
atrPercent = (atr / close) * 100
atrSMA = ta.sma(atr, atrLength)
volatilityRatio = atr / atrSMA
isHighVol = volatilityRatio > volThreshold
ATR vs ATR SMA shows how wild price is relative to recent history.
Volatility ratio above the threshold flips isHighVol , which immediately trims risk.
An ATR percentile rank over the last 100 bars indicates calm versus chaotic regimes.
Daily ATR sampling via request.security() gives higher time-frame context for intraday sessions.
When volatility spikes the script dials position size down automatically instead of cheering for maximum exposure.
---
3. Market regime radar – Danger or Drift 🌊
ema20 = ta.ema(close, 20)
ema50 = ta.ema(close, 50)
ema200 = ta.ema(close, 200)
trendScore = (close > ema20 ? 1 : -1) +
(ema20 > ema50 ? 1 : -1) +
(ema50 > ema200 ? 1 : -1)
= ta.dmi(14, 14)
Regimes covered:
Danger : high volatility with weak trend.
Volatile : volatility elevated but structure still directional.
Choppy : low ADX and noisy action.
Trending : directional flows without extreme volatility.
Mixed : anything between.
Each regime maps to a 1–10 risk score and a multiplier that feeds the final position size. Danger and Choppy clamp size; Trending restores normal risk.
---
4. Behaviour engine – trader inputs matter 🧠
You provide:
Emotional state : Confident, Neutral, FOMO, Revenge, Fearful.
Confidence : slider from 1 to 10.
Toggle for behavioural adjustment on/off.
Behind the scenes:
Each state triggers an emotional multiplier .
Confidence produces a confidence multiplier .
Combined they form behavioralFactor and a 0–100 Behavioural Score .
High-risk emotions or low conviction clamp the final risk. Calm inputs allow normal size. The dashboard prints both fields to keep accountability on-screen.
---
5. Correlation guardrail – avoid stacking identical risk 📊
Optional correlation mode compares the active symbol to a reference (default AMEX:SPY ):
corrClose = request.security(correlationSymbol, timeframe.period, close)
priceReturn = ta.change(close) / close
corrReturn = ta.change(corrClose) / corrClose
correlation = calcCorrelation()
Absolute correlation above the threshold applies a correlation multiplier (< 1) to reduce size.
Dashboard row shows the live correlation and reference ticker.
When disabled, the row simply echoes the current symbol, keeping the table readable.
---
6. Position sizing engine – heart of the script 💰
baseRiskAmount = accountSize * (baseRiskPercent / 100)
adjustedRisk = baseRiskAmount * behavioralFactor *
regimeAdjustment * volAdjustment *
correlationAdjustment
finalRiskAmount = math.min(adjustedRisk,
accountSize * (maxRiskCap / 100))
stopDistance = atr * atrStopMultiplier
takeProfit = atr * atrTargetMultiplier
positionSize = stopDistance > 0 ? finalRiskAmount / stopDistance : 0
positionValue = positionSize * close
Outputs shown on the dashboard:
Position size in units and value in currency.
Actual risk % back on account after adjustments.
Risk/Reward derived from ATR-based stop and target.
---
7. Intelligent trade direction – bias without signals 🎯
Direction score ingredients:
EMA stack alignment.
Price versus EMA20.
RSI momentum relative to 50.
MACD line vs signal.
Directional Movement (DI+/DI–).
The resulting Trade Direction row prints LONG, SHORT, or NEUTRAL. No orders are generated—this is guidance so you only risk capital when the structure supports it.
---
8. Stop/target guide lines – two lines only ✂️
if showStopLines
if preferLong
// long stop below, target above
else if preferShort
// short stop above, target below
Lines refresh each bar to keep clutter low.
When the direction score is neutral, no lines appear.
Use them as visual anchors, not auto-orders.
---
9. Session Risk map – global volatility clock 🌍
Tracks Asian, London, and New York windows via UTC.
Computes average ATR per session versus global ATR SMA.
Labels each session High/Med/Low and colours the cells accordingly.
Top row shows the active session plus current UTC time so you always know the regime you are trading.
One glance tells you whether you are trading quiet drift or the part of the day that hunts stops.
---
10. Floating risk badge – honesty above price 🪪
Text ranges from Ultra Cautious through Very Aggressive.
Colour matches the risk palette inputs (High/Med/Low).
Updates on the last bar only, keeping historical clutter off the chart.
Account risk becomes impossible to ignore while you stare at price.
---
11. Education engine & warnings 📚
Rotates evergreen principles (risk 1–2%, journal trades, respect plan).
Triggers contextual warnings when volatility and risk % conflict.
Flags when emotional state = FOMO or Revenge.
Highlights sub-standard risk/reward setups.
When multiple danger flags stack, an AI-style warning overrides the tip text so you can course-correct before capital is exposed.
---
12. Alerts – hard guard rails 🚨
Excessive Risk Alert : actual risk % crosses custom threshold.
High Volatility Alert : ATR behaviour signals danger regime.
Emotional State Warning : FOMO or Revenge selected.
Poor Risk/Reward Alert : risk/reward drops below your standard.
All alerts reinforce discipline; none suggest entries or exits.
---
13. Multi-market behaviour 🕒
Intraday (1m–1h): session box and badge react quickly; ideal for scalpers needing constant risk context.
Higher time frames (1D–1W): dashboard shifts slowly, supporting swing planning.
Asset classes confirmed in validation: crypto majors, large-cap equities, indices, major FX pairs, and liquid commodities.
Risk logic is price-based, so it adapts across markets without bespoke tuning.
15. Key inputs & recommended defaults
Account Size : 10,000 (modify to match actual account; min 100).
Base Risk % : 1.0 with a Maximum Risk Cap of 2.5%.
ATR Period : 14, Stop Multiplier 2.0, Target Multiplier 3.0.
High Vol Threshold : 1.5 for ATR ratio.
Behavioural Adjustment : enabled by default; disable for fixed risk.
Correlation Check : optional; default symbol AMEX:SPY , threshold 0.7.
Display toggles : main dashboard, risk badge, session map, education panel, and stop lines can be individually disabled to reduce clutter.
16. Usage notes & limits
Indicator mode only; no automated entries or exits.
Trade history panel intentionally disabled (requires strategy context).
Correlation analysis depends on additional data requests and may lag slightly on illiquid symbols.
Session timing uses UTC; adjust expectations if you trade localized instruments.
HTF ATR sampling uses daily data, so bar replay on lower charts may show brief data gaps while HTF loads.
What does everyone think RISK really means?
CRAZY RAY RAY - Dashboard 1-5-15-1D + SMC + Clock + Candles PRO OANDA:XAUUSD This script is essentially your institutional "nuclear power plant" for scalping and swing trading: it combines the 1-5-15-1D dashboard, SMC, PRO candles, money flow times, institutional filters, Bull/Bear 12C, Liquidity HUD, Fibo Move, and Target Trend with SL + 3 TPs into a single indicator. 1. Dashboard 1–5–15–1D (Central HUD)
Calculates across 4 timeframes: 1m, 5m, 15m, and 1D:
Trend with EMAs 15/30/200.
RSI (strength >50 buy, <50 sell).
MACD (crossover in favor or against).
For each timeframe it shows:
TREND → BULLISH / BEARISH / NEUTRAL.
ACTION → BUY / SELL / WAIT.
If all 4 timeframes align:
MODE = BULLISH BUY
MODE = BEARISH SELL
Filters and displays on the HUD if buys or sells are blocked by SMC context (BLOCKED BUY / BLOCKED SELL).
Also draws 2 simple moving averages on the chart:
SMA 20 white (you can use it as a micro-trend).
SMA 200 red (macro trend and institutional reference).
2. Real-Time Clock + Trading Hours
Calculates the real time for:
New York / Miami
London
Tokyo
using current time and real time zone.
Also calculates GMT time to know which session is dominant.
Marks your trading hours:
LONDON 3:00–5:30 (London time) → goodLondon
NY OPEN 8:30–10:00 (NY time) → goodNYOpen
ASIA 20:00–23:00 (Tokyo) → goodAsiaScalp
Displays a message on the HUD:
LONDON 3:00–5:30 (1–2 TRADES)
NY OPEN 8:30–10:00 (1 TRADE)
ASIA 20–23 (SCALP)
NO TRADE ROLL / DEAD / LATE
ONLY A+ SETUPS (when not in strong trading hours).
3. Institutional Power (volume + ATR + session)
Filter that evaluates whether the moment is institutional or retail:
Checks:
If you are in a strong trading session (London / NY). If the volume is above the average × multiplier.
If the ATR is above the average × multiplier.
If it passes the filters → INST ON, otherwise → RETAIL ZONE.
Used internally to block buys/sells and for the HUD.
4. Micro-signal “NO RETRACEMENT” on 1m (BUY SR / SELL SR)
On the 1-minute timeframe, it detects a very aggressive entry:
Clean trend (15/30/200 EMAs aligned).
Price crosses the 200 EMA.
MACD turns in favor.
Marks on the candle:
BUY SR (buys without retracement below the EMA200).
SELL SR (sales without retracement above the EMA200).
This state is also reflected in the HUD as the “SR” row.
5. SMC Block: HH/HL/LH/LL + BMS + ChoCH + Fibo + Zones
This is the SMC brain of the script:
Detects swings with pivots:
Paints HH, HL, LH, LL (if you activate showHHLL).
Marks BOS (break of structure).
Marks BMS and ChoCH (with strong or weak filter using ATR, volume, MACD, gaps).
Draws:
Internal Fibo of the last range (38–50–61).
Fibo entry zone 38–78% as a green discount/premium box.
Institutional mitigation zones (simple OB type green/red boxes).
Current range with dotted yellow lines.
Calculates logic for:
antiStupidBuy: blocks purchases when the context is very bearish (LL–LL–LH, bearish ChoCH, premium, EQH, etc.).
antiStupidSell: symmetrical for sales.
From this comes:
allowBuyInst
allowSellInst
buyBlockerOn / sellBlockerOn
buyTrapDetected (BUY SR signal but context blocks it → BUY TRAP).
All this feeds the HUD and institutional alerts.
6. PRO Candles (candlestick + smart color)
Candlestick pattern system:
Detects:
Hammer, Inverted Hammer. Doji.
Strong bullish/bearish candle.
Bullish/bearish engulfing.
Uses a trend EMA to determine if the pattern is with or against the trend.
Colors the candles according to the pattern (if you enable useColorCandles).
Defines texts:
patternText (pattern name).
biasText (reversal, momentum, indecision).
Updates the HUD with the current pattern (“CANDLE: Engulf Bull”, etc.).
7. Institutional PRO Combo + Reversals
Connects everything:
fullBuySetup:
allowBuyInst TRUE (SMC + Fibo + mitigation OK).
Institutional candles in favor (engulfing, hammer, etc.).
MultiTF aligned (1m, 5m in favor, 15/1D not strongly against).
Strong session (London or NY).
No blockages.
fullSellSetup: the same for sales.
Marks on the chart:
BUY PRO, SELL PRO.
BUY REV LL → reversal from a LL, at Fibo discount, with an institutional candle and above EMA200.
SELL REV HH → reversal from HH, at Fibo premium, with an institutional candle and below EMA200.
And generates alerts for all of this.
8. Dynamic Main HUD
On barstate.islast, updates the HUD:
Changes “BUY / SELL” to:
BUY BLOCK / SELL BLOCK when the context blocks that direction.
Writes:
Current candle pattern.
Time message.
Global status:
BUY TRAP ❌, BUY REV LL ✅, SELL REV HH ✅, BUY PRO ✅, SELL PRO ✅,
BUY BLOCK, SELL BLOCK, BUY/SELL OK.
9. Bull/Bear 12C HUD (Small right HUD)
12-confirmation bull/bear engine:
Calculates:
Sweep, 5th leg, mitigation, HL/LH, strong BOS.
Volume pattern (high-low-high).
ATR rising.
MACD crossover.
Liquidity.
Fear & Greed (SMA50).
Gap/imbalance. Bull/Bear 180 weak.
Count how many are ON:
bullScore /12
bearScore /12
Define a regime:
INSTITUTIONAL → many confirmations + rvol + ATR.
NORMAL
RETAIL
Show on right HUD:
List 1 to 12 with green/red dots BULL / BEAR.
Summary: “Regime: INSTITUTIONAL / NORMAL / RETAIL”.
10. Liquidity HUD XAU SCALP
Calculates RVOL, normalized ATR, spread vs ATR, current range vs average range.
Generates score and classifies:
LOW / MED / HIGH / INS.
Only moves up one level if you are in London/NY session (depending on sessions)
🟡 GOLD 4H HUD v12 — Time-Safe Nuclear Edition🟡 GOLD 4H HUD v12 — Time-Safe Nuclear Edition
A full–scale Smart Money Concepts (SMC) analytics engine designed exclusively for XAUUSD on the 4-Hour timeframe.
This script combines market structure, liquidity, displacement, order blocks, imbalance, volume profile, SMT divergence, and institutional behavior modeling into a single unified HUD.
Built with a time-safe architecture, all structural elements (OB/FVG/Sweep) are stored by timestamp to minimize repainting and preserve event integrity.
📌 Core Features (12 Modules + Full HUD)
1 — Market Structure Engine
Automatically detects:
HH / HL / LH / LL
BOS (Break of Structure)
MSS (Market Structure Shift)
CHOCH (Change of Character)
Real swing pivots & trend state
2 — Sweep Engine (Liquidity Grab Detection)
Identifies institutional liquidity grabs:
Break + reclaim of highs/lows
ATR-filtered invalidation
Displacement-backed sweeps
3 — Time-Safe FVG Engine
Detects Bullish/Bearish Fair Value Gaps
ATR-tolerant FVG logic
Automatic right-extension
Auto-delete when filled or invalid
4 — Time-Safe Order Block Engine
Demand & Supply OB detection
Strength classification (Weak vs Strong)
FVG-overlap confirmation
Timestamp-locked (non-repainting)
5 — Volume Profile Engine (HVN / LVN / POC)
Real-time micro-profile:
High Volume Node (HVN)
Low Volume Node (LVN)
Point of Control (POC)
6 — SMT Engine (Gold vs DXY Divergence)
Smart Money Divergence built-in:
Bullish SMT
Bearish SMT
Directional confirmation with zero lag
7 — Displacement Engine
Measures institutional impulse:
Body-based impulse detection
Multi-leg continuation signals
FVG continuation moves
Generates displacement score
8 — Premium / Discount Model
Auto-classifies price into:
Discount (Buy zone)
Premium (Sell zone)
9 — SMC Trend Engine (Score-Based)
Combines 10+ factors:
Structure
FVG
OB power
Displacement
POC positioning
SMT conditions
Outputs:
BULL / BEAR / RANGE
Full scoring system
10 — Institutional Imbalance Model (IMB Engine)
Combines:
PD zones
Sweep direction
Displacement
SMT
OB strength
CHOCH/MSS
A complete institutional bias filter.
11 — Entry Engine (Signal Fusion Model)
Entry conditions fuse:
Sweep
CHOCH
Displacement
OB strength
FVG alignment
SMT confirmation
Also outputs:
Suggested SL/TP
Entry score
12 — Trendline Engine
Auto-draws:
HL → HL bullish trendlines
LH → LH bearish trendlines
+ Full Nuclear HUD
Displays:
Market structure
Trend direction
SMT / CHOCH / MSS
FVG / OB zones
HVN / LVN / POC
Liquidity strength
Entry model
Liquidity Magnet direction
SL/TP map
A complete institutional dashboard in one place.
⚠ Usage Requirement
This script is designed ONLY for the 4H timeframe.
✨ Summary
GOLD 4H HUD v12 — Time-Safe Nuclear Edition
is not just an indicator.
It is a full institutional-grade SMC analysis system, built specifically for Gold.
If you trade XAUUSD on the 4H timeframe —
this is your complete market intelligence HUD
Execution Heatmap v4.1 — AI EnhancedThis indicator is an AI‑style execution dashboard that compresses structure, momentum, volume, volatility, and risk into a compact heatmap panel plus BUY/SELL signals on the chart. It is specifically tuned for gold and silver, automatically adapting its thresholds to the volatility profile of XAU/GC and XAG/SI symbols.
Core architecture
The system builds a multi‑factor model in layers:
Adaptive structure engine: Tracks dynamic higher‑high / lower‑low progression using rolling reference highs and lows, classifying price as structural UP, DOWN, or NEUTRAL.
Precision VWAP bias: Uses VWAP with a small threshold band to filter out noise and label price as ABOVE, BELOW, or neutral relative to value.
Impulse & angle: Combines short‑term rate of change and normalized slope (price vs ATR over 5 bars) to detect directional thrust, then clamps values into
for stable scoring.
Volume, wicks, and patterns
Adaptive volume tiers: Uses a 20‑bar volume average with gold/silver‑specific multipliers to tag candles as SURGE, HIGH, NORMAL, or LOW volume, with distinct coloring for extremes.
Wick analytics: Measures upper/lower wick size vs total range to detect demand/supply style rejections and encode them as bullish or bearish wick signals.
AI pattern score: Blends structure, VWAP, impulse, wicks, and angle into a normalized pattern score, then classifies it as STRONG↑, NEU↑, NEU, NEU↓, or STRONG↓ with color‑coded emphasis.
AI scoring and prediction layer
Predictive engine: Uses a neural‑network‑style weighted sum of structure, VWAP, impulse, wicks, angle, volume, and pattern to generate a prediction score in
, then converts it into a percentage and arrow (↑, ↑↑, ↓, ↓↓, →) for intuitive directional bias.
Execution score: Aggregates key factors into an EXEC score (0–200+ style scale), color‑graded from weak (red) through medium (orange) to strong (green) execution context.
Uncertainty & risk: Separately models uncertainty (low impulse/angle or low conviction) and risk (fake breaks, VWAP position, uncertainty tier, low volume), then feeds them into a combined confidence calculation.
Final signal & confidence
Final classification:
BUY: High exec score, high confidence, and controlled risk.
SELL: Very low exec score, low confidence in upside, and acceptable risk.
WAIT: All other conditions where edge or clarity is insufficient.
Confidence bar: A textual mini‑bar (🟩 blocks) plus percentage shows how strong the current signal environment is, making it easy to visually gauge setup quality at a glance.
Professional heatmap panel
A two‑column table in the top‑right of the chart organizes the logic into layers:
Base layer: STRUCT, VWAP, IMPULSE, VOLUME.
AI layer: FAKE, REGIME (Trend/Pullback/Reverse/Chop), ANGLE.
Decision layer: PATTERN, PREDICT, EXEC, RISK, CONF, and FINAL direction.
Momentum Reversal / Dip Buyer [Score Based]Strategy Overview
Momentum Reversal / Dip Buyer is a quantitative reversal engine designed to fade stretched moves and buy dips / sell rallies when multiple momentum and context factors line up. It’s built for liquid instruments especially for ticker CME_MINI:ES1! and works best on intraday timeframes like the 5-minute or 1-minute chart.
Core Logic
This strategy builds a composite Momentum Score by combining:
Price Location: Relative to 100 SMA, 1000 EMA, and VWAP (trend / regime filter).
RSI: Overbought/oversold and mid-zone strength.
VWMO (Volume-Weighted Momentum): Direction and strength of volume-weighted price drift.
ADX: Trend strength filter (high vs low trend environment).
Full Stoch (%K): Short-term exhaustion and mean-reversion context.
CCI: Overbought/oversold turns (key trigger).
MFI: Volume-confirmed buying/selling pressure.
ATR Regime: High vs low volatility environment.
Cumulative Delta: Whether net aggressor flow is rising or falling.
From this, a single Momentum Score is computed each bar:
Longs: Taken when the score is depressed (scoreLow) and CCI crosses up from oversold.
Shorts: Taken when the score is elevated (scoreHigh) and CCI crosses down from overbought.
Risk Management & Trade Logic
Max Daily Trades: Hard cap on entries per day.
Hard Stop: Fixed % stop based on entry price.
Profit Target: Target ATR Multiplier × main ATR from entry.
Breakeven Logic: Optional; moves stop to breakeven (plus optional offset) after price moves a configurable multiple of the main ATR in your favor.
Trailing Stop (Separate ATR): Optional; uses its own ATR length and ATR-based trigger and distance. This lets you run slower ATR for targets while using a tighter, more reactive ATR for the trail.
Session Control
Trading Window: Optional session filter (e.g., 09:30–16:00). Entries are only allowed inside the defined window.
Force Flat at Session End: Option to automatically close all open positions when the session ends.
Visuals
The script plots entry arrows and a compact dashboard displaying: current Momentum Score, daily trade usage, and CCI status.
Disclaimer:
This script is for educational and research purposes only and is not financial advice. Past performance does not guarantee future results. Always forward-test and adjust parameters to your own risk tolerance and market.
Shoutout and all credit goes to AuclairsCapital for building the base foundation of this strategy on ThinkScript
Smart Money Tracker [Eˣ]💰 Smart Money Tracker - Free Indicator
Overview
The Smart Money Tracker helps you identify when institutional traders (banks, hedge funds, and large players) are actively buying or selling. By analyzing unusual volume patterns and price action, this indicator reveals hidden accumulation and distribution zones that often precede major price moves.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 What This Indicator Does
Tracks Institutional Activity:
• Detects when "smart money" is accumulating (buying) at support levels
• Identifies when institutions are distributing (selling) at resistance levels
• Shows real-time buying and selling pressure through volume analysis
• Highlights bars where unusual institutional activity is detected
Visual Signals:
• 🟢 Green Circles Below Bars = Accumulation Zone (institutions buying at lows)
• 🔴 Red Circles Above Bars = Distribution Zone (institutions selling at highs)
• Green Background Tint = Strong buying pressure detected
• Red Background Tint = Strong selling pressure detected
• Dashed Lines = Key institutional levels to watch
Money Flow Histogram:
• Shows buying vs selling pressure in real-time
• Scale from -100 (extreme selling) to +100 (extreme buying)
• Green bars = Net buying pressure
• Red bars = Net selling pressure
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 How To Use This Indicator
Basic Usage
1. Look For Accumulation Signals (🟢)
• Green circles appear when institutions are buying at support
• These zones often mark the end of pullbacks
• Price typically bounces from these levels
• Trading Signal: Consider long positions when accumulation appears at key support
2. Watch For Distribution Signals (🔴)
• Red circles appear when institutions are selling at resistance
• These zones often mark local tops
• Price typically reverses from these levels
• Trading Signal: Consider taking profits or short positions when distribution appears at resistance
3. Monitor The Pressure Histogram
• Values above +20 = Strong buying pressure (bullish)
• Values above +5 = Moderate buying pressure
• Values between -5 and +5 = Neutral/ranging
• Values below -5 = Moderate selling pressure
• Values below -20 = Strong selling pressure (bearish)
4. Check The Info Panel (Top Right)
• Status: Quick summary of current market pressure
• Pressure: Numerical value of buying/selling force
• Volume: Current volume status (High/Normal)
• Accumulation Count: Number of accumulation signals in last 20 bars
• Distribution Count: Number of distribution signals in last 20 bars
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💡 Trading Strategies
Strategy 1: Accumulation Bounce
1. Wait for green accumulation circle at support level
2. Confirm with positive money flow histogram
3. Enter long when price bounces from accumulation zone
4. Set stop loss below the accumulation level
Strategy 2: Distribution Reversal
1. Watch for red distribution circle at resistance
2. Confirm with negative money flow histogram
3. Consider taking profits on longs or entering shorts
4. Set stop loss above the distribution level
Strategy 3: Pressure Divergence
1. Price making new highs but histogram declining = Bearish divergence
2. Price making new lows but histogram rising = Bullish divergence
3. These often signal trend exhaustion and reversals
Strategy 4: Zone Confluence
1. When accumulation zones align with major support = High probability long
2. When distribution zones align with major resistance = High probability short
3. Multiple signals at same level = Institutional interest confirmation
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙️ Settings Explained
Volume Analysis Length (Default: 20)
• Lookback period for calculating average volume
• Lower values = More sensitive to recent volume spikes
• Higher values = Smoother, less sensitive to noise
• Recommended: 14-20 for day trading, 20-30 for swing trading
Smart Money Threshold (Default: 1.5)
• Multiplier for detecting "unusual" volume
• Lower values = More signals (more sensitive)
• Higher values = Fewer signals (only extreme volume)
• Recommended: 1.3-1.5 for volatile markets, 1.5-2.0 for calmer markets
Show Accumulation/Distribution Zones
• Toggle ON/OFF the dashed zone lines
• Keep ON to track key institutional levels
Show Smart Money Labels
• Toggle ON/OFF the zone labels
• Turn OFF for cleaner chart appearance
Show Pressure Histogram
• Toggle ON/OFF the money flow histogram
• Keep ON to see real-time pressure gauge
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎓 Understanding The Methodology
What Is "Smart Money"?
Smart money refers to institutional traders, banks, hedge funds, and large players who have significant capital and often move markets. These players:
• Buy during weakness (accumulation)
• Sell during strength (distribution)
• Create support and resistance zones
• Their activity precedes major moves
How The Indicator Detects Smart Money:
1. Volume Analysis: Compares current volume to average volume to detect unusual activity
2. Price Action: Analyzes candle closes, wicks, and position within the range
3. Context: Identifies if activity happens at key swing highs or lows
4. Flow Calculation: Measures directional volume flow (buying vs selling)
Why This Works:
• Institutions cannot hide large orders - they create volume spikes
• Accumulation at lows shows conviction in higher prices
• Distribution at highs shows institutions taking profits
• Following smart money increases probability of success
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📱 Alert Setup
This indicator includes 4 built-in alert types:
1. Accumulation Detected - Fires when institutions buy at support
2. Distribution Detected - Fires when institutions sell at resistance
3. Strong Buying Pressure - Fires when pressure histogram exceeds +30
4. Strong Selling Pressure - Fires when pressure histogram drops below -30
To Set Up Alerts:
1. Click the "Alert" button (clock icon) in TradingView
2. Select "Smart Money Tracker" from the indicator dropdown
3. Choose your alert condition
4. Configure notification settings
5. Click "Create"
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💎 Pro Tips
✅ Best Timeframes: Works on all timeframes, but most effective on 15min, 1H, 4H, and Daily
✅ Combine With: Support/resistance levels, trend indicators, or your existing strategy
✅ Volume Matters: Signals are stronger on higher timeframes with significant volume
✅ Multiple Signals: Repeated accumulation/distribution at same level = Strong institutional interest
✅ Market Context: Use alongside broader market trend analysis for best results
⚠️ Avoid: Low volume periods, major news events (false signals possible), and over-relying on single indicator
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 What Makes This Different?
Unlike basic volume indicators, Smart Money Tracker:
• Contextual Analysis - Doesn't just measure volume, but WHERE and HOW it occurs
• Visual Clarity - Instant visual feedback on institutional activity
• Multi-Layered - Combines volume, price action, and flow analysis
• Actionable - Clear zones and signals for trading decisions
• Professional Grade - Uses techniques from institutional trading desks
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📈 Upgrade Your Trading
This free indicator gives you institutional-level insights. Want more?
🔥 Check out my premium scripts for:
• Automated entry and exit signals
• Advanced multi-timeframe analysis
• Dynamic stop loss management
• Backtested strategies with performance stats
• And much more...
👉 Visit my profile to see all available tools!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📝 Notes
• This indicator works best as part of a complete trading system
• Always use proper risk management and position sizing
• Past performance does not guarantee future results
• Consider combining with other forms of analysis
• Test thoroughly on demo accounts before live trading
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🙏 Support This Work
If you find this indicator helpful:
• ⭐ Give it a thumbs up
• 💬 Leave a comment with your experience
• 🔔 Follow for more free tools and updates
• 🚀 Share with fellow traders
Questions? Drop a comment below and I'll help you out!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Developed with ❤️ for the TradingView community
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Version History
• v1.0 - Initial release with core smart money detection features
⚪ SILVER — RISK MATRIX + UQ vC (Final HUD)Silver RISK MATRIX + UQ vC is an advanced Pine Script v5 indicator for silver futures (SIL) trading, featuring a 3-column bottom-right HUD combining a 7-factor risk matrix with UQ predictive scoring. It quantifies position, structure, trend conflicts, impulse, volume, fake breaks, and VWAP deviation into total risk levels (LOW/MEDIUM/HIGH) while fusing predictive BUY/SELL probabilities with directional risk and multi-timeframe trend boosts.
Risk Matrix Breakdown
Position Risk
Measures % distance to 18-period support/resistance: <0.10% resistance = high risk (🟥🟥), <0.25% = medium (🟧⬜), <0.10% support = safe (🟩⬜). Silver-tuned for tight proximity sensitivity.
Structure Risk
Detects pivot-based CHoCH conflicts (close breaks prior HH/HL but structure opposes) or fake breaks, scoring 2 for conflicts using tight 2-left/2-right pivots suited to silver's volatility.
Other Factors
Trend Conf: 5m vs 30m EMA40 mismatch (2 points).
Impulse: Body >1.2x 4-period EMA abs body (exhaustion).
Volume: >3.2x/2.2x 20-SMA thresholds for extreme/obvious surges.
Fake Break: Wick >1.2x body (top/bottom).
VWAP: >1.2%/0.6% deviation. Total ≥6=HIGH (red), ≥3=MEDIUM (orange).
UQ Predictive Engine
Base Prediction
Averages flow (OBV+price), momentum (RSI/MFI), VWAP, trend (EMA20/50), turbo (BB width expansion) into pred_buy/sell (0-1 normalized).
Directional Risk
BUY risk weights fakeUp wicks, impulse, bear vol, low position; SELL mirrors. Clamped 0-1.
Trend Boost
Adds 15% for 2H alignment, 10% for 30m, 5% for VWAP (directional).
Final Fusion
BUY_FINAL = 55% pred + 25% risk + 20% boost; normalized vs SELL counterpart. Displays blocks (🟩🟩🟩🟩=≥80%) and stars (⭐⭐⭐⭐⭐=≥85%).
HUD Layout & Usage
20-row table separates RISK MATRIX (rows 1-10) from UQ (11-18): metric | visual box/block | Chinese explanation. Perfect for silver's high-volatility scalping, balancing exhaustive risk scanning with probabilistic edge quantification. Ready in both English and Chinese
YM Ultimate SNIPER v8.1# YM Ultimate SNIPER v8.1 - SNIPER STRICT EDITION
## 🎯 CHANGELOG: What's New in v8.1
### The Problem We Fixed
**GOD MODE was handing out awards like participation trophies.** Too many wicky, indecisive candles were getting GOD MODE status just because they had enough confluence points. A GOD MODE candle should show **CLEAR DOMINANCE** - fat body, minimal adverse wick, consistent pressure throughout formation.
---
## 🔥 MAJOR CHANGES
### 1. CANDLE DOMINANCE INDEX (CDI) - NEW METRIC
The CDI quantifies "who won the candle" on a 0-10 scale:
```
CDI COMPONENTS:
├── Body Score (0-4 pts): How fat is the body?
├── Adverse Wick Score (0-3 pts): How small is the wick against direction?
├── Favorable Wick Score (0-2 pts): Clean entry side?
└── Closing Strength (0-1 pt): Did it close near the extreme?
CDI RATINGS:
├── 8.0+ = 🔥 DOMINANT (ideal for GOD MODE)
├── 6.0-7.9 = ✓✓ STRONG
├── 4.0-5.9 = ✓ ACCEPTABLE
└── <4.0 = WEAK (not GOD MODE worthy)
```
### 2. STRICT GOD MODE GATES (6 GATES)
**Score alone no longer qualifies for GOD MODE.** Now a candle must pass ALL 6 gates:
| Gate | Requirement | Default |
|------|-------------|---------|
| **1. Score** | Must meet GOD MODE threshold | ≥9.0 |
| **2. Body** | Body ratio must be "fat" | ≥70% |
| **3. Adverse Wick** | Wick against direction must be small | ≤20% |
| **4. Delta** | Buy/sell dominance must be strong | ≥70% |
| **5. Session** | Must be in active session (configurable) | LDN/NY/PWR |
| **6. Pressure** | Intrabar pressure must be consistent | Same side dominated early AND late |
**If ANY gate fails, GOD MODE is DENIED** - even with a 10/10 score!
### 3. 30-BAR SIGNAL DISPLAY LIMIT
**Past signals are now hidden.** Only the last 30 bars show tier markers, sweeps, and absorption signals. This keeps the chart clean and focused on recent action.
```
WHAT'S HIDDEN AFTER 30 BARS:
├── Tier signals (S/A/B/Z)
├── GOD MODE markers
├── Liquidity sweep diamonds
├── Absorption crosses
└── Stop/Target lines
WHAT ALWAYS SHOWS:
├── FVG/IFVG zones (structural)
├── Order Blocks (structural)
├── Session markers (context)
└── Session background colors
```
**Configurable:** Change "Show Signals: Last N Bars" in settings (10-100)
### 4. PRESSURE CONSISTENCY TRACKING
New intrabar analysis that tracks if the **same side dominated throughout the candle**:
```
CANDLE FORMATION ANALYSIS:
├── First Half: Who dominated? (earlyBuyVol vs earlySellVol)
├── Second Half: Who dominated? (lateBuyVol vs lateSellVol)
└── Consistent? = Same side won BOTH halves
PRESSURE CONSISTENT = Buyers dominated early AND late
OR Sellers dominated early AND late
PRESSURE MIXED = Buyers dominated early, sellers late
OR Sellers dominated early, buyers late
```
**GOD MODE requires consistent pressure** when intrabar analysis is enabled.
### 5. GOD MODE DENIAL REASON IN TABLE
When a candle scores 9.0+ but fails a gate, the table now shows **WHY**:
```
DENIAL REASONS:
├── "DENIED: WICK" = Adverse wick too large (>20%)
├── "DENIED: DELTA" = Delta dominance too weak (<70%)
├── "DENIED: SESSION" = Not in active session
├── "DENIED: VOLUME" = Volume below 1.5x
└── "DENIED: PRESSURE" = Mixed pressure during formation
```
---
## 📊 NEW TABLE SECTIONS
### CANDLE QUALITY Section (NEW)
```
══ CANDLE QUALITY ══
Body | 78% | FAT
Adv Wick | 12% | CLEAN
CDI | 8.2/10 | 🔥
```
### INTRABAR Section (UPDATED)
```
══ INTRABAR ══
IB Data | 12 bars | ✓
IB Delta | 74% BUY | 🔥
Pressure | CONSISTENT | ✓ ← NEW
```
---
## ⚙️ NEW SETTINGS
### CANDLE DOMINANCE (v8.1) Group
```
GOD MODE: Min Body Ratio = 0.70 (body must be 70%+ of range)
GOD MODE: Max Adverse Wick = 0.20 (wick against direction ≤20%)
GOD MODE: Min Delta Dominance = 0.70 (70%+ buy/sell dominance)
GOD MODE: Min Intrabar Delta = 0.68 (intrabar delta ≥68%)
GOD MODE: Require Active Session = ON
GOD MODE: Require 1.5x+ Volume = ON
```
### SIGNAL DISPLAY (v8.1) Group
```
Show Signals: Last N Bars = 30
Show Historical FVG/OB Zones = ON (zones always visible)
```
---
## 🎯 PRACTICAL IMPACT
### Before v8.1 (Too Many False GOD MODE)
```
Candle: 35 point move, score 9.2, BUT:
- Body only 55% of range (thin)
- Upper wick 35% (buyers got pushed back hard)
- Intrabar showed mixed pressure
RESULT: GOD MODE ⚡ (WRONG!)
```
### After v8.1 (Strict GOD MODE)
```
Same candle: Score 9.2, but:
- Gate 2 FAILED: Body 55% < 70% required
- Gate 3 FAILED: Wick 35% > 20% allowed
- Gate 6 FAILED: Pressure inconsistent
RESULT: DENIED: WICK (Correct - this was a fake-out candle)
```
---
## 🏆 THE NEW GOD MODE STANDARD
A TRUE GOD MODE candle must show:
1. **HIGH SCORE** (≥9.0) - Multiple confluence factors aligned
2. **FAT BODY** (≥70%) - Clear directional commitment
3. **CLEAN WICKS** (≤20% adverse) - Minimal pushback
4. **STRONG DELTA** (≥70%) - One side clearly dominated
5. **IN SESSION** - Institutional participation
6. **CONSISTENT PRESSURE** - Same side controlled throughout
**Translation:** *"Institutions stepped in with size, pushed hard in one direction, and never let up. No hesitation, no give-back. This is a candle that means business."*
---
## 📈 YM/MYM OPTIMIZATION NOTES
The default settings are tuned for YM's characteristics:
- Lower volatility than NQ/GC/BTC → Tighter gates work better
- 50 pts for S-Tier is already conservative
- 70% body ratio filters out the indecisive noise
- Session requirement is crucial - YM moves on institutional flow
### Low Volume Conditions
The strict gates actually **help** in low volume:
- Wicky candles (common in low vol) get filtered
- Pressure consistency catches fake moves
- CDI prevents thin-body noise from triggering
---
## 🚀 QUICK START
1. Apply v8.1 to your 5-minute YM chart
2. Set intrabar to "1" (1-minute) or "100T" (tick)
3. Watch the CANDLE QUALITY section in the table
4. GOD MODE will now be RARE - but TRUSTWORTHY
5. Check the DENIAL reason if score is 9+ but no ⚡
---
*v8.1 SNIPER STRICT EDITION - "Fat Candles Only"*
*© Alexandro Disla*
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.
Momentum Structural AnalysisMomentum Structural Analysis (MSA‑style Oscillator)
This indicator implements a simple, MSA‑style momentum oscillator that measures how far price has moved above or below its own long‑term trend on the active timeframe, expressed in percentage terms. Instead of looking at raw price, it "oscillates" price around a timeframe‑appropriate simple moving average (SMA) and plots the percentage distance from that SMA as an orange line around a zero baseline. Zero means price is exactly at its structural trend; positive values mean price is extended above trend; negative values mean it is trading below trend.
The script automatically selects the SMA length based on the chart timeframe:
On daily charts it uses the configurable Daily SMA Length (default 252 trading days, roughly 1 year).
On weekly charts it uses Weekly SMA Length (default 208 weeks).
On monthly charts it uses Monthly SMA Length (default 120 months).
This approach is inspired by the ideas behind Momentum Structural Analysis (MSA), which studies where a market trades relative to long‑term moving averages and then treats the momentum line (the oscillator) as the primary object of analysis. The goal is to highlight structural overbought/oversold conditions and regime changes that are often clearer on momentum than on the raw price chart.
--------------------------------------------------
What the script computes and how it works
For each bar, the indicator:
Chooses an SMA length based on the current timeframe (daily/weekly/monthly).
Calculates the SMA of the close.
Computes the percentage distance:
\text{Diff %} = \frac{\text{Close} - \text{SMA}}{\text{SMA}} \times 100
Plots this Diff % as an orange line, with a dashed horizontal zero line as the base.
This produces a momentum oscillator that oscillates around zero and reflects the "structural" position of price versus its own long‑term mean.
--------------------------------------------------
How to use it on index charts (e.g., NIFTY50)
On indices like NIFTY50, use the indicator to see how stretched the index is versus its structural trend.
Typical uses:
Identify extremes: a). Historically high positive readings can signal euphoric, late‑stage conditions where risk is elevated. b). Deep negative readings can highlight panic/capitulation zones where downside may be exhausted.
Draw structural levels: a). Mark horizontal bands on the oscillator where past turns have occurred (e.g., +15%, −10%, etc. specific to NIFTY50). b). Watch how price behaves when the oscillator revisits these zones: repeated rejections can validate them as structural bounds; clean breaks can indicate a change of regime.
This is not a buy/sell signal generator by itself; it is a framework to understand where the index sits within its long‑term momentum structure and to support risk‑management decisions.
--------------------------------------------------
How to use it on ratio charts
Apply the same indicator to ratio symbols such as NIFTY50/GOLD, BANKNIFTY/NIFTY50, sector vs index, or any spread you plot as a ratio.
On a ratio chart:
The oscillator now measures relative momentum: how far that ratio is above or below its own long‑term mean.
High positive readings = strong outperformance of the numerator vs the denominator (e.g., equities strongly outperforming gold).
Deep negative readings = strong underperformance (e.g., equities structurally lagging gold).
This is very much in the spirit of MSA’s work on spreads between asset classes: it helps visualize major rotations (equities → gold, financials → commodities, etc.) and whether a relative‑performance trend is stretched, reverting, or breaking into a new phase.
--------------------------------------------------
Using multiple timeframes for better decisions
You can stack information across timeframes to get a more robust view:
Monthly : a). Use monthly charts to see secular/structural phases. b). Long multi‑year stretches above or below zero, and large bases or trendline breaks on the monthly oscillator, can mark major bull or bear cycles and big rotations between asset classes.
Weekly : a). Use weekly charts for the primary trend. b). Weekly structures (multi‑month highs/lows, channels, or trendlines on the oscillator) are useful for medium‑term positioning and for confirming or rejecting signals seen on the monthly view.
Daily : a). Use daily charts mainly for timing entries/exits once the higher‑timeframe direction is clear. b). Short‑term extremes on the daily oscillator that align with the larger weekly/monthly structure can offer better‑timed opportunities, while signals that contradict higher‑timeframe momentum are more likely to be noise.
--------------------------------------------------
Market Internals Dashboard: Trend, Breadth, Volume PressureOverview
The Market Internals Dashboard Pro is a professional-grade toolkit modeled after what prop firms and institutional desks use to understand real intraday market conditions.
Instead of relying solely on price, this indicator analyzes three critical internal forces:
USI:TICK : Microstructure buying/selling pressure
USI:ADD : Market breadth participation (advancers vs decliners proxy)
USI:VOLD : Volume pressure (buying vs selling volume)
These internals determine whether the market is:
Trending or ranging
Bullish or bearish
Likely to follow through or mean-revert
Favoring continuation trades or fade setups
The script also produces a Market Environment Score (–3 to +3) and a real-time Trade Recommendation Table that updates every bar. This helps answer the single most important question in intraday trading: “What type of trades should I be taking right now given current market conditions?”
1. TICK Proxy: Microstructure Pressure
Measures buying vs. selling aggressiveness across the market This proxy simulates the NYSE TICK index by evaluating whether bars close above or below the prior bar.
Positive TICK → Buyers lifting offers
Negative TICK → Sellers hitting bids
Neutral TICK → No microstructure conviction
Why it matters:
Strong TICK is often the earliest sign of:
Trend initiation
Algorithmic buy/sell programs
Shifts in short‑term sentiment
Weak or choppy TICK often signals:
Range conditions
Failed breakouts
Low‑quality trend attempts
2. ADD Proxy: Market Breadth Strength
Shows how many stocks are participating in a move Because real USI:ADD data isn't available for all users, this script uses a self-contained breadth approximation built from:
Price slope
Volatility expansion
Volume‑weighted directional pressure
Why it matters? Breadth reveals whether the move is:
Broad and healthy → likely to continue
Narrow and weak → vulnerable to reversal
Strong trends require strong breadth. Weak breadth often precedes:
Failed breakouts
Reversal setups
Chop (ewww)
3. VOLD Proxy: Volume Pressure
The most important internal of all. This proxy measures whether trading volume is flowing into up bars or down bars.
Positive VOLD → Net buying pressure
Negative VOLD → Net selling pressure
Why it matters:
VOLD is considered the "truth serum" of the tape:
Strong VOLD drives trend days
Negative VOLD kills long setups
Mixed VOLD creates chop
You should rarely trend trade against VOLD.
4. Market Environment Score (–3 to +3)
The Environment Score combines the three internals into a single view:
|| Score || Interpretation || Market Type ||
| +3 | Strong Bull | Trend Day (Long) |
| +2 | Bull | Pullback Buys / Breakout Continuation |
| +1 | Mild Bull | Conservative Long Scalps |
| 0 | Neutral | CHOP – VWAP Reversions / Fades |
| -1 | Mild Bear | Short Failed Breakouts |
| -2 | Bear | Trend Shorts / Breakdown Continuation |
| -3 | Strong Bear | Trend Day (Short) |
Why it matters:
The market behaves differently depending on internal alignment. This score prevents traders from:
Forcing trend trades on chop days
Chasing breakouts when breadth is weak
Fading strong directional days
It tells you in real time whether conditions favor:
Trend following
Mean reversion
Breakout continuation
Liquidity grabs
Or sitting out
5. Trade Recommendation Engine
Based on the Environment Score, the indicator outputs a real-time playbook recommending which trade types have the highest probability of success right now.
Examples:
Score = 0 (Neutral)
VWAP Reversions
Liquidity Grabs
Failed Breakouts
Quick Scalps
Score = +2/+3 (Strong Bull)
Pullback Buys
Breakout Continuation
Trend Longs
Score = -2/-3 (Strong Bear)
Pullback Shorts
Breakdown Continuation
Trend Shorts Only
This turns the internals into a trade selection engine, not just a data display.
Why Market Internals Matter
Most indicators look only at price, but price is the result, not the cause.
Market internals show:
Where volume is flowing
Whether buying is aggressive or passive
How many stocks are participating
Whether algorithms are supporting or fighting the move
This dashboard helps traders:
Avoid chop
Stay out of low‑quality setups
Time entries with institutional flows
Improve win rate by trading the right setups at the right times
Final Notes
Works on any symbol or timeframe
Fully customizable colors
Two clean visual tables: Internals + Trade Playbook
Ideal for futures, ETFs, and options day traders
If you enjoy this tool, please like, comment, or follow. More enhancements are coming.
Trade smart.
XAU Macro Regime + Mispricing OscillatorThis indicator is designed to measure the true macro environment behind gold (XAUUSD) and identify when price is aligned with macro flows or mispriced relative to them.
It combines a macro composite index, a mispricing spread oscillator, and automatic divergence detection into one tool.
1. Macro Composite Index (Regime Filter)
The top layer of the indicator constructs a macro regime score derived from:
A basket of gold FX pairs (XAUJPY, XAUAUD, XAUCHF, XAUNZD, XAUSGD)
The inverted DXY (to represent USD pressure on gold)
US30 (to capture global risk appetite and macro sentiment)
Each component is normalized and weighted, then combined into a composite macro index.
A smoothed baseline (SMA) is subtracted from this composite to form the Regime Line.
Interpretation
Regime > 0 (Green background):
Macro environment is supportive for gold.
XAUUSD is more likely to rise, consolidate, or mean revert upward.
Regime < 0 (Red background):
Macro environment is hostile for gold.
XAUUSD is more likely to fall, struggle, or mean revert downward.
This creates a macro trend filter that tells you when it is safer to prefer longs, shorts, or stay out.
2. Mispricing Spread Oscillator (Spread MACD)
The second layer measures the difference between XAUUSD and the macro composite index:
Spread = (Macro Composite) – (Normalized XAUUSD)
This spread is then smoothed into a signal line, and a histogram is plotted from their difference (MACD-style).
Interpretation
Spread > 0:
Gold is undervalued relative to macro conditions.
Macro strength > price strength.
Spread < 0:
Gold is overvalued relative to macro conditions.
Price strength > macro strength.
Spread crossing above signal:
Macro momentum turning bullish relative to price.
Spread crossing below signal:
Macro momentum turning bearish relative to price.
Green histogram: acceleration upward
Red histogram: acceleration downward
This oscillator captures mispricing, momentum shifts, and macro-pressure reversals.
3. Automatic Divergence Detection
The indicator automatically detects:
-Bullish Divergence-
XAUUSD makes a lower low
Spread makes a higher low
→ Price is weaker than macro reality → potential bullish reversal or mispricing reversion.
-Bearish Divergence-
XAUUSD makes a higher high
Spread makes a lower high
→ Price is stronger than macro reality → potential bearish reversal or exhaustion.
Labels (“Bull div” / “Bear div”) appear directly on the oscillator for clarity.
4. What The Indicator Seeks To Do
This indicator aims to answer the question:
“Is gold moving with the true macro pressure behind it, or diverging from it?”
Most gold indicators only watch XAUUSD price.
This one watches:
-gold cross-currency flows
-USD strength
-global risk sentiment
-gold’s relative position vs macro
-mispricing momentum
-divergence between price and macro reality
This creates a unique tool that:
-Detects when gold is overextended
-Detects when gold is undervalued
-Reveals hidden macro strength or weakness
-Highlights turning points and exhaustion
-Shows when a pullback is likely to end
-Shows when a rally is likely to fail
-Gives regime-aware trade direction (long vs short bias)
-Adds divergence labels for precision entries
FPT - DCA ModelFPT - DCA Model is a simple but powerful tool to backtest a weekly “buy the dip” DCA plan with dynamic position sizing and partial profit-taking.
🔹 Core Idea
- Invest a fixed amount every week (on Friday closes)
- Buy more aggressively when price trades at a discount from its 52-week high
- Take partial profits when price stretches too far above the daily EMA50
- Track the performance of your DCA plan vs a simple buy-and-hold from the same start date
⚙ How it works
1. Weekly DCA (on Daily timeframe)
- On each Friday after the Start Date:
- Add the “Weekly contribution” to the cash pool.
- If the close is below the “Discount from 52W high” level:
→ FULL DCA: use the full weekly contribution + an extra booster from your stash (up to “Max extra stash used on dip”).
→ Marked on the chart with a small green triangle under the bar.
- Otherwise:
→ HALF DCA: invest only 50% of the weekly contribution and keep the other 50% as stash (uninvested cash).
→ Marked with a small blue triangle under the bar.
2. 52-Week High Discount Logic
- The script computes the 52-week high as the highest daily high of the last 252 trading days.
- The “discount level” is: 52W high × (1 – Discount%).
- When price is at or below this level, dips are treated as buying opportunities and the model allocates more.
3. Selling Logic (Partial Take Profit)
- When the close is above the daily EMA50 by the selected percentage:
→ Sell the given “Sell portion of qty (%)” of your current holdings.
→ Marked with a small red triangle above the bar.
- This behaves like a gradual profit-taking system: if price stays extended above EMA50, multiple partial sells can occur over time.
📊 Panel (top-right)
The panel summarizes the state of your DCA plan:
- Weeks: number of DCA weeks since Start Date
- Total deposit: total money contributed (sum of all weekly contributions)
- Shares qty: total number of shares accumulated
- Avg price: volume-weighted average entry price
- Shares value: current market value of all shares (qty × close)
- Cash: uninvested cash (including saved stash)
- Total equity: Shares value + Cash
- DCA % PnL: performance of the DCA plan vs total deposits
- Stock % since start: performance of the underlying asset since the Start Date
✅ Recommended Use
- Timeframe: Daily (the DCA engine is designed to run on daily bars and Friday closes).
- Works best on stocks, ETFs or indices where a 52-week high is a meaningful reference.
- You can tune:
- Weekly contribution
- Discount from 52W high
- Booster amount
- EMA50 extension threshold and sell portion
⚠ Notes & Disclaimer
- This script is a backtesting and educational tool. It does not place real orders.
- Past performance does not guarantee future results.
- Always combine DCA and risk management with your own research and judgment.
Built by FPT (Funded Pips Trading) for long-term, rules-based DCA planning.
Rakesh's Ultimate Trading SystemKey Features:
1. Multi-Confirmation System
5 total signals working together:
MTF Supertrend (Monthly + Weekly + Daily alignment)
Ichimoku Cloud (Price vs Cloud + Tenkan/Kijun cross)
Gann HiLo Activator (Trend direction)
Darvas Box (Breakout/Breakdown)
Current timeframe Supertrend
2. Smart Signal Generation
You set minimum confirmations (1-5) needed for a signal
STRONG BUY = When X out of 5 indicators confirm bullish
STRONG SELL = When X out of 5 indicators confirm bearish
Shows confirmation count on each signal label (e.g., "4/5")
3. Comprehensive Dashboard
Shows real-time status of:
✓ Each indicator's current signal
✓ Overall market direction
✓ Bullish vs Bearish confirmation count
✓ Color-coded for quick decision making
4. All Indicators Plotted
Ichimoku Cloud - Green/Red cloud with Tenkan/Kijun lines
Gann HiLo - Dynamic support/resistance line
Darvas Box - Top and bottom box levels
Background colors - Show breakouts and overall trend
5. Built-in Alerts
Automatic alerts when strong buy/sell signals trigger
Shows how many confirmations fired
How to Use:
Conservative Trading (Recommended):
Set "Minimum Confirmations" to 4 or 5
Only trade when almost all indicators align
Fewer signals but higher probability
Moderate Trading:
Set to 3 confirmations
Balanced approach - good signals, not too rare
Aggressive Trading:
Set to 2 confirmations
More signals but require your own filtering
Customization Options:
All indicators can be toggled on/off:
Show/hide individual Supertrend timeframes
Show/hide Ichimoku Cloud
Show/hide Gann HiLo
Show/hide Darvas Box
Show/hide Dashboard
Adjustable parameters for each indicator:
Supertrend: ATR period, Factor
Ichimoku: Tenkan, Kijun, Senkou periods
Gann: HiLo period
Darvas: Box length
Trading Strategy Examples:
1. Ultra-Safe Entry:
Wait for 5/5 confirmations
Enter on next candle
Use Gann line as stop-loss
2. Breakout Trading:
Watch for Darvas Box breakout
Confirm with 3+ other indicators
Ride the trend
3. Trend Following:
MTF Supertrend shows main trend
Use Ichimoku cloud for support/resistance
Enter on Gann/Darvas confirmations
This is a professional-grade system, Rakesh! It filters out false signals by requiring multiple confirmations. Much more refined than single-indicator systems! 🚀
Want me to adjust anything or add more features?Ris this also for tradingviewYes, absolutely! This is 100% for TradingView, just like the first one!
How to Add This to TradingView:
Same steps as before:
Copy the code from the artifact above
Go to TradingView.com
Open Pine Editor (bottom of chart)
Click "Open" → "New blank indicator"
Paste the code
Click "Save" and name it (e.g., "Advanced MTF System")
Click "Add to Chart"
What You'll See on Your Chart:
✅ Ichimoku Cloud - Green/Red cloud visualization
✅ Gann HiLo Line - Green when bullish, Red when bearish
✅ Darvas Box - Box top and bottom levels
✅ Buy/Sell Labels - "STRONG BUY 4/5" or "STRONG SELL 3/5"
✅ Dashboard Table - Top right corner showing all indicator statuses
✅ Background colors - Subtle green/red when strong signals appear
It Works With:
✅ Stocks (NSE, BSE, US markets)
✅ Forex
✅ Crypto
✅ Commodities
✅ Indices (Nifty, Bank Nifty, etc.)
Settings Panel:
When you add it to chart, click the ⚙️ settings icon to customize:
Toggle indicators on/off
Adjust minimum confirmations (2, 3, 4, or 5)
Fine-tune each indicator's parameters
Regime MapRegime Map — Volatility State Detector
This indicator is a PineScript friendly approximation of a more advanced Python regime-analysis engine.
The original backed identifies market regimes using structural break detection, Hidden-Markov Models, wavelet decomposition, and long-horizon volatility clustering. Since Pine Script cannot execute these statistical models directly, this version implements a lightweight, real-time proxy using realised volatility and statistical thresholds.
The purpose is to provide a clear visual map of evolving volatility conditions without requiring any heavy offline computation.
________________________________________
Mathematical Basis: Python vs Pine
1. Volatility Estimation
Python (Realised Volatility):
RVₜ = √N × stdev( log(Pₜ) − log(Pₜ₋₁) )
Pine Approximation:
RVₜ = stdev( log(Pₜ) − log(Pₜ₋₁), lookback )
Rationale:
Realised volatility captures volatility clustering — a key characteristic of regime transitions.
________________________________________
2. Regime Classification
Python (HMM Volatility States):
Volatility is modelled as belonging to hidden states with different means and variances:
State μ₁, σ₁
State μ₂, σ₂
State μ₃, σ₃
with state transitions determined by a probability matrix.
Pine Approximation (Z-Score Regimes):
Zₜ = ( RVₜ − mean(RV) ) / stdev(RV)
Regime assignment:
• Regime 0 (Low Vol): Zₜ < Zₗₒw
• Regime 1 (Normal): Zₗₒw ≤ Zₜ ≤ Zₕᵢgh
• Regime 2 (High Vol): Zₜ > Zₕᵢgh
Rationale:
Z-scores provide clean statistical boundaries that behave similarly to HMM state separation but are computable in real time.
________________________________________
3. Structural Break Detection vs Rolling Windows
Python (Bai–Perron Structural Breaks):
Segments the volatility series into periods with distinct statistical properties by minimising squared error over multiple regimes.
Pine Approximation:
Rolling mean and rolling standard deviation of volatility over a long window.
Rationale:
When structural breaks are not available, long-window smoothing approximates slow regime changes effectively.
________________________________________
4. Multi-Scale Cycles
Python (Wavelet Decomposition):
Volatility decomposed into long-cycle (A₄) and short-cycle components (D bands).
Pine Approximation:
Single-scale smoothing using long-horizon averages of RV.
Rationale:
Wavelets reveal multi-frequency behaviour; Pine captures the dominant low-frequency component.
________________________________________
Indicator Output
The background colour reflects the active volatility regime:
• Low Volatility (Green): trending behaviour, cleaner directional movement
• Normal Volatility (Yellow): balanced environment
• High Volatility (Red): sharp swings, traps, mean-reversion phases
Regime labels appear on the chart, with a status panel displaying the current regime.
________________________________________
Operational Logic
1. Compute log returns
2. Calculate short-horizon realised volatility
3. Compute long-horizon mean and standard deviation
4. Derive volatility Z-score
5. Assign regime classification
6. Update background colour and labels
This provides a stable, real-time map of market state transitions.
________________________________________
Practical Applications
Intraday Trading
• Low-volatility regimes favour trend and breakout continuation
• High-volatility regimes favour mean reversion and wide stop placement
Swing Trading
• Compression phases often precede multi-day trending moves
• Volatility expansions accompany distribution or panic events
Risk Management
• Enables volatility-adjusted position sizing
• Helps avoid leverage during expansion regimes
________________________________________
Notes
• Does not repaint
• Fully configurable thresholds and lookbacks
• Works across indices, stocks, FX, crypto
• Designed for real-time volatility regime identification
________________________________________
Disclaimer
This script is intended solely for educational and research purposes.
It does not constitute financial advice or a recommendation to buy or sell any instrument.
Trading involves risk, and past volatility patterns do not guarantee future outcomes.
Users are responsible for their own trading decisions, and the author assumes no liability for financial loss.
Extended SOPR Indicator - SSOPR Tops (A/B toggle)Extended SOPR Indicator — SSOPR Tops and Lows (A/B toggle)
Observation-only. Data: Glassnode SOPR.
Overview
This indicator extends the classical SOPR (Spent Output Profit Ratio) to improve readability and reduce noise on charts. SOPR measures whether coins moved on-chain were spent at a profit or at a loss. In brief: SOPR > 1 → spending at profit; SOPR < 1 → spending at loss. SSOPR (from "Smoothed SOPR") applies optional log transform (centers baseline at 0), smoothing (standard or adaptive), and adds structured signals: Z‑score lows (capitulation), buy zones , and top detection after prolonged elevation.
Why extend SOPR? (SSOPR vs classical SOPR)
• Noise reduction: Raw daily SOPR can whipsaw around its baseline. SSOPR uses smoothing and (optionally) adaptive smoothing so regimes are visible without overfitting.
• Better readability: The log transform shifts the break-even line to 0, making “profit territory” (above 0) and “loss territory” (below 0) visually intuitive on oscillators.
• Actionable context: Z‑score highlights extreme lows (capitulation risk), a simple buy-zone threshold marks potential accumulation, and a structured top pattern (with a time factor) helps frame distribution phases after sustained elevation.
What the script plots
• Smoothed SOPR (SSOPR): An orange line representing the smoothed SOPR (with optional log transform and optional adaptive smoothing).
• Top markers: A red triangle appears once at the onset of a confirmed top pattern.
• Background shading:
– Soft green: Buy zone when SSOPR falls below the “Buy Threshold.” (+ Z‑score capitulation zones (extreme lows)).
– Soft red: Top‑zone shading when the top criteria are met but before the single triangle fires.
Inputs & parameters
• Smoothing Length (default 14): Base window for smoothing SSOPR. Higher values = smoother, slower response.
• Apply Log Transform (default ON): Uses log(SOPR) so the baseline is 0 (log(1)=0). Above 0 → net profit regime; below 0 → net loss regime.
• Adaptive Smoothing (default OFF): Expands smoothing length as volatility rises using a standard deviation proxy; reduces whipsaws while preserving structure.
• Z‑score Threshold for Lows (default −2.5): Highlights capitulation zones when SSOPR deviates far below its rolling mean.
• SSOPR Buy Threshold (default −0.02): Simple rule-of-thumb level for potential accumulation context when below (log scale).
• SSOPR Top Threshold (default +0.005): Minimum elevation required for “profit territory” when assessing tops (log scale).
• Min Bars Above Threshold Before Top (default 50): Ensures prolonged elevation before calling a top.
• Lookback for Peak Detection (default 50): Window used to locate the recent high.
• Drop % from Peak to Confirm Top (default 5%): Confirms the start of distribution from a local high.
• Highlight Background : Toggles shaded zones.
Top detection (indicator-only)
A top fires when ALL of the following are true:
SSOPR spent at least Min Bars Above Threshold above the Top Threshold (sustained elevation).
The rising phase test passes (Option A or B; see below).
A drop from the local peak exceeds Drop % within the Lookback window.
The peak occurred in profit territory (SSOPR > Top Threshold).
To avoid repeated signals during the decline, the script emits the triangle once, at onset.
Rising‑phase switch: Option A vs Option B
• Option A — Up‑step ratio : Over the last A: Bars for Rising Check (default 50), it requires that at least A: Required Up‑Step Ratio (default 60%) of bars were rising (each bar compared to the previous). This favors gradual, persistent advances and filters out “choppy” lifts.
• Option B — Net slope : Compares current SSOPR to its value B: Bars Back for Net Slope ago (default 50). If higher, the series is considered rising. This is simpler and reacts faster in volatile phases but can admit brief pseudo‑trends.
Guidance : Prefer A for conservative confirmation in slow, persistent cycles; use B when trend moves are strong and you need timely detection.
Interpretation guide
• Regimes (log view): Above 0 → spending at profit; below 0 → spending at loss.
• Capitulation lows: When Z‑score < threshold, conditions often reflect forced/liquidity‑driven spending. Treat as context, not signals.
• Buy zone: SSOPR < Buy Threshold flags potential accumulation conditions (combine with price structure).
• Tops: After prolonged elevation, a confirmed top often coincides with profit‑taking/distribution phases.
Recommended timeframes
• Daily : Code optimized for daily timeframe.
Method summary
• SSOPR source: GLASSNODE:BTC_SOPR (via request.security ).
• Optional log transform: sopr → log(sopr) to normalize around 0.
• Smoothing: SMA over Smoothing Length , optionally adaptive using local volatility (std dev).
• Z‑score: (SSOPR − mean) / std dev, highlighting extreme lows.
• Top: Requires long elevation above Top Threshold , rising‑phase (A/B), and a subsequent drop > Drop % from recent high.
Limitations & notes
• SOPR reflects on‑chain movements; some activity occurs off‑chain (exchanges, internal transfers). Not all moves imply sale; aggregation makes it a usable proxy for profit/loss realization.
• Higher smoothing reduces noise but delays signals; adaptive smoothing can help but is still a trade‑off.
• Treat thresholds as context markers. They are not entry/exit signals by themselves.
• Use with price structure, volume, and other on‑chain indicators (e.g., realized price bands, dormancy/CDD) for confluence.
How to use (examples)
• Advance holding above 0 (log view): Retests of 0 from above that hold—while SSOPR remains elevated—often mark absorption; look for Top conditions only after sustained elevation and a confirmed drop from peak.
• Downtrend below 0: Rejections near 0 can align with continued loss realization; extreme Z‑score lows suggest capitulation risk—context for accumulation, not a blind buy.
Recommended settings
• Weekly: Log ON, Smoothing Length 14–30, Adaptive ON, Buy Threshold −0.02, Top Threshold +0.005, Rising Method A, Min Bars 50.
• Daily: Log ON, Smoothing Length 14–20, Adaptive OFF or ON (depending on noise), Rising Method B for timely slope checks.
Credits & references
• SOPR metric: Renato Shirakashi; documentation: Glassnode , CryptoQuant , overview: Bitbo .
Disclaimer
This script is for research/education on market behavior. It is not financial advice. Indicators provide context; decisions remain your responsibility.
Tags
bitcoin, btc, on‑chain, sopr, ssopr, glassnode, oscillator, regime, distribution, capitulation






















