Z-Score Normalized VIX StrategyThis strategy leverages the concept of the Z-score applied to multiple VIX-based volatility indices, specifically designed to capture market reversals based on the normalization of volatility. The strategy takes advantage of VIX-related indicators to measure extreme levels of market fear or greed and adjusts its position accordingly.
1. Overview of the Z-Score Methodology
The Z-score is a statistical measure that describes the position of a value relative to the mean of a distribution in terms of standard deviations. In this strategy, the Z-score is calculated for various volatility indices to assess how far their values are from their historical averages, thus normalizing volatility levels. The Z-score is calculated as follows:
Z = \frac{X - \mu}{\sigma}
Where:
• X is the current value of the volatility index.
• \mu is the mean of the index over a specified period.
• \sigma is the standard deviation of the index over the same period.
This measure tells us how many standard deviations the current value of the index is away from its average, indicating whether the market is experiencing unusually high or low volatility (fear or calm).
2. VIX Indices Used in the Strategy
The strategy utilizes four commonly referenced volatility indices:
• VIX (CBOE Volatility Index): Measures the market’s expectations of 30-day volatility based on S&P 500 options.
• VIX3M (3-Month VIX): Reflects expectations of volatility over the next three months.
• VIX9D (9-Day VIX): Reflects shorter-term volatility expectations.
• VVIX (VIX of VIX): Measures the volatility of the VIX itself, indicating the level of uncertainty in the volatility index.
These indices provide a comprehensive view of the current volatility landscape across different time horizons.
3. Strategy Logic
The strategy follows a long entry condition and an exit condition based on the combined Z-score of the selected volatility indices:
• Long Entry Condition: The strategy enters a long position when the combined Z-score of the selected VIX indices falls below a user-defined threshold, indicating an abnormally low level of volatility (suggesting a potential market bottom and a bullish reversal). The threshold is set as a negative value (e.g., -1), where a more negative Z-score implies greater deviation below the mean.
• Exit Condition: The strategy exits the long position when the combined Z-score exceeds the threshold (i.e., when the market volatility increases above the threshold, indicating a shift in market sentiment and reduced likelihood of continued upward momentum).
4. User Inputs
• Z-Score Lookback Period: The user can adjust the lookback period for calculating the Z-score (e.g., 6 periods).
• Z-Score Threshold: A customizable threshold value to define when the market has reached an extreme volatility level, triggering entries and exits.
The strategy also allows users to select which VIX indices to use, with checkboxes to enable or disable each index in the calculation of the combined Z-score.
5. Trade Execution Parameters
• Initial Capital: The strategy assumes an initial capital of $20,000.
• Pyramiding: The strategy does not allow pyramiding (multiple positions in the same direction).
• Commission and Slippage: The commission is set at $0.05 per contract, and slippage is set at 1 tick.
6. Statistical Basis of the Z-Score Approach
The Z-score methodology is a standard technique in statistics and finance, commonly used in risk management and for identifying outliers or unusual events. According to Dumas, Fleming, and Whaley (1998), volatility indices like the VIX serve as a useful proxy for market sentiment, particularly during periods of high uncertainty. By calculating the Z-score, we normalize volatility and quantify the degree to which the current volatility deviates from historical norms, allowing for systematic entry and exit based on these deviations.
7. Implications of the Strategy
This strategy aims to exploit market conditions where volatility has deviated significantly from its historical mean. When the Z-score falls below the threshold, it suggests that the market has become excessively calm, potentially indicating an overreaction to past market events. Entering long positions under such conditions could capture market reversals as fear subsides and volatility normalizes. Conversely, when the Z-score rises above the threshold, it signals increased volatility, which could be indicative of a bearish shift in the market, prompting an exit from the position.
By applying this Z-score normalized approach, the strategy seeks to achieve more consistent entry and exit points by reducing reliance on subjective interpretation of market conditions.
8. Scientific Sources
• Dumas, B., Fleming, J., & Whaley, R. (1998). “Implied Volatility Functions: Empirical Tests”. The Journal of Finance, 53(6), 2059-2106. This paper discusses the use of volatility indices and their empirical behavior, providing context for volatility-based strategies.
• Black, F., & Scholes, M. (1973). “The Pricing of Options and Corporate Liabilities”. Journal of Political Economy, 81(3), 637-654. The original Black-Scholes model, which forms the basis for many volatility-related strategies.
Educational
Z-Score Normalized Volatility IndicesVolatility is one of the most important measures in financial markets, reflecting the extent of variation in asset prices over time. It is commonly viewed as a risk indicator, with higher volatility signifying greater uncertainty and potential for price swings, which can affect investment decisions. Understanding volatility and its dynamics is crucial for risk management and forecasting in both traditional and alternative asset classes.
Z-Score Normalization in Volatility Analysis
The Z-score is a statistical tool that quantifies how many standard deviations a given data point is from the mean of the dataset. It is calculated as:
Z = \frac{X - \mu}{\sigma}
Where X is the value of the data point, \mu is the mean of the dataset, and \sigma is the standard deviation of the dataset. In the context of volatility indices, the Z-score allows for the normalization of these values, enabling their comparison regardless of the original scale. This is particularly useful when analyzing volatility across multiple assets or asset classes.
This script utilizes the Z-score to normalize various volatility indices:
1. VIX (CBOE Volatility Index): A widely used indicator that measures the implied volatility of S&P 500 options. It is considered a barometer of market fear and uncertainty (Whaley, 2000).
2. VIX3M: Represents the 3-month implied volatility of the S&P 500 options, providing insight into medium-term volatility expectations.
3. VIX9D: The implied volatility for a 9-day S&P 500 options contract, which reflects short-term volatility expectations.
4. VVIX: The volatility of the VIX itself, which measures the uncertainty in the expectations of future volatility.
5. VXN: The Nasdaq-100 volatility index, representing implied volatility in the Nasdaq-100 options.
6. RVX: The Russell 2000 volatility index, tracking the implied volatility of options on the Russell 2000 Index.
7. VXD: Volatility for the Dow Jones Industrial Average.
8. MOVE: The implied volatility index for U.S. Treasury bonds, offering insight into expectations for interest rate volatility.
9. BVIX: Volatility of Bitcoin options, a useful indicator for understanding the risk in the cryptocurrency market.
10. GVZ: Volatility index for gold futures, reflecting the risk perception of gold prices.
11. OVX: Measures implied volatility for crude oil futures.
Volatility Clustering and Z-Score
The concept of volatility clustering—where high volatility tends to be followed by more high volatility—is well documented in financial literature. This phenomenon is fundamental in volatility modeling and highlights the persistence of periods of heightened market uncertainty (Bollerslev, 1986).
Moreover, studies by Andersen et al. (2012) explore how implied volatility indices, like the VIX, serve as predictors for future realized volatility, underlining the relationship between expected volatility and actual market behavior. The Z-score normalization process helps in making volatility data comparable across different asset classes, enabling more effective decision-making in volatility-based strategies.
Applications in Trading and Risk Management
By using Z-score normalization, traders can more easily assess deviations from the mean in volatility, helping to identify periods when volatility is unusually high or low. This can be used to adjust risk exposure or to implement volatility-based trading strategies, such as mean reversion strategies. Research suggests that volatility mean-reversion is a reliable pattern that can be exploited for profit (Christensen & Prabhala, 1998).
References:
• Andersen, T. G., Bollerslev, T., Diebold, F. X., & Vega, C. (2012). Realized volatility and correlation dynamics: A long-run approach. Journal of Financial Economics, 104(3), 385-406.
• Bollerslev, T. (1986). Generalized autoregressive conditional heteroskedasticity. Journal of Econometrics, 31(3), 307-327.
• Christensen, B. J., & Prabhala, N. R. (1998). The relation between implied and realized volatility. Journal of Financial Economics, 50(2), 125-150.
• Whaley, R. E. (2000). Derivatives on market volatility and the VIX index. Journal of Derivatives, 8(1), 71-84.
Option Contract Size CalculatorOption Contract Size Calculator
This indicator helps you to figure out the ideal number of contracts for your trade and its only used for options day trading.
The indicator needs to fill the input section in order to give you the information table that includes Contract size .
The input section consists of two sections. The first section requires user entry of the delta of the options contract from the broker chain and the stop loss size on the chart.
The second section allows you to enter your account balance and risk per trade
(2% recommended) .
There is also the option for where you wish to display your table like bottom right , bottom left or top right, top left.
special thanks to @Mohamedawke for the open source script this code is based off
Professional MSTI+ Trading Indicator"Professional MSTI+ Trading Indicator" is a comprehensive technical analysis tool that combines over 20 indicators to generate high-quality trading signals and assess market sentiment. The script integrates standard indicators (MACD, RSI, Bollinger Bands, Stochastic, Simple Moving Averages, and Volume Analysis) with advanced components (Squeeze Momentum, Fisher Transform, True Strength Index, Heikin-Ashi, Laguerre RSI, Hull MA) and further includes metrics such as ADX, Chaikin Money Flow, Williams %R, VWAP, and EMA for in-depth market analysis.
Key Features:
Multiple Presets for Different Trading Styles:
Choose from optimal configurations like Professional, Swing Trading, Day Trading, Scalping, or Reversal Hunter. Note that the presets may not work perfectly on all pairs, and manual calibration might be required. This flexibility allows you to fine-tune the settings to align with your unique strategies and signals.
Multi-Layered Signal Filtering:
Filters based on trend, volume, and volatility help eliminate false signals, enhancing the accuracy of market entries.
Comprehensive Fear & Greed Index:
The indicator aggregates data from RSI, volatility, momentum, trend, and volume to gauge overall market sentiment, providing an additional layer of market context.
Dynamic Information Panel:
Displays detailed status updates for each component (e.g., MACD, RSI, Laguerre RSI, TSI, Fisher Transform, Squeeze, Hull MA, etc.) along with a visual strength bar that represents the intensity of the trading signal.
Signal Generation:
Buy and sell signals are generated when a predefined number of conditions are met and confirmed over multiple bars. These signals are clearly displayed on the chart with arrows, making it easier to spot potential entry and exit points.
Alert Setup:
Built-in alert conditions allow you to receive real-time notifications when trading signals are generated, helping you stay on top of market movements.
"Professional MSTI+ Trading Indicator" is designed to enhance your trading strategy by providing a multi-faceted market analysis and an intuitive visual interface. While the presets offer a robust starting point, they may require manual calibration on certain pairs, giving you the flexibility to configure your own unique strategies and signals.
TP/SL Percentage & RR Visual ToolThis tool is designed to help traders visually and statistically assess their trade setup by calculating Stop Loss (SL), Take Profit (TP), and Risk-to-Reward (RR) based on percentage inputs from the current price.
🔧 How It Works:
Uses the current candle’s close price as your entry.
Calculates TP and SL as percentage-based levels (e.g., 1% SL, 1.5% TP).
Displays horizontal lines and labels on the chart for TP and SL (only on the latest candle to reduce clutter).
Shows a compact table in the top-right corner with all key values:
Entry Price
Current Price
TP Price (+%)
SL Price (-%)
TP Distance from current price
RR Ratio (e.g., 1:1.5)
💡 Use Cases:
Quickly validate if a trade setup meets your desired RR profile (e.g., 1:2).
Perfect for scalpers, swing traders, and position traders who rely on structured risk management.
Combine with your entry signal strategy to visualize targets and stops without manual calculations.
⚙️ Inputs:
Stop Loss % – Sets how far your SL is from the entry.
Take Profit % – Sets how far your TP is from the entry.
QT NY Session High/LowShows Asia & London High/Low which are key liquidity points price will react to.
You can also adjust the NY AM 6am - 12pm EST range to divide the time frames into 4 quarters
It delivers NY AM true open and the true day open
It gives you previous day high & previous day low
2013-2025 EclipsesIndicator Description: 2013-2025 Eclipses
This Pine Script (version 5) indicator overlays solar and lunar eclipse events on a TradingView chart, covering the period from 2013 to 2025. It is designed for traders and astrology enthusiasts who wish to visualize these significant astronomical events alongside price action, potentially identifying correlations with market movements or key turning points.
Features:
Eclipses:
Visualization: Displayed as a semi-transparent aqua background highlight across the chart.
Data: Includes 48 specific eclipse dates (both solar and lunar) from April 25, 2013, to September 21, 2025.
Purpose: Highlights dates of eclipses, which are often considered powerful astrological events associated with sudden changes, revelations, or significant shifts in energy and market sentiment.
Technical Details:
Overlay: The indicator is set to overlay=true, ensuring it displays directly on the price chart rather than in a separate pane.
Date Matching: Utilizes a helper function is_date(y, m, d) to determine if the current chart date matches any of the predefined eclipse dates, using TradingView's year, month, and dayofmonth variables.
Visualization Method:
bgcolor: Applies a light aqua background (using color.new(color.aqua, 85)) on the specific dates of eclipses. The transparency level of 85 allows price action to remain visible through the highlight.
Time Range: Spans from April 2013 to September 2025, covering a 12+ year period of eclipse events.
Usage:
Add the script to your TradingView chart to see eclipse dates highlighted with an aqua background on your chosen symbol and timeframe.
The background highlight appears only on the exact dates of eclipses, making it easy to spot these events amidst price data.
Ideal for those incorporating astrological analysis into trading or studying the potential impact of eclipses on financial markets.
Notes:
The script uses a single-line definition for eclipse_dates to ensure compatibility with Pine Script v5 syntax and avoid line continuation errors.
The aqua color matches the original circle-based visualization, with transparency adjustable via the color.new(color.aqua, 85) parameter (0 = fully opaque, 100 = fully transparent).
Works best on daily or higher timeframes for clear visibility of individual eclipse dates, though it functions on any TradingView-supported timeframe.
Eclipse dates should be cross-checked with astronomical sources for critical applications, as the script relies on the provided data accuracy.
Purpose:
This indicator provides a straightforward way to track eclipses over a 12-year period, offering a visual representation of these potent celestial events. By using a background highlight instead of markers, it maintains chart clarity while emphasizing the specific days when eclipses occur, potentially aiding in the analysis of their influence on market behavior or personal trading strategies.
Breakoutprop Daily Reset# Breakoutprop Daily Reset
This indicator helps Breakoutprop prop firm traders visualize daily reset times on their charts with precision. The indicator draws a vertical line at the exact reset time, making it easy to track when your daily profit/loss calculations will reset.
## What is this indicator for?
Breakoutprop and many other prop firms use a daily reset system where your trading metrics (like maximum drawdown) reset at a specific time each day. This indicator:
- Shows the exact daily reset time with a vertical line on your chart
- Helps you plan your trades around reset times
- Provides clear visual reference for when your daily trading metrics will reset
## Main Features
- **Daily Reset Visualization**: Clear vertical line showing when your daily metrics will reset
- **UTC Time Display**: Time label showing the exact reset time in UTC
- **Customizable Appearance**: Adjust colors, line styles, and transparency to match your chart setup
- **Advanced Customization**: Fully adjustable label positioning, sizes, and color settings
- **Additional Price Line**: Optional feature to mark significant price levels if needed (disabled by default)
## How to Use
### Basic Setup
1. Add the indicator to your chart
2. Set the reset hour and minute to match your Breakoutprop account's daily reset time (default is 00:30 UTC)
3. The indicator will automatically show a vertical line at the next reset time
### Appearance Customization
- Modify colors, line width, and style in the "Appearance Settings" group
- Adjust label settings in the "Label Settings" group
- Use "Compact Mode" to show only the time without additional text
### Additional Features (Optional)
- The indicator includes an optional price line feature that can be enabled if needed
- This is disabled by default but can be activated in the "Price Line Settings" section
## Tips for Breakoutprop Traders
- Set this indicator to match your account's specific reset time (check your Breakoutprop dashboard)
- Use the "Extend Lines" option to see the reset time projected across your entire chart
- Customize the label appearance and position to avoid overlapping with price action
- For night traders, the indicator automatically calculates the next reset time
This indicator is specifically designed for Breakoutprop traders but works with any prop firm that uses daily reset times for tracking trading performance.
Risk-On vs Risk-Off Meter (Pro)Risk-On vs Risk-Off Meter (Pro)
This macro-based tool analyzes capital flows across key assets to gauge overall market risk sentiment. It does not use ES, SPY, or stock data directly—making it a powerful confirmation tool for ES traders looking to align with macro forces.
🔹 Core Idea:
Tracks capital rotation between copper/gold, bonds, dollar, crude oil, VIX, and yield spreads to generate a normalized risk score (0–1). This score reflects whether macro money is flowing into risk or safety.
🔹 Use:
Use this indicator as confirmation of directional bias when scalping or day trading ES.
– Green Zone (>0.75): Risk-On environment. Favor long setups.
– Red Zone (<0.45): Risk-Off. Favor short setups or stand aside.
– Yellow Zone: Neutral, use caution.
– Divergence Alerts: Signals when ES price disagrees with macro risk trend—potential reversals or exhaustion zones.
HOT TO USE
– Combine with your existing price action or order flow signals
– Avoid trading against the macro sentiment unless strong setup
– Use divergence as a heads-up for fading or exiting trades
This gives you a macro-informed lens to validate or filter your entries.
Momentum Charge Theory (MCT)-(TechnoBlooms)The Momentum Charge Theory (MCT) Indicator is an advanced physics and mathematics-inspired trend detection system designed to identify market energy shifts with precision. Unlike traditional indicators that rely on static formulas, MCT integrates entropy, volatility, kinetic energy, and wavelet transforms to map price dynamics in real time.
Built on Scientific Principles – This indicator applies quantum-inspired charge-discharge mechanics to spot early trend formations and reversals. Think of price action like an energy system: it charges (builds momentum) before an explosive move and discharges when that energy dissipates.
Core Concepts Behind MCT
1️⃣ Directional Market Entropy – Measuring Trend Strength
Entropy quantifies market randomness – is the trend structured or chaotic?
✅ A high-entropy market is uncertain (choppy price action), while a low-entropy market signals a strong directional trend.
✅ MCT normalizes entropy, allowing traders to differentiate trend acceleration from market noise.
2️⃣ Information Flow Volatility – Identifying Breakout Zones
Inspired by Econophysics, this component measures volatility based on information flow rather than simple price movements.
✅ Helps spot high-volatility breakout conditions before they occur.
✅ Filters out false breakouts caused by random market noise.
3️⃣ Kinetic Energy Momentum (KEM) – The Physics of Price Acceleration
Just like in physics, momentum is a function of mass and velocity – in trading, this translates to volume and price change.
✅ Uses kinetic energy equations to identify price acceleration zones.
✅ Helps detect momentum shifts before price visibly reacts.
4️⃣ Hilbert Transform Approximation – Slope & Trend Direction Analysis
Applies Hilbert Transforms to estimate trend angle shifts.
✅ Detects momentum decay and early reversal signals.
✅ Captures the true trend slope rather than relying on lagging moving averages.
5️⃣ Wavelet Transform – Advanced Noise Filtering & Trend Confirmation
Market movements contain multiple frequencies – wavelet transforms isolate dominant trends while removing short-term price noise.
✅ Improves trend clarity by reducing false signals.
✅ Acts as a final confirmation filter before generating Charge & Discharge signals.
Charge & Discharge – The Energy Behind Market Moves
🔹 Charge (Uptrend Activation)
A blue triangle appears below the candle when market conditions align for a strong bullish move.
📈 Indicates momentum buildup, low entropy, and trend strength confirmation.
🔸 Discharge (Downtrend Activation)
A purple triangle appears above the candle when price momentum weakens and market entropy increases.
📉 Suggests a potential trend exhaustion or reversal.
Best Use Cases for Traders
✅ Momentum Traders – Catch trend initiations before they gain full traction.
✅ Breakout Traders – Identify high-information flow zones with volatility-driven signals.
✅ Trend Followers – Avoid false signals by relying on entropy-driven confirmations.
The MCT indicator can be combined with any of your usual indicators for trend confirmation.
Inner Circle Toolkit [TakingProphets]Inner Circle Toolkit — A Complete ICT Trading Companion
The Inner Circle Toolkit is a closed-source, all-in-one trading tool designed for traders following ICT (Inner Circle Trader) and Smart Money Concepts strategies. Every part of this script is built with purpose — not just a mashup of indicators, but a structured framework to help you follow price through the lens of institutional behavior and liquidity theory.
Let’s walk through what it does and how it can help you:
🕒 Session Liquidity Levels (Asia, London, New York, NY Lunch)
The indicator automatically marks the highs and lows of the major trading sessions:
-Asian Session
-London Session
-New York AM Session
-New York Lunch
These levels are important because price often returns to these points to grab liquidity before making a move. This gives traders clear areas to watch for potential sweeps, rejections, or reversals — without having to manually track session timings every day.
REQHs and REQLs — Equal Highs and Lows
This script detects Relatively Equal Highs and Lows (REQHs/REQLs), which are often used by institutions as stop-run targets.
It’s not just looking for copy-paste double tops or bottoms — it uses a tolerance-based algorithm that checks for clusters of similar highs or lows over a given time period. These are likely to hold stops and become magnets for price. When you see these on the chart, you’ll know where the “juice” is sitting.
Fair Value Gaps (FVG) — Multi-Timeframe
The script automatically plots Fair Value Gaps (FVGs) on both:
-Your current chart timeframe
-One or more higher timeframes (like H1 or H4)
These are three-candle gaps that form when price moves aggressively without filling in value. Price often comes back to these areas to rebalance. Seeing both local and higher-timeframe FVGs on your chart gives better context and helps with entries and exits.
The script is optimized so your chart doesn’t get messy — higher timeframe FVGs show up in a cleaner format with visual labels and lighter shading.
SMT Divergence — With Session Logic
This tool includes a real-time SMT divergence detector, based on the behavior of correlated markets like ES vs. NQ.
Here’s how it works:
If ES sweeps a liquidity level (like Asia Low), but NQ doesn’t, the script detects and marks that divergence.
This often signals institutional accumulation or distribution — a high-probability setup.
You won’t have to flip between charts or manually compare — the SMT logic runs automatically and only fires when it matters (at key session levels). It’s a smarter, more focused way to track intermarket divergences.
Daily Highs and Lows — Week-to-Week Structure
The indicator keeps track of the high and low for each day of the week — Monday through Friday — helping you understand how price is evolving across the week.
This helps build a weekly profile:
Did Monday set the high of the week?
Are we sweeping Tuesday’s low on Thursday?
These levels stay visible and labeled, helping you frame daily setups inside the bigger picture.
🕛 Midnight Open & 8:30 AM Open Levels
These two levels are core ICT concepts used to judge whether price is in premium or discount:
Midnight Open (00:00 EST): Used to determine daily bias
New York Open (08:30 EST): Often a launch point for key moves
Both are drawn automatically and extend throughout the day. This helps you align your trades with potential algorithmic bias, especially during NY session volatility.
⏰ 9:45 AM Vertical Marker — Macro Time Reminder
The script draws a subtle vertical line at 9:45 AM EST, which is the start of the NY AM macro session — one of the most likely times to see setups play out.
This is more than just a timer — it’s a visual cue that something important might be setting up soon, especially if you’re already watching SMT, FVGs, or liquidity zones from earlier.
How It All Connects — A Workflow, Not a Mashup
Every feature in this script is connected to the same goal: helping you trade with the Smart Money.
Here’s how the pieces work together:
Session levels → potential stop hunts
Equal highs/lows → targets
FVGs → entry points
SMT divergence → confirmation or warning
Daily highs/lows → Weekly structure frames bias
Open levels → premium vs. discount
Macro line → timing clue for execution
It’s built to help you flow with price action and trade the story, not just random signals.
Why It’s Closed Source — and Original
This script is closed-source because it contains:
A proprietary system for real-time SMT logic (with intermarket sweep detection)
Multi-timeframe FVG detection that auto-filters overlaps
Smart equal-high/low detection using range-based clustering
Optimized UI that shows a lot without overwhelming the chart
There are no moving averages, no public-domain indicators, and no mashup of standard tools. Everything here is purpose-built for traders who follow ICT strategies.
Let us know how we can improve!
Profit Trailing BBandsProfit Trailing Trend BBands v4.7.5 with Double Trailing SL
A TradingView Pine Script Strategy
Created by Kevin Bourn and refined with the help of Grok 3 (xAI)
Overview
Welcome to Profit Trailing Trend BBands v4.7.5, a dynamic trading strategy designed to ride trends and lock in profits with a unique double trailing stop-loss mechanism. Built for TradingView’s Pine Script v6, this strategy combines Bollinger Bands for trend detection with a smart trailing system that doubles down on profit protection. Whether you’re trading XRP or any other asset, this tool aims to maximize gains while keeping risk in check—all with a clean, visual interface.
What It Does
Identifies Trends: Uses Bollinger Bands to spot uptrends (price crossing above the upper band) and downtrends (price crossing below the lower band).
Enters Positions: Opens long or short trades based on trend signals, with customizable position sizing and leverage.
Trails Profits: Employs a two-stage trailing stop-loss:
Initial Trailing SL: Acts as a take-profit level, set as a percentage (%) or dollar ($) distance from the entry price.
Tightened Trailing SL: Once the initial profit target is hit, the stop-loss tightens to half the initial distance, locking in gains as the trend continues.
Manages Risk: Includes a margin call feature to exit losing positions before they blow up your account.
Visualizes Everything: Plots Bollinger Bands (blue upper, orange lower) and a red stepped trailing stop-loss line for easy tracking.
Why Built It?
Captures Trends: Bollinger Bands are a proven way to catch momentum, and we tuned them for responsiveness (short length, moderate multiplier).
Secures Profits: Traditional trailing stops often leave money on the table or exit too early. The double trailing SL first takes a chunk of profit, then tightens up to ride the rest of the move.
Stays Flexible: Traders can tweak price sources, stop-loss types (% or $), and position sizing to fit their style.
Looks Good: Clear visuals help you see the strategy in action without cluttering your chart.
Originally refined for XRP, it’s versatile enough for most markets — crypto, forex, stocks, you name it.
How It Works
Core Components
Bollinger Bands:
Calculated using a simple moving average (SMA) and standard deviation.
Default settings: 6-period length, 1.66 multiplier.
Upper Band (blue): SMA + (1.66 × StdDev).
Lower Band (orange): SMA - (1.66 × StdDev).
Trend signals: Price crossing above the upper band triggers a long, below the lower band triggers a short.
Double Trailing Stop-Loss:
Initial SL: Set via "Trailing Stop-Loss Value" (default 6% or $6). Trails the price at this distance and doubles as the first profit target.
Tightened SL: Once price hits the initial SL distance in profit (e.g., +6%), the SL tightens to half (e.g., 3%) and continues trailing, locking in gains.
Visualized as a red stepped line, only visible during active positions.
Position Sizing:
Choose "% of Equity" (default 30%) or "Amount in $" to set trade size.
Leverage (default 10x) amplifies positions, capped by available equity to avoid overexposure.
Margin Call:
Exits positions if drawdown exceeds the "Margin %" (default 10%) to protect your account.
Backtesting Filter:
Starts trading after a user-defined date (default: Jan 1, 2020) for focused historical analysis.
Trade Logic
Long Entry: Price crosses above the upper Bollinger Band → Closes any short position, opens a long.
Short Entry: Price crosses below the lower Bollinger Band → Closes any long position, opens a short.
Exit: Position closes when price hits the trailing stop-loss or triggers a margin call.
How to Use It
Setup
Add to TradingView:
Open TradingView, go to the Pine Editor, paste the script, and click "Add to Chart."
Ensure you’re using Pine Script v6 (the script includes @version=6).
Configure Inputs:
Start Date for Backtesting: Set the date to begin historical testing (default: Jan 1, 2020).
BB Length & Mult: Adjust Bollinger Band sensitivity (default: 6, 1.66).
BB Price Source: Choose the price for BBands (default: Close).
Trend Price Source: Choose the price for trend detection (default: Close).
Trailing Stop-Loss Type: Pick "%" or "$" (default: Trailing SL %).
Trailing Stop-Loss Value: Set the initial SL distance (default: 6).
Margin %: Define the max drawdown before exit (default: 10%).
Order Size Type & Value: Set position size as % of equity (default: 30%) or $ amount.
Leverage: Adjust leverage (default: 10x).
Run It:
Use the Strategy Tester tab to backtest on your chosen asset and timeframe.
Watch the chart for blue/orange Bollinger Bands and the red trailing SL line.
Tips for Traders
Timeframes: Works on any timeframe, but test 1H or 4H for XRP—great balance of signals and noise.
Assets: Optimized for XRP, but tweak slValue and mult for other markets (e.g., tighter SL for low-volatility pairs).
Risk Management: Keep marginPercent low (5-10%) for volatile assets; adjust leverage based on your risk tolerance.
Visuals: The red stepped SL line shows only during trades—zoom in to see its tightening in action.
Visuals on the Chart
Blue Line: Upper Bollinger Band (trend entry for longs).
Orange Line: Lower Bollinger Band (trend entry for shorts).
Red Stepped Line: Trailing Stop-Loss (shifts tighter after the first profit target).
Order Labels: Short tags like "OL" (Open Long), "CS" (Close Short), "LSL" (Long Stop-Loss), etc., mark trades.
Disclaimer
Trading involves risk. This strategy is for educational and experimental use—backtest thoroughly and use at your own risk. Past performance doesn’t guarantee future results. Not financial advice—just a tool from traders, for traders.
VNIndex Over 6.5% Downside Drop Indicator with TableOverview: The VNIndex 6.5% Downside Drop Indicator is a powerful tool designed to help traders and investors identify significant market drops on the VNIndex (or any other asset) based on a 6.5% downside threshold. This Pine Script® indicator automatically detects when the price of an asset drops by more than 6.5% within a single day, and visually marks those events on the chart.
Key Features:
6.5% Downside Drop Detection: Automatically calculates the daily percentage drop and identifies when the price falls by more than 6.5%.
Table Display: Displays the dates and corresponding percentage drops of all identified instances in a convenient table at the bottom right of the chart.
Markers: Red down-pointing markers are plotted above bars where the price drop exceeds the 6.5% threshold, making it easy to spot critical drop events at a glance.
Easy-to-Read Table: The table lists the date and drop percentage, updating dynamically as new drops are detected. This allows for easy tracking of significant downside moves over time.
How to Use:
Install the Script: Add this indicator to your TradingView chart.
Monitor Price Drops: The indicator will automatically detect when the price drops by over 6.5% from the previous close and display a marker on the chart and the table in the bottom right corner.
View the Table: The table displays the date and the percentage drop of each detected event, making it easy to track past significant moves.
Alerts: You can set an alert for 6.5% drops to receive notifications in real-time.
Customization Options:
The drop percentage threshold (6.5%) can be adjusted in the script to fit other market conditions or assets.
The table can be resized or styled based on user preference for better visibility.
Why Use This Indicator? This indicator is perfect for traders looking to spot large, significant price movements quickly. Large downside drops can signal potential market reversals or trading opportunities, and this tool helps you track such events effortlessly. Whether you're monitoring the VNIndex or any other asset, this indicator provides crucial insights into volatile price action, helping you make more informed decisions.
Open Source License: This indicator is open source and free to use under the Mozilla Public License 2.0. You are welcome to modify, distribute, and contribute to the project.
Contributions: Feel free to contribute improvements, fixes, or new features by creating a pull request. Let’s collaborate to make this indicator even better for the community!
Math by Thomas FVG📌 Math by Thomas FVG – Fair Value Gap Detector
Overview:
The Math by Thomas FVG indicator automatically detects Fair Value Gaps (FVGs) using a three-candle logic. FVGs represent price inefficiencies where the first candle’s high/low does not overlap with the third candle’s low/high, creating a gap. This tool helps traders identify potential reversal or continuation zones, providing valuable insights into market structure and price action.
🔹 How It Works:
Bullish FVG:
Occurs when the current candle’s low is above the high of the candle two bars ago.
A green-shaded box marks the bullish FVG, highlighting a potential support zone.
Bearish FVG:
Occurs when the current candle’s high is below the low of the candle two bars ago.
A red-shaded box marks the bearish FVG, indicating a potential resistance zone.
Gap Filling Logic:
The indicator automatically removes FVGs once they are filled by price action, keeping the chart clean and relevant.
Bullish FVGs are removed when close ≤ the box's top.
Bearish FVGs are removed when close ≥ the box's bottom.
⚙️ Customization Options:
Bullish FVG Color: Choose the color for bullish FVGs.
Bearish FVG Color: Choose the color for bearish FVGs.
Max Box Count: The indicator dynamically manages up to 50 FVG boxes, ensuring optimal chart performance.
✅ Use Cases:
Identify price inefficiencies for potential entries and exits.
Combine with Order Blocks, support/resistance, or volume analysis for confirmation.
Useful for Smart Money Concept (SMC) and price action traders.
🔥 Enhance your trading accuracy with the Math by Thomas FVG indicator and gain insights into price inefficiencies! 🚀
Math by Thomas Order Blocks🔥 Description:
🚀 Math by Thomas Order Blocks is a precision tool for Smart Money Concept (SMC) and price action traders, designed to automatically detect Bullish and Bearish Order Blocks (OBs). It highlights key institutional trading zones where large orders are placed, helping you identify potential reversal and continuation areas.
⚙️ Key Features:
✅ Automatic Order Block Detection:
Detects Bearish OBs when price sharply reverses after a significant bullish move.
Identifies Bullish OBs following a sharp reversal from a bearish push.
✅ Dynamic Sensitivity & Volume Filter:
Sensitivity Control: Customize OB detection precision.
Minimum Volume Filter: Ensures OBs form only on significant volume spikes.
✅ Flexible OB Mitigation:
Choose between "Close" or "Wick" mitigation for OB invalidation.
Mitigated OBs are automatically removed from the chart.
✅ Adaptive Swing & Price Change Detection:
Adjusts OB detection logic based on timeframe for flexibility.
Uses adaptive rate of change (ROC) calculations to spot momentum shifts.
✅ Visual Customization:
OBs are displayed as shaded boxes with configurable background and border colors.
Bullish OBs = Green (support zones).
Bearish OBs = Red (resistance zones).
✅ Alerts for OB Touch:
Get real-time alerts when price touches a Bullish or Bearish OB.
Helps you catch potential reversal points without constant chart monitoring.
📊 How It Works:
Bullish OB Logic:
Detected when price crosses over a positive momentum threshold (ROC) with high volume.
Plots a green OB box from the low of the swing candle.
Bearish OB Logic:
Identified when price crosses under a negative momentum threshold with high volume.
Plots a red OB box from the high of the swing candle.
Mitigation Rules:
OBs are removed once invalidated by price action based on your chosen mitigation type (Close or Wick).
📈 Usage Tips:
Use Bullish OBs as potential support areas for buy entries.
Treat Bearish OBs as resistance zones for sell setups.
Combine with Fair Value Gaps, volume profile, and RSI for confluence.
Adjust sensitivity and volume filters to fine-tune OB detection.
✅ Chart Example:
The script displays:
Bullish OBs in green, marking potential support zones.
Bearish OBs in red, indicating resistance zones.
Real-time alerts when price touches OBs.
🔥 Why Use This Indicator?
Designed for intraday and swing traders aiming to identify institutional trading zones.
Helps you spot reversal and continuation setups with precision.
Ideal for Smart Money Concept (SMC), price action, and order flow traders.
Manual Trade Ledger# Manual Options Trade Journal – Pine Script
This project is a Pine Script implementation for TradingView that allows users to manually log options trades into a live table overlay on a chart.
## ✨ Features
- 📥 Manual entry of ticker, premium, contracts, strike, expiry, notes
- 📈 Auto-filled live data: timestamp, price, and % change since first log
- 🧾 Tabular logging for trade journaling and exporting to Google Sheets
- 🔧 Fully customizable and designed to support product experimentation
## 🎯 Use Case
This project was built to support a real-world trading workflow for options traders who:
- Prefer to manually log trades while watching charts
- Want a visual, copyable ledger that evolves in real-time
- Want to later analyze entries/exits in spreadsheets or dashboards
## 🛠 How It Works
1. Toggle the `Log Trade` switch inside TradingView’s indicator settings
2. Fill in your trade metadata (ticker, premium, etc.)
3. The script captures timestamp, price, and calculates % change
4. Each new trade adds a row to the table (up to 50 max)
My Bar IndexA simple script to display bar index at the bottom of the chart. It will be a handy tool for those who like to do bar counts.
Signal Indicator + SAR + 30min Trend Background🔹 BTC/USD 3-Minute Trend Signal Indicator + SAR + 30-Minute Background Trend
📌 Overview
This indicator is designed for high-precision BTC/USD trading on the 3-minute timeframe. It integrates multiple trend confirmation tools to improve signal accuracy, reduce false entries, and help traders align with higher timeframe trends.
⚡ Key Features & Enhancements
✅ Multi-Timeframe Trend Confirmation:
Uses 3-minute EMA trend filter + 30-minute EMA confirmation.
Background color changes dynamically based on 30-minute trend.
✅ Smart Parabolic SAR Filter (Optional):
Reduces false signals with an adjustable confirmation delay.
Helps avoid premature exits in strong trends.
✅ Momentum & Trend Strength Analysis:
Uses MACD for directional confirmation.
RSI filtering to avoid overbought/oversold conditions.
ADX filter ensures trades are taken in strong trends.
✅ Breakout Confirmation & Heikin-Ashi Filtering:
Detects breakouts from key resistance & support levels.
Uses Heikin-Ashi candle trend confirmation for smoother signals.
✅ Bollinger Bands Trend Validation:
Filters trades based on price position relative to Bollinger Bands.
Avoids choppy market conditions.
✅ Session Time Filtering:
Limits trades to high-liquidity trading hours (9 AM - 8 PM UTC).
✅ BUY/SELL Alerts & Labels:
Displays BUY/SELL labels on the chart when conditions are met.
TradingView Alerts for automated bot integration.
🛠️ How It Works
1️⃣ Trend Confirmation
Short-term (3-min) trend: Calculated using EMA(20).
Higher timeframe (30-min) trend: Acts as a filter (optional background color).
Valid BUY/SELL signals must align with the higher timeframe trend.
2️⃣ Entry Signals (BUY & SELL Conditions)
🚀 BUY Signal
Price breaks above resistance (last 20 candles).
MACD bullish crossover.
EMA Trend + Higher TF EMA confirms uptrend.
Bollinger Bands validation (trading above mid-band).
SAR confirms uptrend (optional).
Heikin-Ashi trend aligns bullish.
ADX > 20 (ensures strong trend).
Time filter active (9 AM - 8 PM UTC).
🔻 SELL Signal
Price breaks below support (last 20 candles).
MACD bearish crossover.
EMA Trend + Higher TF EMA confirms downtrend.
Bollinger Bands validation (trading below mid-band).
SAR confirms downtrend (optional).
Heikin-Ashi trend aligns bearish.
ADX > 20 (ensures strong trend).
Time filter active (9 AM - 8 PM UTC).
3️⃣ Alerts & Labels
BUY alert triggers 🚀 when all conditions align.
SELL alert triggers 🔻 when all conditions align.
Labels appear on the chart to indicate signals.
⚙️ Customization & Settings
🔧 User-Configurable Options:
Parabolic SAR filter (optional).
SAR confirmation delay (prevents false exits).
Background trend color from 30-min timeframe.
Adjustable background opacity for better visibility.
Trading session filter (to avoid low-volume periods).
📊 Best Use Cases
✅ Scalping BTC/USD on a 3-minute chart.
✅ Trend-following strategy with multiple confirmations.
✅ Reducing false signals with multi-indicator validation.
✅ Automated trading (TradingView alerts integration).
⚠️ Disclaimer
📌 This indicator is for educational purposes only and should not be considered financial advice.
📌 Always backtest and validate the strategy before using it for live trading.
📌 Past performance does not guarantee future results.
💬 How to Use?
1️⃣ Add the indicator to your 3-minute BTC/USD chart.
2️⃣ Enable/disable filters based on your trading style.
3️⃣ Set alerts for automated notifications.
4️⃣ Follow trend confirmations before entering trades.
Rubotics TDI Top/Bottom Indicator**Rubotics TDI Top/Bottom Indicator (Rubots TDI T/B)**
This proprietary indicator integrates several technical analysis tools into one cohesive system to help traders identify potential top and bottom signals directly on the price chart. Unlike standard indicators that merely plot common metrics, this script uniquely fuses a custom moving average algorithm with established oscillators to enhance signal clarity and market timing.
**Core Components and Unique Features:**
- **Global Visual Settings:**
- Easily toggle visual elements (tables, background highlights) that display key metrics and trading setup information.
- Provides a detailed on-chart display of strategy data and essential trading parameters.
- **MAVW Calculation (Proprietary):**
- Computes a series of weighted moving averages using Fibonacci-inspired lengths (3, 5, 8, 13, 21, 34) to generate a dynamic moving average (MAVW).
- The MAVW line is color-coded—blue when trending upward, red when trending downward, and yellow when neutral—to offer an immediate visual cue of market direction.
- **RSI Module:**
- Calculates the RSI on a user-selected price source (default: close) with a customizable period (default: 14).
- Adjustable thresholds (default: 45 and 55) allow for fine-tuning of overbought and oversold conditions.
- **TDI Component:**
- Adapts the RSI into a dynamic channel using a simple moving average and a scaled standard deviation (multiplied by 1.6185) to form upper and lower bands.
- Incorporates both fast and slow moving averages (default periods: 2 and 7) with optional band filling to visually highlight momentum changes.
- **Note:** The TDI logic is based on public methodologies for converting RSI data into a dynamic indicator.
- **WaveTrend Oscillator:**
- Uses configurable channel and smoothing parameters to generate a WaveTrend line for additional momentum confirmation.
- The oscillator is used to further validate top and bottom signals by identifying overbought or oversold conditions.
- **Note:** The WaveTrend calculations are derived from widely available, public-domain techniques.
- **Signal Generation:**
- **Buy Signal:** Generated when the RSI is below its lower threshold, the TDI fast MA crosses above the lower band (with prior bar confirmation), the price is below the MAVW, and the WaveTrend indicates oversold conditions.
- **Sell Signal:** Generated when the RSI is above its upper threshold, the TDI fast MA crosses below the upper band (with prior bar confirmation), the price is above the MAVW, and the WaveTrend signals overbought conditions.
- Signals are visually marked on the chart with upward and downward triangles and accompanied by alert conditions.
- **Volume-Based Bar Coloring & Additional Visuals:**
- Colors price bars based on volume relative to a moving average to highlight the strength of moves.
- Provides background color changes and a dynamic table of key metric values (MAVW, RSI, TDI bands, WaveTrend) for real-time analysis.
**Customization and Originality:**
- Extensive input parameters allow traders to adjust each component to suit their trading style and market conditions.
- The unique combination of the proprietary MAVW calculation with traditional RSI, TDI, and WaveTrend elements creates a robust system for detecting market tops and bottoms.
- **Closed-Source Justification:**
This indicator is published as a closed-source script due to the proprietary enhancements integrated into the MAVW algorithm and signal generation logic. These unique modifications provide added value beyond standard public indicators.
EMA Shakeout DetectorEMA Shakeout & Reclaim Zones
Description:
This Pine Script helps traders quickly identify potential shakeout entries based on price action and volume dynamics. Shakeouts often signal strong accumulation, where institutions drive the stock below a key moving average before reclaiming it, creating an opportunity for traders to enter at favorable prices.
How It Works:
1. Volume Surge Filtering:
a. Computes the 51-day Simple Moving Average (SMA) of volume.
b. Identifies days where volume surged 2x above the 51-day average.
c. Filters stocks that had at least two such high-volume days in the last 21 trading days (configurable).
2. Stock Selection Criteria:
a. The stock must be within 25% of its 52-week high.
b. It should have rallied at least 30% from its 52-week low.
Shakeout Conditions:
1. The stock must be trading above the 51-day EMA before the shakeout.
2. A sudden price drop of more than 10% occurs, pushing the stock below the 51-day EMA.
3. A key index (e.g., Nifty 50, S&P 500) must be trading above its 10-day EMA, ensuring overall market strength.
Visualization:
Shakeout zones are highlighted in blue, making it easier to spot potential accumulation areas and study price & volume action in more detail.
This script is ideal for traders looking to identify institutional shakeouts and gain an edge by recognizing high-probability reversal setups.
Advanced HFT Detection with VWAP & SpreadsExplanation of the HFT Detection Strategy
🔹 1. Key Indicators Used in the Strategy
It's works by combining VWAP, moving averages (SMA), volume spikes, and price jumps to detect potential HFT activity.
✅ (A) VWAP (Volume Weighted Average Price)
VWAP acts as a benchmark price that professional traders and institutions use to execute large orders.
If price is above VWAP, buyers are in control → Bullish trend
If price is below VWAP, sellers are in control → Bearish trend
HFT algorithms often place buy orders above VWAP and sell orders below VWAP to follow momentum.
➡️ Why VWAP? It ensures that signals follow the institutional trading trend.
✅ (B) Moving Averages (SMA)
Moving averages smooth out price data and help in detecting short-term momentum changes.
Fast Moving Average (5-period SMA): Reacts quickly to price changes
Slow Moving Average (20-period SMA): Identifies trend direction
➡️ Why SMA? It filters noise and confirms short-term trend shifts.
✅ (C) Volume Spike Detection
High-frequency trading is often accompanied by large volume surges. We define a volume spike as:
📌 Current Volume > 2× Average Volume of last 20 bars
➡️ Why Volume? HFTs execute rapid buy/sell orders when they detect liquidity, leading to sudden volume bursts.
✅ (D) Price Jump Detection (Sudden Volatility)
HFT algorithms often exploit quick price movements. We check if the price has moved more than twice the ATR (Average True Range) in the last 5 bars.
➡️ Why ATR? It helps to detect abnormal price movements compared to normal volatility.
🔹 2. Trading Signal Logic
Now that we have VWAP, moving averages, volume, and price movement filters, we generate buy and sell signals based on conditions.
✅ (A) Buy Signal Condition
A BUY signal is triggered when:
✔ Fast SMA crosses above Slow SMA → Short-term trend is turning bullish
✔ Volume spike occurs → HFTs are active
✔ Sudden price jump detected → High volatility
✔ Price is above VWAP → Confirms bullish trend
➡️ Why this works? It confirms that institutional traders & HFTs are buying aggressively.
✅ (B) Sell Signal Condition
A SELL signal is triggered when:
✔ Fast SMA crosses below Slow SMA → Short-term trend is turning bearish
✔ Volume spike occurs → HFTs are selling aggressively
✔ Sudden price drop detected → High volatility
✔ Price is below VWAP → Confirms bearish trend
➡️ Why this works? It confirms that institutional traders & HFTs are selling aggressively.
🔹 3. Visual Representation (Plotting Signals & VWAP)
Once we detect buy and sell signals, we mark them on the chart.
✅ (A) Buy/Sell Markers
🟢 Buy → Green upward arrow below the candle
🔴 Sell → Red downward arrow above the candle
✅ (B) VWAP Line on Chart
We also plot VWAP as a blue line to visualize trend direction.
✅ (C) Highlighting Volume Spikes
To easily spot HFT activity, we highlight volume spike bars with a blue background.
🔹 4. How to Use This Strategy?
1️⃣ Apply this script on a 1-minute or 5-minute intraday chart.
2️⃣ Look for BUY signals above VWAP and SELL signals below VWAP.
3️⃣ Verify that the volume spikes before taking action.
4️⃣ Use stop-loss & risk management (e.g., stop-loss at recent low/high).
🚀 Summary: Why This Strategy Works?
✅ VWAP ensures we follow institutional traders
✅ Volume spikes confirm sudden liquidity inflows
✅ Price jumps detect fast market moves caused by HFT bots
✅ Moving averages smooth out short-term trend shifts
Financial Conditions Indicator (FCI)The Financial Conditions Indicator (FCI) is a composite tool designed to help traders evaluate the tightness or looseness of financial conditions in the U.S. market. It aggregates four key metrics—VIX (stock market volatility), high-yield bond spreads (proxied by HYG), corporate bond spreads (proxied by LQD), and Treasury market volatility (proxied by MOVE)—into a single Z-score-based index. This indicator provides a visual representation of market stress and can assist in analyzing potential economic and asset price trends.
Key Features:
Composite Z-Score: Combines standardized Z-scores of VIX, HYG, LQD, and MOVE into a unified measure of financial conditions.
Color-Coded Output: Plots in red when conditions are tight (Z-score > 0) and green when conditions are loose (Z-score < 0).
10-Day EMA Overlay: Includes a 10-day exponential moving average (EMA) of the composite Z-score to highlight short-term trends.
Customizable Parameters: Allows users to adjust the Z-score lookback period and EMA length for flexibility.
How to Use:
Add to Chart: Find "Financial Conditions Indicator (FCI)" in the Indicators menu and apply it to your chart.
Customize Settings (Optional):
Lookback Period (Days) : Sets the period for Z-score calculations (default: 160 days).
EMA Length (Days) : Adjusts the EMA period (default: 10 days).
Interpret the Results:
Red Line (Z-Score > 0): Indicates tight financial conditions, often tied to higher volatility and wider credit spreads.
Green Line (Z-Score < 0): Suggests loose conditions, typically associated with lower volatility and tighter spreads.
Yellow Line (10-Day EMA): Tracks the short-term direction of financial conditions; crossovers with the Z-score may signal shifts.
Applications:
Monitor market stress levels to anticipate volatility or asset price movements.
Use as a risk management tool for adjusting exposure in risk-on/risk-off strategies.
Analyze potential economic turning points based on financial condition trends.
Data Dependency: Requires at least 160 days of historical data (or the selected lookback period) for accurate Z-score computation.
U.S.-Centric Design: Tailored to U.S. financial markets; applicability to other regions may vary.
Supplementary Tool: Best used with other analysis methods, not as a standalone trading signal.
Example Scenarios:
Tight Conditions (Red Plot) : A rising FCI above 0 might warn of increasing market stress, potentially signaling a pullback in equities or a spike in volatility. Traders could reduce risk exposure.
Loose Conditions (Green Plot) : A falling FCI below 0 may indicate favorable conditions for risk assets, suggesting opportunities to increase equity or high-yield exposure.
EMA Signals : A Z-score crossing above the EMA could hint at worsening conditions, while a cross below might suggest improvement.
Note : This indicator is provided for informational purposes only and does not offer financial advice. Users should perform their own analysis and consider multiple factors before trading.
Fibonacci Circle Zones🟩 The Fibonacci Circle Zones indicator is a technical visualization tool, building upon the concept of traditional Fibonacci circles. It provides configurable options for analyzing geometric relationships between price and time, used to identify potential support and resistance zones derived from circle-based projections. The indicator constructs these Fibonacci circles based on two user-selected anchor points (Point A and Point B), which define the foundational price range and time duration for the geometric analysis.
Key features include multiple mathematical Circle Formulas for radius scaling and several options for defining the circle's center point, enabling exploration of complex, non-linear geometric relationships between price and time distinct from traditional linear Fibonacci analysis. Available formulas incorporate various mathematical constants (π, e, φ variants, Silver Ratio) alongside traditional Fibonacci ratios, facilitating investigation into different scaling hypotheses. Furthermore, selecting the Center point relative to the A-B anchors allows these circular time-price patterns to be constructed and analyzed from different geometric perspectives. Analysis can be further tailored through detailed customization of up to 12 Fibonacci levels, including their mathematical values, colors, and visibility..
📚 THEORY and CONCEPT 📚
Fibonacci circles represent an application of Fibonacci principles within technical analysis, extending beyond typical horizontal price levels by incorporating the dimension of time. These geometric constructions traditionally use numerical proportions, often derived from the Fibonacci sequence, to project potential zones of price-time interaction, such as support or resistance. A theoretical understanding of such geometric tools involves considering several core components: the significance of the chosen geometric origin or center point , the mathematical principles governing the proportional scaling of successive radii, and the fundamental calculation considerations (like chart scale adjustments and base radius definitions) that influence the resulting geometry and ensure its accurate representation.
⨀ Circle Center ⨀
The traditional construction methodology for Fibonacci circles begins with the selection of two significant anchor points on the chart, usually representing a key price swing, such as a swing low (Point A) and a subsequent swing high (Point B), or vice versa. This defined segment establishes the primary vector—representing both the price range and the time duration of that specific market move. From these two points, a base distance or radius is derived (this calculation can vary, sometimes using the vertical price distance, the time duration, or the diagonal distance). A center point for the circles is then typically established, often at the midpoint (time and price) between points A and B, or sometimes anchored directly at point B.
Concentric circles are then projected outwards from this center point. The radii of these successive circles are calculated by multiplying the base distance by key Fibonacci ratios and other standard proportions. The underlying concept posits that markets may exhibit harmonic relationships or cyclical behavior that adheres to these proportions, suggesting these expanding geometric zones could highlight areas where future price movements might decelerate, reverse, or find equilibrium, reflecting a potential proportional resonance with the initial defining swing in both price and time.
The Fibonacci Circle Zones indicator enhances traditional Fibonacci circle construction by offering greater analytical depth and flexibility: it addresses the origin point of the circles: instead of being limited to common definitions like the midpoint or endpoint B, this indicator provides a selection of distinct center point calculations relative to the initial A-B swing. The underlying idea is that the geometric source from which harmonic projections emanate might vary depending on the market structure being analyzed. This flexibility allows for experimentation with different center points (derived algorithmically from the A, B, and midpoint coordinates), facilitating exploration of how price interacts with circular zones anchored from various perspectives within the defining swing.
Potential Center Points Setup : This view shows the anchor points A and B , defined by the user, which form the basis of the calculations. The indicator dynamically calculates various potential Center points ( C through N , and X ) based on the A-B structure, representing different geometric origins available for selection in the settings.
Point X holds particular significance as it represents the calculated midpoint (in both time and price) between A and B. This 'X' point corresponds to the default 'Auto' center setting upon initial application of the indicator and aligns with the centering logic used in TradingView's standard Fibonacci Circle tool, offering a familiar starting point.
The other potential center points allow for exploring circles originating from different geometric anchors relative to the A-B structure. While detailing the precise calculation for each is beyond the scope of this overview, they can be broadly categorized: points C through H are derived from relationships primarily within the A-B time/price range, whereas points I through N represent centers projected beyond point B, extrapolating the A-B geometry. Point J, for example, is calculated as a reflection of the A-X midpoint projected beyond B. This variety provides a rich set of options for analyzing circle patterns originating from historical, midpoint, and extrapolated future anchor perspectives.
Default Settings (Center X, FibCircle) : Using the default Center X (calculated midpoint) with the default FibCircle . Although circles begin plotting only after Point B is established, their curvature shows they are geometrically centered on X. This configuration matches the standard TradingView Fib Circle tool, providing a baseline.
Centering on Endpoint B : Using Point B, the user-defined end of the swing, as the Center . This anchors the circular projections directly to the swing's termination point. Unlike centering on the midpoint (X) or start point (A), this focuses the analysis on geometric expansion originating precisely from the conclusion of the measured A-B move.
Projected Center J : Using the projected Point J as the Center . Its position is calculated based on the A-B swing (conceptually, it represents a forward projection related to the A-X midpoint relationship) and is located chronologically beyond Point B. This type of forward projection often allows complete circles to be visualized as price develops into the corresponding time zone.
Time Symmetry Projection (Center L) : Uses the projected Point L as the Center . It is located at the price level of the start point (A), projected forward in time from B by the full duration of the A-B swing . This perspective focuses analysis on temporal symmetry , exploring geometric expansions from a point representing a full time cycle completion anchored back at the swing's origin price level.
⭕ Circle Formula
Beyond the center point , the expansion of the projected circles is determined by the selected Circle Formula . This setting provides different mathematical methods, or scaling options , for scaling the circle radii. Each option applies a distinct mathematical constant or relationship to the base radius derived from the A-B swing, allowing for exploration of various geometric proportions.
eScaled
Mathematical Basis: Scales the radius by Euler's number ( e ≈ 2.718), the base of natural logarithms. This constant appears frequently in processes involving continuous growth or decay.
Enables investigation of market geometry scaled by e , exploring relationships potentially based on natural exponential growth applied to time-price circles, potentially relevant for analyzing phases of accelerating momentum or volatility expansion.
FibCircle
Mathematical Basis: Scales the radius to align with TradingView’s built-in Fibonacci Circle Tool.
Provides a baseline circle size, potentially emulating scaling used in standard drawing tools, serving as a reference point for comparison with other options.
GoldenFib
Mathematical Basis: Scales the radius by the Golden Ratio (φ ≈ 1.618).
Explores the fundamental Golden Ratio proportion, central to Fibonacci analysis, applied directly to circular time-price geometry, potentially highlighting zones reflecting harmonic expansion or retracement patterns often associated with φ.
GoldenContour
Mathematical Basis: Scales the radius by a factor derived from Golden Ratio geometry (√(1 + φ²) / 2 ≈ 0.951). It represents a specific geometric relationship derived from φ.
Allows analysis using proportions linked to the geometry of the Golden Rectangle, scaled to produce circles very close to the initial base radius. This explores structural relationships often associated with natural balance or proportionality observed in Golden Ratio constructions.
SilverRatio
Mathematical Basis: Scales the radius by the Silver Ratio (1 + √2 ≈ 2.414). The Silver Ratio governs relationships in specific regular polygons and recursive sequences.
Allows exploration using the proportions of the Silver Ratio, offering a significant expansion factor based on another fundamental metallic mean for comparison with φ-based methods.
PhiDecay
Mathematical Basis: Scales the radius by φ raised to the power of -φ (φ⁻ᵠ ≈ 0.53). This unique exponentiation explores a less common, non-linear transformation involving φ.
Explores market geometry scaled by this specific phi-derived factor which is significantly less than 1.0, offering a distinct contractile proportion for analysis, potentially relevant for identifying zones related to consolidation phases or decaying momentum.
PhiSquared
Mathematical Basis: Scales the radius by φ squared, normalized by dividing by 3 (φ² / 3 ≈ 0.873).
Enables investigation of patterns related to the φ² relationship (a key Fibonacci extension concept), visualized at a scale just below 1.0 due to normalization. This scaling explores projections commonly associated with significant trend extension targets in linear Fibonacci analysis, adapted here for circular geometry.
PiScaled
Mathematical Basis: Scales the radius by Pi (π ≈ 3.141).
Explores direct scaling by the fundamental circle constant (π), investigating proportions inherent to circular geometry within the market's time-price structure, potentially highlighting areas related to natural market cycles, rotational symmetry, or full-cycle completions.
PlasticNumber
Mathematical Basis: Scales the radius by the Plastic Number (approx 1.3247), the third metallic mean. Like φ and the Silver Ratio, it is the solution to a specific cubic equation and relates to certain geometric forms.
Introduces another distinct fundamental mathematical constant for geometric exploration, comparing market proportions to those potentially governed by the Plastic Number.
SilverFib
Mathematical Basis: Scales the radius by the reciprocal Golden Ratio (1/φ ≈ 0.618).
Explores proportions directly related to the core 0.618 Fibonacci ratio, fundamental within Fibonacci-based geometric analysis, often significant for identifying primary retracement levels or corrective wave structures within a trend.
Unscaled
Mathematical Basis: No scaling applied.
Provides the base circle defined by points A/B and the Center setting without any additional mathematical scaling, serving as a pure geometric reference based on the A-B structure.
🧪 Advanced Calculation Settings
Two advanced settings allow further refinement of the circle calculations: matching the chart's scale and defining how the base radius is calculated from the A-B swing.
The Chart Scale setting ensures geometric accuracy by aligning circle calculations with the chart's vertical axis display. Price charts can use either a standard (linear) or logarithmic scale, where vertical distances represent price changes differently. The setting offers two options:
Standard : Select this option when the price chart's vertical axis is set to a standard linear scale.
Logarithmic : It is necessary to select this option if the price chart's vertical axis is set to a logarithmic scale. Doing so ensures the indicator adjusts its calculations to maintain correct geometric proportions relative to the visual price action on the log-scaled chart.
The Radius Calc setting determines how the fundamental base radius is derived from the A-B swing, offering two primary options:
Auto : This is the default setting and represents the traditional method for radius calculation. This method bases the radius calculation on the vertical price range of the A-B swing, focusing the geometry on the price amplitude.
Geometric : This setting provides an alternative calculation method, determining the base radius from the diagonal distance between Point A and Point B. It considers both the price change and the time duration relative to the chart's aspect ratio, defining the radius based on the overall magnitude of the A-B price-time vector.
This choice allows the resulting circle geometry to be based either purely on the swing's vertical price range ( Auto ) or on its combined price-time movement ( Geometric ).
🖼️ CHART EXAMPLES 🖼️
Default Behavior (X Center, FibCircle Formula) : This configuration uses the midpoint ( Center X) and the FibCircle scaling Formula , representing the indicator's effective default setup when 'Auto' is selected for both options initially. This is designed to match the output of the standard TradingView Fibonacci Circle drawing tool.
Center B with Unscaled Formula : This example shows the indicator applied to an uptrend with the Center set to Point B and the Circle Formula set to Unscaled . This configuration projects the defined levels (0.236, 0.382, etc.) as arcs originating directly from the swing's termination point (B) without applying any additional mathematical scaling from the formulas.
Visualization with Projected Center J : Here, circles are centered on the projected point J, calculated from the A-B structure but located forward in time from point B. Notice how using this forward-projected origin allows complete inner circles to be drawn once price action develops into that zone, providing a distinct visual representation of the expanding geometric field compared to using earlier anchor points. ( Unscaled formula used in this example).
PhiSquared Scaling from Endpoint B : The PhiSquared scaling Formula applied from the user-defined swing endpoint (Point B). Radii expand based on a normalized relationship with φ² (the square of the Golden Ratio), creating a unique geometric structure and spacing between the circle levels compared to other formulas like Unscaled or GoldenFib .
Centering on Swing Origin (Point A) : Illustrates using Point A, the user-defined start of the swing, as the circle Center . Note the significantly larger scale and wider spacing of the resulting circles. This difference occurs because centering on the swing's origin (A) typically leads to a larger base radius calculation compared to using the midpoint (X) or endpoint (B). ( Unscaled formula used).
Center Point D : Point D, dynamically calculated from the A-B swing, is used as the origin ( Center =D). It is specifically located at the price level of the swing's start point (A) occurring precisely at the time coordinate of the swing's end point (B). This offers a unique perspective, anchoring the geometric expansion to the initial price level at the exact moment the defining swing concludes. ( Unscaled formula shown).
Center Point G : Point G, also dynamically calculated from the A-B swing, is used as the origin ( Center =G). It is located at the price level of the swing's endpoint (B) occurring at the time coordinate of the start point (A). This provides the complementary perspective to Point D, anchoring the geometric expansion to the final price level achieved but originating from the moment the swing began . As observed in the example, using Point G typically results in very wide circle projections due to its position relative to the core A-B action. ( Unscaled formula shown).
Center Point I: Half-Duration Projection : Using the dynamically calculated Point I as the Center . Located at Point B's price level but projected forward in time by half the A-B swing duration , Point I's calculated time coordinate often falls outside the initially visible chart area. As the chart progresses, this origin point will appear, revealing large, sweeping arcs representing geometric expansions based on a half-cycle temporal projection from the swing's endpoint price. ( Unscaled formula shown).
Center Point M : Point M, also dynamically calculated from the A-B swing, serves as the origin ( Center =M). It combines the midpoint price level (derived from X) with a time coordinate projected forward from Point B by the full duration of the A-B swing . This perspective anchors the geometric expansion to the swing's balance price level but originates from the completion point of a full temporal cycle relative to the A-B move. Like other projected centers, using M allows for complete circles to be visualized as price progresses into its time zone. ( SilverFib formula shown).
Geometric Validation & Functionality : Comparing the indicator (red lines), using its default settings ( Center X, FibCircle Formula ), against TradingView's standard Fib Circle tool (green lines/white background). The precise alignment, particularly visible at the 1.50 and 2.00 levels shown, validates the core geometry calculation.
🛠️ CONFIGURATION AND SETTINGS 🛠️
The Fibonacci Circle Zones indicator offers a range of configurable settings to tailor its functionality and visual representation. These options allow customization of the circle origin, scaling method, level visibility, visual appearance, and input points.
Center and Formula
Settings for selecting the circle origin and scaling method.
Center : Dropdown menu to select the origin point for the circles.
Auto : Automatically uses point X (the calculated midpoint between A and B).
Selectable points including start/end (A, B), midpoint (X), plus various points derived from or projected beyond the A-B swing (C-N).
Circle Formula : Dropdown menu to select the mathematical method for scaling circle radii.
Auto : Automatically selects a default formula ('FibCircle' if Center is 'X', 'Unscaled' otherwise).
Includes standard Fibonacci scaling ( FibCircle, GoldenFib ), other mathematical constants ( PiScaled, eScaled ), metallic means ( SilverRatio ), phi transformations ( PhiDecay, PhiSquared ), and others.
Fib Levels
Configuration options for the 12 individual Fibonacci levels.
Advanced Settings
Settings related to core calculation methods.
Radius Calc : Defines how the base radius is calculated (e.g., 'Auto' for vertical price range, 'Geometric' for diagonal price-time distance).
Chart Scale : Aligns circle calculations with the chart's vertical axis setting ('Standard' or 'Logarithmic') for accurate visual proportions.
Visual Settings
Settings controlling the visual display of the indicator elements.
Plots : Dropdown controlling which parts of the calculated circles are displayed ( Upper , All , or Lower ).
Labels : Dropdown controlling the display of the numerical level value labels ( All , Left , Right , or None ).
Setup : Dropdown controlling the visibility of the initial setup graphics ( Show or Hide ).
Info : Dropdown controlling the visibility of the small information table ( Show or Hide ).
Text Size : Adjusts the font size for all text elements displayed by the indicator (Value ranges from 0 to 36).
Line Width : Adjusts the width of the circle plots (1-10).
Time/Price
Inputs for the anchor points defining the base swing.
These settings define the start (Point A) and end (Point B) of the price swing used for all calculations.
Point A (Time, Price) : Input fields for the exact time coordinate and price level of the swing's starting point (A).
Point B (Time, Price) : Input fields for the exact time coordinate and price level of the swing's ending point (B).
Interactive Adjustment : Points A and B can typically be adjusted directly by clicking and dragging their markers on the chart (if 'Setup' is set to 'Show'). Changes update settings automatically.
📝 NOTES 📝
Fibonacci circles begin plotting only once the time corresponding to Point B has passed and is confirmed on the chart. While potential center locations might be visible earlier (as shown in the setup graphic), the final circle calculations require the complete geometry of the A-B swing. This approach ensures that as new price bars form, the circles are accurately rendered based on the finalized A-B relationship and the chosen center and scaling.
The indicator's calculations are anchored to user-defined start (A) and end (B) points on the chart. When switching between charts with significantly different price scales (e.g., from an index at 5,000 to a crypto asset at $0.50), it is typically necessary to adjust these anchor points to ensure the circle elements are correctly positioned and scaled.
⚠️ DISCLAIMER ⚠️
The Fibonacci Circle Zones indicator is a visual analysis tool designed to illustrate Fibonacci relationships through geometric constructions incorporating curved lines, providing a structured framework for identifying potential areas of price interaction. Like all technical and visual indicators, these visual representations may visually align with key price zones in hindsight, reflecting observed price dynamics. It is not intended as a predictive or standalone trading signal indicator.
The indicator calculates levels and projections using user-defined anchor points and Fibonacci ratios. While it aims to align with TradingView’s standard Fibonacci circle tool by employing mathematical and geometric formulas, no guarantee is made that its calculations are identical to TradingView's proprietary methods.
🧠 BEYOND THE CODE 🧠
The Fibonacci Circle Zones indicator, like other xxattaxx indicators , is designed with education and community collaboration in mind. Its open-source nature encourages exploration, experimentation, and the development of new Fibonacci and grid calculation indicators and tools. We hope this indicator serves as a framework and a starting point for future Innovation and discussions.
HTF Support & Resistance Zones📌 English Description:
HTF Support & Resistance Zones is a powerful indicator designed to auto-detect key support and resistance levels from higher timeframes (Daily, Weekly, Monthly, Yearly).
It displays the number of touches for each level and automatically classifies its strength (Weak – Strong – Very Strong) with full customization options.
✅ Features:
Auto-detection of support/resistance from HTFs
Strength calculation based on touch count
Clean visual display with color, size, and label customization
Ideal for scalping and intraday trading
📌 الوصف العربي:
مؤشر "HTF Support & Resistance Zones" يساعد المتداولين على تحديد أهم مناطق الدعم والمقاومة المستخرجة تلقائيًا من الفريمات الكبيرة (اليومي، الأسبوعي، الشهري، السنوي).
يعرض المؤشر عدد اللمسات لكل مستوى ويقيّم قوته تلقائيًا (ضعيف – قوي – قوي جدًا)، مع خيارات تخصيص كاملة للعرض.
✅ ميزات المؤشر:
دعم/مقاومة تلقائية من الفريمات الكبيرة
تقييم تلقائي لقوة المستويات بناءً على عدد اللمسات
عرض مرئي مرن مع تحكم بالألوان، الحجم، الشكل، والخلفية
مناسب للتداولات اليومية والسكالبينج