Compare Symbol [LuxmiAI]This indicator allows users to plot candles or bars for a selected symbol and add a moving average of their choice as an underlay. Users can customize the moving average type and length, making it versatile for a wide range of trading strategies.
This script is designed to offer flexibility, letting traders select the symbol, timeframe, candle style, and moving average type directly from the input options. The moving averages include the Exponential Moving Average (EMA), Simple Moving Average (SMA), Weighted Moving Average (WMA), and Volume-Weighted Moving Average (VWMA).
Features of the Script
This indicator provides the following key features:
1. Symbol Selection: Users can input the ticker symbol for which they want to plot the data.
2. Timeframe Selection: The script allows users to choose a timeframe for the symbol data.
3. Candle Styles: Users can select from three styles - regular candles, bars, or Heikin-Ashi candles.
4. Moving Average Options: Users can choose between EMA, SMA, WMA, and VWMA for added trend analysis.
5. Customizable Moving Average Length: The length of the moving average can be adjusted to suit individual trading strategies.
How the Script Works
The script starts by taking user inputs for the symbol and timeframe. It then retrieves the open, high, low, and close prices of the selected symbol and timeframe using the request.security function. Users can select between three candle styles: standard candles, bars, and Heikin-Ashi candles. If Heikin-Ashi candles are selected, the script calculates the Heikin-Ashi open, high, low, and close values.
To add further analysis capabilities, the script includes a moving average. Traders can select the moving average type from EMA, SMA, WMA, or VWMA and specify the desired length. The selected moving average is then plotted on the chart to provide a clear visualization of the trend.
Step-by-Step Implementation
1. Input Options: The script starts by taking inputs for the symbol, timeframe, candle style, moving average type, and length.
2. Data Retrieval: The script fetches OHLC data for the selected symbol and timeframe using request.security.
3. Candle Style Logic: It determines which candle style to plot based on the user’s selection. If Heikin-Ashi is selected, the script calculates Heikin-Ashi values.
4. Moving Average Calculation: Depending on the user’s choice, the script calculates the selected moving average.
5. Visualization: The script plots the candles or bars and overlays the moving average on the chart.
Benefits of Using This Indicator
This custom indicator provides multiple benefits for traders. It allows for quick comparisons between symbols and timeframes, helping traders identify trends and patterns. The flexibility to choose different candle styles and moving averages enhances its adaptability to various trading strategies. Additionally, the ability to customize the moving average length makes it suitable for both short-term and long-term analysis.
Göstergeler ve stratejiler
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.
Silver Bullet SessionsThe Silver Bullet Sessions indicator is a specialized timing tool designed to highlight key market sessions throughout the trading day. By marking specific hours with vertical lines, it helps traders identify potentially significant market moments that often coincide with increased volatility and trading opportunities.
This indicator plots vertical lines at six strategic times during the trading day: 3:00 AM, 4:00 AM, 10:00 AM, 11:00 AM, 2:00 PM, and 3:00 PM. These times are carefully selected to correspond with important market events and session overlaps in the global trading cycle. The early morning hours (3-4 AM) often capture significant Asian market movements and the European market opening. The mid-morning period (10-11 AM) typically corresponds with peak European trading hours and the pre-US market dynamics. The afternoon times (2-3 PM) coincide with key US market activities and the European market close.
The indicator is implemented using Pine Script version 6, ensuring compatibility with the latest TradingView platform features. It employs a clean, efficient coding structure that minimizes resource usage while maintaining reliable performance. The vertical lines are rendered in blue for clear visibility against any chart background, and their width is optimized for easy identification without obscuring price action.
Traders can use these visual markers to:
Plan their entries and exits around these key time periods
Anticipate potential market volatility
Structure their trading sessions around these significant market hours
Identify session-based trading patterns
Options Levels Support and ResistanceAre you sometimes clueless of where you are going to find support or resistance for the stock price? Nothing can be more powerful than market positioning via options levels.
This indicator visualizes key institutional options levels including short-term and longer-term Put/Call Walls, and projected implied move ranges.
Key Features:
Displays major support/resistance levels derived from options data
Shows institutional Put Walls (PW) and Call Walls (CW) - areas of significant options activity
Identifies short-term and longer-term gamma levels for more precise trading
Includes an option statistics (IV, Put/Call ratio, trend) in a clean dashboard
Automatically(*) updates throughout the trading day to reflect current market positioning
Currently supporting 440 of the most popular tickers.
Presents gamma flip levels for indexes SPX, RUT, NDX and VIX
Trading Applications:
Identify key price levels where institutional options activity may influence price movement
Gauge market sentiment through IV levels, Put/Call ratios, and options positioning
Plan entries/exits around major Put/Call walls where price reversals are more likely
Monitor changes in institutional positioning through level trends
Levels are calculated externally using comprehensive options data and updated into the indicator multiple times per day. Note that I can't guarantee it will be timely updated since TradingView offers no access to external data nor a way to programmatically update the script.
This code simply renders the levels I calculate using external software. I had to make the code as short as possible to accommodate more tickers, reason why there is no commenting.
The last update time (New York/EST) is shown in the dashboard.
ICT CRT Model Range with EquilibriumICT CRT Model Range with Equilibrium Indicator
This indicator calculates and displays the high, low, and equilibrium levels within a custom-defined session (9:00 am to 10:00 am New York Time and the lines will stop appearing at 16:00pm ). It draws horizontal lines to represent the session's range and marks the equilibrium point as a reference.
What is CRT (Candle Range Theory)?
Candle Range Theory (CRT) is based on the concept that every candle on any timeframe forms its own range. These ranges can either be manipulated—through strategies like Turtle Soup—or broken, resulting in price movements such as engulfing patterns, breakouts, and retests beyond the candle's high or low.
CRT is commonly visualized as a 3-candle model, but it can include more candles due to the presence of inside bars. An inside bar is a candle whose high is not higher than the previous candle's high and whose low is not lower than the previous candle's low.
The CRT model follows the A-M-D structure:
Accumulation (A): The first candle or group of candles (inside bars) represents market consolidation.
Manipulation (M): The second candle signals a false move, often a Turtle Soup setup designed to trap traders.
Distribution (D): The third candle confirms the true market move, breaking out of the range and establishing the trend.
Customizable Settings:
Line Colors: Choose your preferred colors for the high, low, and equilibrium lines.
Line Widths: Adjust the thickness of the lines for better visibility.
Line Styles: Select from solid, dotted, or dashed styles for each line.
Label Settings: Customize the text and colors of the labels for the high, low, and equilibrium points.
Traders can easily modify these settings to suit their visual preferences and trading strategies. This indicator is ideal for identifying price action within a specific range, offering clear visual cues for potential CRT Setup.
[MAD] Self-Optimizing RSIOverview
This script evaluates multiple RSI lengths within a specified range, calculates performance metrics for each, and identifies the top 3 configurations based on a custom scoring system. It then plots the three best RSI curves and optionally displays a summary table and label.
How It Works
The script calculates a custom RSI for each length in the range.
It simulates entering a long position when RSI crosses below the Buy Value and exits when RSI crosses above the Sell Value.
Each trade's return is stored in the relevant StatsContainer.
Metrics Computation
After all bars have been processed,
* Net Profit,
* Sharpe Ratio, and
* Win Rate
are computed for each RSI length.
A weighted score is then derived using the input weights.
Top 3 Identification
The script finds the three RSI lengths with the highest scores.
The RSI lines for these top 3 lengths are plotted in different colors.
If enabled, a table listing the top 3 results (Rank, RSI length, Sharpe, NetPnL, Win Rate) is shown.
If enabled, a label with the highest-scoring RSI length and its score is placed on the final bar.
Usage Tips
Adjust Min RSI Length and Max RSI Length to explore a narrower or wider range of periods.
Be aware, to high settings will slow down the calculation.
Experiment with different RSI Buy Value and RSI Sell Value settings if you prefer more or fewer trade signals.
Confirm that Min Trades Required aligns with the desired confidence level for the computed metrics.
Modify Weight: Sharpe, Weight: NetProfit, and Weight: WinRate to reflect which metrics are most important.
Troubleshooting
If metrics remain - or NaN, confirm enough trades (Min Trades Required) have occurred.
If no top 3 lines appear, it could mean no valid trades were taken in the specified range, or the script lacks sufficient bars to calculate RSI for some lengths. In this case set better buyvalue and sellvalues in the inputs
Disclaimer
Past performance is not indicative of future results specialy as this indicator can repaint based on max candles in memory which are limited by your subscription
ADX and DI with HistogramThe "ADX and DI with Histogram" indicator is designed to help traders analyze market trends using the Average Directional Index (ADX) and Directional Indicators (DI+ and DI-). It provides a visual representation of trend strength and direction, along with a histogram to illustrate the difference between the DI+ and DI- values.
Features:
Inputs:
Length (len): Sets the period for the ADX and DI calculations (default: 14).
Threshold Level (th): Defines the ADX threshold for trend strength (default: 20).
Shape Color: Customizes the color of the shape markers plotted on the chart.
Shape Size: Adjusts the size of the shape markers (default: 10).
Shape Type: Selects the type of shape to display (Circle or Square).
Calculations:
Computes the True Range, Directional Movement (both plus and minus), and applies Exponential Moving Averages to these values to derive DI+ and DI-.
The ADX is calculated using the smoothed directional movement indicators.
Visual Outputs:
Plots DI+ (green line), DI- (red line), and ADX (navy line) on the main chart.
Includes a horizontal line representing the threshold level for easy trend assessment.
Displays a histogram that reflects the difference between DI+ and DI- with color coding to indicate directional strength (green for DI+ > DI- and red for DI+ < DI-).
Shape Markers:
When the ADX crosses above the specified threshold, a shape marker (Circle or Square) appears on the chart indicating a potential trend initiation.
Conversely, when the ADX crosses below the threshold, a shape marker is also plotted, signaling potential trend weakening.
Here is the description translated into Arabic:
---
مؤشر ADX و DI مع الهيستوجرام
نظرة عامة:
يُصمم مؤشر "ADX و DI مع الهيستوجرام" لمساعدة المتداولين في تحليل اتجاهات السوق باستخدام مؤشر الاتجاه المتوسط (ADX) ومؤشرات الاتجاه (DI+ و DI-). يوفر تمثيلًا بصريًا لقوة الاتجاه والاتجاه، بالإضافة إلى هيستوجرام لتوضيح الفرق بين قيم DI+ و DI-.
الميزات:
- **المدخلات:**
- **الطول (len):** يحدد الفترة لحسابات ADX و DI (افتراضي: 14).
- **مستوى العتبة (th):** يحدد عتبة ADX لقوة الاتجاه (افتراضي: 20).
- **لون الشكل:** يخصص لون علامات الشكل المرسومة على المخطط.
- **حجم الشكل:** يضبط حجم علامات الشكل (افتراضي: 10).
- **نوع الشكل:** يحدد نوع الشكل الذي يتم عرضه (دائرة أو مربع).
- **الحسابات:**
- يحسب النطاق الحقيقي، الحركة الاتجاهية (كلاهما زائد وناقص)، ويطبق المتوسطات المتحركة الأسية على هذه القيم للحصول على DI+ و DI-.
- يتم حساب ADX باستخدام مؤشرات الحركة الاتجاهية.
- **المخرجات :**
- يرسم DI+ (خط أخضر) و DI- (خط أحمر) و ADX (خط بحري) على المخطط الرئيسي.
- يتضمن خط أفقي يمثل مستوى العتبة لتقييم الاتجاه بسهولة.
- يعرض هيستوجرام يعكس الفرق بين DI+ و DI- مع ترميز لوني للإشارة إلى القوة الاتجاهية (أخضر عندما يكون DI+ أكبر من DI- وأحمر عندما يكون DI+ أقل من DI-).
- **علامات الشكل:**
- عندما يتجاوز ADX العتبة المحددة، تظهر علامة شكل (دائرة أو مربع) على المخطط تشير إلى احتمال بدء اتجاه جديد.
- على العكس، عندما يتجاوز ADX العتبة إلى الأسفل، يتم رسم علامة شكل أيضًا، مما يدل على احتمال ضعف الاتجاه.
### حالات الاستخدام:
هذا المؤشر مناسب للمتداولين الذين يتطلعون إلى تحديد الاتجاهات وتأكيدها، وتقييم قوة السوق، واتخاذ قرارات تداول مستنيرة بناءً على إشارات ADX و DI.
---
Prior Day High and Low RaysPrior Day High and Low Rays
This custom TradingView indicator projects rays from the prior day's high and low prices, helping you visualize key levels of support and resistance from the previous trading day. The rays extend to the right, continuing from the prior day's high and low throughout the current trading day.
Features:
Displays a ray starting at the prior day's high price.
Displays a ray starting at the prior day's low price.
Rays extend to the right and are only plotted for the immediate prior day.
Customizable ray color and width through the indicator settings.
Use Case:
Track important price levels from the previous day that can act as support or resistance.
Customize the appearance of the rays to match your chart's style and preferences.
This tool is designed for traders who want to incorporate prior day price action into their analysis and maintain a clean, customized chart display.
Session Bar/Candle ColoringChange the color of candles within a user-defined trading session. Borders and wicks can be changed as well, not just the body color.
PREFACE
This script can be used an educational resource for those who are interested in learning Pine Script. Therefore, the script is published open source and is organized in a manner that follows the recommended Style Guide .
While the main premise of the indicator is rather simple, the script showcases various things that can be achieved such as conditional plotting, alignment of indicator settings, user input validation, script optimization, and more. The script also has examples of taking into consideration the chart timeframe and/or different chart types (Heikin Ashi, Renko, etc.) that a user might be running it on. Note: for complete beginners, I strongly suggest going through the Pine Script User Manual (possibly more than once).
FEATURES
Besides being able to select a specific time window, the indicator also provides additional color settings for changing the background color or changing the colors of neutral/indecisive candles, as shown in the image below.
This allows for a higher level of customization beyond the TradingView chart settings or other similar scripts that are currently available.
HOW TO USE
First, define the intraday trading session that will contain the candles to modify. The session can be limited to specific days of the week.
Next, select the parts of the candles that should be modified: Body, Borders, Wick, and/or Background.
For each of the candle parts that were enabled, you can select the colors that will be used depending on whether a candle is bullish (⇧), bearish (⇩), or neutral (⇆).
All other indicator settings will have a detailed tooltip to describe its usage and/or effect.
LIMITATIONS
The indicator is not intended to function on Daily or higher timeframes due to the intraday nature of session time windows.
The indicator cannot always automatically detect the chart type being used, therefore the user is requested to manually input the chart type via the " Chart Style " setting.
Depending on the available historical data and the selected choice for the " Portion of bar in session " setting, the indicator may not be able to update very old candles on the chart.
EXAMPLE USAGE
This section will show examples of different scenarios that the indicator can be used for.
Emphasizing a main trading session.
Defining a "Pre/post market hours background" like is available for some symbols (e.g., NASDAQ:AAPL ).
Highlighting in which bar the midnight candle occurs.
Hiding indecision bars (neutral candles).
Showing only "Regular Trading Hours" for a chart that does not have the option to toggle ETH/RTH. To achieve this, the actual chart data is hidden, and only the indicator is visible; alternatively, a 2nd instance of the indicator could change colors to match the chart background.
Using a combination of Bars and Japanese Candlesticks. Alternatively, this could be done by hiding the main chart data and using 2 instances of the indicator (one with " Chart Style " setting as Bars , and the other set to Candles ).
Using a combination of thin and thick bars on Range charts. Note: requires disabling the "Thin Bars" setting for Bar charts in the TradingView chart settings.
NOTES
If using more than one instance of this indicator on the same chart, you can use the TradingView "Save Indicator Template" feature to avoid having to re-configure the multiple indicators at a later time.
This indicator is intended to work "out-of-the-box" thanks to the behind_chart option introduced to Pine Script in October 2024. But you can always manually bring the indicator to the front just in case the color changes are not being seen (using the "More" option in the indicator status line: More > Visual Order > Bring to front ).
Many thanks to fikira for their help and inspiring me to create open source scripts.
Any feedback including bug reports or suggestions for improving the indicator (or source code itself) are always welcome in the comments section.
Simple Trend Strength & MomentumThis indicator will show a combination of Trend Strength, Volatility using an Adaptive Moving Average (AMA), and Market Momentum.
You can use this indicator to identify trends, volatility, and momentum shifts in real-time, making it an excellent tool for both trend-following and breakout strategies.
The three main features of this indicator are:
Adaptive Moving Average (AMA): Tracks the trend direction with a dynamic smoothing factor that adjusts based on market volatility. The AMA line changes color based on trend strength (green for bullish, red for bearish). I manually compute the Adaptive Moving Average (AMA) using a smoothing factor derived from the market's efficiency ratio. I have used fastLength and slowLength to control the responsiveness of the AMA.
Volatility Bands: Plots upper and lower bands around the AMA line, indicating price volatility. These bands dynamically adjust based on ATR, with a color gradient that changes intensity based on market volatility.
Momentum Circles: Positive momentum (ROC above the threshold) is shown as a green circle below the bar, while negative momentum is marked by a red circle above the bar. This makes it easy to spot momentum shifts.
The green dots in the indicator represent positive momentum. Specifically, they are displayed when the Rate of Change (ROC) of the price exceeds a predefined threshold (set as threshold in the input). This indicates that the market is experiencing upward price movement at a rate faster than the defined threshold.
How it works:
Rate of Change (ROC) measures the percentage change in price over a specified period (in this case, 14 periods).
When the ROC is greater than the set threshold (1.5 by default), a green circle (dot) is plotted below the price bar to signal that there is significant positive momentum.
This can be seen as an indicator of bullish momentum, where price is increasing at a relatively fast pace compared to previous periods.
The green dots help you spot when the price is moving upward rapidly, potentially signaling a good time to enter a long position or watch for further price action.
NOTE: It is vice versa for red dots.
PDL By iofexPrevious day levels
A Previous Day Level Indicator is a trading tool designed to highlight the key levels from the previous trading session, such as the high, low, and close prices. These levels act as significant support and resistance points, helping traders make informed decisions. By analyzing these levels, traders can anticipate potential price reversals, breakouts, or continuations in the current trading session. This indicator is particularly useful for day traders and scalpers aiming to align their strategies with market trends.
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.
JJ Psychological Levels (125 Increments)Psychological Levels Indicator
Description:
The Psychological Levels Indicator is a versatile tool designed for traders to identify key price levels that often act as support or resistance zones in the market. These levels are plotted at regular intervals, customizable by the user, starting from a base price level. This is particularly useful for spotting psychological price points that traders and investors frequently monitor.
Key Features:
1.Dynamic Psychological Levels:
- The script calculates and displays horizontal lines at price levels separated by customizable increments (default: 125 points).
- These levels are dynamically adjusted to the visible range of the chart.
2. Customizable Inputs:
- Starting Level: Set the base level from which increments are calculated (e.g., 0 or 1000).
- Step Size: Define the interval between levels (e.g., 125 for indices like Bank NIFTY).
3. Visual Representation:
- Horizontal lines are drawn at each psychological level, helping traders quickly identify key zones.
- Labels are placed next to each level, displaying the corresponding price for easy reference.
4. Application Across Instruments:
- This indicator works seamlessly with various asset classes, including stocks, indices, forex, and cryptocurrencies.
How to Use:
1.Identify Key Price Zones:
- Use the plotted psychological levels to spot areas where price action is likely to react.
- Levels such as 1125, 1250, and 1375 (for a step size of 125) are visually highlighted.
2. Plan Trades Around Key Levels:
- These levels can act as support/resistance or breakout points, providing opportunities for entry, exit, and stop-loss placement.
3. Customizable Settings:
- Adjust the starting level and step size to tailor the indicator to your trading instrument or strategy.
Why Psychological Levels Matter:
Psychological levels are widely followed by traders and often coincide with key market turning points due to their significance in human behavior and market psychology. They are frequently used by institutional traders, making them valuable reference points for intraday and swing trading.
Custom Settings:
- **Starting Level:** Default: `0`
- **Step Size:** Default: `125`
Disclaimer:
This indicator is a technical analysis tool and is not intended to provide financial advice. Always combine it with other indicators and perform your due diligence before making trading decisions.
Enhanced Retail vs Institutional ActivityThis script highlights market activity in real-time, making it easier to infer the type of market participants driving price and volume changes.
Here’s a list of what the script analyzes:
Volume:
Current volume of the candle.
Moving average of volume over a specified number of periods.
Volume spikes: Current volume compared to a threshold multiple of the moving average.
Price Movement:
Percentage change in price between the current and previous candle.
Identifies significant price changes based on a user-defined threshold.
Institutional Activity:
High volume spikes combined with significant price movements.
Retail Activity:
Periods without volume spikes or significant price changes.
VWAP (Volume-Weighted Average Price):
The average traded price over a specified lookback period, weighted by volume, used as a benchmark.
Market Context Visualization:
Background colors to differentiate institutional (red) and retail (green) activity.
Overlays for:
-Volume bars.
-Average volume line.
-VWAP line.
In summary:
Red = Institutional activity: High volume + significant price change.
Green = Retail activity: Low volume or insignificant price change.
---------------------------------------------------------------------------------------------------------------------
Analysis Explanation:
I’m forecasting that Bitcoin will retest its November 12th low (~$85,098.75) around January 20th, 2025, where the horizontal support line intersects with the downtrend line. This conclusion is based on the following:
Trend Analysis:
The chart shows a clear downtrend with price respecting the descending trendline.
The intersection of the horizontal support and the downtrend line on January 20th indicates a confluence point where price action may gravitate.
Volume and Activity Insights:
Using the Retail vs Institutional Activity indicator, the chart highlights periods dominated by institutional (red background) or retail (green background) activity.
Current price action is in a green zone, suggesting predominantly retail participation with lower volume and insignificant price movements.
Retail vs Institutional Dynamics:
Institutional activity (red zones) aligns with significant price movements and volume spikes, often marking key turning points or trends.
The recent green retail-dominated periods suggest a lack of strong momentum, which may lead to continued price decline until institutions re-enter around the confluence area.
Volume Observations:
Volume remains relatively low during the current retail phase, indicating weak buying pressure.
A potential surge in institutional activity (red zones) near the support level could trigger a rebound or breakdown.
I expect Bitcoin’s price to drop further and test the November 12th low near $85,098.75 on January 20th, 2025. This projection is supported by the convergence of the downtrend line and horizontal support, low retail-driven volume, and historical institutional activity patterns observed using the "Retail vs Institutional Activity" indicator.
Elephant Bars
**Elephant Bars Indicator**
This indicator identifies and highlights candlesticks that are significantly larger than the recent average candlestick size. It helps traders quickly spot strong price movements.
- **Percentage Threshold:** The candlestick must be this much larger than the average of the last 5 candles (default is 50%).
- **Body Percentage Threshold:** The candle body must be at least this percentage of the total candle size (default is 80%).
- **Border Color:** Sets the color of the highlighted candle's border.
- **Border Thickness:** Sets the thickness of the border around the highlighted candle.
**How It Works:**
1. The script calculates the size of the current candlestick and its body.
2. It computes the average size of the last 5 candlesticks.
3. The indicator highlights candles that are both significantly larger than the average size and have a body that is a substantial portion of the total candle size.
This indicator is particularly useful for identifying potential breakout or reversal points, as large candlesticks often signify strong market sentiment.
Feel free to tweak the description to better fit your needs! 🚀
Annual Performance Table with Average PeformanceAn indicator that displays annual performance in a table format, providing a quick overview of yearly returns with historical context.
It calculates the performance based on the first and last monthly close prices of each year. It displays returns chronologically from left to right, concluding with an average performance column.
Features :
Works exclusively on monthly timeframes
Customizable number of years to display (1-50 years)
Shows year-by-year performance percentages
Color-coded returns (green for positive, red for negative)
Includes average performance across displayed years
Semi-transparent overlay design for better chart visibility
Performance calculation method:
Performance = ((December Close - January Close) / January Close) × 100%
Usage :
Apply to any chart on monthly timeframe
Adjust the "Number of Years to Display" parameter as needed
Table appears as an overlay with years, individual performances, and average
Note: The indicator will display an error message if applied to any timeframe other than monthly.
The Curved Market Structure [BigBeluga]Curved Market Structure
The Curved Market Structure indicator offers an innovative twist on traditional market structure tools by using curved lines instead of horizontal ones, enabling faster breakout detection for traders.
🔵Key Features:
Curved Market Structure Levels: The indicator identifies high and low pivots and plots curved lines connecting these points, adapting to market dynamics and providing a more intuitive view of potential breakout zones.
Breakout Detection: Breakouts above or below the curved levels are marked with triangle symbols (▲ or ▼), making it easy to spot critical price movements.
Dynamic Target Levels: After a breakout, the indicator plots three target levels, which serve as potential price objectives. Each target is marked with a number and a star (e.g., 1★) upon being reached.
Customizable Line Length and Angle: Users can adjust the length and angle of the curved lines to fit their trading style and timeframe, making the tool versatile and adaptable.
Market Structure Trend Filtering: To maintain a clean chart, the indicator plots curved levels only from high pivots during uptrends and low pivots during downtrends.
🔵How It Works:
The indicator identifies high and low pivots using user-defined parameters (left and right bars).
Curved lines are drawn from these pivot points, showing the structure of the market and potential breakout zones.
When a breakout occurs, the indicator highlights the direction with triangle symbols and dynamically plots three price targets.
Upon reaching these targets, the level is marked with its respective number and a star, helping traders track price progression effectively.
The lines and targets are adjusted based on market conditions, ensuring real-time relevance and accuracy.
🔵Use Cases:
Spotting key breakout zones to identify entry and exit points more effectively.
Setting dynamic target levels for take-profit or stop-loss planning.
Filtering market noise and maintaining a cleaner chart while analyzing trends.
Enhancing traditional market structure analysis with an intuitive curved visualization.
This indicator is ideal for traders who want a modern, dynamic, and visually appealing way to track market structure and breakouts while maintaining chart clarity.
Ultra Disparity IndexGain insights into price movements across multiple timeframes with the Ultra Disparity Index . This indicator highlights overbought/oversold levels based on price disparities from moving averages.
Introduction
The Ultra Disparity Index is designed for traders who seek a deeper understanding of price movements and trends across various timeframes. By analyzing the disparity between the current price and its moving averages, the indicator helps identify overbought and oversold conditions.
Detailed Description
The indicator works by calculating the percentage difference between the current price and its moving averages over four user-defined lengths. It operates on multiple timeframes monthly, weekly, daily, 4-hour, and 1-hour giving traders a comprehensive view of market dynamics.
.........
Disparity Calculation
The indicator computes how far the current price is from moving averages to reveal the degree of disparity.
.....
Overbought/Oversold Zones
By normalizing disparities into percentages relative to the overbought/oversold range, the indicator represents overbought (100%) and oversold (-100%).
.....
Timeframe Flexibility
The user can visualize data from monthly to hourly intervals, ensuring adaptability to different trading strategies.
.....
Customizable Inputs
Users can configure moving average lengths and toggle visibility for specific timeframes and levels.
.........
Summary
The indicator uses simple moving averages (SMAs) as a benchmark for calculating disparity. This disparity is then analyzed using statistical tools, such as standard deviation, to derive meaningful levels. Finally, the results are visualized in a table, providing traders with an easy-to-read summary of disparity values and their respective normalized percentages.
Customizable MTF Multiple Moving AveragesTitle:
Customizable Multiple Moving Averages with Dynamic Colors
Description:
This script allows you to calculate up to three customizable moving averages, offering the flexibility to choose from multiple moving average types:
SMA (Simple Moving Average)
EMA (Exponential Moving Average)
WMA (Weighted Moving Average)
VWMA (Volume Weighted Moving Average)
SMMA (Smoothed Moving Average)
Key Features:
Separate Timeframe for Each Moving Average:
Each moving average can be calculated on a different timeframe. For instance, you can display a 1D moving average while working on a 4H chart.
Dynamic Colors:
Moving averages dynamically change color based on their trend:
Uptrend Color: When the moving average is increasing compared to the previous bar of its timeframe.
Downtrend Color: When the moving average is decreasing.
Full Customization:
Length: Adjust the period for each moving average.
Source: Choose any price data source (e.g., close, open, high, low).
Colors: Set custom colors for uptrend and downtrend behavior.
Perfect For:
Multi-Timeframe Trend Analysis:
Observe trends from higher timeframes without switching your current chart.
Crossover Strategies:
Combine multiple moving averages to identify entry and exit signals.
How to Use:
Load the Script: Apply it to your chart.
Configure Inputs: Adjust each moving average's settings from the input panel.
Analyze Trends: Visualize dynamic trend movements with easy-to-identify colors.
Example Configuration:
Set MA1 to a 50-period EMA on a 4H timeframe.
Set MA2 to a 100-period SMMA on a 1D timeframe.
Set MA3 to a 200-period VWMA on a 1W timeframe.
ENIGMA Signals with Retests Select higher Time FrameENIGMA Signals with Retests – Script Description
The "ENIGMA Signals with Retests" script is a unique indicator designed for traders who prefer precision trading based on price action retests of key levels derived from higher timeframes. This tool is ideal for those employing multi-timeframe analysis strategies, helping them detect high-probability trade entries when the price interacts with significant support and resistance levels.
What Does This Script Do?
This indicator identifies key levels from a higher timeframe selected by the user (e.g., 4-hour or daily), then tracks price action on lower timeframes to provide actionable buy and sell signals when the price retests these levels. It visually plots the key levels on the chart and triggers alerts for potential trade opportunities when conditions are met.
How It Works
Key Level Detection:
The script uses custom functions to detect recent swing highs and swing lows on the selected higher timeframe (such as 4H or Daily). These levels represent potential areas of support and resistance where price reactions are likely to occur.
Multi-Timeframe Analysis:
The indicator leverages the request.security() function to retrieve price data from the user-defined higher timeframe and plots horizontal lines on the chart for the most recent swing highs and lows.
Retest-Based Signals:
Once the key levels are plotted, the script continuously monitors the price on the lower timeframe:
A Buy Signal is triggered when the price closes below a key high level and then moves back above it, indicating a potential bullish retest.
A Sell Signal is triggered when the price closes above a key low level and then moves back below it, indicating a potential bearish retest.
These retest signals are displayed as green and red arrows on the chart, helping traders identify optimal entry points.
Alerts for Retests:
The script includes built-in alert conditions that notify traders when a valid retest signal occurs. This allows traders to react promptly without constantly monitoring the chart.
How to Use the Script
Select Your Key Timeframe:
From the input settings, choose a higher timeframe that suits your trading style (e.g., 4H for intraday trading or Daily for swing trading).
Adjust Visual Preferences:
Customize the line style (solid, dashed, or dotted) and length of the plotted levels.
Toggle labels for the levels on or off as per your preference.
Trade Execution:
Once a retest signal appears on the lower timeframe, consider entering a trade in the direction of the signal. The buy signal suggests a potential long entry, while the sell signal indicates a potential short entry.
Set Alerts:
Use the alert conditions provided to get notified whenever a valid retest occurs. This helps in reducing screen time and improving trading efficiency.
Underlying Concepts
This script is grounded in the principles of support and resistance, retests, and breakout trading. By focusing on multi-timeframe key levels, it aligns with widely used trading concepts like:
Breakout and Retest: Entering trades after a confirmed breakout and successful retest of a significant level.
Swing Highs and Lows: Recognizing swing points to identify strong price reaction zones.
Multi-Timeframe Confluence: Enhancing trade probability by ensuring that the signals on lower timeframes correspond with key levels from higher timeframes.
Why This Script Is Unique
Unlike many generic trend-following or scalping indicators, "ENIGMA Signals with Retests" offers:
Precision Signals: It only provides signals when specific retest conditions are met, reducing false signals and noise.
Multi-Timeframe Customization: Users can tailor the higher timeframe to their strategy, making it versatile for various trading styles.
Alert Functionality: Alerts are integrated, allowing traders to stay updated without constantly monitoring the charts.
This script is perfect for traders looking for a systematic way to trade retests of key levels across multiple timeframes. Whether you're a scalper, day trader, or swing trader, "ENIGMA Signals with Retests" can help improve your precision and timing in the market.
EBL - Enigma BOS Logic Select Higher Time FrameThe "EBL – Enigma BOS Logic" is a unique multi-timeframe trading indicator designed for traders who rely on structured price action and key level retests to find high-probability trade opportunities. This indicator automates the identification of significant price levels on a higher timeframe, plots them across all lower timeframes, and provides actionable signals (buy/sell) when price retests those levels. It is ideal for traders who focus on lower timeframes for precise entries while using higher timeframe structure for trend confirmation.
How the Indicator Works
Key Level Detection:
The indicator allows the user to select a key level timeframe (e.g., 1H, 4H, Daily, Weekly). It then identifies Break of Structure (BOS) levels on the selected timeframe.
When a bullish-to-bearish or bearish-to-bullish reversal is detected on the selected timeframe, the corresponding high or low of the reversal candle is stored as a key level.
These key levels are plotted as horizontal lines on all lower timeframes, helping the trader visualize critical support and resistance zones across multiple timeframes.
Retest Confirmation:
Once a key level is established, the indicator continuously monitors the price action on lower timeframes.
If the price touches or crosses a key level, it is considered a retest, and an alert is generated.
The indicator plots a retest marker (customizable as a circle or diamond) at the exact price level where the retest occurred, providing a clear visual cue for the trader.
Trading Signals:
When a retest is detected, a table is displayed on the chart with the following information:
The trading pair.
The signal direction (Buy/Sell).
The price at which the retest occurred.
This table gives traders instant insight into actionable opportunities, making it easier to focus on live market conditions without missing critical retests.
Key Features
Multi-Timeframe Analysis: The indicator focuses on a higher timeframe selected by the user, ensuring that only the most relevant key levels are plotted for lower timeframe trading.
Dynamic Retest Signals: It dynamically identifies when price retests a key level and provides both visual markers and real-time alerts.
Customizable Retest Markers: Users can customize the retest marker's shape (circle/diamond) and color to suit their preferences.
Signal Table: A built-in table displays clear buy or sell signals when retests occur, ensuring that traders have all the necessary information at a glance.
Alerts: The indicator supports real-time alerts for retests, helping traders stay informed even when they are not actively monitoring the chart.
How to Use the Indicator
Select a Key Level Timeframe:
In the input settings, choose a higher timeframe (e.g., 4H or Daily) to define key levels.
The indicator will calculate Break of Structure (BOS) levels on the selected timeframe and plot them as horizontal lines across all lower timeframes.
Monitor Lower Timeframes for Retests:
Switch to a lower timeframe (e.g., 15m, 5m) to wait for price to approach the key levels plotted by the indicator.
When a retest occurs, observe the signal table and retest marker for actionable trade signals.
Act on Buy/Sell Signals:
Use the information provided by the signal table to make trading decisions.
For a buy signal, wait for bullish confirmation (e.g., price holding above the retested level).
For a sell signal, wait for bearish confirmation (e.g., price holding below the retested level).
Trading Concepts and Underlying Logic
The indicator is based on the Break of Structure (BOS) concept, a core principle in price action trading. BOS levels represent points where the market shifts its trend direction, making them critical zones for potential reversals or continuations.
By focusing on higher timeframe BOS levels, the indicator helps traders align their lower timeframe entries with the overall market trend.
The concept of retests is used to confirm the validity of a key level. A retest occurs when the price returns to a previously identified BOS level, offering a high-probability entry point.
Use Cases
Scalping: Traders who prefer lower timeframe scalping can use the indicator to align their trades with higher timeframe key levels, increasing the likelihood of successful trades.
Swing Trading: Swing traders can use the indicator to identify key reversal zones on higher timeframes and plan their trades accordingly.
Intraday Trading: Intraday traders can benefit from the real-time alerts and signals generated by the indicator, ensuring they never miss critical retests during active trading hours.
Conclusion
The "EBL – Enigma BOS Logic" is a powerful tool for traders who want to enhance their price action trading by focusing on key levels and retests across multiple timeframes. By automating the identification of BOS levels and providing clear retest signals, it helps traders make more informed and confident trading decisions. Whether you are a scalper, intraday trader, or swing trader, this indicator offers valuable insights to improve your trading performance.
Daily Asian RangeDaily Asian Range Indicator
This indicator is an enhanced version inspired by @toodegrees' "ICT Friday's Asian Range" indicator. While maintaining the core concepts, this version expands functionality for daily analysis and adds comprehensive customization options.
### Overview
The Asian Range indicator identifies and visualizes potential liquidity areas based on price action during the Asian session (8:00 PM - 12:00 AM ET). It plots both body and wick ranges along with multiple standard deviation levels that can serve as potential price targets or areas of interest.
### Features
- Flexible Display Options
- Choose between Body, Wick, or Both for range boxes and deviation lines
- Customizable colors, styles, and borders for all visual elements
- Historical sessions display (0-20 previous sessions)
- Advanced Standard Deviation Levels
- Multiple deviation multipliers (1.0, 1.5, 2.0, 2.3, 3.5)
- Separate visualization for body and wick-based deviations
- Clear labeling system for easy identification
- Precise Time Management
- Asian session: 8:00 PM - 12:00 AM ET
- Deviation lines extend through the following trading day
- Proper timezone handling for accuracy
### Usage
- Works on timeframes from 1 to 15 minutes
- Use the range boxes to identify key price levels from the Asian session
- Standard deviation levels can serve as potential targets or areas of interest
- Combine with other indicators for enhanced analysis
### Credits
Original concept and base implementation by @toodegrees
Enhanced and expanded by @Omarqqq
### Disclaimer
This indicator is for educational and informational purposes only. Always conduct your own analysis and use proper risk management.
Comprehensive RSI, MACD & Stochastic Table
RSI, MACD, and Stochastic Multi-Asset Indicator for TradingView
Introduction
The RSI, MACD, and Stochastic Multi-Asset Indicator is a comprehensive tool designed for traders who want to analyze multiple assets simultaneously while utilizing some of the most popular technical indicators. This indicator is tailored for all market types—whether you're trading cryptocurrencies, stocks, forex, or commodities—and provides a consolidated dashboard for faster and more informed decision-making.
This tool combines Relative Strength Index (RSI), Moving Average Convergence Divergence (MACD), and Stochastic Oscillator, three of the most effective momentum and trend-following indicators. It provides a visual, color-coded table for quick insights and alerts for significant buy or sell opportunities.
---
What Does This Indicator Do?
This indicator performs the following key functions:
1. Multi-Asset Analysis: Analyze two assets side by side, allowing you to monitor their momentum, trends, and overbought/oversold conditions simultaneously.
2. Combines Three Powerful Indicators:
RSI: Tracks market momentum and identifies overbought/oversold zones.
MACD: Highlights trend direction and momentum shifts.
Stochastic Oscillator: Provides insights into overbought/oversold zones with smoothing for better accuracy.
3. Color-Coded Dashboard: Displays all indicator values in an easy-to-read table with color coding for quick identification of market conditions.
4. Real-Time Alerts: Generates alerts when strong bullish or bearish conditions are met across multiple indicators.
---
Key Features
1. Customizable Inputs
You can adjust RSI periods, MACD parameters, Stochastic settings, and timeframes to suit your trading style.
Analyze default or custom assets (e.g., BTC/USDT, ETH/USDT).
2. Multi-Timeframe Support
Use this indicator on any timeframe (e.g., 1-minute, 1-hour, daily) to suit your trading strategy.
3. Comprehensive Dashboard
Displays values for RSI, MACD, and Stochastic for two assets in one clean, compact table.
Automatically highlights overbought (red), oversold (green), and neutral (gray) conditions.
4. Buy/Sell Signals
Plots buy/sell signals on the chart when all indicators align in strong bullish or bearish zones.
Example:
Strong Buy: RSI above 50, Stochastic %K above 80, and MACD histogram positive.
Strong Sell: RSI below 50, Stochastic %K below 20, and MACD histogram negative.
5. Real-Time Alerts
Alerts notify you when a strong buy or sell condition is detected, so you don't miss critical trading opportunities.
---
Who Is This Indicator For?
This indicator is perfect for:
Day Traders who need real-time insights across multiple assets.
Swing Traders who want to identify mid-term trends and momentum shifts.
Crypto, Stock, and Forex Traders looking for a consolidated tool that works across all asset classes.
---
How It Works
1. RSI (Relative Strength Index):
Tracks momentum by measuring the speed and change of price movements.
Overbought: RSI > 70 (Red).
Oversold: RSI < 30 (Green).
2. MACD (Moving Average Convergence Divergence):
Combines two exponential moving averages (EMA) to track momentum and trend direction.
Positive Histogram: Bullish momentum.
Negative Histogram: Bearish momentum.
3. Stochastic Oscillator:
Tracks price relative to its high-low range over a specific period.
Overbought: %K > 80.
Oversold: %K < 20.
4. Table View:
Displays indicator values for both assets in an intuitive table format.
Highlights critical zones with color coding.
5. Alerts:
Alerts are triggered when:
RSI, MACD, and Stochastic align in strong bullish or bearish conditions.
These conditions are based on customizable thresholds.
---
How to Use the Indicator
1. Add the Indicator to Your Chart:
After publishing, search for the indicator by its name in TradingView's Indicators tab.
2. Customize Inputs:
Adjust settings for RSI periods, MACD parameters, and Stochastic smoothing to suit your strategy.
3. Interpret the Table:
Check the table for highlighted zones (red for overbought, green for oversold).
Look for bullish or bearish signals in the "Signal" column.
4. Act on Alerts:
Use the real-time alerts to take action when strong conditions are met.
---
Example Use Cases
1. Crypto Day Trading:
Monitor BTC/USDT and ETH/USDT simultaneously for strong bullish or bearish conditions.
Receive alerts when RSI, MACD, and Stochastic align for a potential reversal.
2. Swing Trading Stocks:
Track a stock (e.g., AAPL) and its sector ETF (e.g., QQQ) to find momentum-based opportunities.
3. Forex Scalping:
Identify overbought/oversold conditions across multiple currency pairs.
---
Conclusion
The RSI, MACD, and Stochastic Multi-Asset Indicator simplifies your trading workflow by consolidating multiple technical indicators into one powerful tool. With real-time insights, color-coded visuals, and customizable alerts, this indicator is designed to help you stay ahead in any market.
Whether you're a beginner or an experienced trader, this indicator provides everything you need to make confident trading decisions. Add it to your TradingView chart today and take your analysis to the next level!
---
Make sure to leave your feedback and suggestions so I can continue improving the tool for the community. Happy trading!