ErrorFunctionsLibrary "ErrorFunctions"
A collection of functions used to approximate the area beneath a Gaussian curve.
Because an ERF (Error Function) is an integral, there is no closed-form solution to calculating the area beneath the curve. Meaning all ERFs are approximations; precisely wrong, but mostly accurate. How close you need to get to the actual area depends entirely on your use case, with more precision being less efficient.
The internal precision of floats in Pine Script is 1e-16 (16 decimals, aka. double precision). This library adapts well known algorithms designed to efficiently reach double precision. Single precision alternates are also included. All of them were made free to use, modify, and distribute by their original authors.
HASTINGS
Adaptation of a single precision ERF by Cecil Hastings Jr, published through Princeton University in 1955. It was later documented by Abramowitz and Stegun as equation 7.1.26 in their 1972 Handbook of Mathematical Functions. Fast, efficient, and ideal when precision beyond a few decimals is unnecessary.
GILES
Adaptation of a single precision Inverse ERF by Michael Giles, published through the University of Oxford in 2012. It reverses the ERF, estimating an X coordinate from an area. It too is fast, efficient, and ideal when precision beyond a few decimals is unnecessary.
LIBC
Adaptation of the double precision ERF & ERFC in the standard C library (aka. libc). It is also the same ERF & ERFC that SciPy uses. While not quite as efficient as the Hastings approximation, it's still very fast and fully maximizes Pines precision.
BOOST
Adaptation of the double precision Inverse ERF & Inverse ERFC in the Boost Math C++ library. SciPy uses these as well. These reverse the ERF & ERFC, estimating an X coordinate from an area. It too isn't quite as efficient as the Giles approximation, but still fast and fully maximizes Pines precision.
While these algorithms are not exported directly, they are available through their exported counterparts.
- - -
ERROR FUNCTIONS
erf(x, precise)
An Error Function estimates the theoretical error of a measurement.
Parameters:
x (float) : (float) Upper limit of the integration.
precise (bool) : Double precision (true) or single precision (false).
Returns: (float) Between -1 and 1.
erfc(x, precise)
A Complementary Error Function estimates the difference between a theoretical error and infinity.
Parameters:
x (float) : (float) Lower limit of the integration.
precise (bool) : Double precision (true) or single precision (false).
Returns: (float) Between 0 and 2.
erfinv(x, precise)
An Inverse Error Function reverses the erf() by estimating the original measurement from the theoretical error.
Parameters:
x (float) : (float) Theoretical error.
precise (bool) : Double precision (true) or single precision (false).
Returns: (float) Between 0 and ± infinity.
erfcinv(x, precise)
An Inverse Complementary Error Function reverses the erfc() by estimating the original measurement from the difference between the theoretical error and infinity.
Parameters:
x (float) : (float) Difference between the theoretical error and infinity.
precise (bool) : Double precision (true) or single precision (false).
Returns: (float) Between 0 and ± infinity.
- - -
DISTRIBUTION FUNCTIONS
pdf(x, m, s)
A Probability Density Function estimates the probability density . For clarity, density is not a probability .
Parameters:
x (float) : (float) X coordinate for which a density will be estimated.
m (float) : (float) Mean
s (float) : (float) Sigma
Returns: (float) Between 0 and ∞.
cdf(z, precise)
A Cumulative Distribution Function estimates the area under a Gaussian curve between negative infinity and the Z Score.
Parameters:
z (float) : (float) Z Score.
precise (bool) : Double precision (true) or single precision (false).
Returns: (float) Between 0 and 1.
cdfinv(a, precise)
An Inverse Cumulative Distribution Function reverses the cdf() by estimating the Z Score from an area.
Parameters:
a (float) : (float) Area between 0 and 1.
precise (bool) : Double precision (true) or single precision (false).
Returns: (float) Between -∞ and +∞
cdfab(z1, z2, precise)
A Cumulative Distribution Function from A to B estimates the area under a Gaussian curve between two Z Scores (A and B).
Parameters:
z1 (float) : (float) First Z Score.
z2 (float) : (float) Second Z Score.
precise (bool) : Double precision (true) or single precision (false).
Returns: (float) Between 0 and 1.
ttt(z, precise)
A Two-Tailed Test estimates the area under a Gaussian curve between symmetrical ± Z scores and ± infinity.
Parameters:
z (float) : (float) One of the symmetrical Z Scores.
precise (bool) : Double precision (true) or single precision (false).
Returns: (float) Between 0 and 1.
tttinv(a, precise)
An Inverse Two-Tailed Test reverses the ttt() by estimating the absolute Z Score from an area.
Parameters:
a (float) : (float) Area between 0 and 1.
precise (bool) : Double precision (true) or single precision (false).
Returns: (float) Between 0 and ∞.
ott(z, precise)
A One-Tailed Test estimates the area under a Gaussian curve between an absolute Z Score and infinity.
Parameters:
z (float) : (float) Z Score.
precise (bool) : Double precision (true) or single precision (false).
Returns: (float) Between 0 and 1.
ottinv(a, precise)
An Inverse One-Tailed Test Reverses the ott() by estimating the Z Score from a an area.
Parameters:
a (float) : (float) Area between 0 and 1.
precise (bool) : Double precision (true) or single precision (false).
Returns: (float) Between 0 and ∞.
Penunjuk dan strategi
Statistical Pairs Trading IndicatorZ-Score Stat Trading — Statistical Pairs Trading Indicator
📊🔗
---
What is it?
Z-Score Stat Trading is a powerful indicator for statistical pairs trading and quantitative analysis of two correlated assets.
It calculates the Z-Score of the log-price spread between any two symbols you choose, providing both long-term and short-term Z-Score signals.
You’ll also see real-time correlation, volatility, spread, and the number of long/short signals in a handy on-chart table!
---
How to Use 🛠️
1. Add the indicator to your chart.
2. Select two assets (symbols) to analyze in the settings.
3. Watch the Z-Score plots (blue and orange lines) and threshold levels (+2, -2 by default).
4. Check the info table for:
- Correlation
- Volatility
- Spread
- Number of long (NL) and short (NS) signals in the last 1000 bars
5. Set up alerts for signal generation or threshold crossings if you want to be notified automatically.
---
Trading Strategy 💡
- This indicator is designed for statistical arbitrage (mean reversion) strategies.
- Long Signal (🟢):
When both Z-Scores drop below the negative threshold (e.g., -2), a long signal is generated.
→ Buy Symbol A, Sell Symbol B, expecting the spread to revert to the mean.
- Short Signal (🔴):
When both Z-Scores rise above the positive threshold (e.g., +2), a short signal is generated.
→ Sell Symbol A, Buy Symbol B, again expecting mean reversion.
- The info table helps you quickly assess the frequency of signals and the current statistical relationship between your chosen assets.
---
Best Practices & Warnings 🚦
- Avoid high leverage! Pairs trading can be risky, especially during periods of divergence. Use conservative position sizing.
- Check for cointegration: Before using this indicator, make sure both assets are cointegrated or have a strong historical relationship. This increases the reliability of mean reversion signals.
- Check correlation: Only use asset pairs with a high correlation (preferably 0.8–0.9 or higher) for best results. The correlation value is shown in the info table.
- Scale in and out gradually: When entering or exiting positions, consider doing so in parts rather than all at once. This helps manage slippage and risk, especially in volatile markets.
---
⚠️ Note on Performance:
This indicator may work a bit slowly, especially on large timeframes or long chart histories, because the calculation of NL and NS (number of long/short signals) is computationally intensive.
---
Disclaimer ⚠️
This script is provided for educational and informational purposes only .
It is not financial advice or a recommendation to buy or sell any asset.
Use at your own risk. The author assumes no responsibility for any trading decisions or losses.
Volume Spike 20%+This indicator highlights volume spikes that exceed the 20% threshold above the 20-period simple moving average of volume.
🔹 Gray bars: Normal volume
🔹 Green bars: Volume is at least 20% higher than the 20-period average
🔸 Orange line: The 20-period volume moving average
Use case:
This tool helps traders quickly spot abnormal trading activity or increased interest in a stock, which may precede a price breakout or reversal.
Simple, clean, and effective – perfect for momentum, breakout, or volume-based strategies.
Auto Price Action SR Levels by Chaitu50cAuto Price Action SR Levels by Chaitu50c:
This is a session-based support and resistance indicator that identifies price levels based on actual candle activity, without relying on traditional indicators. It works by clustering open, high, low, or close values of past candles that frequently occur within a defined price range, making it a reliable price action-based tool for intraday traders.
The indicator calculates these levels at the start of each new trading session (based on NSE 09:15 time) and keeps them static throughout the session. This avoids unnecessary noise or flickering due to live price action, giving traders consistent zones to work with during the day.
FEATURES:
* Automatic detection of support and resistance levels based on candle price hits
* Cluster formation using high/low or open/close logic
* Static levels: calculated once per session and remain unchanged until the next session
* Adjustable settings for:
* Cluster range (in points)
* Number of lookback candles
* Line width
* Line color (default: black)
* Minimalist design for a clean chart experience
HOW IT WORKS:
The indicator looks back over a defined number of candles at the beginning of each session. It clusters prices that fall within a specified range (e.g., 250 points) and counts how many times they appear as open, high, low, or close values. If a price level is hit at least once (default), it is considered significant and a line is plotted.
Because clustering is done once per session, the lines do not shift during the session. This allows traders to base decisions on fixed, stable levels formed by prior market structure.
RECOMMENDED FOR:
* Intraday traders
* Price action traders
* Traders who prefer clean charts with logical SR zones
* Nifty, BankNifty, and stock-based day trading
Created by Chaitu50c for traders who rely on logic and structure, not signals.
Disclaimer:
This indicator is intended for educational and informational purposes only. It does not constitute financial advice or trading recommendations. Use at your own discretion and always manage risk responsibly.
---
Let me know if you’d like to include use-case examples or screenshots before publishing.
HVC Daily LevelsDaily High Volume Candle Levels Marked on all Timeframes
HVC Level Sentinel v6 — High Volume Candle Levels
HVC Level Sentinel v6 automatically detects and highlights “High Volume Candles” (HVCs) — bars with the highest trading volume in a rolling, user-defined window (e.g., 30 days). This tool helps you spot key price levels where significant trading activity occurred, which can act as important support or resistance zones.
Features
Customizable Lookback: Choose how many bars to look back for HVC detection (default: 30 days, adjustable).
Automatic Highlighting: HVC candles are highlighted on your chart with a customizable color.
Level Lines: Draws horizontal lines at the Open, High, Low, and Close of each recent HVC, so you can easily track these key levels.
Line Fading: Only the most recent N HVCs (user-adjustable) have lines, with older lines fading out or disappearing for clarity.
Per-Line Control: Turn on/off Open, High, Low, and Close lines individually in the settings.
Fully Customizable: Adjust colors, line styles, widths, and opacity to fit your chart style.
How It Works
On each new bar, the script checks if the current bar’s volume is the highest in the last N bars.
If so, it marks the bar as an HVC and draws lines at its O/H/L/C (if enabled).
You can highlight all HVCs historically, but only the most recent N will have lines for a clean, focused chart.
Use Cases
Identify major breakout or reversal points driven by high volume.
Track where institutional or “smart money” activity may have occurred.
Use HVC levels as dynamic support/resistance for entries, exits, or stop placement.
Tip :
Adjust the lookback window and number of HVCs with lines to match your trading style—shorter for active trading, longer for swing/position trading.
High Low Levels by JZCustom High Low Levels Indicator - features
Clearly plotted high and low levels for specific trading sessions. This indicator provides visual representations of key price levels during various trading periods. Below are the main features and benefits of this indicator:
1. Display high and low levels for each session
- previous day high/low: display the high and low from the previous day, giving you a better understanding of how the price moves compared to the prior day.
- asia, london, and custom sessions: track the high and low levels for the major trading sessions (asian and london) and two custom user-defined sessions.
2. Complete line and label customization
- custom line appearance: choose the color, line style (solid, dashed, dotted), and line thickness for each trading session. you can also decide if the lines should extend beyond the current price action.
- custom labels: define your own label texts for each custom session. this way, you can label the levels precisely and easily track price movements.
3. Define your own trading sessions
- add up to two custom sessions (custom and custom 2), which can be defined using precise start and end times (hour and minute).
- each custom session allows you to specify the label text for the high and low levels, enabling you to easily differentiate different parts of the day on the chart.
4. Clear and intuitive design
- grouped settings: all settings are grouped based on trading sessions, so you can easily customize every aspect of the visual representation.
- simple toggle on/off: you can easily enable or disable each line (previous day, asia, london, custom 1, custom 2). this allows you to keep your chart clean and focus only on the important levels you need at any moment.
5. Flexible time zones
- time zone settings: set the time zone (utc, europe/london, america/new_york, asia/tokyo) to properly align the timeframes for each level depending on the market you're focusing on.
6. Automatic cleanup of old lines and labels
- old levels removal: automatically remove old lines and labels to prevent clutter on your chart. this ensures that only current, relevant levels for each trading day or session are displayed.
7. Precise plotting and line extension
- accurate level markings: the indicator calculates the precise times when the high and low levels were reached and plots lines that visually represent these levels.
- line extension options: you have the option to extend the high/low lines beyond their point of calculation, which helps with identifying price action trends beyond the current period.
Dec 7, 2024
Release Notes
Changes and Improvements for Users:
1. Customizable Offset for Lines and Labels:
- A new input, `Line and Label Offset`, allows users to control how far the lines and their associated text labels extend. This ensures the labels and lines remain aligned and can be adjusted as needed.
2. Unified Offset Control:
- The same offset value is applied to all types of lines and labels (e.g., Previous Day High/Low, Asia High/Low, London High/Low, and custom sessions). Users can change this in one place to affect the entire script consistently.
3. Enhanced Flexibility:
- Users now have more control over the appearance and position of their lines and labels, making the indicator adaptable to different chart setups and personal preferences.
These updates aim to enhance user convenience and customization, ensuring a more tailored charting experience.
EMA Distance Indicator [Eddie_Bitcoin]🧠 EMA Distance Indicator
This indicator is a powerful statistical tool designed to provide enhanced context and signal confirmation for traders who want to go beyond price action alone.
🔍 What It Does
It calculates and visualizes the distance (%) between two EMAs (Fast & Slow) on either the current chart symbol or a selected macro/index reference (e.g., BTC Dominance, TOTAL2, SPX). But it doesn't stop there:
Core Features:
✅ Real-time percentage distance between Fast and Slow EMAs
📈 Slope (acceleration) of the distance to capture trend momentum
🎯 Gaussian-based percentile rank of the current distance over a configurable historical sample
📊 Dynamic table display with intuitive emoji-based cues
🟢 Highlights extreme conditions (e.g., TOP 5% or LOW 5% percentile zones)
🔀 Compare both current asset and a macro/index asset side by side
💡 Display Modes:
Show only current symbol
Show only index/macro symbol
Show both with independently positioned tables
🎯 Ideal Use Case
This is not a standalone strategy, but rather a statistical enhancement module designed to pair with tools like my 👉 “AltCoin Index Correlation” indicator. It gives traders a quick-glance view of strength, divergence, and macro alignment for better timing and confidence.
Whether you’re trading altcoins, tracking dominance charts, or watching indices, this tool offers deep visual insight into EMA-based dynamics — wrapped in a clean, emoji-driven UI.
🛠 Created with ❤️ by @Eddie_Bitcoin
🚀 ### Check my profile for other juicy hints and original strategies. ### 🚀
EMA Pullback Speed Strategy 📌 **Overview**
The **EMA Pullback Speed Strategy** is a trend-following approach that combines **price momentum** and **Exponential Moving Averages (EMA)**.
It aims to identify high-probability entry points during brief pullbacks within ongoing uptrends or downtrends.
The strategy evaluates **speed of price movement**, **relative position to dynamic EMA**, and **candlestick patterns** to determine ideal timing for entries.
One of the key concepts is checking whether the price has **“not pulled back too much”**, helping focus only on situations where the trend is likely to continue.
⚠️ This strategy is designed for educational and research purposes only. It does not guarantee future profits.
🧭 **Purpose**
This strategy addresses the common issue of **"jumping in too late during trends and taking unnecessary losses."**
By waiting for a healthy pullback and confirming signs of **trend resumption**, traders can enter with greater confidence and reduce false entries.
🎯 **Strategy Objectives**
* Enter in the direction of the prevailing trend to increase win rate
* Filter out false signals using pullback depth, speed, and candlestick confirmations
* Predefine Take-Profit (TP) and Stop-Loss (SL) levels for safer, rule-based trading
✨ **Key Features**
* **Dynamic EMA**: Reacts faster when price moves quickly, slower when market is calm – adapting to current momentum
* **Pullback Filter**: Avoids trades when price pulls back too far (e.g., more than 5%), indicating a trend may be weakening
* **Speed Check**: Measures how strongly the price returns to the trend using candlestick body speed (open-to-close range in ticks)
📊 **Trading Rules**
**■ Long Entry Conditions:**
* Current price is above the dynamic EMA (indicating uptrend)
* Price has pulled back toward the EMA (a "buy the dip" situation)
* Pullback depth is within the threshold (not excessive)
* Candlesticks show consecutive bullish closes and break the previous high
* Price speed is strong (positive movement with momentum)
**■ Short Entry Conditions:**
* Current price is below the dynamic EMA (indicating downtrend)
* Price has pulled back up toward the EMA (a "sell the rally" setup)
* Pullback is within range (not too deep)
* Candlesticks show consecutive bearish closes and break the previous low
* Price speed is negative (downward momentum confirmed)
**■ Exit Conditions (TP/SL):**
* **Take-Profit (TP):** Fixed 1.5% target above/below entry price
* **Stop-Loss (SL):** Based on recent price volatility, calculated using ATR × 4
💰 **Risk Management Parameters**
* Symbol & Timeframe: BTCUSD on 1-hour chart (H1)
* Test Capital: \$3000 (simulated account)
* Commission: 0.02%
* Slippage: 2 ticks (minimal execution lag)
* Max risk per trade: 5% of account balance
* Backtest Period: Aug 30, 2023 – May 9, 2025
* Profit Factor (PF): 1.965 (Net profit ÷ Net loss, including spreads & fees)
⚙️ **Trading Parameters & Indicator Settings**
* Maximum EMA Length: 50
* Accelerator Multiplier: 3.0
* Pullback Threshold: 5.0%
* ATR Period: 14
* ATR Multiplier (SL distance): 4.0
* Fixed TP: 1.5%
* Short-term EMA: 21
* Long-term EMA: 50
* Long Speed Threshold: ≥ 1000.0 (ticks)
* Short Speed Threshold: ≤ -1000.0 (ticks)
⚠️Adjustments are based on BTCUSD.
⚠️Forex and other currency pairs require separate adjustments.
🔧 **Strategy Improvements & Uniqueness**
Unlike basic moving average crossovers or RSI triggers, this strategy emphasizes **"momentum-supported pullbacks"**.
By combining dynamic EMA, speed checks, and candlestick signals, it captures trades **as if surfing the wave of a trend.**
Its built-in filters help **avoid overextended pullbacks**, which often signal the trend is ending – making it more robust than traditional trend-following systems.
✅ **Summary**
The **EMA Pullback Speed Strategy** is easy to understand, rule-based, and highly reproducible – ideal for both beginners and intermediate traders.
Because it shows **clear visual entry/exit points** on the chart, it’s also a great tool for practicing discretionary trading decisions.
⚠️ Past performance is not a guarantee of future results.
Always respect your Stop-Loss levels and manage your position size according to your risk tolerance.
Supertrend - SSL Strategy with Toggle [AlPashaTrader]📈 Overview of the Supertrend - SSL Strategy with Toggle Indicator
This strategy combines two powerful technical tools—Supertrend and SSL Channel—to deliver precise and reliable trading signals, designed for traders who value confirmation and risk management. 🎯
⚙️ How This Indicator Was Created
The strategy was meticulously crafted to harness the complementary strengths of:
Supertrend Indicator: A trend-following tool based on Average True Range (ATR) and a multiplier factor, it detects bullish or bearish trends by calculating dynamic support and resistance levels. 📊
SSL Channel: A channel indicator built using two Simple Moving Averages (SMA) of the highs and lows over a set period. It cleverly determines trend direction by comparing price action relative to these moving averages. 🔄
These two indicators are merged into one cohesive strategy with an optional toggle feature allowing the trader to choose whether to require confirmation from both indicators before taking a position or to act on signals from either. 🎚️
The script includes user-friendly controls for:
Defining a custom trading date range 📅, useful for backtesting or restricting trading to specific market conditions.
Setting the ATR length and multiplier for Supertrend sensitivity ⚙️.
Adjusting the SSL channel period for responsiveness to price changes ⏱️.
Choosing whether to require dual confirmation (both Supertrend and SSL signals) for more conservative trading or a single indicator trigger for a more aggressive approach 🛡️ vs ⚔️.
🔍 How This Indicator Works
Signal Generation:
Supertrend analyzes market volatility and trend direction, signaling a potential buy when the trend turns bullish 📈 and a sell when bearish 📉.
SSL Channel tracks price relative to its high and low moving averages to identify uptrends and downtrends. A crossover of the SSL Up and SSL Down lines generates buy or sell signals 🔔.
Confirmation Logic:
When confirmation is enabled, the strategy waits for agreement between both indicators before entering a trade ✅, reducing false signals.
When confirmation is disabled, it trades based on signals from either indicator ⚡, allowing more frequent entries but potentially higher risk.
Entry and Exit Rules:
Entry occurs when the indicator(s) signal a new trend direction 🚀 for long, or decline for short.
Exit happens when opposing signals appear 🛑, closing existing positions to lock in profits or cut losses.
Visual Aids:
The SSL Channel lines are plotted directly on the chart with distinct colors to intuitively show trend shifts 🎨.
The system respects the specified date range ⏳, ensuring trades only occur within user-defined periods.
🎯 How to Use This Strategy Effectively
Set Your Preferences: Adjust ATR length, factor, and SSL period to your style. More sensitive? Decrease lengths. Smoother? Increase them ⚙️.
Choose Confirmation Mode: Use the toggle depending on your risk appetite:
Confirmation ON ✅: For conservative traders wanting high-probability setups.
Confirmation OFF ⚡: For aggressive traders who want more signals.
Apply Date Filters: Focus your trading or backtesting on specific periods 📅.
Monitor Entry/Exit Signals: Watch crossovers and Supertrend changes closely 👀.
Risk Management: The strategy uses position sizing as a percentage of equity (default 15%) 💰. Adjust accordingly.
Combine with Other Tools: Enhance results by combining this with volume, price action, or fundamentals 🔧.
📝 Summary
This Supertrend - SSL Strategy with Toggle is a dynamic and flexible trading tool blending volatility-based trend detection with moving-average channel insights. It empowers traders to customize confirmation strictness, control trading periods, and efficiently capture trending opportunities while managing risk smartly.
By integrating proven indicators in a user-friendly, visually intuitive package, this strategy stands as a sophisticated tool suitable for various markets and trading styles. 🚀📊
Break-out DailyBreakout - with body - of yesterday's daily high or low.
With body we mean that the indicator only signals if the candle has closed above the high (Breakout - Long) or below the low (Breakout - Short).
This indicator can make mistakes such as not signaling a breakout or signaling it at the wrong level (this is because it is based on the highs/lows recorded in the daily candle, not the daily high/low in the reference timeframe).
I recommend always checking if the breakout has actually occurred.
I hope it will make it easier for you to read the charts and happy trading to everyone! :)
###################################################################################
Rottura strutturale - con corpo - del massimo o minimo giornaliero di ieri.
Con corpo si intende che l'indicatore segnala solo se la candela ha chiuso al di sopra del massimo(Break-out - Long) o al di sotto del minimo(Break-out - Short).
Questo indicatore può fare degli errori come non segnalare una rottura strutturale o segnalarla su un livello sbagliato(questo perché si basa sui massimi/minimi registrati nella candela giornaliera, non il massimo/minimo giornaliero nel timeframe di riferimento).
Consiglio di controllare sempre se effettivamente è avvenuta la rottura.
Spero che vi semplificherà la lettura dei grafici e buon trading a tutti! :)
My S.T.A.C.K.📊 My S.T.A.C.K. (Simplified TA Combined Kit)
All your favorite technical tools in one clean, customizable overlay.
My S.T.A.C.K. is a power-packed indicator designed to streamline your chart by combining the most commonly used technical analysis tools into a single, space-saving script. Whether you're a trend trader, swing trader, or just looking to declutter your view — this kit gives you everything you need, nothing you don’t.
🔧 Features:
5 Customizable Moving Averages: Choose your type (SMA, EMA, WMA, etc.) and periods to match your strategy.
Bollinger Bands: Visualize volatility and overbought/oversold zones with precision.
Donchian Channels: Spot breakouts and trend reversals based on high/low ranges.
ATR Bands: Adaptive support/resistance zones based on Average True Range.
Clean Visualization: Toggle each element on or off, adjust colors, and focus only on what matters.
✅ Ideal For:
- Traders who want multiple indicators in one place
- Reducing indicator clutter on TradingView
- Quick visual analysis without switching scripts
Fibo Normalized RSI & RSI RibbonPlots both standard and Z-score normalized RSI ribbons using Fibonacci-based periods. Supports adjustable normalization, optional 0–100 scaling, and multi-line visualizations for momentum and deviation analysis.
This tool is designed for traders who want to go beyond standard RSI by adding:
Statistical normalization (Z-score)
Multi-period analysis (Fibonacci structure)
Advanced divergence and exhaustion detection
It gives you both classical momentum context and mathematically rigorous deviation insight, making it ideal for:
Swing traders
Quant-inclined discretionary traders
Multi-timeframe analysts
Trend Confirmation
When both RSI and normalized RSI across short and long periods are stacked in the same direction (e.g., above 50 or with high Z-scores), the trend is likely strong.
Disagreement between the two ribbons (e.g., RSI high but normalized RSI flat) may indicate late-stage trend or false strength.
Mean Reversion Trades
Look for normalized RSI values > +2 or < -2 (i.e., ~2 standard deviations).
Cross-check with standard RSI to see if the move aligns with a traditional overbought/oversold level.
Great for fade/reversal setups when Z-score RSI is extreme but classic RSI is just beginning to turn.
Divergence Detection
Compare the slope of RSI vs. normalized RSI over same period:
If RSI is rising but normalized RSI is falling → momentum is fading despite apparent strength.
Excellent for early warnings before reversals.
Multi-Timeframe Confluence
Use short-period ribbons (e.g., 3–13) for tactical entries/exits.
Use long-period ribbons (e.g., 55–233) for macro trend bias.
Alignment across both = high-confidence zone.
Tight Range Display with Background🌟 Tight Range Transparency Display with Background
What Is This Indicator?
Hey traders! Ever wanted a simple way to spot those quiet, low-volatility moments in the market that often signal a big move is coming? The Tight Range Transparency Display with Background does exactly that! This indicator highlights periods where the price is moving in a tight range—think of it as the calm before the storm. It paints the chart background blue to show these zones, with the shade getting darker the tighter the range becomes. It’s like having a visual cue to say, “Hey, something might be brewing here!”
Why You’ll Love It
Spot Key Moments Easily: The blue background makes it super easy to see when the market is in a tight range, which often happens before breakouts or big trends.
Customizable Settings: You can tweak the range thresholds to match your trading style—whether you’re looking for super tight zones or slightly broader ones.
Visual Clarity: The background gets darker when the range is tighter, giving you a quick sense of how compressed the price action is.
Perfect for Any Market: Works on stocks, forex, crypto, or any chart you trade, across any timeframe.
How to Use It
Add It to Your Chart:
Just copy this script into TradingView’s Pine Editor and hit "Add to Chart." It’ll overlay right on your price chart.
Tweak the Settings:
Open the indicator settings and use the dropdown menus to pick your preferred "Tight Range %" and "Wide Range %." For example, set a Tight Range % of 2.0% to catch smaller ranges, or go higher like 10.0% for broader ones.
You can also adjust the ATR Period (default is 5) to make the indicator more or less sensitive to recent price swings.
Watch for the Blue Background:
When the price enters a tight range, the chart background turns blue. The darker the blue, the tighter the range—meaning a potential breakout could be closer!
Trade Smarter:
Use these tight range zones to prepare for potential breakouts. For example, if you see a dark blue background, it might be a good time to watch for a big price move.
Pair this with other tools like support/resistance levels or volume spikes to confirm your trades.
Who Is This For?
Swing Traders: Perfect for spotting consolidation zones before a big swing.
Breakout Traders: Tight ranges often lead to breakouts—use this to time your entries.
Smart Money Followers: If you’re into smart money concepts, tight ranges can signal accumulation or distribution phases.
Beginners & Pros Alike: It’s easy to use for new traders but powerful enough for seasoned pros.
Real-World Example
Imagine you’re trading a stock on a 1-hour chart. You notice the background turns blue, and it’s getting darker over a few bars. This tells you the price range is tightening—maybe the stock is consolidating after a big move. You check your other indicators, see a volume spike, and spot a breakout above resistance. Boom! You catch the next big trend, all because this indicator helped you focus on the right moment.
Tips for Best Results
Try Different Timeframes: Tight ranges on a 15-minute chart might signal short-term moves, while a daily chart could highlight bigger trends.
Adjust for Your Market: For volatile markets like crypto, you might want a higher Tight Range % (e.g., 10.0%). For calmer markets like forex, try a lower setting (e.g., 2.0%).
Combine with Other Tools: Use this alongside trendlines, moving averages, or volume indicators to confirm your setups.
Why I Made This
I created this indicator because I wanted a simple, visual way to spot those critical low-volatility zones without cluttering my chart. The dynamic background color makes it intuitive to see when the market is “coiling up” for a potential move. I hope it helps you find better trading opportunities just like it does for me!
Let’s Connect
If you find this indicator helpful, I’d love to hear about it! Drop a comment or a rating to let me know how it’s working for you. Got ideas to make it even better? Feel free to message me on TradingView—I’m always open to suggestions.
Published On
Date: May 22, 2025
Happy trading, and may your charts always be in your favor! 🚀
How to Publish on TradingView
Open Pine Editor:
On TradingView, open a chart and go to the Pine Editor tab at the bottom.
Paste the Code:
Copy the script you provided and paste it into the Pine Editor.
Compile:
Click "Add to Chart" to ensure it compiles without errors.
Publish:
Click the "Publish Script" button (paper plane icon) in the Pine Editor.
Select "Publish New Script."
Add the Description:
Title: "Tight Range Transparency Display with Background"
Description: Copy the content above into the description field.
Visibility: Choose "Public" to share with everyone (or "Invite-Only" for restricted access).
Tags: Add tags like "tight range", "breakout", "smart money", "volatility", "swing trading".
Screenshot: Add a screenshot of the indicator on a chart, showing the blue background during a tight range.
Submit:
Click "Publish" to submit. TradingView will review it and make it live if it meets their guidelines.
Additional Notes
Screenshot Tip: Use a chart where the blue background is clearly visible (e.g., during a consolidation period) to make the indicator’s effect stand out.
Engage with Users: After publishing, respond to comments and feedback to build a positive reputation on TradingView.
This content is designed to be approachable and engaging, helping traders understand the value of your indicator and encouraging them to try it out.
RSI mura visionOverview
The Enhanced RSI with Custom 40/60 Zones is a Pine Script™ v6 open-source indicator that builds on the classic Relative Strength Index by adding two additional horizontal levels at 40 and 60, alongside the standard 30/70. These extra zones help you identify early momentum shifts and distinguish trending markets from ranging ones with greater precision.
Key Features & Originality
* Custom Mid-Zones (40/60): Standard RSI signals can be noisy around the 50 midpoint. By marking 40 as a “weak momentum” threshold and 60 as a “strong momentum” confirmation, you get clearer entry and exit cues.
* Color-Coded Zones: The RSI line changes color when crossing 40, 50, 60, 70, and 30, letting you visually spot momentum acceleration or deceleration.
* Configurable Alerts: Built-in alert conditions fire when RSI crosses 40 or 60 in either direction, so you never miss a potential trend onset or exhaustion.
* Lightweight & Clean: No external dependencies, no look-ahead bias, and minimal repainting—ideal for both novice and professional traders.
How It Works
1. Momentum Decomposition: The standard 14-period RSI measures overbought/oversold extremes. Adding 40/60 lets you see when momentum shifts from neutral to bullish (crossing above 60) or bearish (dropping below 40) earlier than the classic 70/30 thresholds.
2. Trend Confirmation vs. Pullbacks: Readings between 40–60 often correspond to healthy pullbacks within a trend. A bounce off 40 suggests continuation; a rejection at 60 warns of a deeper pullback or reversal.
Usage & Inputs
* RSI Length (default 14): Period for calculating RSI.
* Level Inputs: Customize levels for overbought (70), support (60), neutral (50), weak (40), and oversold (30).
* Alert Toggles: Enable/disable alerts on each cross.
Why This Adds Value
* Early Signals: Capture trend beginnings before the market reaches extreme overbought/oversold levels.
* Noise Reduction: Filter sideways chop by watching the 40–60 corridor.
* Flexibility: Works on any timeframe or ticker.
Pine Script™ Version: v6
Open-Source License: MPL-2.0
Feel free to fork, modify, and share.
MestreDoFOMO Future Projection BoxMestreDoFOMO Future Projection Box - Description & How to Use
Description
The "MestreDoFOMO Future Projection Box" is a TradingView indicator tailored for crypto traders (e.g., BTC/USDT on 1H, 4H, or 1D timeframes). It visualizes current price ranges, projects future levels, and confirms trends using semi-transparent boxes. With labeled price levels and built-in alerts, it’s a simple yet powerful tool for identifying support, resistance, and potential price targets.
How It Works
Blue Box (Current Channel): Shows the recent price range over the last 10 bars (adjustable). The top is the highest high plus an ATR buffer, and the bottom is the lowest low minus the buffer. Labels display exact levels (e.g., "Top: 114000", "Bottom: 102600").
Green Box (Future Projection): Projects the price range 10 bars ahead (adjustable) based on the trend slope of the moving average. Labels show "Proj Top" and "Proj Bottom" for future targets.
Orange Box (Moving Average): Traces a 50-period EMA (adjustable) to confirm the trend. An upward slope signals a bullish trend; a downward slope signals a bearish trend. A label shows the current MA value (e.g., "MA: 105000").
Alerts: Triggers when the price nears the projected top or bottom, helping you catch breakouts or retracements.
How to Use
Add the Indicator: Apply "MestreDoFOMO Future Projection Box" to your chart in TradingView.
Interpret the Trend: Check the orange box’s slope—upward for bullish, downward for bearish.
Identify Key Levels: Use the blue box’s top as resistance and bottom as support. On a 4H chart, if the top is 114,000, expect resistance; if the bottom is 102,600, expect support.
Plan Targets: Use the green box for future targets—top for profit-taking (e.g., 114,000), bottom for stop-loss or buying (e.g., 102,600).
Set Alerts: Enable alerts for "Near Upper Projection" or "Near Lower Projection" to get notified when the price hits key levels.
Trade Examples:
Bullish: If the price breaks above the blue box top (e.g., 114,000), buy with a target at the green box top. Set a stop-loss below the green box bottom.
Bearish: If the price rejects at the blue box top and drops below the orange MA, short with a target at the blue box bottom.
Customize: Adjust the lookback period, projection bars, ATR multiplier, and MA length in the settings to fit your trading style.
Tips
Use on 1H for short-term trades, 4H for swing trades, or 1D for long-term trends.
Combine with volume or RSI to confirm signals.
Validate levels with market structure (e.g., candlestick patterns).
Day of Week and HTF Period SeparatorDay of Week & HTF Period Separator
A minimalist Pine Script indicator that adds clear, time-based separators and labels to intraday charts for better structure and analysis.
Key Features
• Day Labels
• Displays abbreviated weekday names (MON, TUE, WED, etc.) at a user-defined hour
• Custom text color and position
• Limits display to the most recent 28 days for a clean view
• Time Separators
• Daily: Vertical line at 00:00 each trading day
• 4-Hour: Lines at 00:00, 04:00, 08:00, 12:00, 16:00, 20:00
• Hourly: Divisions at every hour for detailed timing
• Customization
• Individual color picker for each separator type
• Choose line style: Solid, Dashed or Dotted
• Enable or disable any separator or label independently
• Smart limits to avoid clutter on extended history
• Smart Behavior
• Active only on intraday timeframes
• Projects upcoming separators into the future for planning
• Automatically caps historical plotting for performance
• Lines extend across full visible price range
Perfect for traders who need distinct session breaks, precise time-based zoning and an organized chart layout.
Inputs
• Show Day Labels (true/false)
• Label Hour (0–23)
• Day Label Color
• Show Daily Separators (true/false)
• Show 4H Separators (true/false)
• Show 1H Separators (true/false)
• Daily Line Color, Style
• 4H Line Color, Style
• Hourly Line Color, Style
• Max Days to Display
Enhance your intraday analysis with clean, customizable time markers. 👁
Wick Spike 50% Detector (15m & 1h)This script identifies candles with significant upper or lower wicks (spikes) based on a percentage of the total candle range. It helps spot potential reversals, exhaustion moves, or liquidity grabs — especially useful in volatile markets.
📍 Key Features:
15-Minute Timeframe:
Red Triangle Above: Candle range ≥ 0.35% and upper wick ≥ 50% of the range.
Green Triangle Below: Candle range ≥ 0.30% and lower wick ≥ 50% of the range.
1-Hour Timeframe:
Red Circle Above: Candle range ≥ 0.50% and upper wick ≥ 50%.
Green Circle Below: Candle range ≥ 0.50% and lower wick ≥ 50%.
📢 Alerts:
Alerts trigger when the 50% spike condition is met — within the last 60 seconds before candle close — ensuring timely notifications.
🎯 Designed to assist traders in identifying spike-driven opportunities and refining entry/exit strategies.
RDBRB Strategy with Filters + Cooldowns + LabelsRDBRB Strategy with Filters + Cooldowns
This script implements the RDBRB (Rally-Drop-Base-Retest-Breakout) strategy, a classic price action setup designed to identify structured trade opportunities using volume, volatility bands, and trend alignment. It’s ideal for traders looking for clean, rule-based entries across any timeframe.
🧠 Core Components
Rally & Drop Detection
Identifies short-term momentum shifts using moving average crossovers:
✅ Ra = Rally (bullish crossover)
🔻 Dr = Drop (bearish crossunder)
Base Formation
A statistical base is defined using a moving average with a standard deviation envelope (Upper/Lower BB). This forms the foundation for breakout or retest setups.
Retest Zone (RT)
When price returns to the lower band (but stays below the base), it suggests a potential re-accumulation or reaction zone before a breakout.
Breakout Confirmation (BO)
A breakout is validated when:
Price crosses above the upper band
Volume exceeds the 20-bar average by a threshold multiplier
RSI is above a bullish momentum level
Price is trending above the longer-term EMA
⏱️ Smart Cooldown Logic
Each signal (Rally, Drop, Retest, Breakout) has an independent cooldown timer to prevent multiple triggers within a short range, filtering out noise and duplicate signals:
Customizable cooldown periods via input settings
Ensures signals are meaningful and not clustered
💡 Visual Markers
All signals are shown as small, color-coded labels:
Ra : Green label below bar
Dr : Red label above bar
RT : Yellow label below bar
BO : Green breakout label below bar
Bands and base are plotted for structure reference.
🛠️ Customizable Settings
Cooldown periods for each signal type
MA lengths, volume and RSI thresholds
Trend filter and base calculation inputs
This script is ideal for price action traders who want a clean, structured method to trade consolidations and trend continuations while avoiding over-signaling. Use it on any timeframe and combine with higher-timeframe confirmation for best results.
Anchored VWAP by Time (Math by Thomas)📄 Description
This tool lets you plot an Anchored Volume Weighted Average Price (VWAP) starting from any specific date and time you choose. Unlike standard VWAPs that reset daily or weekly, this version gives you full control to track institutional pricing zones from precise anchor points—such as key swing highs/lows, market open, or news-driven candles.
It’s especially useful for price action and Smart Money Concepts (SMC) traders who track liquidity, fair value gaps (FVGs), and institutional zones.
🇮🇳 For NSE India Traders
You can anchor VWAP to Indian market open (e.g., 9:15 AM IST) or major events like RBI policy, earnings, or breakout candles.
The time input uses UTC by default, so for Indian Standard Time (IST), remember:
9:15 AM IST = 3:45 AM UTC
3:30 PM IST = 10:00 AM UTC
⚙️ How to Use
Add the indicator to your chart.
Open the settings panel.
Under “Anchor Start Time”, choose the date & time to begin the VWAP.
Use UTC format (adjust from IST if needed).
Customize the line color and thickness to suit your chart style.
The VWAP will begin plotting from that time forward.
🔎 Best Use Cases
Track VWAP from intraday range breakouts
Anchor from swing highs/lows to identify mean reversion zones
Combine with your FVGs, Order Blocks, or CHoCHs
Monitor VWAP reactions during key macro events or expiry days
🔧 Clean Design
No labels are used, keeping your chart clean.
Works on all timeframes (1min to Daily).
Designed for serious intraday & positional traders.
Beyond Insights IndicatorThe Beyond Insights Indicator is a multi-timeframe overlay tool designed for TradingView that displays key Exponential Moving Averages (EMAs) and volatility insights to support various trading strategies. It intelligently adapts its display based on the current chart timeframe to reduce clutter and enhance relevance. Specifically, it shows EMA 6, 18, and 50 when viewing intraday timeframes.
In addition to EMAs, the indicator includes an ATR (Average True Range) calculation with a default length of 14, offering insight into market volatility.
Aftershock by Session [SAKANE]■ Background & Motivation
In 24/7 markets like crypto, not all participants react simultaneously to major events.
Instead, reactions unfold across different regional trading sessions — Asia (APAC), Europe (EU), and the United States (US) — each with its own tempo and sentiment.
This indicator is designed to visualize which session drives the market after a key event — capturing the "aftershock" effect that ripples through time zones.
■ Key Features
Tracks price return (open → close) for each session: APAC / EU / US
Cumulative session returns are calculated and visualized
Smoothing options: SMA, EMA, or Ehlers SuperSmoother
Optimized for daily charts to highlight structural momentum shifts
Toggle visibility of each session independently
■ Why “Aftershock”?
Take April 2, 2025 — the day of the “Trump Tariff Opening.”
That policy announcement triggered a market-wide response. But:
Which session reacted first?
Which session truly moved the market?
This indicator is named “Aftershock” because it helps you see the ripple effect of such events — when and where momentum followed.
■ How to Use
Search for “Aftershock by Session ” on TradingView
Add it to your chart (use Daily timeframe)
Customize sessions and smoothing options via settings
You can also bookmark it for quick access.
■ Insights & Use Cases
Detect which session initiated or led market moves after news events
Understand geo-temporal dynamics — did the move start in Asia, Europe, or the US?
For example, on April 2, 2025, the day Trump’s tariff pivot was announced:
You can instantly see which session took the lead —
the APAC session hesitated, while the US session drove the trend.
This insight becomes visually obvious with the cumulative lines.
■ Unique Value
Unlike typical indicators based on raw price action,
Aftershock analyzes market movement through a session-based structural lens.
It captures where capital actually moved — and when.
A tool not just for technical analysis, but for event-driven, macro-aware market reading.
■ Final Thoughts
To truly understand market mechanics, we must look beyond candles and trends.
Aftershock by Session breaks down the 24-hour cycle into meaningful regional flows,
allowing you to track the true drivers behind price momentum.
Whether you're trading, researching, or tracking macro catalysts,
this tool helps answer the key question:
“Who moved the market — and when?”
1M Scalp Setup – 2ndHi/2ndLo Breakout1M Scalp Setup – 2ndHi/2ndLo Breakout
This script is designed for 1-minute chart scalpers seeking high-probability intraday breakout setups based on early session price action. The strategy revolves around identifying the first high and low of the day, and then detecting the second breach (2nd high or 2nd low) to anticipate breakout entries.
🔍 Core Logic:
EMA Filter : A configurable EMA (default 8-period) is plotted for trend context.
1st High/Low Detection : Captures the very first high and low of each trading day.
2nd High/Low Markers : Identifies the second time price breaks the initial high or low, acting as a potential signal zone.
Breakout Signals :
A Buy Signal is triggered when price closes above the 2nd high.
A Sell Signal is triggered when price closes below the 2nd low.
Each signal is only triggered once per day to reduce noise and avoid overtrading.
🖌️ Visual Markers:
1stHi and 1stLo : Early session levels (red and green).
2ndHi and 2ndLo : Key breakout reference points (purple and blue).
B and S Labels : Buy and Sell triggers marked in real-time once breakouts occur.
⚙️ Inputs:
EMA Length (default: 8)
Customizable Colors for Buy/Sell signals and key markers
This tool is best used in fast-moving markets or during high-volume sessions. Combine with volume or higher-timeframe confirmation for improved accuracy.
Mimas buy and sellBollinger Bands: Calculated using a simple moving average (basis) and standard deviation (dev).
EMAs: Two exponential moving averages (EMA 5 and EMA 20) are plotted to identify short-term and long-term trends.
Price Action Patterns: The script detects higher highs and higher lows for bullish conditions, and lower highs and lower lows for bearish conditions.
Trend Strength: An exponential moving average of the price change is used to gauge the strength of the trend.
Trade Signals: Buy and sell signals are plotted on the chart when specific conditions are met, combining price action patterns, trend strength, Bollinger Bands, and EMA crossovers.
Take-Profit Levels: Dynamic take-profit levels are calculated based on recent swing highs and lows, adjusted by a user-defined multiplier. These levels are displayed on the chart using plot to draw horizontal lines.