Delta Candles - OnlyFlowSimple Delta Candles indicator inspired by other custom studies such as in Sierra Charts which colors the candles based on RSI and Delta Aggression
Indicadores e estratégias
Astra Flow V1Astra Flow V1 is an all-in-one trading framework designed to bring structure and clarity to price action.
It combines:
Super trend logic for trend direction
Market Structure for shifts in control
Fair Value Gaps & Liquidity zones for smart money concepts
Auto-Fibonacci & Gann swings for confluence
Volume Profile overlays to highlight key levels
Dynamic alerts for long/short setups
Dynamic 50% Daily Range line + Checklist + WatermarkThis indicator is designed for traders who follow ICT (Inner Circle Trader) concepts. It provides key daily reference levels and session insights to improve market context analysis.
Features:
50% Line: Automatically plots the mid-level between the current day’s high and low. Customizable color, width, opacity, and dotted/solid style. Optional label to display the 50% level.
Market Open Line: Highlights the official market open with a vertical line. Fully customizable color, width, and opacity.
True Day Open Line: Marks the True Day Open (11 PM CST) for better session context. Customizable line color, width, and style.
Watermark: Optional motivational text displayed on the chart. Fully customizable text, size, and color.
Confluence Checklist: Track key trading confluences (Premium/Discount, Major Liquidity Sweep, Good Reaction, Inside Killzone, Good Momentum, Clear DOL, SMT, HTF Gap) to assist in decision-making. Size and position of the checklist are configurable.
Use Case:
Ideal for ICT-style trading, swing and intraday analysis, and anyone who wants clear daily reference levels and session markers without cluttering the chart with unnecessary text.
Weekly MAA combination of 3 weekly simple moving averages.
These moving averages are also displayed on the daily chart.
Smart Money Mobile AlertsFVG setup/entry alerts bleasdkdfbnakdsjfbasdkjfnasdfndajsdnfraqjksdnfkljasenfjklasdnfkjsdfnbjksadfnbajksdfbmnsadbfkjnsadbfnkjsdbfkjmhsdfbfkjhsdbf,janhsdbfvkjahsdfbgvlaiksjudbfnlJHASD FA,MJSWHBD F
Compression Zones by @crypto.erkeCompression Zones - a handy tool I whipped up to spot those quiet moments in the market where volatility drops low. These compression zones often hint at big breakouts or trend shifts.
Key Features:
Volatility Check: I built it with Standard Deviation or ATR, using a 14-period lookback and 50-period SMA to track those calm patches.
Compression Alert: You’ll see a "+" pop up just above the candle when a zone kicks in, with an alert hitting you at candle close—simple and to the point.
Last 20 Zones: Keeps the last 20 zones on your chart so you can glance back at the action.
Tweak It: Defaults are set, but hidden inputs let you play around if you’re feeling adventurous.
How to Use:
Drop it on your chart.
Set an alert for "Compression found" to catch those sweet spots.
Keep an eye on the "+" - great for planning your next move in or out.
Notes:
Works like a charm on crypto, but it’s versatile for any asset.
Hidden settings are there if you want to dig deeper.
The "+" stays put pretty well, even when you zoom—thanks to some label magic I figured out!
Imbalance (FVG)Indicator Description
This script is designed to automatically identify and visualize Fair Value Gaps (FVGs), also known as Imbalances, on your chart. An FVG is a key price action concept that highlights areas where the price moved swiftly, leaving a gap behind. This indicator is simple to use and fully customizable, making it an excellent tool for both novice and experienced traders.
Key Features
Automatic Detection: The indicator scans the market in real-time, automatically drawing FVG zones for both Bullish and Bearish moves.
Mitigation Tracking: When the price returns to an FVG zone, the indicator automatically marks it as "mitigated" (filled) by changing its color and style. This provides a clear signal that the imbalance has been neutralized.
Extend Zones Into the Future: Unmitigated FVG zones are automatically extended into the future, allowing them to be used as potential future support or resistance levels.
Full Customization: The user has complete control over the indicator's appearance. You can change the colors for bullish, bearish, and mitigated zones, as well as toggle their visibility on and off.
Performance Optimization: A built-in limit for the number of drawn objects prevents chart clutter and avoids errors from TradingView's drawing limits, ensuring smooth performance.
How to Use?
FVG zones can be used in various ways, including:
Price Magnets: Markets often tend to revert to "fill" these gaps.
Potential Entry Points: Price entering an FVG zone can present an opportunity to open a position, especially if confirming signals appear.
Support/Resistance Zones: Unfilled gaps can act as strong, dynamic levels of support or resistance.
Stochastic Arrows Crossover [TED]This indicator plots the classic Stochastic Oscillator with customizable parameters (K, D, Smooth). It highlights bullish and bearish crossovers between %K and %D lines with small, subtle triangle arrows on the momentum panel. The arrows are color-coded with muted green (bullish) and muted red (bearish) for better visibility in dark mode. A middle band at 50 helps identify neutral momentum levels, alongside the standard overbought (80) and oversold (20) zones.
Ted
TEMA 1000 with Previous 15-Minute Highs and Lowsuse it for free for scalper plot the 15mins for this
ICT Institutional Order Flow (Riz)This indicator implements Inner Circle Trader (ICT) institutional order flow concepts to identify high-probability entry points where smart money is actively participating in the market. It combines volume analysis, market structure, and price action patterns to detect institutional accumulation and distribution zones.
Core Concepts & Methodology
1. Institutional Order Blocks Detection
Order blocks represent the last opposing candle before a strong directional move, indicating institutional accumulation (bullish) or distribution (bearish) zones.
How it works:
⦁ Identifies the final bearish candle before bullish expansion (accumulation)
⦁ Identifies the final bullish candle before bearish expansion (distribution)
⦁ Validates with volume spike (2x average) to confirm institutional participation
⦁ Requires minimum 0.5% price displacement to filter weak moves
⦁ Tracks these zones as future support/resistance levels
2. Fair Value Gap (FVG) Analysis
FVGs are price inefficiencies created by aggressive institutional orders that leave gaps in price action.
Detection method:
⦁ Bullish FVG: When current low > high from 2 bars ago
⦁ Bearish FVG: When current high < low from 2 bars ago
⦁ Minimum gap size filter (0.1% default) eliminates noise
⦁ Monitors gap fills with volume for entry signals
⦁ Gaps act as magnets drawing price back for "rebalancing"
3. Liquidity Hunt Detection
Institutions often trigger retail stop losses before reversing direction, creating liquidity for their positions.
Algorithm:
⦁ Calculates rolling 20-period highs/lows as liquidity pools
⦁ Detects wicks beyond these levels (0.1% sensitivity)
⦁ Identifies rejection back inside range (liquidity grab)
⦁ Volume spike confirmation ensures institutional involvement
⦁ These reversals often mark significant turning points
4. Volume Profile Integration
Analyzes volume distribution across price levels to identify institutional interest zones.
Components:
⦁ Point of Control (POC): Price level with highest volume (institutional consensus)
⦁ Value Area: 70% of volume range (institutional comfort zone)
⦁ Uses 50-bar lookback to build volume histogram
⦁ 20 price levels for granular distribution analysis
5. Market Structure Analysis
Determines overall trend bias using pivot points and swing analysis.
Process:
⦁ Identifies swing highs/lows using 3-bar pivots
⦁ Bullish structure: Price above last swing high
⦁ Bearish structure: Price below last swing high
⦁ Filters signals to trade with institutional direction
Signal Generation Logic
BUY signals trigger when ANY condition is met:
1. Order Block Formation: Bearish-to-bullish transition + volume spike + strong move
2. Liquidity Grab Reversal: Sweep below lows + recovery + volume spike
3. FVG Fill: Price fills bullish gap with institutional volume (within 3 bars)
4. Order Block Respect: Price bounces from previous bullish OB + volume
SELL signals trigger when ANY condition is met:
1. Order Block Formation: Bullish-to-bearish transition + volume spike + strong move
2. Liquidity Grab Reversal: Sweep above highs + rejection + volume spike
3. FVG Fill: Price fills bearish gap with institutional volume (within 3 bars)
4. Order Block Respect: Price rejects from previous bearish OB + volume
Additional filters:
⦁ Signals align with market structure (no counter-trend trades)
⦁ No new signals while position is active
⦁ All signals require volume confirmation (institutional fingerprint)
Trading Style Auto-Configuration
The indicator features intelligent preset configurations for different trading styles:
Scalping Mode (1-5 min charts):
⦁ Volume multiplier: 1.5x (more signals)
⦁ Tighter parameters for quick trades
⦁ Risk:Reward 1.5:1, ATR multiplier 1.0
Day Trading Mode (15-30 min charts):
⦁ Volume multiplier: 1.7x (balanced)
⦁ Medium sensitivity settings
⦁ Risk:Reward 2:1, ATR multiplier 1.5
Swing Trading Mode (1H-4H charts):
⦁ Volume multiplier: 2.0x (quality focus)
⦁ Conservative parameters
⦁ Risk:Reward 3:1, ATR multiplier 2.0
Custom Mode:
⦁ Full manual control of all parameters
Visual Components
⦁ Order Blocks: Colored rectangles (green=bullish, red=bearish)
⦁ Fair Value Gaps: Orange boxes showing imbalances
⦁ Liquidity Levels: Dashed blue lines at key highs/lows
⦁ Volume Spikes: Yellow background highlighting
⦁ POC Line: Orange line showing highest volume price
⦁ Value Area: Blue shaded zone of 70% volume
⦁ Buy/Sell Signals: Triangle markers with text labels
⦁ Stop Loss/Take Profit: Dotted lines (red/green)
Information Panel
Real-time dashboard displaying:
⦁ Current trading mode
⦁ Volume ratio (current vs average)
⦁ Market structure (bullish/bearish)
⦁ Active order blocks count
⦁ Position status
⦁ Configuration details
How to Use
Step 1: Select Trading Style
Choose your style in settings - all parameters auto-adjust
Step 2: Timeframe Selection
⦁ Scalping: 1-5 minute charts
⦁ Day Trading: 15-30 minute charts
⦁ Swing: 1H-4H charts
Step 3: Signal Interpretation
⦁ Wait for BUY/SELL markers
⦁ Check volume ratio >2 for strong signals
⦁ Verify market structure alignment
⦁ Note automatic SL/TP levels
Step 4: Risk Management
⦁ Default 2:1 risk:reward (adjustable)
⦁ Stop loss: 1.5x ATR from entry
⦁ Position sizing based on stop distance
Best Practices
1. Higher probability setups occur when multiple conditions align
2. Volume confirmation is crucial - avoid signals without volume spikes
3. Trade with structure - longs in bullish, shorts in bearish structure
4. Monitor POC - acts as dynamic support/resistance
5. Confluence zones where OBs, FVGs, and liquidity levels overlap are strongest
Important Notes
⦁ Not a standalone system - combine with your analysis
⦁ Works best in trending markets with clear structure
⦁ Adjust settings based on instrument volatility
⦁ Backtest thoroughly on your specific markets
⦁ Past performance doesn't guarantee future results
Alerts Available
⦁ ICT Buy Signal
⦁ ICT Sell Signal
⦁ Volume Spike Detection
⦁ Liquidity Grab Detection
This indicator provides a systematic approach to ICT concepts, helping traders identify where institutions are entering positions through volume analysis and key price action patterns. The auto-configuration feature ensures optimal settings for your trading style without manual adjustment.
Disclaimer
This tool is for educational and research purposes only. It is not financial advice, nor does it guarantee profitability. All trading involves risk, and users should test thoroughly before applying live.
CryptoDada USD VolumeSimple and Accurate Way of finding Volume based on price movements.
- Price moving up lower volume is always a red flag.
- Volume moving up but price is not moving means price is lagging and will catch up !
Only VOMBOLA's use this in shorter time frame
Oro Zone Statiche-M5/M15/M30 📌 Titolo
Oro Zone Confirmed Breakout
📝 Descrizione
Questo indicatore individua in automatico le zone operative di 5$ su XAU/USD (oro) e costruisce un box di validazione attorno al livello.
🔎 Funzionamento:
* Ogni livello multiplo di 5$ (1930, 1935, 1940, …) viene racchiuso da un box di ±0.5$.
* Prima candela che chiude col corpo fuori → bordo del box diventa giallo.
* Seconda candela consecutiva che chiude fuori → il box si illumina, compare il ✅ di conferma, e vengono generati automaticamente i target.
🎯 Regole operative:
* Stop Loss (SL): 2$ sotto (long) o sopra (short) il livello centrale.
* Take Profit 1 (TP1): 3$ sopra (long) o sotto (short).
* Take Profit 2 (TP2): 5$ sopra (long) o sotto (short).
* Quando viene colpito SL o TP2, il setup si chiude e il sistema valuta automaticamente il prossimo livello a +5$.
⚙️ Impostazioni:
* Funziona su più timeframe (consigliati 5m, 15m, 30m).
* Puoi attivare o disattivare la visualizzazione della cronologia dei box.
* Le linee di SL/TP sono fisse e accompagnate da etichette chiare.
📌 Title
Oro Zone Confirmed Breakout
📝 Description
This indicator automatically identifies the operational zones of $5 on XAU/USD (gold) and builds a validation box around the level.
🔎 Operation:
* Each multiple level of $5 (1930, 1935, 1940, ...) is enclosed by a box of ±0.5$.
* First candle that closes with the body out → edge of the box turns yellow.
* Second consecutive candle that closes out → the box lights up, the confirmation ✅ appears, and the targets are automatically generated.
🎯 Operating rules:
* Stop Loss (SL): $2 below (long) or above (short) the central level.
* Take Profit 1 (TP1): $3 above (long) or below (short).
* Take Profit 2 (TP2): $5 above (long) or below (short).
* When SL or TP2 is hit, the setup closes and the system automatically evaluates the next level at +5$.
⚙️ Settings:
* Works on multiple timeframes (5m, 15m, 30m recommended).
* You can turn box history display on or off.
* SL/TP lines are fixed and accompanied by clear labels.
TradeX Universal Algo For All📌 TradeX Universal Algo For All
The TradeX Universal Algo is a powerful, easy-to-use trend-following system that works on all markets and timeframes (Forex, Gold, Crypto, Stocks, Indices).
This algo is built on an ATR-based trailing stop system that dynamically adapts to volatility, giving you clear Buy/Sell signals with minimal noise.
🔑 Key Features
ATR Trailing Stop → Automatically adjusts to market volatility.
Buy & Sell Signals → Plots “Buy Above” and “Sell Below” labels when price crosses the trailing stop.
Bar Coloring → Green bars in bullish trend, red bars in bearish trend.
Custom Sensitivity → Adjust “Key Value” to fine-tune signal frequency.
Multi-Market Compatible → Works seamlessly on Forex, Commodities (XAUUSD, USOIL), Crypto, Indices, and Stocks.
Alerts Ready → Set alerts for Buy/Sell conditions so you never miss an opportunity.
⚙️ Inputs
Key Value (Sensitivity) → Controls how reactive the trailing stop is (default = 3).
ATR Period → Number of bars for ATR calculation (default = 5).
📊 How to Use
Apply the indicator on any chart and timeframe.
Look for Buy Above / Sell Below signals.
Follow the green bars for bullish bias and red bars for bearish bias.
Combine with your own analysis (Price Action, SMC, Supply/Demand, etc.) for best results.
⚠️ Disclaimer: This script is for educational purposes only. Trading involves risk, and past performance does not guarantee future results. Always use proper risk management.
AI-Powered Market and Fast Trend AnalysisAI-Powered Market and Fast Trend Analysis Presentation V7
Hello,
This presentation explains the core features and functionality of your "AI-Powered Market and Fast Trend Analysis" Pine Script indicator used on the TradingView platform.
1. General Overview
This indicator combines various technical analysis indicators and an AI-based decision-making mechanism to analyze market trends, volatility, volume movements, and potential reversal points. Its purpose is to provide users with a comprehensive and quick overview to make more informed buy/sell decisions.
2. General Settings and Periods
The indicator offers several input parameters to customize the analysis:
General Settings: Allows you to adjust the calculation periods for core indicators such as Period (General), TTM Period, Stoch %K/%D Period, Keltner Channel Multiplier, Volume Oscillator Fast/Slow Period.
3. AI Decision Weights
The AI decision mechanism, which is the heart of the indicator, generates a final AI score by assigning weights to different category scores:
Trend Indicators Weight: The impact of trend indicators such as Supertrend, TTM Squeeze, QQE, Vortex, RSI, Stochastic, Moving Averages (SMA, EMA, WMA, VWMA), MACD, Ichimoku Kijun, TEMA, HMA on the final score.
Momentum Indicators Weight: The impact of momentum indicators on the final score.
Volatility Indicators Weight: The impact of volatility indicators such as Bollinger Band Width, ATR, Keltner Channel Width, Donchian Channel Width, NATR.
Volume Indicators Weight: The impact of volume indicators such as OBV, AD, CMF, MFI, Volume Oscillator, VPT, VWAP.
Candlestick Pattern Weight (New): The impact of candlestick patterns like Doji, Bullish/Bearish Engulfing, Hammer, Shooting Star on the AI decision.
Reversal Momentum Weight (New): The impact of sudden price movements and reversal signals on the AI decision.
Market Context Weight: Determines how the general market sentiment from BIST indices (XU100, XU030, XBANK), in addition to the traded symbol's data, influences the AI decision. This weight controls how much the symbol's own data versus index data affects the AI decision.
4. AI Decision Thresholds
The AI score is converted into buy/sell signals based on specific threshold values, and the strength of the score is qualified:
AI Buy/Sell Thresholds: Separate buy and sell thresholds are defined for different asset classes like BIST stocks and Gold/MGC1.
Score Qualification Thresholds (New): The strength of the AI score is determined by levels such as Very Strong Buy/Sell, Strong Buy/Sell, Moderate Buy/Sell, Weak Buy/Sell.
Category-Based Signal Thresholds: Separate buy/sell thresholds exist for each category like trend, volatility, and volume.
5. Market Context Integration
The indicator analyzes not only the data of the traded symbol but also the data from BIST indices (XU100, XU030, XBANK) to incorporate general market sentiment into the AI decision. This provides a more holistic and reliable analysis.
6. Target Point Calculations
The indicator calculates potential buy and sell targets using ATR (Average True Range) multipliers. These targets are shown separately for different timeframes (30 Min, 1 Hour, 4 Hour, 1 Day, 1 Week) and are also marked on the chart. Additionally, Nearest Buy/Sell and Farthest Buy/Sell targets are determined from all timeframes.
7. Candlestick Patterns and Coloring
Pattern Detection: Automatically detects and marks important candlestick patterns such as Doji, Bullish Engulfing, Bearish Engulfing, Hammer, and Shooting Star on the chart.
Candlestick Coloring: Candlesticks are dynamically colored based on detected patterns and volume inflow. For example, in a Bullish Engulfing pattern, the candlestick turns solid green, while candlesticks with volume inflow are shown in white.
Fake Rally Indicator (New): Generates a "Fake Rally" signal when the overall AI score is still in a bearish zone, but there are bullish candlesticks and weak reversal signals.
8. Overbought/Oversold and Indecision Zones
On the chart, Overbought, Oversold, and Indecision zones are visually marked based on price movements within a specific period. These zones help you understand whether the price is near potential reversal points.
9. Panel Information (Top Right Corner)
The information panel located in the top right corner of the chart summarizes all important analysis results:
AI Decision: The general AI signal (Very Strong Buy/Sell, Strong Buy/Sell, etc.) and its color.
Score: The final AI score and its color (green, yellow, red).
Direction: The general market direction determined by AI (UP, DOWN, SIDEWAYS).
Category Signal: The combined signal of trend, volatility, and volume categories.
Confirmation Signal (New): The overall confidence level generated by combining the final AI score and the category signal (DEFINITE BUY/SELL, VERY STRONG, STRONG, MODERATE, WEAK, UNCERTAIN).
Timeframe-Based Status: Trend, Volatility, and Volume statuses for 30 Min, 1 Hour, 4 Hour, 1 Day, and 1 Week timeframes (Uptrend/Downtrend/Neutral, Inflow/Outflow/Neutral).
Candlestick Pattern: The detected candlestick pattern in the active timeframe.
Market Index Score: The average AI score of BIST indices.
Buyer/Seller Power (New): The percentage distribution of buyer and seller power in the current candlestick.
Target Buy/Sell: Potential buy and sell targets calculated for each timeframe.
Nearest/Farthest Buy/Sell (New): The nearest and farthest buy/sell points determined from targets across all timeframes.
10. How It Helps
This indicator helps you make sense of complex market data and assists you with:
Quick Decision Making: Allows you to quickly see the overall market situation and potential buy/sell signals at a glance.
Trend Identification: Helps you understand trends across different timeframes and their strength.
Risk Management: Supports your risk management strategies with target points and volatility analyses.
Market Sentiment: Enables you to make more accurate decisions by considering the general market context through index integration.
Important Note: When using the indicator for buy/sell decisions, please consider removing the "Overall AI Score" line and the "Buy/Sell Threshold" lines from the chart for a cleaner full-screen view.
I hope this presentation helps you better understand your code and proves useful in your TradingView operations.
Sincerely,
17 Tem
Sürüm Notları
VERSİON V9
Dual Best MA Strategy AnalyzerDual Best MA Strategy Analyzer (Lookback Window)
What it does
This indicator scans a range of moving-average lengths and finds the single best MA for long crossovers and the single best MA for short crossunders over a fixed lookback window. It then plots those two “winner” MAs on your chart:
Best Long MA (green): The MA length that would have made the highest total profit using a simple “price crosses above MA → long; exit on cross back below” logic.
Best Short MA (red): The MA length that would have made the highest total profit using “price crosses below MA → short; exit on cross back above.”
You can switch between SMA and EMA, set the min/max length, choose a step size, and define the lookback window used for evaluation.
How it works (brief)
For each candidate MA length between Min MA Length and Max MA Length (stepping by Step Size), the script:
Builds the MA (SMA or EMA).
Simulates a naïve crossover strategy over the last Lookback Window candles:
Long model: enter on crossover, exit on crossunder.
Short model: enter on crossunder, exit on crossover.
Sums simple P&L in price units (no compounding, no fees/slippage).
Picks the best long and best short lengths by total P&L and plots those two MAs.
Note: Long and short are evaluated independently. The script plots MAs only; it doesn’t open positions.
Inputs
Min MA Length / Max MA Length – Bounds for MA search.
Step Size – Spacing between tested lengths (e.g., 10 tests 10, 20, 30…).
Use EMA instead of SMA – Toggle average type.
Lookback Window (candles) – Number of bars used to score each MA. Needs enough history to be meaningful.
What the plots mean
Best Long MA (green): If price crosses above this line (historically), that MA length produced the best long-side results over the lookback.
Best Short MA (red): If price crosses below this line (historically), that MA length produced the best short-side results.
These lines can change over time as new bars enter the lookback window. Think of them as adaptive “what worked best recently” guides, not fixed signals.
Practical tips
Timeframe matters: Run it on the timeframe you trade; the “best” length on 1h won’t match 1m or 1D.
Step size trade-off: Smaller steps = more precision but heavier compute. Larger steps = faster scans, coarser choices.
Use with confirmation: Combine with structure, volume, or volatility filters. This is a single-factor tester.
Normalization: P&L is in raw price units. For cross-symbol comparison, consider using one symbol at a time (or adapt the script to percent P&L).
Limitations & assumptions
No fees, funding, slippage, or position sizing.
Simple “in/out” on the next crossover; no stops/targets/filters.
Results rely on lookback choice and will repaint historically as the “best” length is re-selected with new data (the plot is adaptive, not forward-fixed).
The script tests up to ~101 candidates internally (bounded by your min/max/step).
Good uses
Quickly discover a recently effective MA length for trend following.
Compare SMA vs EMA performance on your market/timeframe.
Build a playbook: note which lengths tend to win in certain regimes (trending vs choppy).
Not included (by design)
Alerts, entries/exits, or a full strategy report. It’s an analyzer/overlay.
If you want alerts, you can add simple conditions like:
ta.crossover(close, plotLongMA) for potential long interest
ta.crossunder(close, plotShortMA) for potential short interest
Changelog / Notes
v1: Initial release. Array-based scanner, SMA/EMA toggle, adaptive long/short best MA plots, user-set lookback.
Disclaimer
This is educational tooling, not financial advice. Test thoroughly and use proper risk management.
IBOV ShadowEnglish
IBOV Shadow
This indicator is designed to provide a complementary analysis of the Brazilian market, offering an alternative perspective to the traditional IBOV index. It can be used BMFBOVESPA:IBOV , and it operates independently, seeking a correlation with the overall market by calculating based on commodities , global stocks , interest rates , the dollar , and other assets.
What the Indicator Does
The IBOV Shadow acts as a real-time fair price forecast for the Ibovespa . The line it plots represents the value the index should have at that moment, based on multiple market factors. The primary analysis comes from comparing the indicator's line with the actual Ibovespa price:
Underpricing (Upside Potential) : When the IBOV Shadow line is above the Ibovespa's price, it suggests that the market is underpricing the index. The "fair" value is higher than the current one, which may indicate potential for an upward move.
Overpricing (Downside Potential) : When the IBOV Shadow line is below the Ibovespa's price, it suggests that the market is overpricing the index. The "fair" value is lower than the current one, which may indicate that a downward correction could be on the way.
The indicator's line also changes color to signal its own trend: green when it's trending up (a strong market) and red when it's trending down (a weak market).
How to Use It
Capturing Divergences (The Main Point) : The most powerful use of the IBOV Shadow is in identifying divergences . A divergence occurs when the price movement of the Ibovespa and the movement of our indicator are out of sync.
Bullish Divergence : This happens when the Ibovespa's price makes a new low , but the Shadow indicator does not follow, instead making a higher low . This suggests that downward pressure is weakening.
Bearish Divergence : This occurs when the Ibovespa's price makes a new high , but the Shadow indicator fails to do the same, creating a lower high . This is a strong sign that the uptrend is weakening.
Trend Confirmation : Use the line's color as a confirmation tool. If you already have an uptrend in mind, a green line can reinforce your analysis. Likewise, a red line can confirm a downtrend.
Contextual Analysis : This indicator is most effective when used in conjunction with other tools and analyses. Do not use it as your sole decision-making source.
Final Considerations
Remember that this indicator is a supporting tool. The financial market is complex, and no single tool guarantees success. Practice and the use of multiple indicators and strategies are fundamental for a complete analysis.
Delta -> PROFABIGHI_CAPITAL🌟 Overview
This Delta → PROFABIGHI_CAPITAL implements a comprehensive market delta analysis framework combining price delta calculations with volume-weighted delta analysis and cumulative volume delta tracking for advanced order flow assessment.
It provides Price Delta calculation measuring price movement over configurable periods for momentum analysis , Volume Delta approximation using volume weighted by price direction for buying/selling pressure identification , Cumulative Volume Delta (CVD) tracking with dynamic histogram visualization for long-term order flow trends , and Comprehensive display controls with debug options for flexible market microstructure analysis for professional order flow trading applications.
🔧 Advanced Delta Analysis Architecture
- Professional market microstructure analysis system integrating price movement with volume-weighted directional analysis
- Price Source Configuration enabling close, open, high, low, or composite price inputs for flexible delta calculation adaptation
- Delta Period Management with adjustable lookback periods for price delta calculation affecting both price and volume delta analysis
- Overlay Integration designed as separate pane indicator for dedicated delta analysis without interfering with price action
- Volume Format Display using volume-specific formatting for accurate large number representation
- Professional Timeframe Support enabling multi-timeframe delta analysis for different market perspectives
📊 Price Delta Implementation Framework
- Period-Based Price Calculation measuring price difference between current bar and specified periods ago for momentum assessment
- Configurable Source Selection supporting different price inputs for various delta calculation approaches
- Null Value Protection ensuring continuous calculation through proper handling of undefined historical values
- Visual Color Coding using teal for positive price delta and maroon for negative price delta with transparency
- Line Style Visualization displaying price delta as continuous line for trend identification
- Optional Display Control allowing users to show or hide price delta for focused analysis
📈 Volume Delta Calculation Engine
- Price Direction Analysis using mathematical sign function to determine positive or negative price movement
- Volume Weighting System multiplying volume by price direction sign for approximated buying/selling pressure
- Sign Variable Management maintaining price direction state for consistent volume delta calculation
- Null Value Handling ensuring continuous volume delta calculation through proper mathematical validation
- Histogram Visualization displaying volume delta as bars with green for buying pressure and red for selling pressure
- Dynamic Transparency using optimized transparency levels for clear visual distinction between positive and negative values
📉 Cumulative Volume Delta (CVD) Framework
- Running Sum Calculation maintaining cumulative total of all volume delta values for long-term trend analysis
- Dynamic Color System comparing current CVD with previous bar to determine rising or falling cumulative pressure
- Histogram Style Display presenting CVD as histogram bars for immediate visual impact assessment
- Trend Direction Visualization using green for rising CVD and red for falling CVD with transparency optimization
- Historical Comparison Logic implementing proper previous bar comparison with null value protection for first bar handling
- Cumulative State Tracking maintaining accurate running totals across all historical bars for reliable trend identification
🎨 Comprehensive Display Control System
- Modular Visibility Controls enabling independent show/hide options for price delta, volume delta, and CVD components
- Grouped Settings Organization separating calculation settings, display options, and debug features for streamlined configuration
- Tooltip Integration providing detailed explanations for each setting to guide proper indicator usage
- Professional Color Scheme using market-standard colors with appropriate transparency levels for clear visual hierarchy
- Null Line Reference displaying zero line with dashed gray styling for immediate positive/negative reference
- Optional Debug Visualization offering raw data plots for troubleshooting and analysis validation
⚙️ Advanced Debug System
- Raw Price Change Display showing unprocessed price movement for calculation verification
- Sign Function Visualization displaying mathematical sign output as histogram for direction confirmation
- Volume Data Verification presenting raw volume values as columns for data integrity checking
- Independent Debug Controls enabling selective activation of different debug components without affecting main plots
- Color-Coded Debug Plots using distinct colors (orange, purple, black) for easy identification of debug elements
- Performance Optimization displaying debug plots only when specifically enabled to maintain indicator performance
📋 Professional Configuration Framework
- Calculation Settings Group organizing core delta parameters including source selection and period configuration
- Display Options Group centralizing visibility controls for main indicator components with detailed tooltips
- Simple Plots Group providing debug options for advanced users and troubleshooting scenarios
- Input Validation ensuring minimum period values and proper source selection for reliable calculations
- Tooltip Documentation offering comprehensive explanations for each setting to guide proper indicator utilization
- Professional Naming Convention using clear, descriptive names for all settings and components
🔍 Mathematical Implementation Excellence
- Accurate Delta Calculations using proper arithmetic operations for price difference measurement over specified periods
- Sign Function Implementation correctly applying mathematical sign determination for price direction analysis
- Volume Multiplication Accuracy precisely weighting volume values by price direction for delta approximation
- Cumulative Sum Precision maintaining accurate running totals using Pine Script's cumulative function
- Null Value Management implementing comprehensive null value handling for reliable calculations across all scenarios
- Historical Data Access properly accessing previous bar data with appropriate indexing for comparison logic
🎯 Market Microstructure Applications
- Order Flow Analysis identifying buying versus selling pressure through volume-weighted price direction assessment
- Momentum Confirmation using price delta to validate price movement strength over configurable periods
- Trend Identification leveraging CVD trends to identify long-term accumulation or distribution patterns
- Volume Profile Integration combining volume data with price direction for comprehensive market structure analysis
- Support/Resistance Validation using delta analysis to confirm or challenge traditional technical analysis levels
- Divergence Detection comparing price movement with volume delta patterns for potential reversal identification
⚡ Performance Optimization Features
- Conditional Plotting Logic displaying only enabled components to optimize chart rendering performance
- Efficient Variable Management using appropriate variable scoping and initialization for minimal memory usage
- Optimized Color Assignment pre-calculating colors and applying transparency for smooth visual performance
- Streamlined Calculations organizing mathematical operations for minimal redundant computation
- Dynamic Display Updates providing real-time delta values with immediate visual feedback
- Resource-Conscious Debug Mode activating debug plots only when specifically requested to maintain indicator efficiency
🎨 Professional Visualization Framework
- Color-Coded Delta Analysis using green/red scheme for immediate positive/negative identification
- Transparency Optimization applying appropriate transparency levels for clear visual hierarchy without overwhelming chart
- Multiple Plot Styles implementing line plots for price delta, histogram for volume delta, and histogram for CVD
- Zero Line Reference providing dashed gray zero line for immediate positive/negative context
- Dynamic CVD Coloring comparing current versus previous CVD values for trend direction visualization
- Professional Chart Integration maintaining separate pane layout for dedicated delta analysis focus
🔧 Technical Implementation Framework
- Variable Declaration Organization properly declaring color variables and state management variables for clean code structure
- Calculation Sequence Optimization organizing price delta, volume delta, and CVD calculations in logical order
- Plot Management System coordinating multiple plot statements with appropriate conditional logic
- State Variable Management maintaining sign_price_change variable for consistent volume delta calculation
- Error Prevention Architecture incorporating null value checks and mathematical validation for reliable operation
- Modular Code Structure separating calculation, plotting, and debug sections for maintainable code organization
✅ Key Takeaways
- Advanced delta analysis framework combining price delta momentum with volume-weighted directional pressure for comprehensive order flow assessment
- Professional CVD implementation with dynamic histogram visualization showing cumulative buying/selling pressure trends over time
- Comprehensive display control system enabling selective visualization of price delta, volume delta, and CVD components with debug options
- Mathematical precision implementation using proper sign function analysis and cumulative sum calculations with null value protection
- Professional configuration framework with grouped settings, detailed tooltips, and modular visibility controls for customized analysis
- Performance-optimized visualization using conditional plotting and efficient color management for smooth real-time delta tracking
- Market microstructure applications supporting order flow analysis, momentum confirmation, and trend identification for institutional trading approaches
투자날씨 풍향계(Market’s Weather Alarm Indicator)The Simplest Way to Read the Market’s Weather
Did you know that markets have their own weather?
☀️ When it’s sunny, you can go bold.
🌧️ When it’s cloudy or stormy, you need an umbrella (risk management).
I used to check dozens of indicators every single day…
But the problem is — it’s too complicated 🤯
So I created my own tool:
👉 The Market Weather Compass.
🌍 What this indicator does
✅ Instantly evaluates the “weather” for US stocks, Korean stocks, and crypto markets.
✅ Automatically tracks core data: VIX, Dollar Index, interest rates, FX rate, Bitcoin dominance.
✅ Instead of just numbers, it shows clear “weather” states: Sunny / Cloudy / Risk / Alt Season.
✅ Dashboard at the bottom + Weather Score line on the chart to see direction at a glance.
✅ Smart alerts notify you of “spikes, crashes, volatility shifts, FX changes” so you don’t miss key moves.
Note: Market data availability may vary depending on your TradingView plan.
🧭 How to use it
Load the indicator in TradingView.
In settings, toggle “Show Dashboard” and “Enable Alerts” (enabled by default).
Use the dashboard to check:
📊 Market Weather
📈 Index Change %
📉 VIX / DXY / Rates / FX / BTC Dominance
Follow the Weather Score Line on the chart to sense whether your position is safe or if caution is needed.
🌤️ For example
Weather = Sunny → “Strong sector, scale in entries”
Weather = Risk → “Raise cash, cut exposure”
Crypto = Alt Season → “Shift into altcoins”
Crypto = BTC Strength → “Focus on BTC, sideline alts”
💡 Why it’s special
No need to monitor dozens of charts manually.
Even beginners can read it as easily as a weather forecast.
Most importantly, it cuts your daily market check time in half.
✨ Wrap-up
Investing is always a tug of war between risk and opportunity.
The Market Weather Compass makes that tug of war feel as simple as a weather forecast.
📌 Next time you open a chart, skip the messy calculations — just check “today’s market weather.”
👉 Free up your time and energy for decisions, not endless analysis.
🔔 Full Alert Guide
This isn’t just a dashboard — it’s a smart alert system that tells you when the market shifts.
🇺🇸 US Market Alerts
🗓️ Weather Change Detection
→ Notifies when weather shifts (e.g. Neutral → Sunny, Sunny → Risk).
→ “The market has entered a new phase.”
⚠️ VIX Near Risk Level
→ Alerts when VIX approaches the danger zone (25).
→ “Volatility is heating up.”
🌤️ VIX Trend Down
→ VIX drops below 20MA.
→ “Lower volatility, risk assets may benefit.”
🌪️ VIX Trend Up
→ VIX rises above 20MA.
→ “Market stress rising, manage risk.”
🌈 Dollar Weakness Starts (DXY Breaks Down)
→ DXY falls below 200MA.
→ “Bullish for risk assets.”
⚠️ Dollar Strength Starts (DXY Breakout)
→ DXY rises above 200MA.
→ “Risk sentiment may weaken.”
🚨 US10Y Yield Risk Break
→ 10-year yield breaks the danger threshold (4.5%).
→ “Higher borrowing costs — pressure on equities.”
🇰🇷 Korean Market Alerts
🗓️ Weather Change Detection
→ Alerts whenever Korean market weather shifts.
🌈 KRW Strength (FX Stable)
→ USD/KRW falls below 200MA.
→ “Foreign inflows expected.”
🌧️ KRW Weakness (FX Risk)
→ USD/KRW rises above 200MA.
→ “Capital outflow risk.”
🌤️ VKOSPI Stabilization
→ VKOSPI volatility index falls below 20MA.
→ “Market stress easing.”
🚀 Index Surge
→ KOSPI/KOSDAQ rises beyond set threshold (+1% etc).
→ “Bullish impulse detected.”
💥 Index Drop
→ KOSPI/KOSDAQ falls below set threshold (–1% etc).
→ “Short-term risk alert.”
₿ Crypto Market Alerts
🗓️ Weather Change Detection
→ Switches between Alt Season / BTC Strength / Risk / Mixed.
→ “Leadership shift in crypto market.”
💎 Alt Season Begins
→ Market cap rising + BTC dominance falling.
→ “Time to rotate into alts.”
🔥 BTC Strength Begins
→ Market cap rising + BTC dominance rising.
→ “Focus on BTC, alts on hold.”
🚨 Risk Signal (BTC Absorbs Flow)
→ Market cap falling + BTC dominance rising.
→ “Money fleeing alts into BTC.”
📉 Decline / Mixed Trend
→ Market cap falling + BTC dominance falling.
→ “Unclear direction, short-term trading only.”
🚨 BTC Dominance Breakout
→ BTC dominance crosses above warning level (e.g. 55%).
→ “BTC takes over, alts at risk.”
🔄 ETH/BTC Trend Reversal
→ ETH/BTC crosses above/below 20MA.
→ “Momentum shift in altcoin leadership.”
✨ Final Note
These alerts act like your personal market radar.
Once enabled, you’ll never miss the moment when the weather changes.
👉 Whether you’re a beginner or a busy trader, the Market Weather Compass keeps you one step ahead.
SMC — Liquidity • Strong FVG • OB Levels • VWAP • POI Score📌 Indicator Overview
This script is an advanced market structure and liquidity mapping tool built for traders who want clarity on when momentum is shifting and where the most impactful trade opportunities may emerge. It combines institutional concepts of supply/demand with price efficiency and volume dynamics to highlight areas where smart money is most active.
🎯 What It Does
Identifies liquidity grabs and inducement moves that often precede reversals.
Maps high-impact price imbalance zones (fair value gaps) and automatically manages them once price interacts.
Marks institutional order blocks with optional precision levels and customizable visuals for clean charting.
Auto-anchors VWAP with deviation bands to fresh impulsive moves to capture mean reversion opportunities.
Provides a priority scoring system to weigh confluences and highlight the most actionable areas of interest.
Session heatmap overlays reveal Asia / London / New York influence on intraday direction.
⚡ Best Use Cases
Works across Forex, Indices, Commodities, and Crypto.
Especially effective on instruments with high liquidity and volatility such as XAUUSD (Gold), BTCUSD, ETHUSD, US30, and major FX pairs.
Performs best when aligned with HTF bias (daily / 4H) while executing on intraday timeframes (5m–15m).
Kill-zone filtering (Asia / London / New York sessions) helps refine entries for higher reward trades.
🔧 Key Features
Customizable visuals: change colors, opacity, and line sizes for order blocks and levels.
Mitigation handling: choose whether imbalances fade out or disappear once filled.
Strong zone filter: option to display only the most meaningful fair value gaps with proven impact.
Multi-factor scoring HUD: at a glance see where liquidity, imbalance, OB, VWAP, and session confluence align.
Alerts ready: receive notifications on liquidity sweeps, OB taps, or FVG entries that match your trading bias.
✅ Why Traders Use It
This tool acts as a market map, removing noise and drawing attention only to the most relevant price events and zones. Instead of chasing every break of structure, it helps traders wait for the smart money footprints that often precede large directional moves.
RTW Moving AveragesA clean and focused moving averages indicator displaying 5 pairs of EMAs and SMAs (10 total lines) with standard periods: 10, 20, 50, 100, and 200. All moving averages are enabled by default with a carefully designed color scheme and opacity levels for optimal chart readability.
Features:
5 EMAs and 5 SMAs with popular trading periods
Multi-timeframe support for each moving average
Color-coded with varying opacities (EMAs more prominent, SMAs subtler)
Clean interface with hidden settings for distraction-free trading
Overlay indicator compatible with all chart types
Default Colors:
10 Period: Light gray
20 Period: White (most prominent)
50 Period: Orange
100 Period: Dark orange
200 Period: Red
Perfect for trend analysis, support/resistance identification, and multi-timeframe confluence trading strategies.
High Low + BOS/Sweep aaa//@version=5
indicator("High Low + BOS/Sweep", overlay=true, max_lines_count=500, max_labels_count=500)
// Inputs (giữ nguyên các tuỳ chọn của bạn, chỉ bỏ input màu)
offTop = input.int(2, "Offset đỉnh", minval=0)
offBot = input.int(2, "Offset đáy", minval=0)
w = input.int(2, "Độ dày line", minval=1)
styleBosStr = input.string("Solid", "Kiểu line BOS", options= )
styleSweepStr = input.string("Dashed", "Kiểu line Sweep", options= )
showBosLabel = input.bool(true, "Hiện label BOS")
showSweepLabel = input.bool(true, "Hiện label Sweep")
bosLabelText = input.string("BOS", "Text BOS")
sweepLabelText = input.string("SWEEP", "Text Sweep")
labelSizeStr = input.string("tiny", "Kích thước label", options= )
// NEW: display toggles
showPivot = input.bool(true, "Hiện Pivot")
showBosSweep = input.bool(true, "Hiện BOS / Sweep")
// Convert styles / sizes
bosStyle = styleBosStr == "Dashed" ? line.style_dashed : styleBosStr == "Dotted" ? line.style_dotted : line.style_solid
sweepStyle = styleSweepStr == "Dashed" ? line.style_dashed : styleSweepStr == "Dotted" ? line.style_dotted : line.style_solid
lblSize = labelSizeStr == "small" ? size.small : labelSizeStr == "normal" ? size.normal : labelSizeStr == "large" ? size.large : size.tiny
// State vars
c = close
var int lastSignal = 0
var float sHigh = na
var int sHighBar = na
var float sLow = na
var int sLowBar = na
var float confHigh = na
var int confHighBar = na
var float confLow = na
var int confLowBar = na
var line highLine = na
var line lowLine = na
var label highLabel = na
var label lowLabel = na
// === Đánh dấu loại line: 0 = chưa có, 1 = Sweep, 2 = BOS ===
var int highLineType = 0
var int lowLineType = 0
// === Sweep tracking / pending ===
var bool pendingSweepUp = false
var bool pendingSweepDown = false
var int sweepDetectedBarUp = na
var float sweepTargetHighPrice = na
var int sweepTargetHighBar = na
var int sweepDetectedBarDown = na
var float sweepTargetLowPrice = na
var int sweepTargetLowBar = na
// === Track BOS pivots ===
var int lastBOSHighBar = na
var int lastBOSLowBar = na
// Track swing
if (lastSignal == -1) or (lastSignal == 0)
if na(sHigh) or high > sHigh
sHigh := high
sHighBar := bar_index
if (lastSignal == 1) or (lastSignal == 0)
if na(sLow) or low < sLow
sLow := low
sLowBar := bar_index
// Confirm pivot
condTop = c < low
condBot = c > high
isTop = condTop and (lastSignal != 1)
isBot = condBot and (lastSignal != -1)
// On pivot confirm
if isTop
confHigh := sHigh
confHighBar := sHighBar
highLine := na
highLabel := na
highLineType := 0
if showPivot
label.new(confHighBar, confHigh + syminfo.mintick * offTop, "●", xloc=xloc.bar_index, yloc=yloc.price, style=label.style_none, textcolor=color.red, size=size.small)
lastSignal := 1
sHigh := na
sHighBar := na
sLow := low
sLowBar := bar_index
if isBot
confLow := sLow
confLowBar := sLowBar
lowLine := na
lowLabel := na
lowLineType := 0
if showPivot
label.new(confLowBar, confLow - syminfo.mintick * offBot, "●", xloc=xloc.bar_index, yloc=yloc.price, style=label.style_none, textcolor=color.lime, size=size.small)
lastSignal := -1
sLow := na
sLowBar := na
sHigh := high
sHighBar := bar_index
// Raw sweep detection
rawSweepUp = not na(confHigh) and (na(lastBOSHighBar) or confHighBar != lastBOSHighBar) and high > confHigh and close <= confHigh
rawSweepDown = not na(confLow) and (na(lastBOSLowBar) or confLowBar != lastBOSLowBar) and low < confLow and close >= confLow
if rawSweepUp
pendingSweepUp := true
sweepDetectedBarUp := bar_index
sweepTargetHighPrice := confHigh
sweepTargetHighBar := confHighBar
if rawSweepDown
pendingSweepDown := true
sweepDetectedBarDown := bar_index
sweepTargetLowPrice := confLow
sweepTargetLowBar := confLowBar
// Check sweep validity
checkSweepValidUp() =>
isValid = true
if pendingSweepUp and not na(sweepDetectedBarUp)
maxOffset = bar_index - sweepDetectedBarUp
if maxOffset >= 0
for i = 0 to maxOffset
if close > sweepTargetHighPrice
isValid := false
isValid
checkSweepValidDown() =>
isValid = true
if pendingSweepDown and not na(sweepDetectedBarDown)
maxOffset = bar_index - sweepDetectedBarDown
if maxOffset >= 0
for i = 0 to maxOffset
if close < sweepTargetLowPrice
isValid := false
isValid
// BOS logic
bosUp = not na(confHigh) and c > confHigh
bosDown = not na(confLow) and c < confLow
if bosUp
pendingSweepUp := false
sweepDetectedBarUp := na
sweepTargetHighPrice := na
sweepTargetHighBar := na
lastBOSHighBar := confHighBar
if not na(highLine)
line.delete(highLine)
if not na(highLabel)
label.delete(highLabel)
highLineType := 2
if showBosSweep
highLine := line.new(confHighBar, confHigh, bar_index, confHigh, xloc=xloc.bar_index, extend=extend.none, color=color.black, width=w, style=bosStyle)
if showBosLabel
midBar = math.floor((confHighBar + bar_index) / 2)
highLabel := label.new(midBar, confHigh, bosLabelText, xloc=xloc.bar_index, yloc=yloc.price, textcolor=color.black, style=label.style_none, size=lblSize)
if bosDown
pendingSweepDown := false
sweepDetectedBarDown := na
sweepTargetLowPrice := na
sweepTargetLowBar := na
lastBOSLowBar := confLowBar
if not na(lowLine)
line.delete(lowLine)
if not na(lowLabel)
label.delete(lowLabel)
lowLineType := 2
if showBosSweep
lowLine := line.new(confLowBar, confLow, bar_index, confLow, xloc=xloc.bar_index, extend=extend.none, color=color.black, width=w, style=bosStyle)
if showBosLabel
midBar = math.floor((confLowBar + bar_index) / 2)
lowLabel := label.new(midBar, confLow, bosLabelText, xloc=xloc.bar_index, yloc=yloc.price, textcolor=color.black, style=label.style_none, size=lblSize)
// Sweep draw (pivot-in-between check)
sweepUpTriggered = false
sweepDownTriggered = false
if (isTop or isBot) and pendingSweepUp and not na(sweepTargetHighBar)
hasLowBetween = false
for i = sweepTargetHighBar to bar_index
if not na(confLowBar) and confLowBar == i
hasLowBetween := true
if checkSweepValidUp() and highLineType != 2 and hasLowBetween
if not na(highLine)
line.delete(highLine)
if not na(highLabel)
label.delete(highLabel)
highLineType := 1
if showBosSweep
highLine := line.new(sweepTargetHighBar, sweepTargetHighPrice, bar_index, sweepTargetHighPrice, xloc=xloc.bar_index, extend=extend.none, color=color.black, width=w, style=sweepStyle)
if showSweepLabel
midBar = math.floor((sweepTargetHighBar + bar_index) / 2)
highLabel := label.new(midBar, sweepTargetHighPrice, sweepLabelText, xloc=xloc.bar_index, yloc=yloc.price, textcolor=color.black, style=label.style_none, size=lblSize)
pendingSweepUp := false
sweepDetectedBarUp := na
sweepTargetHighPrice := na
sweepTargetHighBar := na
sweepUpTriggered := true
if (isTop or isBot) and pendingSweepDown and not na(sweepTargetLowBar)
hasHighBetween = false
for i = sweepTargetLowBar to bar_index
if not na(confHighBar) and confHighBar == i
hasHighBetween := true
if checkSweepValidDown() and lowLineType != 2 and hasHighBetween
if not na(lowLine)
line.delete(lowLine)
if not na(lowLabel)
label.delete(lowLabel)
lowLineType := 1
if showBosSweep
lowLine := line.new(sweepTargetLowBar, sweepTargetLowPrice, bar_index, sweepTargetLowPrice, xloc=xloc.bar_index, extend=extend.none, color=color.black, width=w, style=sweepStyle)
if showSweepLabel
midBar = math.floor((sweepTargetLowBar + bar_index) / 2)
lowLabel := label.new(midBar, sweepTargetLowPrice, sweepLabelText, xloc=xloc.bar_index, yloc=yloc.price, textcolor=color.black, style=label.style_none, size=lblSize)
pendingSweepDown := false
sweepDetectedBarDown := na
sweepTargetLowPrice := na
sweepTargetLowBar := na
sweepDownTriggered := true
// Alerts
alertcondition(isTop, "Top", "Top confirmed")
alertcondition(isBot, "Bot", "Bottom confirmed")
alertcondition(bosUp, "BOS Up", "Break of structure up")
alertcondition(bosDown, "BOS Down", "Break of structure down")
alertcondition(sweepUpTriggered, "Sweep Up", "Sweep đỉnh xuất hiện")
alertcondition(sweepDownTriggered, "Sweep Down", "Sweep đáy xuất hiện")
plot(na) // tránh lỗi