Smart Harmonic Pattern Detector//@version=6
indicator("Smart Harmonic Pattern Detector", overlay=true, max_lines_count=500, max_labels_count=500)
// === User Input ===
zigzagDepth = input.int(12, title="ZigZag Depth")
bullColor = input.color(color.green, title="Bullish Signal Color")
bearColor = input.color(color.red, title="Bearish Signal Color")
textSize = input.string(size.small, title="Label Size")
// === Signal Detection Variables ===
var bool showBuySignal = false
var bool showSellSignal = false
var string signalDir = na
var int signalBar = na
// === ZigZag Pivot Logic ===
var float zz_prices = array.new_float()
var int zz_indexes = array.new_int()
var bool zz_types = array.new_bool() // true for high, false for low
ph = ta.pivothigh(high, zigzagDepth, zigzagDepth)
pl = ta.pivotlow(low, zigzagDepth, zigzagDepth)
if not na(ph)
array.push(zz_prices, ph)
array.push(zz_indexes, bar_index - zigzagDepth)
array.push(zz_types, true)
if not na(pl)
array.push(zz_prices, pl)
array.push(zz_indexes, bar_index - zigzagDepth)
array.push(zz_types, false)
// Reset signals
showBuySignal := false
showSellSignal := false
// === Pattern Detection ===
if array.size(zz_prices) >= 5
// Get last 5 points
float x = array.get(zz_prices, array.size(zz_prices)-5)
float a = array.get(zz_prices, array.size(zz_prices)-4)
float b = array.get(zz_prices, array.size(zz_prices)-3)
float c = array.get(zz_prices, array.size(zz_prices)-2)
float d = array.get(zz_prices, array.size(zz_prices)-1)
int x_i = array.get(zz_indexes, array.size(zz_indexes)-5)
int a_i = array.get(zz_indexes, array.size(zz_indexes)-4)
int b_i = array.get(zz_indexes, array.size(zz_indexes)-3)
int c_i = array.get(zz_indexes, array.size(zz_indexes)-2)
int d_i = array.get(zz_indexes, array.size(zz_indexes)-1)
bool x_type = array.get(zz_types, array.size(zz_types)-5)
bool a_type = array.get(zz_types, array.size(zz_types)-4)
bool b_type = array.get(zz_types, array.size(zz_types)-3)
bool c_type = array.get(zz_types, array.size(zz_types)-2)
bool d_type = array.get(zz_types, array.size(zz_types)-1)
// Validate swing structure
validStructure = (x_type != a_type) and (a_type != b_type) and (b_type != c_type) and (c_type != d_type)
if validStructure
// Calculate Fibonacci ratios
ab = math.abs(b - a)
bc = math.abs(c - b)
xa = math.abs(a - x)
cd = math.abs(d - c)
ab_pct = ab / xa
bc_pct = bc / ab
cd_pct = cd / bc
// Pattern detection
isBullish = false
isBearish = false
// Gartley Pattern
if (ab_pct >= 0.55 and ab_pct <= 0.65) and
(bc_pct >= 0.35 and bc_pct <= 0.45) and
(cd_pct >= 1.2 and cd_pct <= 1.35)
isBullish := not d_type
isBearish := d_type
// Bat Pattern
if (ab_pct >= 0.35 and ab_pct <= 0.45) and
(bc_pct >= 0.85 and bc_pct <= 0.9) and
(cd_pct >= 1.5 and cd_pct <= 1.7)
isBullish := not d_type
isBearish := d_type
// Current bar check
isCurrentBar = bar_index == d_i
// Set signal flags
if isCurrentBar and isBullish
showBuySignal := true
signalDir := "buy"
signalBar := bar_index
alert("Harmonic Buy signal detected", alert.freq_once_per_bar_close)
if isCurrentBar and isBearish
showSellSignal := true
signalDir := "sell"
signalBar := bar_index
alert("Harmonic Sell signal detected", alert.freq_once_per_bar_close)
// Draw labels
if isCurrentBar and (isBullish or isBearish)
label.new(
x = d_i,
y = d,
text = "→ " + (isBullish ? "buy" : "sell"),
style = d_type ? label.style_label_down : label.style_label_up,
color = (isBullish ? bullColor : bearColor),
textcolor = color.white
)
// === Plot Signals at Global Scope ===
plotshape(showBuySignal, title="Buy Signal", location=location.belowbar,
color=bullColor, style=shape.triangleup, size=size.normal)
plotshape(showSellSignal, title="Sell Signal", location=location.abovebar,
color=bearColor, style=shape.triangledown, size=size.normal)
Indicators and strategies
Bollingr+supertrend
📘 Bollinger Bands + Supertrend (Buy/Sell Area Notes)
1. Bollinger Bands consist of a moving average (Basis) and upper/lower bands based on standard deviation.
2. Price near lower band may indicate a potential buy area (oversold).
3. Price near upper band may indicate a potential sell area (overbought).
4. Band squeeze shows low volatility — often followed by a breakout (good for entries).
5. Supertrend uses ATR and price to determine trend direction with green (up) and red (down) lines.
6. Supertrend flips from red to green → indicates a possible Buy signal.
7. Supertrend flips from green to red → indicates a possible Sell signal.
8. Best Buy Area: When Supertrend turns green and price is near or below the lower Bollinger Band.
9. Best Sell Area: When Supertrend turns red and price is near or above the upper Bollinger Band.
10. Use both indicators together to confirm trend direction and time entries more reliably.
Would you like a chart example or image to visualize these Buy/Sell zones?
Absorption DetectorABSORPTION DETECTOR -
The Absorption Detector identifies institutional order flow by detecting "absorption" patterns where smart money quietly accumulates or distributes positions by absorbing retail order flow. This creates high-probability support and resistance zones for trading. This is an approximation only and does not read any footprint data.
WHAT IS ABSORPTION?
Absorption occurs when institutions take the opposite side of retail trades, creating specific candlestick patterns with high volume and significant wicks. The indicator identifies two main patterns:
SELLING ABSORPTION (P-Pattern): Red zones above candles where institutions sell into retail buying pressure, creating resistance levels. Look for high volume candles with large upper wicks that close in the lower half.
BUYING ABSORPTION (B-Pattern): Green zones below candles where institutions buy from retail selling pressure, creating support levels. Look for high volume candles with large lower wicks that close in the upper half.
KEY FEATURES
- Automatic detection of institutional absorption patterns
- Dynamic support and resistance zone creation
- Customizable styling for all visual elements
- Historic zone display for backtesting analysis
- Strength-based filtering to show only high-probability setups
- Real-time alerts for new absorption patterns
- Professional info panel with key statistics
- Multi-timeframe compatibility
MAIN SETTINGS
Volume Threshold (1.2): Minimum volume surge required compared to average. Higher values = fewer but stronger signals.
Minimum Volume (2500): Absolute volume floor to prevent signals during low-volume periods.
Min Wick Size (0.2): Minimum wick size as ATR multiple. Ensures significant rejection occurred.
Minimum Strength (1.5): Combined volume and wick strength filter. Higher values = higher quality signals.
Show Historic Zones (OFF): Enable to see all historical zones for backtesting. Disable for better performance.
Zone Extension (20): How many bars to project zones forward for anticipating future reactions.
TRADING APPROACH
ZONE REACTION STRATEGY: Wait for price to approach absorption zones and trade the bounce or rejection. Use the zones as dynamic support and resistance levels.
BREAKOUT STRATEGY: Trade decisive breaks of strong absorption zones with proper risk management. Failed zones often lead to strong moves.
CONFLUENCE TRADING: Combine absorption zones with other technical analysis for highest probability setups. Look for alignment with trend lines, Fibonacci levels, and key support/resistance.
RISK MANAGEMENT: Always use stop losses beyond the absorption zones. Target minimum 1:2 risk-reward ratios. Position size appropriately based on zone strength.
OPTIMIZATION GUIDE
For Conservative Trading (fewer, higher quality signals):
- Volume Threshold: 1.5
- Minimum Strength: 2.0
- Min Wick Size: 0.3
For Aggressive Trading (more signals, requires careful filtering):
- Volume Threshold: 1.1
- Minimum Strength: 1.0
- Min Wick Size: 0.15
BEST PRACTICES
Markets: Works best on liquid instruments with good volume - major forex pairs, popular stocks, liquid futures, and established cryptocurrencies.
Timeframes: Effective on all timeframes from 1-minute scalping to daily swing trading. Adjust settings based on your timeframe and trading style.
Confirmation: Never trade absorption signals in isolation. Always combine with trend analysis, market structure, and proper risk management.
Session Timing: Be aware of market sessions and avoid trading during low liquidity periods or major news events.
Backtesting: Use the historic zones feature to validate performance on your chosen market and timeframe before live trading.
CUSTOMIZATION
The indicator offers complete visual customization including zone colors, border styles, label appearances, and info panel positioning. All colors can be adapted to match your chart theme and personal preferences.
Alert system provides both basic and custom message alerts for real-time notifications of new absorption patterns.
PERFORMANCE NOTES
Default settings are optimized for most markets and timeframes. For best performance on older charts, keep "Show Historic Zones" disabled unless specifically backtesting.
The indicator maintains excellent performance even with extensive historical analysis enabled, handling up to 500 zones and 100 labels for comprehensive backtesting.
Dual MACD + TSI [CryptoSmart] by IgnotusA sophisticated dual momentum indicator combining a custom MACD Histogram with Divergence Detection and a TSI (True Strength Index) oscillator, designed for advanced technical analysis in crypto and other fast-moving markets.
---
🔍 Key Features:
- Custom MACD Histogram (MACD 1):
- Configurable fast/slow lengths and signal smoothing method (EMA/SMA).
- Advanced divergence detection (Regular & Hidden Bullish/Bearish patterns).
- Visual alerts and labels directly on the chart.
- Built-in divergence alerts for easy integration with TradingView alerts.
- TSI Oscillator (MACD 2):
- True Strength Index with customizable fast/slow periods and signal line smoothing.
- Overbought/oversold levels and optional background shading for quick visual cues.
- Fully optional elements (TSI Line, Signal Line, OB/OS levels) – disabled by default for clean charting.
- User-Friendly Design:
- Optional components can be toggled on/off via the settings panel.
- Works great as a standalone momentum filter or as part of a multi-indicator dashboard.
---
📈 How to Use:
- Use the MACD Histogram divergences to spot potential reversals.
- Combine with the TSI oscillator to confirm trend strength or detect overextended moves.
- Enable/disable components to avoid clutter and focus on what matters most.
---
Crafted for traders who want precision, flexibility, and visual clarity in their charts. Whether you're scalping or swing trading, this indicator helps you stay ahead of the curve.
---
Feel free to tweak the values and customize it to your strategy. Happy trading!
Golden Ratio Trend Persistence [EWT]Golden Ratio Trend Persistence
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Overview
The Golden Ratio Trend Persistence is a dynamic tool designed to identify the strength and persistence of market trends. It operates on a simple yet powerful premise: a trend is likely to continue as long as it doesn't retrace beyond the key Fibonacci golden ratio of 61.8%.
This indicator automatically identifies the most significant swing high or low and plots a single, dynamic line representing the 61.8% retracement level of the current move. This line acts as a "line in the sand" for the prevailing trend. The background color also changes to provide an immediate visual cue of the current market direction.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Power of the Golden Ratio (61.8%)
The golden ratio (ϕ≈1.618) and its inverse (0.618, or 61.8%) are fundamental mathematical constants that appear throughout nature, art, and science, often representing harmony and structure. In financial markets, this ratio is a cornerstone of Fibonacci analysis and is considered one of the most critical levels for price retracements.
Market movements are not linear; they progress in waves of impulse and correction. The 61.8% level often acts as the ultimate point of support or resistance. A trend that can hold this level demonstrates underlying strength and is likely to persist. A breach of this level, however, suggests a fundamental shift in market sentiment and a potential reversal.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
How to Use This Indicator
This indicator is designed for clarity and ease of use.
Identifying the Trend : The visual cues make the current trend instantly recognizable.
A teal line with a teal background signifies a bullish trend. The line acts as dynamic support.
A maroon line with a maroon background signifies a bearish trend. The line acts as dynamic resistance.
Confirming Trend Persistence : As long as the price respects the plotted level, the trend is considered intact.
In an uptrend, prices should remain above the teal line. The indicator will automatically adjust its anchor to new, higher lows, causing the support line to trail the price.
In a downtrend, prices should remain below the maroon line.
Spotting Trend Reversals : The primary signal is a trend reversal, which occurs when the price closes decisively beyond the plotted level.
Potential Sell Signal : When the price closes below the teal support line, it indicates that buying pressure has failed, and the uptrend is likely over.
Potential Buy Signal : When the price closes above the maroon resistance line, it indicates that selling pressure has subsided, and a new uptrend may be starting.
Think of this tool as an intelligent, adaptive trailing stop that is based on market structure and the time-tested principles of Fibonacci analysis.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Input Parameters
You can customize the indicator's sensitivity through the following inputs in the settings menu:
Pivot Lookback Left : This number defines how many bars to the left of a candle must be lower (for a pivot high) or higher (for a pivot low) to identify a potential swing point. A higher value will result in fewer, but more significant, pivots being detected.
Pivot Lookback Right : This defines the number of bars that must close to the right before a swing point is confirmed. This parameter prevents the indicator from repainting. A higher value increases confirmation strength but also adds a slight lag.
Fibonacci Ratio : While the default is the golden ratio (0.618), you can adjust this to other key Fibonacci levels, such as 0.5 (50%) or 0.382 (38.2%), to test for different levels of trend persistence.
Adjusting these parameters allows you to fine-tune the indicator for different assets, timeframes, and trading styles, from short-term scalping to long-term trend following.
Bitcoin Cycle Log-Curve (JDK-Analysis)Important: The standard parameters provided in the script are specifically tuned for the TradingView Bitcoin Index chart on a monthly timeframe on logarithmic scale, and will yield the most accurate visual alignment when applied to that dataset. (more below)
This very simple script visualizes Bitcoin’s long-term price behavior using a logarithmic regression model designed to reflect the cyclical nature of Bitcoin’s historical market trends. Unlike typical technical indicators that react to recent price movements, this tool is built on the assumption that Bitcoin follows an exponential growth path over time, shaped by its fixed supply structure and four-year halving cycles.
The calculation behind the curved bands:
An upper boundary, a lower boundary, and a central midline, are calculated based on logarithmic functions applied to the bar index (which serves as a proxy for time). The upper and lower bounds are defined using exponential formulas of the type y = exp(constant + coefficient * log(bar_index)), allowing the curves to evolve dynamically over time. These bands serve as a macro-level guide for identifying periods of historical overvaluation (upper red curve) and undervaluation (lower green curve), with a central black curve representing the geometric average of the two.
How to customize the parameters:
The lower1_const and upper1_const values vertically shift the respective lower and upper curves—more negative values push the curve downward, while higher values lift it.
The lower1_coef and upper1_coef control the steepness of the curves over time, with higher values resulting in faster growth relative to time.
The shift_factor allows for uniform vertical adjustment of all curves simultaneously.
Additionally, the channel_width setting determines how far the mirrored bands extend from the original curves, creating a visual “channel” that can highlight more conservative or aggressive valuation zones depending on preference.
How to use this indicator:
This indicator is not intended for short-term trading or intraday signals. Rather, it serves as a contextual framework for long-term investors to identify high-risk zones near the upper curve and potential long-term value opportunities near the lower curve. These areas historically align with cycle tops and bottoms, and the model helps to place current price action within that broader cyclical narrative. While the concept draws inspiration from Bitcoin’s halving-driven market cycles and exponential adoption curve, the implementation is original in its use of time-based logarithmic regression to define dynamic trend boundaries.
It is best used as a strategic tool for cycle analysis, macro positioning, and trend anchoring—rather than as a short-term signal provider.
Contrarian Market Structure BreakMarket Structure Break application was inspired and adapted from Market Structure Oscillator indicator developed by Lux Algo. So much credit to their work.
This indicator pairs nicely with the Contrarian 100 MA and can be located here:
Indicator Description: Contrarian Market Structure BreakOverview
The "Contrarian Market Structure Break" indicator is a versatile tool tailored for traders seeking to identify potential reversal opportunities by analyzing market structure across multiple timeframes. Built on Institutional Concepts of Structure (ICT), this indicator detects Break of Structure (BOS) and Change of Character (CHoCH) patterns across short-term, intermediate-term, and long-term swings, plotting them with customizable lines and labels. It generates contrarian buy and sell signals when price breaks key swing levels, with a unique "Blue Dot Tracker" to monitor consecutive buy signals for trend confirmation. Optimized for the daily timeframe, this indicator is adaptable to other timeframes with proper testing, making it ideal for traders of forex, stocks, or cryptocurrencies.
How It Works
The indicator combines three key components to provide a comprehensive view of market dynamics: Multi-Timeframe Market Structure Analysis: It identifies swing highs and lows across short-term, intermediate-term, and long-term periods, plotting BOS (continuation) and CHoCH (reversal) events with customizable line styles and labels.
Contrarian Signal Generation: Buy and sell signals are triggered when the price crosses below swing lows (buy) or above swing highs (sell), indicating potential reversals in overextended markets.
Blue Dot Tracker: A unique feature that counts consecutive buy signals ("blue dots") and highlights a "Hold Investment" state with a yellow background when three or more buy signals occur, suggesting a potential trend continuation.
Signals are visualized as small circles below (buy) or above (sell) price bars, and a table in the bottom-right corner displays the blue dot count and recommended action (Hold or Flip Investment), enhancing decision-making clarity.
Mathematical Concepts Swing Detection: The indicator identifies swing highs and lows by comparing price patterns over three bars, ensuring robust detection of pivot points. A swing high occurs when the middle bar’s high is higher than the surrounding bars, and a swing low occurs when the middle bar’s low is lower.
Market Structure Logic: BOS is detected when the price breaks a prior swing high (bullish) or low (bearish) in the direction of the current trend, while CHoCH signals a potential reversal when the price breaks a swing level against the trend. These are calculated across three timeframes for a multi-dimensional perspective.
Blue Dot Tracker: This feature counts consecutive buy signals and tracks the entry price. If three or more buy signals occur without a sell signal, the indicator enters a "Hold Investment" state, marked by a yellow background, until the price exceeds the entry price or a sell signal occurs.
Entry and Exit Rules Buy Signal (Blue Dot Below Bar): Triggered when the closing price crosses below a swing low on either the intermediate-term or long-term timeframe, suggesting an oversold condition and potential reversal upward. Short-term signals can be enabled but are disabled by default to reduce noise.
Sell Signal (White Dot Above Bar): Triggered when the closing price crosses above a swing high on either the intermediate-term or long-term timeframe, indicating an overbought condition and potential reversal downward.
Blue Dot Tracker Logic: After a buy signal, the indicator increments a blue dot counter and records the entry price. If three or more consecutive buy signals occur (blueDotCount ≥ 3), the indicator enters a "Hold Investment" state, highlighted with a yellow background, suggesting a potential trend continuation. The "Hold Investment" state ends when the price exceeds the entry price or a sell signal occurs, resetting the counter.
Exit Rules: Traders can exit buy positions when a sell signal appears, the price exceeds the entry price during a "Hold Investment" state, or based on additional confirmation from BOS/CHoCH patterns or other technical analysis tools. Always use proper risk management.
Recommended Usage
The indicator is optimized for the daily timeframe, where it effectively captures significant reversal and continuation patterns in trending or ranging markets. It can be adapted to other timeframes (e.g., 1H, 4H, 15M) with careful testing of settings, particularly enabling/disabling short-term structure analysis to suit market conditions. Backtesting is recommended to optimize performance for your chosen asset and timeframe.
Customization Options Market Structure Display: Toggle short-term, intermediate-term, and long-term structures on or off, with customizable line styles (solid, dashed, dotted) and colors for bullish and bearish breaks.
Labels: Enable or disable BOS/CHoCH labels for each timeframe to reduce chart clutter.
Signal Visibility: Hide buy/sell signals if desired for a cleaner chart.
Blue Dot Tracker: Monitor the blue dot count and action (Hold or Flip Investment) via the table display, which is fully customizable in terms of position and appearance.
Why Use This Indicator?
The "Contrarian Market Structure Break" indicator offers a robust framework for identifying high-probability reversal and continuation setups using ICT principles. Its multi-timeframe analysis, clear signal visualization, and innovative Blue Dot Tracker provide traders with actionable insights into market dynamics. Whether you're a swing trader or a day trader, this indicator’s flexibility and intuitive design make it a valuable addition to your trading arsenal.
Note for TradingView Moderators
This script complies with TradingView's House Rules by providing an educational and transparent description without performance claims or guarantees. It is designed to assist traders in technical analysis and should be used alongside proper risk management and personal research. The code is original, well-documented, and includes customizable inputs and clear visual outputs to enhance the user experience.
Tips for Users:
Backtest thoroughly on your chosen asset and timeframe to validate signal reliability. Combine with other indicators or price action analysis for confirmation of entries and exits. Adjust timeframe settings and enable/disable short-term structures to match market volatility and your trading style.
Hope the "Contrarian Market Structure Break" indicator enhances your trading strategy and helps you navigate the markets with confidence! Happy trading!
EdgeXplorer - Support vs ResistanceEdgeXplorer – Support vs Resistance
Spot the battle zones. Catch the breakouts. Ride the volume.
EdgeXplorer – Support vs Resistance is your visual compass for identifying institutional support and resistance levels in real time. By dynamically detecting pivot zones, tracking volume shifts, and highlighting high-conviction breakouts, this tool gives traders a clean, no-fluff map of where price is likely to react, reject, or rip through.
No guesswork — just clear structure and smarter signal flow.
⸻
🧱 What It Does
This tool automatically maps support and resistance zones based on swing pivots, overlays visual boxes on your chart, and triggers breakout signals when those zones are tested with volume confirmation. It’s built for traders who want more than just lines — they want intent.
⸻
⚙️ Core Components
Component Description
🟩 Support Boxes Detected from pivot lows, with label and visual zone
🟥 Resistance Boxes Detected from pivot highs, styled for clean contrast
📉 Breakout Signals Volume-validated support/resistance breaks
🕳️ Wick Detectors Wick rejections after breakout attempts (false breaks)
🎨 Visual Styling Auto-colored candles at pivots + zone label toggles
⸻
🔍 How It Works
1. Pivot Logic:
The script uses a flexible left/right pivot length (default 15) to detect local highs/lows that form reliable turning points. These are your anchors for support/resistance zones.
2. Zone Construction:
Each pivot creates a dynamic price zone with adjustable thickness. These zones are plotted as shaded rectangles, giving you real-time visual structure.
3. Breakout Detection:
When price crosses a zone and the volume oscillator confirms strength, the script triggers a B (Breakout) label above/below the bar.
4. Wick Filters:
It also highlights W (Wick) setups — signs of false breaks or stop hunts — based on wick-to-body comparisons. These can be excellent reversal signals when confirmed.
⸻
🛠️ Custom Settings
Setting What It Controls
🔁 Pivot Left/Right Controls how far left/right the script looks for highs/lows
🔻 Volume Threshold Sets how strong the volume shift must be to trigger breakouts
🎨 Zone Height Adjusts how thick each S/R box appears
🟢 Show Zones Toggle visual boxes on/off
🔔 Show Breaks Turn on/off the breakout + wick signals
🏷️ Show Labels Toggle support/resistance text labels
⸻
📈 Use Cases
• Breakout Traders:
Watch for high-volume breaks of resistance/support with clean confirmation. Enter on candle closes or wick rejections.
• Range Traders:
Use zones as reversal points during sideways markets. The wick markers help filter traps.
• Swing & Intraday Scalping:
Zoom out for higher timeframes to establish zones, then drill down to 1m–15m for breakout execution using the live signals.
• Liquidity Hunters:
Combine this with internal order blocks or EQH/EQL markers. S/R zones = liquidity pools.
⸻
🔔 Built-In Alerts
✅ Resistance Breakout
✅ Support Breakdown
Get notified in real-time when key zones get broken with strong volume follow-through.
RSI Bullish Divergence TraderThis RSI Divergence Buy strategy identifies bullish divergence by detecting confirmed swing lows where the price forms a lower low compared to the previous swing low, but the RSI indicator shows a higher low, signaling weakening downward momentum often in oversold conditions. It enters a long position upon confirmation of these criteria, with the entry visualized by a green upward triangle below the pivot bar. Positions are exited either when the RSI crosses above a specified mean-reversion level (like 55) for profit-taking or hits a dynamic stop-loss set a percentage below the pivot low to manage risk.
Universal Trade Levels & Signal Classifierscript has been enhanced and generalized for all instruments — not just ES or SPX.
You now get the following classifications:
💎 Perfect Trade – trend confirmed, strong signal, ATR + VWAP + volume aligned
🚀 Sure Shot Trade – very high volume + ATR breakout + directional bias
⚡ Quick Call/Put – fast actionable setups
❌ No Trade – avoid/no confirmation
The logic works across any timeframe and any ticker.
You can now test this live on any instrument in TradingView. Let me know if you’d like to add things like:
Multi-timeframe confirmation
Re-entry logic
Heatmap table of confidence levels
Signal filtering based on RSI, OBV, etc.
Supply & Demand Zones (Buyer/Seller Buildup)
This indicator automatically detects high-probability Supply and Demand Zones, highlighting key buyer and seller buildup areas based on price structure and volume behavior.
It helps traders identify potential reversal zones by:
Marking strong support (demand) and resistance (supply) levels
Tracking price rejections and consolidations
Visualizing where buyer/seller momentum accumulates
Filtering noise to focus only on the most relevant zones
BFG MA🏷️ Title
BFG MA V2 — Multi-Timeframe Rainbow MA Tool
📘 Description
Overview
The BFG MA V2 indicator is a highly customizable multi-moving-average tool that allows you to display up to 10 moving averages (MA) with distinct rainbow colors. This script is suitable for trend-following strategies and visual market analysis.
Features
Supports SMA, EMA, and WMA modes via dropdown selection.
Displays up to 10 configurable MAs, each with independent toggle and period settings.
Colored line scheme improves visual distinction between short-, mid-, and long-term averages.
Optional real-time MA value labels are placed next to the latest price for quick reference.
Designed to be overlayed on the price chart (overlay = true).
How to Use
Select the MA type (SMA, EMA, or WMA) in the settings.
Enable or disable individual MAs (MA1 ~ MA10) based on your preference.
Adjust each MA’s period independently.
Toggle the “show MA Label” switch to display/hide the label for each active MA.
Example Use Case
Use short-term MAs (e.g. MA1-3) for momentum identification.
Use long-term MAs (e.g. MA8-10) for trend confirmation.
Label display helps in quickly spotting the current MA values next to the chart.
Transparency
No repainting.
Uses barstate.islast to ensure labels are only updated at the last bar.
All calculations are done using Pine Script's native ta.* functions.
Limitations
Does not include trading signals (e.g. crossovers) — this is a visual tool only.
Heavy label use may cause clutter on smaller screens or compressed timeframes.
Author
Script created by @tkiuyam
Free to use for educational and research purposes.
📘 指标说明(中文)
概览
BFG MA V2 是一款高度可配置的多均线指标工具,最多支持 10 条不同周期的移动平均线(MA),并使用彩虹配色区分短中长期趋势,便于视觉分析与趋势研判。
主要功能
支持三种类型:SMA(简单移动平均)、EMA(指数移动平均)和 WMA(加权移动平均),可通过参数选择切换;
最多支持 10 条均线,每条均线均可独立设置显示与周期;
使用彩虹色系为每条均线赋予独立颜色,提升图表辨识度;
可选功能:在图表右侧显示每条均线的实时价格标签;
脚本绘制于价格图表之上,支持所有主图时间周期。
使用方法
在参数中选择所需的 MA 类型(SMA / EMA / WMA);
勾选需要显示的 MA(从 MA1 到 MA10);
为每条 MA 分别设置周期(如 MA1=7,MA2=14 等);
若需在图表右侧展示 MA 当前价格,请勾选“show MA Label”。
示例用途
短周期 MA(如 MA1~MA3)用于识别动量或短期趋势;
长周期 MA(如 MA8~MA10)用于过滤方向或中长期趋势判断;
标签模式可快速了解各均线在当前价格区间的位置。
技术细节与透明性
不使用未来函数(无 repaint);
标签更新逻辑基于 barstate.islast,仅在最新 K 线绘制;
均线计算采用 Pine Script 内建的 ta.sma / ta.ema / ta.wma 函数;
本脚本未包含交易信号,仅为辅助分析用的图表工具。
注意事项
当同时启用过多 MA 标签时,可能在某些分辨率下造成图表拥挤;
本脚本仅供学习、研究及技术分析使用,不构成投资建议。
作者
脚本作者:@tkiuyam
欢迎加入社区: discord.com
本脚本免费开放,欢迎在学习与分析中使用。
My scriptTrend gold signal Ema strategy
The system finds the best entries for a trade. Use in gold, all numbers have been customized for it.
Functional
T2 trend gold is the second version of my trading system. Be sure to check out the first part! This system gives a signal earlier.
Key signals
Buy -----> Blue triangle to buy
Sell -----> Red triangle to sell
Remarks
I personally tested this system on my own trading and it helps me find entries for deals. The main thing is, if consolidation has begun, turn off the system, because the trading range is small at this moment, use oscillators
Universal ATR Grid from Entry Price with AlertsUniversal ATR Grid from Entry Price with Alerts
This Pine Script v6 indicator creates a dynamic price grid based on a user-defined entry price and ATR for selected instruments (SOLUSDT, XRPUSDT, DOGEUSDT, PEPEUSDT, WIFUSDT).
Users can customize the entry price, ATR, number of levels (up to 5), and step multiplier per instrument.
The grid shows long (green) and short (red) levels around the entry price (gray), with labels offset right.
Lines extend from labels to the current bar, updating dynamically.
Alerts trigger on breakouts of long, short, and entry levels. Instrument names can be modified in the script.
Institutional Sweep Zone (Range-Based)Institutional Sweep Zone (Range-Based)
This indicator models potential stop sweep zones based on institutional capital ranges, helping traders visualize where high-probability liquidity grabs are likely to occur.
Unlike traditional volatility bands, this tool estimates price movement by calculating how far a specific amount of capital—entered into the market—can push price. By defining a lower and upper capital range (in millions of USD), the indicator dynamically draws bands representing the distance institutions could realistically move price in either direction.
It supports directional control, allowing you to focus on long sweeps, short sweeps, or both simultaneously. The pip cost is auto-calibrated based on the selected currency pair, making it highly adaptive to major FX pairs.
Key Features:
-Capital input range (in millions of USD)
-Directional sweep targeting: Long, Short, or Both
-Auto-detection of pip value based on FX pair
-Visual sweep zone mapped above and below current price
-Designed to highlight areas of institutional stop hunts
Why use it?
-Helps avoid setting stops inside common sweep zones
-Improves trade survivability when paired with higher timeframe strategies
-Offers a unique way to view price through an institutional lens
Created by: The_Forex_Steward
Explore more advanced tools and concepts on my TradingView profile.
Institutional Sessions Overlay (Asia/London/NY)Institutional Sessions Overlay is a professional TradingView indicator that visually highlights the main trading sessions (Asia, London, and New York) directly on your chart.
Customizable: Easily adjust session start and end times (including minutes) for each market.
Timezone Alignment: Shift session boxes using the timezone offset parameter so sessions match your chart’s timezone exactly.
Clear Visuals: Colored boxes and optional labels display session opens and closes for fast institutional market structure reference.
Toggle Labels: Show or hide session open/close labels with a single click for a clean or detailed look.
Intuitive UI: User-friendly grouped settings for efficient configuration.
This tool is designed for day traders, institutional traders, and anyone who wants to instantly recognize global session timing and ranges for SMC, ICT, and other session-based strategies.
How to use:
Set your chart to your local timezone.
Use the "Session timezone offset" setting if session boxes do not match actual session opens on your chart.
Adjust the hours and minutes for each session as needed.
Enable or disable labels in the “Display” settings group.
Tip: Use the overlay to spot session highs and lows, volatility windows, and institutional liquidity sweeps.
Turtle Trading System + ATRTurtle Trading System + ATR
This Pine Script v5 indicator implements a Turtle Trading System with ATR integration.
It plots a 20-day high (red), 20-day low (blue), and an ATR-based level (orange) shifted upward by a user-defined percentage (default 5%).
Customizable inputs include lookback period (default 20), ATR period (default 14), and ATR offset.
Dynamic labels show the 20-day high, low, and ATR values at the current bar, updating with price.
Suitable for trend-following strategies, it highlights breakout and volatility levels.
EdgeXplorer – Smart Money StructureEdgeXplorer – Smart Money Structure
A full-spectrum price action tool built to track BOS/CHoCH, swing pivots, order blocks, and institutional liquidity zones — all on one clean chart.
Designed for serious price action traders, this engine gives you a real-time visual breakdown of market structure the way smart money sees it. Whether you’re a scalper, intraday trader, or swing strategist — this tool helps you track momentum shifts, trend flips, and liquidity traps with clarity.
⸻
🧠 What It Does
EdgeXplorer – Smart Money Structure detects and visualizes:
• Break of Structure (BOS) and Change of Character (CHoCH) patterns
• Swing vs. Internal trend structure
• Order blocks with mitigation tracking
• Liquidity points (Equal Highs & Lows)
• Fair Value Gaps (FVGs) and price imbalances
• Premium/Discount zones based on range extremes
All of this is plotted live with customizable visual styles, trend logic, and alert support — no repainting, no guessing.
⸻
⚙️ How It Works (Plain English)
The script uses pivot highs/lows to define structural points on the chart. From there:
• A BOS marks a continuation of the current trend (price breaks the most recent high/low in trend direction).
• A CHoCH flags a potential reversal (price breaks against the current trend direction).
• Structure is tracked internally (short-term pivots) and on a swing basis (larger moves).
• Order blocks are identified at structural breaks using volatility filtering (ATR or Range logic), then highlighted and monitored for mitigation.
• You can also display liquidity pools (Equal Highs/Lows) and FVG zones for imbalance-based setups.
• Optional trend coloring lets you visually follow directional bias.
⸻
📈 Visual Elements Breakdown
Element Meaning
🟢/🔴 BOS or CHoCH Labels Show trend continuation or reversal (internal + swing)
🔷 Zones Order Blocks (bullish/bearish, internal or swing, with mitigation filter)
🔺 HH / HL / LH / LL High/low swing labels based on pivot relationships
🔲 Gray Zones Mitigated order blocks (already tapped)
📊 Background Color Optional trend-based candle coloring
⚪ Fair Value Gaps Imbalance zones between candles
📍 EQH/EQL Equal High / Equal Low liquidity zones
⸻
🔧 Inputs & Settings
🧭 Structure Modes:
• Historical = Plots all historical BOS/CHoCH events
• Present = Keeps the chart clean by only showing the latest active structure
🔁 Internal vs Swing:
• Internal Structure = Short-term pivots (fast reaction, more signals)
• Swing Structure = Higher timeframe trend (stronger confirmation)
🎯 Order Block Filters:
• Choose between ATR-based (volatility-adjusted) or Cumulative Range (fixed width)
• Define how many OB zones to display per structure type
• Enable/disable mitigated OB highlights
💡 Visual Customization:
• Toggle colored vs. monochrome labels
• Turn on/off trend-based candle coloring
• Set custom colors for all bullish/bearish elements
🔍 Liquidity Tools:
• Show Equal High/Low zones with sensitivity threshold
• Display Fair Value Gaps with optional auto-filtering
• Highlight premium/discount zones relative to swing range
⸻
🧠 How to Interpret the Chart
Use BOS/CHoCH for:
• Spotting trend reversals (CHoCH = possible flip)
• Confirming momentum continuation (BOS = trend intact)
Use Order Blocks for:
• Entry areas after a break — especially if price retraces to an unmitigated OB
• Smart money footprints — these zones often align with institutional volume
Use Liquidity Zones for:
• Fade or trap setups — EQH/EQL often precede false breakouts
• Confirming areas where smart money may engineer stops or reactions
Use Premium/Discount Zones to:
• Avoid chasing — enter where price is undervalued (discount) or take profit where it’s overvalued (premium)
⸻
📊 Strategy Tips
• Scalpers: Focus on internal CHoCH + OB zones on 1m–15m
• Swing traders: Watch for swing CHoCH + OB alignment on 1h–4h
• Breakout traders: Use BOS labels with EQH/EQL sweep confirmation
• Confluence traders: Stack internal + swing + OB + FVG for high-probability setups
⸻
📣 Alerts Included:
✅ Internal BOS / CHoCH
✅ Swing BOS / CHoCH
Get notified instantly when structure shifts — no need to babysit the chart.
Ultra Supply & DemandUltra Supply and Demand fixed.
Order Block Detection: Identifies potential order blocks (demand/supply zones)
The Price ModelOpening Range Breakout
Focuses on taking advantage of the New York Opening High volatility
Main goal is to catch simple and straight forward trades with Strict rules
Recommend Targeting 1:1 first, and then setting stop to breakeven after 1:1 is hit
Can use 5 Min ORB 1:1 as a second TP after entering on the prior 1min ORB.
JWs EMA CrossoversJWs EMA Crossovers - A clean Pine Script v6 indicator that displays 8 and 21 period exponential moving averages with arrow signals when they cross. Shows bullish arrows when the faster EMA crosses above the slower EMA and bearish arrows when it crosses below. Includes customizable EMA periods and built-in alert conditions for trend change notifications. Perfect for identifying trend reversals without chart clutter.
Gaussian/Stoch-RSI Breakout Strategy🧠 Overview
The Gaussian/Stoch-RSI Breakout Strategy is a trend-following breakout strategy that combines a Gaussian Moving Average Channel with a Stochastic RSI filter. It identifies bullish breakouts when price exceeds statistically significant volatility bands and momentum confirms the move.
This strategy is best suited for trend initiation points and works across various asset classes (e.g., Forex, indices, crypto) and timeframes.
⚙️ Strategy Logic
🎯 Entry Conditions (Long Only)
A long position is triggered when both of the following conditions are met:
The closing price crosses above the upper Gaussian channel.
The Stoch RSI K line crosses above the D line (indicating bullish momentum).
❌ Exit Conditions
The long position is closed when:
The closing price falls back below the upper Gaussian channel.
🧮 Indicators & Calculations
📈 Gaussian Moving Average Channel
A Gaussian-weighted moving average is used to smooth price.
Standard deviation is computed using Gaussian weights to construct a volatility-based channel.
The channel is defined by:
Midline: Gaussian-weighted moving average
Upper Band: Midline + (Standard Deviation × Multiplier)
Lower Band: Midline − (Standard Deviation × Multiplier)
🔁 Stochastic RSI
Combines RSI with a Stochastic calculation to identify momentum shifts.
Used as a filter to confirm the strength of a breakout.
The following plots are displayed on the chart:
Gaussian Midline – Red line: core trend anchor
Upper & Lower Bands – Blue lines: breakout thresholds
Stochastic RSI is not plotted by default but used internally
🛠️ Notes & Best Practices
Timeframe: Strategy can be used on intraday or higher timeframes. For reduced noise, consider using it on 1H or higher.
No Short Trades: This version is long-only.
No Stop Loss / Take Profit: The strategy relies on a trailing exit via the Gaussian channel.
📌 Disclaimer
This strategy is intended for educational and research purposes only. Past performance does not guarantee future results. Always test strategies in a simulated environment before deploying them on a live account. This is not financial advice.
Risk Distribution HistogramStatistical risk visualization and analysis tool for any ticker 📊
The Risk Distribution Histogram visualizes the statistical distribution of different risk metrics for any financial instrument. It converts risk data into histograms with quartile-based color coding, so that traders can understand their risk, tail-risks, exposure patterns and make data-driven decisions based on empirical evidence rather than assumptions.
The indicator supports multiple risk calculation methods, each designed for different aspects of market analysis, from general volatility assessment to tail risk analysis.
Risk Measurement Methods
Standard Deviation
Captures raw daily price volatility by measuring the dispersion of price movements. Ideal for understanding overall market conditions and timing volatility-based strategies.
Use case: Options trading and volatility analysis.
Average True Range (ATR)
Measures true range as a percentage of price, accounting for gaps and limit moves. Valuable for position sizing across different price levels.
Use case: Position sizing and stop-loss placement.
The chart above illustrates how ATR statistical distribution can be used by looking at the ATR % of price distribution. For example, 90% of the movements are below 5%.
Downside Deviation
Only considers negative price movements, making it ideal for checking downside risk and capital protection rather than capturing upside volatility.
Use case: Downside protection strategies and stop losses.
Drawdown Analysis
Tracks peak-to-trough declines, providing insight into maximum loss potential during different market conditions.
Use case: Risk management and capital preservation.
The chart above illustrates tale risk for the asset (TQQQ), showing that it is possible to have drawdowns higher than 20%.
Entropy-Based Risk (EVaR)
Uses information theory to quantify market uncertainty. Higher entropy values indicate more unpredictable price action, valuable for detecting regime changes.
Use case: Advanced risk modeling and tail-risk.
VIX Histogram
Incorporates the market's fear index directly into analysis, showing how current volatility expectations compare to historical patterns. The CAPITALCOM:VIX histogram is independent from the ticker on the chart.
Use case: Volatility trading and market timing.
Visual Features
The histogram uses quartile-based color coding that immediately shows where current risk levels stand relative to historical patterns:
Green (Q1): Low Risk (0-25th percentile)
Yellow (Q2): Medium-Low Risk (25-50th percentile)
Orange (Q3): Medium-High Risk (50-75th percentile)
Red (Q4): High Risk (75-100th percentile)
The data table provides detailed statistics, including:
Count Distribution: Historical observations in each bin
PMF: Percentage probability for each risk level
CDF: Cumulative probability up to each level
Current Risk Marker: Shows your current position in the distribution
Trading Applications
When current risk falls into upper quartiles (Q3 or Q4), it signals conditions are riskier than 50-75% of historical observations. This guides position sizing and portfolio adjustments.
Key applications:
Position sizing based on empirical risk distributions
Monitoring risk regime changes over time
Comparing risk patterns across timeframes
Risk distribution analysis improves trade timing by identifying when market conditions favor specific strategies.
Enter positions during low-risk periods (Q1)
Reduce exposure in high-risk periods (Q4)
Use percentile rankings for dynamic stop-loss placement
Time volatility strategies using distribution patterns
Detect regime shifts through distribution changes
Compare current conditions to historical benchmarks
Identify outlier events in tail regions
Validate quantitative models with empirical data
Configuration Options
Data Collection
Lookback Period: Control amount of historical data analyzed
Date Range Filtering: Focus on specific market periods
Sample Size Validation: Automatic reliability warnings
Histogram Customization
Bin Count: 10-50 bins for different detail levels
Auto/Manual Bin Width: Optimize for your data range
Visual Preferences: Custom colors and font sizes
Implementation Guide
Start with Standard Deviation on daily charts for the most intuitive introduction to distribution-based risk analysis.
Method Selection: Begin with Standard Deviation
Setup: Use daily charts with 20-30 bins
Interpretation: Focus on quartile transitions as signals
Monitoring: Track distribution changes for regime detection
The tool provides comprehensive statistics including mean, standard deviation, quartiles, and current position metrics like Z-score and percentile ranking.
Enjoy, and please let me know your feedback! 😊🥂