Volatility with Power VariationVolatility Analysis using Power Variation
The "Volatility with Power Variation" indicator is designed to measure market volatility. It focuses on providing traders with a clear understanding of how much the market is moving and how this movement changes over time.. This indicator helps in identifying potential periods of market expansion or contraction, based on volatility.
What the indicator does:
This indicator analyzes volatility which refers to the degree of variation in the returns of a financial instrument over time. It's an important measure to understand how much the price and returns of a asset fluctuates. High volatility means large price swings, meanwhile low volatility indicates smaller and consolidating movements. Realized (Historical) Volatility refers to volatility based on past price data.
Power Variation
Power Variation is an extension of the traditional methods used to calculate realized volatility. Instead of simply summing up squared returns (as done in calculating variance), Power Variation raises the magnitude of returns to a power p . This allows the indicator to capture different types of market behavior depending on the chosen value of p .
When P = 2, the Power variation behaves like a traditional variance measure. Lower values of p (e.g., p=1) make the indicator more sensitive to smaller price changes, meanwhile higher values make it more responsive to large jumps, but smaller price moves wont affect the measure that much or won't most likely.
Bipower Variation
Bipower variation is another method used to analyze the changes in price. It specifically isolates the continuous part of price movements from the jumps, which can help by understanding whether volatility is coming from regular market activity or from sharp, sudden moves.
How to Use the Indicator.
Understand Realized and Historical Volatility. Volatility after periods of low volatility you can eventually expect a expansion or an increase in volatility. Conversely, after periods of high volatility, the market often contracts and volatility decreases. If the variation plot is really low and you start seeing it increasing, shown by the standard deviation channels and moving average and you see it trending and increasing then that means you can expect for volatility to increase which means more price moves and expansions. Also if the scaling seems messed up, then use the logarithmic chart scale.
Educational
Ticker Tape█ OVERVIEW
This indicator creates a dynamic, scrolling display of multiple securities' latest prices and daily changes, similar to the ticker tapes on financial news channels and the Ticker Tape Widget . It shows realtime market information for a user-specified list of symbols along the bottom of the main chart pane.
█ CONCEPTS
Ticker tape
Traditionally, a ticker tape was a continuous, narrow strip of paper that displayed stock prices, trade volumes, and other financial and security information. Invented by Edward A. Calahan in 1867, ticker tapes were the earliest method for electronically transmitting live stock market data.
A machine known as a "stock ticker" received stock information via telegraph, printing abbreviated company names, transaction prices, and other information in a linear sequence on the paper as new data came in. The term "ticker" in the name comes from the "tick" sound the machine made as it printed stock information. The printed tape provided a running record of trading activity, allowing market participants to stay informed on recent market conditions without needing to be on the exchange floor.
In modern times, electronic displays have replaced physical ticker tapes. However, the term "ticker" remains persistent in today's financial lexicon. Nowadays, ticker symbols and digital tickers appear on financial news networks, trading platforms, and brokerage/exchange websites, offering live updates on market information. Modern electronic displays, thankfully, do not rely on telegraph updates to operate.
█ FEATURES
Requesting a list of securities
The "Symbol list" text box in the indicator's "Settings/Inputs" tab allows users to list up to 40 symbols or ticker Identifiers. The indicator dynamically requests and displays information for each one. To add symbols to the list, enter their names separated by commas . For example: "BITSTAMP:BTCUSD, TSLA, MSFT".
Each item in the comma-separated list must represent a valid symbol or ticker ID. If the list includes an invalid symbol, the script will raise a runtime error.
To specify a broker/exchange for a symbol, include its name as a prefix with a colon in the "EXCHANGE:SYMBOL" format. If a symbol in the list does not specify an exchange prefix, the indicator selects the most commonly used exchange when requesting the data.
Realtime updates
This indicator requests symbol descriptions, current market prices, daily price changes, and daily change percentages for each ticker from the user-specified list of symbols or ticker identifiers. It receives updated information for each security after new realtime ticks on the current chart.
After a new realtime price update, the indicator updates the values shown in the tape display and their colors.
The color of the percentages in the tape depends on the change in price from the previous day . The text is green when the daily change is positive, red when the value is negative, and gray when the value is 0.
The color of each displayed price depends on the change in value from the last recorded update, not the change over a daily period. For example, if a security's price increases in the latest update, the ticker tape shows that price with green text, even if the current price is below the previous day's closing price. This behavior allows users to monitor realtime directional changes in the requested securities.
NOTE: Pine scripts execute on realtime bars 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.
Ticker motion
This indicator's tape display shows a list of security information that incrementally scrolls horizontally from right to left after new chart updates, providing a dynamic visual stream of current market data. The scrolling effect works by using a counter that increments across successive intervals after realtime ticks to control the offset of each listed security. Users can set the initial scroll offset with the "Offset" input in the "Settings/Inputs" tab.
The scrolling rate of the ticker tape display depends on the realtime ticks available from the chart's data feed. Using the indicator on a chart with frequent realtime updates results in smoother scrolling. If no new realtime ticks are available in the chart's feed, the ticker tape does not move. Users can also deactivate the scrolling feature by toggling the "Running" input in the indicator's settings.
█ 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.
• This script converts a comma-separated "string" list of symbols or ticker IDs into an array . It then loops through this array, dynamically requesting data from each symbol's context and storing the results within a collection of custom `Tape` objects . Each `Tape` instance holds information about a symbol, which the script uses to populate the table that displays the ticker tape.
• This script uses the varip keyword to declare variables and `Tape` fields that update across ticks on unconfirmed bars without rolling back. This behavior allows the script to color the tape's text based on the latest price movements and change the locations of the table cells after realtime updates without reverting. See the `varip` section of the User Manual to learn more about using this keyword.
• 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.
Candlestick based on volume
This code is an indicator for drawing custom candle charts based on volume and analyzing price fluctuations and trends. A specific description is provided below:
Main functions and analysis details
Cumulative Volume Calculation
Accumulates the volume of all bars and calculates the cumulative volume. This gives an idea of the total volume of volume.
Counter Calculation
The value of the counter is determined by continuously dividing the accumulated volume by 2. This counter shows the change in volume.
Calculation of Counter Change and Duration
When the value of the counter changes, the duration of the change is calculated. This tells us how long the change in volume lasted.
Calculation of slope and angle
The slope is calculated from the amount of change in the counter and the period of time it took for the counter to change, and the angle is calculated from the slope. This allows you to visualize the trend of the volume change and the direction of the trend.
Setting Counter Color and Background Color
Set the color of the counter based on the period of change. Longer periods are displayed in red, and shorter periods in green. The background color also changes based on the angle, indicating the strength and direction of the trend.
Drawing Custom Candles
Draw custom candles based on volume changes. As the counter changes, a new candle is formed, highlighting the price movement.
Display of simple moving averages (SMA)
Calculates the average of prices over a selected period of time and displays that average. This smoothes out price trends and fluctuations and clearly shows the direction of the trend.
Comparison of the upper and lower lengths of candles
Calculates the upper and lower lengths of each candle (lower half and upper half) and changes the color of the SMA based on which is longer. This visualizes the effect of price fluctuations due to the shape of the candles.
Key Points of Use
Trend Analysis: Analyze the direction and strength of a trend using custom candles based on volume, background color, and tilt angle.
Change highlighting: Visually highlight important points with counter changes and flags.
Price Averaging: Use SMA to smooth price trends, reduce noise, and determine trend direction.
Unicorn ICT Signals [TradingFinder] Breaker Block + FVG Zones🔵 Introduction
The "ICT Unicorn Model" trading strategy in the "Inner Circle Trader" (ICT) style is one of the well-known strategies in the world of Forex and financial market trading.
The ICT methodology was developed by Michael Huddleston and is based on technical analysis and Price Action concepts.
This style focuses specifically on interpreting price movements and identifying optimal entry and exit points in the market.
In the Unicorn strategy, traders seek points where the probability of price reversal or trend continuation is high. This strategy is primarily based on recognizing and analyzing Price Action patterns and market structure.
By understanding"ICT Unicorn Model", traders can make more informed decisions about where to enter or exit trades, thereby increasing their chances of success in the market.
🟣 Understanding the Breaker Block
A Breaker Block is a specialized form of an Order Block that changes its role after a key market level is broken. Typically, an Order Block is an area on the chart where large institutional orders are likely to be placed, providing strong support or resistance.
However, when this area is breached, and the price moves in the opposite direction, it transforms into what is known as a Breaker Block. This shift indicates a reversal in market sentiment, turning the previous support into resistance or vice versa, thereby signaling a potential trend change to traders.
🟣 The Significance of the Fair Value Gap (FVG)
The Fair Value Gap (FVG) refers to an area on a price chart where the price rapidly moves through a level, leaving behind a gap. This gap represents an imbalance between supply and demand and is often seen as a potential area for price to return and fill the gap.
These zones are crucial for traders as they can indicate future price movements, providing opportunities to enter or exit trades.
🟣 Defining the ICT Unicorn Model
When an FVG overlaps with a Breaker Block, it forms a highly significant trading area known as a Unicorn. This overlap creates an ideal zone for traders to enter the market, as it combines two powerful technical signals.
The Unicorn Model is therefore considered an optimal strategy for identifying precise entry and exit points in the financial markets.
Demand ICT Unicorn Model :
Supply ICT Unicorn Model :
🔵 How to Use
🟣 Bullish ICT Unicorn
The Bullish ICT Unicorn model is applicable when the market is in an uptrend, and traders are seeking buying opportunities.
Follow these steps to identify Bullish ICT Unicorn :
Identify the Bullish Breaker Block : Locate an area where the price moved upward after breaking an Order Block. This area now acts as a Breaker Block.
Identify the Bullish FVG : Look for a Fair Value Gap near the Breaker Block.
Confirm the Unicorn : When the Bullish Breaker Block and Bullish FVG overlap, a Bullish Unicorn is confirmed. Traders can enter a buy position when the price returns to this zone.
🟣Bearish ICT Unicorn
The Bearish ICT Unicorn model is used when the market is in a downtrend, and traders are looking for selling opportunities.
To identify Bearish ICT Unicorn, follow these steps :
Identify the Bearish Breaker Block : Find an area where the price moved downward after breaking an Order Block. This area now acts as a Breaker Block.
Identify the Bearish FVG : Check if a Fair Value Gap has formed near the Breaker Block.
Confirm the Unicorn : When the Bearish Breaker Block and Bearish FVG overlap, a Bearish Unicorn is confirmed. Traders can enter a sell position when the price returns to this zone.
🔵 Setting
🟣 Global Setting
Pivot Period of Order Blocks Detector : Enter the desired pivot period to identify the Order Block.
Order Block Validity Period (Bar) : You can specify the maximum time the Order Block remains valid based on the number of candles from the origin.
Mitigation Level Breaker Block : Determining the basic level of a Breaker Block. When the price hits the basic level, the Breaker Block due to mitigation.
Mitigation Level FVG : Determining the basic level of a FVG. When the price hits the basic level, the FVG due to mitigation.
Mitigation Level Unicorn : Determining the basic level of a Unicorn Block. When the price hits the basic level, the Unicorn Block due to mitigation.
🟣 Unicorn Block Display
Show All Unicorn Block : If it is turned off, only the last Order Block will be displayed.
Demand Unicorn Block : Show or not show and specify color.
Supply Unicorn Block : Show or not show and specify color.
🟣 Breaker Block Display
Show All Breaker Block : If it is turned off, only the last Breaker Block will be displayed.
Demand Main Breaker Block : Show or not show and specify color.
Demand Sub (Propulsion & BoS Origin) Breaker Block : Show or not show and specify color.
Supply Main Breaker Block : Show or not show and specify color.
Supply Sub (Propulsion & BoS Origin) Breaker Block : Show or not show and specify color.
🟣 Fair Value Gap Display
Show Bullish FVG : Toggles the display of demand-related boxes.
Show Bearish FVG : Toggles the display of supply-related boxes.
🟣 Logic Settings
🟣 Order Block Refinement
Refine Order Blocks : Enable or disable the refinement feature. Mode selection.
🟣 FVG Filter
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 Filter: Further refines filtering by ensuring the first and third candles are not small-bodied doji candles, retaining only the highest quality signals.
🟣 Alert
Alert Name : The name of the alert you receive.
Alert ICT Unicorn Model Block Mitigation :
On / Off
Message Frequency :
This string parameter defines the announcement frequency. Choices include: "All" (activates the alert every time the function is called), "Once Per Bar" (activates the alert only on the first call within the bar), and "Once Per Bar Close" (the alert is activated only by a call at the last script execution of the real-time bar upon closing). The default setting is "Once per Bar".
Show Alert Time by Time Zone :
The date, hour, and minute you receive in alert messages can be based on any time zone you choose. For example, if you want New York time, you should enter "UTC-4". This input is set to the time zone "UTC" by default.
🔵Conclusion
The Unicorn Model in ICT, utilizing the concepts of Breaker Blocks and Fair Value Gaps, provides an effective tool for identifying entry and exit points in financial markets. By offering more precise signals, this model helps traders make better decisions and minimize trading risks.
Success in applying this model requires practice and a deep understanding of market structure, but it can significantly improve trading performance.
Trade Scoreboard [JD]A utility to manually track your trades. Also allows you to specify a RR and $ risk per trade if you trade with that kind of system. Double click to get to the settings to update as you make trades.
Can be used for back/forward testing and while live trading.
Modified and republished with permission from Knighted21
Average Down CalculatorAverage Down Calculator is an indicator for investors looking to manage their portfolio. It aids in calculating the average share price, providing insights into optimizing investment strategies. Averaging down is a strategy investors use when the price of a security they own goes down. Instead of selling at a loss, they buy more shares at the lower price to reduce the average cost per share.
There are situations where a stock's price moves contrary to your expectations. The market moves downward. Despite this, your faith in the stock persists. This indicator allowing you to strategically add more stocks to lower the average price. But You must remember, it’s not without risks, as it involves investing more money in a losing position.
This Indicator allowing you to quickly understand your new position and make informed decisions. It’s designed for easy use, regardless of your experience level with investing.
Steps to use it:
1.put buy fee from your securitas
2.next put the price of the emiten from your portofolio
3.and how many lot you have
4.next is the the taget of percentage you want it become.
5 the last you can choose, the price that you want to buy for average.
this calculator is designed to help you navigate your investment better, choose it wisely.Be aware of the risks of investing more in a declining asset and consider diversification to manage potential losses.
United Kingdom Real Private GDP per CapitaThis is the first in a set of indicators I will be publishing.
Quite simply, my aim is to demystify GDP.
Lots of what is discussed in economic circles revolves around nominal GDP and evaluations of GDP that are skewed by government spending, inflation and often, sheer population.
In the same way that a country with lots of people might have a big GDP (even if the people are very poor and unproductive!), then the same can be said of government spending. After all, a country can have a very large GDP simply by juicing the economy up with government spending.
Yet, population and government spending by themselves are not indicators of productivity, innovation, or economic wealth.
Similarly, GDP is often juiced up by inflation and of course, a country with big inflation might have big GDP, but inflation can hardly be said to make anyone or any country wealthy.
So, my indicator for REAL PRIVATE GDP PER CAPITA aims to show GDP in a more honest light by adjustiing it for inflation, government spending, and population.
I hope it proves illuminating.
Signal Tester (v1.2)This is an automation test Strategy, which helps you to get Strategy Alerts quickly on the 1m chart.
This is useful when you want to start automating Strategies but first you want to see if the connection between TradingView and your automation tool works properly.
This Strategy sends LONG Buy/Sell signals every 1 minute so you don't have to wait for a long time to see if your integration with an automation tool works.
How it works:
It works on the 1m chart
Every 1 minute it will send a BUY or a SELL signal (alternating between them forever)
Breaker Blocks + Order Blocks confirm [TradingFinder] BBOB Alert🔵 Introduction
In the realm of technical analysis, various tools and concepts are employed to identify key levels on price charts. These tools assist traders in analyzing market trends with greater precision, enabling them to optimize their trading decisions. Among these tools, the Order Block and Breaker Block hold a significant place, serving as effective instruments for analyzing market structure.
🟣 Order Block
An Order Block refers to zones on a chart where large financial institutions and high-volume traders place their orders. Due to the substantial volume of buy or sell orders in these areas, they are often regarded as pivotal points for potential price reversals or temporary pauses in a trend. Order Blocks are particularly crucial when prices react to these zones after a strong market move, acting as strong support or resistance levels.
🟣 Breaker Block
On the other hand, a Breaker Block refers to areas on a chart that previously functioned as Order Blocks but where the price has managed to break through and continue in the opposite direction. These zones are typically recognized as key points where market trends might shift, helping traders identify potential reversal points in the market.
🟣 Overlapping Block (BBOB)
Now, imagine a scenario where these two essential concepts in technical analysis—Order Blocks and Breaker Blocks—overlap on a chart. Although this overlap is not specifically discussed within the ICT (Inner Circle Trader) trading framework, exploring and utilizing this overlap can provide traders with powerful insights into strong support and resistance zones. The combination of these two robust concepts can highlight critical areas in trading, potentially offering significant advantages in making informed trading decisions.
In this article, we will delve into the concept of this overlap, explaining how to utilize it in trading strategies. Additionally, we will analyze the potential outcomes and benefits of incorporating this concept into your trading decisions.
Bullish Overlapping Block (BBOB) :
Bearish Overlapping Block (BBOB) :
🔵 How to Use
The overlap between Order Blocks and Breaker Blocks is a compelling and powerful concept that can help traders identify key levels on the chart with a high probability of success. This overlap is particularly valuable because it combines two well-regarded concepts in technical analysis—zones of high order volume and critical market shifts.
🟣 Here’s how to effectively use this overlap in your trading
1. Dentifying the Overlapping Block : To make the most of the overlap between Order Blocks and Breaker Blocks, begin by identifying these zones separately. Order Blocks are areas where price typically reacts and reverses after a strong market move.
Breaker Blocks are areas where a previous Order Block has been breached, and the price continues in the opposite direction. When these two zones overlap on a chart, it’s crucial to pay close attention to this area, as it represents a high-probability reaction zone.
2. Analyzing the Overlapping Block : After identifying the overlap zone, carefully analyze price action within this region. Candlestick patterns and price behavior can provide essential clues.
If the price reaches this overlap zone and strong reversal patterns such as Pin Bars or Engulfing patterns are observed, it’s likely that this zone will act as a pivotal reversal point. In such cases, entering a trade with confidence becomes more feasible.
3. Entering the Trade : When sufficient signs of price reaction are present in the overlap zone, you can proceed to enter the trade. If the overlap zone is within an uptrend and bullish reversal signals are evident, a long position might be appropriate.
Conversely, if the overlap zone is in a downtrend and bearish reversal signals are observed, a short position would be more suitable.
4. Risk Management : One of the most critical aspects of trading in overlap zones is managing risk. To protect your capital, place your stop loss near the lowest point of the Order Block (for buy trades) or the highest point (for sell trades). This approach minimizes potential losses if the overlap zone fails to hold.
5. Price Targets : After entering the trade, set your price targets based on other key levels on the chart. These targets could include other support and resistance zones, Fibonacci levels, or pivot points.
Bullish Overlapping Block :
Bearish Overlapping Block :
🟣 Benefits of the Overlapping Block Between Order Block and Breaker Block
1. Enhanced Precision in Identifying Key Levels : The overlap between these two zones usually acts as a highly reliable area for price reactions, increasing the accuracy of identifying entry and exit points.
2. Reduced Trading Risk : Given the high importance of the overlap zone, the likelihood of making incorrect decisions is reduced, contributing to overall lower trading risk.
3. Increased Probability of Success : The overlap between Order Blocks and Breaker Blocks combines two powerful concepts, enhancing the likelihood of success in trades, as multiple indicators confirm the importance of the area.
4. Creation of Better Trading Opportunities : Overlap zones often provide traders with more robust trading opportunities, as these areas typically represent strong reversal points in the market.
5. Compatibility with Other Technical Tools : This concept seamlessly integrates with other technical analysis tools such as Fibonacci retracements, trend lines, and chart patterns, offering a more comprehensive market analysis.
🔵 Setting
🟣 Global Setting
Pivot Period of Order Blocks Detector : Enter the desired pivot period to identify the Order Block.
Order Block Validity Period (Bar) : You can specify the maximum time the Order Block remains valid based on the number of candles from the origin.
Mitigation Level Order Block : Determining the basic level of a Order Block. When the price hits the basic level, the Order Block due to mitigation.
Mitigation Level Breaker Block : Determining the basic level of a Breaker Block. When the price hits the basic level, the Breaker Block due to mitigation.
Mitigation Level Overlapping Block : Determining the basic level of a Overlapping Block. When the price hits the basic level, the Overlapping Block due to mitigation.
🟣 Overlapping Block Display
Show All Overlapping Block : If it is turned off, only the last Order Block will be displayed.
Demand Overlapping Block : Show or not show and specify color.
Supply Overlapping Block : Show or not show and specify color.
🟣 Order Block Display
Show All Order Block : If it is turned off, only the last Order Block will be displayed.
Demand Main Order Block : Show or not show and specify color.
Demand Sub (Propulsion & BoS Origin) Order Block : Show or not show and specify color.
Supply Main Order Block : Show or not show and specify color.
Supply Sub (Propulsion & BoS Origin) Order Block : Show or not show and specify color.
🟣 Breaker Block Display
Show All Breaker Block : If it is turned off, only the last Breaker Block will be displayed.
Demand Main Breaker Block : Show or not show and specify color.
Demand Sub (Propulsion & BoS Origin) Breaker Block : Show or not show and specify color.
Supply Main Breaker Block : Show or not show and specify color.
Supply Sub (Propulsion & BoS Origin) Breaker Block : Show or not show and specify color.
🟣 Order Block Refinement
Refine Order Blocks : Enable or disable the refinement feature. Mode selection.
🟣 Alert
Alert Name : The name of the alert you receive.
Alert Overlapping Block Mitigation :
On / Off
Message Frequency :
This string parameter defines the announcement frequency. Choices include: "All" (activates the alert every time the function is called), "Once Per Bar" (activates the alert only on the first call within the bar), and "Once Per Bar Close" (the alert is activated only by a call at the last script execution of the real-time bar upon closing). The default setting is "Once per Bar".
Show Alert Time by Time Zone :
The date, hour, and minute you receive in alert messages can be based on any time zone you choose. For example, if you want New York time, you should enter "UTC-4". This input is set to the time zone "UTC" by default.
🔵 Conclusion
The overlap between Order Blocks and Breaker Blocks represents a critical and powerful area in technical analysis that can serve as an effective tool for determining entry and exit points in trading.
These zones, due to the combination of two key concepts in technical analysis, hold significant importance and can help traders make more confident trading decisions.
Although this concept is not specifically discussed in the ICT framework and is introduced as a new idea, traders can achieve better results in their trades through practice and testing.
Utilizing the overlap between Order Blocks and Breaker Blocks, in conjunction with other technical analysis tools, can significantly improve the chances of success in trading.
Volume DiffusionIndicator Overview
This indicator calculates potential volume (volume) based on the highest and lowest prices within a specified time period and displays it on the chart. This allows you to visually analyze the relationship between price fluctuations and volume.
How to use
Enter set values:.
setlength: Specify the period of time. The default value is 20. The calculation is based on the highest and lowest prices within this period.
sample_interval: Specifies the sampling interval. The default value is 1, sampling is done every bar. This is used to adjust the amount of data.
Display on chart:.
Blue line: highprice_ (highest price during the period).
Red line: Displays the lowprice_ (lowest price in the period).
Green line: Displays the potential volume (Potential_volume). It is the total volume at which the price changed.
Orange/purple step line: Displays volume_cal (calculated volume). This is the calculated volume change based on historical volume.
Interpretation:.
Change in highs and lows: As highs and lows change, the potential volume is updated accordingly. This allows us to track volume changes at key price levels.
volume_cal changes: Track volume changes and analyze how volume changes when prices reach highs and lows.
Reasons why smaller time frames work better
Data Density:.
Smaller timeframes (e.g., 1-minute and 5-minute timeframes) provide more bars, so price fluctuations and volume changes can be observed in detail. This allows the indicator to update more frequently and accurately reflect the relationship between price and volume.
Quick Reaction:.
With shorter time frames, price fluctuations and volume changes are captured more quickly, making the indicator calculations more sensitive. This allows for immediate analysis of short-term volume changes.
High-precision calculations:.
With longer time frames, there is less data to calculate and volume changes may not be fully reflected. With shorter time frames, the relationship between price changes and volume can be more precisely determined.
Cautions
Data volume limitations: Pine Script™ has limitations on the amount of data that can be used. If you are working with data over a long period of time, errors may occur when attempting to process large amounts of data. It is important to set the sampling interval (sample_interval) appropriately to control the amount of data.
Calculation performance: Even when using small time periods, performance can be affected by the complexity of the calculation. Pay attention to the sampling interval and the efficiency of the calculation.
The indicator can be used to better understand the relationship between price fluctuations and volume to help analyze and improve trading strategies. In particular, it allows for more accurate analysis on shorter time frames.
Money Flow DivergenceThe Money Flow Divergence indicator is designed to help traders identify periods when there is a significant divergence between the growth of the U.S. M2 money supply and the S&P 500 index (SPX).
This divergence can provide insights into potential market turning points, making it a valuable tool for long-term investors and traders looking to capitalize on macroeconomic trends.
How It Works:
Data Sources:
S&P 500 Index (SPX) and U.S. M2 Money Supply.
Calculating Growth Rates:
SPX Growth: The script calculates the percentage growth of the S&P 500 index by comparing the current closing price with the previous period's closing price.
M2 Growth: Similarly, it calculates the percentage growth of the U.S. M2 money supply by comparing the current value with the previous period's value.
Growth Gap/Delta:
Growth Gap: The core of the indicator is the "growth gap" or "delta," which is the difference between the M2 money supply growth and the SPX growth. This gap indicates whether liquidity in the economy (represented by M2) is outpacing or lagging behind the performance of the stock market.
Interpretation:
Positive Gap (Green Bars): When the M2 growth outpaces SPX growth, the gap is positive, indicating that there is more liquidity in the system than what is being reflected in the stock market. This scenario often signals potential upward momentum in the market, making it a good time to consider buying.
Negative Gap (Red Bars): When the SPX growth outpaces M2 growth, the gap is negative, suggesting that the market may be overextended relative to the available liquidity. This can be a warning sign of potential market corrections or downturns.
Visualization:
The indicator plots the growth gap as a histogram with bars colored based on the gap value:
Green Bars: Indicate a positive gap where M2 growth is higher than SPX growth.
Red Bars: Indicate a negative gap where SPX growth is higher than M2 growth.
The bars are thickened for better visibility, and a horizontal line at zero is plotted to help users easily distinguish between positive and negative gaps.
How To Use It:
Time Frame Selection: Users can select the desired time frame (e.g., monthly, weekly) for the data. This flexibility allows traders to analyze the indicator over different periods, depending on their investment horizon.
Monthly time frames seem to work best.
Interpreting the Indicator:
Bullish Signals: Look for sustained periods of positive growth gaps (green bars), which may indicate a favorable environment for buying or holding long positions.
Bearish Signals: Be cautious during periods of negative growth gaps (red bars), which could signal overvaluation in the market or potential pullbacks.
Enjoy and let me know if you have any questions.
Dual Timeframe Williams Percent RangeThis is a dual timeframe Williams Percent Range indicator.
Function:
The idea behind this indicator is for trader to see what the Williams %r is doing on higher timeframes without the need to change the chart. I added the "Smoothing" function to take the jagged lines out of the higher timeframe. It has a better flow this way.
If we choose the 4H and the Daily timeframes for example. In this bullish situation I wait for the Daily WPR to cross above the -50 mid line. Then the faster 4H WPR will eventually hit the bottom and begin to rise again back into the trend.
This is the "Reset" of the 4H WPR and when the 4H WPR crosses up above the -50 mid line again it means price should begin to rise on the chart. I added the option to change the colour when the signal lines cross the -50. It is good to use a fast time frame so you can see the WPR hitting the bottom in an uptrend, but not too fast.
The Heiken Ashi candle sticks are a very good addition to this system. You can also use a colour changing 200 EMA if you run the "1H/Daily" in the WPR. Or the 50 EMA if you run the Daily 4H.
This system could be used on lower timeframes too but I have not tested it there.
The Dual WPR indicator, the colour changing 50 EMA and Heiken Ashi have been optimised for the 4H/Daily.
If you want to set alerts the the faster WPR line crossing the -50 is good, on candle close.
This way you will only need one alert per chart.
If you get an alert on the EURUSD 4H that the 4H WPR has crossed up then look to see what what the Daily WPR is doing. If it is also above the -50 mid line then EURUSD is probably trending up.
Thank you to TradingView for supplying the Williams %r template.
I hope this helps some other traders out there.
I combined the Supertrend and the Coloured EMA in the main screen into one indicator.
This is my first indicator published :-)
Have fun out there and good luck.
Eddie T.
Qty CalculatorThis Pine Script indicator, titled "Qty Calculator," is a customizable tool designed to assist traders in managing their trades by calculating key metrics related to risk management. It takes into account your total capital, entry price, stop-loss level, and desired risk percentage to provide a comprehensive overview of potential trade outcomes.
Key Features:
User Inputs:
Total Capital: The total amount of money available for trading.
Entry Price: The price at which the trader enters the trade.
Stop Loss: The price level at which the trade will automatically close to prevent further losses.
Risk Percentage: The percentage of the total capital that the trader is willing to risk on a single trade.
Customizable Table:
Position: The indicator allows you to choose the position of the table on the chart, with options including top-left, top-center, top-right, bottom-left, bottom-center, and bottom-right.
Size: You can adjust the number of rows and columns in the table to fit your needs.
Risk Management Calculations:
Difference Calculation: The difference between the entry price and the stop-loss level.
Risk Per Trade: Calculated as a percentage of your total capital.
Risk Levels: The indicator evaluates multiple risk levels (0.10%, 0.25%, 0.50%, 1.00%) and calculates the quantity, capital per trade, percentage of total capital, and the risk amount associated with each level.
R-Multiples Calculation:
The indicator calculates potential profit levels at 2x, 3x, 4x, and 5x the risk (R-Multiples), showing the potential gains if the trade moves in your favor by these multiples.
Table Display:
The table includes the following columns:
CapRisk%: Displays the risk percentage.
Qty: The quantity of the asset you should trade.
Cap/Trade: The capital allocated per trade.
%OfCapital: The percentage of total capital used in the trade.
Risk Amount: The monetary risk taken on each trade.
R Gains: Displays potential gains at different R-Multiples.
This indicator is particularly useful for traders who prioritize risk management and want to ensure that their trades are aligned with their capital and risk tolerance. By providing a clear and customizable table of critical metrics, it helps traders make informed decisions and better manage their trading strategies.
Shark Harmonic Pattern [TradingFinder] Shark Detector Indicator🔵 Introduction
The Shark harmonic pattern, first introduced by Scott Carney in 2011, is a recognized tool in technical analysis. Since its inception, it has been widely adopted by traders as an essential market analysis tool.
Due to its complexity, the Shark pattern can be challenging for novice traders. Therefore, we have developed the Harmonic Pattern Indicator to help analysts and traders easily identify these patterns.
🟣 Understanding the Types of Shark Pattern
In technical analysis, the Shark harmonic pattern forms at the end of trends and is categorized into two types: Bullish and Bearish Shark Patterns.
Bullish Shark Pattern : This pattern appears at the end of a downtrend, indicating a potential reversal to an uptrend. Traders can use this pattern to identify buy entry points. The image below illustrates the core components of the Bullish Shark Pattern.
Bearish Shark Pattern : Conversely, the Bearish Shark Pattern forms at the end of an uptrend, signaling a possible reversal to a downtrend. This pattern prompts traders to shift their positions from buying to selling. The image below showcases the characteristics of the Bearish Shark Pattern.
🔵 How to Use
🟣 Trading with the Bullish Shark Pattern
The Bullish Shark Pattern acts as a reversal pattern, helping traders identify the end of a downtrend and the beginning of an uptrend. It consists of five key points that indicate alternating bullish and bearish movements.
Upon the complete formation of this pattern, traders can look for opportunities to enter buy trades. To manage risk effectively, it is advisable to set a stop-loss below the lowest price point within the pattern.
🟣 Trading with the Bearish Shark Pattern
Similarly, the Bearish Shark Pattern functions as a reversal pattern but in the opposite direction. It helps traders identify the end of an uptrend and the onset of a downtrend.
After the pattern fully forms, traders can seek sell entry opportunities. As with the bullish pattern, placing a stop-loss above the highest price point within the pattern is recommended for risk management.
🔵 Setting
🟣 Logical Setting
ZigZag Pivot Period : You can adjust the period so that the harmonic patterns are adjusted according to the pivot period you want. This factor is the most important parameter in pattern recognition.
Show Valid Format : If this parameter is on "On" mode, only patterns will be displayed that they have exact format and no noise can be seen in them. If "Off" is, the patterns displayed that maybe are noisy and do not exactly correspond to the original pattern.
Show Formation Last Pivot Confirm : if Turned on, you can see this ability of patterns when their last pivot is formed. If this feature is off, it will see the patterns as soon as they are formed. The advantage of this option being clear is less formation of fielded patterns, and it is accompanied by the latest pattern seeing and a sharp reduction in reward to risk.
Period of Formation Last Pivot : Using this parameter you can determine that the last pivot is based on Pivot period.
🟣 Genaral Setting
Show : Enter "On" to display the template and "Off" to not display the template.
Color : Enter the desired color to draw the pattern in this parameter.
LineWidth : You can enter the number 1 or numbers higher than one to adjust the thickness of the drawing lines. This number must be an integer and increases with increasing thickness.
LabelSize : You can adjust the size of the labels by using the "size.auto", "size.tiny", "size.smal", "size.normal", "size.large" or "size.huge" entries.
🟣 Alert Setting
Alert : On / Off
Message Frequency : This string parameter defines the announcement frequency. Choices include: "All" (activates the alert every time the function is called), "Once Per Bar" (activates the alert only on the first call within the bar), and "Once Per Bar Close" (the alert is activated only by a call at the last script execution of the real-time bar upon closing). The default setting is "Once per Bar".
Show Alert Time by Time Zone : The date, hour, and minute you receive in alert messages can be based on any time zone you choose. For example, if you want New York time, you should enter "UTC-4". This input is set to the time zone "UTC" by default.
🔵 Conclusion
The Shark harmonic pattern is a potent analytical tool in technical analysis that aids traders in identifying critical reversal points in financial markets. Whether in a bullish or bearish context, this pattern provides clear trend change signals, allowing traders to enter trades with greater precision and optimize their strategies.
However, as with all analytical methods, it is essential to supplement the Shark pattern with additional analyses and strict risk management to avoid potential losses. Incorporating this pattern into a comprehensive trading strategy can lead to better trade outcomes and more opportunities for success
Fibonacci Retracements & Trend Following Strategy V2This Pine Script strategy generates trading signals using Fibonacci levels and trend-following indicators.
1. Strategy Summary
This strategy analyzes price movements using a combination of Fibonacci levels and trend-following indicators, providing potential trading signals. The strategy includes Fibonacci levels as well as EMA (Exponential Moving Average) and ADX (Average Directional Index) indicators.
2. Indicators and Parameters
Fibonacci Levels
Fibonacci Level 1, Level 2, Level 3, Level 4: Used as Fibonacci retracement levels. These levels are typically set at 0.236, 0.382, 0.618, and 0.786. Users can adjust these values according to their preferences.
Trend-Following Indicator
Trend Length: The period for calculating the EMA used as the trend-following indicator. For example, if set to 20, the EMA will be calculated over 20 periods.
ADX (Average Directional Index)
ADX Length: The period for calculating the ADX. ADX measures the strength of the price trend and is usually set to 14 periods.
ADX Threshold: A threshold value for the ADX. This value determines when trading signals will be activated.
3. Usage Steps
Displaying the Indicator on the Chart:
On the TradingView platform, paste the code into the Pine Editor and click the "Add to Chart" button to add it to the chart.
Analyzing the Indicators:
Fibonacci Levels: Show retracement levels of price movements. When the price reaches one of these levels, potential reversals may occur.
Trend-Following Indicator: EMAs determine the direction of the trend. Green EMA represents an uptrend, while red EMA represents a downtrend.
ADX: Measures the strength of the trend. When ADX surpasses the threshold value, it indicates a strong trend.
Trading Signals:
Long Signal: Generated when the price is above the second Fibonacci level and the trend is upward. Additionally, the ADX value must be above the set threshold.
Short Signal: Generated when the price is below the second Fibonacci level and the trend is downward. Additionally, the ADX value must be above the set threshold.
Target Prices:
Long Targets: Determines upward targets based on Fibonacci levels. These targets indicate expected prices if the price reverses from Fibonacci levels.
Short Targets: Determines downward targets based on Fibonacci levels. These targets indicate expected prices if the price reverses from Fibonacci levels.
4. Chart Displays
Trend Up (Green Line): Shows the rising EMA.
Trend Down (Red Line): Shows the falling EMA.
Fibonacci Levels (Blue Lines): Shows Fibonacci retracement levels.
Long Targets (Green Circles): Shows targets for long positions.
Short Targets (Red Circles): Shows targets for short positions.
Long Signal (Green Label): Buy signal.
Short Signal (Red Label): Sell signal.
5. Important Notes
Retracement and Target Levels: Fibonacci levels can act as potential retracement or support/resistance levels. However, they should always be used in conjunction with other technical analysis tools.
Trend and ADX: ADX is used to determine the strength of the trend. Be aware that when ADX is low, trends may be weak.
6. Example Scenarios
Example 1: If the trend is upward (green EMA) and the price is above the second Fibonacci level, you may receive a long position signal. If the ADX value is above the threshold, the signal may be stronger.
Example 2: If the trend is downward (red EMA) and the price is below the second Fibonacci level, you may receive a short position signal. If the ADX value is above the threshold, the signal may be stronger.
This updated version contains significant improvements in both technical aspects and user experience. Innovations such as ADX calculations and dynamic Fibonacci levels make the strategy more robust and flexible. The code's readability and comprehensibility have been enhanced, and errors have been corrected.
This guide will help you understand the basic operation of the strategy. It is always recommended to conduct your own research and test the strategy before using it.
GOOD LUCK. // halilvarol
10-Year CAGR Calculator: Uncover Long-Term Growth TrendsThis script calculates the Compound Annual Growth Rate (CAGR) over a 10-year period or the maximum available historical data for any asset. The calculated growth rate is displayed as a label on the last bar of the chart.
Ideal for investors and analysts, this tool helps you easily visualize and assess the long-term growth potential of your investments, providing valuable insights into the historical performance of any asset over an extended period.
False Breakouts [TradingFinder] Fake Breakouts Failure🔵 Introduction
Technical indicators are essential tools for analysts and traders in financial markets, helping them predict price movements and make better trading decisions. One of the key concepts in technical analysis that should be carefully considered is the "False Breakout."
This phenomenon occurs when a price temporarily breaks through a significant support or resistance level but fails to hold and quickly returns to its previous range. Understanding this concept and applying it in trading can reduce risks and increase profitability.
🟣 What is a False Breakout?
A Fake Breakout, as the name suggests, refers to a breakout that appears to occur but fails to sustain, leading the price to quickly revert back to its previous range. This situation often happens when inexperienced or non-professional traders, under psychological pressure and eager to enter the market quickly, initiate trades.
This creates opportunities for professional traders to take advantage of these short-term fluctuations and execute successful trades.
🟣 The Importance of Recognizing False Breakouts
Recognizing False Breakouts is crucial for any trader aiming for success in financial markets. False Breakouts typically occur when the market approaches a critical support or resistance level.
In these situations, many traders are waiting to see if the price will break through this level. However, when the price quickly returns to its previous range, it indicates weakness in the movement and the inability to sustain the breakout.
🟣 How to identify False Breakouts?
To identify Fake Breakouts, it is important to carefully analyze price charts and look for signs of a quick price reversal after breaking a key level.
Here are some chart patterns that may help you identify a False Breakout :
1. Pin Bar Pattern : The Pin Bar is a candlestick pattern that indicates a price reversal. This pattern usually appears near support and resistance levels, showing that the price attempted to break through a key level but failed and reversed.
2. Fakey Pattern : This pattern, which consists of several candlesticks, indicates a False Breakout and a quick price return to the previous range. It usually appears near key levels and can signal a trend reversal.
3. Using Multiple Timeframes : One way to identify False Breakouts is by using charts of different timeframes. Sometimes, a breakout on a one-hour chart may be a False Breakout on a daily chart. Analyzing charts across multiple timeframes can help you accurately identify this phenomenon.
🔵 How to Use
Once you identify a False Breakout, you can use it as a trading signal. For this, it is best to look for trading opportunities in the opposite direction of the False Breakout. In other words, if a False Breakout occurs at a resistance level, you might consider selling opportunities, and if it happens at a support level, you might look for buying opportunities.
Here are some key points for trading based on False Breakouts :
1. Patience and Discipline : Patience and discipline are crucial when trading with False Breakouts. Wait for the False Breakout to clearly form before entering a trade.
2. Use Stop Loss : Setting an appropriate stop loss is vital when trading based on False Breakouts. Typically, the stop loss can be placed near the level where the False Breakout occurred.
3. Seek Confirmations : Before entering a trade, look for additional confirmations. These can include other analyses or technical indicators that show the price is likely to return to its previous level.
🔵 Settings
🟣 Logical settings
Swing period : You can set the swing detection period.
Max Swing Back Method : It is in two modes "All" and "Custom". If it is in "All" mode, it will check all swings, and if it is in "Custom" mode, it will check the swings to the extent you determine.
Max Swing Bac k: You can set the number of swings that will go back for checking.
🟣 Display settings
Displaying or not displaying swings and setting the color of labels and lines.
🟣 Alert Settings
Alert False Breakout : Enables alerts for Breakout.
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'.
🔵Conclusion
False Breakouts, as a key concept in technical analysis, are powerful tools for identifying sudden price changes and using them in trading. Understanding this phenomenon and applying it can help traders perform better in financial markets and avoid potential losses.
To benefit from False Breakouts, traders need to carefully analyze charts and use the appropriate analytical tools. By leveraging this strategy, traders can achieve lower-risk and higher-reward trades.
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.
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.
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.