Fibonacci Trend [ChartPrime]Fibonacci Trend Indicator
This powerful indicator leverages supertrend analysis to detect market direction while overlaying dynamic Fibonacci levels to highlight potential support, resistance, and optimal trend entry zones. With its straightforward design, it is perfect for traders looking to simplify their workflow and enhance decision-making.
⯁ KEY FEATURES AND HOW TO USE
⯌ Supertrend Trend Identification :
The indicator uses a supertrend algorithm to identify market direction. It displays purple for downtrends and green for uptrends, ensuring quick and clear trend analysis.
⯌ Fibonacci Levels for Current Swings :
Automatically calculates Fibonacci retracement levels (0.236, 0.382, 0.618, 0.786) for the current swing leg.
- These levels act as key zones for potential support, resistance, and trend continuation.
- The high and low swing points are labeled with exact prices, ensuring clarity.
- If the swing range is insufficient (less than five times ATR), Fibonacci levels are not displayed, avoiding irrelevant data.
⯌ Extended Fibonacci Levels :
User-defined extensions project Fibonacci levels into the future, aiding traders in planning price targets or projecting key zones.
⯌ Optimal Trend Entry Zone :
A filled area between 0.618 and 0.786 levels visually highlights the optimal entry zone for trend continuation. This allows traders to refine their entry points during pullbacks.
⯌ Diagonal Trend Line :
A dashed diagonal line connects the swing high and low, visually confirming the range and trend strength of the current swing.
⯌ Visual Labels for Fibonacci Levels :
Each Fibonacci level is marked with a label displaying its value for quick reference.
⯁ HOW TRADERS CAN POTENTIALLY USE THIS TOOL
Fibonacci Retracements:
Use the Fibonacci retracement levels to find key support or resistance zones where the price may pull back before continuing its trend.
Example: Enter long trades when the price retraces to 0.618–0.786 levels in an uptrend.
Fibonacci Extensions:
Use Fibonacci extensions to project future price targets based on the current trend's swing leg. Levels like 127.2% and 161.8% are commonly used as profit-taking zones.
Reversal Identification:
Spot potential reversals by monitoring price reactions at key Fibonacci retracement levels (e.g., 0.236 or 0.382) or the swing high/low.
Optimal Trend Entries:
The filled zone between 0.618 and 0.786 is a statistically strong area for entering a position in the direction of the trend.
Example: Enter long positions during retracements to this range in an uptrend.
Risk Management:
Set stop-losses below key Fibonacci levels or the swing low/high, and take profits at extension levels, enhancing your trade management strategies.
⯁ CONCLUSION
The Fibonacci Trend Indicator is a straightforward yet effective tool for identifying trends and key Fibonacci levels. It simplifies analysis by integrating supertrend-based trend identification with Fibonacci retracements, extensions, and optimal entry zones. Whether you're a beginner or experienced trader, this indicator is an essential addition to your toolkit for trend trading, reversal spotting, and risk management.
Statistics
Request█ OVERVIEW
This library is a tool for Pine Script™ programmers that consolidates access to a wide range of lesser-known data feeds available on TradingView, including metrics from the FRED database, FINRA short sale volume, open interest, and COT data. The functions in this library simplify requests for these data feeds, making them easier to retrieve and use in custom scripts.
█ CONCEPTS
Federal Reserve Economic Data (FRED)
FRED (Federal Reserve Economic Data) is a comprehensive online database curated by the Federal Reserve Bank of St. Louis. It provides free access to extensive economic and financial data from U.S. and international sources. FRED includes numerous economic indicators such as GDP, inflation, employment, and interest rates. Additionally, it provides financial market data, regional statistics, and international metrics such as exchange rates and trade balances.
Sourced from reputable organizations, including U.S. government agencies, international institutions, and other public and private entities, FRED enables users to analyze over 825,000 time series, download their data in various formats, and integrate their information into analytical tools and programming workflows.
On TradingView, FRED data is available from ticker identifiers with the "FRED:" prefix. Users can search for FRED symbols in the "Symbol Search" window, and Pine scripts can retrieve data for these symbols via `request.*()` function calls.
FINRA Short Sale Volume
FINRA (the Financial Industry Regulatory Authority) is a non-governmental organization that supervises and regulates U.S. broker-dealers and securities professionals. Its primary aim is to protect investors and ensure integrity and transparency in financial markets.
FINRA's Short Sale Volume data provides detailed information about daily short-selling activity across U.S. equity markets. This data tracks the volume of short sales reported to FINRA's trade reporting facilities (TRFs), including shares sold on FINRA-regulated Alternative Trading Systems (ATSs) and over-the-counter (OTC) markets, offering transparent access to short-selling information not typically available from exchanges. This data helps market participants, researchers, and regulators monitor trends in short-selling and gain insights into bearish sentiment, hedging strategies, and potential market manipulation. Investors often use this data alongside other metrics to assess stock performance, liquidity, and overall trading activity.
It is important to note that FINRA's Short Sale Volume data does not consolidate short sale information from public exchanges and excludes trading activity that is not publicly disseminated.
TradingView provides ticker identifiers for requesting Short Sale Volume data with the format "FINRA:_SHORT_VOLUME", where "" is a supported U.S. equities symbol (e.g., "AAPL").
Open Interest (OI)
Open interest is a cornerstone indicator of market activity and sentiment in derivatives markets such as options or futures. In contrast to volume, which measures the number of contracts opened or closed within a period, OI measures the number of outstanding contracts that are not yet settled. This distinction makes OI a more robust indicator of how money flows through derivatives, offering meaningful insights into liquidity, market interest, and trends. Many traders and investors analyze OI alongside volume and price action to gain an enhanced perspective on market dynamics and reinforce trading decisions.
TradingView offers many ticker identifiers for requesting OI data with the format "_OI", where "" represents a derivative instrument's ticker ID (e.g., "COMEX:GC1!").
Commitment of Traders (COT)
Commitment of Traders data provides an informative weekly breakdown of the aggregate positions held by various market participants, including commercial hedgers, non-commercial speculators, and small traders, in the U.S. derivative markets. Tallied and managed by the Commodity Futures Trading Commission (CFTC) , these reports provide traders and analysts with detailed insight into an asset's open interest and help them assess the actions of various market players. COT data is valuable for gaining a deeper understanding of market dynamics, sentiment, trends, and liquidity, which helps traders develop informed trading strategies.
TradingView has numerous ticker identifiers that provide access to time series containing data for various COT metrics. To learn about COT ticker IDs and how they work, see our LibraryCOT publication.
█ USING THE LIBRARY
Common function characteristics
• This library's functions construct ticker IDs with valid formats based on their specified parameters, then use them as the `symbol` argument in request.security() to retrieve data from the specified context.
• Most of these functions automatically select the timeframe of a data request because the data feeds are not available for all timeframes.
• All the functions have two overloads. The first overload of each function uses values with the "simple" qualifier to define the requested context, meaning the context does not change after the first script execution. The second accepts "series" values, meaning it can request data from different contexts across executions.
• The `gaps` parameter in most of these functions specifies whether the returned data is `na` when a new value is unavailable for request. By default, its value is `false`, meaning the call returns the last retrieved data when no new data is available.
• The `repaint` parameter in applicable functions determines whether the request can fetch the latest unconfirmed values from a higher timeframe on realtime bars, which might repaint after the script restarts. If `false`, the function only returns confirmed higher-timeframe values to avoid repainting. The default value is `true`.
`fred()`
The `fred()` function retrieves the most recent value of a specified series from the Federal Reserve Economic Data (FRED) database. With this function, programmers can easily fetch macroeconomic indicators, such as GDP and unemployment rates, and use them directly in their scripts.
How it works
The function's `fredCode` parameter accepts a "string" representing the unique identifier of a specific FRED series. Examples include "GDP" for the "Gross Domestic Product" series and "UNRATE" for the "Unemployment Rate" series. Over 825,000 codes are available. To access codes for available series, search the FRED website .
The function adds the "FRED:" prefix to the specified `fredCode` to construct a valid FRED ticker ID (e.g., "FRED:GDP"), which it uses in request.security() to retrieve the series data.
Example Usage
This line of code requests the latest value from the Gross Domestic Product series and assigns the returned value to a `gdpValue` variable:
float gdpValue = fred("GDP")
`finraShortSaleVolume()`
The `finraShortSaleVolume()` function retrieves EOD data from a FINRA Short Sale Volume series. Programmers can call this function to retrieve short-selling information for equities listed on supported exchanges, namely NASDAQ, NYSE, and NYSE ARCA.
How it works
The `symbol` parameter determines which symbol's short sale volume information is retrieved by the function. If the value is na , the function requests short sale volume data for the chart's symbol. The argument can be the name of the symbol from a supported exchange (e.g., "AAPL") or a ticker ID with an exchange prefix ("NASDAQ:AAPL"). If the `symbol` contains an exchange prefix, it must be one of the following: "NASDAQ", "NYSE", "AMEX", or "BATS".
The function constructs a ticker ID in the format "FINRA:ticker_SHORT_VOLUME", where "ticker" is the symbol name without the exchange prefix (e.g., "AAPL"). It then uses the ticker ID in request.security() to retrieve the available data.
Example Usage
This line of code retrieves short sale volume for the chart's symbol and assigns the result to a `shortVolume` variable:
float shortVolume = finraShortSaleVolume(syminfo.tickerid)
This example requests short sale volume for the "NASDAQ:AAPL" symbol, irrespective of the current chart:
float shortVolume = finraShortSaleVolume("NASDAQ:AAPL")
`openInterestFutures()` and `openInterestCrypto()`
The `openInterestFutures()` function retrieves EOD open interest (OI) data for futures contracts. The `openInterestCrypto()` function provides more granular OI data for cryptocurrency contracts.
How they work
The `openInterestFutures()` function retrieves EOD closing OI information. Its design is focused primarily on retrieving OI data for futures, as only EOD OI data is available for these instruments. If the chart uses an intraday timeframe, the function requests data from the "1D" timeframe. Otherwise, it uses the chart's timeframe.
The `openInterestCrypto()` function retrieves opening, high, low, and closing OI data for a cryptocurrency contract on a specified timeframe. Unlike `openInterest()`, this function can also retrieve granular data from intraday timeframes.
Both functions contain a `symbol` parameter that determines the symbol for which the calls request OI data. The functions construct a valid OI ticker ID from the chosen symbol by appending "_OI" to the end (e.g., "CME:ES1!_OI").
The `openInterestFutures()` function requests and returns a two-element tuple containing the futures instrument's EOD closing OI and a "bool" condition indicating whether OI is rising.
The `openInterestCrypto()` function requests and returns a five-element tuple containing the cryptocurrency contract's opening, high, low, and closing OI, and a "bool" condition indicating whether OI is rising.
Example usage
This code line calls `openInterest()` to retrieve EOD OI and the OI rising condition for a futures symbol on the chart, assigning the values to two variables in a tuple:
= openInterestFutures(syminfo.tickerid)
This line retrieves the EOD OI data for "CME:ES1!", irrespective of the current chart's symbol:
= openInterestFutures("CME:ES1!")
This example uses `openInterestCrypto()` to retrieve OHLC OI data and the OI rising condition for a cryptocurrency contract on the chart, sampled at the chart's timeframe. It assigns the returned values to five variables in a tuple:
= openInterestCrypto(syminfo.tickerid, timeframe.period)
This call retrieves OI OHLC and rising information for "BINANCE:BTCUSDT.P" on the "1D" timeframe:
= openInterestCrypto("BINANCE:BTCUSDT.P", "1D")
`commitmentOfTraders()`
The `commitmentOfTraders()` function retrieves data from the Commitment of Traders (COT) reports published by the Commodity Futures Trading Commission (CFTC). This function significantly simplifies the COT request process, making it easier for programmers to access and utilize the available data.
How It Works
This function's parameters determine different parts of a valid ticker ID for retrieving COT data, offering a streamlined alternative to constructing complex COT ticker IDs manually. The `metricName`, `metricDirection`, and `includeOptions` parameters are required. They specify the name of the reported metric, the direction, and whether it includes information from options contracts.
The function also includes several optional parameters. The `CFTCCode` parameter allows programmers to request data for a specific report code. If unspecified, the function requests data based on the chart symbol's root prefix, base currency, or quoted currency, depending on the `mode` argument. The call can specify the report type ("Legacy", "Disaggregated", or "Financial") and metric type ("All", "Old", or "Other") with the `typeCOT` and `metricType` parameters.
Explore the CFTC website to find valid report codes for specific assets. To find detailed information about the metrics included in the reports and their meanings, see the CFTC's Explanatory Notes .
View the function's documentation below for detailed explanations of its parameters. For in-depth information about COT ticker IDs and more advanced functionality, refer to our previously published COT library .
Available metrics
Different COT report types provide different metrics . The tables below list all available metrics for each type and their applicable directions:
+------------------------------+------------------------+
| Legacy (COT) Metric Names | Directions |
+------------------------------+------------------------+
| Open Interest | No direction |
| Noncommercial Positions | Long, Short, Spreading |
| Commercial Positions | Long, Short |
| Total Reportable Positions | Long, Short |
| Nonreportable Positions | Long, Short |
| Traders Total | No direction |
| Traders Noncommercial | Long, Short, Spreading |
| Traders Commercial | Long, Short |
| Traders Total Reportable | Long, Short |
| Concentration Gross LT 4 TDR | Long, Short |
| Concentration Gross LT 8 TDR | Long, Short |
| Concentration Net LT 4 TDR | Long, Short |
| Concentration Net LT 8 TDR | Long, Short |
+------------------------------+------------------------+
+-----------------------------------+------------------------+
| Disaggregated (COT2) Metric Names | Directions |
+-----------------------------------+------------------------+
| Open Interest | No Direction |
| Producer Merchant Positions | Long, Short |
| Swap Positions | Long, Short, Spreading |
| Managed Money Positions | Long, Short, Spreading |
| Other Reportable Positions | Long, Short, Spreading |
| Total Reportable Positions | Long, Short |
| Nonreportable Positions | Long, Short |
| Traders Total | No Direction |
| Traders Producer Merchant | Long, Short |
| Traders Swap | Long, Short, Spreading |
| Traders Managed Money | Long, Short, Spreading |
| Traders Other Reportable | Long, Short, Spreading |
| Traders Total Reportable | Long, Short |
| Concentration Gross LE 4 TDR | Long, Short |
| Concentration Gross LE 8 TDR | Long, Short |
| Concentration Net LE 4 TDR | Long, Short |
| Concentration Net LE 8 TDR | Long, Short |
+-----------------------------------+------------------------+
+-------------------------------+------------------------+
| Financial (COT3) Metric Names | Directions |
+-------------------------------+------------------------+
| Open Interest | No Direction |
| Dealer Positions | Long, Short, Spreading |
| Asset Manager Positions | Long, Short, Spreading |
| Leveraged Funds Positions | Long, Short, Spreading |
| Other Reportable Positions | Long, Short, Spreading |
| Total Reportable Positions | Long, Short |
| Nonreportable Positions | Long, Short |
| Traders Total | No Direction |
| Traders Dealer | Long, Short, Spreading |
| Traders Asset Manager | Long, Short, Spreading |
| Traders Leveraged Funds | Long, Short, Spreading |
| Traders Other Reportable | Long, Short, Spreading |
| Traders Total Reportable | Long, Short |
| Concentration Gross LE 4 TDR | Long, Short |
| Concentration Gross LE 8 TDR | Long, Short |
| Concentration Net LE 4 TDR | Long, Short |
| Concentration Net LE 8 TDR | Long, Short |
+-------------------------------+------------------------+
Example usage
This code line retrieves "Noncommercial Positions (Long)" data, without options information, from the "Legacy" report for the chart symbol's root, base currency, or quote currency:
float nonCommercialLong = commitmentOfTraders("Noncommercial Positions", "Long", false)
This example retrieves "Managed Money Positions (Short)" data, with options included, from the "Disaggregated" report:
float disaggregatedData = commitmentOfTraders("Managed Money Positions", "Short", true, "", "Disaggregated")
█ NOTES
• This library uses dynamic requests , allowing dynamic ("series") arguments for the parameters defining the context (ticker ID, timeframe, etc.) of a `request.*()` function call. With this feature, a single `request.*()` call instance can flexibly retrieve data from different feeds across historical executions. Additionally, scripts can use such calls in the local scopes of loops, conditional structures, and even exported library functions, as demonstrated in this script. All scripts coded in Pine Script™ v6 have dynamic requests enabled by default. To learn more about the behaviors and limitations of this feature, see the Dynamic requests section of the Pine Script™ User Manual.
• The library's example code offers a simple demonstration of the exported functions. The script retrieves available data using the function specified by the "Series type" input. The code requests a FRED series or COT (Legacy), FINRA Short Sale Volume, or Open Interest series for the chart's symbol with specific parameters, then plots the retrieved data as a step-line with diamond markers.
Look first. Then leap.
█ EXPORTED FUNCTIONS
This library exports the following functions:
fred(fredCode, gaps)
Requests a value from a specified Federal Reserve Economic Data (FRED) series. FRED is a comprehensive source that hosts numerous U.S. economic datasets. To explore available FRED datasets and codes, search for specific categories or keywords at fred.stlouisfed.org Calls to this function count toward a script's `request.*()` call limit.
Parameters:
fredCode (series string) : The unique identifier of the FRED series. The function uses the value to create a valid ticker ID for retrieving FRED data in the format `"FRED:fredCode"`. For example, `"GDP"` refers to the "Gross Domestic Product" series ("FRED:GDP"), and `"GFDEBTN"` refers to the "Federal Debt: Total Public Debt" series ("FRED:GFDEBTN").
gaps (simple bool) : Optional. If `true`, the function returns a non-na value only when a new value is available from the requested context. If `false`, the function returns the latest retrieved value when new data is unavailable. The default is `false`.
Returns: (float) The value from the requested FRED series.
finraShortSaleVolume(symbol, gaps, repaint)
Requests FINRA daily short sale volume data for a specified symbol from one of the following exchanges: NASDAQ, NYSE, NYSE ARCA. If the chart uses an intraday timeframe, the function requests data from the "1D" timeframe. Otherwise, it uses the chart's timeframe. Calls to this function count toward a script's `request.*()` call limit.
Parameters:
symbol (series string) : The symbol for which to request short sale volume data. If the specified value contains an exchange prefix, it must be one of the following: "NASDAQ", "NYSE", "AMEX", "BATS".
gaps (simple bool) : Optional. If `true`, the function returns a non-na value only when a new value is available from the requested context. If `false`, the function returns the latest retrieved value when new data is unavailable. The default is `false`.
repaint (simple bool) : Optional. If `true` and the chart's timeframe is intraday, the value requested on realtime bars may change its time offset after the script restarts its executions. If `false`, the function returns the last confirmed period's values to avoid repainting. The default is `true`.
Returns: (float) The short sale volume for the specified symbol or the chart's symbol.
openInterestFutures(symbol, gaps, repaint)
Requests EOD open interest (OI) and OI rising information for a valid futures symbol. If the chart uses an intraday timeframe, the function requests data from the "1D" timeframe. Otherwise, it uses the chart's timeframe. Calls to this function count toward a script's `request.*()` call limit.
Parameters:
symbol (series string) : The symbol for which to request open interest data.
gaps (simple bool) : Optional. If `true`, the function returns non-na values only when new values are available from the requested context. If `false`, the function returns the latest retrieved values when new data is unavailable. The default is `false`.
repaint (simple bool) : Optional. If `true` and the chart's timeframe is intraday, the value requested on realtime bars may change its time offset after the script restarts its executions. If `false`, the function returns the last confirmed period's values to avoid repainting. The default is `true`.
Returns: ( ) A tuple containing the following values:
- The closing OI value for the symbol.
- `true` if the closing OI is above the previous period's value, `false` otherwise.
openInterestCrypto(symbol, timeframe, gaps, repaint)
Requests opening, high, low, and closing open interest (OI) data and OI rising information for a valid cryptocurrency contract on a specified timeframe. Calls to this function count toward a script's `request.*()` call limit.
Parameters:
symbol (series string) : The symbol for which to request open interest data.
timeframe (series string) : The timeframe of the data request. If the timeframe is lower than the chart's timeframe, it causes a runtime error.
gaps (simple bool) : Optional. If `true`, the function returns non-na values only when new values are available from the requested context. If `false`, the function returns the latest retrieved values when new data is unavailable. The default is `false`.
repaint (simple bool) : Optional. If `true` and the `timeframe` represents a higher timeframe, the function returns unconfirmed values from the timeframe on realtime bars, which repaint when the script restarts its executions. If `false`, it returns only confirmed higher-timeframe values to avoid repainting. The default is `true`.
Returns: ( ) A tuple containing the following values:
- The opening, high, low, and closing OI values for the symbol, respectively.
- `true` if the closing OI is above the previous period's value, `false` otherwise.
commitmentOfTraders(metricName, metricDirection, includeOptions, CFTCCode, typeCOT, mode, metricType)
Requests Commitment of Traders (COT) data with specified parameters. This function provides a simplified way to access CFTC COT data available on TradingView. Calls to this function count toward a script's `request.*()` call limit. For more advanced tools and detailed information about COT data, see TradingView's LibraryCOT library.
Parameters:
metricName (series string) : One of the valid metric names listed in the library's documentation and source code.
metricDirection (series string) : Metric direction. Possible values are: "Long", "Short", "Spreading", and "No direction". Consult the library's documentation or code to see which direction values apply to the specified metric.
includeOptions (series bool) : If `true`, the COT symbol includes options information. Otherwise, it does not.
CFTCCode (series string) : Optional. The CFTC code for the asset. For example, wheat futures (root "ZW") have the code "001602". If one is not specified, the function will attempt to get a valid code for the chart symbol's root, base currency, or main currency.
typeCOT (series string) : Optional. The type of report to request. Possible values are: "Legacy", "Disaggregated", "Financial". The default is "Legacy".
mode (series string) : Optional. Specifies the information the function extracts from a symbol. Possible modes are:
- "Root": The function extracts the futures symbol's root prefix information (e.g., "ES" for "ESH2020").
- "Base currency": The function extracts the first currency from a currency pair (e.g., "EUR" for "EURUSD").
- "Currency": The function extracts the currency of the symbol's quoted values (e.g., "JPY" for "TSE:9984" or "USDJPY").
- "Auto": The function tries the first three modes (Root -> Base currency -> Currency) until it finds a match.
The default is "Auto". If the specified mode is not available for the symbol, it causes a runtime error.
metricType (series string) : Optional. The metric type. Possible values are: "All", "Old", "Other". The default is "All".
Returns: (float) The specified Commitment of Traders data series. If no data is available, it causes a runtime error.
Pivot Bsquad (Traditional and Fibonacci)Pivot Bsquad (Traditional & Fibonacci) - XAUUSD Scalping Indicator
The Pivot Bsquad Indicator is designed to provide high-precision support and resistance levels for scalping on XAUUSD (Gold). This tool combines Traditional Pivot Points and Fibonacci-based Pivot Points to help traders identify key price levels where reversals or breakouts are likely to occur.
Key Features:
1. Dual Pivot Calculation Modes:
Traditional Pivots: Calculated using classic formulas based on high, low, and close values, ideal for broader support and resistance zones.
Fibonacci Pivots: Incorporates Fibonacci ratios for more dynamic and nuanced levels, perfect for intraday scalping.
2. Color-Coded Zones:
Clear visual representation of support (S1, S2, S3) and resistance (R1, R2, R3) levels.
Enhanced with key pivot lines for quick decision-making.
3. Scalping-Friendly Design:
Optimized for short timeframes (e.g., 1-minute to 15-minute charts).
Highlights high-probability zones for reversals or continuation patterns.
4. Customizable Settings:
Toggle between Traditional and Fibonacci pivots to suit your trading style.
Adjustable timeframes for pivot calculation (Daily, Weekly, Monthly).
Ideal For
Scalpers looking to capitalize on XAUUSD's volatility.
Intraday traders who rely on precise support and resistance levels.
Technical traders seeking a reliable confluence of pivot strategies.
How to Use:
Select your preferred pivot mode (Traditional or Fibonacci) in the settings.
Observe price action around pivot levels for potential entry and exit points.
Use in conjunction with momentum oscillators or candlestick patterns for confirmation.
Note: While this indicator provides a solid framework for scalping, always consider risk management practices and market conditions.
Volume change(%) and deltaVolume Change (%) Indicator
This indicator is designed to help traders identify significant changes in trading volume during specific market hours. By visually highlighting bars and providing percentage change labels, it helps users detect spikes in volume that could signal important market movements.
Key Features
Customizable Volume Thresholds:
Select from predefined thresholds (e.g., 38.2%, 50%, 61.8%, etc.) to filter only the most relevant volume changes based on your strategy.
Time Filtering:
Focuses on a specific time range (8:30 AM to 2:59 PM by default) to capture critical market activity, such as during the U.S. trading session.
Bar Coloring:
Bars are colored green or red when the volume change exceeds the selected threshold:
Green: Volume increases and the price closes higher.
Red: Volume increases and the price closes lower.
Arrow Labels with Volume Change:
Displays percentage changes above significant bars, accompanied by an arrow:
▲ for price increases.
▼ for price decreases.
Label Customization:
Adjust label size and colors for better visual clarity.
Advantages of Using This Indicator
Improved Volume Analysis:
Highlights when volume surges, helping you spot potential reversals, breakouts, or continuation signals.
Enhanced Focus on Relevant Data:
By limiting the analysis to a specific time window and threshold, it avoids distractions from insignificant volume changes.
Visual Clarity:
Combines bar colors and labels to provide quick, actionable insights without cluttering your chart.
Versatility:
Works well with intraday strategies, especially in volatile markets like futures, forex, or stocks.
Ease of Use:
Fully customizable with intuitive settings to suit different trading styles.
How to Use This Indicator
Step 1: Add to Your Chart
Open your TradingView account.
Click on the "Pine Script Editor" at the bottom of the platform.
Paste the script provided above into the editor.
Click "Add to Chart" to apply the indicator.
Step 2: Configure the Settings
Select Volume Threshold:
Choose the percentage threshold for highlighting bars (e.g., 50% for moderate changes, 250% for extreme spikes).
Enable/Disable Bar Colors:
Toggle the setting to apply or ignore green/red bar coloring.
Adjust Label Size and Colors:
Customize the size of labels and their colors for better visibility.
Step 3: Analyze the Chart
Look for green or red bars with arrows (▲ or ▼) indicating significant volume and price changes.
Use the labels showing percentage changes to gauge the strength of the movement.
Combine with other indicators (e.g., moving averages, RSI) to validate trade entries or exits.
Practical Example
Scenario: Intraday Trading on a Stock Index
Objective: Spot breakouts during the U.S. session (9:30 AM - 3:59 PM NY time).
Settings:
Volume Threshold: 100%.
Time Range: Default (8:30 AM to 2:59 PM).
Labels: Large size, white background, black text.
Observation:
A green bar with a 150% label and an arrow ▲ appears at 10:00 AM, suggesting strong buying interest.
This could indicate the start of a breakout.
You decide to enter a long position, placing a stop-loss below the breakout bar.
Tips for Maximum Effectiveness
Combine with Price Action:
Use alongside candlestick patterns (e.g., pin bars, engulfing patterns) to confirm entries.
Monitor Key Levels:
Pay attention to bars near support/resistance levels or trendlines.
Adjust Thresholds for Volatility:
In highly volatile markets, use higher thresholds (e.g., 250%); in calm markets, lower thresholds (e.g., 50%).
Test on Different Assets:
Works well on stocks, futures, forex, and even cryptocurrencies.
Conclusion
The Volume Change (%) Indicator is a powerful tool for traders looking to incorporate volume analysis into their intraday strategies. Its customization options, visual simplicity, and actionable insights make it suitable for traders of all experience levels. Try it out and refine it based on your market and style. 🚀
Let me know if you need help with further customizations! 😊
(VERSIÓN EN ESPAÑOL)
Indicador de Cambio de Volumen (%)
Este indicador está diseñado para ayudar a los traders a identificar cambios significativos en el volumen de negociación durante horas específicas del mercado. Al resaltar visualmente las barras y proporcionar etiquetas con el porcentaje de cambio, ayuda a los usuarios a detectar picos de volumen que podrían señalar movimientos importantes del mercado.
Características Principales
Umbrales de Volumen Personalizables:
Selecciona entre umbrales predefinidos (por ejemplo, 38.2%, 50%, 61.8%, etc.) para filtrar solo los cambios de volumen más relevantes según tu estrategia.
Filtrado por Tiempo:
Se enfoca en un rango horario específico (por defecto de 8:30 AM a 2:59 PM) para capturar la actividad crítica del mercado, como la sesión americana.
Coloreado de Barras:
Las barras se colorean de verde o rojo cuando el cambio de volumen supera el umbral seleccionado:
Verde: Aumento de volumen y el precio cierra más alto.
Rojo: Aumento de volumen y el precio cierra más bajo.
Etiquetas con Flechas y Cambio de Volumen:
Muestra el cambio porcentual sobre las barras significativas, acompañado de una flecha:
▲ para aumentos de precio.
▼ para caídas de precio.
Personalización de Etiquetas:
Ajusta el tamaño y los colores de las etiquetas para mejorar la claridad visual.
Ventajas de Usar Este Indicador
Mejora el Análisis de Volumen:
Resalta cuando el volumen se dispara, ayudando a detectar posibles reversas, rupturas o señales de continuación.
Enfoque en Datos Relevantes:
Al limitar el análisis a un rango horario específico y umbrales predefinidos, evita distracciones de cambios de volumen insignificantes.
Claridad Visual:
Combina colores de barras y etiquetas para proporcionar información rápida y útil sin saturar el gráfico.
Versatilidad:
Funciona bien con estrategias intradía, especialmente en mercados volátiles como futuros, forex o acciones.
Facilidad de Uso:
Totalmente personalizable con configuraciones intuitivas para adaptarse a diferentes estilos de trading.
Cómo Usar Este Indicador
Paso 1: Agregar a Tu Gráfico
Abre tu cuenta en TradingView.
Haz clic en el "Editor de Pine Script" en la parte inferior de la plataforma.
Pega el script proporcionado arriba en el editor.
Haz clic en "Agregar al gráfico" para aplicar el indicador.
Paso 2: Configura los Ajustes
Selecciona el Umbral de Volumen:
Elige el umbral de porcentaje para resaltar las barras (por ejemplo, 50% para cambios moderados, 250% para picos extremos).
Habilitar/Deshabilitar Colores de Barras:
Activa o desactiva el coloreado de las barras verde/roja.
Ajusta el Tamaño y Colores de las Etiquetas:
Personaliza el tamaño y los colores de las etiquetas para mejorar la visibilidad.
Paso 3: Analiza el Gráfico
Busca barras verdes o rojas con flechas (▲ o ▼) que indiquen cambios significativos de volumen y precio.
Utiliza las etiquetas con el cambio porcentual para medir la fuerza del movimiento.
Combínalo con otros indicadores (por ejemplo, medias móviles, RSI) para validar entradas o salidas de operaciones.
Ejemplo Práctico
Escenario: Trading Intradía en un Índice Bursátil
Objetivo: Detectar rupturas durante la sesión americana (9:30 AM - 3:59 PM hora de Nueva York).
Configuración:
Umbral de Volumen: 100%.
Rango Horario: Por defecto (8:30 AM a 2:59 PM).
Etiquetas: Tamaño grande, fondo blanco, texto negro.
Observación:
Aparece una barra verde con una etiqueta del 150% y una flecha ▲ a las 10:00 AM, lo que sugiere un fuerte interés comprador.
Esto podría indicar el inicio de una ruptura.
Decides entrar en una posición larga, colocando un stop-loss por debajo de la barra de ruptura.
Consejos para Maximizar la Efectividad
Combina con Acción del Precio:
Utiliza patrones de velas (como barras envolventes, pin bars) para confirmar las entradas.
Monitorea Niveles Clave:
Presta atención a las barras cercanas a niveles de soporte/resistencia o líneas de tendencia.
Ajusta los Umbrales según la Volatilidad:
En mercados altamente volátiles, usa umbrales más altos (por ejemplo, 250%); en mercados calmados, umbrales más bajos (por ejemplo, 50%).
Prueba en Diferentes Activos:
Funciona bien en acciones, futuros, forex e incluso criptomonedas.
Conclusión
El Indicador de Cambio de Volumen (%) es una herramienta poderosa para los traders que buscan incorporar el análisis de volumen en sus estrategias intradía. Sus opciones de personalización, simplicidad visual y sus valiosos insights lo hacen adecuado para traders de todos los niveles. Pruébalo y ajústalo según tu mercado y estilo. 🚀
¡Déjame saber si necesitas más ayuda o ajustes! 😊
Mean Reversion Pro Strategy [tradeviZion]Mean Reversion Pro Strategy : User Guide
A mean reversion trading strategy for daily timeframe trading.
Introduction
Mean Reversion Pro Strategy is a technical trading system that operates on the daily timeframe. The strategy uses a dual Simple Moving Average (SMA) system combined with price range analysis to identify potential trading opportunities. It can be used on major indices and other markets with sufficient liquidity.
The strategy includes:
Trading System
Fast SMA for entry/exit points (5, 10, 15, 20 periods)
Slow SMA for trend reference (100, 200 periods)
Price range analysis (20% threshold)
Position management rules
Visual Elements
Gradient color indicators
Three themes (Dark/Light/Custom)
ATR-based visuals
Signal zones
Status Table
Current position information
Basic performance metrics
Strategy parameters
Optional messages
📊 Strategy Settings
Main Settings
Trading Mode
Options: Long Only, Short Only, Both
Default: Long Only
Position Size: 10% of equity
Starting Capital: $20,000
Moving Averages
Fast SMA: 5, 10, 15, or 20 periods
Slow SMA: 100 or 200 periods
Default: Fast=5, Slow=100
🎯 Entry and Exit Rules
Long Entry Conditions
All conditions must be met:
Price below Fast SMA
Price below 20% of current bar's range
Price above Slow SMA
No existing position
Short Entry Conditions
All conditions must be met:
Price above Fast SMA
Price above 80% of current bar's range
Price below Slow SMA
No existing position
Exit Rules
Long Positions
Exit when price crosses above Fast SMA
No fixed take-profit levels
No stop-loss (mean reversion approach)
Short Positions
Exit when price crosses below Fast SMA
No fixed take-profit levels
No stop-loss (mean reversion approach)
💼 Risk Management
Position Sizing
Default: 10% of equity per trade
Initial capital: $20,000
Commission: 0.01%
Slippage: 2 points
Maximum one position at a time
Risk Control
Use daily timeframe only
Avoid trading during major news events
Consider market conditions
Monitor overall exposure
📊 Performance Dashboard
The strategy includes a comprehensive status table displaying:
Strategy Parameters
Current SMA settings
Trading direction
Fast/Slow SMA ratio
Current Status
Active position (Flat/Long/Short)
Current price with color coding
Position status indicators
Performance Metrics
Net Profit (USD and %)
Win Rate with color grading
Profit Factor with thresholds
Maximum Drawdown percentage
Average Trade value
📱 Alert Settings
Entry Alerts
Long Entry (Buy Signal)
Short Entry (Sell Signal)
Exit Alerts
Long Exit (Take Profit)
Short Exit (Take Profit)
Alert Message Format
Strategy name
Signal type and direction
Current price
Fast SMA value
Slow SMA value
💡 Usage Tips
Consider starting with Long Only mode
Begin with default settings
Keep track of your trades
Review results regularly
Adjust settings as needed
Follow your trading plan
⚠️ Disclaimer
This strategy is for educational and informational purposes only. It is not financial advice. Always:
Conduct your own research
Test thoroughly before live trading
Use proper risk management
Consider your trading goals
Monitor market conditions
Never risk more than you can afford to lose
📝 Credits
Inspired by:
"Mean Reversion Trading Strategy for a High Win Rate" - YouTube channel "The Transparent Trader"
"Highly Reliable Mean Reversion Trading Strategy Backtested x Millions of Trades" - YouTube channel "seriousbacktester"
"Trade with Discipline, Manage Risk, Stay Consistent" - tradeviZion
B4100 - Market SessionsA simple script to highlight London, New York, Hong Kong pre-market, open, close times.
STRX - Correlation DominationThis indicator displays the correlation among three selected assets (for example, Gold, Dollar Index, and Nasdaq) on a custom timeframe. A table positioned at the top-right corner of the chart lets you quickly see the correlation between:
Asset 1 vs Asset 2
Asset 1 vs Asset 3
Asset 2 vs Asset 3
Correlations are calculated using the Pearson correlation function (ta.correlation). If the correlation is greater than or equal to 0.4, the value appears in green (strong positive correlation). If it is less than or equal to -0.4, it appears in red (strong negative correlation). Otherwise, it is displayed in yellow (weak correlation).
Multi-asset and multi-timeframe: Compare up to three instruments at once on your chosen timeframe.
Customizable period: Use the “Correlation Period” setting to adjust the correlation calculation window.
Clear table format: The results are immediately visible in an easy-to-read table.
Disclaimer: This script is provided solely for educational and informational purposes. It does not constitute a recommendation or an invitation to invest. Use it as an additional resource and always conduct thorough market analysis before opening any trading positions. Past performance does not guarantee future results.
EMA Proximity (Test)First script. Please don't use it.
Goal: To identify in screener, EMA 10/20 cross over before the cross over.
Warius L.H&TThis indicator works very simply and is uncomplicated. It only shows the LAST highs and lows for the respective time unit and only the most recent ones, no matter how small they are.
ICT CONCEPTDieser Indikator ist speziell für Trader entwickelt, die nach einem strukturierten Ansatz innerhalb klar definierter Zeitfenster handeln möchten. Der ICT Time-Based Indicator hebt wichtige Handelszeiten basierend auf dem Central European Summer Time (CEST) hervor. Er ist optimiert für den NASDAQ 100 (NAS100) und hilft dabei, sich auf die relevantesten Marktbewegungen zu konzentrieren.
ICT CONCEPTDieser Indikator ist speziell für Trader entwickelt, die nach einem strukturierten Ansatz innerhalb klar definierter Zeitfenster handeln möchten. Der ICT Time-Based Indicator hebt wichtige Handelszeiten basierend auf dem Central European Summer Time (CEST) hervor. Er ist optimiert für den NASDAQ 100 (NAS100) und hilft dabei, sich auf die relevantesten Marktbewegungen zu konzentrieren.
Лучший день недели для NASDAQДолжен показать луший день недели для торговли. Статистика по книгам Лари Вильямса ищем луший день недели для фильтрации сделок.
Trend Reversal Probability [Algoalpha]Introducing Trend Reversal Probability by AlgoAlpha – a powerful indicator that estimates the likelihood of trend reversals based on an advanced custom oscillator and duration-based statistics. Designed for traders who want to stay ahead of potential market shifts, this indicator provides actionable insights into trend momentum and reversal probabilities.
Key Features :
🔧 Custom Oscillator Calculation: Combines a dual SMA strategy with a proprietary RSI-like calculation to detect market direction and strength.
📊 Probability Levels & Visualization: Plots average signal durations and their statistical deviations (±1, ±2, ±3 SD) on the chart for clear visual guidance.
🎨 Dynamic Color Customization: Choose your preferred colors for upward and downward trends, ensuring a personalized chart view.
📈 Signal Duration Metrics: Tracks and displays signal durations with columns representing key percentages (80%, 60%, 40%, and 20%).
🔔 Alerts for High Probability Events: Set alerts for significant reversal probabilities (above 84% and 98% or below 14%) to capture key trading moments.
How to Use :
Add the Indicator: Add Trend Reversal Probability to your favorites by clicking the star icon.
Market Analysis: Use the plotted probability levels (average duration and ±SD bands) to identify overextended trends and potential reversals. Use the color of the duration counter to identify the current trend.
Leverage Alerts: Enable alerts to stay informed of high or extreme reversal probabilities without constant chart monitoring.
How It Works :
The indicator begins by calculating a custom oscillator using short and long simple moving averages (SMA) of the midpoint price. A proprietary RSI-like formula then transforms these values to estimate trend direction and momentum. The duration between trend reversals is tracked and averaged, with standard deviations plotted to provide probabilistic guidance on trend longevity. Additionally, the indicator incorporates a cumulative probability function to estimate the likelihood of a trend reversal, displaying the result in a data table for easy reference. When probability levels cross key thresholds, alerts are triggered, helping traders take timely action.
GTİThis indicator is designed to detect gaps between candles on the chart. It detects all gaps that are higher than the specified percentage setting, draws a line passing through only the starting and ending points of the last gap, and paints between these lines.
If any candle closes above the gap starting level, the lines between the lines are colored green; If any candle closes below the gap starting level, the lines between the lines are colored red.
GTİ(gap tespit indikatörü)Bu indikatör , grafikte mumlar arsında oluşan boşlukları(gap) tespit etmek için yapılmıştır. Belirlenen yüzde ayarından yüksek olan bütün gapları tespit eder, sadece son gapın başlangıç ve bitiş noktalarından geçen birer çizgi çizer ve bu çizgilerin aralarını boyar.
Eğer herhangi bir mumun kapanışı gap başlangıç seviyesinin üzerinde bir kapanış yaparsa, çizgilerin arası yeşil boyanır ; herhangi bir mumun kapanışı gap başlangıç seviyesinin altında bir kapanış yaparsa , çizgilerin arası kırmızı boyanır.
Berma Rate Of Change [BROC]The provided code is a TradingView Pine Script indicator for calculating the Rate of Change (ROC) over multiple time periods. It includes the following features:
1. **Inputs**: Users can select different lengths for the ROC calculation, including 10, 20, 40, 80, and 160 periods, as well as choose the data source (e.g., closing price).
2. **ROC Calculation**: The ROC is calculated for each specified period using the formula:
\ )}{\left(\frac{(current\_price + price )}{2}\right)}
\]
This formula compares the current price with the price from the specified number of periods ago, normalized by the average of the two prices.
3. **Plotting**: The ROC values are plotted on the chart with colors indicating whether the ROC is positive (green) or negative (red). Each of the five ROC values is plotted separately.
4. **Zero Line**: A dashed horizontal line at zero helps identify the pivot point between upward and downward trends.
5. **Background Color**: The background color changes to a light green when all ROC values are positive and to light red when all ROC values are negative, providing immediate visual cues for overall trend conditions.
This indicator is useful for traders seeking to understand momentum and price changes over varying periods, giving insight into potential buy or sell signals.
Stop Loss & TargetHow to Use the SL/TP Indicator
The SL/TP indicator is a versatile tool designed for traders to easily visualize entry, stop-loss (SL), and take-profit (TP) levels on their charts. This guide will walk you through the steps to configure and use the indicator effectively.
Features:
Configure Long Trades and Short Trades independently.
Define Entry Price, Stop Loss, and up to three Take Profit levels for each trade.
Customize line colors for better visualization.
Works for both risk-reward and target-based trading.
Adding the Indicator:
Open the TradingView platform.
Search for the indicator name: SL/TP.
Click the Add to Chart button to apply it.
Configuration:
1. Long Trade Settings
Enable Long Trade: Check this option to activate long trade lines on the chart.
Long Entry Price: Input the price at which you plan to enter the long trade.
Long Stop Loss: Input your stop-loss level for the long trade.
Line Colors: You can customize the colors for the Entry, SL, and TP lines in the Long Trade settings group.
Take Profit Levels (Calculated Automatically):
TP1: 1:1 Risk-Reward ratio (difference between Entry and SL added to Entry).
TP2: 1:2 Risk-Reward ratio.
TP3: 1:3 Risk-Reward ratio.
2. Short Trade Settings
Enable Short Trade: Check this option to activate short trade lines on the chart.
Short Entry Price: Input the price at which you plan to enter the short trade.
Short Stop Loss: Input your stop-loss level for the short trade.
Line Colors: You can customize the colors for the Entry, SL, and TP lines in the Short Trade settings group.
Take Profit Levels (Calculated Automatically):
TP1: 1:1 Risk-Reward ratio (difference between Entry and SL subtracted from Entry).
TP2: 1:2 Risk-Reward ratio.
TP3: 1:3 Risk-Reward ratio.
Visualizing on the Chart:
Once you configure the settings and enable the trade, the indicator will draw horizontal lines on the chart for:
Entry Price
Stop Loss
Take Profit Levels (TP1, TP2, TP3)
Each line will extend to three bars ahead of the current bar index.
Customization:
Adjust colors for better visibility depending on your chart theme.
The width and style of lines can also be modified in the source code if needed.
Example Usage:
Long Trade Example:
Enable Long Trade: Check the box.
Set Entry Price: 100.
Set Stop Loss: 95.
The indicator will draw the following lines:
Entry Line: At 100 (customizable color).
Stop Loss Line: At 95 (customizable color).
TP1 Line: At 105 (1:1 Risk-Reward).
TP2 Line: At 110 (1:2 Risk-Reward).
TP3 Line: At 115 (1:3 Risk-Reward).
Short Trade Example:
Enable Short Trade: Check the box.
Set Entry Price: 200.
Set Stop Loss: 205.
The indicator will draw the following lines:
Entry Line: At 200 (customizable color).
Stop Loss Line: At 205 (customizable color).
TP1 Line: At 195 (1:1 Risk-Reward).
TP2 Line: At 190 (1:2 Risk-Reward).
TP3 Line: At 185 (1:3 Risk-Reward).
Notes:
Ensure that you input valid and realistic price levels for Entry and Stop Loss.
The indicator will only display lines if both the Entry Price and Stop Loss are non-zero.
Use this indicator for planning trades visually but always confirm levels with your trading strategy.
Disclaimer: This indicator is a tool to assist in trading. Use it with proper risk management and your own due diligence.
ADX (levels)This Pine Script indicator calculates and displays the Average Directional Index (ADX) along with the DI+ and DI- lines to help identify the strength and direction of a trend. The script is designed for Pine Script v6 and includes customizable settings for a more tailored analysis.
Features:
ADX Calculation:
The ADX measures the strength of a trend without indicating its direction.
It uses a smoothing method for more reliable trend strength detection.
DI+ and DI- Lines (Optional):
The DI+ (Directional Index Plus) and DI- (Directional Index Minus) help determine the direction of the trend:
DI+ indicates upward movement.
DI- indicates downward movement.
These lines are disabled by default but can be enabled via input settings.
Customizable Threshold:
A horizontal line (hline) is plotted at a user-defined threshold level (default: 20) to highlight significant ADX values that indicate a strong trend.
Slope Analysis:
The slope of the ADX is analyzed to classify the trend into:
Strong Trend: Slope is higher than a defined "medium" threshold.
Moderate Trend: Slope falls between "weak" and "medium" thresholds.
Weak Trend: Slope is positive but below the "weak" threshold.
A background color changes dynamically to reflect the strength of the trend:
Green (light or dark) indicates trend strength levels.
Custom Colors:
ADX color is customizable (default: pink #e91e63).
Background colors for trend strength can also be adjusted.
Independent Plot Window:
The indicator is displayed in a separate window below the price chart, making it easier to analyze trend strength without cluttering the main price chart.
Parameters:
ADX Period: Defines the lookback period for calculating the ADX (default: 14).
Threshold (hline): A horizontal line value to differentiate strong trends (default: 20).
Slope Thresholds: Adjustable thresholds for weak, moderate, and strong trend slopes.
Enable DI+ and DI-: Boolean options to display or hide the DI+ and DI- lines.
Colors: Customizable colors for ADX, background gradients, and other elements.
How to Use:
Identify Trend Strength:
Use the ADX value to determine the strength of a trend:
Below 20: Weak trend.
Above 20: Strong trend.
Analyze Trend Direction:
Enable DI+ and DI- to check whether the trend is upward (DI+ > DI-) or downward (DI- > DI+).
Dynamic Slope Detection:
Use the background color as a quick visual cue to assess trend strength changes.
This indicator is ideal for traders who want to measure trend strength and direction dynamically while maintaining a clean and organized chart layout.
Multi-Timeframe Stoch RSI Buy SignalIndicates a buy signal if the stoch rsi 15m crossed up and the stoch rsi is less then 20