Daily Borders with Weekday Labels[fitfatq]Indicator Overview
This indicator displays daily vertical border lines and the previous day’s weekday label on intraday charts (i.e., charts with a timeframe lower than Daily). It draws a vertical line at the start of each new trading day and places a label displaying the previous day’s weekday (e.g., Monday) at the horizontal midpoint between the previous and the current day. Users can customize various visual aspects such as the separator line style and width, label style, text color, and text size. Additionally, the indicator offers an option to fix the label’s Y coordinate at a specified price level to prevent it from being overlapped by candlesticks.
Parameter Details
Use Fixed Weekday Label Y Coordinate
Type: Boolean
Default: false
Description: When enabled, the weekday label’s vertical position will be fixed at a specified price level (see next parameter). Otherwise, the label’s Y position is determined dynamically (typically based on the current bar’s low minus 3 ticks).
Fixed Weekday Label Y Coordinate (price)
Type: Float
Default: 130.0
Description:
This parameter sets the fixed price level at which the weekday label will be displayed if the "Use Fixed Weekday Label Y Coordinate" option is enabled. Please input a value that corresponds to your chart’s price scale (e.g., 130.50). Note: In charts with high price levels (for example, stocks trading at 3000 or above), it is recommended to set this value to 3000 or above. The higher the value, the closer the label will appear to the candlesticks.
Separator Line Style
Type: String (Options: "Solid", "Dotted", "Dashed")
Default: "Dotted"
Description: Specifies the style of the vertical separator line drawn at the start of each new day. "Solid" displays a continuous line, "Dotted" shows a dotted line, and "Dashed" provides a dashed line.
Separator Line Width
Type: Integer
Default: 1
Description: Determines the thickness of the separator line. A higher number results in a thicker line; the minimum value is 1.
Label Style
Type: String (Options: "None", "Label Up", "Label Down", "Label Left", "Label Right", "Label Center")
Default: "None"
Description: Sets the built-in style for the weekday label. "None" means no background or border (plain text only), while other options apply predefined visual effects.
Text Color
Type: Color
Default: Black
Description: Determines the text color of the weekday label.
Label Text Size
Type: String (Options: "Tiny", "Small", "Normal", "Large", "Huge")
Default: "Normal"
Description: Specifies the text size of the weekday label. Adjust according to preference to ensure the label is readable.
Usage Summary
How It Works:
The indicator detects the start of a new trading day using a change in the daily timeframe (via ta.change(time("D"))). When a new day begins, it draws a vertical separator line at the first bar of that day. If previous day data is available, the indicator calculates the horizontal midpoint between the start of the previous day and the current day and displays the previous day’s weekday label at that position. If the fixed Y coordinate option is enabled, the label is drawn at the specified price level; otherwise, it is positioned relative to the current bar’s low.
Customization:
Users can adjust all visual aspects, including the line style and width as well as the label style, text color, and text size. The fixed Y coordinate option allows the label’s vertical position to remain constant, which helps prevent overlapping with price bars.
Chart Requirement:
This indicator only operates on intraday charts (timeframes lower than Daily) and will not display on Daily or higher timeframe charts.
License
This indicator is released under the Mozilla Public License 2.0. Please credit the original author (fitfatq) when using or sharing this script.
دورات
Dynamic EMA ColorEMA 5 with colour, when the price is below then it is red if the price is above then it is green
Optimized Liquidity Sweep RSI Divergence StrategyIncreasing your win percentage isn’t solely about tweaking code—it involves:
Systematic testing: Validate each change over sufficient historical data.
Market context understanding: Know that different market conditions might favor one type of filter over another.
Holistic review: Evaluate not just the win rate but also your overall expectancy. A lower win rate with a strong risk/reward might be more profitable than a high win rate with low rewards.
Continue experimenting while keeping thorough records of your backtests and live results. This iterative process will help you tailor your approach to achieve that target 70% win rate. If you have further questions or need additional modifications, feel free to ask!
BySq - Market PsychologyThe script I provided is a Market Psychology Index indicator for TradingView, which focuses on three key psychological market phases:
FOMO (Fear of Missing Out)
Panic Selling
Reversal
This indicator uses volume, price changes, and specific time periods to gauge market sentiment. Let me break it down:
1. Input Parameters:
FOMO Period: Defines how many bars (candles) the FOMO index will consider for its calculation.
Panic Period: Defines the period to evaluate Panic Selling.
Reversal Period: Defines the period to evaluate potential price reversals.
You can adjust these periods based on your analysis preferences. The default for each period is 14.
2. FOMO Index:
The FOMO Index aims to capture the "fear of missing out" behavior in the market.
It uses volume and price change:
Volume is compared to the Simple Moving Average (SMA) of volume over the specified period.
Price change is calculated as the percentage change in price compared to the previous bar.
If both volume and price change indicate strong upward movement, the FOMO index spikes.
3. Panic Selling Index:
The Panic Selling Index captures when traders are selling out of fear, often in a rapid or irrational way.
Similar to the FOMO Index, it considers volume and price change:
It uses volume and compares it to the SMA of volume for the panic period.
Price change is negative, meaning it considers only price drops.
When there is high volume coupled with significant price drops, it signals panic selling.
4. Reversal Index:
The Reversal Index aims to detect potential trend reversals in the market.
This index also considers volume and price change:
It focuses on upward price movement and compares volume to its SMA.
If there’s strong upward price movement along with increasing volume, it signals the possibility of a price reversal.
5. Graphical Output:
Histograms are drawn on the chart for each of the three indices:
FOMO is shown in green (indicating the presence of FOMO) and red (when the index is low).
Panic Selling is shown in orange.
Reversal is shown in purple.
The Zero Line (horizontal dotted line) helps identify when any of the indices is positive or negative.
6. Labels:
Labels for each index are shown on the chart at the relevant bar when the index spikes.
FOMO is labeled "FOMO" in green when it spikes.
Panic Selling is labeled "Panic Selling" in orange when it spikes.
Reversal is labeled "Reversal" in purple when it spikes.
Additionally, period labels show above the chart, indicating the specific periods (FOMO, Panic, and Reversal periods) currently being applied. This provides clarity on what time frame each index is analyzing.
7. How to Use:
FOMO: High values may indicate that traders are buying out of fear of missing out on a rally, suggesting a potentially overheated market.
Panic Selling: High values could suggest irrational selling behavior or capitulation, potentially marking the bottom of a downtrend.
Reversal: High values signal the potential for a market reversal, where the price could change direction due to increased volume and upward movement.
8. Visual Appearance:
The indicator’s histograms change colors based on the level of market sentiment detected. The color-coded approach provides an easy-to-read visual representation of different psychological phases in the market.
The horizontal zero line allows easy differentiation between positive and negative values.
Summary:
This script combines the psychology of the market (FOMO, Panic Selling, and Reversal) into a set of indicators that help traders identify potential turning points or emotional states in the market. By focusing on volume and price change, the script attempts to give a clear picture of market sentiment and possible future movements.
S15-5&30This serves as an indicator that can easily see the intervals of 5 minutes and 30 minutes, on a 15 second chart for ES futures
only real trading hours
you can customize colors and dashed / solid for the vertical lines
30-1-BlockBe able to easily and visually see on the 1 minute chart, every time a 30 minute internal has started and ended. allowing to remind yourself on the 1 minute chart, whenever a new 30 minute candlestick is closing and opening. Goes back for the last 20 days on the 1 minute chart and you can choose the color of the vertical lines that separate each 30 minute interval
Quick Futures Scalperai algorithms have concocted this script for quick futures trading pair this with my main futures buy sell indicator chart for maximum charitability. cross compatible to different charts.
SL - 4 EMAs, 2 SMAs & Crossover SignalsThis TradingView Pine Script code is built for day traders, especially those trading crypto on a 1‑hour chart. In simple words, the script does the following:
Calculates Moving Averages:
It computes four exponential moving averages (EMAs) and two simple moving averages (SMAs) based on the closing price (or any price you select). Each moving average uses a different time period that you can adjust.
Plots Them on Your Chart:
The EMAs and SMAs are drawn on your chart in different colors and line thicknesses. This helps you quickly see the short-term and long-term trends.
Generates Buy and Sell Signals:
Buy Signal: When the fastest EMA (for example, a 10-period EMA) crosses above a slightly slower EMA (like a 21-period EMA) and the four EMAs are in a bullish order (meaning the fastest is above the next ones), the script will show a "BUY" label on the chart.
Sell Signal: When the fastest EMA crosses below the second fastest EMA and the four EMAs are lined up in a bearish order (the fastest is below the others), it displays a "SELL" label.
In essence, the code is designed to help you spot potential entry and exit points based on the relationships between multiple moving averages, which work as trend indicators. This makes it easier to decide when to trade on your 1‑hour crypto chart.
Bysq-Distance Reversal Entry - BTCUSDT (v6)Strategy Concept
This is a hybrid momentum-reversal strategy for BTC/USDT that combines:
A distance-based momentum approach (original Bysq-style)
A MACD crossover reversal system
The strategy uses technical indicators and statistical distance measurements to identify potential trend reversals and momentum shifts.
analyzPian### Description of the Script: **AnalyzPian Indicator**
The **AnalyzPian** indicator is a TradingView Pine Script designed to identify and visualize bullish and bearish price swings, breakouts, and retests on a chart. It uses pivot points (highs and lows) to detect significant price movements and overlays boxes and labels to highlight these areas for traders. Below is a detailed breakdown of its functionality and features:
---
### **Key Features**
1. **Dual Swing Detection**:
- The script identifies both **bullish** and **bearish** swings using pivot points (`ta.pivothigh` and `ta.pivotlow`).
- These swings are used to define potential breakout zones.
2. **Breakout and Retest Zones**:
- Once a swing is detected, the script creates a box around the price level to represent the **potential breakout zone**.
- If the price breaks out of the box, it transitions into a **retest phase**, where the script looks for retests of the breakout level.
3. **Customizable Display Options**:
- Users can choose to display **Bullish**, **Bearish**, or both types of swings.
- Additional options allow filtering for **last retest only** or showing **all retests** with labels.
4. **Dynamic Box Adjustments**:
- Boxes dynamically adjust their width based on user-defined parameters (`maxBars`, `minBars`).
- If the right side of the box exceeds the maximum allowed bars without a signal, the box is either deleted or reset to the last retest position.
5. **Labeling System**:
- Labels are added to indicate **breakouts** (▲ or ▼) and **retests** (▽ or △).
- Labels are styled differently for bullish and bearish signals and can be customized in terms of color and size.
6. **State Management**:
- The script uses a state machine (`state`) to track the lifecycle of each swing:
- **State 0**: Initial state, waiting for a swing detection.
- **State 1**: Swing detected, breakout zone created.
- **State 2**: Breakout confirmed, retest zone active.
7. **ATR-Based Width**:
- The width of the boxes is calculated using the **Average True Range (ATR)**, ensuring that the zones adapt to market volatility.
8. **User Inputs**:
- Extensive customization options are provided through input parameters:
- **Display Options**: Choose between bullish, bearish, or both.
- **Box Width**: Adjust the multiplier for ATR-based width.
- **Maximum Bars**: Set the maximum number of bars without a signal before resetting.
- **Minimum Bars**: Define the minimum distance between labels.
- **Set Back Option**: Reset the box to the last retest position if the right side is too far.
9. **Visual Enhancements**:
- Boxes and labels are styled with customizable colors and transparency for better visualization.
- Labels use intuitive symbols (▲, ▼, ▽, △) to clearly indicate the type of signal.
---
### **How It Works**
1. **Swing Detection**:
- The script uses `ta.pivothigh` and `ta.pivotlow` to identify significant highs and lows based on user-defined left and right lookback periods.
- These pivots serve as the foundation for creating breakout and retest zones.
2. **Box Creation**:
- When a swing is detected, a box is drawn around the price level to represent the breakout zone.
- The box's height is determined by the ATR, and its width expands dynamically as new bars are added.
3. **Breakout Confirmation**:
- If the price moves outside the box (breakout), the script transitions to the next state and creates a new box for the retest phase.
- Labels are added to mark the breakout point.
4. **Retest Detection**:
- During the retest phase, the script monitors whether the price revisits the breakout level.
- If a retest occurs, a label is added to indicate the event.
5. **Reset Mechanism**:
- If no signal is detected within the maximum allowed bars, the box is either deleted or reset to the last retest position.
---
### **Use Cases**
1. **Trend Identification**:
- Traders can use the indicator to identify bullish and bearish trends by observing the direction of breakouts and retests.
2. **Entry and Exit Points**:
- Breakout zones can serve as potential entry points, while retests provide confirmation for trades.
3. **Risk Management**:
- The boxes help visualize key support and resistance levels, aiding in stop-loss placement and risk assessment.
4. **Market Analysis**:
- The dynamic nature of the indicator makes it suitable for analyzing both trending and ranging markets.
---
### **Code Structure**
1. **Settings Section**:
- Contains user-defined inputs for customizing the behavior and appearance of the indicator.
2. **UDT (User-Defined Type)**:
- Defines a `bin` type to store information about each swing, including its state, price level, and associated labels.
3. **Methods**:
- Includes helper functions for managing labels, checking conditions, and updating states.
4. **Execution Logic**:
- Implements the core logic for detecting swings, managing states, and drawing boxes and labels.
---
### **Conclusion**
The **AnalyzPian** indicator is a powerful tool for traders who want to visually analyze price swings, breakouts, and retests. Its flexibility, combined with its intuitive design, makes it suitable for a wide range of trading strategies. By leveraging pivot points and ATR-based zones, the script provides actionable insights into market dynamics while maintaining a clean and customizable interface.
Futures Buy/Sell IndicatorAi generated algorithm for buy and sell times for futures. Works on multiple charts.
Futures Buy/Sell IndicatorDeveloped by Ai this chart provides buy sell times. Sell you longs on the sell or buy shorts on sell marks.
StonkGame Major Market Open/ClosePlots vertical lines for Tokyo, London, and New York session opens and closes — auto-adjusted to your chart's timezone.
Open lines = lighter, dashed style.
Close lines = solid, full-color style.
Helps identify key liquidity windows, session-driven volatility, and clean market structure — without chart clutter.
Fully customizable colors and line styles for a professional, minimal look.
China 10-Year Yield Inverted with Time Lead (Months)The "China 10-Year Yield Inverted with Time Lead (Months)" indicator is a Pine Script tool for TradingView that displays the inverted China 10-Year Government Bond Yield (sourced from TVC:CN10Y) with a user-defined time lead or lag in months. The yield is inverted by multiplying it by -1, making a rising yield appear as a downward movement and vice versa, which helps visualize inverse correlations with other assets. Users can input the number of months to shift the yield forward (lead) or backward (lag), with the shift calculated based on the chart’s timeframe (e.g., 20 bars per month on daily charts). The indicator plots the shifted, inverted yield as a blue line in a separate pane, with a zero line for reference, enabling traders to analyze leading or lagging relationships with other financial data, such as the PBOC Balance Sheet or Bitcoin price.
🌌 Astro Energy IndicatorAstro energy indicator to help you see how the astro energy is effecting the market and the price.
Price Position Percentile (PPP)
Price Position Percentile (PPP)
A statistical analysis tool that dynamically measures where current price stands within its historical distribution. Unlike traditional oscillators, PPP adapts to market conditions by calculating percentile ranks, creating a self-adjusting framework for identifying extremes.
How It Works
This indicator analyzes the last 200 price bars (customizable) and calculates the percentile rank of the current price within this distribution. For example, if the current price is at the 80th percentile, it means the price is higher than 80% of all prices in the lookback period.
The indicator creates five dynamic zones based on percentile thresholds:
Extremely Low Zone (<5%) : Prices in the lowest 5% of the distribution, indicating potential oversold conditions.
Low Zone (5-25%) : Accumulation zone where prices are historically low but not extreme.
Neutral Zone (25-75%) : Fair value zone representing the middle 50% of the price distribution.
High Zone (75-95%) : Distribution zone where prices are historically high but not extreme.
Extremely High Zone (>95%) : Prices in the highest 5% of the distribution, suggesting potential bubble conditions.
Mathematical Foundation
Unlike fixed-threshold indicators, PPP uses a non-parametric approach:
// Core percentile calculation
percentile = (count_of_prices_below_current / total_prices) * 100
// Threshold calculation using built-in function
p_extremely_low = ta.percentile_linear_interpolation(source, lookback, 5)
p_low = ta.percentile_linear_interpolation(source, lookback, 25)
p_neutral_high = ta.percentile_linear_interpolation(source, lookback, 75)
p_extremely_high = ta.percentile_linear_interpolation(source, lookback, 95)
Key Features
Dynamic Adaptation : All zones adjust automatically as price distribution changes
Statistical Robustness : Works on any timeframe and any market, including highly volatile cryptocurrencies
Visual Clarity : Color-coded zones provide immediate visual context
Non-parametric Analysis : Makes no assumptions about price distribution shape
Historical Context : Shows how zones evolved over time, revealing market regime changes
Practical Applications
PPP provides objective statistical context for price action, helping traders make more informed decisions based on historical price distribution rather than arbitrary levels.
Value Investment : Identify statistically significant low prices for potential entry points
Risk Management : Recognize when prices reach historical extremes for profit taking
Cycle Analysis : Observe how percentile zones expand and contract during different market phases
Market Regime Detection : Identify transitions between accumulation, markup, distribution, and markdown phases
Usage Guidelines
This indicator is particularly effective when:
- Used across multiple timeframes for confirmation
- Combined with volume analysis for validation of extremes
- Applied in conjunction with trend identification tools
- Monitored for divergences between price action and percentile ranking
Liquidity Zones Alerts"Liquidity Zones Alerts" is a powerful smart-money-based indicator designed to detect key liquidity grabs and provide high-probability reversal signals using a combination of market structure, volume, volatility, and candlestick confirmation.
🧠 How It Works
The core logic of this indicator is built around the Smart Money Concepts:
🔺 Liquidity Sweeps: Detects when price takes out previous daily or weekly highs/lows, suggesting stop hunts or engineered liquidity moves by institutional players.
📈 Volume Filter: Ensures signals only appear during above-average volume, filtering out noise and low-interest moves.
⚡ Volatility Filter: Flags high-range candles relative to the average, catching flash crashes/spikes that often precede strong reversals.
🔄 Engulfing Candle Confirmation: Confirms entry with a bullish or bearish engulfing pattern after liquidity is taken — increasing signal reliability.
🧭 Premium/Discount Zone Logic: Trades are filtered to ensure longs are only taken in discount zones, and shorts in premium zones, using a 20-period market range for context.
📌 Features
✅ Daily & Weekly liquidity zones toggle
✅ Visual signals with clean 🔻(short) & 🔺(long) arrows
✅ Auto-detection of flash crashes
✅ Alerts on both long and short setups
✅ Optional previous high/low level plotting for context
✅ Background highlighting of valid signal candles
✅ Multi-timeframe friendly and compatible with any asset
🛠️ Use Case
Whether you're a scalper or a swing trader, this tool helps you spot institutional entry zones before the move happens. It works especially well when combined with your existing bias or supply/demand zones.
💬 “Price doesn't move randomly — it hunts liquidity. This indicator shows you where and when it happens.”
Candle Close CountdownPlots a candle close countdown timer ('mm:ss') directly on the chart. It sits in a convenient position slightly offset to the right of the current candle and adjusts up and down as price moves. Really only good for shorter timeframes (i.e. < 1 hour)
Vwap Vision #WhiteRabbitVWAP Vision #WhiteRabbit
This Pine Script (version 5) script implements a comprehensive trading indicator called "VWAP Vision #WhiteRabbit," designed for analyzing price movements using the Volume-Weighted Average Price (VWAP) along with multiple customizable features, including adjustable color themes for better visual appeal.
Features:
Customizable Color Themes:
Choose from four distinct themes: Classic, Dark Mode, Fluo, and Phil, enhancing the visual layout to match user preferences.
VWAP Calculation:
Uses standard VWAP calculations based on selected anchor periods (Session, Week, Month, etc.) to help identify price trends.
Band Settings:
Multiple bands are calculated based on standard deviations or percentages, with customization options to configure buy/sell zones and liquidity levels.
Buy/Sell Signals:
Generates clear buy and sell signals based on price interactions with the calculated bands and the exponential moving average (EMA).
Real-time Data Display:
Displays real-time signals and VWAP values for selected trading instruments, including XAUUSD, NAS100, and BTCUSDT, along with related alerts for trading opportunities.
Volatility Analysis:
Incorporates volatility metrics using the Average True Range (ATR) to assess market conditions and inform trading decisions.
Enhanced Table Displays:
Provides tables for clear visualization of trading signals, real-time data, and performance metrics.
This script is perfect for traders looking to enhance their analysis and gain insights for making informed trading decisions across various market conditions.
Advanced Structure & Order BlocksBelow is a Pine Script (version 6) that combines advanced structure mapping (identifying market structure through swing highs/lows and break of structure) with order block detection (bullish and bearish). The script plots swing points, marks bullish and bearish order blocks, and identifies break of structure (BOS) for trend direction. It’s designed to be customizable and clear for traders analyzing market structure and liquidity zones.
```pine
//@version=6
indicator("Advanced Structure & Order Blocks", overlay=true, max_boxes_count=100, max_lines_count=100)
// Inputs
lookback = input.int(5, "Swing Lookback", minval=1, step=1, group="Structure Settings")
ob_sensitivity = input.float(0.5, "Order Block Sensitivity", minval=0.1, maxval=2, step=0.1, group="Order Block Settings")
max_ob_display = input.int(10, "Max Order Blocks Displayed", minval=1, maxval=50, group="Order Block Settings")
show_bos = input.bool(true, "Show Break of Structure", group="Structure Settings")
// Swing High/Low Detection
swing_high = ta.pivothigh(high, lookback, lookback)
swing_low = ta.pivotlow(low, lookback, lookback)
// Store swing points
var float last_high = 0
var float last_low = 0
var int last_high_idx = 0
var int last_low_idx = 0
if swing_high
last_high := swing_high
last_high_idx := bar_index
if swing_low
last_low := swing_low
last_low_idx := bar_index
// Plot swing points
plotshape(swing_high, style=shape.triangleup, location=location.abovebar, color=color.red, size=size.small, offset=-lookback)
plotshape(swing_low, style=shape.triangledown, location=location.belowbar, color=color.green, size=size.small, offset=-lookback)
// Market Structure (Bullish/Bearish)
var bool is_bullish = true
var float last_structure_high = high
var float last_structure_low = low
if close > last_high and is_bullish == false
is_bullish := true
last_structure_low := last_low
if close < last_low and is_bullish
is_bullish := false
last_structure_high := last_high
// Break of Structure (BOS)
var float bos_level = 0
var color bos_color = na
if show_bos
if is_bullish and close > last_structure_high
bos_level := last_structure_high
bos_color := color.green
last_structure_high := high
if not is_bullish and close < last_structure_low
bos_level := last_structure_low
bos_color := color.red
last_structure_low := low
plotshape(bos_level, style=shape.labeldown, location=location.absolute, color=bos_color, size=size.tiny, text="BOS", textcolor=color.white)
// Order Block Detection
var int ob_count = 0
bullish_ob() =>
// Bullish OB: Price rejects from a low, forming a demand zone
close < open and close > open and close > high * (1 + ob_sensitivity / 100)
bearish_ob() =>
// Bearish OB: Price rejects from a high, forming a supply zone
close > open and close < open and close < low * (1 - ob_sensitivity / 100)
// Plot Order Blocks
if bullish_ob() and ob_count < max_ob_display
box.new(left=bar_index , top=high , right=bar_index, bottom=low , bgcolor=color.new(color.green, 80), border_color=color.green)
ob_count := ob_count + 1
if bearish_ob() and ob_count < max_ob_display
box.new(left=bar_index , top=high , right=bar_index, bottom=low , bgcolor=color.new(color.red, 80), border_color=color.red)
ob_count := ob_count + 1
// Reset OB count when structure changes
if is_bullish != is_bullish
ob_count := 0
// Plot current trend
var label trend_label = na
label.delete(trend_label )
trend_label := label.new(
bar_index, high, text=is_bullish ? "Bullish" : "Bearish",
color=is_bullish ? color.green : color.red, textcolor=color.white, style=label.style_label_down
)
```
### Explanation
1. **Structure Mapping**:
- Uses `ta.pivothigh` and `ta.pivotlow` to detect swing highs/lows based on a user-defined lookback period.
- Tracks market trend (bullish/bearish) by comparing price action against previous swing points.
- Identifies Break of Structure (BOS) when price breaks a significant high (in a bearish trend) or low (in a bullish trend), plotted as a labeled marker.
2. **Order Blocks**:
- Detects bullish order blocks (demand zones) where a bearish candle is followed by a strong bullish candle, indicating institutional buying.
- Detects bearish order blocks (supply zones) where a bullish candle is followed by a strong bearish candle, indicating institutional selling.
- Sensitivity is adjustable to fine-tune OB detection.
- Boxes are drawn around order blocks, limited by a user-defined maximum to avoid clutter.
3. **Features**:
- Visualizes swing points with triangles (red for highs, green for lows).
- Displays BOS events with labels for trend confirmation.
- Shows trend direction (bullish/bearish) with a dynamic label.
- Caps the number of displayed order blocks for clarity.
- Resets OB count on structure change to prioritize recent zones.
### Customization
- **Swing Lookback**: Adjusts how far back the script looks for swing points (higher values for longer-term structure).
- **OB Sensitivity**: Controls the strength required for OB detection (lower values for more OBs, higher for stricter).
- **Max OB Display**: Limits how many OBs are shown to keep the chart clean.
- **Show BOS**: Toggle BOS labels on/off.
### Notes
- The script runs on any timeframe, but higher timeframes (e.g., 4H, Daily) are better for significant OBs and structure.
- Order blocks are historical and may repaint slightly until confirmed by structure changes.
- For advanced use, you could add alerts for BOS or OB formation by using `alertcondition()`.
This code provides a robust foundation for structure-based trading with order blocks. You can extend it further by adding fair value gaps (FVG) or liquidity sweeps if needed. Let me know if you want to dive deeper into any part!
Niveles de 100 Pips XAUUSD - Rango Controlado300 pips above the current price
700 pips below the current price
🔎 Why?
Because normally in gold (XAUUSD), you want to see more levels below (past supports) and not as much space above where there are no levels.
Liquidity Stress Index SOFR - IORBLiquidity Stress Index (SOFR - IORB)
This indicator tracks the spread between the Secured Overnight Financing Rate (SOFR) and the Interest on Reserve Balances (IORB) set by the Federal Reserve.
A persistently positive spread may indicate funding stress or liquidity shortages in the repo market, as it suggests overnight lending rates exceed the risk-free rate banks earn at the Fed.
Useful for monitoring monetary policy transmission or market/liquidity stress.