Smart Trend Lines 𝒯𝒽𝑒_𝓁𝓊𝓇𝓀𝑒𝓇Smart Trend Lines is a tool for drawing dynamic, highly accurate, and error-free trend lines (major, intermediate, and short-term) with the detection of breaks in these lines using advanced filters such as ADX (Average Directional Index), RSI (Relative Strength Index), and trading volume. It aims to assist traders in accurately identifying trends and breakout points, thereby enhancing decision-making in trading.
1. Features of the Indicator
// Dynamic Trend Line Drawing with Three Lengths:
- Main Line: Based on a long time period (default is 50 candles) to identify long-term trends.
- Mid Line: Based on a medium time period (default is 21 candles) to identify medium-term trends.
- Short Line: Based on a short time period (default is 9 candles) to identify short-term trends.
//Breakout Detection:
- Monitors breakouts when the price crosses a trend line, either upward (for downward lines) or downward (for upward lines).
- Uses filters (ADX, RSI, volume) to confirm the validity of the breakout and reduce false signals.
//Filters for Signal Confirmation:
- ADX: Confirms the strength of the trend (default minimum is 20).
- RSI: Checks for overbought conditions (above 65) or oversold conditions (below 35) to avoid false breakouts.
- Trading Volume: Compares the current trading volume with the moving average of volume to ensure momentum.
//Flexible Settings:
- Customization of line colors (upward and downward) and styles (solid, dashed, dotted).
- Option to show or hide mid and short lines.
- Selection of price type for breakout detection (close, high, low).
//Optional Display of Previous Lines:
- Allows users to optionally view previously drawn trend lines.
//Alerts and Labels:
- Provides instant alerts when a breakout occurs, along with details of the achieved conditions (e.g., V for volume, A for ADX, R for RSI).
- Adds visual labels on the chart at the point of breakout, with customizable label sizes.
//Automatic Line Extensions:
- Dynamically extends trend lines as long as they remain unbroken, ensuring that prices do not breach the line in the opposite direction.
2. Methods of Drawing Lines
// Identification of Pivot Points:
- Pivot High and Pivot Low points are detected using specific time periods for each type of line (Main: 50, Mid: 21, Short: 9).
- High points (Pivot High) are used to draw downward trend lines, while low points (Pivot Low) are used to draw upward trend lines.
Clarification:
- The `ta.pivothigh` function is used to identify high points (Pivot High), and the `ta.pivotlow` function is used to identify low points (Pivot Low) based on the specified periods for each line:
- Main Line:** Uses `trendLineLength` (default 50 candles).
- Mid Line:** Uses `trendLineLengthMid` (default 21 candles).
- Short Line:** Uses `trendLineLengthShort` (default 9 candles).
- High points (Pivot High) are utilized to draw downward trend lines, while low points (Pivot Low) are utilized to draw upward trend lines.
This ensures that the trend lines are dynamically drawn based on significant price pivots, providing a precise representation of the market's directional movements.
//Calculating the Slope:
- The slope between two points (start and end) is calculated using the difference in price divided by the difference in the number of candles:
Slope = ( Price Difference/Number of Candles Difference)
- Downward trend lines require a negative slope, indicating that the price is decreasing over time.
- Upward trend lines require a positive slope, indicating that the price is increasing over time.
This calculation ensures that the trend lines accurately reflect the direction and rate of price movement, providing traders with a clear visual representation of the market's momentum.
Additional Notes:
- The slope of the line reflects not only the direction (upward or downward) but also the intensity of the trend. The steeper the slope, the stronger and faster the price movement.
- The use of this dynamic method for calculating the slope ensures that trend lines adapt to changing market conditions, providing real-time updates for traders.
- The mathematical precision of this method enhances the reliability of trend lines and reduces errors, making it a valuable tool for technical market analysis.
//Drawing the Lines:
- Base Line (Start Line): Connects the two Pivot points (start and end).
- Extended Line (Trend Line): Starts from the endpoint of the base line and extends to the current candle with the same slope.
- The line's color and style are determined based on user settings (e.g., red for downward lines, green for upward lines).
Clarification:
- The function `line.new` is used to draw the base line (`bearishStartLine`) from the starting point (`bearStartIndex, bearStartVal`) to the endpoint (`bearEndIndex, bearEndVal`).
- The extended line (`bearishTrendLine`) starts from the endpoint and extends to the current candle (`bar_index`) using the slope (`bearSlope`) to maintain the trend direction.
// Extending the Lines:
- The lines are dynamically extended to the current candle if no breakout occurs.
- The extension stops when a breakout occurs or if the price crosses the line in the opposite direction.
Clarification:
- The function `extendTrendline` updates the extended line by modifying the endpoint coordinates (`x2, y2`) to the current candle (`bar_index`) using the slope (`slope).
- If a crossover in the opposite direction is detected via `checkExtendedStrictMode`, the extension stops at the previous candle.
3. Conditions for Drawing Lines
Presence of at Least Two Pivot Points:
- Drawing a line requires the presence of two Pivot points:
- Two high points (Pivot High) for a downward line.
- Two low points (Pivot Low) for an upward line.
- These points must fall within a specified time period, not exceeding five times the length of the line.
Slope Validation:
- A downward line requires a negative slope, meaning the endpoint is lower than the starting point.
- An upward line requires a positive slope, meaning the endpoint is higher than the starting point.
Validation of Strict Mode:
- All candles between the two Pivot points are examined to ensure that the price does not breach the trend line:
- For a downward line: The price (close, high, or low, depending on the settings) must not exceed the projected value of the line.
- For an upward line: The price must not fall below the projected value of the line.
This ensures that the trend line remains valid and accurately reflects the price movement without interruptions caused by temporary breaches.
Validation of Post-Pivot Break:
- Candles after the endpoint are examined to ensure that the price has not breached the line in the opposite direction, ensuring the line's validity.
Validation of Strict Extension:
- When extending the line, it is confirmed that the price does not breach the extended line in the opposite direction.
These checks ensure the trend line remains accurate and reliable, both during its initial drawing and as it dynamically extends over time.
4. Conditions for Breakout Detection
Price Crossing the Line:
- For a downward line: The price (close, high, or low, depending on the settings) exceeds the level of the line.
- For an upward line: The price falls below the level of the line.
Candle Confirmation:
- The candle must be closed (confirmed) to register the breakout.
Filter Conditions:
- Trading Volume:
- The trading volume must be higher than the moving average.
- For an upward breakout: A green candle (close > open) with a volume higher than the last green candle is preferred.
- For a downward breakout: A red candle (close < open) with a volume higher than the last red candle is preferred.
- ADX (Average Directional Index):
- The ADX value must exceed the minimum threshold (default is 20) to confirm the strength of the trend.
- RSI (Relative Strength Index) (if enabled):
- For an upward breakout: The RSI should be less than or equal to the upper limit (65) to avoid overbought conditions.
- For a downward breakout: The RSI should be greater than or equal to the lower limit (35) to avoid oversold conditions.
Non-Repetition of Breakouts:
- Each breakout is recorded only once per line until a new line is drawn.
These conditions ensure that breakouts are accurately detected and validated, minimizing false signals and enhancing the reliability of the trading decisions.
5. Additional Notes
Display Settings:
- Users can choose to show or hide previous lines and customize the size of labels (e.g., Very Small, Small, Normal, Large, Huge).
Visual Styles:
- Line styles vary to facilitate differentiation:
- Solid for the main line.
- Dashed for the intermediate line.
- Dotted for the short-term line.
Alerts:
- A single alert is sent for each breakout, with text specifying the type of breakout (main, intermediate, short) and the filters that have been met.
These features enhance user experience by providing flexibility in visualization, ease of interpretation, and timely notifications for informed trading decisions.
Disclaimer
The information and posts are not intended to be, or constitute, any financial, investment, trading or other types of preparation or execution of tasks or endorsed by TradingView.
Smart Trend Lines هو مؤشر تحليل فني يرسم خطوط اتجاه ديناميكية (رئيسية، متوسطة، قصيرة) على الرسم البياني، ويكتشف كسورها باستخدام فلاتر ADX، RSI، وحجم التداول لتأكيد الإشارات.
1. المميزات
1. خطوط اتجاه بثلاثة أطوال:
- رئيسي (50 شمعة): للاتجاهات طويلة الأمد.
- متوسط (21 شمعة): للاتجاهات متوسطة الأمد.
- قصير (9 شموع): للاتجاهات قصيرة الأمد.
2. اكتشاف الكسور: يرصد اختراق السعر للخطوط مع فلاتر لتقليل الإشارات الكاذبة.
3. فلاتر التأكيد:
- ADX (>20): يؤكد قوة الاتجاه.
- RSI (65/35): يتجن“B” للرئيسي، “M” للمتوسط، “S” للقصير).
4. إعدادات مرنة: تخصيص الألوان، الأنماط (متصل، متقطع، منقط)، ونوع السعر (إغلاق، أعلى، أدنى).
5. تمديد الخطوط: يمدد الخطوط تلقائيًا حتى الكسر.
2. طرق رسم الخطوط
1. نقاط Pivot: تحديد النقاط العليا (للخطوط الهابطة) والدنيا (للصاعدة) باستخدام فترات زمنية (50، 21، 9).
2. حساب الميل: قسمة فرق السعر على فرق الشموع (ميل سالب لهابط، موجب لصاعد).
3. رسم الخطوط: خط أساسي يربط نقطتي Pivot، وخط ممتد إلى الشمعة الحالية.
4. التمديد: يستمر التمديد إذا لم يُكسر الخط.
3. شروط الرسم
1. وجود نقطتين Pivot ضمن فترة (≤5 أضعاف طول الخط).
2. ميل مناسب (سالب لهابط، موجب لصاعد).
3. الوضع الصارم: السعر لا يخترق الخط بين النقطتين.
4. فحص ما بعد النقطة: عدم اختراق الخط بعد النهاية.
5. تمديد صارم: السعر لا يخترق الخط الممتد.
4. شروط الكسر
1. اختراق السعر للخط (فوق الهابط، تحت الصاعد).
2. تأكيد الشمعة (مغلقة).
3. فلاتر:
- حجم أعلى من المتوسط، مع شمعة خضراء (للصاعد) أو حمراء (للهابط).
- ADX > 20.
- RSI: ≤65 (صاعد)، ≥35 (هابط).
4. كسر واحد لكل خط.
5. ملاحظات
- العرض: خيارات لإخفاء الخطوط السابقة وتخصيص التسميات.
- التنبيهات: تنبيهات فورية مع تفاصيل الفلاتر.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView.
Pivot points and levels
Camarilla Pivots & BBT StrategiesThis indicator implements the Camarilla Pivot Points system used in the Bear Bull Traders community and described in the book "A Complete Day Trading System" by Thor Young. It works for stocks, ETFs and futures (see note below for futures). It's for intraday trading; it doesn't work on sub-minute timeframes nor on daily and above timeframes; you'll get an error, so you can't use this indicator for inter-day, e.g. monthly pivots (just use the built-in TradingView pivot point indicator if you want those).
It calculates and shows the support and resistance Camarilla levels at the 3rd, 4th and 6th levels. It does not use the 1st, 2nd or 5th levels since these are not used by the system. These display correctly irrespective of whether the chart setting is RTH or ETH. It also displays the 12 strategies defined by the system, when the strategy conditions are fulfilled. There are 6 strategies for when the pivots are in an upper range, and their converse 6 when in a lower range. The strategies can be found at bearbulltraders.com/pivotbook, download "Pivot Sheet". It optionally also displays weekly and monthly pivots.
The strategies are labelled HA-HF and LA-LF. The first letter refers to whether it's a Higher or Lower range strategy. The second letter refers to the letter of the strategy in the Pivot Sheet. By default the indicator draws strategies 5 days back; this can be changed up to 20 days.
Finally it displays information at the top-right of chart indicating whether RTH or ETH data is in use, the range of the pivots (upper, lower, neutral), their width (wide, narrow, similar) and the currently active strategy. If multiple strategies are active in parallel, only the last activated one is shown in this information.
When displaying strategies in the premarket, since the RTH open is not yet known (and that value is needed to evaluate strategy pre-conditions), the pre-market open on the currently used chart timeframe is used as proxy value for the RTH open. After the regular market opens, the correct RTH open is used to evaluate strategy conditions.
The resistance pivots are all drawn in the same colour (red by default), as are the support pivots (green by default). You can change the resistance and support colours, but it is not possible to have different colours for different levels of the same kind. The strategies will always use the correct colour however, drawing over the pivots. For example, R4 is red by default, but if a strategy makes R4 a support, then the strategy will draw a green line (by default) over the red R4 line, thereby hiding it, during when the strategy is active.
The pivots are very close to those shown in the main trading platform used in the Bear Bull Traders community, not to-the-cents exact, but within a few cents. The reasons are i) TradingView uses real-time data from CBOE One, so doesn't have access to full exchange data (unless you pay for it in TradingView) and, ii) the close/high/low are taken from intra-day data, not daily data, which are very close but often not exactly the same. For example, the high on the daily timeframe may differ slightly from the daily high you'll see on an intraday timeframe. I have occasionally seen big differences in the pivots between these and DAS Trader Pro - this is always due to difference in data, for example a big spike in the data in TradingView but not in DAS, or vice versa. If it bothers you, official NYSE/NASDAQ data in TradingView is not too expensive.
The indicator is highly configurable with many options to change how they work, but it has sensible defaults. By default, the pivots will automatically switch between using ETH and RTH data, and only one set of pivots is ever shown. There are few advanced parameters; leave these as default unless you really know what they do. Please note the script is complicated, it does a lot. You might need to wait a few seconds while it (re)calculates on new tickers or when changing options - give it time when first loading or changing options!
Note for Futures:
Futures don't officially have a pre-market or post-market like equities. Let's take ES on CME as an example (CME is in Chicago, so all times are Central Time, i.e. 1 hours behind Eastern Time). It trades from 17:00 Sunday to 16:00 Friday, with a daily pause between 16:00 and 17:00. However, most of the trading activity is done between 08:30 and 15:00 (Central), which you can tell from the volume spikes at those times and this coincides with NYSE/NASDAQ regular hours (09:30-16:00 Eastern). So we define a pseudo-pre-market from 17:00 the previous day to 08:30 on the current day, then a pseudo-regular market from 08:30 to 15:00, then a pseudo-post-market from 15:00 to 16:00. The indicators then work exactly the same as with equities, all the options behave the same, just with different session times defined for the pre-, regular and post-market, with "RTH" meaning just the regular market, and "ETH" meaning all three. The only difference from equities is that the auto calculation mode always uses ETH instead of switching based on ETH range compared to RTH range. This is so users who just leave all the defaults are not confused by auto switching of the calculation mode; normally you'll want the pivots based on all the (ETH) data. However both "Force RTH" and "Use RTH close with ETH data" work the same as with equities, so if in the calculations you really want to only use RTH data, or use all ETH H/L data but use the RTH close (at 15:00), you can.
SMC Entry Signals MTF v2📘 User Guide for the SMC Entry Signals MTF v2 Indicator
🎯 Purpose of the Indicator
This indicator is designed to identify reversal entry points based on Smart Money Concepts (SMC) and candlestick confirmation. It’s especially useful for traders who use:
Imbalance zones, order blocks, breaker blocks
Liquidity grabs
Multi-timeframe confirmation (MTF)
📈 How to Use the Signals on the Chart
✅ LONG Signal (green triangle below the candle):
Conditions:
Price is in a discount zone (below the FIB 50% level)
A bullish engulfing candle appears
A bullish Order Block (OB) or Breaker Block is detected
There’s an upward imbalance
A bullish OB is confirmed on the higher timeframe
➡️ How to act:
Consider entering long on the current or next candle.
Place your stop-loss below the OB or the nearest swing low.
Take profit at the nearest liquidity zone or premium area (above FIB 50%).
🔻 SHORT Signal (red triangle above the candle):
Conditions:
Price is in a premium zone (above FIB 50%)
A bearish engulfing candle appears
A bearish OB or Breaker Block is detected
There’s a downward imbalance
A bearish OB is confirmed on the higher timeframe
➡️ How to act:
Consider short entry after the signal.
Place your stop-loss above the OB or swing high.
Target the discount zone or the next liquidity pocket.
⚙️ Recommended Settings by Trading Style
Trading Style Suggested Settings Notes
Intraday (1–15m) fibLookback = 20–50, obLookback = 5–10, htf_tf = 1H/4H Fast signals. Use Discount/Premium + Engulfing.
Swing/Position (1H–1D) fibLookback = 50–100, obLookback = 10–20, htf_tf = 1D/1W Higher trust in MTF confirmation. Ideal with fundamentals.
Scalping (1m) fibLookback = 10–20, obLookback = 3–5, htf_tf = 15m/1H Remove Breaker and MTF for quick reaction trades.
🧠 Best Practices for Traders
Trend Filtering:
Use EMAs or volume to confirm the current trend.
Take longs only in uptrends, shorts in downtrends.
Liquidity Zones:
Use this indicator after liquidity grabs.
OBs and Breakers often appear right after stop hunts.
Combine with Manual Zones:
This works best when paired with manually drawn OBs and key levels.
Backtest the Signals:
Use Bar Replay mode on TradingView to test past signals.
🧪 Example Trade Setup
Example on BTCUSDT 15m:
Price drops into the discount zone.
A green triangle appears (bullish engulfing + OB + imbalance + HTF OB).
You enter long, stop below the OB, target the premium zone.
🎯 This type of setup often gives a risk/reward ratio of 1:2 or better — profitable even with a 40% win rate.
⏰ Alerts & Automation
Enable alerts:
"SMC Long Entry" — fires when a long signal appears.
"SMC Short Entry" — fires when a short signal appears.
You can integrate this with bots via webhook, like:
TradingConnector, 3Commas, Alertatron, etc.
✅ What This Indicator Gives You
High-probability entries using SMC logic
Customizable filters for entry logic
Multi-timeframe confirmation for stronger setups
Suitable for both intraday and swing trading
Auto Darvas Boxes## AUTO DARVAS BOXES
---
### OVERVIEW
**Auto Darvas Boxes** is a fully-automated, event-driven implementation of Nicolas Darvas’s 1950s box methodology.
The script tracks consolidation zones in real time, verifies that price truly “respects” those zones for a fixed validation window, then waits for the first decisive range violation to mark a directional breakout.
Every box is plotted end-to-end—from the first candle of the sideways range to the exact candle that ruptures it—giving you an on-chart, visually precise record of accumulation or distribution and the expansion that follows.
---
### HISTORICAL BACKGROUND
* Nicolas Darvas was a professional ballroom dancer who traded U.S. equities by telegram while touring the world.
* Without live news or Level II, he relied exclusively on **price** to infer institutional intent.
* His core insight: true market-moving entities leave footprints in the form of tight ranges; once their buying (or selling) is complete, price erupts out of the “box.”
* Darvas’s original procedure was manual—he kept notebooks, drew rectangles around highs and lows, and entered only when price punched out of the roof of a valid box.
* This indicator distills that logic into a rolling, self-resetting state machine so you never miss a box or breakout on any timeframe.
---
### ALGORITHM DETAIL (FOUR-STATE MACHINE)
**STATE 0 – RANGE DEFINITION**
• Examine the last *N* candles (default 7).
• Record `rangeHigh = highest(high, N) + tolerance`.
• Record `rangeLow = lowest(low, N) – tolerance`.
• Remember the index of the earliest bar in this window (`startBar`).
• Immediately transition to STATE 1.
**STATE 1 – RANGE VALIDATION**
• Observe the next *N* candles (again default 7).
• If **any** candle prints `high > rangeHigh` or `low < rangeLow`, the validation fails and the engine resets to STATE 0 **beginning at the violating candle**—no halfway boxes, no overlap.
• If all *N* candles remain inside the range, the box becomes **armed** and we transition to STATE 2.
**STATE 2 – ARMED (LIVE VISUAL FEEDBACK)**
• Draw a **green horizontal line** at `rangeHigh`.
• Draw a **red horizontal line** at `rangeLow`.
• Lines are extended in real time so the user can see the “live” Darvas ceiling and floor.
• Engine waits indefinitely for a breakout candle:
– **Up-Breakout** if `high > rangeHigh`.
– **Down-Breakout** if `low < rangeLow`.
**STATE 3 – BREAKOUT & COOLDOWN**
• Upon breakout the script:
1. Deletes the live range lines.
2. Draws a **filled rectangle (box)** from `startBar` to the breakout bar.
◦ **Green fill** when price exits above the ceiling.
◦ **Red fill** when price exits below the floor.
3. Optionally prints two labels at the left edge of the box:
◦ Dollar distance = `rangeHigh − rangeLow`.
◦ Percentage distance = `(rangeHigh − rangeLow) / rangeLow × 100 %`.
• After painting, the script waits a **user-defined cooldown** (default = 7 bars) before reverting to STATE 0. The cooldown guarantees separation between consecutive tests and prevents overlapping rectangles.
---
### INPUT PARAMETERS (ALL ADJUSTABLE FROM THE SETTINGS PANEL)
* **BARS TO DEFINE RANGE** – Number of candles used for both the definition and validation windows. Classic Darvas logic uses 7 but feel free to raise it on higher timeframes or volatile instruments.
* **OPTIONAL TOLERANCE** – Absolute price buffer added above the ceiling and below the floor. Use a small tolerance to ignore single-tick spikes or data-feed noise.
* **COOLDOWN BARS AFTER BREAKOUT** – How long the engine pauses before hunting for the next consolidation. Setting this equal to the range length produces non-overlapping, evenly spaced boxes.
* **SHOW BOX DISTANCE LABELS** – Toggle on/off. When on, each completed box displays its vertical size in both dollars and percentage, anchored at the box’s left edge.
---
### REAL-TIME VISUALISATION
* During the **armed** phase you see two extended, colour-coded guide-lines showing the exact high/low that must hold.
* When the breakout finally occurs, those lines vanish and the rectangle instantly appears, coloured to match the breakout direction.
* This immediate visual feedback turns any chart into a live Darvas tape—no manual drawing, no lag.
---
### PRACTICAL USE-CASES & BEST-PRACTICE WORKFLOWS
* **INTRADAY MOMENTUM** – Drop the script on 1- to 15-minute charts to catch tight coils before they explode. The coloured box marks the precise origin of the expansion; stops can sit just inside the opposite side of the box.
* **SWING & POSITION TRADING** – On 4-hour or daily charts, boxes often correspond to accumulation bases or volatility squeezes. Waiting for the box-validated breakout filters many false signals.
* **MEAN-REVERSION OR “FADE” STRATEGIES** – If a breakout immediately fails and price re-enters the box, you may have trapped momentum traders; fading that failure can be lucrative.
* **RISK MANAGEMENT** – Box extremes provide objective, structure-based stop levels rather than arbitrary ATR multiples.
* **BACK-TEST RESEARCH** – Because each box is plotted from first range candle to breakout candle, you can programmatically measure hold time, range height, and post-breakout expectancy for any asset.
---
### CUSTOMISATION IDEAS FOR POWER USERS
* **VOLATILITY-ADAPTIVE WINDOW** – Replace the fixed 7-bar length with a dynamic value tied to ATR percentile so the consolidation window stretches or compresses with volatility.
* **MULTI-TIMEFRAME LOGIC** – Only arm a 5-minute box if the 1-hour trend is aligned.
* **STRATEGY WRAPPER** – Convert the indicator to a full `strategy{}` script, automate entries on breakouts, and benchmark performance across assets.
* **ALERTS** – Create TradingView alerts on both up-breakout and down-breakout conditions; route them to webhook for broker automation.
---
### FINAL THOUGHTS
**Auto Darvas Boxes** packages one of the market’s oldest yet still potent price-action frameworks into a modern, self-resetting indicator. Whether you trade equities, futures, crypto, or forex, the script highlights genuine contraction-expansion sequences—Darvas’s original “boxes”—with zero manual effort, letting you focus solely on execution and risk.
T GEX LevelsDraw GEX levels from T
Use Case
Purpose: Visualizes key GEX levels to aid traders in identifying potential support (positive) and resistance (negative) zones based on options market data.
Visual Cues:
Thicker, more opaque lines highlight higher (more significant) price levels.
Fainter, thinner lines indicate lower (less significant) levels.
Ghost zones highlight price gaps where price movement may be less contested.
Application: Useful for options traders analyzing gamma exposure to anticipate price behavior near key levels.
Custom Opening Range - CommoditiesThe Custom Opening Range Indicator for Commodities is designed for instruments that trade nearly 24 hours, such as crude oil or natural gas. It allows traders to define the Opening Range based on Indian Standard Time (IST)—typically starting at 3:30 AM IST, which aligns with the global commodities market open. Users can customize both the start time and duration of the range (e.g., 5, 15, or 30 minutes). The indicator dynamically plots the high and low of this range and shades the area between them, providing a clear visual reference for breakout or reversal setups during the rest of the trading session.
Combined High Low & MI Pivot PointsThis is an major upgrade of the old MI_Pivots indicator with mid levels. I have included key levels like the Yesterday high and low, Last weeks high and low and combined it into one indicator. If you trade Forex or Crypto intraday you need this indicator 😊
Smart Market Matrix Smart Market Matrix
This indicator is designed for intraday, scalping, providing automated detection of price pivots, liquidity traps, and breakout confirmations, along with a context dashboard featuring volatility, trend, and volume.
## Summary Description
### Menu Settings & Their Roles
- **Swing Pivot Strength**: Controls the sensitivity for detecting High/Low pivots.
- **Show Pivot Points**: Toggles the display of HH/LL markers on the chart.
- **VWMA Length for Trap Volume** & **Volume Spike Multiplier**: Identify concentrated volume spikes for liquidity traps.
- **Wick Ratio Threshold** & **Max Body Size Ratio**: Detect candles with disproportionate wicks and small bodies (doji-ish) for traps.
- **ATR Length for Trap**: Measures volatility specific to trap detection.
- **VWMA Length for Breakout Volume**, **ATR Multiplier for Breakout**, **ATR Length for Breakout**, **Min Body/Range Ratio**: Set adaptive breakout thresholds based on volatility and volume.
- **OBV Smooth Length**: Smooths OBV momentum for breakout confirmation.
- **Enable VWAP Filter for Confirmations**: Optionally validate breakouts against the VWAP.
- **Enable Higher-TF Trend Filter** & **Trend Filter Timeframe**: Align breakout signals with the 1h/4h/Daily trend.
- **ADX Length**, **EMA Fast/Slow Length for Context**: Parameters for the context dashboard (Volatility, Trend, Volume).
- **Show Intraday VWAP Line**, **VWAP Line Color/Width**: Display the intraday VWAP line with custom style.
### Signal Interpretation Map
| Signal | Description | Recommended Action |
|--------------------------------|-----------------------------------------------------------|-------------------------------------------|
| 📌 **HH / LL (pivot)** | Market structure (support/resistance) | Note key levels |
| **Bull Trap(green diamond)** | Sweep down + volume spike + wick + rejection | Go long with trend filter
| **Bear Trap(red diamond)** | Sweep up + volume spike + wick + rejection | Go short with trend filter
| 🔵⬆️ **Breakout Confirmed Up** | Close > ATR‑scaled high + volume + OBV↑ | Go long with trend filter |
| 🔵⬇️ **Breakout Confirmed Down** | Close < ATR‑scaled low + volume + OBV↓ | Go short with trend filter |
| 📊 **VWAP Line** | Intraday reference to guide price | Use as dynamic support/resistance |
| ⚡ **Volatility** | ATR ratio High/Med/Low | Adjust position size |
| 📈 **Trend Context** | ADX+EMA Strong/Moderate/Weak | Confirm trend direction |
| 🔍 **Volume Context** | Breakout / Rising / Falling / Calm | Check volume momentum |
*This summary gives you a quick overview of the key settings and how to interpret signals for efficient intraday scalping.*
### Suggested Settings
- **Intraday Scalping (5m–15m)**
- `Swing Pivot Strength = 5`
- `VWMA Length for Trap Volume = 10`, `Volume Spike Multiplier = 1.6`
- `ATR Length for Trap = 7`
- `VWMA Length for Breakout Volume = 12`, `ATR Length for Breakout = 9`, `ATR Multiplier for Breakout = 0.5`
- `Min Body/Range Ratio for Breakout = 0.5`, `OBV Smooth Length = 7`
- `Enable Higher-TF Trend Filter = true` (TF = 60)
- `Show Intraday VWAP Line = true` (Color = orange, Width = 2)
- **Swing Trading (4h–Daily)**
- `Swing Pivot Strength = 10`
- `VWMA Length for Trap Volume = 20`, `Volume Spike Multiplier = 2.0`
- `ATR Length for Trap = 14`
- `VWMA Length for Breakout Volume = 30`, `ATR Length for Breakout = 14`, `ATR Multiplier for Breakout = 0.8`
- `Min Body/Range Ratio for Breakout = 0.7`, `OBV Smooth Length = 14`
- `Enable Higher-TF Trend Filter = true` (TF = D)
- `Show Intraday VWAP Line = false`
*Adjust these values based on the symbol and market volatility for optimal performance.*
Anchored Darvas Box## ANCHORED DARVAS BOX
---
### OVERVIEW
**Anchored Darvas Box** lets you drop a single timestamp on your chart and build a Darvas-style consolidation zone forward from that exact candle. The indicator freezes the first user-defined number of bars to establish the range, verifies that price respects that range for another user-defined number of bars, then waits for the first decisive breakout. The resulting rectangle captures every tick of the accumulation phase and the exact moment of expansion—no manual drawing, complete timestamp precision.
---
### HISTORICAL BACKGROUND
Nicolas Darvas’s 1950s box theory tracked institutional accumulation by hand-drawing rectangles around tight price ranges. A trade was triggered only when price escaped the rectangle.
The anchored version preserves Darvas’s logic but pins the entire sequence to a user-chosen candle: perfect for analysing a market open, an earnings release, FOMC minute, or any other catalytic bar.
---
### ALGORITHM DETAIL
1. **ANCHOR BAR**
*You provide a timestamp via the settings panel.* The script waits until the chart reaches that bar and records its index as **startBar**.
2. **RANGE DEFINITION — BARS 1-7**
• `rangeHigh` = highest high of bars 1-7 plus optional tolerance.
• `rangeLow` = lowest low of bars 1-7 minus optional tolerance.
3. **RANGE VALIDATION — BARS 8-14**
• Price must stay inside ` `.
• Any violation aborts the test; no box is created.
4. **ARMED STATE**
• If bars 8-14 hold the range, two live guide-lines appear:
– **Green** at `rangeHigh`
– **Red** at `rangeLow`
• The script is now “armed,” waiting indefinitely for the first true breakout.
5. **BREAKOUT & BOX CREATION**
• **Up breakout** =`high > rangeHigh` → rectangle drawn in **green**.
• **Down breakout**=`low < rangeLow` → rectangle drawn in **red**.
• Box extends from **startBar** to the breakout bar and never updates again.
• Optional labels print the dollar and percentage height of the box at its left edge.
6. **OPTIONAL COOLDOWN**
• After the box is painted the script can stay silent for a user-defined number of bars, letting you study the fallout without another range immediately arming on top of it.
---
### INPUT PARAMETERS
• **ANCHOR TIME** – Precise yyyy-mm-dd HH:MM:SS that seeds the sequence.
• **BARS TO DEFINE RANGE** – Default 7; affects both definition and validation windows.
• **OPTIONAL TOLERANCE** – Absolute price buffer to ignore micro-wicks.
• **COOLDOWN BARS AFTER BREAKOUT** – Pause length before the indicator is allowed to re-anchor (set to zero to disable).
• **SHOW BOX DISTANCE LABELS** – Toggle to print Δ\$ and Δ% on every completed box.
---
### USER WORKFLOW
1. Add the indicator, open settings, and set **ANCHOR TIME** to the candle you care about (e.g., “2025-04-23 09:30:00” for NYSE open).
2. Watch live as the script:
– Paints the seven-bar range.
– Draws validation lines.
– Locks in the box on breakout.
3. Use the box boundaries as structural stops, targets, or context for further trades.
---
### PRACTICAL APPLICATIONS
• **OPENING RANGE BREAKOUTS** – Anchor at the first second of the session; capture the initial 7-bar range and trade the first clean break.
• **EVENT STUDIES** – Anchor at a news candle to measure immediate post-event volatility.
• **VOLUME PROFILE FUSION** – Combine the anchored box with VPVR to see if the breakout occurs at a high-volume node or a low-liquidity pocket.
• **RISK DISCIPLINE** – Stop-loss can sit just inside the opposite edge of the anchored range, enforcing objective risk.
---
### ADVANCED CUSTOMISATION IDEAS
• **MULTIPLE ANCHORS** – Clone the indicator and anchor several boxes (e.g., London open, New York open).
• **DYNAMIC WINDOW** – Switch the 7-bar fixed length to a volatility-scaled length (ATR percentile).
• **STRATEGY WRAPPER** – Turn the indicator into a `strategy{}` script and back-test anchored boxes on decades of data.
---
### FINAL THOUGHTS
Anchored Darvas Boxes give you Darvas’s timeless range-break methodology anchored to any candle of interest—perfect for dissecting openings, economic releases, or your own bespoke “important” bars with laboratory precision.
Horizontal Color BandsJust horizontal bands running across the chart. Choice of 2 colors you pick and the spacing is a percentage of price. The "grid" runs up from a price you choose and also can be dragged around on the chart. Possibly makes trading measured % moves visually clearer....
[Stop!Loss] ADR Signal ADR Signal - a technical indicator located in a separate window, which displays by default the 80%-level , as well as the 100%-level of the average daily range (ADR) for the last 10 days and compares it with the current intraday range. The indicator helps not only with the use of a mathematical-statistical method to identify a potential reversal at the moment during intraday trading, but can also serves as an effective assistant in risk management.
👉 Basic mechanics of the indicator
Firstly, this indicator tracks the performance of the standard ATR indicator on the daily chart, in other words, ADR (Average Daily Range).
Important ❗️The ATR (Average True Range) indicator was created by J. Welles Wilder Jr. He first introduced ATR in his book "New Concepts in Technical Trading Systems", published in 1978. Wilder developed this indicator to measure market volatility to help traders estimate the range of price movements. This indicator is built into TradingView, more details can be found by link: www.tradingview.com
Like ATR , ADR calculates the average true range for a specified period. In this case, the distance in points from the maximum of each day to its minimum is calculated, after which the arithmetic mean is calculated - this is ADR .
👉 Visualization
ADR Signal is located in a separate window on the chart and has 3 levels:
1) "ADR level" (green line) - the same parameter, the calculations of which are briefly described above. There is 100%-level of ATR on the daily chart (ADR).
2) "Current level" (red line) - this is the current price passage within the day, calculated in points. At the start of a new day, this parameter is reset. Therefore, in the indicator window, this line has sharp drops at the start of a new trading day: "A new trading day - the instrument's power reserve is renewed again".
3) "Signal level" (blue line) - this is an individually customized value that demonstrates a certain part of the ADR parameter.
👉 Inputs
1) - is responsible for the ATR indicator period, the value of which will always be calculated on the daily chart. The default value is "10", that is, ATR is calculated for the last 10 days (not including the current one).
2) - signal level (in %). The default value is "0.8", that is, 80%-level of the ADR parameter (set earlier) is calculated.
👉 Style
1) - by default, this level is colored "blue".
2) - by default, this level is colored "red".
3) - by default, this level is colored "green".
👉 How to use this indicator
Important❗️ The two methods of the use of the ADR Signal indicator described below will be most effective when trading intraday (which is highlighted quite well below), so it is more logical to use the indicator information on time periods H1 and below.
1) Identifying potential reversals during intraday trading:
The ADR Signal indicator can be used as a potential individual reversal strategy.
Important ❗️It should be noted that using it in it without additional confirming analysis tools will be a rather aggressive trading approach. Therefore, it is best to support the entry point in particular with other methods.
In this case, the crossing of the red line (the number of points passed within the current day, that is, from the minimum of the current day to its maximum) and the blue line (color of the Signal level based on the default settings), indicates that the trading instrument has passed 80% (based on the default settings for the "Signal level") of its average distance from the maximum to the minimum over the past 10 days (based on the default settings for the "ADR Length"). Such a situation in the context of the mathematical-statistical approach indicates a probable reversal, since the "power reserve" of this instrument is mostly exhausted, so one can expect with a higher probability, at least, a price stop and possibly a reversal. In case of crossing of the red line and the green one (ADR level), it says again that based on the mathematical-statistical approach, this trading instrument has completely exhausted its intraday "power reserve". In this situation, a stop or reversal of the price will be even more likely.
Of course, using the "Signal level" parameter, one can filter out even more reliable situations for potential price reversals within a day, namely, by specifying, for example, 1.5 in the field of this parameter. Under such conditions, in the case of crossing the red and blue lines (based on the default style settings), to say that the trading instrument has passed 150% of its average distance over the last 10 days (based on the default style settings "ADR length"). In this case, the probability of a stop or reversal of the price increases even more.
2) Use in risk management:
In terms of risk management, this indicator is more applicable to open trades. For example, if one had an open Buy-position (especially if it is an intraday trade) and the price has raised significantly during the day, then the crossing of the red line with the blue line , and especially the red line with the green line , may indicate that the price will most likely stop growing, since the "power reserve" is almost or completely exhausted for this instrument within the current day. In this case, one can, at a minimum, move the trade to breakeven or even partially fix the profit.
We will continue to discuss the methods of using this indicator and strategies based on it here. And we are always waiting for your reactions and feedback on this topic 💬.
Thank you for your support 🚀
trail Timeframe Divergence TableFirst Version of Timeframe Divergence which can possibly point to a potential reversal
DC - Volatility ZigZag Support/ResistanceThis indicator combines advanced Volatility ZigZag detection, SMA 200 trend analysis, and dynamic support/resistance zones based on volume and price pivots. It's designed to help traders visually identify trend reversals, key price levels, and potential breakouts or bounces with clarity and precision.
What It Does
Volatility ZigZag: Uses price volatility (standard deviation, ATR, true range) to plot ZigZag lines and identify significant trend changes. Labels provide reversal price, price/percentage change, and volume data between pivots.
SMA 200: Plots the 200-period Simple Moving Average to indicate the long-term trend direction.
Support/Resistance Zones: Automatically detects price levels based on pivot highs/lows confirmed by volume conditions. Boxes are color-coded and dynamically update based on breakout or retest behavior.
⚙️ Key Features
Fully customizable ZigZag settings: deviation %, pivot confirmation, std dev factor, and lookback length.
Configurable visuals: pivot markers (⦿), alert points (◯), and labeled statistics between pivots.
Volume-sensitive support/resistance zones that react to breakouts or bounces.
Alerts for new ZigZag pivots.
Data window feedback on trend status and deviation metrics.
✅ Ideal For
Swing traders tracking reversals or continuation patterns.
Trend followers using SMA 200 and pivot points for confirmation.
Volume-based traders looking for support/resistance backed by meaningful volume spikes or drops.
Highest/Lowest Range in TimeframeThis script helps traders visually identify the highest high and lowest low within a customizable range of recent bars.
🔍 Key Features
Scans the last 100 to 1000 bars (user-defined)
Automatically detects:
The highest wick (high) and lowest wick (low)
Draws dotted green horizontal lines at both levels
Shows a label indicating the percentage range between high and low
Displays real-time high and low price labels directly on the chart
⚙️ Use Cases
Quickly spot price extremes over your desired time window
Visually measure market range and volatility
Identify breakout potential or reversal zones
✅ How to Use
Add the script to your chart.
Set the “Bars to Scan” input to your desired lookback period (between 100–1000).
Use the displayed lines and labels to identify key high/low price levels and range metrics.
TrendBoxThis indicator is called "TrendBox," designed to help traders analyze daily price ranges using several technical indicators. Below is a breakdown of its functionality, purpose, and key components:
Purpose
The script overlays indicators on a chart to assess whether the price is above or below key levels:
VWAP (Volume Weighted Average Price, based on the chart's timeframe).
Daily Market Open (fetched from the daily timeframe).
Daily 4-period VWMA (Volume Weighted Moving Average, fetched from the daily timeframe).
VIX-based expected range (high and low levels calculated using the VIX index).
It also displays a status box (optional) summarizing whether the price is above or below these levels, helping traders quickly evaluate market conditions.
OI GridTo draw a horizontal line that compares spot and future prices, users can select a symbol and an OI range for each asset.
Adaptive ATR LimitsThis script plots adaptive ATR limits for intraday trading. It is intended for equities. It is not tested for other securities like futures, crypto, etc, though it may work for these too. It works for both regular trading hours and extended trading hours.
The limit lines (top and bottom) are always exactly 1 ATR/ADR apart. This is a key feature of the indicator.
The main mode is ATR, which includes overnight gaps and pre- and post-market movements. This also means the previous day close is considered to part of the current days range (which aligns with the definition of ATR). There is also an ADR mode, which uses the average range the price moves within regular hours only and is not affected by prices outside of these. Other than that, they work the same (including ATR/ADR length option and smoothing).
When in ADR mode, it treats premarket as a separate session from the regular/post-market and resets the session range at the regular market open. This is so it can plot the limits in the regular/post-market hours without being affected by the pre-market range. This is necessary since the daily ADR includes only regular market moves and due to the way the limits adapt.
It tries to plot the most sensible ATR limits based on the current daily ATR, in order to provide a visual target for how far a price could/should move intraday. In order to do this, it uses two methods to calculate limits, i) based on the mid-point of the current session range, and ii) based on the currently established range and current relative price position within that range.
The session starts using the first method. As more of the ATR is covered in the session, it transitions over of the second method. Once (if) the full ATR is covered within the session, it will have completely transitioned to the second method and will only use that for the rest of the session. In between these states, a weighted average of the two methods is used depending on the amount of the ATR the session has covered.
To explain the effect, as an example, imagine that the price is approaching the full ATR range on the high side. The indicator will have almost fully transitioned to the second (relative) method. The lower ATR limit will now be anchored to the daily low as the price hits the upper ATR limit. If the price goes beyond the upper ATR, the lower ATR limit will stay anchored to the daily low, and the upper limit will stay anchored to 1 ATR above the lower limit. This allows you to see how far the price is going beyond the upper ATR limit. If the price then returns and backs off the upper ATR limit, the lower ATR limit will un-anchor from the daily low (it will actually rise since the daily ATR range has been exceeded so the lower ATR limit needs to come up since the actual daily range can't fit into the ATR range anymore). The overall effect is to give you the best visual indication where the price is in relation to a possible upper ATR-based target. Reverse this example for when price low approaches the ATR range on the low side.
There is also a "basic mode" which simply plots 1 ATR/ADR above/below the session low/high. When using ADR, the session resets at the end of the pre-market.
The ATR length (averaging period) can be set (number of days), as well as a visual smoothing of the ATR limits using EMA.
Really Key LevelsAn indicator showing (only) the most important trading levels.
Works for equities. Probably doesn't work for futures, crypto, etc.
Shows RTH H/L (today and yesterday), RTH open, pre-market H/L (today and yesterday), RTH close (yesterday and 2 days ago), with nice labels. By default, only the most important of these are enabled.
Special features of this indicator that it works the same for RTH and ETH charts (even showing -pre-market H/L on an RTH chart), and the levels indicate the exact bar that the level relates to.
Colours, line styles and widths and the position of the label are configurable.
If you would like me to add other levels or features, feel free to ask me and, if I agree, when I do it can be influenced by buying me a coffee, snack or lunch (depending on the difficulty).
Daily Levels & Stats Pro - [Aspect] v4.0# Description of the "Daily Levels & Stats Pro - v4.0" Indicator
This indicator is a powerful tool for market analysis through the lens of key daily levels and statistical price movement indicators. It allows you to display important trading session opening levels, daily statistical movements, and high volatility zones on the price chart.
## Main Indicator Functions:
### Key Time Levels:
- **Daily Open (DO)** - daily trading session opening level at 02:00
- **NY Midnight (NYM)** - New York session opening level at 06:00
- **Trade Open (TO)** - active trading opening level at 10:00
### Analysis Zones:
- **Previous Close Zone (PCZ)** - previous day's closing zone (displayed on M5 timeframe)
- **Open Day Zone (ODZ)** - current day's opening zone (displayed on M5 timeframe)
### Statistical Price Movement Levels:
- **Min** - minimum statistical movement from DO
- **Max** - maximum statistical movement from DO
- **Aver** - average statistical movement from DO
- **Dev-** - lower deviation of movement from DO
- **Dev+** - upper deviation of movement from DO
### TO Impulse Movement Statistical Levels:
- **Aver TO** - average statistical movement from TO
- **Dev+ TO** - upper deviation of movement from TO
- **Max TO** - maximum statistical movement from TO
## Indicator Features:
- Complete customization of colors, styles, and line widths for all levels
- Ability to select time for each main level
- Adjustment of the number of bars for level display
- Automatic calculation of level values relative to DO and TO
- Visual display of TO-levels starts 3 bars before the actual TO point, providing better visual perception
- Ability to enable/disable individual levels and zones
- Automatic updates and resets when the day changes
- Adaptive text labels to mark levels
This indicator is excellent for traders who use statistical data and daily support/resistance levels in their trading strategy. It is particularly useful for DAX40 and other highly liquid instruments where daily trading statistics are important for making trading decisions.
Horizontal Price TableOverview:
This script displays a dynamic price table on your chart, showing real-time prices and daily percentage changes for up to 7 user-defined tickers. You can customize both which tickers are shown and how many are visible, all through the settings panel.
How it works (Step-by-Step):
User-Defined Tickers:
The script provides input fields for up to 7 tickers using input.symbol(). You can track stocks, indexes, ETFs, crypto, or futures — anything supported by TradingView.
Choose How Many to Display:
An additional dropdown lets you choose how many of the 7 tickers to actually display (between 1 and 7). This gives you control over screen space and focus.
Market Data Fetching:
For each displayed ticker, the script fetches:
The current day’s closing price (close)
The previous day’s closing price (close )
This data is pulled using request.security() on the daily timeframe (1D).
% Change Calculation:
The script calculates the daily percentage change using:
(Current Price−Previous Close)/Previous Close×100(Current Price−Previous Close)/Previous Close×100
Cleaned Ticker Names:
Ticker symbols often include an exchange prefix like NASDAQ:AAPL. The script automatically removes anything before the colon (:), so only the clean symbol (e.g., AAPL) is shown in the table.
Table Display:
A visual table appears at the top-center of your chart, showing:
Row 1: Ticker symbol (cleaned)
Row 2: Current price (rounded to 2 decimals)
Row 3: Daily % change (green for gains, red for losses)
Customization:
You can choose the background color of the table.
Ticker names appear in white text with a gray background.
% change is color-coded: green for positive, red for negative.
Why Use This Script?
Track multiple tickers at once without leaving your chart.
Clean, customizable layout.
Useful for monitoring watchlists, portfolios, or related markets.
Tips:
Combine this with your favorite indicators for a personalized dashboard.
Works great on any chart or timeframe.
Ensure the tickers entered are valid on TradingView (e.g., SPY, BTCUSD, NQ1!, etc.).
Semaphore📌 Indicator Description: Semaphore
The Semaphore indicator plots three key moving averages on the current asset's price, allowing users to select between SMA (Simple Moving Average) or EMA (Exponential Moving Average), and to choose whether the calculation should be based on the daily timeframe or the current chart timeframe.
🔧 Customizable Parameters:
Moving average type: SMA or EMA.
Data source: Daily timeframe or current chart timeframe.
Fixed lengths: 10 (short-term), 21 (medium-term), and 50 (long-term).
🎯 What does it do?
Calculates and plots the three selected moving averages.
Automatically adapts to the chosen timeframe (e.g., display daily averages on a 1h chart).
Color-coded lines for easy visual distinction:
🔵 Blue for the 10-period MA
🟡 Yellow for the 21-period MA
🔴 Red for the 50-period MA
🌟 Benefits and Advantages:
Timeframe flexibility: Follow higher timeframe trends (daily) while trading on lower timeframes.
Clean and quick visual reference: With just three colored lines, you get a clear view of short, medium, and long-term trends.
Perfect for “traffic light” strategies: For example, all MAs aligned in one direction can indicate strong trend confirmation.
Universal use: Works seamlessly with any asset — stocks, crypto, forex, indices, and more.