Z-Score Mean Reversion (EURUSD)Made by Laila
Works best on 1 min/5 min timeframe ( 68% winrate)
Z-Score Mean Reversion Indicator (EURUSD)
This Pine Script indicator identifies potential buy and sell opportunities based on Z-score mean reversion for the EUR/USD pair.
The Z-score is calculated by comparing the current price to its simple moving average (SMA), measured in terms of standard deviations. If the price deviates significantly from the average—either above or below—it may revert back toward the mean.
A buy signal is generated when the Z-score drops below -2, suggesting the price is abnormally low and may rise. A sell signal is triggered when the Z-score rises above +2, indicating the price is unusually high and may fall.
On the chart, the script plots the Z-score along with horizontal lines at +2, -2, and 0. Green and red arrows highlight potential buy and sell points based on these thresholds.
Индикаторы и стратегии
CGMALibrary "CGMA"
This library provides a function to calculate a moving average based on Chebyshev-Gauss Quadrature. This method samples price data more intensely from the beginning and end of the lookback window, giving it a unique character that responds quickly to recent changes while also having a long "memory" of the trend's start. Inspired by reading rohangautam.github.io
What is Chebyshev-Gauss Quadrature?
It's a numerical method to approximate the integral of a function f(x) that is weighted by 1/sqrt(1-x^2) over the interval . The approximation is a simple sum: ∫ f(x)/sqrt(1-x^2) dx ≈ (π/n) * Σ f(xᵢ) where xᵢ are special points called Chebyshev nodes.
How is this applied to a Moving Average?
A moving average can be seen as the "mean value" of the price over a lookback window. The mean value of a function with the Chebyshev weight is calculated as:
Mean = /
The math simplifies beautifully, resulting in the mean being the simple arithmetic average of the function evaluated at the Chebyshev nodes:
Mean = (1/n) * Σ f(xᵢ)
What's unique about this MA?
The Chebyshev nodes xᵢ are not evenly spaced. They are clustered towards the ends of the interval . We map this interval to our lookback period. This means the moving average samples prices more intensely from the beginning and the end of the lookback window, and less intensely from the middle. This gives it a unique character, responding quickly to recent changes while also having a long "memory" of the start of the trend.
Internal Bar Strength (IBS)This script calculates the Internal Bar Strength (IBS), a mean-reversion indicator defined as (Close - Low) / (High - Low). IBS values range from 0 to 1, with lower values indicating potential oversold conditions and higher values suggesting overbought conditions. Useful for intraday reversal strategies.
Scalping Edge StrategyScalping Edge Strategy
Major exchanges: OKX, KuCoin, Bybit
Trading Checklist
- Is volatility and liquidity present?
- Are indicators aligned?
- Is entry clean?
- Is SL/TP defined before entry?
EMA20-EMA50 DifferenceThe indicator shows whether the EMA20 is above or below the EMA50.
If the curve is above the zero line, the EMA20 is above the EMA50.
If the curve is below the zero line, the EMA20 is below the EMA50.
The greater the distance from the zero line is, the further apart the EMA20 and EMA50 are.
Smart Bar Counter with Alerts🚀 Smart Bar Counter with Alerts 🚀
-----------------------------------------------------
Overview
-----------------------------------------------------
Ever wanted to count a specific number of bars from a key point on your chart—such as after a Break of Structure (BOS), the start of a new trading session, or from any point of interest— without having to stare at the screen?
This "Smart Bar Counter" indicator was created to solve this exact problem. It's a simple yet powerful tool that allows you to define a custom "Start Point" and a "Target Bar Count." Once the target count is reached, it can trigger an Alert to notify you immediately.
-----------------------------------------------------
Key Features
-----------------------------------------------------
• Manual Start Point: Precisely select the date and time from which you want the count to begin, offering maximum flexibility in your analysis.
• Custom Bar Target: Define exactly how many bars you want to count, whether it's 50, 100, or 200 bars.
• On-Chart Display: A running count is displayed on each bar after the start time, allowing you to visually track the progress.
• Automatic Alerts: Set up alerts to be notified via TradingView's various channels (pop-up, mobile app, email) once the target count is reached.
-----------------------------------------------------
How to Use
-----------------------------------------------------
1. Add this indicator to your chart.
2. Go to the indicator's Settings (Gear Icon ⚙️).
- Select Start Time: Set the date and time you wish to begin counting.
- Number of Bars to Count: Input your target number.
3. Set up the Alert ( Very Important! ).
- Right-click on the chart > Select " Add alert ."
- In the " Condition " dropdown, select this indicator: Smart Bar Counter with Alerts .
- In the next dropdown, choose the available alert condition.
- Set " Options " to Once Per Bar Close .
- Choose your desired notification methods under " Alert Actions ."
- Click " Create ."
-----------------------------------------------------
Use Cases
-----------------------------------------------------
• Post-Event Analysis: Count bars after a key event like a Break of Structure (BOS) or Change of Character (CHoCH) to observe subsequent price action.
• Time-based Analysis: Use it to count bars after a market open for a specific session (e.g., London, New York).
• Strategy Backtesting: Useful for testing trading rules that are based on time or a specific number of bars.
-----------------------------------------------------
Final Words
-----------------------------------------------------
Hope you find this indicator useful for your analysis and trading strategies! Feel free to leave comments or suggestions below.
MACD-TITANIndicator Description: MACD-TITAN
MACD-TITAN is an enhanced version of the traditional MACD (Moving Average Convergence Divergence) indicator. It features a modern visual design, vibrant colors, and a clear interpretation of market momentum. The indicator is designed to help traders identify trend strength and potential reversals more effectively.
Configurable Parameters (default values)
Fast Length: 12 – period of the fast moving average
Slow Length: 26 – period of the slow moving average
Signal Smoothing: 9 – smoothing period for the signal line
These settings determine how sensitive the indicator is to price changes and can be adjusted to fit different trading styles.
Visual Interpretation
Strong Green Histogram: bullish momentum increasing
Weak Green Histogram: bullish momentum weakening
Strong Red Histogram: bearish momentum increasing
Weak Red Histogram: bearish momentum weakening
Additional lines:
MACD Line (turquoise): represents current trend momentum
Signal Line (orange): used for crossover confirmations with the MACD line
Built-in Alerts
The indicator includes two native alert conditions:
When the histogram crosses from positive to negative: possible start of a bearish trend
When the histogram crosses from negative to positive: possible start of a bullish trend
These alerts help traders track key momentum shifts.
Usage Tips
This indicator can be used both for spotting potential reversals and for tracking the strength of an ongoing trend. For better reliability, it is recommended to combine it with other tools such as support/resistance levels, RSI, or volume analysis.
BreakoutLibrary "Breakout"
init()
method run(state, opts)
Namespace types: BreakoutState
Parameters:
state (BreakoutState)
opts (BreakoutOpts)
BreakoutState
Fields:
levelUps (array)
levelDowns (array)
levelUpTargets (array)
levelDownTargets (array)
levelUpConfirmed (array)
levelDownConfirmed (array)
levelUpNumLevels (array)
levelDownNumLevels (array)
breakoutSignalUp (series bool)
breakoutSignalDown (series bool)
BreakoutOpts
Fields:
canConfirmUp (series bool)
canConfirmDown (series bool)
numLevelMinToConfirm (series int)
numLevelMaxToConfirm (series int)
zigZagPeriod (series int)
rsi (series float)
rsiMA (series float)
Adaptive MACD Deluxe [AlgoAlpha]OVERVIEW
This script is an advanced rework of the classic MACD indicator, designed to be more adaptive, visually informative, and customizable. It enhances the original MACD formula using a dynamic feedback loop and a correlation-based weighting system that adjusts in real-time based on how deterministic recent price action is. The signal line is flexible, offering several smoothing types including Heiken Ashi, while the histogram is color-coded with gradients to help users visually identify momentum shifts. It also includes optional normalization by volatility, allowing MACD values to be interpreted as relative percentage moves, making the indicator more consistent across different assets and timeframes.
CONCEPTS
This version of MACD introduces a deterministic weight based on R-squared correlation with time, which modulates how fast or slow the MACD adapts to price changes. Higher correlation means smoother, slower MACD responses, and low correlation leads to quicker reaction. The momentum calculation blends traditional EMA math with feedback and damping components to create a smoother, less noisy series. Heiken Ashi is optionally used for signal smoothing to better visualize short-term trend bias. When normalization is enabled, the MACD is scaled by an EMA of the high-low range, converting it into a bounded, volatility-relative indicator. This makes extreme readings more meaningful across markets.
FEATURES
The script offers six distinct options for signal line smoothing: EMA, SMA, SMMA (RMA), WMA, VWMA, and a custom Heiken Ashi mode based on the MACD series. Each option provides a different response speed and smoothing behavior, allowing traders to match the indicator’s behavior to their strategy—whether it's faster reaction or reduced noise.
Normalization is another key feature. When enabled, MACD values are scaled by a volatility proxy, converting the indicator into a relative percentage. This helps standardize the MACD across different assets and timeframes, making overbought and oversold readings more consistent and easier to interpret.
Threshold zones can be customized using upper and lower boundaries, with inner zones for early warnings. These zones are highlighted on the chart with subtle background fills and directional arrows when MACD enters or exits key levels. This makes it easier to spot strong or weak reversals at a glance.
Lastly, the script includes multiple built-in alerts. Users can set alerts for MACD crossovers, histogram flips above or below zero, and MACD entries into strong or weak reversal zones. This allows for hands-free monitoring and quick decision-making without staring at the chart.
USAGE
To use this script, choose your preferred signal smoothing type, enable normalization if you want MACD values relative to volatility, and adjust the threshold zones to fit your asset or timeframe. Use the colored histogram to detect changes in momentum strength—brighter colors indicate rising strength, while faded colors imply weakening. Heiken Ashi mode smooths out noise and provides clearer signals, especially useful in choppy conditions. Use alert conditions for crossover and reversal detection, or monitor the arrow markers for entries into potential exhaustion zones. This setup works well for trend following, momentum trading, and reversal spotting across all market types.
RSI Reversal (instelbare RRR)made by Laila
(Indicator in the making)
How does it work?
Using RSI to decide:
If the RSI drops below 30 (oversold), it opens a buy (long) position.
If the RSI rises above 70 (overbought), it opens a sell (short) position.
Setting risk and reward:
You choose how much of the price you're willing to risk, for example 1%.
You also set how much reward you want, like 2 times the risk (2:1).
So if the entry price is 100:
Stop loss would be at 99 (1% down),
Take profit would be at 102 (2% up).
The strategy handles everything automatically:
When the RSI condition is met, it enters a trade.
It immediately sets both TP and SL levels.
The trade closes automatically when either TP or SL is hit.
Macro Dashboard Multi-TickerThis indicator gives you a compact, high-impact overview of up to 10 custom assets — showing whether each is currently trading above or below a key moving average on a shared timeframe.
🟩 Above MA = colored bar
⬛ Below MA = dimmed bar
Features:
Monitor up to 10 symbols (stocks, crypto, ETFs, etc.)
Customize:
- Symbol
- Color
- Timeframe
- MA type (EMA/SMA)
- MA length
Shared logic keeps the layout clean and consistent.
Use Cases:
- Build a macro trend dashboard for SPY, QQQ, BTC, ETH, ARKK, IWM, DXY, VIX, etc.
- Confirm risk-on alignment
- Identify broad market rotation or weakness
- Pair with individual asset setups to stay in sync with the environment
This tool is ideal for traders who want a one-glance check on market strength without cluttering their main charts. It's fast, flexible, and highly visual.
🦌 Horn Pattern - Horn + FT - Ming Joo🦌 Horn Pattern Reversal Strategy (By Ming Joo)
This strategy is based on a 3-bar reversal pattern known as the Horn Pattern (bull-bear-bull for longs, bear-bull-bear for shorts). A confirmation bar (bar ) follows the pattern to validate a breakout.
🔍 Context Filter:
To ensure high-quality trades, a simple trend filter is applied using EMA(20):
✅ Bullish Horn signals are valid only if the confirmation bar closes above EMA20
✅ Bearish Horn signals are valid only if the confirmation bar closes below EMA20
This prevents taking counter-trend reversals in weak conditions.
🎯 Entry Logic:
Long entry: Horn high + 1 tick
Short entry: Horn low – 1 tick
Target: 1R
Stop: Structural extreme (low/high of the horn)
Optionally shows 0.5R line
This structure-based reversal model is suitable for 5min–1H timeframes, and works best on volatile instruments (e.g. ES1!, NQ1!, BTCUSD, AAPL).
SMA Trend BoxCalculates trend base on a short SMA and a long SMA and displays a text box with result on right-side of canvas.
Helpful when trading on intraday timeframes but you want to know what the bigger-picture trend is (i.e. if you always want to trade in the direction of primary trend).
DMI-LuminateIndicator Description: DMI-Luminate (DMI-LMT)
DMI-Luminate is an enhanced version of the Directional Movement Index (DMI) indicator that combines multiple moving averages for smoothing and offers various options to customize the calculation of ADX, +DM, -DM, DX, and ADXR. It is ideal for traders looking to analyze trend strength and equilibrium points between buyers and sellers.
Components and Features
+DM and -DM: Indicators measuring positive and negative directional movement, helping identify trend direction.
DX (Directional Movement Index): Measures the relative difference between +DM and -DM, indicating the current trend strength.
ADX (Average Directional Index): A smoothed line showing trend strength regardless of direction. Values above 25 generally indicate a strong trend.
ADXR (Average Directional Movement Rating): A moving average of ADX that detects trend strength changes with less sensitivity.
Equilibrium Points: Visual markers (blue circles) that appear when +DM and -DM cross, signaling potential reversals or changes in trend strength.
Customizable Settings
DM Length: The period used to calculate directional movements.
ADX Smoothing: The smoothing period for ADX.
MA Type Universal: Select the moving average type used for smoothing calculations. Options include SMA, EMA, WMA, ALMA, T3, and advanced averages like DNA⚡ and RNA🐢.
T3 Hot Factor: Parameter to adjust the intensity of the T3 moving average (when selected).
Show Lines: Toggle the display of ADX, ADXR, DX, and +DM/-DM lines as you prefer.
Show Equilibrium Points: Enable to visualize crossing points between +DM and -DM.
Background Color and Offset: Customize the background color and offset for better visibility.
How to Use
Trend Identification
Watch the ADX line to gauge trend strength. When ADX is above 25, the trend is considered strong. The +DM and -DM lines indicate if the trend is bullish (+DM > -DM) or bearish (-DM > +DM).
Entry/Exit Signals
Use the equilibrium points (blue circles) to identify potential reversals or changes in trend dynamics based on +DM and -DM crossings.
Moving Average Selection
Experiment with different moving averages to smooth the data and tailor the indicator to your trading style and asset. Faster averages like EMA react better in volatile markets, while SMMA and ALMA suit more stable conditions.
Using ADXR
ADXR offers a smoother view of trend strength to avoid false signals during sideways markets.
Visual Customization
Adjust colors and background to improve readability, especially across different chart themes.
Recommendations
Combine DMI-Luminate with other indicators (e.g., volume, RSI, chart patterns) to confirm entries and exits.
Adjust DM Length and ADX Smoothing according to the timeframe you trade.
Use different moving average types to find the setup that works best for your asset and strategy.
🦌 Horn Pattern - Horn + FT - Ming Joo太棒了!以下是你策略的中英文简介版本,专为 **TradingView 发布页面** 编写,突出你当前唯一的 context filter(基于 EMA20)。
---
## 🇬🇧 English Description — Horn Pattern Strategy with EMA Context Filter
**🦌 Horn Pattern Reversal Strategy (By Ming Joo)**
This strategy is based on a 3-bar reversal pattern known as the **Horn Pattern** (bull-bear-bull for longs, bear-bull-bear for shorts). A confirmation bar (bar\ ) follows the pattern to validate a breakout.
🔍 **Context Filter:**
To ensure high-quality trades, a simple trend filter is applied using EMA(20):
* ✅ **Bullish Horn** signals are valid **only if** the confirmation bar closes **above EMA20**
* ✅ **Bearish Horn** signals are valid **only if** the confirmation bar closes **below EMA20**
This prevents taking counter-trend reversals in weak conditions.
🎯 Entry Logic:
* Long entry: Horn high + 1 tick
* Short entry: Horn low – 1 tick
* Target: 1R
* Stop: Structural extreme (low/high of the horn)
* Optionally shows 0.5R line
This structure-based reversal model is suitable for 5min–1H timeframes, and works best on volatile instruments (e.g. ES1!, NQ1!, BTCUSD, AAPL).
---
## 🇨🇳 中文简介 — Horn 结构反转策略(含 EMA 趋势滤网)
**🦌 Horn 反转策略(By Ming Joo)**
本策略基于经典的 **Horn 形态**(多头为 bull-bear-bull,空头为 bear-bull-bear),由三根结构K线 + 一根确认K线构成,搭配 **EMA20 趋势过滤器** 筛选优质信号。
🔍 **上下文过滤条件(唯一 context filter):**
* ✅ **Bullish Horn** 仅在确认K线的收盘 **高于 EMA20** 时触发
* ✅ **Bearish Horn** 仅在确认K线的收盘 **低于 EMA20** 时触发
防止在弱趋势中逆势进场,提升成功率。
🎯 入场逻辑:
* 多头:Horn 高点 +1 tick 挂多
* 空头:Horn 低点 –1 tick 挂空
* 止盈:1R
* 止损:Horn 的结构极点
* 可选显示 0.5R 虚线
适合用于 5分钟至 1小时图表,特别适用于高波动性品种(如 ES1!, NQ1!, BTCUSD, AAPL 等)。
---
Fallback VWAP (No Volume? No Problem!) – Yogi365Fallback VWAP (No Volume? No Problem!) – Yogi365
This script plots Daily, Weekly, and Monthly VWAPs with ±1 Standard Deviation bands. When volume data is missing or zero (common in indices or illiquid assets), it automatically falls back to a TWAP-style calculation, ensuring that your VWAP levels always remain visible and accurate.
Features:
Daily, Weekly, and Monthly VWAPs with ±1 Std Dev bands.
Auto-detection of missing volume and seamless fallback.
Clean, color-coded trend table showing price vs VWAP/bands.
Uses hlc3 for VWAP source.
Labels indicate when fallback is used.
Best Used On:
Any asset or index where volume is unavailable.
Intraday and swing trading.
Works on all timeframes but optimized for overlay use.
How it Works:
If volume == 0, the script uses a constant fallback volume (1), turning the VWAP into a TWAP (Time-Weighted Average Price) — still useful for intraday or index-based analysis.
This ensures consistent plotting on instruments like indices (e.g., NIFTY, SENSEX,DJI etc.) which might not provide volume on TradingView.
Bounce Zone📘 Bounce Zone – Indicator Description
The "Bounce Zone" indicator is a custom tool designed to highlight potential reversal zones on the chart based on volume exhaustion and price structure. It identifies sequences of candles with low volume activity and marks key price levels that could act as "bounce zones", where price is likely to react.
🔍 How It Works
Volume Analysis:
The indicator calculates a Simple Moving Average (SMA) of volume (default: 20 periods).
It looks for at least 6 consecutive candles (configurable) where the volume is below this volume SMA.
Color Consistency:
The candles must all be of the same color:
Green candles (bullish) for potential downward bounce zones.
Red candles (bearish) for potential upward bounce zones.
Zone Detection:
When a valid sequence is found:
For green candles: it draws a horizontal line at the low of the last red candle before the sequence.
For red candles: it draws a horizontal line at the high of the last green candle before the sequence.
Bounce Tracking:
Each horizontal line remains on the chart until it is touched twice by price (high or low depending on direction).
After two touches, the line is automatically removed, indicating the zone has fulfilled its purpose.
📈 Use Cases
Identify areas of price exhaustion after strong directional pushes.
Spot liquidity zones where institutions might step in.
Combine with candlestick confirmation for reversal trades.
Useful in both trending and range-bound markets for entry or exit signals.
⚙️ Parameters
min_consecutive: Minimum number of consecutive low-volume candles of the same color (default: 6).
vol_ma_len: Length of the volume moving average (default: 20).
🧠 Notes
The indicator does not repaint and is based purely on historical candle and volume structure.
Designed for manual strategy confirmation or support for algorithmic setups.
Color Change EMA 200 (4H)200 Color Change EMA (4H Locked)
Overview
This indicator displays a 200-period Exponential Moving Average (EMA) that is locked to the 4-hour timeframe, regardless of what chart timeframe you're currently viewing. The EMA line changes color dynamically based on price action to provide clear visual trend signals.
Key Features
• Multi-Timeframe Capability : Always shows the 4H 200 EMA on any chart timeframe
• Dynamic Color Coding :
- Green: Price is above the 200 EMA (bullish condition)
- Red: Price is below the 200 EMA (bearish condition)
• Clean Visual Design : Bold 2-pixel line width for clear visibility
• Real-time Updates : Colors change instantly as price crosses above or below the EMA
How to Use
1. Add the indicator to any timeframe chart
2. The 4H 200 EMA will appear as a smooth line
3. Watch for color changes:
- When the line turns green, it indicates price strength above the key moving average
- When the line turns red, it suggests price weakness below the moving average
4. Use for trend identification, support/resistance levels, and entry/exit timing
Best Practices
• Combine with other technical analysis tools for confirmation
• Use the color changes as alerts for potential trend shifts
• Consider the 200 EMA as a major support/resistance level
• Works well for swing trading and position sizing decisions
Settings
• Length : Default 200 periods (customizable)
• Source : Default closing price (customizable)
Perfect for traders who want to keep the important 4H 200 EMA visible across all timeframes with instant visual trend feedback.
SuperTrend Adaptive (STD Smooth)Supertrend DeNoise (StdDev + Smoothing) is an advanced trend-following indicator designed to reduce false signals and market noise. This version enhances the classic Supertrend by incorporating standard deviation into the channel calculation and a smoothing factor, making the bands wider and more adaptive to volatility. The result is fewer whipsaws and clearer, more robust trend signals. Buy and sell labels appear only at the latest signal, keeping your chart uncluttered and focused. Ideal for traders seeking a cleaner trend indicator for any timeframe.
Smart Money Index (SMI) EnhancedSmart Money Index (SMI) Enhanced is an indicator that visualizes the behavior of "smart money" based on intraday price movements.
📌 Based on Don Hays’ classic formula:
SMI = Yesterday’s value – Morning movement + Late-day movement
🔍 Key Features:
Highlighted buy/sell zones for accumulation and distribution;
Alerts for crossovers between SMI and its moving average;
Supports multiple timeframes (hourly, daily, weekly).
✅ Useful for identifying institutional sentiment and potential market reversal points.
ℹ️ Works with stocks, indices, and cryptocurrencies.
This script is for educational purposes only and not financial advice.