PDH/PDL/PDC + VA(40%)Plots previous day high and low, pre- market high and low previous day close and high volume area of previous day
Puntos pivote y niveles
ES/NQ Levels: ON / PD(RTH) / PW / PM + ATH (NY)Simple script adding lines for
Overnight high
Overnight low
Previous day high
Previous day low
Previous week high
Previous week low
Previous month high
Previous month low
All time high
You can enable/disable each one and select the color.
Only works on futures.
GoldBlock Hunter [v1.1]GoldBlock Hunter
GoldBlock Hunter is an automated price action tool designed specifically for the volatility of XAUUSD (Gold). It identifies high-probability reversal zones by detecting significant market structures (Swing Highs and Swing Lows) and visualizing them as actionable Buy or Sell zones.
Unlike standard support/resistance indicators that clutter the chart with infinite lines, GoldBlock Hunter features a Smart Mitigation System. It actively tracks every zone—extending it into the future until price returns to test it. Once a zone is "mitigated" (touched by price), it automatically updates its visual style (turning gray) or removes itself, ensuring you only focus on fresh, untested levels.
Key Features:
Automated Zone Detection: Instantly marks potential Supply (Sell) and Demand (Buy) areas based on customizable Pivot Point logic.
Smart Mitigation Tracking: Zones dynamically extend to the right. When price revisits a zone, the indicator detects the "mitigation" and grays out the box to signal it has been used.
Clean Chart Logic: Automatically invalidates and removes zones if price breaks through them aggressively, keeping your workspace distraction-free.
Customizable Sensitivity: Adjustable "Lookback" (Left/Right Bars) settings allow you to tune the script for scalping (tight pivots) or swing trading (major structures).
How to Use:
Identify Fresh Zones: Look for Green (Buy) or Red (Sell) boxes extending to the right. These are untested areas where price is likely to react.
Wait for Mitigation: Use the box boundaries as potential entry zones for reversals.
Filter Noise: Adjust the Left Bars setting to 5 or higher to filter out minor chops and focus on major market turning points.
Price Converter [S1S2]Price Converter displays the price of multiple instruments in real time and supports ETH.
By default, it's configured for the /ES chart to follow any conversation about bkbrown's PDVR theory, where multi-market confluence is critical*, but you can use it on any chart for any purpose.
Inspired by PtGambler 's original price conversion script, this Price Converter introduces a few key differences and cosmetic changes:
1. The SPY price used for conversion is the last available price in ETH.
This is critical to keep the price labels accurate during and after big overnight moves.
2. The proxy instrument used for SPX price conversion outside RTH is SPX500USD, but you can change it with anything you prefer.
3. By default, the script can show 5 different instruments: /ES, /NQ, SPX, SPY, and QQQ.
On top of it, it allows you to display a 6th custom instrument.
4. You can set two different offsets: one for intraday intervals and one for daily/weekly/monthly intervals.
The script will automatically choose the right one based on your chart's configuration.
5. Horizontal line have been removed and price labels' colors have been modified to offer a less cluttered experience.
6. The script's control panel has been completely re-organized.
7. The script is updated to Pine v6
*If you trade with the PDVR theory, this script is an ideal complement to the PDVR Trading System 1.0 script.
AssafAlgos - MTF S/R AssafAlgos – MTF Support & Resistance
Description:
The AssafAlgos MTF Support & Resistance indicator automatically identifies key pivot high and low levels across multiple timeframes, helping traders visualize important support and resistance zones on their charts. It is designed to be flexible, non-repainting, and easy to customize for different trading styles.
Features:
Detects pivot highs and lows on the current timeframe as well as multiple higher and lower timeframes: Daily, 4H, 1H, 30m, 15m, and 5m.
Automatically removes overlapping levels using an ATR-based distance filter to show only significant S/R zones.
Adjustable line width for better visibility on the chart.
Optional labels to identify timeframe of each S/R level.
Fully customizable colors for each timeframe.
Works seamlessly on any market (forex, crypto, stocks).
Inputs:
Left & Right Bars: Determines pivot calculation window.
Line Width: Adjust the thickness of S/R lines.
Show Labels: Toggle display of timeframe labels.
ATR Length & Merge Distance: Customize filtering of overlapping levels.
Timeframe Selection: Choose which S/R levels to display.
Colors: Customize each timeframe’s line color.
Usage:
Use this indicator to:
Identify key support and resistance zones for entries, exits, or stop placements.
Confirm trend reversals or breakouts.
Trade with higher confidence using multi-timeframe S/R analysis.
8:00 ET 15m Candle High/Low/MidIt builds the true High/Low of the full 8:00–8:15 ET window and then prints the lines right after 8:15.
Best used on 1m or 5m (or 15m). If you put it on 30m/1h, it can’t isolate that 15m candle cleanly.
Box Theory LITEUnlock clean, essential market structure visualization with Box Theory LITE, a lightweight Pine Script® v6 overlay built for day/swing traders on futures (ES, NQ, MES), stocks (SPY, TSLA, AAPL), indices, and more. This free edition delivers core daily levels without signals or complexity—perfect for spotting support/resistance, trend bias, and volatility at a glance.
Key Features:
Previous Day Range Box: Semi-transparent yellow box framing yesterday's high/low (PDH/PDL), extended right to project potential breakout/reversal zones.
Flexible Session Toggle: Switch between Regular Trading Hours (RTH 0930-1600) and Global/Globex (1800-1700 or custom) with one click — instantly adapt the box, PDH/PDL, and Opening Range to RTH or full-session data.
Opening Range (OR): Plots high/low from the chosen session open — ideal for early bias, breakouts, or mean reversion setups.
Refined S/R Levels: Pivot highs/lows + multi-timeframe swings (hourly white, 4H aqua/fuchsia) for layered confluence across timeframes.
Trend & Volatility Tools: Customizable EMAs (up to 3 periods), Bollinger Bands (squeeze/expansion detection), and daily-resetting VWAP (volume-weighted fair value).
Fully Customizable: Toggle any element on/off, adjust colors, line widths, pivot/EMA lengths, box extension bars, session times, and more to match your setup.
Clean & Efficient: Optimized for smooth performance on all timeframes with limited objects (max lines/boxes respected).
Great for beginners building structure awareness or pros wanting a no-clutter foundation. No alerts, entries, backtesting, or signals—this is pure visual analysis.
For advanced upgrades—including automated entry/exit signals, manipulation filters, dynamic SL/TP projections, alert conditions, performance stats, and ticker-specific presets—check out Box Theory PRO (available now).
Notes & Disclaimer
Use for informational/educational purposes only. Trading involves substantial risk of loss; past performance ≠ future results. Not financial advice. Combine with your own strategy and risk management.
How to Use
Add to Chart
Search “Box Theory LITE” in TradingView’s Indicators (free & public). Apply to any chart.
Customize Inputs
Session Toggle: Turn ON for Regular (RTH) session, OFF for Global/Globex — or edit the exact times directly in settings.
Toggles: Show/hide Daily Box, OR Levels, Pivots/Swings, EMAs, BB, VWAP.
Box: Extension bars (default 20), color/transparency.
Styles: Line width, colors (PDH red, PDL green, OR blue/purple, etc.), mid-line style.
Parameters: Pivot length, EMA periods (50/20/100 default), BB length/multiplier.
Quick Interpretation
Yellow Box + PDH/PDL lines: Core daily range (RTH or Globex depending on toggle) — price often respects/breaks these.
OR High/Low: Early session structure (matches your toggle choice) — breakouts signal momentum, failures suggest reversal.
Pivots & Swings: Multi-TF confluence for stronger zones (aqua pivot highs, teal/orange lows, white hourly, fuchsia 4H).
EMAs: Trend filter (price above cluster = bullish bias).
Bollinger Bands: Volatility gauge — squeezes precede big moves.
VWAP: Intraday fair value — above = bullish control, below = bearish.
Workflow Tips
Start with the daily box/OR (toggle session to match your trading style) → layer swings/pivots for high-prob zones → use EMAs/BB/VWAP to filter direction/volatility. Toggle off unused features for cleaner charts. Best on intraday (1m–1h) for futures/indices, but flexible for any timeframe.
Questions, bugs, or feature requests? Message me on TradingView. Happy trading—stay disciplined!
PerceptionThings to keep in mind :-
1. The daily close should not be on Settlement.
2. Only visible on 1 minute or above and not on seconds timeframe.
3. Use standard candlesticks and not Heikin Ashi or any thing else.
Trend ZigZag by LANZ🔷 Trend ZigZag by LANZ - is an overlay indicator designed to read market structure through four main modules:
ZigZag legs (visual swing-to-swing path)
Market Structure Ranges (two horizontal “active range” lines built from confirmed pivots, locked until a close breaks them)
MTF Panel (shows “Before / Now / Date” structure states across up to 4 timeframes)
Maker + Fibonacci Swing-to-Swing module (detects the farthest internal swing inside the active range and anchors Fib levels with an optional “discount lock” logic)
It is not a strategy (no orders). Everything is visual + state tracking.
ZigZag module (📉📈 ZigZag)
Goal: Detect swing points and draw legs between them.
Key inputs
Show ZigZag: Turns the ZigZag legs ON/OFF.
TimeFrame (tf): Timeframe used to build the ZigZag.
If empty → uses chart timeframe.
If set → pivots are built on that resolution and projected on your chart.
Swing High / Low (prd): Sensitivity (min 2).
Higher = fewer swings (more smoothing).
Lower = more swings (more detail).
Colors / Width / Style: Visual styling of ZigZag legs.
How it works (important behavior)
The script computes pivot candidates using a dynamic window (len) and:
Swing High when the current bar is the highest in that window.
Swing Low when the current bar is the lowest in that window.
The last pivot can be updated (moved) if price makes a more extreme high/low before a direction flip is confirmed.
✅ This is normal for ZigZag logic.
⚠️ It means the most recent swing can “shift” until confirmed.
What you see on chart
When ON: legs connect the latest swing points.
When OFF: it still draws a dotted last leg (your code intentionally keeps a dotted reference).
Structure module 📉📈
Goal: To define a current active price range and determine whether price movement represents trend continuation or trend reversal.
Key inputs
Enable or disable structure lines.
Show live labels at the right edge of the range.
Control line appearance and how much historical structure remains visible.
How the active range is created:
A new structure range is created only when:
A swing is confirmed and price changes direction.
There is sufficient swing history to define a meaningful range.
Once created:
Two horizontal levels appear:
Upper boundary (range high)
Lower boundary (range low)
This range becomes active and locked, extending forward in time.
The range remains unchanged until price closes outside one of its boundaries.
How breaks are confirmed:
Only the candle close is considered.
Wicks touching or crossing the level are ignored.
BOS vs ChoCh logic:
Breaks are classified based on the direction of the previous confirmed break:
Upward break:
Previous break was upward (or none) → BOS (trend continuation)
Previous break was downward → ChoCh (trend change)
Downward break:
Previous break was downward (or none) → BOS
Previous break was upward → ChoCh
What happens visually on a break:
The boundary that price breaks through is kept and recolored.
The opposite boundary is removed.
A label appears (if enabled):
BOS labels are centered within the range.
ChoCh labels appear near the start of the range.
Live edge labels are removed to avoid clutter.
The range is released and the system waits for the next structure to form.
Right Tag behavior:
While a range is active:
Each boundary shows a live label indicating what type of event a break would currently produce:
“BOS” if it would continue the trend.
“ChoCh” if it would reverse the trend.
MTF Panel (⏱️ MTF Panel)
Goal: To provide a multi-timeframe overview of market structure without drawing structure lines on those timeframes.
Panel fields
TF: Timeframe represented:
Before: The previous confirmed structural event.
Now: The current state.
Date: When the current state last changed.
Behavior when no range is active:
Last Event mode: keeps showing the last confirmed BOS or ChoCh.
Waiting mode: displays “Waiting” until a new event appears.
State logic (conceptual):
For each timeframe, the panel evaluates:
Whether price is currently inside an active range.
Whether price has recently confirmed a structural break.
Displayed states include:
“Range Bullish”
“Range Bearish”
“Waiting”
The last confirmed BOS or ChoCh
What to expect:
The panel is designed as contextual guidance, not a perfect visual replica of the main chart.
Its purpose is to quickly align or contrast structure across timeframes.
Maker module (🏷️ Maker)
Goal: To identify the most meaningful internal swing that forms inside an active structure range.
Rules applied
Swings that define the range boundaries are excluded.
Only confirmed swings inside the range are considered.
At least two internal swings must exist for a Maker to be valid.
Behavior on structure break:
If price breaks upward:
The most extreme internal low is stored.
If price breaks downward:
The most extreme internal high is stored.
What you see
If enabled, a “Maker” label appears at the selected internal swing.
These labels are limited to a fixed historical amount to keep the chart clean.
Fibonacci Swing-to-Swing (🧬 Fibonacci) + Discount Lock
Goal: To project contextual Fibonacci levels within an active structure range.
Core concepts
0.0 level:
Represents the side of the structure where the break occurred.
Can dynamically extend with price if discount lock is enabled.
1.0 level:
Anchored either to:
The structure’s change-of-character side, or
The Maker from the previous completed range.
If no previous Maker exists, the system automatically falls back to the structure anchor.
Discount Lock behavior:
When enabled:
The 0.0 level follows new price extremes.
Once price reaches the discount area, the level becomes fixed.
When disabled:
The 0.0 level remains fixed from the start.
Discount trigger types
Wick-based: activates as soon as price touches the level.
Close-based: requires a candle close beyond the level.
Extra Discount levels
Up to four additional Fibonacci levels can be displayed.
These are visual references only and do not affect structure logic.
Limitations and expectations
Swings are dynamic until confirmed; the most recent swing may adjust.
Structural breaks are confirmed only by candle close.
The indicator uses multiple visual elements, but historical objects are capped to maintain performance.
Multi-timeframe states are simplified representations intended for orientation, not exact replication.
Flip FlopFlip Flop is a visual trend-flip indicator built around two Hull Moving Averages (HMAs): a fast “Short” HMA and a slower “Long” HMA. It plots both HMAs with user-selectable colors, thickness, and line styles, and can shade the area between them to highlight trend bias (green when the short HMA is above the long HMA, red when below).
When the HMAs cross, the script can:
• Color the crossover candle (bullish or bearish)
• Print BUY/SELL labels at the crossover bar
• Trigger alert conditions for both bullish and bearish crosses
A compact on-chart dashboard summarizes the current short/long HMA values, market status (BULLISH ▲ / BEARISH ▼), and the most recent crossover date.
Optional performance tracking simulates a simple long-only system: it “enters” on bullish crosses and “exits” on bearish crosses, tracking equity, total P&L (and %), trade count, win rate, and average win/loss based on your initial capital and position sizing percent.
Wick ZigZag (Alerts Only)Short description
This indicator provides alerts for confirmed P2/P3 swing points based on a wick-driven ZigZag logic.
It is an alerts-focused version with only one user setting: enable/disable alerts.
Features
Alerts when a new P2 is confirmed
Alerts when a new P3 is confirmed
Combined alert: P2 or P3 confirmed
No configurable logic inputs (fixed internal parameters)
How to set up alerts
Add the indicator to your chart.
Open Settings → Inputs → Enable alerts (P2/P3) = ON.
Create a TradingView alert and select one of the conditions:
P2 confirmed
P3 confirmed
P2 or P3 confirmed
Recommended alert frequency: Once per bar close.
Notes / Disclaimer
Alerts trigger only when a swing is confirmed.
This tool is provided for informational purposes only and is not financial advice.
Tags (TradingView)
zigzag, swings, swing-high, swing-low, pivots, alerts, price-action, trend, structure
Categories (TradingView)
Indicators → Trend
Indicators → Price Action
Indicators → Utilities
CCT LevelsGENERAL OVERVIEW:
The CCT Levels indicator is a multi-component market structure and context tool designed to automatically plot higher-timeframe Points of Interest (POI), Turtle Soup levels, Liquidity levels, Killzones, and Fair Value Gaps directly on the chart. It combines multiple structural reference models into a single indicator to help traders visualize where price has previously expanded, reversed, or created imbalance in order to trade the CCT Model.
This indicator was developed by Flux Charts in collaboration with Cramson Capital.
What is the theory behind the indicator?:
The CCT Levels indicator is built on Candle Continuation Theory (CCT), a mechanical framework. It’s designed to remove discretion from trend identification and execution.
At its core, CCT is based on one principle: Markets move as a sequence of candle ranges that expand, pull back, and then continue.
A single candle is not just a price bar. It is a completed range defined by a high and a low. When price closes beyond a previous candle’s range, the market has shown directional intent. When it fails to do so, price is still inside balance.
CCT does not attempt to predict direction. It waits for the market to prove continuation by closing outside prior ranges, then uses lower-timeframe structure to enter once price pulls back and re-expands.
The CCT Levels indicator translates this theory into fully rules-based, higher-timeframe reference levels that define where continuation, rejection, and liquidity are most likely to occur.
Specifically, the indicator highlights:
Where price has already expanded (Point of Interest (POI) Levels)
These mark previously untapped highs or lows that a higher-timeframe candle closed beyond, confirming expansion and directional intent.
Where false breaks may occur (Turtle Soup Levels)
These mark the high or low of the most recently closed candle, capturing areas where price may briefly break and reverse.
Where price is most likely drawn back to (Liquidity Levels)
These mark the extreme of a completed higher-timeframe candle range and serve as continuation targets after pullbacks.
When institutional trading activity is most active (CCT Killzones)
These highlight key session windows where expansions and reversals are most likely to occur.
Where price moved too quickly to trade fairly (Fair Value Gaps)
These highlight imbalances where price may later rebalance before continuing.
CCT LEVELS FEATURES:
The CCT Levels indicator includes 5 main features:
POI Levels
Turtle Soup Levels
Liquidity Levels
CCT Killzones
Fair Value Gaps
POI LEVELS:
🔹What are POI Levels?
Point of Interest (POI) Levels are higher-timeframe expansion levels derived directly from completed candle ranges. In Candle Continuation Theory, a POI represents the exact moment the market proves directional intent by closing outside of a previously respected range.
A POI is not a random high or low. It is a range boundary that price had never traded through before, which was then accepted by a higher-timeframe candle close.
In CCT, this matters because:
As long as price is inside a prior range, the market is still in balance
Only when price closes beyond that range does continuation become valid
POIs mark those confirmed expansion points
The CCT Levels indicator supports two independent POI level sets, each based on a user-selected timeframe, allowing traders to monitor multiple layers of higher-timeframe expansion simultaneously.
🔹How POI Levels Are Identified
POI Levels are calculated exclusively from the timeframe selected in the indicator settings, not from the chart timeframe. This allows traders to view higher-timeframe structure while operating on lower-timeframe charts.
For each enabled POI timeframe, the indicator follows a fixed, rules-based process:
1. The indicator continuously monitors the selected timeframe and waits for a candle to close. (Only closed candles are evaluated by the indicator. The currently forming candle is ignored.)
Once a candle closes, the indicator first determines the candle’s direction by comparing its open and close.
2. The indicator then checks whether that candle closed beyond a previously untapped area:
For bullish candles, it checks whether price closed above prior untapped highs.
For bearish candles, it checks whether price closed below prior untapped lows.
3. If the candle both:
Closes in one direction and
Breaks into an area that had not yet been traded through a new Point of Interest is created.
4. The level that was broken for the first time becomes the active POI for that timeframe. If a completed candle does not break into a new untapped area, no new POI is formed, and the most recent POI remains active and displayed.
POI Levels represent freshly broken, previously untouched highs or lows, not arbitrary candle extremes.
🔹Bullish POI Level Example
A Bullish Point of Interest Level forms when price expands upward into a previously untapped high on the selected POI timeframe. This process is entirely rules-based and only evaluates closed candles.
◇ Step One
The indicator first references the POI timeframe selected in the settings. All logic described below is evaluated only on that timeframe, regardless of the chart timeframe you are viewing.
For example, if the POI timeframe is set to 1H, then only closed 1-hour candles are evaluated.
◇ Step Two
Once a candle closes, the indicator compares its open and close.
A candle is classified as bullish when it closes above its open. If the candle does not close bullish, no bullish POI can form.
◇ Step Three
After confirming a bullish close, the indicator looks for previous highs that the current candle closed above and checks for untapped highs.
An untapped high is a high that formed and price never traded at the same level or higher since it formed.
◇ Step Four
For a bullish POI to form, the closed bullish candle must close above an untapped high, not just wick above it. This distinction is critical because a wick alone means rejection, but a close means acceptance of higher value.
The indicator will automatically plot the level, and when a POI forms, it will display a label indicating the timeframe from which it originated.
🔹Bearish POI Level Example
A Bearish POI Level forms when price expands downward into a previously untapped low on the selected POI timeframe. This process is entirely rules-based and evaluates only closed candles on the chosen POI timeframe.
◇ Step One
The indicator first references the POI timeframe selected in the settings. All bearish POI logic is evaluated strictly on that timeframe, regardless of the chart timeframe you are viewing.
For example, if the POI timeframe is set to 1H, then only 1-hour candles that closed are used to detect bearish POIs.
◇ Step Two
Once a candle on the POI timeframe fully closes, the indicator compares its open and close.
A candle is classified as bearish when it closes below its open. If the candle does not close bearish, no bearish POI can form, and the indicator moves on without updating the level.
◇ Step Three
After confirming a bearish close, the indicator looks for previous lows that the candle closed below and checks whether those lows were untapped.
An untapped low is a low that formed and price has never traded at or below that level since it formed. If price has previously wicked into or traded through that low, it is considered taken out and is ignored by the indicator.
◇ Step Four
For a bearish POI to form, the completed bearish candle must close below an untapped low, not wick below it. This distinction is critical since a wick below a low signals rejection, while a close below the low signals acceptance of lower value. Every untapped low the candle closes below is marked as a bearish POI level.
The indicator automatically plots the level(s) with labels showing the timeframe from which the POI originated.
🔹POI Level Replacement Logic
POI Levels are designed to always reflect the most recent valid higher-timeframe expansion, not every candle that prints.
Once a POI is formed, it becomes the active POI for that timeframe and remains visible on the chart until a new valid POI replaces it.
Here’s how that logic works in practice:
If the next completed candle on the POI timeframe does not break into a new untapped area, no new POI is created
When no new POI forms, the most recent POI remains active and continues extending on the chart
If price later prints a closed candle that breaks into a new untapped high (bullish) or untapped low (bearish), then:
The previous POIs are removed
The newly formed POIs replace them
At all times, the indicator shows only the latest valid POI per timeframe.
🔹POI Settings
◇ POI Timeframes
The indicator supports two separate POI level sets, each with its own timeframe selection. Each POI set’s timeframe can be customized, and each set can be individually enabled or disabled. This allows traders to view, for example, 1H and Daily POIs simultaneously on the same chart.
◇ Labels
The Labels option controls whether POI levels display text labels. When enabled, each POI shows a label with its originating timeframe (e.g., 1H, 1D). When disabled, POI lines remain visible, and labels are hidden. Label text color and size is fully customizable as well.
◇ Extend Levels
The Extend Levels setting controls how far POI levels project into the future. When enabled, POI levels extend a user-defined number of bars forward.
◇ Line Style
POI levels can be styled using:
Solid
Dashed
Dotted
◇ Line Width
The Line Width setting controls the thickness of POI level lines.
◇ Color Customization
Each POI set has independent color controls for Bullish POI Levels and Bearish POI Levels. This makes it easy to visually separate direction, timeframe, or importance at a glance.
TURTLE SOUP LEVELS:
🔹What are Turtle Soup Levels?
Turtle Soup Levels are higher-timeframe false expansion reference levels derived from the most recently completed candle range. In Candle Continuation Theory, these levels highlight where price may briefly break a range and fail, trapping breakout traders before reversing.
While POI Levels mark accepted expansion, Turtle Soup Levels mark potential rejection.
They are designed to capture the exact edge of the most recent higher-timeframe candle range, which is often the first area price probes during continuation pullbacks or failed break attempts.
In the CCT Levels indicator, Turtle Soup Levels are:
Automatically detected
Based strictly on a user-selected timeframe
Continuously updated using closed candles only
Unlike POI Levels, Turtle Soup Levels:
Update every time a new candle closes
Always reflect the most recent completed candle
Do not depend on untapped highs or lows
Do not persist conditionally
The indicator supports two independent Turtle Soup level sets, each with its own timeframe and styling options.
🔹How Turtle Soup Levels Are Identified
Turtle Soup Levels are calculated strictly from the timeframe selected in the settings, not the chart timeframe. For each enabled Turtle Soup timeframe, the indicator follows this exact process:
The indicator waits for a candle on the selected timeframe to fully close
Once the candle closes, the indicator evaluates its direction by comparing the open and close
Based on that direction, a single level is plotted. If the candle is Bearish, the high is considered the Turtle Soup. If the candle is Bullish, the low is considered the Turtle Soup.
That level becomes the active Turtle Soup level and is updated again on the next candle close
🔹Turtle Soup Low Example
A Turtle Soup Low forms when the most recently closed candle on the selected Turtle Soup timeframe closes bullish.
◇ Step One
The indicator references the Turtle Soup timeframe selected in the settings. All logic is evaluated only on that timeframe.
For example, if the Turtle Soup timeframe is set to 1H, only closed 1-hour candles are used.
◇ Step Two
Once the candle closes, the indicator checks its direction. A candle is classified as bullish when it closes above its open.
◇ Step Three
If the candle is bullish, the indicator automatically marks the low of that closed candle. That low becomes the Turtle Soup Level. The level is plotted immediately and labeled “TS” when labels are enabled.
🔹Turtle Soup High Example
A Turtle Soup High forms when the most recently closed candle on the selected Turtle Soup timeframe closes bearish.
◇ Step One
The indicator references the Turtle Soup timeframe selected in the settings. All logic is evaluated only on that timeframe.
For example, if the Turtle Soup timeframe is set to 1H, only closed 1-hour candles are used.
◇ Step Two
Once the candle closes, the indicator checks its direction. A candle is classified as bearish when it closes below its open.
◇ Step Three
If the candle is bearish, the indicator automatically marks the high of that closed candle. That high becomes the Turtle Soup Level. The level is plotted immediately and labeled “TS” when labels are enabled.
🔹Turtle Soup Level Replacement Logic
Turtle Soup Levels are intentionally designed to be fully dynamic and always current.
Unlike POI Levels, Turtle Soup Levels do not persist conditionally and do not wait for special criteria to remain active.
The update logic works as follows:
On every completed candle of the selected Turtle Soup timeframe, the indicator recalculates the Turtle Soup Level
The level is derived only from the most recently closed candle
The previously plotted Turtle Soup level is removed, and the newly calculated level replaces it
Thus, there is always exactly one active Turtle Soup level per timeframe.
🔹Turtle Soup Settings
◇ Turtle Soup Timeframes
The indicator supports two separate Turtle Soup level sets, each with its own timeframe selection. Each Turtle Soup set’s timeframe can be customized, and each set can be individually enabled or disabled. This allows traders to view, for example, 1H and Daily Turtle Soups simultaneously on the same chart.
◇ Labels
The Labels option controls whether Turtle Soup levels display text labels. When enabled, each Turtle Soup level includes a label with text of “TS”. When disabled, Turtle Soup lines remain visible, and labels are hidden. Label text color and size is fully customizable as well.
◇ Extend Levels
The Extend Levels setting controls how far Turtle Soup levels project into the future. When enabled, Turtle Soup levels extend a user-defined number of bars forward.
◇ Line Style
Turtle Soup levels can be styled using:
Solid
Dashed
Dotted
◇ Line Width
The Line Width setting controls the thickness of Turtle Soup lines.
◇ Color Customization
Each Turtle Soup set has independent color controls for different timeframes.
LIQUIDITY LEVELS:
🔹 What are Liquidity Levels?
Liquidity Levels are higher-timeframe draw-on reference levels derived from completed candle ranges and anchored to confirmed expansion events. In Candle Continuation Theory, once the market proves direction by closing beyond a prior range (a POI), price often revisits prior extremes where orders previously accumulated or were left unfilled. Liquidity Levels represent those areas.
They are not random highs or lows. They are range extremes of completed higher-timeframe candles, selected only after the market has already shown directional intent through a POI.
In CCT terms:
POIs confirm directional acceptance
Liquidity Levels define where price may seek resolution
This separation is intentional. Liquidity Levels are contextual targets, not entry signals.
🔹How Liquidity Levels Are Identified
Liquidity Levels are calculated strictly from the timeframe selected in the settings, not from the chart timeframe.
For each enabled Liquidity timeframe, the indicator follows this fixed, rules-based process:
The indicator continuously monitors the selected Liquidity timeframe and waits for a candle to fully close. (Only closed candles are evaluated)
Once a candle closes, the indicator evaluates its direction by comparing the candle’s open and close. If the candle closes bullish, the high of that candle becomes the Liquidity Level. If the candle closes bearish, the low of that candle becomes the Liquidity Level.
That price is plotted as the active Liquidity Level and labeled “$$$” when labels are enabled.
However, unlike Turtle Soup Levels, Liquidity Levels are not updated on every candle close.
🔹Liquidity Level Update Logic
Liquidity Levels are tied directly to POI formation.
This means:
Liquidity Levels are only recalculated when a new POI forms
If no new POI forms, Liquidity Levels remain unchanged, even as new candles close
This allows Liquidity Levels to persist across multiple candles like POI Levels.
In practice:
When a POI updates, the Liquidity Level is recalculated using the most recent closed candle on the Liquidity timeframe
When no POI updates occur, the Liquidity Level continues extending forward
This behavior mirrors how POI Levels persist when no new POIs are formed, ensuring Liquidity Levels remain relevant and not noisy.
🔹Bullish Draw on Liquidity Example
A Bullish Liquidity Level forms when the most recent closed candle on the selected Liquidity timeframe closes bullish, and a new POI event triggers an update.
◇ Step One
The indicator references the Liquidity timeframe selected in the settings.
For example, if the Liquidity timeframe is set to 1H, only closed 1-hour candles are evaluated.
◇ Step Two
Once a candle closes, the indicator checks its direction. A candle is classified as bullish when it closes above its open.
◇ Step Three
If a new POI has formed and the candle is bullish, the indicator marks the high of that candle. That high becomes the Bullish Draw on Liquidity Level.
◇ Step Four
The level is labeled “$$$” when labels are enabled and remains active until the next POI-triggered update. If subsequent candles close bullish or bearish without a new POI forming, the Liquidity Level does not change.
🔹Bearish Draw on Liquidity Example
A Bearish Liquidity Level forms when the most recent closed candle on the selected Liquidity timeframe closes bearish, and a new POI event triggers an update.
◇ Step One
The indicator references the Liquidity timeframe selected in the settings.
For example, if the Liquidity timeframe is set to 1H, only closed 1-hour candles are evaluated.
◇ Step Two
Once a candle closes, the indicator checks its direction. A candle is classified as bearish when it closes below its open.
◇ Step Three
If a new POI has formed and the candle is bearish, the indicator marks the low of that candle. That low becomes the Bearish Draw on Liquidity Level.
◇ Step Four
The level is labeled “$$$” when labels are enabled and remains active until the next POI-triggered update. If subsequent candles close bullish or bearish without a new POI forming, the Liquidity Level does not change and continues extending on the chart.
🔹Liquidity Level Persistence Logic
Liquidity Levels are intentionally designed to be contextual and stable, rather than updating on every candle close. In Candle Continuation Theory, liquidity is only relevant after the market has proven direction through a higher-timeframe expansion. For that reason, Liquidity Levels are tied directly to POI formation, not to individual candles.
Once a Liquidity Level is plotted, it remains active and continues extending forward until a new POI forms. If additional candles close on the Liquidity timeframe without a new POI being created, the Liquidity Level does not change. This prevents unnecessary recalculation and ensures the level remains aligned with the most recent confirmed expansion rather than short-term price fluctuations.
When a new POI forms, the existing Liquidity Level is removed and a new one is calculated using the most recently closed candle on the selected Liquidity timeframe. At any given time, only the most recent Liquidity Level per timeframe is displayed. Liquidity Levels never stack, and they always correspond to the latest POI-driven market context.
🔹Liquidity Level Settings
◇ Liquidity Timeframes
The indicator supports two separate Liquidity Level sets, each with its own timeframe selection. Each Liquidity set’s timeframe can be customized, and each set can be individually enabled or disabled. This allows traders to view, for example, 1H and Daily Liquidity Levels simultaneously on the same chart.
◇ Labels
The Labels option controls whether Liquidity Levels display text labels. When enabled, each Liquidity Level includes a label with the text “$$$”. When disabled, Liquidity Level lines remain visible, and labels are hidden. Label text color and size are fully customizable as well.
◇ Extend Levels
The Extend Levels setting controls how far Liquidity Levels project into the future. When enabled, Liquidity Levels extend a user-defined number of bars forward.
◇ Line Style
Liquidity Levels can be styled using:
Solid
Dashed
Dotted
◇ Line Width
The Line Width setting controls the thickness of Liquidity Level lines.
◇ Color Customization
Each Liquidity Level set has independent color controls, allowing traders to visually separate Liquidity Levels by timeframe or from other level types on the chart.
CCT KILLZONES:
🔹What Are CCT Killzones?
CCT Killzones are time-based market context zones designed to highlight specific trading sessions where institutional participation is most active. Rather than marking price levels, Killzones define when price is most likely to expand, consolidate, or reverse based on session transitions.
In Candle Continuation Theory, timing matters just as much as structure. Higher-timeframe expansions (POIs) and Liquidity Levels provide where price is reacting, while Killzones provide when meaningful interaction is more likely to occur.
The CCT Levels indicator includes built-in Killzones to visually frame price action during key global trading sessions without requiring manual session marking.
🔹How CCT Killzones Are Identified
CCT Killzones are calculated using fixed session times, not price-based conditions. They are plotted directly on the chart as shaded boxes during predefined windows, adjusted to New York time for consistency.
Each Killzone follows this rules-based process:
The indicator checks whether the current chart timeframe is intraday
If the chart is intraday, the indicator monitors time-of-day relative to predefined session windows
When price enters a Killzone window, a shaded box begins plotting
While the session is active, the box dynamically expands to capture the session’s high and low
When the session ends, the box stops expanding and remains visible as historical context
🔹Included CCT Killzones
The indicator includes four Killzones, each corresponding to a major global trading session:
Asia Killzone – 20:00-22:00 EST
London Killzone – 02:00-04:00 EST
New York Killzone – 10:00-12:00 EST
Daily Open – 17:00-18:00 EST
Each Killzone can be independently enabled or disabled in the settings.
🔹CCT Killzone Settings
◇ Killzone Visibility
Each Killzone (Asia, London, New York) has its own enable/disable toggle, allowing traders to display only the sessions they want to focus on.
◇ Killzone Colors
Each Killzone has an independent color setting. Colors can be customized to visually distinguish sessions or match a preferred chart theme.
◇ Labels
The Labels option controls whether Killzones display text labels (e.g., ASIA, LONDON, NY). When enabled, labels appear within the Killzone box. Label color and size are fully customizable. When disabled, Killzones remain visible without text.
◇ Label Size
Label size can be adjusted using standard size options (Tiny, Small, Normal, Large, Huge).
FAIR VALUE GAPS:
🔹What is a Fair Value Gap?:
A Fair Value Gap (FVG) is an area where the market’s perception of fair value suddenly changes. On your chart, it appears as a three-candle pattern: a large candle in the middle, with smaller candles on each side that don’t fully overlap it. A bullish FVG forms when a bullish candle is between two smaller bullish/bearish candles, where the first and third candles’ wicks don’t overlap each other at all. A bearish FVG forms when a bearish candle is between two smaller bullish/bearish candles, where the first and third candles’ wicks don’t overlap each other at all.
Bullish & Bearish FVGs:
In the settings, you can toggle on/off FVGs, choose the invalidation method, adjust the sensitivity, and toggle on FVG Midline.
🔹FVG Settings
◇ Enabled
This toggle controls whether Fair Value Gaps are displayed on the chart. When disabled, no FVG zones are calculated or plotted.
◇ Invalidation Method
The Invalidation Method setting allows traders to choose how an FVG is invalidated. You can choose between Close and Wick.
Close: A candle must close below a bullish FVG or above a bearish FVG to invalidate it.
Wick: A candle’s wick must go below a bullish FVG or above a bearish FVG to invalidate it.
◇ Sensitivity
The sensitivity setting determines the minimum gap size required for an FVG detection. A higher sensitivity will filter out smaller gaps, while a lower sensitivity will detect more frequent, smaller gaps. Setting the sensitivity to 0 will display all gaps, regardless of their size.
◇ Midline
When enabled, the indicator plots a midline inside each Fair Value Gap. The midline represents the midpoint of the imbalance range and can be used as a reference for partial rebalancing or reactions.
Midline customization includes:
Midline toggle on/off
Midline color
Midline line style (Solid, Dashed, Dotted)
◇ Only Show 1M/15M
This option restricts Fair Value Gap detection and display to only the 1-minute and 15-minute timeframes.
When enabled:
FVGs will only appear when the chart timeframe is 1-minute or 15-minute
Higher-timeframe FVGs are hidden
IMPORTANT NOTES:
TradingView has limitations when running features on multiple timeframes, which can result in the following restriction:
Computation Error:
The computation of using MTF features is very intensive on TradingView. This can sometimes cause calculation timeouts. When this occurs, simply force the recalculation by modifying one indicator’s settings or by removing the indicator and adding it to your chart again.
UNIQUENESS:
The CCT Levels indicator is unique because it provides a fully rules-based implementation of Candle Continuation Theory using only completed candle structure. Every level is derived mechanically from user-selected timeframes with no discretion, prediction, or repainting. POI Levels define confirmed expansion, Turtle Soup Levels mark failure risk, Liquidity Levels anchor continuation context, Killzones control timing, and Fair Value Gaps highlight imbalance. Together, these components form a single, objective framework for reading market context across all markets and timeframes.
ICT SMT [Pro] (fadi)Smart Money Technique (SMT) is a powerful tool used to identify institutional accumulation or distribution. It occurs when one asset makes a lower low (or higher high) while a correlated asset fails to do so, making a higher low (or lower high) instead. This divergence shows strong buying or selling pressure on the asset that failed to break its level.
While SMT is a high-probability confluence, tracking it manually is a distraction. It forces you to take your focus away from price action to constantly monitor highs and lows across two or more different charts.
ICT SMT automates this entire process , identifying the "crack in correlation" in real-time so you can stay focused on your trade execution, and draws the SMT levels right on your chart.
Core Functionality & Logic
✅ Intelligent Symbols Matching
When you load a chart, ICT SMT will look for the best matching symbols by parsing your current chart to understand its asset type and exchange. It will then run propriety logic to match contract size and exchange, if needed.
It intelligently recognizes contract sizes. If you are viewing NQ, it automatically compares it against ES. If you switch to MNQ (Micro), it instantly adapts to compare against MES (Micro).
And if you are trading Forex or Crypto for example, accuracy in SMT is often ruined by comparing data from different liquidity providers. ICT SMT automatically identifies your current chart's provider and reuses that same exchange for the target asset whenever possible (e.g., OANDA to OANDA). This ensures the divergence is based on synchronized price feeds, eliminating "fake" signals caused by exchange price gaps.
Global Mapping: This system works across all asset classes. While it provides optimized defaults, traders have full control via a flexible mapping system to pair any symbol or override the defaults as needed.
✅ Live SMT Detection
ICT SMT evaluates price action as the current candle develops. An SMT is identified the moment one asset breaks its logical level while the other fails to do so, providing real-time feedback before the candle even closes.
Depth Sensitivity: Users can select the depth of analysis via a dropdown menu (Small, Medium, or Large) to define how the engine builds its logical levels.
✅ Session-Specific Filtering
To ensure the highest probability setups, ICT SMT uses time-based logic to enable or disable the calculation engine. You can configure up to four custom trading sessions (e.g., London, NY AM, NY PM). SMTs are only processed within these windows, keeping the chart clean and optimized for peak performance.
✅Alert Engine
Stay informed of market shifts without needing to hover over the screen. The script includes a professional alert suite:
• SMT Detected (Intra-Candle): Triggers the moment a divergence begins forming in real-time.
• SMT Confirmed: Triggers once the candle closes, validating that the divergence held through the completion of the interval.
How it Works
Add the indicator to your chart
Make sure the assets you trade are on the list, modify it if needed
You are done! Trade and navigate your charts as usual
When a new symbol is loaded, the indicator identifies the symbol type and exchange
Performs a lookup to find matching pairs in the mapping list
Based on the type, automatically adjusts the matching pairs to match the exchange and size for data consistency.
As new candles are formed, the indicator builds a list of the best logical levels to compare from each symbol and compares the two in real-time to identify the divergence.
Settings & Configurations
✅ General Settings
Show no more than - Limits the number of active SMT labels visible on the chart at once to prevent visual clutter.
Type of SMT to show - Choose between Bullish SMT, Bearish SMT, or \'Both\' to filter the signals based on your current market bias.
Lookback depth - Determines the lookback period for our proprietary pivot logic. Higher values analyze a longer history; lower values prioritize the most recent institutional movements.
Show 2 Candles SMT - When enabled, the indicator looks for SMT divergences occurring within a tight 2-candle window, ideal for high-speed \'Intra-Candle\' scalping setups.
Detect one SMT per pivot - Ensures that each logical swing high or low only generates a single signal, preventing duplicate labels on the same price move.
Delete irrelevant SMT - Automatically removes SMT labels if price moves past the pivot point, keeping your chart focused only on valid, tradeable confluences.
✅ Display Settings
Link - Customizes the appearance of the line connecting the two assets\' price points. Adjust the color and thickness to match your chart theme.
Label - Toggles the SMT text labels. You can adjust the color, size, and transparency to ensure the signals are visible but not distracting.
✅ Session
Sessions 1 to 4 - Defines a specific trading window. Enable to filter SMT detection within your chosen times to minimize market noise.
✅ Alerts
Alert on real-time SMT (Noisy) - Triggers the moment a divergence is detected in real-time. This provides an early warning during the formation of a wick, but may disappear if price action recovers before the candle closes
Alert on confirmed SMT - Triggers only after the candle closes. This ensures the SMT is locked in and validated by the final price, eliminating temporary signals.
✅ Pairing
Pairs - This is the Global Mapping engine. By default, it automatically detects your chart (e.g., NQ to ES). Use these fields to manually override or add specific pairs (e.g., DXY or specific Crypto exchanges). Invert: "Flips the price calculation for the secondary symbol. This is essential when comparing positively correlated assets against negatively correlated ones, such as EURUSD vs. DXY.
🔥 Usage Methodology
In ICT theory, SMT is a powerful confluence, not a standalone signal. It is important to note that Traders should not rely on SMT alone for entries. This tool is designed to support existing trade ideas, such as confirming a daily bias, a Fair Value Gap (FVG), or a run on liquidity. It acts as a "confirmation of intent" within your broader trading framework.
Disclaimer: Trading involves significant risk. ICT SMT is a technical analysis tool and does not constitute financial advice or a guarantee of profit.
SuperTrend - With Exits & Trade ZonesSuperTrend - With Exits & Trade Zones
Overview
An advanced trend-following indicator that combines pivot points with the SuperTrend methodology to create a complete trading system with entry signals, exit signals, and visual trade zones. This indicator adapts to market structure rather than just price action, providing more reliable trend identification.
What Makes This Unique
Unlike standard SuperTrend indicators that use moving averages, this version:
Uses actual pivot points to calculate a dynamic center line
Provides multiple entry mode options for different trading styles
Shows clear exit signals (both trailing stop and take profit)
Color-codes the entire chart into trade zones (Long, Short, No Trade)
Eliminates guesswork about when to enter, exit, and stay out
Features
📊 Core Indicator Components
Pivot Point Detection: Identifies local highs and lows in price structure
Dynamic Center Line: Weighted calculation using detected pivot points
ATR-Based Bands: Volatility-adjusted upper and lower bands
Trailing Stop Line: Adaptive stop-loss that follows the trend
🎯 Entry Signals
Four entry modes to match your trading style:
Immediate Mode ⚡
Signals right when the trailing stop breaks
Fastest entries for aggressive traders
Best for strong trending markets
Aggressive Mode 🔥 (Recommended)
Signals when price closes beyond break candle OR opens beyond it
Balanced speed and confirmation
Good for most market conditions
Balanced Mode ⚖️
Requires entire candle to close beyond break level
Moderate confirmation
Reduces false breakouts
Conservative Mode 🛡️
Waits for candle to open AND stay completely beyond break level
Highest confirmation, slowest entries
Best for choppy markets
🚪 Exit Signals
Three exit strategies:
Trailing Stop
Exits when price crosses back through the trailing stop line
Lets profits run in trending markets
Protects gains when trend weakens
Take Profit %
Exits at predetermined profit target
Locks in gains at specific percentage
Good for range-bound markets
Both
Uses whichever exit comes first
Combines profit protection with trend following
Recommended for most traders
🎨 Visual Trade Zones
Color-coded backgrounds eliminate confusion:
🟢 Light Green: Active LONG position
🔴 Light Red: Active SHORT position
⚫ Gray: NO TRADE ZONE (between exit and next signal)
📍 Additional Visual Elements
Diamond markers: Show when trailing stop is first broken
BUY/SELL labels: Clear entry signals in green/red
EXIT markers: Gray X for stop loss, Orange X (TP) for take profit
Pivot points: Optional display of detected highs/lows (H/L markers)
Support/Resistance: Optional circles at pivot levels
Settings & Parameters
Basic Settings
Pivot Point Period (default: 2)
Controls sensitivity of pivot detection
Lower = more pivots detected (more responsive)
Higher = fewer pivots (more stable)
ATR Factor (default: 3)
Distance multiplier for trailing stop bands
Lower = tighter stops (more signals, earlier exits)
Higher = wider stops (fewer signals, longer trades)
ATR Period (default: 10)
Lookback period for volatility calculation
Affects how quickly bands adapt to volatility changes
Entry Configuration
Entry Mode: Select from Immediate/Aggressive/Balanced/Conservative
Determines how quickly the indicator generates signals after a trend break
Exit Configuration
Exit Method: Choose Trailing Stop, Take Profit %, or Both
Take Profit % (default: 2%)
Set your profit target as percentage of entry price
Adjust based on volatility and timeframe
Display Options
Show Buy/Sell Labels: Toggle entry signal labels
Show Exit Signals: Toggle exit markers
Show Break Candles: Toggle diamond markers on trend breaks
Show Pivot Points: Display H/L markers at pivot points
Show PP Center Line: Display the dynamic center line
Show Support/Resistance: Display circles at S/R levels
How to Use
For Swing Traders
Set Entry Mode to "Balanced" or "Conservative"
Use "Both" exit method with 3-5% take profit
Enable all visual elements for complete market picture
Trade only in direction of colored zones
For Day Traders
Set Entry Mode to "Aggressive" or "Immediate"
Use "Trailing Stop" exit method to catch intraday trends
Lower ATR Factor to 2-2.5 for tighter stops
Watch for quick signals in the first 2 hours of trading
For Position Traders
Use higher timeframes (Daily/Weekly)
Set Entry Mode to "Conservative"
Increase Take Profit % to 5-10%
Use larger ATR Factor (4-5) for wider stops
General Trading Rules
✅ DO: Enter on BUY/SELL signals (green/red backgrounds)
✅ DO: Exit on EXIT/TP markers
❌ DON'T: Enter during gray NO TRADE ZONE
❌ DON'T: Counter-trend trade against the colored zone
Alerts
Set up the following alerts for automated trading notifications:
Buy Signal: Triggers when long entry conditions are met
Sell Signal: Triggers when short entry conditions are met
Exit Long: Triggers when long position should be closed
Exit Short: Triggers when short position should be closed
Trailing Stop Broken: Triggers on initial trend change
Best Practices
Timeframe Selection
1-5 min: Scalping (use Immediate/Aggressive mode)
15-60 min: Day trading (use Aggressive/Balanced mode)
4H-Daily: Swing trading (use Balanced/Conservative mode)
Weekly: Position trading (use Conservative mode)
Risk Management
Always use the EXIT signals - don't hold through gray zones
Position size based on distance to trailing stop
Never risk more than 1-2% per trade
Consider wider stops on higher timeframes
Market Conditions
Trending markets: Use Aggressive mode, Trailing Stop exits
Ranging markets: Use Conservative mode, Take Profit exits
High volatility: Increase ATR Factor, use Both exits
Low volatility: Decrease ATR Factor for tighter stops
Technical Details
Calculation Method
Detect pivot highs and lows using specified period
Calculate weighted center line: (previous_center × 2 + new_pivot) / 3
Calculate bands: Upper = Center - (ATR Factor × ATR), Lower = Center + (ATR Factor × ATR)
Determine trend based on price position relative to bands
Trail stop line follows the active trend direction
Signal Logic
Entry signals generated based on selected confirmation mode
Position tracking maintains state from entry to exit
Exit signals calculated from both trailing stop and take profit levels
Trade zones update in real-time based on position state
Limitations & Considerations
Works best in trending markets; may generate false signals in tight ranges
Not a holy grail - should be used with proper risk management
Past performance does not guarantee future results
Recommended to backtest on your specific instrument and timeframe
Consider combining with volume analysis or other indicators for confirmation
Version History
v1.0: Initial release with entry signals and confirmation modes
v1.1: Added exit signals (trailing stop and take profit)
v1.2: Added color-coded trade zones (Long/Short/No Trade)
Credits
Original Pivot Point SuperTrend concept by LonesomeTheBlue
Modified with exit signals and trade zone visualization
License
Mozilla Public License 2.0
Example Setups
Conservative Swing Trading
Pivot Point Period: 2
ATR Factor: 3
ATR Period: 10
Entry Mode: Conservative
Exit Method: Both
Take Profit %: 4%
Aggressive Day Trading
Pivot Point Period: 2
ATR Factor: 2.5
ATR Period: 10
Entry Mode: Aggressive
Exit Method: Trailing Stop
Position Trading
Pivot Point Period: 3
ATR Factor: 4
ATR Period: 14
Entry Mode: Balanced
Exit Method: Both
Take Profit %: 8%
Disclaimer: This indicator is for educational purposes only. Trading involves substantial risk. Always do your own research and never trade with money you cannot afford to lose.
Magnitude of Price DiscoveryThis script is a simple attempt to show the magnitude of price discovery
Before we discuss how it works we need to discuss our terms.
Universal Truth of Price #1 - Price only trades in 3 distinct ways
Scenario 1 - Inside bar to previous range, consolidation.
Scenario 2 - Trending bar up or down, HH + HL to previous bar or LL + LH to previous bar
Scenario 3 - Outside bar, Higher highs AND lower lows to previous bar. Also known as a broadening formation.
If you are interested in the 2nd universal truth my indicator 'Timeframe Continuity Bars' discusses it there.
Given one of the 3 scenarios price can trade in is a broadening formation it proves that price discovery occurs as a series of new highs and new lows.
Notice the scenario 3 marked by SimpleStratNumbers
This scenario 3 is a broadening formation on the 1min and on the 30min basis.
Given this is true we know if price rejects the broadening highs it is attempting to make new lows to the broadening range
So, what this indicator does is it uses previous swing highs and swing lows and it shows you when price reclaims them and gives you a target.
The target of this indicator is guaranteed to be hit if the 2nd universal truth of price is in your favor.
This means if we reclaim a previous high to the downside. At the time of all known participation groups selling we know the magnitude of this selling would be the other side of the range
So it's simple, the solid line shows you the reclaimed level.
The dotted line shows you the magnitude.
Full timeframe continuity tells you when it is FOR SURE going to your target price via MTF analysis of the aggressiveness of the buyers/sellers.
However timeframe continuity is subject to change every 60min, every day, every week, and every month! That's the risk you take when trading.
Here's one example for you.
NASDAQ:AAPL monthly made a new low and changed to green this was your evidence price is attempting to take the other side of the range.
NASDAQ:AAPL monthly opened green again and re-confirmed the upside which meant the other side
of the range was still for certain going to be taken out.
After being taken out, breakout traders buy the highs and any shorts in aapl are forced to cover.
BOOM!
This indicator is likely to be updated in the near future to align entries on multiple timeframes.
Nothing spoken here is financial advice and it is ONLY what we know to be true about price action.
Nagative RR - Pivots Indicator - Old versionIntroduction
This indicator is a comprehensive scalping tool designed to identify high-probability reversals around key Pivot Point levels. It combines classical Support/Resistance theory with modern Market Structure concepts. It is optimized for the 1-minute timeframe, utilizing granular price action to identify precise entries.
Core Methodology
The strategy operates on a logic specifically designed to target a high win rate (historically testing in the 90-92% range) by utilizing a Negative Risk-to-Reward ratio (taking small profits frequently while allowing room for the trade to breathe).
Daily Pivots Reversals:
The core logic anchors to Daily Pivot Points. It treats these levels as critical Support and Resistance zones, waiting for price to interact and reverse off these levels rather than trading breakouts.
Market Structure Shifts (MSS):
The script visualizes and identifies Market Structure Shifts. These are used not just for visual aid but as a hard filter—trades are only taken when the immediate market structure aligns with the reversal direction.
Profitability Filters:
To improve performance and reduce noise, several filters have been added:
EMA Filter: Ensures trades align with the macro trend.
Time Filter: Avoids low-volume trading hours.
S/R Flip Logic: requires a confirmed "flip" of a level before entering.
Features & Functionality
"Pick My Trade" Integration: This script features a built-in JSON generator. It automatically creates the specific JSON payloads required for "Pick My Trade" automation (including Token, Account ID, and Quantity), making it ready for automated trading out of the box.
Visual Backtesting: The script draws Entry, Take Profit, and Stop Loss boxes on the chart for visual verification.
Statistics Panel: A custom dashboard tracks performance in real-time.
How to Use
Timeframe: Set your chart to 1 minute for the best results, as the logic is tuned for this granularity.
Automation: Go to settings -> "Webhook / Automation" and check "Use Pick My Trade JSON". Create an alert on "Any function call" to send fully formatted orders.
Risk Warning: This strategy utilizes a Negative RR approach (typically 1:2 or 1:4 Risk:Reward). This is intentional to achieve a high win rate, but requires discipline and proper risk management.
Disclaimer This script is for educational purposes. Past performance is not indicative of future results. Trading involves risk. Credits to Lois#0290 for the original strategy concept.
VaCs MLL V2Quick User Guide
S/R Levels: These are dynamic Support and Resistance lines. They represent "unmitigated" price levels. As soon as the price hits a line, it disappears to keep your chart clean.
BSL/SSL Zones: The red and green boxes represent Buy-Side Liquidity (Previous Day High) and Sell-Side Liquidity (Previous Day Low). These are magnet zones where the price often heads to hunt stop losses.
Leverage Calculator: The dashboard calculates the exact leverage you should use. If you set your "Risk Per Trade" to 5%, and the price hits the "Stop Loss Price," you will lose exactly 5% of your total capital.
Trend Status: Based on the Daily 30 EMA. If the background is Green (Bullish), look for long entries at S/R levels. If Red (Bearish), look for short entries.
Market State Engine V2# Market State Engine
**Deterministic Confidence-Scoring System for TradingView**
A professional-grade PineScript v5 indicator that scores market conditions from 0-100, helping traders identify high-quality trading opportunities through systematic structure analysis, VWAP positioning, order flow dynamics, and time-based context.
---
## 🎯 Overview
The **Market State Engine** is not a trading bot—it's a **noise-reduction and opportunity-ranking system** designed to filter market conditions and surface only the highest-quality setups.
Instead of blindly taking every signal, this indicator:
- ✅ **Scores** market conditions objectively (0-100 scale)
- ✅ **Filters** out low-probability setups automatically
- ✅ **Classifies** opportunities into A, A+, and A++ grades
- ✅ **Alerts** only on confirmed structure shifts with supporting context
- ✅ **Keeps the human in control** - provides intelligence, not automation
### Philosophy: Reduce Noise. Enforce Discipline. Surface Quality.
---
## 🚀 Key Features
- **Deterministic Scoring** - No black boxes, fully explainable logic
- **Multi-Factor Analysis** - Combines 4 independent market state components
- **Structure-First Approach** - Only alerts on confirmed pivot breaks
- **VWAP Mean Reversion Logic** - Directional filtering based on VWAP zones
- **Order Flow Proxy** - CVD divergence and confirmation detection
- **Session-Aware Scoring** - Prioritizes high-volume New York sessions
- **Alert De-Duplication** - One alert per unique structure shift
- **Zero Repainting** - Uses confirmed pivots only (left=2, right=2)
- **Fully Configurable** - All parameters exposed as inputs
- **Visual Feedback** - VWAP bands, setup labels, and real-time score panel
---
## 📊 Scoring System (0-100)
The Market State Engine evaluates **four independent components**, each contributing up to **25 points** for a maximum total score of **100**.
### 🎯 Component Breakdown
| Component | Max Points | Description |
|-----------|------------|-------------|
| **VWAP Context** | 25 | Measures price deviation from session VWAP |
| **Structure Shift** | 25 | Confirms pivot breakout (HARD GATE) |
| **CVD Alignment** | 25 | Detects order flow divergence/confirmation |
| **Time-of-Day** | 25 | Identifies high-probability trading sessions |
---
### 1️⃣ VWAP Context (Max 25 Points)
**Purpose:** Identifies extreme price deviations from fair value for mean-reversion opportunities.
VWAP (Volume-Weighted Average Price) is calculated session-anchored to New York market time, with standard deviation bands creating zones of opportunity.
#### Band Structure:
- **1st Band**: ±1σ from VWAP (fair value zone)
- **2nd Band**: ±2σ from VWAP (moderate deviation)
- **3rd Band**: ±3σ from VWAP (extreme deviation)
#### Scoring Logic (Exclusive):
```
Price in 3rd VWAP Band (>2σ and ≤3σ) → +25 points
Price in 2nd VWAP Band (>1σ and ≤2σ) → +15 points
Otherwise (inside 1σ or beyond 3σ) → 0 points
```
**Key Insight:** The further price stretches from VWAP, the higher the probability of mean reversion.
---
### 2️⃣ Structure Shift (Max 25 Points) — **HARD GATE**
**Purpose:** Confirms momentum shift through confirmed pivot breakouts.
⚠️ **CRITICAL:** Structure shift is **mandatory**. If no valid structure shift occurs, the **total score becomes 0** regardless of other factors.
#### Detection Method:
Uses TradingView's `ta.pivothigh()` and `ta.pivotlow()` functions with **locked parameters**:
- **Left bars**: 2
- **Right bars**: 2
- **Source**: Configurable (Wick or Body)
- **Break confirmation**: Candle close only
#### Bullish Structure Shift:
- ✅ Prior swing high exists (confirmed pivot)
- ✅ Current candle **closes above** swing high + tick buffer
- ✅ Must occur in VWAP 2nd or 3rd band
- ✅ **VWAP Filter**: Price must be **at or below VWAP** (lower bands)
#### Bearish Structure Shift:
- ✅ Prior swing low exists (confirmed pivot)
- ✅ Current candle **closes below** swing low - tick buffer
- ✅ Must occur in VWAP 2nd or 3rd band
- ✅ **VWAP Filter**: Price must be **at or above VWAP** (upper bands)
#### Scoring:
```
Valid structure shift → +25 points
No structure shift → Total score = 0
```
**Tick Buffer:** Default 5 ticks (configurable) - prevents false breaks from minor price noise.
---
### 3️⃣ CVD Alignment (Max 25 Points)
**Purpose:** Detects institutional order flow through volume delta analysis.
CVD (Cumulative Volume Delta) is a proxy for order flow:
```
Close > Open → +Volume (buying pressure)
Close < Open → -Volume (selling pressure)
```
#### Scoring Logic:
| Condition | Points | Description |
|-----------|--------|-------------|
| **Divergence** | +25 | Price makes higher high + CVD makes lower high (bearish)Price makes lower low + CVD makes higher low (bullish) |
| **Confirmation** | +20 | Price and CVD both make higher highs or lower lows |
| **Neutral** | 0 | No clear divergence or confirmation |
**Lookback Window:** Last 20 bars (configurable) - prevents stale divergences.
**Key Insight:** Divergences suggest weakening momentum, while confirmations validate the trend.
---
### 4️⃣ Time-of-Day Context (Max 25 Points)
**Purpose:** Prioritizes high-volume, high-volatility New York sessions.
#### Scored Sessions (America/New_York timezone):
| Session | Time Range (NY) | Points | Description |
|---------|-----------------|--------|-------------|
| **Pre-Market** | 03:00 - 04:00 | +25 | Early liquidity injection |
| **Market Open** | 09:30 - 11:30 | +25 | Highest volume period |
| **Off-Hours** | All other times | 0 | Lower probability setups |
**Key Insight:** Structure shifts during active sessions have higher follow-through probability.
---
## 🏆 Setup Classification
Setups are graded based on total score thresholds (configurable):
| Grade | Score Range | Typical Components | Quality Level |
|-------|-------------|-------------------|---------------|
| **A++ Setup** | ≥90 | All 4 factors aligned(VWAP 3rd band + Structure + CVD + Session) | Premium - Rare |
| **A+ Setup** | ≥75 | Structure + VWAP + CVD or Session(3 of 4 factors) | High - Select |
| **A Setup** | ≥60 | Structure + VWAP + Session(Minimum viable setup) | Good - Regular |
| **No Grade** | <60 | Insufficient confluence | Filtered out |
**Default Thresholds:**
- A Setup: 60 points
- A+ Setup: 75 points
- A++ Setup: 90 points
---
## 📥 Installation
### Step 1: Download the Indicator
Download the `market_state_engine.pine` file from this repository.
### Step 2: Add to TradingView
1. Open (www.tradingview.com)
2. Open the **Pine Editor** (bottom panel)
3. Click **"New"** → **"Blank indicator"**
4. Delete all default code
5. Paste the contents of `market_state_engine.pine`
6. Click **"Add to Chart"**
### Step 3: Configure for Your Symbol
1. Click the **gear icon** next to the indicator name
2. Adjust **Tick Size** for your instrument:
- ES futures: `0.25`
- NQ futures: `0.25`
- Stocks: `0.01`
3. Save settings
---
## ⚙️ Configuration
### Symbol Settings
| Parameter | Default | Description |
|-----------|---------|-------------|
| **Tick Size** | 0.25 | Minimum price movement for your symbol |
| **Tick Buffer Count** | 5 | Ticks beyond swing for valid break |
### VWAP Settings
| Parameter | Default | Description |
|-----------|---------|-------------|
| **VWAP Band 1 (σ)** | 1.0 | 1st standard deviation multiplier |
| **VWAP Band 2 (σ)** | 2.0 | 2nd standard deviation multiplier |
| **VWAP Band 3 (σ)** | 3.0 | 3rd standard deviation multiplier |
### Session Settings
| Parameter | Default | Description |
|-----------|---------|-------------|
| **Session 1** | 0300-0400 | Pre-market window (NY time) |
| **Session 2** | 0930-1130 | Market open window (NY time) |
### Score Thresholds
| Parameter | Default | Description |
|-----------|---------|-------------|
| **A Setup Threshold** | 60 | Minimum score for A grade |
| **A+ Setup Threshold** | 75 | Minimum score for A+ grade |
| **A++ Setup Threshold** | 90 | Minimum score for A++ grade |
### CVD Settings
| Parameter | Default | Description |
|-----------|---------|-------------|
| **CVD Divergence Lookback** | 20 | Maximum bars for divergence detection |
### Swing Settings
| Parameter | Default | Options | Description |
|-----------|---------|---------|-------------|
| **Swing Detection Method** | Wick | Wick / Body | Use high/low or open/close for pivots |
### Visual Settings
| Parameter | Default | Description |
|-----------|---------|-------------|
| **Show VWAP Bands** | ✅ | Display VWAP and standard deviation bands |
| **Show Setup Labels** | ✅ | Display setup markers on chart |
| **Show Score Panel** | ✅ | Display real-time score breakdown |
---
## 📖 How to Use
### Step 1: Apply to 1-Minute Chart
⚠️ **The indicator is locked to 1-minute timeframe** - do not use on other timeframes.
### Step 2: Understand the Visual Signals
#### Setup Labels
- **Green Triangle (▲)** - Bullish (Long) setup detected
- **Red Triangle (▼)** - Bearish (Short) setup detected
- Label shows **Grade** (A/A+/A++) and **Total Score**
#### VWAP Bands
- **Yellow Line** - Session VWAP (fair value)
- **Blue Bands** - ±1σ (fair value zone)
- **Purple Bands** - ±2σ (moderate deviation)
- **Red Bands** - ±3σ (extreme deviation)
#### Score Panel (Top Right)
Real-time breakdown of all four components:
```
Component Score
VWAP Zone 15/25
Structure 25/25
CVD 20/25
Session 25/25
TOTAL 85/100 (A+)
```
### Step 3: Interpret Signals
#### Valid Long Setup:
✅ Green triangle below candle
✅ Price in **lower VWAP bands** (below VWAP)
✅ Structure shift breaks swing high
✅ Score ≥60
#### Valid Short Setup:
✅ Red triangle above candle
✅ Price in **upper VWAP bands** (above VWAP)
✅ Structure shift breaks swing low
✅ Score ≥60
### Step 4: Set Up Alerts (See Alert Conditions section)
---
## 🚦 Signal Filters (VWAP Zone Logic)
The indicator uses **directional VWAP filtering** to prevent counter-trend signals:
### Long Signals (Green)
**Only allowed when price is AT or BELOW VWAP**
- ✅ Lower 2nd band (-2σ to -1σ)
- ✅ Lower 3rd band (-3σ to -2σ)
- ✅ At VWAP exactly
- ❌ **BLOCKED** in upper bands (above VWAP)
**Logic:** Longs when price is stretched below fair value (mean reversion)
### Short Signals (Red)
**Only allowed when price is AT or ABOVE VWAP**
- ✅ Upper 2nd band (+1σ to +2σ)
- ✅ Upper 3rd band (+2σ to +3σ)
- ✅ At VWAP exactly
- ❌ **BLOCKED** in lower bands (below VWAP)
**Logic:** Shorts when price is stretched above fair value (mean reversion)
---
## 🎨 Visual Elements
### Chart Overlays
| Element | Color | Description |
|---------|-------|-------------|
| **VWAP Line** | Yellow | Session-anchored fair value |
| **±1σ Bands** | Blue | Fair value zone (no score) |
| **±2σ Bands** | Purple | Moderate deviation (15 pts) |
| **±3σ Bands** | Red | Extreme deviation (25 pts) |
| **Swing Highs** | Red ▼ | Confirmed pivot highs |
| **Swing Lows** | Green ▲ | Confirmed pivot lows |
| **Session Background** | Light Green | Active high-value session |
### Setup Labels
**Bullish Setup:**
```
A+
▲ 75
```
Green label below candle, shows grade and score
**Bearish Setup:**
```
A++
▼ 90
```
Red label above candle, shows grade and score
### Score Panel
Real-time table in top-right corner:
- Individual component scores (0-25 each)
- Total score (0-100)
- Current setup grade (A/A+/A++)
- Updates in real-time as market conditions change
---
## 🔔 Alert Conditions
### Setting Up Alerts
#### Method 1: Built-in Alert Conditions
1. Click **"Create Alert"** in TradingView
2. Select **Market State Engine** as condition
3. Choose alert type:
- **Bullish Setup** - Long signals only
- **Bearish Setup** - Short signals only
- **Any Setup** - All signals
4. Set to **"Once Per Bar Close"**
5. Configure notification method (app, email, webhook)
#### Method 2: Custom Alert Message
Alert messages include full breakdown:
```
A+ Setup Detected (Score: 85)
Components: VWAP(25) + Structure(25) + CVD(20) + Time(15)
CVD State: Confirmation
Direction: Long
Timeframe: 1m
```
### Alert Behavior
✅ **One alert per unique pivot break** - no spam
✅ **Fires on candle close only** - no repainting
✅ **Minimum score filter** - only A grade or higher (≥60)
✅ **Direction-specific** - separate bullish/bearish conditions
⚠️ **No cooldown between different pivots** - multiple alerts per session allowed if different swing levels break
---
## 🔧 Technical Details
### Timeframe Lock
- **Required**: 1-minute chart only
- **Reason**: Scoring model calibrated for 1m micro-structure
- **Future**: Multi-timeframe support planned for v2
### Timezone Configuration
- **Hard-coded**: `America/New_York`
- **Session Detection**: Uses TradingView's native session functions
- **Consistency**: All time-based logic uses NY timezone
### Swing Detection Parameters
**Locked to specification:**
- `ta.pivothigh(source, left=2, right=2)`
- `ta.pivotlow(source, left=2, right=2)`
**Implications:**
- Pivots confirmed 2 bars after formation
- No repainting - historical pivots don't move
- 4-bar minimum swing structure (2 left + pivot + 2 right)
### VWAP Calculation
- **Type**: Session-anchored (resets daily)
- **Source**: Typical price `(high + low + close) / 3`
- **Weighting**: Volume-weighted
- **Standard Deviation**: True population standard deviation
### CVD Proxy Formula
```pine
barDelta = close > open ? volume : close < open ? -volume : 0
CVD = cumulative sum of barDelta (session-reset)
```
### Performance Limits
- **Max Labels**: 500 (TradingView limit)
- **Max Bars Back**: 500
- **Memory**: Lightweight - uses only essential variables
---
## 💡 Best Practices
### 1. **Use as a Filter, Not a Strategy**
❌ Don't: Blindly take every signal
✅ Do: Use score as confluence for your existing analysis
### 2. **Higher Grades = Better Probability**
- **A Setups (60-74)**: Regular opportunities, still require discretion
- **A+ Setups (75-89)**: High-quality, multiple factors aligned
- **A++ Setups (90-100)**: Rare premium opportunities, strongest edge
### 3. **Respect the VWAP Zone Filter**
The indicator **automatically blocks**:
- Longs in upper VWAP bands (counter-trend)
- Shorts in lower VWAP bands (counter-trend)
Trust this logic - it enforces mean reversion discipline.
### 4. **Monitor the Score Panel**
Watch which components are scoring to understand **why** a setup formed:
- Missing CVD score? → No order flow confirmation
- Missing Time score? → Outside high-volume sessions
- Low VWAP score? → Weak deviation from fair value
### 5. **Combine with Risk Management**
The indicator provides **opportunity scoring**, not position sizing:
- Use stop losses based on swing structure
- Scale position size with setup grade (larger on A++, smaller on A)
- Set profit targets at VWAP or opposing band
### 6. **Session Awareness**
Prioritize signals during **active sessions**:
- **03:00-04:00 NY**: Pre-market momentum
- **09:30-11:30 NY**: Highest volume, tightest spreads
Off-hours signals (0 time score) are lower probability but still valid if other factors strong.
### 7. **Understand the Hard Gate**
If **no structure shift** occurs:
- Total score = 0
- No alerts fire
- Other components irrelevant
**Why?** Structure shift confirms momentum change - without it, there's no tradable opportunity.
### 8. **Avoid Over-Optimization**
Default settings are well-calibrated:
- Don't chase "perfect" parameters
- Test changes on historical data before live use
- Document any modifications
### 9. **Leverage Alert De-Duplication**
The indicator prevents spam automatically:
- One alert per unique swing break
- New swing levels = new alerts
- No need to manually filter notifications
### 10. **Supplement with Price Action**
Use the indicator alongside:
- Support/resistance levels
- Order flow footprint charts
- Volume profile
- Market internals (breadth, TICK, etc.)
---
## 📚 Example Scenarios
### Example 1: A++ Premium Setup (Score: 95)
```
Price: In lower 3rd VWAP band (-2.8σ) → VWAP: 25 pts
Structure: Close breaks swing high → Structure: 25 pts
CVD: Price LL + CVD HL (bullish div) → CVD: 25 pts
Time: 10:15 AM NY (market open) → Time: 25 pts
Direction: LONG (price below VWAP) → Valid
Grade: A++ (95/100)
```
**Interpretation:** All factors aligned - premium mean-reversion long opportunity.
---
### Example 2: A+ Strong Setup (Score: 80)
```
Price: In upper 2nd VWAP band (+1.5σ) → VWAP: 15 pts
Structure: Close breaks swing low → Structure: 25 pts
CVD: Price HH + CVD LH (bearish div) → CVD: 25 pts
Time: 2:00 PM NY (off-hours) → Time: 0 pts
Direction: SHORT (price above VWAP) → Valid
Grade: A+ (65/100)
```
**Interpretation:** Strong setup despite off-hours, bearish divergence adds confidence.
---
### Example 3: Filtered Setup (Score: 0)
```
Price: In upper 3rd VWAP band (+2.5σ) → VWAP: 25 pts (if allowed)
Structure: Close breaks swing high → Structure: BLOCKED
CVD: Price HH + CVD HH (confirmation) → CVD: 20 pts (if allowed)
Time: 10:00 AM NY → Time: 25 pts (if allowed)
Direction: LONG (price ABOVE VWAP) → ❌ INVALID ZONE
Grade: None (0/100) - NO ALERT
```
**Interpretation:** VWAP filter blocked long signal in upper band - prevents counter-trend trade.
---
## 🛠️ Troubleshooting
### No Signals Appearing
- ✅ Verify you're on **1-minute chart**
- ✅ Check **Tick Size** matches your symbol
- ✅ Ensure **VWAP Bands** are visible
- ✅ Wait for confirmed pivots (requires at least 5 bars of history)
### Alerts Not Firing
- ✅ Confirm alert is set to **"Once Per Bar Close"**
- ✅ Check score threshold (must be ≥60 by default)
- ✅ Verify VWAP zone filter isn't blocking signals
- ✅ Check that structure shift is actually occurring
### Score Always Zero
- ✅ No structure shift detected (hard gate active)
- ✅ Price may not be in valid VWAP zone (2nd or 3rd band)
- ✅ Insufficient swing history (wait for pivots to form)
### Too Many/Too Few Signals
**Too many signals:**
- Increase **A Setup Threshold** (e.g., 70 instead of 60)
- Increase **Tick Buffer Count** (reduces false breaks)
**Too few signals:**
- Decrease **A Setup Threshold** (e.g., 50 instead of 60)
- Decrease **Tick Buffer Count** (more sensitive to breaks)
---
## 📜 License
This indicator is provided under the **Mozilla Public License 2.0**.
---
## 🤝 Credits
Developed as a professional trading tool for systematic opportunity identification.
**Philosophy:** Reduce noise. Enforce discipline. Keep the human in control.
---
## 📞 Support
For questions, issues, or feature requests, please consult:
1. This README documentation
2. The specification document (`pinescript_market_state_engine_spec.docx`)
3. Inline code comments in `market_state_engine.pine`
---
## 🔄 Version History
**v1.0** (Current)
- Initial release
- 4-component scoring model (VWAP + Structure + CVD + Time)
- VWAP zone directional filtering
- Alert de-duplication
- Configurable inputs
- Real-time score panel
- Session-aware logic
---
## 🎓 Understanding the Numbers
### Quick Reference Card
| Score Range | Grade | Quality | Typical Use |
|-------------|-------|---------|-------------|
| 90-100 | A++ | Premium | Highest conviction trades |
| 75-89 | A+ | High | Strong probability setups |
| 60-74 | A | Good | Acceptable with discretion |
| 0-59 | None | Filtered | Skip or wait for confluence |
### Component Contribution Examples
**Minimum A Setup (60 points):**
- Structure (25) + VWAP 3rd band (25) + Time (25) = 75 ✅
**Typical A+ Setup (75 points):**
- Structure (25) + VWAP 2nd band (15) + CVD confirm (20) + Time (25) = 85 ✅
**Maximum A++ Setup (100 points):**
- Structure (25) + VWAP 3rd band (25) + CVD divergence (25) + Time (25) = 100 ✅
---
## 🎯 Final Reminder
**This is NOT a trading bot.**
**This is NOT financial advice.**
**This is a decision-support tool.**
Always:
- ✅ Use proper risk management
- ✅ Understand the logic before trading
- ✅ Backtest on your symbols
- ✅ Keep the human in control
**Happy Trading! 📈**
Algo Reverse This indicator is a robust trend-following strategy designed to filter out market noise and "falling knife" scenarios. It combines Heikin Ashi reversal signals with a strict Smoothed EMA Slope Filter and a Candle Body Size Filter to ensure high-quality entries.
Unlike standard strategies that simply check if the price is above/below the EMA, this script verifies the actual angle/slope of the EMA to ensure the trend has genuinely shifted direction.
Key Features:
🛡️ Smoothed EMA Slope Filter:
Most indicators trigger a BUY the moment price crosses the EMA, leading to losses during fakeouts.
This script checks the EMA value against its value X bars ago (Setting: Slope Lookback).
Benefit: Signals are generated only when the EMA line itself is physically rising (Green) for Longs or falling (Red) for Shorts. This prevents entering too early on a sharp reversal.
🕯️ Candle Body Filter:
Filters out low-quality candles (Dojis, Spinning Tops) with long wicks.
Logic: A signal is valid only if the candle body constitutes at least 70% (default) of the total candle range.
Benefit: Ensures entries are made on strong momentum candles, not on market indecision.
🔹 Heikin Ashi + ATR Impulse:
Uses Heikin Ashi logic to detect smooth trend reversals.
Validates the move with an ATR multiplier to ensure sufficient volatility.
Settings Guide:
Confirmation Bars: 1 (Recommended). Waits for the candle to close to confirm the signal.
EMA Slope Lookback: 5 (Default). Compares current EMA to EMA 5 bars ago. Increase for more stability, decrease for faster (but riskier) signals.
Min Candle Body: 0.7 (70%). Lower to 0.5 for more signals, raise to 0.8 for stricter filtering.
Этот индикатор представляет собой надежную трендовую стратегию, разработанную для фильтрации рыночного шума и предотвращения входов против сильного тренда («ловли ножей»). Он объединяет разворотные сигналы Heikin Ashi со строгим Фильтром Сглаженного Наклона EMA и Фильтром Размера Тела Свечи.
В отличие от стандартных стратегий, которые просто смотрят положение цены относительно EMA, этот скрипт проверяет реальный угол наклона линии, гарантируя, что тренд действительно развернулся.
Ключевые особенности:
🛡️ Сглаженный Фильтр Наклона EMA (Smoothed Slope):
Обычные индикаторы часто дают ложный BUY при резком пробое EMA, когда тренд все еще смотрит вниз.
Этот скрипт сравнивает текущую EMA с её значением X баров назад (Настройка: Сглаживание наклона).
Польза: Сигнал появляется только тогда, когда сама линия EMA окрашивается в Зеленый (растет) или Красный (падает). Это защищает от ложных пробоев.
🕯️ Фильтр Тела Свечи (Body Filter):
Отсеивает «мусорные» свечи (Доджи, Волчки) с длинными тенями и маленьким телом.
Логика: Сигнал валиден, только если тело свечи занимает минимум 70% (по умолчанию) от всей длины свечи.
Польза: Входы совершаются только на сильных, полнотелых свечах, подтверждающих намерение рынка.
🔹 Heikin Ashi + ATR Импульс:
Использует логику Heikin Ashi для определения плавного разворота.
Подтверждает вход множителем ATR, чтобы исключить входы на низкой волатильности.
Настройки:
Подтверждение входа: 1 (Рекомендуется). Ждет закрытия свечи для фиксации сигнала.
Сглаживание наклона (Lookback): 5. Сравнивает EMA с EMA 5 свечей назад. Увеличьте для надежности, уменьшите для более быстрой реакции.
Мин. тело свечи: 0.7 (70%). Уменьшите до 0.5 для большего количества сигналов, увеличьте до 0.8 для строгого отбора.
Levels by @crypto.erkeI often use key levels to spot support/resistance zones, especially from higher timeframes like the previous month or week. I built this indicator to automatically plot the previous period's central level along with customizable bands (using std dev or percentage offsets) as horizontal lines on your chart. It helps visualize confluence areas for entries, stops, or targets without manual calculations.
Key Features:
Period Selection: Choose "Month" or "Week" to base levels on the previous full period's data.
Central Level Calculation: Uses HLC3 source by default (customizable), resetting at the start of each new period.
Bands Modes:
Standard Deviation: Bands at ±1σ, ±2σ, ±3σ (multipliers adjustable).
Percentage: Bands as % offsets from the central level.
Toggleable Bands: Show/hide each band pair (±1, ±2, ±3) individually.
Style Customization: Line widths, colors (e.g., blue for the central line, green/olive/teal for bands), and styles (solid, dotted, dashed).
Persistent Lines: Draws lines for the previous period's levels, extending them across the chart as new bars form. Limits to 500 lines for performance.
Real-Time Friendly: Works on any timeframe; ideal for intraday charts to overlay higher-period levels.
Why This Indicator?
Simplifies Analysis: Get instant access to previous month/week levels without switching charts or using multiple indicators.
Versatile for Strategies: Great for mean-reversion trades (bouncing off bands), breakouts (above/below the central line), or confirming trends. I use it daily in crypto for quick scalp setups.
Clean & Efficient: No fills or clutter—just clean lines that update dynamically. Switch to dotted/dashed for less visual noise.
Current Fractal High/Low (Dynamic) v2.3📝 Current Fractal High/Low (Dynamic) v2.3 – Changelog
➕ Additions:
New option: Enable Historical Fractals – Displays historical FH/FL levels with dashed lines for backtesting or reference.
Alert Conditions: Added alerts for breakout of the most recent Fractal High and Fractal Low (Fractal High Breakout & Fractal Low Breakout).
Inline Labels: Fractal labels (“FH” / “FL”) are now drawn directly on the lines for cleaner visuals.
Single Alert Toggle: Option to trigger alerts only once per breakout move.
Codebase prepared for future extensions (e.g., fractal tagging, fractal count logic, etc.).
🔧 Improvements:
Fractal updates now occur only when the previous high or low is broken (true breakout logic), not just when a new pivot forms.
Better variable management and prevention of re-declaration issues.
Ready for migration to Pine Script v6.
🛠 Known Issues / To-Do:
No option yet to limit max fractal history or show only the last fractal.
Label values are currently fixed to “FH” / “FL”; displaying price value instead is planned for a future update.
Supply & Demand Zones [PLUS]## 🟧 OVERVIEW
Supply & Demand Zones is a professional-grade technical analysis indicator designed to automatically detect and visualize key supply and demand zones on your chart. Built on Order Block and Price Action methodology, this indicator identifies areas where institutional buyers and sellers have placed significant orders, helping traders spot high-probability reversal and continuation zones.
Whether you are a day trader, swing trader, or position trader, this indicator provides clear, actionable zones that adapt to any market and timeframe.
---
## 🟧 HOW IT WORKS
The indicator uses a sophisticated detection algorithm based on two core principles:
**Consolidation Detection**
The algorithm first identifies consolidation (base) candles where price action shows minimal directional commitment. These are candles with small body-to-range ratios, indicating accumulation or distribution phases.
**Impulse Move Validation**
After consolidation, the algorithm waits for a strong impulse move (breakout). When price makes a decisive move away from the consolidation area with sufficient momentum, a zone is created:
- Strong bullish impulse after consolidation = DEMAND zone (support)
- Strong bearish impulse after consolidation = SUPPLY zone (resistance)
**Zone Lifecycle**
Each zone follows a clear lifecycle:
- FRESH: Newly created zone, untested by price
- RETEST: Price has returned to test the zone
- BREAK: Price has closed beyond the zone boundary, invalidating it
---
## 🟧 ICT SMART MONEY CONCEPTS
This indicator aligns with ICT (Inner Circle Trader) Smart Money Concepts, making it an essential tool for traders following institutional trading methodologies:
**Order Blocks**
Supply and demand zones detected by this indicator represent Order Blocks — areas where institutional traders have placed large orders. These zones mark the origin of strong price movements and often act as future support or resistance.
**Liquidity Pools**
Fresh zones indicate areas where retail stop losses and pending orders accumulate. Smart money often targets these zones to fill large positions before reversing price direction.
**Market Structure**
By tracking zone creation, retests, and breaks, traders can identify:
- Break of Structure (BOS): When zones are broken, indicating trend continuation
- Change of Character (CHoCH): When opposing zones form, suggesting potential reversal
- Fair Value Gaps: Impulse moves away from zones often create imbalances
**Mitigation and Rejection**
The retest tracking feature helps identify mitigation blocks — zones that price returns to before continuing in the original direction. High-quality retests with strong rejection (visible in zone status) indicate institutional order flow.
**Kill Zones Integration**
Combine this indicator with session-based analysis to identify zones created during high-volume periods (London Open, New York Open, Asian Session) for higher probability setups.
---
## 🟧 KEY FEATURES
**Automatic Zone Detection**
No manual drawing required. The indicator automatically identifies and plots supply and demand zones based on proven price action patterns.
**Smart Zone Filtering**
Built-in filters prevent chart clutter by removing weak zones, merging overlapping zones, and limiting the maximum number of displayed zones.
**ATR-Based Zone Sizing**
Zone thickness is dynamically adjusted using Average True Range (ATR) to ensure zones are proportional to current market volatility.
**Fresh, Retest, and Break Tracking**
Each zone displays its current status, allowing traders to quickly identify untested zones (highest probability) versus zones that have been retested or broken.
**Customizable Visuals**
Full control over zone colors, transparency, border styles, and text sizes for both demand and supply zones.
**Real-Time Updates**
Zones extend automatically as new candles form, and status updates in real-time as price interacts with each zone.
---
## 🟧 MULTI-MARKET COMPATIBILITY
This indicator works seamlessly across all markets available on TradingView:
**Cryptocurrency**
- Bitcoin (BTC), Ethereum (ETH), and all major altcoins
- Works on spot, futures, and perpetual contracts
- Effective on 24/7 markets with continuous price action
- Adapts to high volatility environments typical of crypto markets
**Forex**
- All major pairs (EUR/USD, GBP/USD, USD/JPY, etc.)
- Cross pairs and exotic currencies
- Perfect for session-based trading (London, New York, Tokyo)
- Timezone feature helps correlate zones with market sessions
**Stocks and Indices**
- Individual stocks on NYSE, NASDAQ, and global exchanges
- Index futures (ES, NQ, YM, etc.)
- ETFs and sector-specific instruments
- Works with pre-market and after-hours data
**Commodities**
- Gold, Silver, and precious metals
- Oil, Natural Gas, and energy markets
- Agricultural commodities
The ATR-based zone sizing automatically adapts to each market's volatility characteristics, ensuring optimal zone detection regardless of the instrument you trade.
---
## 🟧 TIMEFRAME COMPATIBILITY
This indicator is fully adaptive and works on all timeframes available on TradingView:
| Timeframe Category | Examples | Best For |
|-------------------|----------|----------|
| Scalping | 1m, 3m, 5m | Quick entries, tight stops |
| Intraday | 15m, 30m, 1H | Day trading, session-based trading |
| Swing | 4H, Daily | Multi-day holds, trend following |
| Position | Weekly, Monthly | Long-term investing, major levels |
The indicator automatically adjusts its detection parameters based on the selected timeframe to provide optimal zone detection across all trading styles.
---
## 🟧 TIMEZONE SUPPORT
The indicator includes comprehensive timezone support with 70+ major world timezones. Zone creation timestamps are displayed in your selected local time, making it easy to correlate zones with specific trading sessions:
- Americas: New York, Chicago, Los Angeles, Toronto, Sao Paulo
- Europe: London, Paris, Frankfurt, Zurich, Moscow
- Asia-Pacific: Tokyo, Hong Kong, Singapore, Sydney, Dubai
- And many more...
Select your local timezone in the settings to see zone creation times in your preferred format.
---
## 🟧 DETECTION MODES
Three detection modes are available to match your trading style:
**Confirmed Only (Default)**
Zones are only created after the candle closes. This provides the most reliable signals with zero repaint risk. Recommended for most traders.
**Realtime Preview**
Zones can be created on the current candle before it closes. Provides faster signals but with minor noise potential.
**Realtime Aggressive**
Updates on every price tick. Fastest response but highest noise. Only recommended for experienced traders who understand the tradeoffs.
---
## 🟧 WHO SHOULD USE THIS INDICATOR
This indicator is designed for:
- **Price Action Traders** who base their decisions on support and resistance levels
- **Supply and Demand Traders** looking for automated zone identification
- **Order Block Traders** who want to identify institutional order flow areas
- **ICT/Smart Money Traders** applying institutional trading concepts
- **Swing Traders** seeking key levels for entries and exits
- **Day Traders** who need quick identification of intraday levels
- **Crypto Traders** navigating volatile digital asset markets
- **Forex Traders** trading major and exotic currency pairs
- **Stock Traders** analyzing equities and indices
- **Risk Managers** who want clear zones for stop loss and take profit placement
---
## 🟧 ALERT SYSTEM
Built-in alert system notifies you of important zone events:
- **Fresh Zone Alert**: Triggered when a new zone is created
- **Retest Alert**: Triggered when price returns to test an existing zone
- **Break Alert**: Triggered when a zone is invalidated by price
Alerts can be configured to send notifications via TradingView app, email, webhook, or other supported methods.
---
## 🟧 SETTINGS OVERVIEW
**Consolidation Settings**
- Consolidation Threshold: Defines what constitutes a base candle (default 73%)
**Move Strength Settings**
- Min Move Strength: Minimum impulse required to create a zone (default 60%)
- Min Move Size (ATR): Minimum move size relative to ATR (default 0.5)
**Zone Filter Settings**
- Enable Zone Filter: Toggle all filtering on/off
- Min Zone Size (ATR): Minimum zone height filter
- Min/Max Zone Thickness: Zone size limits
- Min Base Candles: Required consolidation length
- Overlap Threshold: Controls zone merging behavior
- Max Zones Limit: Maximum zones
**Visual Settings**
- Separate color controls for Fresh and Retest zones
- Border width and style options
- Text size and color customization
- Break zone display options
---
## 🔶 UPGRADE TO PRO 🔶
Looking for more advanced features? **Supply & Demand Zones AI ** includes:
🔸 AI/ML-Based Zone Strength Scoring (0-100%)
🔸 Touch Quality and Bounce Strength Analysis
🔸 Advanced Volume Analysis and Validation
🔸 Multiple Retest Color Levels (1, 2, 3+)
🔸 Professional Break Alerts with Stop Loss Warnings
🔸 Enhanced Visual Indicators and Symbols
🔸 Base Candle Counter for Consolidation Analysis
---
## 🟧 USAGE TIPS
1. **Fresh Zones First**: Prioritize trading from fresh zones as they have the highest probability of holding.
2. **Confluence**: Combine zones with other analysis methods (trendlines, moving averages, Fibonacci) for higher probability setups.
3. **Multi-Timeframe**: Check higher timeframe zones for major levels, then use lower timeframe zones for precise entries.
4. **Risk Management**: Always place your stop loss beyond the zone boundary to account for zone breaks.
5. **Session Awareness**: Use timezone settings to understand when zones were created relative to major trading sessions.
---
## 🟧 DISCLAIMER
This indicator is provided for educational and informational purposes only. It does not constitute financial advice. Past performance does not guarantee future results. Always conduct your own analysis and use proper risk management when trading.
SWING ATR BasedWhat does this indicator do?
1. It identifies Market Swings The script monitors price action to detect when a trend changes direction.
It uses ATR (Average True Range) to measure volatility, ensuring it doesn't get tricked by small, insignificant price movements.
To validate a change in direction (from bullish to bearish, or vice versa), it waits for the price to cover a specific distance (defined by the kRange parameter) and requires at least two significant candles.
2. It plots Support and Resistance zones As soon as a new high or low point is confirmed:
In Green (Bull): It draws a support line at the level of the last low.
In Red (Bear): It draws a resistance line at the level of the last high.
Auto-Cleaning: If the price breaks through a support line, the line turns gray and stops. The script only keeps active (unbroken) levels on the screen.
3. It calculates an "SGE Score" (Market State) This is the "brain" of the script. It assigns a rating to the current trend:
+2 (Bullish): The price has broken a resistance.
-2 (Bearish): The price has broken a support.
0 (Neutral): The market is indecisive (for example, after a break that contradicts the previous one).
Key Feature: This score has a "one-candle delay." It waits for the next candle to close before confirming a score change, which helps avoid reacting too quickly to false alerts.
4. It simplifies visual reading To keep your chart clean and readable:
It only highlights the 3 levels closest to the current price (those most likely to be hit soon).
It colors the chart candles directly: Green if the score is +2, Red if the score is -2, and Gray if it is neutral.
5. Dashboard In the top-right corner of your screen, it displays a permanent summary:
The current score (-2, 0, or 2).
The number of active supports and resistances.
Summary: This is a "smart" trend detector. Instead of just looking at whether the price is going up or down, it waits for the price to break important structural levels (confirmed by volatility) to tell you: "Caution, the structure has just shifted from bullish to bearish."
Recommended Settings:
kRange: 1.3 / 1.4
ATR Mult: 0.3 to 0.5
Script created with Claude AI.






















