Machine Learning Key Levels [AlgoAlpha]🟠 OVERVIEW
This script plots Machine Learning Key Levels on your chart by detecting historical pivot points and grouping them using agglomerative clustering to highlight price levels with the most past reactions. It combines a pivot detection, hierarchical clustering logic, and an optional silhouette method to automatically select the optimal number of key levels, giving you an adaptive way to visualize price zones where activity concentrated over time.
🟠 CONCEPTS
Agglomerative clustering is a bottom-up method that starts by treating each pivot as its own cluster, then repeatedly merges the two closest clusters based on the average distance between their members until only the desired number of clusters remain. This process creates a hierarchy of groupings that can flexibly describe patterns in how price reacts around certain levels. This offers an advantage over K-means clustering, since the number of clusters does not need to be predefined. In this script, it uses an average linkage approach, where distance between clusters is computed as the average pairwise distance of all contained points.
The script finds pivot highs and lows over a set lookback period and saves them in a buffer controlled by the Pivot Memory setting. When there are at least two pivots, it groups them using agglomerative clustering: it starts with each pivot as its own group and keeps merging the closest pairs based on their average distance until the desired number of clusters is left. This number can be fixed or chosen automatically with the silhouette method, which checks how well each point fits in its cluster compared to others (higher scores mean cleaner separation). Once clustering finishes, the script takes the average price of each cluster to create key levels, sorts them, and draws horizontal lines with labels and colors showing their strength. A metrics table can also display details about the clusters to help you understand how the levels were calculated.
🟠 FEATURES
Agglomerative clustering engine with average linkage to merge pivots into level groups.
Dynamic lines showing each cluster’s price level for clarity.
Labels indicating level strength either as percent of all pivots or raw counts.
A metrics table displaying pivot count, cluster count, silhouette score, and cluster size data.
Optional silhouette-based auto-selection of cluster count to adaptively find the best fit.
🟠 USAGE
Add the indicator to any chart. Choose how far back to detect pivots using Pivot Length and set Pivot Memory to control how many are kept for clustering (more pivots give smoother levels but can slow performance). If you want the script to pick the number of levels automatically, enable Auto No. Levels ; otherwise, set Number of Levels . The colored horizontal lines represent the calculated key levels, and circles show where pivots occurred colored by which cluster they belong to. The labels beside each level indicate its strength, so you can see which levels are supported by more pivots. If Show Metrics Table is enabled, you will see statistics about the clustering in the corner you selected. Use this tool to spot areas where price often reacts and to plan entries or exits around levels that have been significant over time. Adjust settings to better match volatility and history depth of your instrument.
Penunjuk dan strategi
Two Poles Trend Finder MTF [BigBeluga]🔵 OVERVIEW
Two Poles Trend Finder MTF is a refined trend-following overlay that blends a two-pole Gaussian filter with a multi-timeframe dashboard. It provides a smooth view of price dynamics along with a clear summary of trend directions across multiple timeframes—perfect for traders seeking alignment between short and long-term momentum.
🔵 CONCEPTS
Two-Pole Filter: A smoothing algorithm that responds faster than traditional moving averages but avoids the noise of short-term fluctuations.
var float f = na
var float f_prev1 = na
var float f_prev2 = na
// Apply two-pole Gaussian filter
if bar_index >= 2
f := math.pow(alpha, 2) * source + 2 * (1 - alpha) * f_prev1 - math.pow(1 - alpha, 2) * f_prev2
else
f := source // Warm-up for first bars
// Shift state
f_prev2 := f_prev1
f_prev1 := f
Trend Detection Logic: Trend direction is determined by comparing the current filtered value with its value n bars ago (shifted comparison).
MTF Alignment Dashboard: Trends from 5 configurable timeframes are monitored and visualized as colored boxes:
• Green = Uptrend
• Magenta = Downtrend
Summary Arrow: An average trend score from all timeframes is used to plot an overall arrow next to the asset name.
🔵 FEATURES
Two-Pole Gaussian Filter offers ultra-smooth trend curves while maintaining responsiveness.
Multi-Timeframe Trend Detection:
• Default: 1H, 2H, 4H, 12H, 1D (fully customizable)
• Each timeframe is assessed independently using the same trend logic.
Visual Trend Dashboard positioned at the bottom-right of the chart with color-coded trend blocks.
Dynamic Summary Arrow shows overall market bias (🢁 / 🢃) based on majority of uptrends/downtrends.
Bold + wide trail plot for the filter value with gradient coloring based on directional bias.
🔵 HOW TO USE
Use the multi-timeframe dashboard to identify aligned trends across your preferred trading horizons.
Confirm trend strength or weakness by observing filter slope direction .
Look for dashboard consensus (e.g., 4 or more timeframes green] ) as confirmation for breakout, continuation, or trend reentry strategies.
Combine with volume or price structure to enhance entry timing.
🔵 CONCLUSION
Two Poles Trend Finder MTF delivers a clean and intuitive trend-following solution with built-in multi-timeframe awareness. Whether you’re trading intra-day or positioning for swing setups, this tool helps filter out market noise and keeps you focused on directional consensus.
Trend Tracker ProTrend Tracker Pro - Advanced Trend Following Indicator
Overview
Trend Tracker Pro is a sophisticated trend-following indicator that combines the power of Exponential Moving Average (EMA) and Average True Range (ATR) to identify market trends and generate precise buy/sell signals. This indicator is designed to help traders capture trending moves while filtering out market noise.
🎯 Key Features
✅ Dynamic Trend Detection
Uses EMA and ATR-based bands to identify trend direction
Automatically adjusts to market volatility
Clear visual trend line that changes color based on market direction
✅ Precise Signal Generation
Buy signals when trend changes to bullish
Sell signals when trend changes to bearish
Reduces false signals by requiring actual trend changes
✅ Visual Clarity
Green trend line: Bullish trend
Red trend line: Bearish trend
Gray trend line: Sideways/neutral trend
Triangle arrows for buy/sell signals
Clear BUY/SELL text labels
✅ Customizable Settings
Trend Length: Adjustable period for EMA and ATR calculation (default: 14)
ATR Multiplier: Controls sensitivity of trend bands (default: 2.0)
Show/Hide Signals: Toggle signal arrows on/off
Show/Hide Labels: Toggle text labels on/off
✅ Built-in Information Panel
Real-time trend direction display
Current trend level value
ATR value for volatility reference
Last signal information
✅ TradingView Alerts
Buy signal alerts
Sell signal alerts
Customizable alert messages
🔧 How It Works
Algorithm Logic:
1.
Calculate EMA: Uses exponential moving average for trend baseline
2.
Calculate ATR: Measures market volatility
3.
Create Bands: Upper band = EMA + (ATR × Multiplier), Lower band = EMA - (ATR × Multiplier)
4.
Determine Trend:
Price above upper band → Bullish trend (trend line = lower band)
Price below lower band → Bearish trend (trend line = upper band)
Price between bands → Continue previous trend
5.
Generate Signals: Signal occurs when trend direction changes
📊 Best Use Cases
✅ Trending Markets
Excellent for capturing strong directional moves
Works well in both bull and bear markets
Ideal for swing trading and position trading
✅ Multiple Timeframes
Effective on all timeframes from 15 minutes to daily
Higher timeframes provide more reliable signals
Can be used for both scalping and long-term investing
✅ Various Asset Classes
Stocks, Forex, Cryptocurrencies, Commodities
Particularly effective in volatile markets
Adapts automatically to different volatility levels
⚙️ Recommended Settings
Conservative Trading (Lower Risk)
Trend Length: 20
ATR Multiplier: 2.5
Best for: Long-term positions, lower frequency signals
Balanced Trading (Default)
Trend Length: 14
ATR Multiplier: 2.0
Best for: Swing trading, moderate frequency signals
Aggressive Trading (Higher Risk)
Trend Length: 10
ATR Multiplier: 1.5
Best for: Day trading, higher frequency signals
🎨 Visual Elements
Trend Line: Main indicator line that follows the trend
Signal Arrows: Triangle shapes indicating buy/sell points
Text Labels: Clear "BUY" and "SELL" text markers
Information Table: Real-time status panel in top-right corner
Color Coding: Intuitive green/red color scheme
⚠️ Important Notes
Risk Management
Always use proper position sizing
Set stop-losses based on ATR values
Consider market conditions and volatility
Not recommended for ranging/sideways markets
Signal Confirmation
Consider using with other indicators for confirmation
Pay attention to volume and market structure
Be aware of major news events and market sessions
Backtesting Recommended
Test the indicator on historical data
Optimize parameters for your specific trading style
Consider transaction costs in your analysis
Faytterro Bands Breakout📌 Faytterro Bands Breakout 📌
This indicator was created as a strategy showcase for another script: Faytterro Bands
It’s meant to demonstrate a simple breakout strategy based on Faytterro Bands logic and includes performance tracking.
❓ What Is It?
This script is a visual breakout strategy based on a custom moving average and dynamic deviation bands, similar in concept to Bollinger Bands but with unique smoothing (centered regression) and performance features.
🔍 What Does It Do?
Detects breakouts above or below the Faytterro Band.
Plots visual trade entries and exits.
Labels each trade with percentage return.
Draws profit/loss lines for every trade.
Shows cumulative performance (compounded return).
Displays key metrics in the top-right corner:
Total Return
Win Rate
Total Trades
Number of Wins / Losses
🛠 How Does It Work?
Bullish Breakout: When price crosses above the upper band and stays above the midline.
Bearish Breakout: When price crosses below the lower band and stays below the midline.
Each trade is held until breakout invalidation, not a fixed TP/SL.
Trades are compounded, i.e., profits stack up realistically over time.
📈 Best Use Cases:
For traders who want to experiment with breakout strategies.
For visual learners who want to study past breakouts with performance metrics.
As a template to develop your own logic on top of Faytterro Bands.
⚠ Notes:
This is a strategy-like visual indicator, not an automated backtest.
It doesn't use strategy.* commands, so you can still use alerts and visuals.
You can tweak the logic to create your own backtest-ready strategy.
Unlike the original Faytterro Bands, this script does not repaint and is fully stable on closed candles.
Divergence Screener [Trendoscope®]🎲Overview
The Divergence Screener is a powerful TradingView indicator designed to detect and visualize bullish and bearish divergences, including hidden divergences, between price action and a user-selected oscillator. Built with flexibility in mind, it allows traders to customize the oscillator type, trend detection method, and other parameters to suit various trading strategies. The indicator is non-overlay, displaying divergence signals directly on the oscillator plot, with visual cues such as lines and labels on the chart for easy identification.
This indicator is ideal for traders seeking to identify potential reversal or continuation signals based on price-oscillator divergences. It supports multiple oscillators, trend detection methods, and alert configurations, making it versatile for different markets and timeframes.
🎲Features
🎯Customizable Oscillator Selection
Built-in Oscillators : Choose from a variety of oscillators including RSI, CCI, CMO, COG, MFI, ROC, Stochastic, and WPR.
External Oscillator Support : Users can input an external oscillator source, allowing integration with custom or third-party indicators.
Configurable Length : Adjust the oscillator’s period (e.g., 14 for RSI) to fine-tune sensitivity.
🎯Divergence Detection
The screener identifies four types of divergences:
Bullish Divergence : Price forms a lower low, but the oscillator forms a higher low, signaling potential upward reversal.
Bearish Divergence : Price forms a higher high, but the oscillator forms a lower high, indicating potential downward reversal.
Bullish Hidden Divergence : Price forms a higher low, but the oscillator forms a lower low, suggesting trend continuation in an uptrend.
Bearish Hidden Divergence : Price forms a lower high, but the oscillator forms a higher high, suggesting trend continuation in a downtrend.
🎯Flexible Trend Detection
The indicator offers three methods to determine the trend context for divergence detection:
Zigzag : Uses zigzag pivots to identify trends based on higher highs (HH), higher lows (HL), lower highs (LH), and lower lows (LL).
MA Difference : Calculates the trend based on the difference in a moving average (e.g., SMA, EMA) between divergence pivots.
External Trend Signal : Allows users to input an external trend signal (positive for uptrend, negative for downtrend) for custom trend analysis.
🎯Zigzag-Based Pivot Analysis
Customizable Zigzag Length : Adjust the zigzag length (default: 13) to control the sensitivity of pivot detection.
Repaint Option : Choose whether divergence lines repaint based on the latest data or wait for confirmed pivots, balancing responsiveness and reliability.
🎯Visual and Alert Features
Divergence Visualization : Divergence lines are drawn between price pivots and oscillator pivots, color-coded for easy identification:
Bullish Divergence : Green
Bearish Divergence : Red
Bullish Hidden Divergence : Lime
Bearish Hidden Divergence : Orange
Labels and Tooltips : Labels (e.g., “D” for divergence, “H” for hidden) appear on price and oscillator pivots, with tooltips providing detailed information such as price/oscillator values, ratios, and pivot directions.
Alerts : Configurable alerts for each divergence type (bullish, bearish, bullish hidden, bearish hidden) trigger on bar close, ensuring timely notifications.
🎲 How It Works
🎯Oscillator Calculation
The indicator calculates the selected oscillator (or uses an external source) and plots it on the chart.
Oscillator values are stored in a map for reference during divergence calculations.
🎯Pivot Detection
A zigzag algorithm identifies pivots in the oscillator data, with configurable length and repainting options.
Price and oscillator pivots are compared to detect divergences based on their direction and ratio.
🎯Divergence Identification
The indicator compares price and oscillator pivot directions (HH, HL, LH, LL) to identify divergences.
Trend context is determined using the selected method (Zigzag, MA Difference, or External).
Divergences are classified as bullish, bearish, bullish hidden, or bearish hidden based on price-oscillator relationships and trend direction.
🎯Visualization and Alerts
Valid divergences are drawn as lines connecting price and oscillator pivots, with corresponding labels.
Alerts are triggered for allowed divergence types, providing detailed information via tooltips.
🎯Validation
Divergence lines are validated to ensure no intermediate bars violate the divergence condition, enhancing signal reliability.
🎲 Usage Instructions as Indicator
🎯Add to Chart:
Add the “Divergence Screener ” to your TradingView chart.
The indicator appears in a separate pane below the price chart, plotting the oscillator and divergence signals.
🎯Configure Settings:
Adjust the oscillator type and length to match your trading style.
Select a trend detection method and configure related parameters (e.g., MA type/length or external signal).
Set the zigzag length and repainting preference.
Enable/disable alerts for specific divergence types.
I🎯nterpret Signals:
Bullish Divergence (Green) : Look for potential buy opportunities in a downtrend.
Bearish Divergence (Red) : Consider sell opportunities in an uptrend.
Bullish Hidden Divergence (Lime) : Confirm continuation in an uptrend.
Bearish Hidden Divergence (Orange): Confirm continuation in a downtrend.
Use tooltips on labels to review detailed pivot and divergence information.
🎯Set Alerts:
Create alerts for each divergence type to receive notifications via TradingView’s alert system.
Alerts include detailed text with price, oscillator, and divergence information.
🎲 Example Scenarios as Indicator
🎯 With External Oscillator (Use MACD Histogram as Oscillator)
In order to use MACD as an oscillator for divergence signal instead of the built in options, follow these steps.
Load MACD Indicator from Indicator library
From Indicator settings of Divergence Screener, set Use External Oscillator and select MACD Histograme from the dropdown
You can now see that the oscillator pane shows the data of selected MACD histogram and divergence signals are generated based on the external MACD histogram data.
🎯 With External Trend Signal (Supertrend Ladder ATR)
Now let's demonstrate how to use external direction signals using Supertrend Ladder ATR indicator. Please note that in order to use the indicator as trend source, the indicator should return positive integer for uptrend and negative integer for downtrend. Steps are as follows:
Load the desired trend indicator. In this example, we are using Supertrend Ladder ATR
From the settings of Divergence Screener, select "External" as Trend Detection Method
Select the trend detection plot Direction from the dropdown. You can now see that the divergence signals will rely on the new trend settings rather than the built in options.
🎲 Using the Script with Pine Screener
The primary purpose of the Divergence Screener is to enable traders to scan multiple instruments (e.g., stocks, ETFs, forex pairs) for divergence signals using TradingView’s Pine Screener, facilitating efficient comparison and identification of trading opportunities.
To use the Divergence Screener as a screener, follow these steps:
Add to Favorites : Add the Divergence Screener to your TradingView favorites to make it available in the Pine Screener.
Create a Watchlist : Build a watchlist containing the instruments (e.g., stocks, ETFs, or forex pairs) you want to scan for divergences.
Access Pine Screener : Navigate to the Pine Screener via TradingView’s main menu: Products -> Screeners -> Pine, or directly visit tradingview.com/pine-screener/.
Select Watchlist : Choose the watchlist you created from the Watchlist dropdown in the Pine Screener interface.
Choose Indicator : Select Divergence Screener from the Choose Indicator dropdown.
Configure Settings : Set the desired timeframe (e.g., 1 hour, 1 day) and adjust indicator settings such as oscillator type, zigzag length, or trend detection method as needed.
Select Filter Criteria : Select the condition on which the watchlist items needs to be filtered. Filtering can only be done on the plots defined in the script.
Run Scan : Press the Scan button to display divergence signals across the selected instruments. The screener will show which instruments exhibit bullish, bearish, bullish hidden, or bearish hidden divergences based on the configured settings.
🎲 Limitations and Possible Future Enhancements
Limitations are
Custom input for oscillator and trend detection cannot be used in pine screener.
Pine screener has max 500 bars available.
Repaint option is by default enabled. When in repaint mode expect the early signal but the signals are prone to repaint.
Possible future enhancements
Add more built-in options for oscillators and trend detection methods so that dependency on external indicators is limited
Multi level zigzag support
[TH] กลยุทธ์ SMC หลายกรอบเวลา (V5.2 - M15 Lead)English Explanation
This Pine Script code implements a multi-timeframe trading strategy based on Smart Money Concepts (SMC). It's designed to identify high-probability trading setups by aligning signals across three different timeframes.
The core logic is as follows:
High Timeframe (HTF) - M15: Determines the overall market direction or bias.
Medium Timeframe (MTF) - M5: Identifies potential Points of Interest (POI), such as Order Blocks or Fair Value Gaps, in alignment with the M15 bias.
Low Timeframe (LTF) - Current Chart: Looks for a specific entry trigger within the M5 POI to execute the trade.
Detailed Breakdown
## Part 1: Inputs & Settings
This section allows you to customize the indicator's parameters:
General Settings:
i_pivotLookback: Sets the lookback period for identifying pivot highs and lows on the LTF, which is crucial for finding the Change of Character (CHoCH).
M15 Bias Settings:
i_m15EmaFast / i_m15EmaSlow: These two EMA (Exponential Moving Average) values on the 15-minute chart determine the main trend. A bullish trend is confirmed when the fast EMA is above the slow EMA, and vice-versa for a bearish trend.
M5 Point of Interest (POI) Settings:
i_showM5Fvg / i_showM5Ob: Toggles the visibility of Fair Value Gaps (FVG) and Order Blocks (OB) on the 5-minute chart. These are the zones where the script will look for trading opportunities.
i_maxPois: Limits the number of POI zones drawn on the chart to keep it clean.
LTF Entry Settings:
i_entryMode:
Confirmation: The script waits for a Change of Character (CHoCH) on the LTF (your current chart) after the price enters an M5 POI. A CHoCH is a break of a recent pivot high (for buys) or pivot low (for sells), suggesting a potential reversal. This is the safer entry method.
Aggressive: The script triggers an entry as soon as the price touches the 50% level of the M5 POI, without waiting for a CHoCH. This is higher risk but can provide a better entry price.
i_showChoch: Toggles the visibility of the CHoCH confirmation lines.
Trade Management Settings:
i_tpRatio: Sets the Risk-to-Reward Ratio (RRR) for the Take Profit target. For example, a value of 2.0 means the Take Profit distance will be twice the Stop Loss distance.
i_slMode: (New in V5.2) Provides four different methods to calculate the Stop Loss:
POI Zone (Default): Places the SL at the outer edge of the M5 POI zone.
Last Swing: Places the SL at the most recent LTF swing high/low before the entry.
ATR: Uses the Average True Range (ATR) indicator to set a volatility-based SL.
Previous Candle: Places the SL at the high or low of the candle immediately preceding the entry. This is the tightest and riskiest option.
i_maxHistory: Sets the number of past trades to display on the chart.
## Part 2: Data Types & Variables
This section defines custom data structures (type) to organize information:
Poi: A structure to hold all information related to a single Point of Interest, including its price boundaries, direction (bullish/bearish), and whether it has been mitigated (touched by price).
Trade: A structure to store details for each trade, such as its entry price, SL, TP, result (Win/Loss/Active), and chart objects for drawing.
## Part 3: Core Logic & Calculations
This is the engine of the indicator:
Data Fetching: It uses request.security to pull EMA data from the M15 timeframe and candle data (high, low, open, close) from the M5 timeframe.
POI Identification: The script constantly scans the M5 data for FVG and OB patterns. When a valid pattern is found that aligns with the M15 bias (e.g., a bullish OB during an M15 uptrend), it's stored as a Poi and drawn on the chart.
Entry Trigger:
It checks if the price on the LTF enters a valid (unmitigated) POI zone.
Based on the selected i_entryMode, it either waits for a CHoCH or enters aggressively.
Once an entry condition is met, it calculates the SL based on the i_slMode, calculates the TP using the i_tpRatio, and creates a new Trade.
Trade Monitoring: For every active trade, the script checks on each new bar if the price has hit the SL or TP level. When it does, the trade's result is updated, and the visual boxes are finalized.
## Part 5: On-Screen Display
This part creates the Performance Dashboard table shown on the top-right of the chart. It provides a real-time summary of:
M15 Bias: Current market direction.
Total Trades: The total number of completed trades from the history.
Win Rate: The percentage of winning trades.
Total R-Multiple: The cumulative Risk-to-Reward multiple (sum of RRR from wins minus losses). A positive value indicates overall profitability.
🇹🇭 คำอธิบายและข้อแนะนำภาษาไทย
สคริปต์นี้เป็น Indicator สำหรับกลยุทธ์การเทรดแบบ Smart Money Concepts (SMC) ที่ใช้การวิเคราะห์จากหลายกรอบเวลา (Multi-Timeframe) เพื่อหาจุดเข้าเทรดที่มีความเป็นไปได้สูง
หลักการทำงานของ Indicator มีดังนี้:
Timeframe ใหญ่ (HTF) - M15: ใช้กำหนดทิศทางหลักของตลาด หรือ "Bias"
Timeframe กลาง (MTF) - M5: ใช้หาโซนสำคัญ หรือ "Point of Interest (POI)" เช่น Order Blocks หรือ Fair Value Gaps ที่สอดคล้องกับทิศทางจาก M15
Timeframe เล็ก (LTF) - กราฟปัจจุบัน: ใช้หาสัญญาณยืนยันเพื่อเข้าเทรดในโซน POI ที่กำหนดไว้
รายละเอียดของโค้ด
## ส่วนที่ 1: การตั้งค่า (Inputs & Settings)
ส่วนนี้ให้คุณปรับแต่งค่าต่างๆ ของ Indicator ได้:
การตั้งค่าทั่วไป:
i_pivotLookback: กำหนดระยะเวลาที่ใช้มองหาจุดกลับตัว (Pivot) ใน Timeframe เล็ก (LTF) เพื่อใช้ยืนยันสัญญาณ Change of Character (CHoCH)
การตั้งค่า M15 (ทิศทางหลัก):
i_m15EmaFast / i_m15EmaSlow: ใช้เส้น EMA 2 เส้นบน Timeframe 15 นาที เพื่อกำหนดเทรนด์หลัก หาก EMA เร็วอยู่เหนือ EMA ช้า จะเป็นเทรนด์ขาขึ้น และในทางกลับกัน
การตั้งค่า M5 (จุดสนใจ - POI):
i_showM5Fvg / i_showM5Ob: เปิด/ปิด การแสดงโซน Fair Value Gaps (FVG) และ Order Blocks (OB) บน Timeframe 5 นาที ซึ่งเป็นโซนที่สคริปต์จะใช้หาโอกาสเข้าเทรด
i_maxPois: จำกัดจำนวนโซน POI ที่จะแสดงผลบนหน้าจอ เพื่อไม่ให้กราฟดูรกเกินไป
การตั้งค่า LTF (การเข้าเทรด):
i_entryMode:
ยืนยัน (Confirmation): เป็นโหมดที่ปลอดภัยกว่า โดยสคริปต์จะรอให้เกิดสัญญาณ Change of Character (CHoCH) ใน Timeframe เล็กก่อน หลังจากที่ราคาเข้ามาในโซน POI แล้ว
เชิงรุก (Aggressive): เป็นโหมดที่เสี่ยงกว่า โดยสคริปต์จะเข้าเทรดทันทีที่ราคาแตะระดับ 50% ของโซน POI โดยไม่รอสัญญาณยืนยัน CHoCH
i_showChoch: เปิด/ปิด การแสดงเส้น CHoCH บนกราฟ
การตั้งค่าการจัดการเทรด:
i_tpRatio: กำหนด อัตราส่วนกำไรต่อความเสี่ยง (Risk-to-Reward Ratio) เพื่อตั้งเป้าหมายทำกำไร (Take Profit) เช่น 2.0 หมายถึงระยะทำกำไรจะเป็น 2 เท่าของระยะตัดขาดทุน
i_slMode: (ฟีเจอร์ใหม่ V5.2) มี 4 รูปแบบในการคำนวณ Stop Loss:
โซน POI (ค่าเริ่มต้น): วาง SL ไว้ที่ขอบนอกสุดของโซน POI
Swing ล่าสุด: วาง SL ไว้ที่จุด Swing High/Low ล่าสุดของ Timeframe เล็ก (LTF) ก่อนเข้าเทรด
ATR: ใช้ค่า ATR (Average True Range) เพื่อกำหนด SL ตามระดับความผันผวนของราคา
แท่งเทียนก่อนหน้า: วาง SL ไว้ที่ราคา High/Low ของแท่งเทียนก่อนหน้าที่จะเข้าเทรด เป็นวิธีที่ SL แคบและเสี่ยงที่สุด
i_maxHistory: กำหนดจำนวนประวัติการเทรดที่จะแสดงย้อนหลังบนกราฟ
## ส่วนที่ 2: ประเภทข้อมูลและตัวแปร
ส่วนนี้เป็นการสร้างโครงสร้างข้อมูล (type) เพื่อจัดเก็บข้อมูลให้เป็นระบบ:
Poi: เก็บข้อมูลของโซน POI แต่ละโซน เช่น กรอบราคาบน-ล่าง, ทิศทาง (ขึ้น/ลง) และสถานะว่าถูกใช้งานไปแล้วหรือยัง (Mitigated)
Trade: เก็บรายละเอียดของแต่ละการเทรด เช่น ราคาเข้า, SL, TP, ผลลัพธ์ (Win/Loss/Active) และอ็อบเจกต์สำหรับวาดกล่องบนกราฟ
## ส่วนที่ 3: ตรรกะหลักและการคำนวณ
เป็นหัวใจสำคัญของ Indicator:
ดึงข้อมูลข้าม Timeframe: ใช้ฟังก์ชัน request.security เพื่อดึงข้อมูล EMA จาก M15 และข้อมูลแท่งเทียนจาก M5 มาใช้งาน
ระบุ POI: สคริปต์จะค้นหา FVG และ OB บน M5 ตลอดเวลา หากเจ้ารูปแบบที่สอดคล้องกับทิศทางหลักจาก M15 (เช่น เจอ Bullish OB ในขณะที่ M15 เป็นขาขึ้น) ก็จะวาดโซนนั้นไว้บนกราฟ
เงื่อนไขการเข้าเทรด:
เมื่อราคาใน Timeframe เล็ก (LTF) วิ่งเข้ามาในโซน POI ที่ยังไม่เคยถูกใช้งาน
สคริปต์จะรอสัญญาณตาม i_entryMode ที่เลือกไว้ (รอ CHoCH หรือเข้าแบบ Aggressive)
เมื่อเงื่อนไขครบ จะคำนวณ SL และ TP จากนั้นจึงบันทึกการเทรดใหม่
ติดตามการเทรด: สำหรับเทรดที่ยัง "Active" อยู่ สคริปต์จะคอยตรวจสอบทุกแท่งเทียนว่าราคาไปถึง SL หรือ TP แล้วหรือยัง เมื่อถึงจุดใดจุดหนึ่ง จะบันทึกผลและสิ้นสุดการวาดกล่องบนกราฟ
## ส่วนที่ 5: การแสดงผลบนหน้าจอ
ส่วนนี้จะสร้างตาราง "Performance Dashboard" ที่มุมขวาบนของกราฟ เพื่อสรุปผลการทำงานแบบ Real-time:
M15 Bias: แสดงทิศทางของตลาดในปัจจุบัน
Total Trades: จำนวนเทรดทั้งหมดที่เกิดขึ้นในประวัติ
Win Rate: อัตราชนะ คิดเป็นเปอร์เซ็นต์
Total R-Multiple: ผลตอบแทนรวมจากความเสี่ยง (R) ทั้งหมด (ผลรวม RRR ของเทรดที่ชนะ ลบด้วยจำนวนเทรดที่แพ้) หากเป็นบวกแสดงว่ามีกำไรโดยรวม
📋 ข้อแนะนำในการใช้งาน
Timeframe ที่เหมาะสม: Indicator นี้ถูกออกแบบมาให้ใช้กับ Timeframe เล็ก (LTF) เช่น M1, M3 หรือ M5 เนื่องจากมันดึงข้อมูลจาก M15 และ M5 มาเป็นหลักการอยู่แล้ว
สไตล์การเทรด:
Confirmation: เหมาะสำหรับผู้ที่ต้องการความปลอดภัยสูง รอการยืนยันก่อนเข้าเทรด อาจจะตกรถบ้าง แต่ลดความเสี่ยงจากการเข้าเทรดเร็วเกินไป
Aggressive: เหมาะสำหรับผู้ที่ยอมรับความเสี่ยงได้สูงขึ้น เพื่อให้ได้ราคาเข้าที่ดีที่สุด
การเลือก Stop Loss:
"Swing ล่าสุด" และ "โซน POI" เป็นวิธีมาตรฐานตามหลัก SMC
"ATR" เหมาะกับตลาดที่มีความผันผวนสูง เพราะ SL จะปรับตามสภาพตลาด
"แท่งเทียนก่อนหน้า" เป็นวิธีที่เสี่ยงที่สุด เหมาะกับการเทรดเร็วและต้องการ RRR สูงๆ แต่ก็มีโอกาสโดน SL ง่ายขึ้น
การบริหารความเสี่ยง: Indicator นี้เป็นเพียง เครื่องมือช่วยวิเคราะห์ ไม่ใช่สัญญาณซื้อขายอัตโนมัติ 100% ผู้ใช้ควรมีความเข้าใจในหลักการของ SMC และทำการบริหารความเสี่ยง (Risk Management) อย่างเคร่งครัดเสมอ
การทดสอบย้อนหลัง (Backtesting): ควรทำการทดสอบ Indicator กับสินทรัพย์และตั้งค่าต่างๆ เพื่อให้เข้าใจลักษณะการทำงานและประสิทธิภาพของมันก่อนนำไปใช้เทรดจริง
Multi-Timeframe PivotDescription:
This script provides an advanced tool for multi-timeframe pivot point
analysis. It identifies swing points based on a candle's relationship to
its neighbors. The default strength settings of 1 align with the Inner
Circle Trader (ICT) concept of market structure.
The ICT concept defines a swing point based on a simple 3-candle pattern:
- A swing high is a candle where the candles to the immediate left and right
both have lower highs.
- A swing low is a candle where the candles to the immediate left and right
both have higher lows.
A key feature is its ability to accurately calculate and translate pivot
points from up to five higher timeframes (HTFs) and display them
precisely on a lower timeframe (LTF) chart.
NOTE: This indicator is designed to show HTF data on an LTF chart.
If you select a timeframe in the settings that is lower than your
current chart's timeframe, it will show pivots for the chart's
timeframe instead.
Core Features:
- Up to five independent higher timeframes.
- Per-timeframe customization for pivot strength (left/right bars) and color.
- Optional "Watchlines" that project the price of each pivot forward,
complete with a text label identifying the timeframe.
- An optional "Alignment Model" that colors the background when price is
aligned across all active timeframes (requires at least 2 TFs to be enabled).
Default State:
For a clean initial application, the Watchlines and Alignment Model features
are disabled by default but can be enabled in the settings.
Adiyogi Trend🟢🔴 “Adiyogi” Trend — Market Alignment Visualizer
“Adiyogi” Trend is a powerful, non-intrusive trend detection system built for traders who seek clarity, discipline, and alignment with true market flow. Inspired by the meditative stillness of Adiyogi and the need for mindful, high-probability decisions, this tool offers a clean and intuitive visual guide to trending environments — without cluttering the chart or pushing forced trades.
This is not a buy/sell signal generator. Instead, it is designed as a background confirmation engine that helps you stay on the right side of the market by identifying moments of true directional strength.
🧠 Core Logic
The “Adiyogi” Trend indicator highlights the background of your chart in green or red when multiple layers of strength and structure align — including momentum, market positioning, and relative force. Only when these internal components agree does the system activate a directional state.
It’s built on three foundational energies of trend confirmation:
Strength of movement
Structure in price action
Conviction in momentum
By combining these into one visual background, the indicator filters out indecision and helps you stay focused during real trend phases — whether you're day trading, swing trading, or holding longer-term positions.
📌 Core Concepts Behind the Tool
The indicator integrates three essential market filters—each confirming a different dimension of trend strength:
ADX (Average Directional Index) – Measures trend momentum.
You’ve chosen a very responsive setting (ADX Length = 2), which helps catch the earliest possible signs of momentum emergence.
The threshold is ADX ≥ 22, ensuring that weak or sideways markets are filtered out.
SuperTrend (10,1) – Captures short-term trend direction.
This setup follows price closely and reacts quickly to reversals, making it ideal for fast-moving assets or intraday strategies.
SuperTrend acts as the structural confirmation of directional bias.
RSI (Relative Strength Index) – Measures strength based on recent price closes.
You’ve configured RSI > 50 for bullish zones and < 50 for bearish—a neutral midpoint standard often used by professional traders.
This ensures that only trades in sync with momentum and recent strength are highlighted.
🌈 How It Visually Works
Background turns GREEN when:
ADX ≥ 22, indicating strong momentum
Price is above the 20 EMA and above SuperTrend (10,1)
RSI > 50, confirming recent strength
Background turns RED when:
ADX ≥ 22, indicating strong momentum
Price is below the 20 EMA and below SuperTrend (10,1)
RSI < 50, confirming recent weakness
The background remains neutral (transparent) when trend conditions are not clearly aligned—this is the tool's way of keeping you out of indecisive markets.
A label (BULL / BEAR) appears only when the bias flips from the previous one. This helps avoid repeated or redundant alerts, focusing your attention only when something changes.
📊 Practical Uses & Benefits
✅ Stay with the trend: Perfectly filters out choppy or sideways markets by only activating when conditions align across momentum, structure, and strength.
✅ Pre-trade confirmation: Use this tool to confirm trade setups from other indicators or price action patterns.
✅ Avoid noise: Prevent overtrading by focusing only on high-quality trend conditions.
✅ Visual clarity: Unlike arrows or plots that clutter the chart, this tool subtly highlights trend conditions in the background, preserving your price action view.
📍 Important Notes
This is not a buy/sell signal generator. It is a trend-confirmation system.
Use it in conjunction with your existing entry setups—such as breakouts, order blocks, retests, or candlestick patterns.
The tool helps you stay in sync with the dominant direction, especially when combining multiple timeframes.
Can be used on any market (stocks, forex, crypto, indices) and on any timeframe.
Order Blocks Higher TimeFrameThis indicator shows order blocks which has FVG on all timeframe with full accuracy.
BB + RSI & Volume FilterThis script overlays three sets of technical filters on your price chart and generates signals when conditions align:
Bollinger Bands
Calculates upper, middle, and lower bands using either SMA or EMA.
Buy signal when price crosses up through the lower band.
Sell signal when price crosses down through the upper band.
Volume Filter
Computes a simple moving average of volume.
Ensures breakout moves have sufficient volume by requiring current volume > SMA(volume) × multiplier.
RSI Filter
Computes RSI on the chosen source.
Buy when RSI crosses above the oversold threshold.
Sell when RSI crosses below the overbought threshold.
Only plots RSI signals that pass the volume filter.
You get:
Bollinger entry/exit shapes (labeled “BB ↑/↓”).
RSI entry/exit shapes (labeled “RSI”) only when volume confirms the move.
Alerts for each signal type.
This combination reduces false breakouts by requiring both volatility (Bollinger) or momentum (RSI) and volume confirmation
Institutional Momentum Scanner [IMS]Institutional Momentum Scanner - Professional Momentum Detection System
Hunt explosive price movements like the professionals. IMS identifies maximum momentum displacement within 10-bar windows, revealing where institutional money commits to directional moves.
KEY FEATURES:
▪ Scans for strongest momentum in rolling 10-bar windows (institutional accumulation period)
▪ Adaptive filtering reduces false signals using efficiency ratio technology
▪ Three clear states: LONG (green), SHORT (red), WAIT (gray)
▪ Dynamic volatility-adjusted thresholds (8% ATR-scaled)
▪ Visual momentum flow with glow effects for signal strength
BASED ON:
- Pocket Pivot concept (O'Neil/Morales) applied to price momentum
- Adaptive Moving Average principles (Kaufman KAMA)
- Market Wizards momentum philosophy
- Institutional order flow patterns (5-day verification window)
HOW IT WORKS:
The scanner finds the maximum price displacement in each 10-bar window - where the market showed its hand. An adaptive filter (5-bar regression) separates real moves from noise. When momentum exceeds the volatility-adjusted threshold, states change.
IDEAL FOR:
- Momentum traders seeking explosive moves
- Swing traders (especially 4H timeframe)
- Position traders wanting institutional footprints
- Anyone tired of false breakout signals
Default parameters (10,5) optimized for 4H charts but adaptable to any timeframe. Remember: The market rewards patience and punishes heroes. Wait for clear signals.
"The market is honest. Are you?"
Forex Monday RangeForex Monday Range. Refers to the price range (high to low) established during Monday's trading session, typically measured from midnight Sunday to midnight Monday (New York time).
MVWAP 5/21/50 + LWMA 400Moving vwap de 5,21,50 y media movil ponderada de 400
se puede utilizar con cruces
fadi ffa This script is for educational purposes only. It draws historical pivot points and labels them on the chart to help users visualize price levels. It does not provide trading signals, recommendations, or any financial advice. Use at your own risk. The author is not responsible for any decisions made based on this script.
Momentum Regression [BackQuant]Momentum Regression
The Momentum Regression is an advanced statistical indicator built to empower quants, strategists, and technically inclined traders with a robust visual and quantitative framework for analyzing momentum effects in financial markets. Unlike traditional momentum indicators that rely on raw price movements or moving averages, this tool leverages a volatility-adjusted linear regression model (y ~ x) to uncover and validate momentum behavior over a user-defined lookback window.
Purpose & Design Philosophy
Momentum is a core anomaly in quantitative finance — an effect where assets that have performed well (or poorly) continue to do so over short to medium-term horizons. However, this effect can be noisy, regime-dependent, and sometimes spurious.
The Momentum Regression is designed as a pre-strategy analytical tool to help you filter and verify whether statistically meaningful and tradable momentum exists in a given asset. Its architecture includes:
Volatility normalization to account for differences in scale and distribution.
Regression analysis to model the relationship between past and present standardized returns.
Deviation bands to highlight overbought/oversold zones around the predicted trendline.
Statistical summary tables to assess the reliability of the detected momentum.
Core Concepts and Calculations
The model uses the following:
Independent variable (x): The volatility-adjusted return over the chosen momentum period.
Dependent variable (y): The 1-bar lagged log return, also adjusted for volatility.
A simple linear regression is performed over a large lookback window (default: 1000 bars), which reveals the slope and intercept of the momentum line. These values are then used to construct:
A predicted momentum trendline across time.
Upper and lower deviation bands , representing ±n standard deviations of the regression residuals (errors).
These visual elements help traders judge how far current returns deviate from the modeled momentum trend, similar to Bollinger Bands but derived from a regression model rather than a moving average.
Key Metrics Provided
On each update, the indicator dynamically displays:
Momentum Slope (β₁): Indicates trend direction and strength. A higher absolute value implies a stronger effect.
Intercept (β₀): The predicted return when x = 0.
Pearson’s R: Correlation coefficient between x and y.
R² (Coefficient of Determination): Indicates how well the regression line explains the variance in y.
Standard Error of Residuals: Measures dispersion around the trendline.
t-Statistic of β₁: Used to evaluate statistical significance of the momentum slope.
These statistics are presented in a top-right summary table for immediate interpretation. A bottom-right signal table also summarizes key takeaways with visual indicators.
Features and Inputs
✅ Volatility-Adjusted Momentum : Reduces distortions from noisy price spikes.
✅ Custom Lookback Control : Set the number of bars to analyze regression.
✅ Extendable Trendlines : For continuous visualization into the future.
✅ Deviation Bands : Optional ±σ multipliers to detect abnormal price action.
✅ Contextual Tables : Help determine strength, direction, and significance of momentum.
✅ Separate Pane Design : Cleanly isolates statistical momentum from price chart.
How It Helps Traders
📉 Quantitative Strategy Validation:
Use the regression results to confirm whether a momentum-based strategy is worth pursuing on a specific asset or timeframe.
🔍 Regime Detection:
Track when momentum breaks down or reverses. Slope changes, drops in R², or weak t-stats can signal regime shifts.
📊 Trade Filtering:
Avoid false positives by entering trades only when momentum is both statistically significant and directionally favorable.
📈 Backtest Preparation:
Before running costly simulations, use this tool to pre-screen assets for exploitable return structures.
When to Use It
Before building or deploying a momentum strategy : Test if momentum exists and is statistically reliable.
During market transitions : Detect early signs of fading strength or reversal.
As part of an edge-stacking framework : Combine with other filters such as volatility compression, volume surges, or macro filters.
Conclusion
The Momentum Regression indicator offers a powerful fusion of statistical analysis and visual interpretation. By combining volatility-adjusted returns with real-time linear regression modeling, it helps quantify and qualify one of the most studied and traded anomalies in finance: momentum.
Market Killer & Scalper [SUKH-X] [Only 1% can understand it]Advanced XAUUSD Scalper Pro - Complete Trading System
🎯 Overview
The Advanced XAUUSD Scalper Pro is a comprehensive Pine Script indicator specifically designed for scalping XAUUSD (Gold/USD) on 5-minute timeframes. This professional-grade tool combines multiple technical analysis methods to provide high-accuracy entry and exit signals for short-term traders.
🔧 Core Features
Dynamic Support & Resistance System
Automatic Pivot Detection : Identifies key pivot highs and lows based on customizable strength settings
Visual S&R Boxes : Color-coded boxes highlighting support (green) and resistance (red) zones
Adaptive Levels : Maintains up to 10 dynamic S&R levels that update in real-time
Breakout Detection : Alerts when price breaks through significant levels with volume confirmation
Advanced Breakout Analysis [ /i]
Threshold-Based Detection : Customizable breakout percentage thresholds (default 0.02%)
Volume Confirmation : Optional volume spike validation for stronger signals
Consolidation Zones : Identifies sideways markets before potential breakouts
Multi-Timeframe Support : Works across different timeframes with adaptive parameters
### **Reversal Signal System**
- **RSI Integration**: 14-period RSI with customizable overbought (70) and oversold (30) levels
- **Stochastic Oscillator**: Dual %K and %D lines for momentum confirmation
- **Candlestick Patterns**: Incorporates bullish/bearish candlestick analysis
- **Divergence Detection**: Identifies potential trend reversals at key levels
### **Scalping Optimization**
- **Dual EMA System**: Fast EMA (8) and Slow EMA (21) for trend direction
- **ATR-Based Calculations**: Dynamic stop-loss and take-profit levels using Average True Range
- **Trend Strength Filter**: Background coloring indicates strong uptrends (green) and downtrends (red)
- **Noise Reduction**: Filters out false signals in choppy market conditions
## 📊 **Visual Elements**
### **Signal Types**
- **🟢 Green Triangle Up**: Long entry signal with confluence of bullish factors
- **🔴 Red Triangle Down**: Short entry signal with bearish confirmation
- **🟡 Yellow X**: Exit signals for both long and short positions
- **Blue/Orange Lines**: Fast and slow EMAs for trend visualization
### **Information Dashboard**
- **Real-Time Statistics**: Live price, ATR, RSI, trend direction, and volume status
- **S&R Level Counter**: Shows active support and resistance levels
- **Consolidation Indicator**: Identifies low-volatility periods
- **Market Condition**: Current trend strength and direction
## ⚙️ **Customizable Parameters**
### **Support & Resistance Settings**
- S&R Period: 5-100 (default: 20)
- S&R Strength: 1-5 (default: 2)
- Maximum S&R Levels: 3-10 (default: 5)
- Visual box display toggle
### **Breakout Configuration**
- Breakout threshold: 0.01%-0.1% (default: 0.02%)
- Volume confirmation on/off
- Minimum consolidation bars: 5-50 (default: 10)
### **Reversal Settings**
- RSI period: 2-50 (default: 14)
- Overbought/oversold levels: customizable
- Stochastic %K and %D periods
### **Scalping Parameters**
- Fast EMA: 3-20 (default: 8)
- Slow EMA: 10-50 (default: 21)
- ATR period and multiplier for risk management
## 🚀 **Best Practices**
### **Optimal Setup**
- **Timeframe**: 5-minute charts (can be adapted for 1m, 3m, 15m)
- **Instrument**: XAUUSD (Gold/USD) - specifically optimized for gold volatility
- **Session**: Best during London and New York overlaps
- **Market Conditions**: Most effective in trending and breakout scenarios
### **Risk Management**
- Use ATR multiplier (1.5x default) for stop-loss placement
- Take profit at 2:1 or 3:1 risk-reward ratios
- Enable volume confirmation for higher-probability trades
- Monitor news events that affect gold prices
### **Signal Interpretation**
- **Strong Signals**: Multiple confirmations (trend + S&R + momentum)
- **Weak Signals**: Single indicator signals during consolidation
- **Exit Strategy**: Use yellow X markers or when price hits opposite EMA
## 📈 **Performance Features**
### **Accuracy Enhancements**
- **Multi-Confirmation System**: Requires multiple technical factors to align
- **False Signal Filtering**: Reduces noise through trend and volume filters
- **Adaptive Levels**: S&R levels update based on recent price action
- **Market Structure Analysis**: Considers overall market context
### **Alert System**
- **Entry Alerts**: Long and short signal notifications
- **Exit Alerts**: Position closure recommendations
- **Level Alerts**: S&R breakout notifications
- **Custom Messages**: Detailed alert information including price and ATR
## 🎨 **Visual Customization**
- Toggle all visual elements on/off
- Customizable colors and transparency
- Adjustable line widths and styles
- Statistics table positioning
- Background coloring for trend identification
## 📋 **Technical Requirements**
- Pine Script v5 compatible
- Maximum 500 boxes and lines for optimal performance
- Real-time data feed recommended
- Works on TradingView Pro, Pro+, and Premium plans
## 🔍 **Unique Selling Points**
1. **XAUUSD Specific**: Optimized parameters for gold's unique volatility patterns
2. **Scalping Focus**: Designed for quick entries and exits with minimal lag
3. **Complete System**: Combines trend, momentum, and S&R analysis
4. **Professional Grade**: Institutional-quality technical analysis
5. **User-Friendly**: Intuitive visual signals with comprehensive customization
## ⚠️ **Disclaimer**
This indicator is a technical analysis tool designed to assist in trading decisions. It should not be used as the sole basis for trading decisions. Always combine with proper risk management, fundamental analysis, and market awareness. Past performance does not guarantee future results. Trading gold (XAUUSD) involves substantial risk and may not be suitable for all investors.
## 🏷️ **Tags**
`XAUUSD` `Gold` `Scalping` `Support` `Resistance` `Breakout` `Reversal` `EMA` `RSI` `Stochastic` `ATR` `Volume` `Alerts` `5min` `Intraday`
Liquidity Sweeps [SB1]Liquidity Sweeps
This indicator detects liquidity sweep events where price briefly breaks above or below recent swing points before reversing. These sweeps often occur during stop hunts, fakeouts, or liquidity grabs, and are commonly used by smart money traders to trap breakout participants before reversing direction.
🔍 What It Does
Identifies key swing highs and lows based on user-defined pivot strength.
Detects:
Bearish Sweeps: Price breaks a recent high but fails to close above it.
Bullish Sweeps: Price breaks a recent low but fails to close below it.
Tracks whether these sweeps are simply wicks, full breakouts and retests, or a combination of both.
Highlights these zones with boxes and labels to signal high-probability reversal or reaction zones.
🧠 Why Use It
Liquidity sweeps are often used by institutions and large players to trigger stops and create movement. Detecting these events helps traders:
Avoid chasing false breakouts
Time entries around exhaustion or reversal points
Align trades with Smart Money Concepts (SMC), ICT principles, or Order Block Theory
Avoid chasing false breakouts
Time entries around exhaustion or reversal points
Align trades with Smart Money Concepts (SMC), ICT principles, or Order Block Theory
⚙️ Settings & Customization
Swings: Adjusts the sensitivity of swing high/low detection.
Detection Type:
Only Wicks: Detects when a wick pierces a level but closes back inside.
Only Outbreaks & Retests: Detects when a candle breaks out and later retests.
Wicks + Outbreaks & Retests: Shows both types for full coverage.
Extend Zones: Draws boxes across future bars until invalidation.
Colors: Fully customizable for bullish and bearish sweeps.
🧬 Original Enhancements
This script is based on open-source work by LuxAlgo and has been significantly enhanced with:
Multiple detection modes
Real-time alert support📣 📣
Efficient pivot memory cleanup📣 📣
Sweep zone auto-extension until broken
Improved visual clarity with dotted/dashed lines, and color-coded boxes
✅ Note: The original version had no alerts. This version adds real-time detection alerts for practical trading use. Credit: Original swing detection logic inspired by LuxAlgo’s open-source Liquidity Sweep framework. This version is extended and modified under the terms of the CC BY-NC-SA 4.0 license.
📣 📣 Alerts Included📣📣
🔼 Bullish Wick Sweep📣
🔽 Bearish Wick Sweep📣
These alerts allow traders to be notified the moment a liquidity sweep occurs, providing immediate edge for reactive or anticipatory trading.
📈 How to Use It
Add to your chart.
Choose the detection type based on your trading style:
Wicks for reversals and stop hunts
Outbreaks for failed breakouts or retests
Wait for sweep zones to form and monitor price behavior around them.
Use in conjunction with:
Fair Value Gaps (FVG)
Order Blocks
VWAP Anchors
Market Structure Breaks/ Breaks of structures
Holy GrailThis is a long-only educational strategy that simulates what happens if you keep adding to a position during pullbacks and only exit when the asset hits a new All-Time High (ATH). It is intended for learning purposes only — not for live trading.
🧠 How it works:
The strategy identifies pullbacks using a simple moving average (MA).
When price dips below the MA, it begins monitoring for the first green candle (close > open).
That green candle signals a potential bottom, so it adds to the position.
If price goes lower, it waits for the next green candle and adds again.
The exit happens after ATH — it sells on each red candle (close < open) once a new ATH is reached.
You can adjust:
MA length (defines what’s considered a pullback)
Initial buy % (how much to pre-fill before signals start)
Buy % per signal (after pullback green candle)
Exit % per red candle after ATH
📊 Intended assets & timeframes:
This strategy is designed for broad market indices and long-term appreciating assets, such as:
SPY, NASDAQ, DAX, FTSE
Use it only on 1D or higher timeframes — it’s not meant for scalping or short-term trading.
⚠️ Important Limitations:
Long-only: The script does not short. It assumes the asset will eventually recover to a new ATH.
Not for all assets: It won't work on assets that may never recover (e.g., single stocks or speculative tokens).
Slow capital deployment: Entries happen gradually and may take a long time to close.
Not optimized for returns: Buy & hold can outperform this strategy.
No slippage, fees, or funding costs included.
This is not a performance strategy. It’s a teaching tool to show that:
High win rate ≠ high profitability
Patience can be deceiving
Many signals = long capital lock-in
🎓 Why it exists:
The purpose of this strategy is to demonstrate market psychology and risk overconfidence. Traders often chase strategies with high win rates without considering holding time, drawdowns, or opportunity cost.
This script helps visualize that phenomenon.
AMOGH SMC 1Smart Money Concept (SMC) Indicator market structure ke powerful elements jaise Break of Structure (BOS), Change of Character (CHoCH), liquidity zones, aur Fair Value Gaps (FVG) ko identify karta hai. Is indicator ka purpose hai institutional price movements ko track karna—jahaan large players apna entry ya exit plan karte hain. Traditional indicators ke mukable SMC ek zyada refined aur logic-driven approach deta hai jisme market ka intent samajhna asaan hota hai. Ye tool traders ko trending aur consolidating market conditions me structure-based signals provide karta hai, jisse trade execution aur risk management aur effective ho jata hai. FVGs un zones ko highlight karte hain jahan price imbalance hota hai, aur CHoCH/BOS se market ka directional bias confirm hota hai. Jo traders price action aur institutional footprint pe kaam karte hain, unke liye ye indicator ek must-have resource hai. Iska design clean, customizable aur real-time plotting ke saath optimized hai.
SymFlex Band - RSI-MAD Asymmetric
🔮 SymFlex Band – RSI-MAD Asymmetric Band by Kwang Il Lee
Source: surirang.com
The SymFlex Band is a unique asymmetric envelope built on a hybrid concept that fuses RSI momentum dynamics with MAD (Mean Absolute Deviation). Unlike traditional symmetric bands (like Bollinger Bands or Keltner Channels), this band expands and contracts asymmetrically, reflecting the directional momentum of the market.
🎯 Core Innovation
🔸 RSI-Based Asymmetry
This band is not centered merely on price volatility. Instead, it uses the RSI's deviation from the neutral line (50) to determine whether bullish or bearish pressure is dominating — dynamically expanding or compressing the upper/lower bands accordingly.
🔸 MAD-Weighted Scaling
To ensure the band responds accurately to real price deviation, MAD is used instead of standard deviation or ATR. It provides a more robust and median-sensitive envelope for noisy or volatile markets.
🔸 Dynamic Adaptation
The band is adaptive in both direction and width:
When RSI rises above 50, the upper band stretches wider.
When RSI falls below 50, the lower band stretches instead.
A minimum width threshold ensures stability.
📈 How to Use
Use breakouts from the band as potential trend signals.
Confirm market strength via table: Check if price is “In Range” or breaking out.
Monitor the correlation between MAD and RSI in the dynamic table to detect momentum sync.
🔍 Technical Notes
Supports multiple MA types (SMA, EMA, TEMA, DEMA, Zerolag, etc.) as the band basis.
Designed for both trend-following and range-trading interpretations.
Fully responsive to different market conditions through minimal user inputs.
🚨 Note: This is not a combination of unrelated indicators. The RSI-MAD structure is purpose-built to represent a new type of envelope based on directional momentum and deviation sensitivity.
VEP - Volume Explosion Predictor💥 VEP - Volume Explosion Predictor
General Overview
The Volume Explosion Predictor (VEP) is an advanced indicator that analyzes volume peaks to predict when the next volume explosion might occur. Using statistical analysis on historical patterns, it provides accurate probabilities on moments of greater trading activity.
MAIN FEATURES
🎯 Intelligent volume peak detection
Automatically identifies significant volume peaks
Anti-consecutive filter to avoid redundant signals
Customizable threshold for detection sensitivity
📊 Advanced statistical analysis
Calculates the average distance between volume peaks
Monitors the number of sessions without peaks
Tracks the maximum historical range without activity
🔮 Predictive system
Dynamic probability: Calculates the probability of an imminent peak
Visual indicators: Background colors that change based on probability
Time forecasts: Estimates remaining sessions to the next peak
📈 Visual signals
Colored arrows: Green for bullish peaks, red for bearish peaks
Statistics table: Complete real-time overview
ALERT SYSTEM
🚨 Three Alert Levels
New Valid Volume Peak: New peak detected
Approaching Prediction: Increasing probability
High Peak Probability: High probability of explosion
HOW TO USE IT
📋 Recommended setup
Timeframe : Works on all timeframes but daily, weekly or monthly timeframe usage is recommended. In any case, it should always be used consistently with your time horizon
Markets : Stocks, crypto, forex, commodities
Threshold for volume peak realization : It's recommended to start with 2.0x (i.e., twice the volume average) for normal markets, 1.5x for more volatile markets. This parameter can be set in the settings as desired
🎨 Visual interpretation
Green Arrows : Peak during bullish candle
Red Arrows : Peak during bearish candle
Red Background : High probability (>90%) of new peak
Yellow Background : Medium probability (50-70%)
📊 STATISTICS TABLE
The table shows:
Total peaks analyzed
Average distance between peaks
Current sessions without peaks
Forecast remaining sessions
Percentage probability
Volume threshold needed for peak realization
STRATEGIC ADVANTAGES
🎯 For Day Traders
Anticipates moments of greater volatility for analysis, supporting the evaluation of trading setups and providing context on low volume periods
📈 For Swing Traders
Identifies high-probability volume patterns, supporting breakout analysis with volume and improving understanding of market timing
🔍 For Technical Analysts
Understands the stock's volume patterns.
Helps evaluate the historical market interest and supports quantitative research and analysis
OTHER THINGS TO KNOW...
A) Anti-Consecutive Algorithm : allows to avoid multiple and consecutive volume signals and peaks at close range
B) Statistical Validation : Uses standard deviation for accuracy
C) Memory Management : Limits historical data for optimal performance
D) Compatibility : Works with all TradingView chart types
⚠️ IMPORTANT DISCLAIMER
This indicator is exclusively a technical analysis tool for studying volume patterns. It does not provide investment advice, trading signals or entry/exit points. All trading decisions are at the complete discretion and responsibility of the user. Always use in combination with other technical and fundamental analysis and proper risk management.
DESCRIZIONE IN ITALIANO
💥 VEP - Volume Explosion Predictor
Panoramica Generale
Il Volume Explosion Predictor (VEP) è un indicatore avanzato che analizza i picchi di volume per prevedere quando potrebbe verificarsi la prossima esplosione di volume. Utilizzando analisi statistiche sui pattern storici, fornisce probabilità accurate sui momenti di maggiore attività di trading.
CARATTERISTICHE PRINCIPALI
🎯 Rilevamento intelligente dei picchi di volume
- Identifica automaticamente i picchi di volume significativi
- Filtro anti-consecutivo per evitare segnali ridondanti
- Soglia personalizzabile per la sensibilità del rilevamento
📊 Analisi statistica avanzata
Calcola la distanza media tra i picchi di volume
Monitora il numero di sessioni senza picchi
Traccia il range massimo storico senza attività
🔮 Sistema predittivo
Probabilità dinamica: Calcola la probabilità di un imminente picco
Indicatori visivi: Colori di sfondo che cambiano in base alla probabilità
Previsioni temporali: Stima delle sessioni rimanenti al prossimo picco
📈 Segnali visivi
1) Frecce colorate: Verdi per picchi rialzisti, rosse per ribassisti
2) Tabella statistiche: Panoramica completa in tempo reale
SISTEMA DI ALERT
🚨 Tre Livelli di Alert
1) New Valid Volume Peak: Nuovo picco rilevato
2) Approaching Prediction: Probabilità in aumento
3) High Peak Probability: Alta probabilità di esplosione
COME UTILIZZARLO
📋 Setup consigliato
- Timeframe : Funziona su tutti i timeframe ma è consigliabile un utilizzo su timeframe giornaliero, settimanale o mensile. In ogni caso va sempre utilizzato coerentemente con il proprio orizzonte temporale
- Mercati : Azioni, crypto, forex, commodities
- Limite affinché si realizzi il picco di volumi : Si consiglia di iniziare con 2.0x (ovvero due volte la media dei volumi) per mercati normali, 1.5x per mercati più volatili. Questo parametro può essere settato nelle impostazioni a proprio piacimento
🎨 Interpretazione visuale
Frecce Verdi : Picco durante candela rialzista
Frecce Rosse : Picco durante candela ribassista
Sfondo Rosso : Alta probabilità (>90%) di nuovo picco
Sfondo Giallo : Probabilità media (50-70%)
📊 TABELLA STATISTICHE
La tabella mostra:
1. Totale picchi analizzati
2. Distanza media tra picchi
3. Sessioni attuali senza picchi
4. Previsione sessioni rimanenti
5. Probabilità percentuale
6. Soglia volume necessaria affinché si realizzi il picco di volumi
VANTAGGI STRATEGICI
🎯 Per Day Traders
Anticipa i momenti di maggiore volatilità per analisi, supportando la valutazione dei setup di trading e fornendo al contempo un contesto sui periodi di basso volume
📈 Per Swing Traders
1. Identifica pattern di volume ad alta probabilità, supportando l'analisi dei breakout con volume e migliorando la comprensione dei tempi di mercato
🔍 Per Analisti Tecnici
Comprende i pattern di volume del titolo.
Aiuta a fare una valutazione dell'interesse storico del mercato ed è di supporto alla ricerca e analisi quantitativa
ALTRE COSE DA SAPERE...
A) Algoritmo Anti-Consecutivo : permette di evitare segnali e picchi di volume multipli e consecutivi multipli a distanza ravvicinata
B) Validazione Statistica : Utilizza deviazione standard per l'accuratezza
C) Gestione Memoria : Limita i dati storici per performance ottimali
D) Compatibilità : Funziona con tutti i tipi di grafico TradingView
⚠️ DISCLAIMER IMPORTANTE
Questo indicatore è esclusivamente uno strumento di analisi tecnica per lo studio dei pattern di volume. Non fornisce consigli di investimento, segnali di trading o punti di ingresso/uscita. Tutte le decisioni di trading sono a completa discrezione e responsabilità dell'utente. Utilizzare sempre in combinazione con altre analisi tecniche, fondamentali e una adeguata gestione del rischio.