Forex Heatmap█ OVERVIEW
This indicator creates a dynamic grid display of currency pair cross rates (exchange rates) and percentage changes, emulating the Cross Rates and Heat Map widgets available on our Forex page. It provides a view of realtime exchange rates for all possible pairs derived from a user-specified list of currencies, allowing users to monitor the relative performance of several currencies directly on a TradingView chart.
█ CONCEPTS
Foreign exchange
The Foreign Exchange (Forex/FX) market is the largest, most liquid financial market globally, with an average daily trading volume of over 5 trillion USD. Open 24 hours a day, five days a week, it operates through a decentralized network of financial hubs in various major cities worldwide. In this market, participants trade currencies in pairs , where the listed price of a currency pair represents the exchange rate from a given base currency to a specific quote currency . For example, the "EURUSD" pair's price represents the amount of USD (quote currency) that equals one unit of EUR (base currency). Globally, the most traded currencies include the U.S. dollar (USD), Euro (EUR), Japanese yen (JPY), British pound (GBP), and Australian dollar (AUD), with USD involved in over 87% of all trades.
Understanding the Forex market is essential for traders and investors, even those who do not trade currency pairs directly, because exchange rates profoundly affect global markets. For instance, fluctuations in the value of USD can impact the demand for U.S. exports or the earnings of companies that handle multinational transactions, either of which can affect the prices of stocks, indices, and commodities. Additionally, since many factors influence exchange rates, including economic policies and interest rate changes, analyzing the exchange rates across currencies can provide insight into global economic health.
█ FEATURES
Requesting a list of currencies
This indicator requests data for every valid currency pair combination from the list of currencies defined by the "Currency list" input in the "Settings/Inputs" tab. The list can contain up to six unique currency codes separated by commas, resulting in a maximum of 30 requested currency pairs.
For example, if the specified "Currency list" input is "CAD, USD, EUR", the indicator requests and displays relevant data for six currency pair combinations: "CADUSD", "USDCAD", "CADEUR", "EURCAD", "USDEUR", "EURUSD". See the "Grid display" section below to understand how the script organizes the requested information.
Each item in the comma-separated list must represent a valid currency code. If the "Currency list" input contains an invalid currency code, the corresponding cells for that currency in the "Cross rates" or "Heat map" grid show "NaN" values. If the list contains empty items, e.g., "CAD, ,EUR, ", the indicator ignores them in its data requests and calculations.
NOTE: Some uncommon currency pair combinations might not have data feeds available. If no available symbols provide the exchange rates between two specified currencies, the corresponding table cells show "NaN" results.
Realtime data
The indicator retrieves realtime market prices, daily price changes, and minimum tick sizes for all the currency pairs derived from the "Currency list" input. It updates the retrieved information shown in its grid display after new ticks become available to reflect the latest known values.
NOTE: Pine scripts execute on realtime bars only when new ticks are available in the chart's data feed. If no new updates are available from the chart's realtime feed, it may cause a delay in the data the indicator receives.
Grid display
This indicator displays the requested data for each currency pair in a table with cells organized as a grid. Each row name corresponds to a pair's base currency , and each column name corresponds to a quote currency . The cell at the intersection of a specific row and column shows the value requested from the corresponding currency pair.
For example, the cell at the intersection of a "EUR" row and "USD" column shows the data retrieved for the "EURUSD" currency pair, and the cell at the "USD" row and "EUR" column shows data for the inverse pair ("USDEUR").
Note that the main diagonal cells in the table, where rows and columns with the same names intersect, are blank. The exchange rate from one currency to itself is always 1, and no Forex symbols such as "EUREUR" exist.
The dropdown input at the top of the "Settings/Inputs" tab determines the type of information displayed in the table. Two options are available: "Cross rates" and "Heat map" . Both modes color their cells for light and dark themes separately based on the inputs in the "Colors" section.
Cross rates
When a user selects the "Cross rates" display mode, the table's cells show the latest available exchange rate for each currency pair, emulating the behavior of the Cross Rates widget. Each cell's value represents the amount of the quote currency (column name) that equals one unit of the base currency (row name). This display allows users to compare cross rates across currency pairs, and their inverses.
The background color of each cell changes based on the most recent update to the exchange rate, allowing users to monitor the direction of short-term fluctuations as they occur. By default, the background turns green (positive cell color) when the cross rate increases from the last recorded update and red (negative cell color) when the rate decreases. The cell's color reverts to the chart's background color after no new updates are available for 200 milliseconds.
Heat map
When a user selects the "Heat map" display mode, the table's cells show the latest daily percentage change of each currency pair, emulating the behavior of the Heat Map widget.
In this mode, the background color of each cell depends on the corresponding currency pair's daily performance. Heat maps typically use colors that vary in intensity based on the calculated values. This indicator uses the following color coding by default:
• Green (Positive cell color): Percentage change > +0.1%
• No color: Percentage change between 0.0% and +0.1%
• Bright red (Negative cell color): Percentage change < -0.1%
• Lighter/darker red (Minor negative cell color): Percentage change between 0.0% and -0.1%
█ FOR Pine Script™ CODERS
• This script utilizes dynamic requests to iteratively fetch information from multiple contexts using a single request.security() instance in the code. Previously, `request.*()` functions were not allowed within the local scopes of loops or conditional structures, and most `request.*()` function parameters, excluding `expression`, required arguments of a simple or weaker qualified type. The new `dynamic_requests` parameter in script declaration statements enables more flexibility in how scripts can use `request.*()` calls. When its value is `true`, all `request.*()` functions can accept series arguments for the parameters that define their requested contexts, and `request.*()` functions can execute within local scopes. See the Dynamic requests section of the Pine Script™ User Manual to learn more.
• Scripts can execute up to 40 unique `request.*()` function calls. A `request.*()` call is unique only if the script does not already call the same function with the same arguments. See this section of the User Manual's Limitations page for more information.
• Typically, when requesting higher-timeframe data with request.security() using barmerge.lookahead_on as the `lookahead` argument, the `expression` argument should use the history-referencing operator to offset the series, preventing lookahead bias on historical bars. However, the request.security() call in this script uses barmerge.lookahead_on without offsetting the `expression` because the script only displays results for the latest historical bar and all realtime bars, where there is no future information to leak into the past. Instead, using this call on those bars ensures each request fetches the most recent data available from each context.
• The request.security() instance in this script includes a `calc_bars_count` argument to specify that each request retrieves only a minimal number of bars from the end of each symbol's historical data feed. The script does not need to request all the historical data for each symbol because it only shows results on the last chart bar that do not depend on the entire time series. In this case, reducing the retrieved bars in each request helps minimize resource usage without impacting the calculated results.
Look first. Then leap.
Sentiment
Yorks RSI Combined Bull and Bear Zone with Adjustable TimeframeBased on 'RSI with Divergences, Reverse Formulas, and Bull/Bear Zones by @kylealberry
I have combined two of Kyle's script together with the option of having one set to current time frame and a second on a higher time frame. You can choose your own theshold's for bull/bear zones on both time frames. When both time frames are in agreement the indicator will show either a green (bull zone) or red (bear zone) background. When the two time frame bull/bear zones are not in agreement the indicator will show a grey background (no trade zone).
For example if you have rsi 1 thresholds set to 35 and 65 and rsi 2 thresholds both set to 50 on your chosen higher time frame, when rsi is in a bull zone (rsi has crossed above 65 and not yet crossed below 35) and rsi 2 is above 50 on higher time frame the indicator background will be green. If rsi drops below 50 the background will turn grey.
My idea for use it is in either a red or green background wait for a pullback (background must remain red or green) and use your favourite entry trigger. Avoid trading when the indicator is showing a grey background.
Option Delta CandlesDescription:
The Option Delta Candles with EMA indicator is designed to help traders visualize option delta values as candlesticks, calculated using the Black-Scholes model. It provides a unique way to view the cumulative delta changes in a normalized format, making it easier to identify trends and reversals. The addition of an EMA (Exponential Moving Average) overlay helps smooth out the data for better trend analysis.
Features:
Customizable Inputs:
Risk-Free Interest Rate: Adjust the risk-free rate for more precise option calculations.
Volatility: Input the volatility of the underlying asset to reflect current market conditions.
Strike Price: Enter the desired strike price of the option.
Days to Expiration: Specify the days until the option's expiration.
EMA Length: Modify the length of the EMA to suit different time frames and trading styles.
Visual Styles:
Customizable candle colors for bullish and bearish candles.
Configurable border and wick colors for personalized chart aesthetics.
How It Works:
The indicator uses the Black-Scholes model to calculate the delta of a European call option. Delta measures the sensitivity of the option's price to changes in the price of the underlying asset.
A cumulative delta is calculated and normalized to create candlestick representations, providing a visual cue of how the option delta changes over time.
The scaled delta values are normalized between 0 and 1, allowing for a consistent view of relative strength and weakness.
The EMA overlay helps identify smoothed trends and potential reversals within the delta data.
Applications:
Trend Identification: The indicator helps spot trends and potential reversals in option delta movements.
Volatility Analysis: By visualizing option delta, traders can gain insight into how changes in volatility impact options pricing.
Advanced Analysis: This tool is ideal for options traders and analysts looking to integrate delta analysis into their strategies.
Use Cases:
Traders can use the candlestick view to understand shifts in market sentiment through delta changes.
Options Analysts can visualize delta fluctuations over time, aiding in complex options trading strategies.
Technical Analysts may combine this indicator with other tools to confirm signals and enhance trading decisions.
Indicator Configuration:
Input Settings:
Risk-free interest rate (as a percentage).
Volatility (standard deviation) in percentage.
Strike price of the option.
Days remaining until expiration.
EMA length for trend analysis.
Style Customization:
Select colors for bullish and bearish candles, border, and wicks.
Change the color of the EMA line to distinguish it on the chart.
Release Notes:
Initial Version: Includes full implementation of the Black-Scholes delta calculation with customizable EMA and normalized candlestick view.
Future Updates: Potential additions may include enhancements for put options and integrated alerts.
Bilateral Stochastic Oscillator XI took the Bilateral Stochastic Oscillator created by alexgrover and merely added more moving average filter options and reduced the standard inputs for shorter term trend analysis.
I also updated the script to version 5.
The filter options are now:
SMA
EMA
RMA
HMA
WMA
VWMA
TMA
LSMA
Cheers.
Dual TWAP MomentumDual TWAP Momentum
The Dual TWAP Momentum indicator leverages two Time-Weighted Average Price (TWAP) calculations to identify trend-following and momentum-based intraday trading opportunities. It combines the precision of shorter-term trends with the reliability of higher timeframes, providing traders with a robust framework for entries and exits.
Key Features:
Dual TWAP Confirmation: Uses a 30-minute and 1-day TWAP to validate market direction.
Intraday Focus: Designed specifically for the morning session, with entries based on the 9:33 AM candle.
Dynamic Profit Target: Incorporates risk management rules with adjustable multiple profit-taking levels.
Immediate Exit on SL Hit: Ensures disciplined risk control by exiting trades as soon as the stop-loss is triggered.
Ideal For:
Intraday traders looking for a systematic approach.
Momentum-based strategies in trending markets.
Those seeking to combine short-term precision with higher timeframe validation.
How It Works:
1. Long Entry: When the 9:33 AM candle closes above both TWAPs.
2. Short Entry: When the 9:33 AM candle closes below both TWAPs.
3. Risk Management: Sets stop-loss and profit targets with flexibility for trailing profits, Fixed Stop-Loss and Profit Range: The strategy adheres to a fixed stop-loss with a profit range of 1:2 to 1:3 risk-reward ratio. This ensures consistent risk control while optimizing profit potential.
Applicability:
This strategy is specifically designed for Indices and not suitable for stocks.
Disclaimer:
This indicator is for educational purposes only. Use it as part of a comprehensive trading plan and conduct your own due diligence before trading.
Average Yield InversionDescription:
This script calculates and visualizes the average yield curve spread to identify whether the yield curve is inverted or normal. It takes into account short-term yields (1M, 3M, 6M, 2Y) and long-term yields (10Y, 30Y).
Positive values: The curve is normal, indicating long-term yields are higher than short-term yields. This often reflects economic growth expectations.
Negative values: The curve is inverted, meaning short-term yields are higher than long-term yields, a potential signal of economic slowdown or recession.
Key Features:
Calculates the average spread between long-term and short-term yields.
Displays a clear graph with a zero-line reference for quick interpretation.
Useful for tracking macroeconomic trends and potential market turning points.
This tool is perfect for investors, analysts, and economists who need to monitor yield curve dynamics at a glance.
XRP Comparative Price Action Indicator - Final VersionXRP Comparative Price Action Indicator - Final Version
The XRP Comparative Price Action Indicator provides a comprehensive visual analysis of XRP’s price movements relative to key cryptocurrencies and market indices. This indicator normalises price data across various assets, allowing traders and investors to assess XRP’s performance against its peers and major market influences at a glance.
Key Features:
• Normalised Price Data: Prices are scaled between 0.00 and 1.00,
enabling straightforward comparisons between different assets.
• Key Comparisons: Includes normalised prices for:
• XRP/USD (Bitstamp)
• XRP Dominance (CryptoCap)
• XRP/BTC (Bitstamp)
• BTC/USD (Bitstamp)
• BTC Dominance (CryptoCap)
• USDT Dominance (CryptoCap)
• S&P 500 (SPY)
• DXY (Dollar Index)
• ETH/USD (Bitstamp)
• ETH Dominance (CryptoCap)
• XRP/ETH (Binance)
• Visual Clarity: Each asset is plotted with distinct colors for easy identification,
with thicker lines enhancing visibility on the chart.
• Reference Lines: Optional horizontal lines indicate the minimum (0) and maximum (1) normalised values, providing clear reference points for analysis.
This indicator is ideal for traders looking to understand XRP’s relative performance, gauge market sentiment, and make informed trading decisions based on comparative price action.
Range Detect SystemTechnical analysis indicator designed to identify potential significant price ranges and the distribution of volume within those ranges. The system helps traders calculate POC and show volume history. Also detecting breakouts or potential reversals. System identifies ranges with a high probability of price consolidation and helps screen out extreme price moves or ranges that do not meet certain volatility thresholds.
⭕️ Key Features
Range Detection — identifies price ranges where consolidation is occurring.
Volume Profile Calculation — indicator calculates the Point of Control (POC) based on volume distribution within the identified range, enhancing the analysis of market structure.
Volume History — shows where the largest volume was traded from the center of the range. If the volume is greater in the upper part of the range, the color will be green. If the volume is greater in the lower part, the color will be red.
Range Filtering — Includes multi-level filtering options to avoid ranges that are too volatile or outside normal ranges.
Visual Customization — Shows graphical indicators for potential bullish or bearish crossovers at the upper and lower range boundaries. Users can choose the style and color of the lines, making it easier to visualize ranges and important levels on the chart.
Alerts — system will notify you when a range has been created and also when the price leaves the range.
⭕️ How it works
Extremes (Pivot Points) are taken as a basis, after confirming the relevance of the extremes we take the upper and lower extremes and form a range. We check if it does not violate a number of rules and filters, perform volume calculations, and only then is the range displayed.
Pivot points is a built-in feature that shows an extremum if it has not been updated N bars to the left and N bars to the right. Therefore, there is a delay depending on the bars specified to check, which allows for a more accurate range. This approach allows not to make unnecessary recalculations, which completely eliminates the possibility of redrawing or range changes.
⭕️ Settings
Left Bars and Right Bars — Allows you to define the point that is the highest among the specified number of bars to the left and right of this point.
Range Logic — Select from which point to draw the range. Maximums only, Minimums only or both.
Use Wick — Option to consider the wick of the candles when identifying Range.
Breakout Confirmation — The number of bars required to confirm a breakout, after which the range will close.
Minimum Range Length — Sets the minimum number of candles needed for a range to be considered valid.
Row Size — Number of levels to calculate POC. *Larger values increase the script load.
% Range Filter — Dont Show Range is than more N% of Average Range.
Multi Filter — Allows use of Bollinger Bands, ATR, SMA, or Highest-Lowest range channels for filtering ranges based on volatility.
Range Hit — Shows graphical labels when price hits the upper or lower boundaries of the range, signaling potential reversal or breakout points.
Range Start — Show points where Range was created.
Volume StatsDescription:
Volume Stats displays volume data and statistics for every day of the year, and is designed to work on "1D" timeframe. The data is displayed in a table with columns being months of the year, and rows being days of each month. By default, latest data is displayed, but you have an option to switch to data of the previous year as well.
The statistics displayed for each day is:
- volume
- % of total yearly volume
- % of total monthly volume
The statistics displayed for each column (month) is:
- monthly volume
- % of total yearly volume
- sentiment (was there more bullish or bearish volume?)
- min volume (on which day of the month was the min volume)
- max volume (on which day of the month was the max volume)
The cells change their colors depending on whether the volume is bullish or bearish, and what % of total volume the current cell has (either yearly or monthly). The header cells also change their color (based either on sentiment or what % of yearly volume the current month has).
This is the first (and free) version of the indicator, and I'm planning to create a "PRO" version of this indicator in future.
Parameters:
- Timezone
- Cell data -> which data to display in the cells (no data, volume or percentage)
- Highlight min and max volume -> if checked, cells with min and max volume (either monthly or yearly) will be highlighted with a dot or letter (depending on the "Cell data" input)
- Cell stats mode -> which data to use for color and % calculation (All data = yearly, Column = monthly)
- Display data from previous year -> if checked, the data from previous year will be used
- Header color is calculated from -> either sentiment or % of the yearly volume
- Reverse theme -> the table colors are automatically changed based on the "Dark mode" of Tradingview, this checkbox reverses the logic (so that darker colors will be used when "Dark mode" is off, and lighter colors when it's on)
- Hide logo -> hides the cat logo (PLEASE DO NOT HIDE THE CAT)
Conclusion:
Let me know what you think of the indicator. As I said, I'm planning to make a PRO version with more features, for which I already have some ideas, but if you have any suggestions, please let me know.
Multi-Currency Economic IndicatorCreating a Multi-Currency Economic Indicator that incorporates data for USD, JPY, AUD, GBP, CHF, NZD, and CAD will provide valuable insights into the economic health of these currencies. By plotting key economic indicators such as interest rates and allowing for customization, users can effectively analyze and make informed decisions.
If you have any further modifications or specific features you would like to add, feel free to let me know!
Trend Levels [ChartPrime]The Trend Levels indicator is designed to identify key trend levels (High, Mid, and Low) during market trends, based on real-time calculations of highest, lowest, and mid-level values over a customizable length. Additionally, the indicator calculates trend strength by measuring the ratio of candles closing above or below the midline, providing a clear view of the ongoing trend dynamics and strength.
⯁ KEY FEATURES AND HOW TO USE
⯌ Trend Shift Signals :
Trend shifts, based on highest and lowest values during input length. When high is == to highest it will change trend to up when low == lowest value it will be shift to down trend.
// Calculate highest and lowest over the specified length
h = ta.highest(length)
l = ta.lowest(length)
// Determine trend direction: if the current high is the highest value, set trend to true
if h == high
trend := true
// If the current low is the lowest value, set trend to false
if l == low
trend := false
Whenever the trend changes direction (from uptrend to downtrend or vice versa), the indicator provides visual cues in the form of arrows. This gives traders clear signals to identify potential trend reversals, enabling them to adjust their strategies accordingly.
⯌ Trend Level Calculation :
As soon as a trend is detected (uptrend or downtrend), the indicator starts calculating the highest, lowest, and mid-level values over the defined period. These levels are plotted on the chart as color-coded lines for easy visualization, allowing traders to quickly spot the key levels within a trend.
⯌ Midline Retests :
Throughout the trend, the mid-level line is often retested, acting as a potential zone for pullbacks or rejections. Traders can use these retests as opportunities for entering positions or confirming trend continuation. The chart shows how price frequently interacts with the midline, helping to identify important reaction levels.
⯌ Trend Strength Calculation :
The indicator measures the trend strength by calculating the delta between the number of candles closing above and below the midline. This percentage-based delta is displayed in real-time, providing a clear indication of whether the trend is gaining or losing momentum.
⯁ USER INPUTS
Length : Specifies the lookback period for calculating the highest and lowest values, which determines the key trend levels.
Candle Counting : Measures the number of candles closing above and below the midline to calculate the trend strength delta.
⯁ CONCLUSION
The Trend Levels indicator provides traders with a powerful tool for visualizing trend dynamics, key levels of support and resistance, and real-time trend strength. By identifying midline retests, tracking candle counts, and providing trend shift signals, this indicator can help traders make well-informed decisions during market trends.
VOLUME DIRECTION INDICATORDesigned for the 1-hour chart, this indicator shows:
Green Line: Volume when price rises, suggesting buying.
Red Line: Volume when price falls, indicating selling.
How to Use:
Watch for Crossover: When the Green Line moves above the Red, it might signal a budding uptrend.
Check Retracement: If the Green Line pulls back but stays above the Red, the uptrend could be strengthening.
Price Check: Look for a small price drop but not a reversal.
Trade Entry:
Enter at the high of the retracement candle.
Or wait for the Green Line to rise again.
For Precision: Draw a line at the retracement peak and switch to a shorter timeframe to find entry patterns above this line.
Remember: Use this with other tools for better trading decisions.
The Volume Direction Indicator provides a visual representation of market activity by assuming volume can be attributed to buying or selling based on price action within each bar. When the price closes higher than it opened, the volume for that period is considered as 'Bought Shares', plotted in green. Conversely, if the price closes lower, the volume is treated as 'Sold Shares', shown in red. This indicator resets daily to give a fresh perspective on trading activity each day.
Key Features:
Buying Pressure: Green line represents the cumulative volume during periods where the price increased.
Selling Pressure: Red line indicates the cumulative volume during price decreases.
Daily Reset: Accumulated values reset at the start of each new trading day, focusing on daily market sentiment.
Note: This indicator simplifies market dynamics by linking volume directly to price changes. It does not account for complex trading scenarios like short selling or market manipulations. Use this indicator as a tool to gauge general market direction and activity, not for precise transaction data.
Trend indicatorThe Trend Indicator script is a custom oscillator-based tool designed for identifying potential entry and exit points in the market. Using a combination of Exponential Moving Average (EMA) and Relative Moving Average (RMA) calculations, it captures the trend direction and signals market momentum shifts. The indicator visually presents buy and sell signals and color-codes background conditions based on potential trend reversals, offering a clear and structured approach for trend-based trading strategies.
Key Components
1. User Inputs
Smoothing Length (smoothLength): The script allows the trader to input a smoothing length for adjusting the EMA and RMA calculations. This parameter fine-tunes the indicator's sensitivity to price movements, where lower values result in a more responsive oscillator, while higher values make it smoother and less reactive to minor fluctuations.
Source (source): This is the price data input for the script, defaulting to the close price but customizable to other price points (e.g., open, high, or low) based on user preference.
2. Smoothed Price Calculation
Using an Exponential Moving Average (EMA), the script smooths the selected source price to reduce noise and make trends clearer. The EMA’s calculation length is determined by the smoothLength input, and this moving average forms the baseline from which other components derive.
3. Oscillator Calculation
The oscillator value represents the relative strength or weakness of price momentum. Here, the oscillator is computed using Relative Moving Average (RMA), applied to the difference between the smoothed price and the SMA of the source price. The RMA further filters short-term fluctuations to identify the core trend direction.
This oscillator measures the divergence between the smoothed price and the SMA, providing insight into whether the market is experiencing bullish or bearish pressure.
4. Signal Line
The Signal Line is a Simple Moving Average (SMA) of the oscillator, using the same smoothLength parameter. The SMA smooths the oscillator’s values, offering a secondary reference that traders can use to identify changes in momentum when it crosses the oscillator line.
5. Buy and Sell Signals
Buy Signal (bullSignal): The script triggers a buy signal when the oscillator crosses above zero. This indicates that momentum may be shifting in favor of buyers, potentially signaling an uptrend.
Sell Signal (bearSignal): The script triggers a sell signal when the oscillator crosses below zero, suggesting a shift in momentum to the downside, potentially initiating a downtrend.
Visualization
1. Plotting the Oscillator and Signal Line
The oscillator line is plotted in blue, representing the current momentum of the price. The signal line, plotted in red, serves as a smoother baseline.
When the oscillator crosses the signal line, it hints at a potential trend shift, which can be a signal for cautious traders to pay attention to trend reversals.
2. Buy/Sell Signal Markers
Buy Signal Marker: A green label appears below the bar whenever the oscillator crosses above zero, indicating a potential buying opportunity.
Sell Signal Marker: A red label appears above the bar whenever the oscillator crosses below zero, marking a potential selling opportunity.
These visual cues make it easy for traders to spot signals directly on the chart without needing to watch the oscillator values closely.
3. Background Coloring for Trend Direction
To further aid in trend identification, the background color changes to green when a bullish signal is active and red during bearish signals. This coloring helps visually reinforce the current trend direction, allowing traders to spot prolonged uptrends or downtrends easily.
Trading Strategy Suggestions
This indicator can be adapted to various trading strategies. Here are a few practical suggestions:
Trend-Following Strategy:
When the oscillator crosses above zero (green background), it could indicate the start of a potential uptrend. Consider entering a long position on this signal and holding it until the oscillator crosses back below zero.
Conversely, a cross below zero (red background) may signal a downtrend, making it suitable for short positions or exiting long trades.
Cross-Confirmation with Signal Line:
Use the crossover of the oscillator and signal line to confirm trends. For example, when the oscillator is above zero and crosses above the signal line, it could reinforce a strong buy signal. Similarly, a cross below the signal line when the oscillator is below zero could strengthen a sell signal.
Combining with Other Indicators:
For added accuracy, combine this indicator with other trend-confirming tools like Moving Averages or Bollinger Bands to confirm the validity of buy/sell signals.
Risk Management:
Always set stop-losses below recent lows in uptrends or above recent highs in downtrends. This indicator is useful for entry and exit points but should always be paired with solid risk management practices.
The Trend Indicator is a comprehensive tool for identifying market momentum and potential reversal points. By smoothing out price data and using an oscillator to track momentum shifts, it offers traders a structured approach to trading trends. Its built-in buy/sell markers and background coloring make it visually accessible and easy to interpret at a glance. However, as with any indicator, it's most effective when combined with other strategies and a disciplined approach to risk management.
Market Bias IndicatorOverview
This Pine Script™ code generates a "Market Sentiment Dashboard" on TradingView, providing a visual summary of market sentiment across multiple timeframes. This tool aids traders in making informed decisions by displaying real-time sentiment analysis based on Exponential Moving Averages (EMA).
Key Features
Panel Positioning:
Custom Placement: Traders can position the dashboard at the top, middle, or bottom of the chart and align it to the left, centre, or right, ensuring optimal integration with other chart elements.
Customizable Colours:
Sentiment Colours: Users can define colours for bullish, bearish, and neutral market conditions, enhancing the dashboard's readability.
Text Colour: Customizable text colour ensures clarity against various background colours.
Label Size:
Scalable Labels: Adjustable label sizes (from very small to very large) ensure readability across different screen sizes and resolutions.
Market Sentiment Calculation:
EMA-Based Sentiment: The dashboard calculates sentiment using a 9-period EMA. If the EMA is higher than two bars ago, the sentiment is bullish; if lower, it's bearish; otherwise, it's neutral.
Multiple Timeframes: Sentiment is calculated for several timeframes: 30 minute, 1 hour, 4 hour, 6 hour, 8 hour, 12 hour, 1 day, and 1 week. This broad analysis provides a comprehensive view of market conditions.
Dynamic Table:
Structured Display: The dashboard uses a table to organize and display sentiment data clearly.
Real-Time Updates: The table updates in real-time, providing traders with up-to-date market information.
How It Works
EMA Calculation: The script requests EMA(9) values for each specified timeframe and compares the current EMA with the EMA from two bars ago to determine market sentiment.
Colour Coding: Depending on the sentiment (Bullish, Bearish, or Neutral), the corresponding cell in the table is color-coded using predefined colours.
Table Display: The table displays the timeframe and corresponding sentiment, allowing traders to quickly assess market trends.
Benefits to Traders
Quick Assessment: Traders can quickly evaluate market sentiment across multiple timeframes without switching charts or manually calculating indicators.
Enhanced Visualization: The color-coded sentiment display makes it easy to identify trends at a glance.
Multi-Timeframe Analysis: Provides a broad view of short-term and long-term market trends, helping traders confirm trends and avoid false signals.
This dashboard enhances the overall trading experience by providing a comprehensive, customizable, and easy-to-read summary of market sentiment.
Usage Instructions
Add the Script to Your Chart: Apply the "Market Sentiment Dashboard" indicator to your TradingView chart.
Customize Settings: Adjust the panel position, colours, and label sizes to fit your preferences.
Interpret Sentiment: Use the color-coded table to quickly understand the market sentiment across different timeframes and make informed trading decisions.
Value at Risk [OmegaTools]The "Value at Risk" (VaR) indicator is a powerful financial risk management tool that helps traders estimate the potential losses in a portfolio over a specified period of time, given a certain level of confidence. VaR is widely used by financial institutions, traders, and risk managers to assess the probability of portfolio losses in both normal and volatile market conditions. This TradingView script implements a comprehensive VaR calculation using several models, allowing users to visualize different risk scenarios and adjust their trading strategies accordingly.
Concept of Value at Risk
Value at Risk (VaR) is a statistical technique used to measure the likelihood of losses in a portfolio or financial asset due to market risks. In essence, it answers the question: "What is the maximum potential loss that could occur in a given portfolio over a specific time horizon, with a certain confidence level?" For instance, if a portfolio has a one-day 95% VaR of $10,000, it means that there is a 95% chance the portfolio will not lose more than $10,000 in a single day. Conversely, there is a 5% chance of losing more than $10,000. VaR is a key risk management tool for portfolio managers and traders because it quantifies potential losses in monetary terms, allowing for better-informed decision-making.
There are several ways to calculate VaR, and this indicator script incorporates three of the most commonly used models:
Historical VaR: This approach uses historical returns to estimate potential losses. It is based purely on past price data, assuming that the past distribution of returns is indicative of future risks.
Variance-Covariance VaR: This model assumes that asset returns follow a normal distribution and that the risk can be summarized using the mean and standard deviation of past returns. It is a parametric method that is widely used in financial risk management.
Exponentially Weighted Moving Average (EWMA) VaR: In this model, recent data points are given more weight than older data. This dynamic approach allows the VaR estimation to react more quickly to changes in market volatility, which is particularly useful during periods of market stress. This model uses the Exponential Weighted Moving Average Volatility Model.
How the Script Works
The script starts by offering users a set of customizable input settings. The first input allows the user to choose between two main calculation modes: "All" or "OCT" (Only Current Timeframe). In the "All" mode, the script calculates VaR using all available methodologies—Historical, Variance-Covariance, and EWMA—providing a comprehensive risk overview. The "OCT" mode narrows the calculation to the current timeframe, which can be particularly useful for intraday traders who need a more focused view of risk.
The next input is the lookback window, which defines the number of historical periods used to calculate VaR. Commonly used lookback periods include 21 days (approximately one month), 63 days (about three months), and 252 days (roughly one year), with the script supporting up to 504 days for more extended historical analysis. A longer lookback period provides a more comprehensive picture of risk but may be less responsive to recent market conditions.
The confidence level is another important setting in the script. This represents the probability that the loss will not exceed the VaR estimate. Standard confidence levels are 90%, 95%, and 99%. A higher confidence level results in a more conservative risk estimate, meaning that the calculated VaR will reflect a more extreme loss scenario.
In addition to these core settings, the script allows users to customize the visual appearance of the indicator. For example, traders can choose different colors for "Bullish" (Risk On), "Bearish" (Risk Off), and "Neutral" phases, as well as colors for highlighting "Breaks" in the data, where returns exceed the calculated VaR. These visual cues make it easy to identify periods of heightened risk at a glance.
The actual VaR calculation is broken down into several models, starting with the Historical VaR calculation. This is done by computing the logarithmic returns of the asset's closing prices and then using linear interpolation to determine the percentile corresponding to the desired confidence level. This percentile represents the potential loss in the asset over the lookback period.
Next, the script calculates Variance-Covariance VaR using the mean and standard deviation of the historical returns. The standard deviation is multiplied by a z-score corresponding to the chosen confidence level (e.g., 1.645 for 95% confidence), and the resulting value is subtracted from the mean return to arrive at the VaR estimate.
The EWMA VaR model uses the EWMA for the sigma parameter, the standard deviation, obtaining a specific dynamic in the volatility. It is particularly useful in volatile markets where recent price behavior is more indicative of future risk than older data.
For traders interested in intraday risk management, the script provides several methods to adjust VaR calculations for lower timeframes. By using intraday returns and scaling them according to the chosen timeframe, the script provides a dynamic view of risk throughout the trading day. This is especially important for short-term traders who need to manage their exposure during high-volatility periods within the same day. The script also incorporates an EWMA model for intraday data, which gives greater weight to the most recent intraday price movements.
In addition to calculating VaR, the script also attempts to detect periods where the asset's returns exceed the estimated VaR threshold, referred to as "Breaks." When the returns breach the VaR limit, the script highlights these instances on the chart, allowing traders to quickly identify periods of extreme risk. The script also calculates the average of these breaks and displays it for comparison, helping traders understand how frequently these high-risk periods occur.
The script further visualizes the risk scenario using a risk phase classification system. Depending on the level of risk, the script categorizes the market as either "Risk On," "Risk Off," or "Risk Neutral." In "Risk On" mode, the market is considered bullish, and the indicator displays a green background. In "Risk Off" mode, the market is bearish, and the background turns red. If the market is neither strongly bullish nor bearish, the background turns neutral, signaling a balanced risk environment.
Traders can customize whether they want to see this risk phase background, along with toggling the display of the various VaR models, the intraday methods, and the break signals. This flexibility allows traders to tailor the indicator to their specific needs, whether they are day traders looking for quick intraday insights or longer-term investors focused on historical risk analysis.
The "Risk On" and "Risk Off" phases calculated by this Value at Risk (VaR) script introduce a novel approach to market risk assessment, offering traders an advanced toolset to gauge market sentiment and potential risk levels dynamically. These risk phases are built on a combination of traditional VaR methodologies and proprietary logic to create a more responsive and intuitive way to manage exposure in both normal and volatile market conditions. This method of classifying market conditions into "Risk On," "Risk Off," or "Risk Neutral" is not something that has been traditionally associated with VaR, making it a groundbreaking addition to this indicator.
How the "Risk On" and "Risk Off" Phases Are Calculated
In typical VaR implementations, the focus is on calculating the potential losses at a given confidence level without providing an overall market outlook. This script, however, introduces a unique risk classification system that takes the output of various VaR models and translates it into actionable signals for traders, marking whether the market is in a Risk On, Risk Off, or Risk Neutral phase.
The Risk On and Risk Off phases are primarily determined by comparing the current returns of the asset to the average VaR calculated across several different methods, including Historical VaR, Variance-Covariance VaR, and EWMA VaR. Here's how the process works:
1. Threshold Setting and Effect Calculation: The script first computes the average VaR using the selected models. It then checks whether the current returns (expressed as a negative value to signify loss) exceed the average VaR value. If the current returns surpass the calculated VaR threshold, this indicates that the actual market risk is higher than expected, signaling a potential shift in market conditions.
2. Break Analysis: In addition to monitoring whether returns exceed the average VaR, the script counts the number of instances within the lookback period where this breach occurs. This is referred to as the "break effect." For each period in the lookback window, the script checks whether the returns surpass the calculated VaR threshold and increments a counter. The percentage of periods where this breach occurs is then calculated as the "effect" or break percentage.
3. Dual Effect Check (if "Double" Risk Scenario is selected): When the user chooses the "Double" risk scenario mode, the script performs two layers of analysis. First, it calculates the effect of returns exceeding the VaR threshold for the current timeframe. Then, it calculates the effect for the lower intraday timeframe as well. Both effects are compared to the user-defined confidence level (e.g., 95%). If both effects exceed the confidence level, the market is deemed to be in a high-risk situation, thus triggering a Risk Off phase. If both effects fall below the confidence level, the market is classified as Risk On.
4. Risk Phases Determination: The final risk phase is determined by analyzing these effects in relation to the confidence level:
- Risk On: If the calculated effect of breaks is lower than the confidence level (e.g., fewer than 5% of periods show returns exceeding the VaR threshold for a 95% confidence level), the market is considered to be in a relatively safe state, and the script signals a "Risk On" phase. This is indicative of bullish conditions where the potential for extreme loss is minimal.
- Risk Off: If the break effect exceeds the confidence level (e.g., more than 5% of periods show returns breaching the VaR threshold), the market is deemed to be in a high-risk state, and the script signals a "Risk Off" phase. This indicates bearish market conditions where the likelihood of significant losses is higher.
- Risk Neutral: If the break effect hovers near the confidence level or if there is no clear trend indicating a shift toward either extreme, the market is classified as "Risk Neutral." In this phase, neither bulls nor bears are dominant, and traders should remain cautious.
The phase color that the script uses helps visualize these risk phases. The background will turn green in Risk On conditions, red in Risk Off conditions, and gray in Risk Neutral phases, providing immediate visual feedback on market risk. In addition to this, when the "Double" risk scenario is selected, the background will only turn green or red if both the current and intraday timeframes confirm the respective risk phase. This double-checking process ensures that traders are only given a strong signal when both longer-term and short-term risks align, reducing the likelihood of false signals.
A New Way of Using Value at Risk
This innovative Risk On/Risk Off classification, based on the interaction between VaR thresholds and market returns, represents a significant departure from the traditional use of Value at Risk as a pure risk measurement tool. Typically, VaR is employed as a backward-looking measure of risk, providing a static estimate of potential losses over a given timeframe with no immediate actionable feedback on current market conditions. This script, however, dynamically interprets VaR results to create a forward-looking, real-time signal that informs traders whether they are operating in a favorable (Risk On) or unfavorable (Risk Off) environment.
By incorporating the "break effect" analysis and allowing users to view the VaR breaches as a percentage of past occurrences, the script adds a predictive element that can be used to time market entries and exits more effectively. This **dual-layer risk analysis**, particularly when using the "Double" scenario mode, adds further granularity by considering both current timeframe and intraday risks. Traders can therefore make more informed decisions not just based on historical risk data, but on how the market is behaving in real-time relative to those risk benchmarks.
This approach transforms the VaR indicator from a risk monitoring tool into a decision-making system that helps identify favorable trading opportunities while alerting users to potential market downturns. It provides a more holistic view of market conditions by combining both statistical risk measurement and intuitive phase-based market analysis. This level of integration between VaR methodologies and real-time signal generation has not been widely seen in the world of trading indicators, marking this script as a cutting-edge tool for risk management and market sentiment analysis.
I would like to express my sincere gratitude to @skewedzeta for his invaluable contribution to the final script. From generating fresh ideas to applying his expertise in reviewing the formula, his support has been instrumental in refining the outcome.
Sweep + MSS# Sweep + MSS Indicator
This indicator identifies market sweeps and Market Structure Shifts (MSS) to help traders recognize potential trend changes and market manipulations.
How it works:
1. Sweep Detection:
- Identifies when price briefly moves beyond a recent high/low (pivot point) and then reverses.
- Bullish sweep: Price drops below a recent low, then closes above it.
- Bearish sweep: Price rises above a recent high, then closes below it.
2. Market Structure Shift (MSS):
- Occurs when price action invalidates a previous sweep level.
- Bullish MSS: Price closes above a bearish sweep level.
- Bearish MSS: Price closes below a bullish sweep level.
Key Features:
- Customizable pivot lookback length for sweep detection
- Minimum bar requirement after a sweep before MSS can trigger
- One MSS per sweep level to avoid multiple signals
- Visual representation with lines connecting sweep points to MSS triggers
- Emoji labels for easy identification (🐂-MSS for bullish, 🐻-MSS for bearish)
Logic Behind MSS:
The MSS aims to identify potential trend changes by recognizing when the market invalidates a previous sweep level. This often indicates a shift in market structure, suggesting that the previous trend may be weakening or reversing.
- A bullish MSS occurs when the price closes above a bearish sweep level, potentially signaling a shift from bearish to bullish sentiment.
- A bearish MSS occurs when the price closes below a bullish sweep level, potentially signaling a shift from bullish to bearish sentiment.
By requiring a minimum number of bars between the sweep and the MSS, the indicator helps filter out noise and focuses on more significant structural changes in the market.
This indicator can be a valuable tool for traders looking to identify potential trend changes and entry/exit points based on market structure analysis.
Macros ICT KillZones [TradingFinder] Times & Price Trading Setup🔵 Introduction
ICT Macros, developed by Michael Huddleston, also known as ICT (Inner Circle Trader), is a powerful trading tool designed to help traders identify the best trading opportunities during key time intervals like the London and New York trading sessions.
For traders aiming to capitalize on market volatility, liquidity shifts, and Fair Value Gaps (FVG), understanding and using these critical time zones can significantly improve trading outcomes.
In today’s highly competitive financial markets, identifying the moments when the market is seeking buy-side or sell-side liquidity, or filling price imbalances, is essential for maximizing profitability.
The ICT Macros indicator is built on the renowned ICT time and price theory, which enables traders to track and leverage key market dynamics such as breaks of highs and lows, imbalances, and liquidity hunts.
This indicator automatically detects crucial market times and optimizes strategies for traders by highlighting the specific moments when price movements are most likely to occur. A standout feature of ICT Macros is its automatic adjustment for Daylight Saving Time (DST), ensuring that traders remain synced with the correct session times.
This means you can rely on accurate market timing without the need for manual updates, allowing you to focus on capturing profitable trades during critical timeframes.
🔵 How to Use
The ICT Macros indicator helps you capitalize on trading opportunities during key market moments, particularly when the market is breaking highs or lows, filling Fair Value Gaps (FVG), or addressing imbalances. This indicator is particularly beneficial for traders who seek to identify liquidity, market volatility, and price imbalances.
🟣 Sessions
London Sessions
London Macro 1 :
UTC Time : 06:33 to 07:00
New York Time : 02:33 to 03:00
London Macro 2 :
UTC Time : 08:03 to 08:30
New York Time : 04:03 to 04:30
New York Sessions
New York Macro AM 1 :
UTC Time : 12:50 to 13:10
New York Time : 08:50 to 09:10
New York Macro AM 2 :
UTC Time : 13:50 to 14:10
New York Time : 09:50 to 10:10
New York Macro AM 3 :
UTC Time : 14:50 to 15:10
New York Time : 10:50 to 11:10
New York Lunch Macro :
UTC Time : 15:50 to 16:10
New York Time : 11:50 to 12:10
New York PM Macro :
UTC Time : 17:10 to 17:40
New York Time : 13:10 to 13:40
New York Last Hour Macro :
UTC Time : 19:15 to 19:45
New York Time : 15:15 to 15:45
These time intervals adjust automatically based on Daylight Saving Time (DST), helping traders to enter or exit trades during key market moments when price volatility is high.
Below are the main applications of this tool and how to incorporate it into your trading strategies :
🟣 Combining ICT Macros with Trading Strategies
The ICT Macros indicator can easily be used in conjunction with various trading strategies. Two well-known strategies that can be combined with this indicator include:
ICT 2022 Trading Model : This model is designed based on identifying market liquidity, structural price changes, and Fair Value Gaps (FVG). By using ICT Macros, you can identify the key time intervals when the market is seeking liquidity, filling imbalances, or breaking through important highs and lows, allowing you to enter or exit trades at the right moment.
Silver Bullet Strategy : This strategy, which is built around liquidity hunting and rapid price movements, can work more accurately with the help of ICT Macros. The indicator pinpoints precise liquidity times, helping traders take advantage of market shifts caused by filling Fair Value Gaps or correcting imbalances.
🟣 Capitalizing on Price Volatility During Key Times
Large market algorithms often seek liquidity or fill Fair Value Gaps (FVG) during the intervals marked by ICT Macros. These periods are when price volatility increases, and traders can use these moments to enter or exit trades.
For example, if sell-side liquidity is drained and the market fills an imbalance, the price might move toward buy-side liquidity. By identifying these moments, which may also involve breaking a previous high or low, you can leverage rapid market fluctuations to your advantage.
🟣 Identifying Liquidity and Price Imbalances
One of the important uses of ICT Macros is identifying points where the market is seeking liquidity and correcting imbalances. You can determine high or low liquidity levels in the market before each ICT Macro, as well as Fair Value Gaps (FVG) and price imbalances that need to be filled, using them to adjust your trading strategy. This capability allows you to manage trades based on liquidity shifts or imbalance corrections without needing a bias toward a specific direction.
🔵 Settings
The ICT Macros indicator offers various customization options, allowing users to tailor it to their specific needs. Below are the main settings:
Time Zone Mode : You can select one of the following options to define how time is displayed:
UTC : For traders who need to work with Universal Time.
Session Local Time : The local time corresponding to the London or New York markets.
Your Time Zone : You can specify your own time zone (e.g., "UTC-4:00").
Your Time Zone : If you choose "Your Time Zone," you can set your specific time zone. By default, this is set to UTC-4:00.
Show Range Time : This option allows you to display the time range of each session on the chart. If enabled, the exact start and end times of each interval are shown.
Show or Hide Time Ranges : Toggle on/off for visual clarity depending on user preference.
Custom Colors : Set distinct colors for each session, allowing users to personalize their chart based on their trading style.These settings allow you to adjust the key time intervals of each trading session to your preference and customize the time format according to your own needs.
🔵 Conclusion
The ICT Macros indicator is a powerful tool for traders, helping them to identify key time intervals where the market seeks liquidity or fills Fair Value Gaps (FVG), corrects imbalances, and breaks highs or lows. This tool is especially valuable for traders using liquidity-based strategies such as ICT 2022 or Silver Bullet.
One of the key features of this indicator is its support for Daylight Saving Time (DST), ensuring you are always in sync with the correct trading session timings without manual adjustments. This is particularly beneficial for traders operating across different time zones.
With ICT Macros, you can capitalize on crucial market opportunities during sensitive times, take advantage of imbalances, and enhance your trading strategies based on market volatility, liquidity shifts, and Fair Value Gaps.
ATR Trailing Stop by tactical trade 22 Oct 2024Description:
The ATR Dual Trailing Stop indicator is a versatile and powerful tool designed to help traders visualize dynamic support and resistance levels based on the Average True Range (ATR). This indicator plots two separate ATR-based trailing stops with customizable settings, providing a comprehensive view of potential market reversals and trend strength.
Key features:
Two ATR Trailing Stops: The first stop uses customizable ATR settings (default: 10-period ATR with a 3x multiplier), while the second stop uses an alternate configuration (default: 21-period ATR with a 7x multiplier).
Multi-Timeframe ATR Calculation: Regardless of the chart's time frame, the ATR is calculated based on a user-selected time frame (e.g., daily), allowing for consistent stop-loss levels even in lower time frames like 5-minute or 15-minute charts.
Visual Cues: The indicator clearly plots two trailing stop lines in different colors, making it easy to track the market’s volatility-based support and resistance areas.
No Buy/Sell Signals: This is purely a trailing stop indicator with no embedded buy/sell signals, giving traders the flexibility to use it with their preferred entry/exit strategies.
This indicator is especially useful in highly volatile markets where precise trailing stop levels are essential for managing risk and maximizing profit potential. The dual ATR configuration helps traders adapt to changing market conditions by providing two levels of stop placement: a shorter-term and a longer-term trailing stop.
Market Phases [OmegaTools]The Market Phases indicator utilizes the Detrended Price Oscillator (DPO) to assess various asset classes, bonds, or stock sectors across different market phases. It offers users the ability to monitor and compare trends in multiple markets through a normalized DPO approach, providing insights into relative overbought or oversold conditions. The indicator supports three distinct modes: "Asset Classes," "Bonds," and "Stock Sectors," allowing flexibility in market analysis based on user preference.
Key Features:
Detrended Price Oscillator (DPO) Calculation: The DPO is computed to remove longer-term trends and focus on shorter-term cyclical behavior. The indicator applies normalization using linear interpolation to smooth out the values for better comparison across different markets.
Three Analysis Modes:
Asset Classes: Compares the DPO for major asset classes, including stocks (S&P 500), bonds (US 10-Year), commodities (Gold), and the US Dollar Index (DXY).
Bonds: Analyzes the DPO across various bond categories such as investment-grade bonds (LQD), high-yield bonds (HYG), emerging market bonds (EMB), and corporate bonds.
Stock Sectors: Provides insight into key stock sectors, including Technology (XLK), Utilities (XLU), Financials (XLF), and Healthcare (XLV).
Real-Time Plotting:
The indicator plots the DPO values of the selected assets, bonds, or sectors on the chart. It provides a visual representation of the market phases, helping to identify potential market reversals or trends. Each plot is color-coded for clarity:
Blue: Asset/Sector 1
Red: Asset/Sector 2
Green: Asset/Sector 3
Orange: Asset/Sector 4
Table Display:
A dynamic table is displayed on the chart, showing the DPO values for the selected mode's assets or sectors. This allows quick comparison and evaluation of market trends.
Inputs:
DPO Length: Defines the lookback period for DPO calculation, adjustable between 10 and 500.
Normalization Length: Sets the length for normalizing the DPO values, with options ranging from 100 to 2000.
Mode: Choose between "Asset Classes," "Bonds," or "Stock Sectors" for tailored market analysis.
This tool is perfect for traders seeking to identify cyclical market phases, compare different asset classes, or monitor sector rotation dynamics. Use it to align your trading strategies with broader market trends and uncover potential trading opportunities across multiple markets.
ICT Professional Accumulation DistributionICT Professional Accumulation Distribution (ICT AD) provides a x-ray view into market accumulation and distribution. You can literally see the institutions at work.
The indicator consists of two cumulative lines derived from:
Cumulative change from open to close
Cumulative change from previous close to new open
By overlaying these two cumulative lines, you can detect real meaningful divergence that is narrative based not mathematically derived. You're seeing the real works of algorithms in play working in this area.
These divergences are only useful at extremes (topping or bottoming formations), not while trending. It will probably confirm your suspicion about making a important high or low.
This works on all timeframes but is most impactful on the daily.
How to use:
Method 1:
Enable the option for "Show Open vs Close."
Calculate the shift by subtracting the "Open vs Close" line value from the ICT Accumulation/Distribution (AD) line value.
Look for divergences between the two cumulative lines.
Method 2:
Switch the chart's display mode to "Line View" (representing the Open vs Close).
look for divergences between the line chart and the ICT AD line.
Rolling VWAPGuide for Traders
What is the Rolling VWAP?
The Volume Weighted Average Price (VWAP) is a key indicator used by traders to assess the average price of an asset, weighted by volume over a specified period. Unlike a simple moving average, the VWAP accounts for trading volume, making it a more accurate reflection of price action and market sentiment.
The Rolling VWAP in this script dynamically updates based on a user-defined period, allowing traders to view the average price over a chosen number of bars. This is particularly useful for identifying trends and potential entry or exit points in the market.
Key Benefits of Using Rolling VWAP
Better Market Insight: VWAP provides insight into where most trading is occurring, helping you gauge the strength of a price move.
Support and Resistance Levels: It often acts as dynamic support or resistance, signaling areas where price might reverse.
Trend Confirmation: A rising VWAP suggests a bullish trend, while a falling VWAP indicates a bearish trend.
Informed Entry/Exit Decisions: Use the VWAP to find entry points below it in an uptrend or exit points above it in a downtrend.
How to Use this Script:
Custom Period Input:
You can modify the "VWAP Period" to adjust the number of bars considered in the rolling calculation.
The default period is 14 bars, but you can set it based on your strategy (e.g., shorter for intraday trading, longer for swing trading).
Chart Interpretation
Bullish Signals: When the price is above the VWAP line, it suggests upward momentum, and you may consider buying opportunities.
Bearish Signals: When the price is below the VWAP, it indicates downward momentum, and you may consider selling or shorting opportunities.
Reversion to VWAP: Prices often revert to the VWAP after extended moves away from it, offering potential trade setups.
Combine with Other Indicators:
Momentum Indicators: Use with RSI, MACD, or moving averages for confirmation.
Volume Analysis: VWAP works well when combined with volume indicators to assess if a breakout is supported by high trading volume.
Customization:
Traders can customize the script's period and plot color to fit their charting preferences.
Practical Tips:
Intraday Traders: Use shorter periods (e.g., 5 or 10) to capture VWAP trends in fast-moving markets.
Swing Traders: Use longer periods (e.g., 50 or 100) to assess longer-term price and volume trends.
By integrating this Rolling VWAP into your strategy, you can better understand where the majority of trading volume has occurred, allowing you to make more informed decisions in your trading process.
ATR Bands with ATR Cross + InfoTableOverview
This Pine Script™ indicator is designed to enhance traders' ability to analyze market volatility, trend direction, and position sizing directly on their TradingView charts. By plotting Average True Range (ATR) bands anchored at the OHLC4 price, displaying crossover labels, and providing a comprehensive information table, this tool offers a multifaceted approach to technical analysis.
Key Features:
ATR Bands Anchored at OHLC4: Visual representation of short-term and long-term volatility bands centered around the average price.
OHLC4 Dotted Line: A dotted line representing the average of Open, High, Low, and Close prices.
ATR Cross Labels: Visual cues indicating when short-term volatility exceeds long-term volatility and vice versa.
Information Table: Displays real-time data on market volatility, calculated position size based on risk parameters, and trend direction relative to the 20-period Smoothed Moving Average (SMMA).
Purpose
The primary purpose of this indicator is to:
Assess Market Volatility: By comparing short-term and long-term ATR values, traders can gauge the current volatility environment.
Determine Optimal Position Sizing: A calculated position size based on user-defined risk parameters helps in effective risk management.
Identify Trend Direction: Comparing the current price to the 20-period SMMA assists in determining the prevailing market trend.
Enhance Decision-Making: Visual cues and real-time data enable traders to make informed trading decisions with greater confidence.
How It Works
1. ATR Bands Anchored at OHLC4
Average True Range (ATR) Calculations
Short-Term ATR (SA): Calculated over a 9-period using ta.atr(9).
Long-Term ATR (LA): Calculated over a 21-period using ta.atr(21).
Plotting the Bands
OHLC4 Dotted Line: Plotted using small circles to simulate a dotted line due to Pine Script limitations.
ATR(9) Bands: Plotted in blue with semi-transparent shading.
ATR(21) Bands: Plotted in orange with semi-transparent shading.
Overlap: Bands can overlap, providing visual insights into changes in volatility.
2. ATR Cross Labels
Crossover Detection:
SA > LA: Indicates increasing short-term volatility.
Detected using ta.crossover(SA, LA).
A green upward label "SA>LA" is plotted below the bar.
SA < LA: Indicates decreasing short-term volatility.
Detected using ta.crossunder(SA, LA).
A red downward label "SA LA, then the market is considered volatile.
Display: Shows "Yes" or "No" based on the comparison.
b. Position Size Calculation
Risk Total Amount: User-defined input representing the total capital at risk.
Risk per 1 Stock: User-defined input representing the risk associated with one unit of the asset.
Purpose: Helps traders determine the appropriate position size based on their risk tolerance and current market volatility.
c. Is Price > 20 SMMA?
SMMA Calculation:
Calculated using a 20-period Smoothed Moving Average with ta.rma(close, 20).
Logic: If the current close price is above the SMMA, the trend is considered upward.
Display: Shows "Yes" or "No" based on the comparison.
How to Use
Step 1: Add the Indicator to Your Chart
Copy the Script: Copy the entire Pine Script code into the TradingView Pine Editor.
Save and Apply: Save the script and click "Add to Chart."
Step 2: Configure Inputs
Risk Parameters: Adjust the "Risk Total Amount" and "Risk per 1 Stock" in the indicator settings to match your personal risk management strategy.
Step 3: Interpret the Visuals
ATR Bands
Width of Bands: Wider bands indicate higher volatility; narrower bands indicate lower volatility.
Band Overlap: Pay attention to areas where the blue and orange bands diverge or converge.
OHLC4 Dotted Line
Serves as a central reference point for the ATR bands.
Helps visualize the average price around which volatility is measured.
ATR Cross Labels
"SA>LA" Label:
Indicates short-term volatility is increasing relative to long-term volatility.
May signal potential breakout or trend acceleration.
"SA 20 SMMA?
Use this to confirm trend direction before entering or exiting trades.
Practical Example
Imagine you are analyzing a stock and notice the following:
ATR(9) Crosses Above ATR(21):
A green "SA>LA" label appears.
The info table shows "Yes" for "Is ATR-based price volatile."
Position Size:
Based on your risk parameters, the position size is calculated.
Price Above 20 SMMA:
The info table shows "Yes" for "Is price > 20 SMMA."
Interpretation:
The market is experiencing increasing short-term volatility.
The trend is upward, as the price is above the 20 SMMA.
You may consider entering a long position, using the calculated position size to manage risk.
Customization
Colors and Transparency:
Adjust the colors of the bands and labels to suit your preferences.
Risk Parameters:
Modify the default values for risk amounts in the inputs.
Moving Average Period:
Change the SMMA period if desired.
Limitations and Considerations
Lagging Indicators: ATR and SMMA are lagging indicators and may not predict future price movements.
Market Conditions: The effectiveness of this indicator may vary across different assets and market conditions.
Risk of Overfitting: Relying solely on this indicator without considering other factors may lead to suboptimal trading decisions.
Conclusion
This indicator combines essential elements of technical analysis to provide a comprehensive tool for traders. By visualizing ATR bands anchored at the OHLC4, indicating volatility crossovers, and providing real-time data on position sizing and trend direction, it aids in making informed trading decisions.
Whether you're a novice trader looking to understand market volatility or an experienced trader seeking to refine your strategy, this indicator offers valuable insights directly on your TradingView charts.
Code Summary
The script is written in Pine Script™ version 5 and includes:
Calculations for OHLC4, ATRs, Bands, SMMA:
Uses built-in functions like ta.atr() and ta.rma() for calculations.
Plotting Functions:
plotshape() for the OHLC4 dotted line.
plot() and fill() for the ATR bands.
Crossover Detection:
ta.crossover() and ta.crossunder() for detecting ATR crosses.
Labeling Crossovers:
label.new() to place informative labels on the chart.
Information Table Creation:
table.new() to create the table.
table.cell() to populate it with data.
Acknowledgments
ATR and SMMA Concepts: Built upon standard technical analysis concepts widely used in trading.
Pine Script™: Leveraged the capabilities of Pine Script™ version 5 for advanced charting and analysis.
Note: Always test any indicator thoroughly and consider combining it with other forms of analysis before making trading decisions. Trading involves risk, and past performance is not indicative of future results.
Happy Trading!
Enhanced Economic Composite with Dynamic WeightEnhanced Economic Composite with Dynamic Weight
Overview of the Indicator :
The "Enhanced Economic Composite with Dynamic Weight" is a comprehensive tool that combines multiple economic indicators, technical signals, and dynamic weighting to provide insights into market and economic health. It adjusts based on current volatility and recession risk, offering a detailed view of market conditions.
What This Indicator Does :
Tracks Economic Health: Uses key economic and market indicators to assess overall market conditions.
Dynamic Weighting: Adjusts the importance of components like stock indices, gold, and bonds based on volatility (VIX) and yield curve inversion.
Technical Signals: Identifies market momentum shifts through key crossovers like the Golden Cross, Death Cross, Silver Cross, and Hospice Cross.
Recession Shading: Marks known recessions for historical context.
Economic Factors Considered :
TIP (Treasury Inflation-Protected Securities): Reflects inflation expectations.
Gold: A safe-haven asset, increases in weight during volatility or rising momentum.
US Dollar Index (DXY): Measures USD strength, fixed weight of 10%, smoothed with EMA.
Commodities (DBC): Indicates global demand; weight increases with momentum or volatility.
Volatility Index (VIX): Reflects market risk, inversely related to market confidence.
Stock Indices (S&P 500, DJIA, NASDAQ, Russell 2000): Represent market performance, with weights reduced during high volatility or negative yield spread.
Yield Spread (10Y - 2Y Treasuries): Predicts recessions; negative spread reduces stock weighting.
Credit Spread (HYG - TLT): Indicates market risk through corporate vs. government bond yields.
How and Why Factors are Weighted:
Stock Indices get more weight in stable markets (low VIX, positive yield spread), while safe-haven assets like gold and bonds gain weight in volatile markets or during yield curve inversions. This dynamic adjustment ensures the composite reflects current market sentiment.
Technical Signals:
Golden Cross: 50 EMA crossing above 200 SMA, signaling bullish momentum.
Death Cross: 50 EMA below 200 SMA, indicating bearish momentum.
Silver Cross: 21 EMA crossing above 50 EMA, plotted only if below the 200-day SMA, signaling potential upside in downtrend conditions.
Hospice Cross: 50 EMA crosses below 21 EMA, plotted only if 21 EMA is below 200 SMA, a leading bearish signal.
Recession Shading:
Recession periods like the Great Recession, Early 2000s Recession, and COVID-19 Recession are shaded to provide historical context.
Benefits of Using This Indicator:
Comprehensive Analysis: Combines economic fundamentals and technical analysis for a full market view.
Dynamic Risk Adjustment: Weights shift between growth and safe-haven assets based on volatility and recession risk.
Early Signals: The Silver Cross and Hospice Cross provide early warnings of potential market shifts.
Recession Forecasting: Helps predict downturns through the yield curve and recession indicators.
Who Can Benefit:
Traders: Identify market momentum shifts early through crossovers.
Long-term Investors: Use recession warnings and dynamic adjustments to protect portfolios.
Analysts: A holistic tool for analyzing both economic trends and market movements.
This indicator helps users navigate varying market conditions by dynamically adjusting based on economic factors and providing early technical signals for market momentum shifts.