ICT NWOG/NDOG Gaps [TradingFinder] New Opening Gaps🔵 Introduction
🟣 Understanding ICT Opening Gaps
In the realm of technical analysis, mastering the art of recognizing market behavior and pinpointing key price levels is vital for making sound trading decisions. Among the array of tools available, the concept of opening gaps stands out for its ability to provide crucial insights.
The ICT (Inner Circle Trader) methodology offers a distinctive approach to understanding the importance of New Day Opening Gaps (NDOG), New Week Opening Gaps (NWOG), and New Monthly Opening Gaps (NMOG).
These gaps, representing the price differences between the close of a previous period and the open of the next, serve as key reference points that can greatly impact price movements.
The ICT trading approach highlights these gaps as potential zones of support and resistance. Prices often respond to these areas, either bouncing off or passing through and then retesting them. Within these gaps, significant levels such as the high and low are particularly important.
Additionally, the Event Horizon PD Array (EHPDA) concept, which is an intermediate level calculated from the average of neighboring NWOGs or NDOGs, adds another layer to this analysis.
This guide delves into ICT's New Daily, Weekly, and Monthly Opening Ranges, showing how these gaps can be effectively utilized in trading. By grasping the nuances of these gaps, traders can better forecast market behavior, identify key support and resistance levels, and refine their trading strategies.
🟣 The Gaps
1. New Week Opening Gap (NWOG) : The NWOG is the price gap between Friday's closing price and Sunday's opening price. This gap is particularly crucial for traders who monitor weekly trends. Depending on the direction of the gap, the NWOG often serves as a pivotal support or resistance level.
2. New Day Opening Gap (NDOG) : The NDOG signifies the price difference between the closing price of the previous day and the opening price of the current day. Much like the NWOG, the NDOG is a key reference point for intraday traders.
Prices typically react to these levels, either reversing or continuing through the gap after a retest. NDOGs are instrumental in identifying short-term support and resistance levels, aiding traders in making decisions based on daily price movements.
3. New Monthly Opening Gap (NMOG) : The NMOG represents the gap between the closing price of the previous month and the opening price of the current month.
This gap is especially valuable for traders focusing on long-term trends and macroeconomic factors. As with NWOGs and NDOGs, the NMOG can act as a significant support or resistance level.
🔵 How to Use
Identifying Support and Resistance : Opening gaps often indicate potential zones where prices might reverse or find support/resistance. For example, if a new day opens below the previous day’s close (creating a NDOG), this gap could act as resistance, prompting traders to consider short positions if the price retests this level without breaking through.
Conversely, if the price opens above the previous day’s close, the gap might serve as support, offering a potential entry point for long trades.
Gap Fill Strategy : A popular strategy associated with opening gaps is the "gap fill" approach, where traders anticipate that the price will eventually return to fill the gap.
For instance, if there’s a significant NDOG at market open, a trader might expect the price to retrace back to the previous day’s close, effectively "filling" the gap. This strategy is particularly effective in markets that exhibit mean-reverting behavior.
Combining Gaps with Other Indicators : Traders often enhance their analysis of NDOG, NWOG, and NMOG by integrating other technical indicators. Aligning gap levels with tools such as Fibonacci retracements, moving averages, or existing support and resistance zones can provide additional confirmation for trade entries and exits.
🔵 Setting
Show and Color : You can control the display or non-display of the range as well as the color of the range.
Max Opening Range Update Method : You can control the number of ranges that are updated. If it is "All", all ranges that are not mitigated will be displayed. If "Custom", the ranges will be updated based on the number you specify.
Max Opening Range Update : The number of ranges to update.
🔵 Conclusion
The ICT New Daily, Weekly, and Monthly Opening Ranges provide traders with a systematic approach to understanding market dynamics and identifying critical support and resistance levels.
By analyzing these gaps, traders can gain deeper insights into potential price movements, spot high-probability trade setups, and strengthen their overall trading strategy. Whether you are focused on short-term day trading or long-term market trends, incorporating NDOG, NWOG, and NMOG analysis into your trading plan can be a powerful addition to your toolkit.
Educational
Bitcoin Power Law Oscillator [InvestorUnknown]The Bitcoin Power Law Oscillator is a specialized tool designed for long-term mean-reversion analysis of Bitcoin's price relative to a theoretical midline derived from the Bitcoin Power Law model (made by capriole_charles). This oscillator helps investors identify whether Bitcoin is currently overbought, oversold, or near its fair value according to this mathematical model.
Key Features:
Power Law Model Integration: The oscillator is based on the midline of the Bitcoin Power Law, which is calculated using regression coefficients (A and B) applied to the logarithm of the number of days since Bitcoin’s inception. This midline represents a theoretical fair value for Bitcoin over time.
Midline Distance Calculation: The distance between Bitcoin’s current price and the Power Law midline is computed as a percentage, indicating how far above or below the price is from this theoretical value.
float a = input.float (-16.98212206, 'Regression Coef. A', group = "Power Law Settings")
float b = input.float (5.83430649, 'Regression Coef. B', group = "Power Law Settings")
normalization_start_date = timestamp(2011,1,1)
calculation_start_date = time == timestamp(2010, 7, 19, 0, 0) // First BLX Bitcoin Date
int days_since = request.security('BNC:BLX', 'D', ta.barssince(calculation_start_date))
bar() =>
= request.security('BNC:BLX', 'D', bar())
int offset = 564 // days between 2009/1/1 and "calculation_start_date"
int days = days_since + offset
float e = a + b * math.log10(days)
float y = math.pow(10, e)
float midline_distance = math.round((y / btc_close - 1.0) * 100)
Oscillator Normalization: The raw distance is converted into a normalized oscillator, which fluctuates between -1 and 1. This normalization adjusts the oscillator to account for historical extremes, making it easier to compare current conditions with past market behavior.
float oscillator = -midline_distance
var float min = na
var float max = na
if (oscillator > max or na(max)) and time >= normalization_start_date
max := oscillator
if (min > oscillator or na(min)) and time >= normalization_start_date
min := oscillator
rescale(float value, float min, float max) =>
(2 * (value - min) / (max - min)) - 1
normalized_oscillator = rescale(oscillator, min, max)
Overbought/Oversold Identification: The oscillator provides a clear visual representation, where values near 1 suggest Bitcoin is overbought, and values near -1 indicate it is oversold. This can help identify potential reversal points or areas of significant market imbalance.
Optional Moving Average: Users can overlay a moving average (either SMA or EMA) on the oscillator to smooth out short-term fluctuations and focus on longer-term trends. This is particularly useful for confirming trend reversals or persistent overbought/oversold conditions.
This indicator is particularly useful for long-term Bitcoin investors who wish to gauge the market's mean-reversion tendencies based on a well-established theoretical model. By focusing on the Power Law’s midline, users can gain insights into whether Bitcoin’s current price deviates significantly from what historical trends would suggest as a fair value.
Pace ProOverview
The Pace Pro indicator is a robust trend-following tool designed for versatile application across various timeframes and markets, including stocks, forex, futures and cryptocurrencies. It provides traders with "bull" and "bear" signals, take profit (TP) signals, and volume spike indications. This indicator aims to help traders identify potential trading opportunities through trends, reversals and price exhaustion.
Key Features
Bull and Bear Signals: Pace Pro generates green "bull" and red "bear" signals based on a trend strength score derived from an aggregation of components.
Take Profit (TP) Signals: The indicator plots black "TP" signals at areas of price exhaustion.
Volume Spike Indicators: The indicator colors candles to signify high volume spikes—light green for high bullish volume and light red for high bearish volume.
Price Clouds: The indicator includes three types of Bollinger Band clouds. These clouds help visualize exhaustion and volatility, providing traders with multiple perspectives on market dynamics.
How it works:
Trend Strength: This score is calculated using a proprietary formula that assesses the magnitude and direction of market movement with standard deviation and regression analysis. Standard deviation computes the average price over a specified period and then calculates the standard deviation of prices from this average. A linear regression is performed on the closing prices over a specified period. The slope of the regression line is used to identify the trend direction, and the standard deviation is used to assess trend stability and filter out noise, working together to clearly identify direction and robustness. Bull/Bear signals are produced based on trend strength reaching specific thresholds, configurable in the settings.
Overbought/Oversold Strength: This strength identifies price exhaustion using a unique formula that aggregates values from several indicators such as RVI, RSI and CCI. RVI captures price trends, RSI measures momentum, and CCI identifies price deviations from the mean, providing a comprehensive view of market conditions. Take profit signals are plotted at points of high price exhaustion, indicating optimal exit prices.
Volume Analysis: Volume spikes are identified and highlighted with colored candles using an ATR calculation that pinpoints outliers in volume. This is calculated using the math.abs function, identifying volume spikes in the last 14 bars. Volume spike candle size can be configured in settings to the user's liking.
Bollinger Band Clouds: The indicator employs Bollinger Band clouds based on WMA, VWMA, and EMA to provide a comprehensive view of market volatility and trend strength. WMA responds quickly to price changes, VWMA incorporates volume, and EMA smooths out data, offering a unique and adaptive perspective on market conditions. This combination is used to provide a unique perspective on market volatility, utilizing different moving averages. These clouds adapt to price fluctuations and offer visual cues to enhance trend analysis.
Utility
This tool provides traders with valuable information for trend-following and reversal strategies across different timeframes. It helps traders by:
-Generating "bull" and "bear" signals to indicate potential long, short and exit points. The precise calculation methods and statistical components used in deriving the trend strength score are designed to filter out market noise and provide a clear indication of prevailing market trends.
-Providing "TP" signals at areas of price exhaustion, areas where taking profit is optimal. These also serve as potential reversal points in the market as they incorporate reversion analysis techniques.
-Highlighting high volume spikes with colored candles to indicate significant market activity. These volatile candles can indicate a significant and rapid surge in price.
-Offering visual insights through Bollinger Band clouds, which help traders assess overbought and oversold conditions on a broad scale. These aid in visualizing potential reversals in the market.
Rationale and Benefits of Component Combination
The combination of trend strength, overbought/oversold strength, volume analysis, and Bollinger Band clouds provides a holistic approach to market analysis and allows users to use various techniques of trading analysis to make sound trading decisions. Each component serves a distinct purpose:
-Trend Strength identifies and confirms the direction and magnitude of market trends, offering clear bull and bear signals. A trend score is calculated to clearly identify where price is strongly trending and where it is quite weak. This customizable feature allows traders to configure this indicator to their liking by only plotting signals when the trend reaches a desired threshold.
-Overbought/Oversold Strength pinpoints areas of price exhaustion, providing crucial take profit and reversal conditions in the market. I combine RSI, RVI, and CCI to provide a more robust reversion score. My rationale for this is to leverage data from multiple indicators, to ensure a comprehensive assessment of price exhaustion rather than relying on a single source.
-Volume Analysis highlights significant market activity, giving traders insights into potential price movements. This feature is included to provide users with a visual representation of price pumps/dumps, that can aid in trading decisions in combination with entry and exit signals.
-Bollinger Band Clouds offer a visual representation of market volatility and trend strength, enhancing the overall analytical framework. Bands were calculated using a mixture of WMA, VWMA, and EMA to diversify data and to bring variety to its display. This can enhance its use as it does not use a single data source and relies on multiple.
Uniqueness:
This indicator stands out due to its innovative integration of standard deviation and regression analysis, offering traders a unique and comprehensive market analysis tool. By combining standard deviation to measure volatility and filter out noise with regression analysis to identify trend direction and strength, it provides insightful trend signals that help traders make informed decisions. This indicator's versatility is enhanced by its customizable settings, allowing traders to adapt it to their specific needs and trading styles with the trend sensitivity setting. Combining RSI, RVI, and CCI for reversion and exit points is unique as it integrates multiple perspectives on price momentum and volatility, providing a more comprehensive assessment of price exhaustion than using any single indicator. Combining WMA, EMA, and VWMA as bands is beneficial and unique as it blends different averaging methods to offer a more nuanced and adaptive view of market volatility and trend strength.
By integrating these components, it delivers a multifaceted tool that addresses various aspects of market analysis, making it a valuable asset for traders seeking to improve their decision-making process.
Disclaimer
Trading involves substantial risk and is not suitable for every investor. This indicator is designed to assist in decision-making but does not guarantee profits or prevent losses. Always conduct your own research and consider seeking advice from a financial professional.
Trendlines (long)Hi all!
I hope that this indicator helps you to be a more efficient trader. The concept is well known and useful. So this is not some magic algorithm founded by me, but rather a well known concept. The concept is the drawing of trendlines.
It draws trendlines that has a retest. It draws the trendlines in different colors, the colors used are blue, red, fuchsia and lime.
These are the steps for finding a trendline:
1. Find a generic retest
Find a low that has 2 earlier lows and 1 later low that are higher. This is the reason that a trendline will be created "1 bar late". This is the base and the indicator goes on from here, meaning that this needs to be true to continue.
2. Find an uptrend
Look back 8 bars to find a low that is lower than the retest low.
3. Create the first point of a trendline
Go thru every bar between the user defined "Lookback" and the retest bar (minus the user defined "Skip gap" that's needed between points to create a trendline). From the earliest bar to the latest.
4. Create the second point of the trendline
Go thru every bar between the retest bar and the the first point (bar) minus the "Skip gap". From latest bar to the earliest. A trendline between the two bars are invalidated if some of the criteria are met in-between the bars creating the trendline:
- closed above the trendline (trendline broken)
- is not within the retest bar
- the slope of the trendline is upwards (this indicator is for long entries only)
- at least 1 of the bars creating the retest (1 main bar and 2 earlier bars) has NOT been above the trendline
- is not the created trendline (between the two points) that's closest to the low of the retest bar
TODO:
- add functionality to draw trendlines directly on breakouts
- add volume (high volume needed to create a trendline from a breakout/retest)
- ...?
I hope this explanation makes sense, let me know otherwise. Also let me know if you have any suggestions on improvements.
Best of luck trading!
Raj - Mark Minervini Stage 2 with RSTitle: Mark Minervini Stage 2 Screener with Custom RS
Description:
This script is designed to identify stocks that meet the criteria for Mark Minervini's Stage 2 trend setup, incorporating custom relative strength (RS) ranking.
Key Features:
Moving Averages: Tracks the 50-day, 150-day, and 200-day Simple Moving Averages (SMA) to identify trend alignment.
Price Conditions: Ensures the stock price is above key moving averages, is within 25% of its 52-week high, and is at least 25% above its 52-week low.
Custom Relative Strength (RS): Compares the stock's performance against a benchmark (e.g., S&P 500) to ensure it has a strong relative strength. The RS is normalized on a 0-100 scale, and only stocks with an RS above 70 are highlighted.
Visual Indicators: The script plots moving averages on the chart and labels points where all conditions for the Stage 2 setup are met.
Usage:
Apply this script to your charts to find stocks that are in a strong uptrend and meet Mark Minervini's Stage 2 criteria.
Customize the benchmark symbol for the RS calculation to fit your market or preference
Buy-Sell-Hold RecommendationsDescription:
The indicator displays "recommendations" for the active symbol (Buy, Strong buy, Sell, Strong sell or Hold), based on the Tradingview's recommendations data. There are 3 presentations you can choose from:
- Bar -> displays a vertical/horizontal bar with sections for each rating
- Pie chart -> displays a pie chart with sections
- Table -> displays a table with score for each recommendation
Inputs:
- Display mode -> data presentation mode
- Position -> position of the bar/pie chart/table
- Highlight the highest rating -> recommendation(s) with highest score will be highlighted
- Buy, Strong buy, Sell, etc. -> colors of the "bar" sections
- Pixel Width, Pixel Height, etc. -> size of each "pixel" (cell) of the pie chart
- Resolution (X), Resolution (Y) -> how many pixels (cells) the pie chart has on each axis
- Inner area size (%) -> size of the empty space at the center of the pie chart
- Invert theme -> invert coloring scheme for "table" presentation mode
Notes:
- Tradingview seems to provide the recommendations only for major stocks
- Data is taken directly from Tradingview and is based on opinions of "analysts"
Big Bar Followed by Doji/PinbarUsed find doji/pinbars after a Big candle showing the potential Morning/Evening star formation after x amount of consecutive up moves.
1. Doji Threshold (dojiThreshold)
What is a Doji?: A doji is a candlestick pattern where the opening and closing prices are very close to each other. It represents indecision in the market.
Threshold Explanation: The dojiThreshold is used to define what qualifies as a doji by comparing the size of the candle's body (the difference between the opening and closing prices) to the total range of the candle (the difference between the high and low prices).
How it works:
The formula in the script checks if the absolute difference between the close and open is less than or equal to a percentage of the entire candle's range.
Example: If the dojiThreshold is set to 0.1 (or 10%), this means that for a candle to be considered a doji, the size of the body (the difference between the open and close) must be 10% or less of the total candle's range (the difference between the high and low prices).
In other words, if the body is small enough (based on the threshold), the candle is considered a doji.
2. Pinbar Body Size (pinbarBodySize)
What is a Pinbar?: A pinbar (short for "pinocchio bar") is a candlestick pattern with a small body and a long wick (or shadow) on one side, indicating a potential reversal. The longer wick represents a rejection of a certain price level.
Body Size Explanation: The pinbarBodySize defines the maximum proportion of the candle's total range that the body can occupy for the candle to be considered a pinbar.
How it works:
The script compares the size of the body to the total range of the candle.
Example: If pinbarBodySize is set to 0.3 (or 30%), the body of the candle must be 30% or less of the total range for it to be considered a pinbar. This ensures that the candle has a small body and, therefore, a relatively long wick on one side.
The script then checks whether the longer wick is on the upper or lower side of the candle to determine if it's a valid pinbar pattern.
Summary:
Doji: The dojiThreshold parameter sets how close the open and close prices need to be relative to the candle's range for the candle to be considered a doji.
Pinbar: The pinbarBodySize parameter sets the maximum size of the body relative to the candle's total range to qualify it as a pinbar.
Both of these thresholds are adjustable in the script, allowing you to fine-tune what qualifies as a doji or pinbar based on your trading style and the market conditions you're analyzing.
True Day Open1. *nyTime*: Converts the current time to the New York timezone.
2. *nyHour and nyMinute*: Extracts the hour and minute of the current candle in the New York timezone.
3. *isNyMidnightCandle*: A boolean variable that checks if the current candle is the 12:00 AM candle in New York.
4. *bgcolor*: Colors the background of the 12:00 AM candle blue.
5. *plotshape*: Optionally, you can mark the 12:00 AM candle with a blue label above the bar for better visibility.
You can copy and paste this code into the Pine Editor on TradingView and apply it to your chart. Make sure your chart is set to the 5-minute timeframe.
Envelop-Ama-VivekThe Adaptive Moving Average (AMA) is a type of moving average developed by Perry Kaufman, designed to adapt to the market's volatility. Unlike traditional moving averages that use fixed periods for smoothing, the AMA adjusts its sensitivity based on the market's noise and trends.
### Key Features of AMA:
1. **Adaptive Sensitivity:**
- The AMA responds more quickly to significant market movements while filtering out minor fluctuations. This is achieved by adjusting the smoothing constant dynamically.
- In trending markets, the AMA becomes more sensitive, allowing it to capture trends faster.
- In choppy or sideways markets, the AMA reduces its sensitivity, thus minimizing the impact of noise and avoiding false signals.
2. **Efficiency Ratio (ER):**
- The ER is a core component of the AMA. It measures the efficiency of price movement by comparing the net price change to the total price change over a given period.
- A higher ER indicates a strong trend, while a lower ER suggests more noise in the market.
3. **Smoothing Constant (SC):**
- The SC determines how much weight is given to the most recent price relative to the previous AMA value.
- The SC is dynamically adjusted based on the ER, with higher values used during strong trends and lower values during volatile or choppy periods.
### Applications of AMA:
- **Trend Detection:** The AMA is useful for identifying the start of a new trend or confirming an existing one, as it adjusts quickly to significant price movements.
- **Noise Reduction:** By adapting to market conditions, the AMA helps in filtering out market noise, making it easier to distinguish between genuine trends and short-term fluctuations.
- **Entry and Exit Signals:** Traders can use the AMA to generate buy and sell signals. For instance, when the price crosses above the AMA, it might indicate a buying opportunity, and when it crosses below, it might signal a selling opportunity.
### Benefits:
- **Adaptive Nature:** Its ability to adjust to market conditions makes the AMA more reliable in different market environments.
- **Reduced Lag:** Compared to traditional moving averages, the AMA reduces lag during trending markets, allowing for quicker responses to price movements.
### Drawbacks:
- **Complexity:** The calculation of the AMA is more complex compared to simple moving averages, which might make it less accessible to some traders.
- **Parameter Sensitivity:** The effectiveness of the AMA can vary depending on the chosen parameters (e.g., length, fast length, slow length), requiring careful tuning.
In summary, the AMA is a powerful tool for traders looking to capture trends while minimizing the impact of market noise. Its adaptive nature makes it suitable for various market conditions, providing a balance between responsiveness and noise reduction.
Weekly Profiles [TFO]This Weekly Profiles indicator was built to overlay historical data to show how prior weeks of price action have unfolded under specified input conditions.
When "Show Historical Weekly Profiles" is enabled, the indicator draws out how prior weeks have traded. This is done by tracking weekly price movements, measuring the percent change from each week's respective weekly open price, and translating that percent change to the current week's open price to visually describe how price fluctuated in those previous weeks.
With "Show Weekly Profile Table" enabled, we can observe some basic statistics on the weekly profiles that have been collected, such as the average range and which days have made the high/low of the week from the given dataset.
There are also options to refine the dataset by specifying which days have made the high/low of the week, which will only show profiles that meet said criteria. For instance, by enabling "Low of Week" and selecting "Monday", the indicator will show every weekly profile that made its low on a Monday. In the following chart, we can again use the table to observe that we currently have 14 such weeks on NQ1! (from the data available on our current chart timeframe and TradingView plan), whose average range is 3.65% from the week's low to the week's high, and from those 14 weeks, the high of the week was made on a Friday 10 times or 71% of the time.
The "Profile Resolution" option specifies the interval at which to show changes in price (given that it is greater than or equal to the current chart timeframe). In the below chart, the Profile Resolution is set to 4 hours. As such, it simplifies the profiles by tracking the close price of each 4 hour candle (again as a percent change from each profile's respective open price). The larger Profile Resolution can make it easier to observe commonalities between profiles, such as the below chart of NQ1! that highlights a noticeable price decrease during the New York morning session across several of the available weekly profiles.
There is also an option to "Highlight Closest Profiles" which does exactly that. Essentially, all weekly profiles are given a score according to how close the current week's price action is matching each profile up until the current point in time. For example, if one were observing this indicator on a Wednesday afternoon, each profile would be scored according to how close price is to each profile, starting from the weekly open, up until the Wednesday afternoon of each profile. Everything after that point in time is disregarded since it hasn't happened yet and can't be measured. With this in mind, profiles with greater similarity to the current week are highlighted with deeper colors, and profiles with lesser similarity are given lighter, more transparent colors.
The "Randomize Colors" option will use various colors for the weekly profiles for easier visual differentiation (especially where there are several profiles crowding each other), as opposed to otherwise having one color for all profiles. Lastly, there are basic styling options to control the table position, table size, and the line width of all weekly profiles.
Curious Buy - Sell Indicator - Institutional Zones (Smart Money)How the Script Works:
1. The Scripts identifies Institutional Demand , Supply & Neutral Zones with FIBS on the scripts with Rectangle BOX with labels in advance. User can insert desired start and end value to plot institutional zones
2. Script generates BUY - SELL signals shape based on candle stick formation in live market and labels with BUY - SELL image for easy identification
3. Script gives pop message EXIT SHORT once Buy spotted and candle close above the buy signal and same way EXIT LONG once Sell spotted and candle close below the buy signal
4. Scripts identifies the candle closing above the BUY - SELL signals Eg - If buy spotted the candle closing above the BUY signal with display with BLUE color Candle same way for sell signal the candle closing below the sell signal candle with display with BLACK color candle.
5. Script spots fake signals which are not valid and can be ignored by the end user
6. Three EMA's 20,50,200 has implemented to identify the strength of the market
7. Scripts identifies OPEN = LOW & OPEN = HIGH candle stick to spot the Institutional BUY - SELL activity
8. The script provides visual clues on the chart to help users identify potential trading opportunities.
9. The script provides visual clues on the chart to help users identity potential trading opportunities in live market
10. The looks and parameters of the script can be modified by end user to customize and adapt to different strategy.
11. With the script user can check higher time frame DAILY \ WEEKLY BUY - SELL signals to plan intraday trades and plan safe BUY - SELL positions.
How Users Can Make Profit Using This Script:
1. Identify potential BUY - LONG opportunities: When a valid BUY is detected and condition is met, it is suggested to opening BUY position with stoploss below the BUY signal spotted candle.
Safe users can execute BUY position once BLUE COLOR candle is formed, Wait for pull back to reduce the stoploss
2. Identify potential SELL - SHORT opportunities: When a valid SELL is detected and condition is met, it suggests a potential opening SELL positions with stoploss above the BUY signal spotted candle. Safe users can execute SELL position once BLACK COLOR candle is formed, Wait for pull back to reduce the stoploss.
3. Script generated BUY - SELL signal met target with the Institutional zone. Eg if BUY spotted at demand zone target will be neutral zone & Supply zone.
4. Script designed for user to spot high probability trades when BUY SIGNAL SPOTTED at the Institutional Demand zone same way SELL SIGNAL SPOTTED AT INSTITUTIONAL supply zone.
5. Combine with additional analysis: Users can utilize this script as a tool in their overall trading strategy. They can combine the signals with fundament analysis , market sentiment to make more informed trading decision
6.Set risk management measures: It is important for users to implement proper risk management strategies when trading based on the scripts signals. To avoid potential losses user once spotted BUY - SELL execute the long or short position. Ensure to place the stoploss to avoid potential losses and place the target. Once your trade is moving in your favor
can trial your stoploss to cost and protect the profits.
Trading Desk - OPEN SOURCEThe Trading Desk - is a powerful tool designed to identify key market stages based on Break of Structure (BOS) patterns. This indicator tracks Bullish and Bearish Market Breaks (MBs) to determine four crucial market stages: Accumulation, Distribution, Reaccumulation, and Redistribution.
Accumulation: Identified when a series of Bullish MBs dominate the market, signaling a potential upward trend.
Distribution: Triggered by dominant Bearish MBs, indicating a possible market decline.
Reaccumulation: Occurs after a sequence of Bullish MBs is followed by up to three Bearish MBs, suggesting a continuation of the upward trend after a temporary pullback.
Redistribution: Appears when a sequence of Bearish MBs is followed by up to three Bullish MBs, indicating a potential continuation of the downward trend after a brief upward correction.
The indicator also includes a dynamic table displayed at the top right of the chart, showing the current market stage in real-time. This helps traders quickly assess the market environment and make informed trading decisions.
Ideal for: Traders looking to understand market structure and identify trend continuation or reversal phases.
ICT Balanced Price Range [TradingFinder] BPR | FVG + IFVG🔵 Introduction
The ICT Balanced Price Range (BPR) indicator is a valuable tool that helps traders identify key areas on price charts where a balance between buyers and sellers is established. These zones can serve as critical points for potential price reversals or continuations.
🟣 Bullish Balanced Price Range
A Bullish BPR forms when a buying pressure zone (Bullish FVG) overlaps with a Bullish Inversion FVG. This overlap indicates a high probability of price moving upwards, making it a crucial area for traders to consider.
🟣 Bearish Balanced Price Range
Similarly, a Bearish BPR is created when a selling pressure zone (Bearish FVG) overlaps with a Bearish Inversion FVG. This zone is often seen as a key area where the price is likely to move downward.
🔵 How to Use
🟣 Identifying the Balanced Price Range (BPR)
To identify the Balanced Price Range (BPR), you must first locate two Fair Value Gaps (FVGs) on the price chart. One FVG should be on the sell side, and the other on the buy side. When these two FVGs horizontally oppose each other, the area where they overlap is recognized as the Balanced Price Range (BPR).
This BPR zone is highly sensitive to price movements due to the combination of two FVGs, often leading to strong market reactions. As the price approaches this area, the likelihood of a significant market move increases, making it a prime target for professional traders.
🟣 Bullish Balanced Price Range (Bullish BPR)
To effectively trade using a Bullish BPR, begin by identifying a bullish market structure and searching for bullish Price Delivery Arrays (PD Arrays). Once the market structure shifts to bullish in a lower time frame, locate a Bullish FVG within the Discount Zone that overlaps with a Bearish FVG.
Mark this overlapping zone and wait for the price to test it before executing a buy trade. Alternatively, you can set a Buy Limit order with a stop loss below the recent swing low and target profits based on higher time frame liquidity draws.
🟣 Bearish Balanced Price Range (Bearish BPR)
For bearish trades, start by identifying a bearish market structure and look for bearish PD Arrays. After the market structure shifts to bearish in a lower time frame, identify a Bearish FVG within the Discount Zone that overlaps with a Bullish FVG. Mark this overlapping zone and execute a sell trade when the price tests it.
You can also use a Sell Limit order with a stop loss above the recent swing high and target profits according to higher time frame liquidity draws.
🔵 Settings
🟣 Global Settings
Show All Inversion FVG & IFVG : If disabled, only the most recent FVG & IFVG will be displayed.
FVG & IFVG Validity Period (Bar) : Determines the maximum duration (in number of candles) that the FVG and IFVG remain valid.
Switching Colors Theme Mode : Includes three modes: "Off", "Light", and "Dark". "Light" mode adjusts colors for light mode use, "Dark" mode adjusts colors for dark mode use, and "Off" disables color adjustments.
🟣 Display Settings
Show Bullish BPR : Toggles the display of demand-related boxes.
Show Bearish BPR : Toggles the display of supply-related boxes.
Mitigation Level BPR : Options include "Proximal", "Distal", or "50 % OB" modes, which you can choose based on your needs. The "50 % OB" line is the midpoint between distal and proximal.
Show Bullish IFVG : Toggles the display of demand-related boxes.
Show Bearish IFV G: Toggles the display of supply-related boxes.
Mitigation Level FVG and IFVG : Options include "Proximal", "Distal", or "50 % OB" modes, which you can choose based on your needs. The "50 % OB" line is the midpoint between distal and proximal.
🟣 Logic Settings
FVG Filter : This refines the number of identified FVG areas based on a specified algorithm to focus on higher quality signals and reduce noise.
Types of FVG filters :
Very Aggressive Filter : Adds a condition where, for an upward FVG, the last candle's highest price must exceed the middle candle's highest price, and for a downward FVG, the last candle's lowest price must be lower than the middle candle's lowest price. This minimally filters out FVGs.
Aggressive Filter : Builds on the Very Aggressive mode by ensuring the middle candle is not too small, filtering out more FVGs.
Defensive Filter : Adds criteria regarding the size and structure of the middle candle, requiring it to have a substantial body and specific polarity conditions, filtering out a significant number of FVGs.
Very Defensive Filte r: Further refines filtering by ensuring the first and third candles are not small-bodied doji candles, retaining only the highest quality signals.
🟣 Alert Settings
Alert Inversion FVG Mitigation : Enables alerts for Inversion FVG mitigation.
Message Frequency : Determines the frequency of alerts. Options include 'All' (every function call), 'Once Per Bar' (first call within the bar), and 'Once Per Bar Close' (final script execution of the real-time bar). Default is 'Once per Bar'.
Show Alert Time by Time Zone : Configures the time zone for alert messages. Default is 'UTC'.
Display More Info : Provides additional details in alert messages, including price range, date, hour, and minute. Set to 'Off' to exclude this information.
🔵 Conclusion
The ICT Balanced Price Range is a powerful and reliable tool for identifying key points on price charts. This strategy can be applied across various time frames and serves as a complementary tool alongside other indicators and technical analysis methods.
The most crucial aspect of utilizing this strategy effectively is correctly identifying FVGs and their overlapping areas, which comes with practice and experience.
Maximum Bar Range in TicksThis is a simple indicator that gives the maximum range of any bar on the chart in ticks. I found it useful when sizing arrays and it might also be valuable when working out risk parameters.
DIVERGENCE SPOT X P.FUTURES (BYBIT and BINANCE) [GUSLM]Author's note:
When I searched the Trading View libraries, I didn't find what I was looking for. I noticed that the crypto market currently uses a lot more derivatives called "Perpetual" Futures, while the price is always formulated based on the spot price, or the real coin.
I wanted something that would mark the difference in real time between the spot price and the perpetual futures, creating a bar history. Since the relationship between them generates algorithms on exchanges to formulate payment rates for the lowest side, and to formulate the "market price" of the perpetual futures (without expiration), which are not the value of the last trade. I found several scripts that try to show the relationship between the funding rate and the rate, or the increase in these over time. But they don't show the direct action of the two prices in real time, nor a history of this difference.
The usefulness of this script is that at times you will see jumps in the price difference and can make assessments from this. Associated with another funding rate script it becomes even more interesting. I also didn't find coverage for the two brokers that my friends and I operate with, so I enabled it for use on these two brokers.
Function:
It works for the BYBIT and BINANCE exchanges. In coins that have both markets (Spot and Perpetual futures).
It shows in bars the real-time activity of the two markets, the difference between them. A configurable historical average, and bars for each candle. The last one is in real time.
How it works:
The script will detect which coin you are looking at, and will use its algorithm to detect if there is an opposite pair. If it is spot, it will identify and look for the perpetual future, and if it is future, it will find the spot prices. It will calculate the difference between them in %, using 0.05 as the default threshold - normally used by brokers as "zero". The futures on average are currently 0.05 higher than the spot in price. And it will show this difference in a bar, green and upwards if the futures are higher, and red if they are lower. and its respective normalized value in %(100)
Example of use:
1: you can check for possible movement patterns in relation to the expectation of future prices and spot, over time.
2. Main: you will notice at times normally prior to larger price movements, the indicator will pulse, indicating changes in the price difference of perpetual futures in relation to spot. - e.g.: in large purchases in spot that pull the price up by buying more positions in the order book, you will see a downward pulse in the indicator bar. as well as in the opposite direction, being an upward pulse.
3. The movement may sometimes be in futures, so you will see the opposite happening, it may be useful to add the opposite currency pair as an additional price, to identify with certainty who is "pulling" whether it is spot or perpetual. But in both cases the possible interpretation is the same. the expectation of futures in relation to the spot price is higher or lower than the average, and there are or are not pulses in one direction or another.
Summary: by following this indicator you can see the real-time vision of large purchases in spot, for example. Someone with great market power may have a future position, and is triggering purchases or ignition in the direction of their position in spot, for example.
Warning: many other indicators and market insights are needed to have a view of the whole and interpret these signals and bar movements. Use and observation lead to an understanding for future actions. But it should always be based on a global context. This is not an indicator to be used alone.
Warning 2: if the opposite pair is not available (exchange only has a spot market, for example) nothing will appear in the indicator. And if it is an exchange other than BYBIT or BINANCE, nothing will probably appear either.
SUPER EMA SMA 16x [GUSLM]█ Author's Note:
After extensively reviewing the EMA and SMA consolidation tools in the TradingView library, I found that none fully met my expectations or those of friends and colleagues. Some tools were too specific or not configurable enough, with varying sensitivities. Others lacked options or produced many invalid and incorrect ranges when viewed across different timeframes. Some were fixed in their options, others did not allow visualization on different timeframes or lacked crossover signals and customization options for turning each option on or off. Additionally, there was no custom function to view one or more configurable moving averages from different timeframes in the current view, serving as a time-saving shortcut to avoid switching between timeframes to record values. Consequently, I decided to develop my own tool. I hope that you, fellow traders, find it valuable and enjoy using it.
█ Description:
The GUSLM SUPER EMA SMA 16x allows traders to configure and visualize multiple labeled trendlines for various periods on a single chart, all at once. highlighting how prices move over time. It enables simultaneous display of trendlines for different timeframes, with customizable colors and thicknesses. Designed for traders who use moving averages in their strategies, it simplifies the analysis of key moving averages like the 200-period, 100 50 12 26 and 20-period etc, offering a clear, configurable tool to try to identify reactions, trends, supports, and resistances.. This indicator employs algorithms to detect and show signals where price movements are confined, all that can be usefull for helping traders spot potential breakout zones and make informed trading decisions.
█ Key Features:
► Customizable Timeframes: Display in one, multiple moving averages and exponential moving averages across various timeframes (weekly, daily, hourly, and 4-hour) to tailor analysis to your trading strategy.
► Adjustable Display Settings: Choose which moving averages to display and customize their visual characteristics, including color and line width, to match your chart preferences.
► Dynamic Alerts: Activate signals for different timeframes with customizable visual cues, including background color changes and shape indicators to highlight key trading signals.
► Clear Visual Indicators: Enhance chart readability with distinct colors and shapes for different types of moving averages and also crossover events, providing immediate visual feedback for trading decisions.
█ User-Defined Inputs:
► Moving Averages Display Options:
Weekly: MA 200, EMA 200, EMA 100, EMA 50, EMA 20, EMA 12, EMA 26
Daily: MA 200, EMA 200, EMA 100, EMA 50, EMA 20, EMA 12, EMA 26
Hourly: MA 200, EMA 200, EMA 100, EMA 50, EMA 20, EMA 12, EMA 26
4-Hour: MA 200, EMA 200, EMA 100, EMA 50, EMA 20, EMA 12, EMA 26
► Line Width Adjustments:
Hourly, Daily, Weekly, 4-Hour
► Color Options for each range and or individually
► Options for type and Signal; Weekly: On/Off Daily: On/Off Hourly: On/Off 4-Hour: On/Off
► Background color change and arrow shapes for crossover and crossunder signals
█ How It Works:
► Range Detection: The indicator scans the charts in different timeframes of the same asset, based on options, and plot them on the actual view, even if they are from another timeframe. And label it based on configuration, telling wich one is from where as H 4h W etc, and its lenght and range. also for collors widths etc. It calculates the average or exponential average price from other timeframes, and plot it in the current view.
► Visualization: Validated ranges and lines are highlighted on the chart with colored optimized lines, providing a clear visual cue of potential zones.
█ Usage Examples:
► Example 1:
You can configure the ranges you want and timeframes you want and see how it interact with the prices. and can expect eventual future reactions.
█ Practical Applications:
► Identify and Confirm Breakout Zones: Use the lines to identify potential breakout zones and limits, Ex: if is there a key level above your breakout, you may expect a reaction, maybe changing your plan to make an entrance above the initial resistance, you can see eventual resistance and support zones. helping to anticipate significant price movements.
► Identify Key Price Levels: The tool helps in pointing key price levels where there is a high probability of significant price reactions, providing crucial insights for trading strategies.
► Enhance Technical Analysis: Integrate the SUPER EMA SMA 16x into your existing technical analysis toolkits to improve the accuracy of your trading decisions.
█ Conclusion:
The SUPER EMA SMA 16x is a powerful tool, for traders looking to identify periods of price consolidation, support and resistance levels and potential confirmation for breakout zones. Serving as a time-saving shortcut with its customizable settings and algorithms, it provides a reliable and visual method to enhance your trading strategy. Whether you're a beginner or an experienced trader, this indicator can add significant value to your technical analysis.
█ Cautionary Note:
While the SUPER EMA SMA 16x is a powerful tool to see many relevant SMAS and EMAS and signals, it's important to combine it with other indicators and analysis methods for comprehensive trading decisions. Always consider market context and external factors when interpreting detected consolidation ranges.
US Market Real Value Adjusted for CPI and Dollar IndexUS Market Real Value Adjusted for CPI and Dollar Index
Provides quick access to this formula: (SP:SPX+NASDAQ_DLY:IXIC+TVC:DJI+CAPITALCOM:RTY)/4/(ECONOMICS:USCPI*TVC:DXY*100)
Overview:
This indicator provides a dynamic view of the US stock market's real value, adjusted for inflation and currency strength. It combines major stock indices including the S&P 500, NASDAQ, Dow Jones, and Russell 2000, and adjusts the composite index using the US Consumer Price Index (CPI) and the US Dollar Index (DXY). This adjustment helps to reveal the true market performance, stripped of inflationary effects and currency valuation changes.
Key Features:
Composite Index Calculation: Averages the prices of SPX, IXIC, DJI, and RTY to create a broad market overview.
Inflation Adjustment: Uses the CPI to adjust for the effects of inflation, ensuring that the real value changes in the stock market are highlighted.
Currency Strength Adjustment: Applies the DXY to account for fluctuations in the strength of the US dollar, providing insights into how currency variations impact market valuation.
Dynamic Base Calculation: Utilizes a rolling window to dynamically update base values, allowing for continuous reassessment of the market’s adjusted value as new data becomes available.
This indicator provides:
Real Value Insights: By adjusting for both inflation and currency strength, this indicator offers a more accurate measure of the underlying market conditions.
Dynamic Updates: With a rolling window approach, the indicator continually adapts, providing up-to-date information.
Strategic Decisions: Helps in identifying true market growth or decline periods, aiding in strategic investment planning.
Usage:
To use this indicator, simply add it to your chart, and it will automatically display the adjusted composite index. This index can be particularly useful for investors looking to understand underlying market trends beyond nominal price movements, helping in making more informed investment decisions when comparing certain tickers to an average of the major US stock market indexes, adjusted for inflation and the strength of the US dollar.
Example Use Case:
A typical use case might involve comparing periods of high inflation to see how the overall US stock market performed in real terms, not just nominal terms. This can indicate whether the market growth was genuine or merely a reflection of inflation. By comparing this result to an average of these major indexes without adjusting for inflation or currency strength changes, you can see how significantly these forces can impact real gains or losses.
Highlight Opening Candle with Dynamic Color What is this indicator - This indicator is color coded for showing the opening range of the market. Ideally to be used with 5min, 10min or 15mins. Any candles that has its high / low within the opening range - the candle will be highlighted in RED.
How to use this indicator - For beginners, this indicator is useful to determine the trend based on open. If the candle is RED (meaning its still within the opening range) the trend is not clear. Once the a whole candle is open/closed above or below the opening range - the color of the range band indicates the trend. Green range - uptrend, Red range - downtrend. Grey range - price still in the opening range.
75: Notable Financial CrisesThe TradingView script named "75: Notable Financial Crises" visualizes and marks significant financial crises on a financial chart.
This script plots vertical lines on the a chart corresponding to specific dates associated with notable financial crises in history. These crises could include events like the Great Depression (1929), Black Monday (1987), the Dot-com Bubble (2000), the Global Financial Crisis (2008), and others. By marking these dates on a chart, traders and analysts can easily observe the impact of these events on market behavior.
Dual Chain StrategyDual Chain Strategy - Technical Overview
How It Works:
The Dual Chain Strategy is a unique approach to trading that utilizes Exponential Moving Averages (EMAs) across different timeframes, creating two distinct "chains" of trading signals. These chains can work independently or together, capturing both long-term trends and short-term price movements.
Chain 1 (Longer-Term Focus):
Entry Signal: The entry signal for Chain 1 is generated when the closing price crosses above the EMA calculated on a weekly timeframe. This suggests the start of a bullish trend and prompts a long position.
bullishChain1 = enableChain1 and ta.crossover(src1, entryEMA1)
Exit Signal: The exit signal is triggered when the closing price crosses below the EMA on a daily timeframe, indicating a potential bearish reversal.
exitLongChain1 = enableChain1 and ta.crossunder(src1, exitEMA1)
Parameters: Chain 1's EMA length is set to 10 periods by default, with the flexibility for user adjustment to match various trading scenarios.
Chain 2 (Shorter-Term Focus):
Entry Signal: Chain 2 generates an entry signal when the closing price crosses above the EMA on a 12-hour timeframe. This setup is designed to capture quicker, shorter-term movements.
bullishChain2 = enableChain2 and ta.crossover(src2, entryEMA2)
Exit Signal: The exit signal occurs when the closing price falls below the EMA on a 9-hour timeframe, indicating the end of the shorter-term trend.
exitLongChain2 = enableChain2 and ta.crossunder(src2, exitEMA2)
Parameters: Chain 2's EMA length is set to 9 periods by default, and can be customized to better align with specific market conditions or trading strategies.
Key Features:
Dual EMA Chains: The strategy's originality shines through its dual-chain configuration, allowing traders to monitor and react to both long-term and short-term market trends. This approach is particularly powerful as it combines the strengths of trend-following with the agility of momentum trading.
Timeframe Flexibility: Users can modify the timeframes for both chains, ensuring the strategy can be tailored to different market conditions and individual trading styles. This flexibility makes it versatile for various assets and trading environments.
Independent Trade Logic: Each chain operates independently, with its own set of entry and exit rules. This allows for simultaneous or separate execution of trades based on the signals from either or both chains, providing a robust trading system that can handle different market phases.
Backtesting Period: The strategy includes a configurable backtesting period, enabling thorough performance assessment over a historical range. This feature is crucial for understanding how the strategy would have performed under different market conditions.
time_cond = time >= startDate and time <= finishDate
What It Does:
The Dual Chain Strategy offers traders a distinctive trading tool that merges two separate EMA-based systems into one cohesive framework. By integrating both long-term and short-term perspectives, the strategy enhances the ability to adapt to changing market conditions. The originality of this script lies in its innovative dual-chain design, providing traders with a unique edge by allowing them to capitalize on both significant trends and smaller, faster price movements.
Whether you aim to capture extended market trends or take advantage of more immediate price action, the Dual Chain Strategy provides a comprehensive solution with a high degree of customization and strategic depth. Its flexibility and originality make it a valuable tool for traders seeking to refine their approach to market analysis and execution.
How to Use the Dual Chain Strategy
Step 1: Access the Strategy
Add the Script: Start by adding the Dual Chain Strategy to your TradingView chart. You can do this by searching for the script by name or using the link provided.
Select the Asset: Apply the strategy to your preferred trading pair or asset, such as #BTCUSD, to see how it performs.
Step 2: Configure the Settings
Enable/Disable Chains:
The strategy is designed with two independent chains. You can choose to enable or disable each chain depending on your trading style and the market conditions.
enableChain1 = input.bool(true, title='Enable Chain 1')
enableChain2 = input.bool(true, title='Enable Chain 2')
By default, both chains are enabled. If you prefer to focus only on longer-term trends, you might disable Chain 2, or vice versa if you prefer shorter-term trades.
Set EMA Lengths:
Adjust the EMA lengths for each chain to match your trading preferences.
Chain 1: The default EMA length is 10 periods. This chain uses a weekly timeframe for entry signals and a daily timeframe for exits.
len1 = input.int(10, minval=1, title='Length Chain 1 EMA', group="Chain 1")
Chain 2: The default EMA length is 9 periods. This chain uses a 12-hour timeframe for entries and a 9-hour timeframe for exits.
len2 = input.int(9, minval=1, title='Length Chain 2 EMA', group="Chain 2")
Customize Timeframes:
You can customize the timeframes used for entry and exit signals for both chains.
Chain 1:
Entry Timeframe: Weekly
Exit Timeframe: Daily
tf1_entry = input.timeframe("W", title='Chain 1 Entry Timeframe', group="Chain 1")
tf1_exit = input.timeframe("D", title='Chain 1 Exit Timeframe', group="Chain 1")
Chain 2:
Entry Timeframe: 12 Hours
Exit Timeframe: 9 Hours
tf2_entry = input.timeframe("720", title='Chain 2 Entry Timeframe (12H)', group="Chain 2")
tf2_exit = input.timeframe("540", title='Chain 2 Exit Timeframe (9H)', group="Chain 2")
Set the Backtesting Period:
Define the period over which you want to backtest the strategy. This allows you to see how the strategy would have performed historically.
startDate = input.time(timestamp('2015-07-27'), title="StartDate")
finishDate = input.time(timestamp('2026-01-01'), title="FinishDate")
Step 3: Analyze the Signals
Understand the Entry and Exit Signals:
Buy Signals: When the price crosses above the entry EMA, the strategy generates a buy signal.
bullishChain1 = enableChain1 and ta.crossover(src1, entryEMA1)
Sell Signals: When the price crosses below the exit EMA, the strategy generates a sell signal.
bearishChain2 = enableChain2 and ta.crossunder(src2, entryEMA2)
Review the Visual Indicators:
The strategy plots buy and sell signals on the chart with labels for easy identification:
BUY C1/C2 for buy signals from Chain 1 and Chain 2.
SELL C1/C2 for sell signals from Chain 1 and Chain 2.
This visual aid helps you quickly understand when and why trades are being executed.
Step 4: Optimize the Strategy
Backtest Results:
Review the strategy’s performance over the backtesting period. Look at key metrics like net profit, drawdown, and trade statistics to evaluate its effectiveness.
Adjust the EMA lengths, timeframes, and other settings to see how changes affect the strategy’s performance.
Customize for Live Trading:
Once satisfied with the backtest results, you can apply the strategy settings to live trading. Remember to continuously monitor and adjust as needed based on market conditions.
Step 5: Implement Risk Management
Use Realistic Position Sizing:
Keep your risk exposure per trade within a comfortable range, typically between 1-2% of your trading capital.
Set Alerts:
Set up alerts for buy and sell signals, so you don’t miss trading opportunities.
Paper Trade First:
Consider running the strategy in a paper trading account to understand its behavior in real market conditions before committing real capital.
This dual-layered approach offers a distinct advantage: it enables the strategy to adapt to varying market conditions by capturing both broad trends and immediate price action without one chain's activity impacting the other's decision-making process. The independence of these chains in executing transactions adds a level of sophistication and flexibility that is rarely seen in more conventional trading systems, making the Dual Chain Strategy not just unique, but a powerful tool for traders seeking to navigate complex market environments.
FXN - Week and Day Separator midnight open. A simple modification of the regular FXN day separator indicator. It starts the days at 12:00 of the time-zone you select as opposed to the regular 17:00 server time.
Summer 2020/2021The Pine Script indicator you are examining is designed to enhance your trading chart by visually demarcating specific seasonal periods known as summer for the years 2020 and 2021. This indicator achieves this by employing background shading to indicate these defined summer periods, providing traders with a visual reference to help in analyzing seasonal trends and making informed decisions.
The script operates with precision by defining two critical summer periods: one for the year 2020 and another for the year 2021. The summer period, in this context, is identified as the time span between June 21 and September 22 of each specified year. The script utilizes the Pine Script timestamp function to create exact date and time boundaries for these periods, marking June 21 as the start of summer and September 22 as the end of summer for each year.
In detail, the indicator sets up two distinct background colors to represent the summer periods of 2020 and 2021. Specifically, it employs a semi-transparent blue color to signify the summer period of 2020, and a semi-transparent green color to denote the summer period of 2021. This differentiation in colors allows for easy visual distinction between the two years on the chart.
To achieve this visual effect, the script continuously evaluates the current bar's timestamp against the defined summer periods. If the current bar falls within the summer range of 2020, the background is shaded with the specified blue hue. Conversely, if the current bar is within the summer range of 2021, the background is shaded with the green hue. This approach ensures that the chart background reflects the specific summer periods accurately and distinctly.
By incorporating this indicator into your TradingView chart, you gain the ability to visually distinguish between different summer periods of consecutive years. This can be particularly useful for analyzing how market behavior or price movements vary during these specific times, facilitating better trend analysis and decision-making based on historical seasonal patterns.
Overall, this indicator serves as a practical tool for enhancing your chart's clarity and providing a seasonal context that can aid in the evaluation of trading strategies and historical market trends during the summer months of 2020 and 2021.
Valuation Tool V2Explanation:
Inputs:
equitySymbol: The symbol for the equity index (default is "SPY" for the S&P 500 ETF).
bondSymbol: The symbol for the bond market (default is "TLT" for the 20+ Year Treasury Bond ETF).
Fetch Data:
equityClose and bondClose retrieve the daily closing prices for the specified equity and bond symbols.
Relative Spread Calculation:
The relative spread is calculated by dividing the equity index's closing price by the bond market's closing price.
Thresholds:
The 50-period Simple Moving Average (SMA) of the relative spread is calculated.
Overvalued and undervalued thresholds are set at 10% above and below the SMA, respectively.
Normalized Spread:
The normalized spread is calculated to normalize the relative spread around its SMA, which helps in visualizing it as an oscillator.
Plotting:
The normalized spread is plotted as a blue line in the oscillator panel.
Overvalued and undervalued thresholds are plotted as dotted lines at 0.1 and -0.1, respectively.
The zero line is plotted as a solid orange line.
Background colors indicate overvalued (red) and undervalued (green) regions.
Signals:
Buy signals are plotted when the normalized spread crosses above the undervalued threshold (-0.1).
Sell signals are plotted when the normalized spread crosses below the overvalued threshold (0.1).
This script plots the relative spread as an oscillator, allowing you to see overvalued and undervalued conditions in a separate panel. You can further customize the look and feel based on your preferences and trading strategy.