slope-velocityDescription
This Pine Script indicator, named "slope-velocity," calculates and visualizes the slope of a moving average (MA) in degrees, allowing users to observe the rate of change of the MA over time. Here's a breakdown of its components and functionality:
Inputs:
option: A dropdown menu allowing the user to select the type of moving average (SMA, EMA, DEMA).
length: An integer input for specifying the period length of the moving average.
source: The data source for the moving average calculation, defaulting to the close price.
Variable Initialization:
ma: A variable to store the moving average value, initialized as na.
Moving Average Calculation:
Depending on the selected option, the script calculates the appropriate moving average:
ta.sma(source, length) for Simple Moving Average (SMA).
ta.ema(source, length) for Exponential Moving Average (EMA).
ta.dema(source, length) for Double Exponential Moving Average (DEMA).
Slope Calculation:
slope_ma: The script calculates the slope of the moving average by subtracting the previous period's MA value from the current period's MA value (ma - ma ).
Slope Conversion to Degrees:
slope_degrees_ma: The slope is converted to degrees using the math.atan function to compute the arctangent of the slope, followed by math.todegrees to convert the result from radians to degrees. The result is rounded to the nearest integer using math.round.
Plotting Reference Lines:
Horizontal lines are plotted at specific degree values (0, 10, 20, -10, -20) to provide reference points for the slope's visualization.
Plotting the Slope:
The slope in degrees is plotted as a histogram. The color of the histogram bars is determined by the sign of the slope: green for positive slopes and red for negative slopes.
Additional Comments
The script includes some commented-out sections related to plotting acceleration and displaying labels for slope differences, which are not active in the current implementation.
The script is designed to provide a visual representation of the moving average's rate of change, making it easier to identify periods of rapid price movement and potential trend reversals.
图表形态
FVG & IFVG ICT [TradingFinder] Inversion Fair Value Gap Signal🔵 Introduction
🟣 Fair Value Gap (FVG)
To spot a Fair Value Gap (FVG) on a chart, you need to perform a detailed candle-by-candle analysis.
Here’s the process :
Focus on Candles with Large Bodies : Identify a candle with a substantial body and examine it alongside the preceding candle.
Check Surrounding Candles : The candles immediately before and after the central candle should have long shadows.
Ensure No Overlap : The bodies of the candles before and after the central candle should not overlap with the body of the central candle.
Determine the FVG Range : The gap between the shadows of the first and third candles forms the FVG range.
🟣 ICT Inversion Fair Value Gap (IFVG)
An ICT Inversion Fair Value Gap, also known as a reverse FVG, is a failed fair value gap where the price does not respect the gap. An IFVG forms when a fair value gap fails to hold the price and the price moves beyond it, breaking the fair value gap.
This marks the initial shift in price momentum. Typically, when the price moves in one direction, it respects the fair value gaps and continues its trend.
However, if a fair value gap is violated, it acts as an inversion fair value gap, indicating the first change in price momentum, potentially leading to a short-term reversal or a subsequent change in direction.
🟣 Bullish Inversion Fair Value Gap (Bullish IFVG)
🟣 Bearish Inversion Fair Value Gap (Bearish IFVG)
🔵 How to Use
🟣 Identify an Inversion Fair Value Gap
To identify an IFVG, you first need to recognize a fair value gap. Just as fair value gaps come in two types, inversion fair value gaps also fall into two categories:
🟣 Bullish Inversion Fair Value Gap
A bullish IFVG is essentially a bearish fair value gap that is invalidated by the price closing above it.
Here’s how to identify it :
Identify a bearish fair value gap.
When the price closes above this bearish fair value gap, it transforms into a bullish inversion fair value gap.
This gap acts as support for the price and drives it upwards, indicating a reduction in sellers' strength and an initial shift in momentum towards buyers.
🟣 Bearish Inversion Fair Value Gap
A bearish IFVG is primarily a bullish fair value gap that fails to hold the price, with the price closing below it.
Here’s how to identify it :
Identify a bullish fair value gap.
When the price closes below this gap, it becomes a bearish inversion fair value gap.
This gap acts as resistance for the price, pushing it downwards. A bearish inversion fair value gap signifies a decrease in buyers' momentum and an increase in sellers' strength.
🔵 Setting
🟣 Global Setting
Show All FVG : If it is turned off, only the last FVG will be displayed.
S how All Inversion FVG : If it is turned off, only the last FVG will be displayed.
FVG and IFVG Validity Period (Bar) : You can specify the maximum time the FVG and the IFVG remains valid based on the number of candles from the origin.
Switching Colors Theme Mode : Three modes "Off", "Light" and "Dark" are included in this parameter. "Light" mode is for color adjustment for use in "Light Mode".
"Dark" mode is for color adjustment for use in "Dark Mode" and "Off" mode turns off the color adjustment function and the input color to the function is the same as the output color.
🟣 Logic Setting
FVG Filter
When utilizing FVG filtering, the number of identified FVG areas undergoes refinement based on a specified algorithm. This process helps to focus on higher quality signals and eliminate noise.
Here are the types of FVG filters available :
Very Aggressive Filter : Introduces an additional condition to the initial criteria. For an upward FVG, the highest price of the last candle must exceed the highest price of the middle candle. Similarly, for a downward FVG, the lowest price of the last candle should be lower than the lowest price of the middle candle. This mode minimally filters out FVGs.
Aggressive Filter : Builds upon the Very Aggressive mode by considering the size of the middle candle. It ensures the middle candle is not too small, thereby eliminating more FVGs compared to the Very Aggressive mode.
Defensive Filter : In addition to the conditions of the Very Aggressive mode, the Defensive mode incorporates criteria regarding the size and structure of the middle candle. It requires the middle candle to have a substantial body, with specific polarity conditions for the second and third candles relative to the first candle's direction. This mode filters out a significant number of FVGs, focusing on higher-quality signals.
Very Defensive Filter : Further refines filtering by adding conditions that the first and third candles should not be small-bodied doji candles. This stringent mode eliminates the majority of FVGs, retaining only the highest quality signals.
Mitigation Level FVG and IFVG : Its inputs are one of "Proximal", "Distal" or "50 % OB" modes, which you can enter according to your needs. The "50 % OB" line is the middle line between distal and proximal.
🟣 Display Setting
Show Bullish FVG : Enables the display of demand-related boxes, which can be toggled on or off.
Show Bearish FVG : Enables the display of supply-related boxes along the path, which can also be toggled on or off.
Show Bullish IFVG : Enables the display of demand-related boxes, which can be toggled on or off.
Show Bearish IFVG : Enables the display of supply-related boxes along the path, which can also be toggled on or off.
🟣 Alert Setting
Alert FVG Mitigation : If you want to receive the alert about FVG's mitigation after setting the alerts, leave this tick on. Otherwise, turn it off.
Alert Inversion FVG Mitigation : If you want to receive the alert about Inversion FVG's mitigation after setting the alerts, leave this tick on. Otherwise, turn it off.
Message Frequency : This parameter, represented as a string, determines the frequency of announcements. Options include: 'All' (triggers the alert every time the function is called), 'Once Per Bar' (triggers the alert only on the first call within the bar), and 'Once Per Bar Close' (activates the alert only during the final script execution of the real-time bar upon closure). The default setting is 'Once per Bar'.
Show Alert time by Time Zone : The date, hour, and minute displayed in alert messages can be configured to reflect any chosen time zone. For instance, if you prefer London time, you should input 'UTC+1'. By default, this input is configured to the 'UTC' time zone.
Display More Info : The 'Display More Info' option provides details regarding the price range of the order blocks (Zone Price), along with the date, hour, and minute. If you prefer not to include this information in the alert message, you should set it to 'Off'.
Candlestick Structure [LuxAlgo]The Candlestick Structure indicator detects major market trends and displays various candlestick patterns aligning with the detected trend, filtering out potentially unwanted patterns as a result. Multiple trend detection methods are included and can be selected by the users.
A dashboard showing the alignment percentage of each individual pattern is also provided.
🔶 USAGE
By distinguishing major and minor trend detection, we can still detect patterns based on minor trends, yet filter out the patterns that do not align with the major trend.
By detecting candlestick patterns that align with a major trend, we can effectively detect the ending points of retracements, potentially providing various entry points of interest within a trend.
Users are able to track the alignment of each candlestick pattern in the dashboard to reveal which patterns typically align with the trend and which may not.
Note: Alignment % only checks if the pattern's direction is the same as the current trend direction. These are only raw readings and not any type of confidence score.
🔶 DETAILS
In this indicator, we are identifying and tracking 16 different Candlestick Patterns.
🔹 Bullish Patterns
Hammer: Identified by a small upper wick (or no upper wick) with a small body, and an elongated lower wick whose length is 2X greater than the candle body’s width.
Inverted Hammer: Identified by a small lower wick (or no lower wick) with a small body, and an elongated upper wick whose length is 2X greater than the candle body’s width.
Bullish Engulfing: A 2 bar pattern identified by a large bullish candle body fully encapsulating (opening lower and closing higher) the previous small (bearish) candle body.
Rising 3: A 5 bar pattern identified by an initial full-bodied bullish candle, followed by 3 bearish candles that trade within the high and low of the initial candle, followed by another full-bodied bullish candle closing above the high of the initial candle.
3 White Soldiers: Identified by 3 full-bodied bullish candles, each opening within the body and closing below the high, of the previous candle.
Morning Star: A 3 bar pattern identified by a full-bodied bearish candle, followed by a small-bodied bearish candle, followed by a full-bodied bullish candle that closes above the halfway point of the first candle.
Bullish Harami: A 2 bar pattern, identified by an initial bearish candle, followed by a small bullish candle whose range is entirely contained within the body of the initial candle.
Tweezer Bottom: A 2 bar pattern identified by an initial bearish candle, followed by a bullish candle, both having equal lows.
🔹 Bearish Patterns
Hanging Man: Identified by a small upper wick (or no upper wick) with a small body, and an elongated lower wick whose length is 2X greater than the candle body’s width.
Shooting Star: Identified by a small lower wick (or no lower wick) with a small body, and an elongated upper wick whose length is 2X greater than the candle body’s width.
Bearish Engulfing: A 2 bar pattern identified by a large bearish candle body fully encapsulating (opening higher and closing lower) the previous small (bullish) candle body.
Falling 3: A 5 bar pattern identified by an initial full-bodied bearish candle, followed by 3 bullish candles that trade within the high and low of the initial candle, followed by another full-bodied bearish candle closing below the low of the initial candle.
3 Black Crows: Identified by 3 full-bodied bearish candles, each open within the body and closing below the low, of the previous candle.
Evening Star: A 3 bar pattern identified by a full-bodied bullish candle, followed by a small-bodied bullish candle, followed by a full-bodied bearish candle that closes below the halfway point of the first candle.
Bearish Harami: A 2 bar pattern, identified by an initial bullish candle, followed by a small bearish candle whose range is entirely contained within the body of the initial candle.
Tweezer Top: A 2 bar pattern identified by an initial bullish candle, followed by a bearish candle, both having equal highs.
🔹 Trend Types
Major trend is displayed at all times, the display will change depending on the trend method selected.
The minor trend can also be visualized; to avoid confusion, the minor trend can optionally be displayed through the candle colors.
Supertrend: Displays Upper and Lower SuperTrend, When we break above the upper, it is considered an Uptrend. When we break below the lower, it is considered a Downtrend.
EMAs: Displays Fast and Slow EMAs, When Fast>Slow, it is considered an Uptrend. When Fast<Slow, it is considered a Downtrend.
ChoCh: Displays ChoCh Lines and Labels, When a Bullish ChoCh occurs, it is now considered as an Uptrend. When a Bearish ChoCh occurs, it is now considered a Downtrend.
Donchian Channel: Displays the Highest and Lowest Values, When we break above the Highest, it is considered an Uptrend. When we break below the Lowest, it is considered a Downtrend.
Below is an example of the Change of Character (ChoCh) method of trend detection.
Note: In this description, each screenshot has a different trend method in use, scroll through if you are looking for a specific one.
🔶 SETTINGS
Candlestick Patterns: Choose which candlestick patterns to include in calculations.
Minor Trend Length: Determines the Donchian Channel length to use for minor trend identification.
Major Trend Method: Determines which trend method to use for identifying Major Trend.
Major Trend Parameters: Various inputs for controlling Major trends, depending on the specific method you have selected.
Color Candles: Colors the chart candles based on minor trend.
Dashboard: Control display size and location of Alignment Dashboard.
Correlation Analysis Tool📈 What Does It Do?
Correlation Calculation: Measures the correlation between a selected asset (Asset 1) and up to four additional assets (Asset 2, Asset 3, Asset 4, Asset 5).
User Inputs: Allows you to define the primary asset and up to four comparison assets, as well as the period for correlation calculations.
Correlation Matrix: Displays a matrix of correlation coefficients as a text label on the chart.
🔍 How It Works
Inputs: Enter the symbols for Asset 1 (main asset) and up to four other assets for comparison.
Correlation Period: Specify the period over which the correlations are calculated.
Calculations: Computes log returns for each asset and calculates the correlation coefficients.
Display: Shows a textual correlation matrix at the top of the chart with percentage values.
⚙️ Features
Customizable Assets: Input symbols for one primary asset and up to four other assets.
Flexible Period: Choose the period for correlation calculation.
Correlation Coefficients: Outputs correlation values for all asset pairs.
Textual Correlation Matrix: Provides a correlation matrix with percentage values for quick reference.
🧩 How to Use
Add the Script: Apply the script to any asset’s chart.
Set Asset Symbols: Enter the symbols for Asset 1 and up to four other assets.
Adjust Correlation Period: Define the period for which correlations are calculated.
Review Results: Check the correlation matrix displayed on the chart for insights.
🚨 Limitations
Historical Data Dependency: Correlations are based on historical data and might not reflect future market conditions.
No Visual Plots Yet: This script does not include visual plots; it only provides a textual correlation matrix.
💡 Best Ways To Use
Sector Comparison: Compare assets within the same sector or industry for trend analysis.
Diversification Analysis: Use the correlations to understand how different assets might diversify or overlap in your portfolio.
Strategic Decision Making: Utilize correlation data for making informed investment decisions and portfolio adjustments.
📜 Disclaimer
This script is for educational and informational purposes only. Please conduct your own research and consult with a financial advisor before making investment decisions. The author is not responsible for any losses or damages resulting from the use of this script.
ICT Premium/DiscountThis script indicator prints lines for the highest, lowest and middle price in a selected time period (in days).
With that you can easily see wheter the price is currently high, low or balanced compared to the prices in the selected time period.
I also added a gray dotted vertical line to the chart which represents the beginning of your selected time period
You can choose the time period on your own and you can also customize the color and style of the lines.
Your lines may get printed in a separate window. To fix this, click on the indicator and select
Move to -> existing pane above
Your lines also may stay stuck on the same place on the chart and are not fixed to a high/low. To fix this, right-click on the left price scale and select
Merge all scales into one -> on the right
Gold & EUR/USD LTF liquidity Sweep + Market structure shift on a lower time frame for sniper entries
Engulfing Pattern @Ray_SP500NISAEngulfing Patterns
Bullish and bearish hugging candlesticks are powerful reversal formations that generate signals of potential reversals. These patterns are popular candlestick patterns because they are easy to spot and trade.
When the second candlestick completely wraps around the previous candlestick, it is a signal for a market reversal. A positive line encircled by a negative line may indicate a decline, while a negative line encircled by a positive line may indicate an upturn.
The system is simple enough to display these signs in red for a negative line and in green for a positive line. We hope this helps you in your investment life.
Translated with DeepL.com (free version)
Propulsion Blocks | Flux Charts💎 GENERAL OVERVIEW
Introducing our new Propulsion Blocks indicator! This new indicator can find & render ICT's propulsion blocks in the current ticker. It's highly customizable with detection, invalidation and style settings. For more information, please visit the "HOW DOES IT WORK ?" section.
Features of the new Propulsion Blocks indicator :
Render Bullish & Bearish Propulsion Blocks
Customizable Algorithm
Enable / Disable Historic Zones
Visual Customizability
📌 HOW DOES IT WORK ?
Order blocks occur when there is a high amount of market orders exist on a price range. It is possible to find order blocks using specific formations on the chart. One of which this indicator uses requires a large engulfing candlestick right after another one of the opposite direction. Then if the price comes back to retest the area that two candlesticks create, then it's an order block pattern.
Propulsion blocks are a specific type of order block used in the trading methodology. They build on the concept of order blocks and aim to identify potential areas for strong price movements. They are detected when a candlestick wicks to any existing order block, retesting it. Then a strong momentum in the direction of the order block is needed for the propulsion block to get created. Check this example :
You can use them as entry / exit points, or for confirmations for your trades. For example, a successful retest attempt to a bullish propulsion block might hint a strong bullish momentum. This indicator works best when used together with other ICT concepts.
🚩UNIQUENESS
Propulsion blocks can help traders identify key levels in a chart, and can be used mainly for confirmation. This indicator can identify and show them automatically in your chart, and provides customization settings for order & propulsion block detection and invalidation. Another capability of the indicator is that it combines overlapping order & propulsion blocks so you will have a clean look at the chart without any overlapping zones.
⚙️SETTINGS
1. General Configuration
Show Historic Zones -> This setting will hide invalidated propulsion blocks if enabled.
Max Distance To Last Bar -> This setting defines the maximum range that the indicator will find propulsion blocks to the past. Higher options will make older zones visible.
Zone Invalidation -> Select between Wick & Close price for Order Block & Propulsion Block Invalidation.
Swing Length -> Swing length is used when finding order block formations. Smaller values will result in finding smaller order blocks.
MA Optimizer Simplified [CHE]Introduction:
The MA Optimizer Simplified is a powerful tool for traders and analysts who want to compare and optimize various moving averages (MA). This tool is specifically designed to identify the best or worst performers among a variety of moving averages based on their cumulative performance.
Features and Benefits:
1. Versatility:
- Supports multiple types of moving averages, including:
- Simple Moving Average (SMA): A basic MA calculated by averaging the closing prices over a specified period.
- Exponential Moving Average (EMA): Gives more weight to recent prices, making it more responsive to new information.
- Weighted Moving Average (WMA): Assigns more weight to recent data, but in a linear fashion.
- Volume-Weighted Moving Average (VWMA): Averages prices based on volume, giving more importance to periods with higher trading volume.
- Hull Moving Average (HMA): Designed to reduce lag while improving smoothness.
- Smoothed Moving Average (SMMA or RMA): Averages prices over a longer period, providing a smoother line.
- Bollinger Bands: Uses SMA as a basis and adds upper and lower bands based on standard deviations.
- T3: A smoother and less lagging MA that reduces market noise.
- Allows users to easily switch between MA types and test different periods.
2. Performance Evaluation:
- Calculates the cumulative performance of up to ten different MAs.
- Automatically identifies the best or worst performer based on user selection (Best or Worst).
3. Crossover Detection:
- Detects crossovers of prices and MAs to measure performance.
- Provides clear visual signals when the price crosses a moving average.
4. Visual Representation:
- Plots the best MA indicator on the chart, dynamically changing its color based on price movement relative to the MA.
- Table functionality to display the performance of each MA, including the length and achieved performance in percentage.
5. Customizable Settings:
- Customizable settings for table size and position as well as colors for better visualization and user-friendliness.
- Flexibility in selecting the number of candles that must be above or below the MA before a signal is triggered.
Special Features:
1. T3 Indicator:
- The T3 indicator provides a smoother representation and reduces market noise, leading to more precise signals.
2. Crossover and Crossunder Logic:
- The script includes advanced logic for detecting crossover and crossunder events to identify accurate entry points.
3. Dynamic Color Change:
- The best MA indicator changes color based on the number of candles above or below the MA, helping to quickly recognize market sentiment.
4. Comprehensive Performance Analysis:
- The calculation of cumulative performance for each MA allows for detailed analysis and helps identify the most effective trading strategies.
Conclusion:
The MA Optimizer Simplified is an essential tool for any trader looking to analyze and optimize the performance of various moving averages. With its versatile features and user-friendly settings, it offers a comprehensive and efficient solution for technical analysis.
Best regards, Chervolino
Gap Trend Lines by @eyemaginativeSummary:
The "Gap Trend Lines" script is designed to identify and visualize gaps between the close of one candle and the opening of the next on a TradingView chart. It draws extended trend lines to visually connect these gaps, helping traders to identify significant price movements between consecutive candles.
Functionality:
Indicator Setup:
The script is set as an overlay indicator on the main chart.
It includes settings for maximum line and label counts, ensuring efficient performance.
Parameter Customization:
Gap Threshold: Defines the minimum gap size considered significant.
Line Colors: Allows customization of colors for small and large gaps.
Line Thickness and Style: Provides options to adjust the thickness and style (solid, dotted, dashed) of the trend lines.
Drawing Extended Trend Lines:
For each bar (candlestick) on the chart, the script checks if there is a gap between the previous candle's close and the current candle's open.
If a gap is detected (i.e., close != open), it determines the size of the gap.
Depending on the size relative to the defined threshold, it selects the appropriate color (small or large gap).
It then draws an extended trend line that starts from the close of the previous candle (bar_index , close ) and extends to the open of the current candle (bar_index, open).
The trend line is drawn with the specified thickness, color, and style.
Dynamic Line Attribute Changes:
The script includes a function (changeLineAttributes()) that periodically changes the color and style of the trend lines.
By default, it changes the color every 4 hours (adjustable), alternating between green and the original color.
Enhanced Functionality:
Handles both small and large gaps with different visual cues (colors).
Supports extended trend lines that span both past and future directions (extend=extend.both), ensuring visibility across the entire chart.
Usage:
Traders can use the "Gap Trend Lines" script to:
Identify and analyze gaps between candlesticks.
Visualize significant price movements or breaks in continuity.
Customize the appearance of trend lines for better clarity and analysis.
By utilizing this script, traders can gain insights into price gap dynamics directly on TradingView charts, aiding in decision-making and strategy development.
Capitulation Candle for Bitcoin and Crypto V1.0 [ADRIDEM]Overview
The Capitulation Candle for Bitcoin and Crypto script identifies potential capitulation events in the cryptocurrency market. Capitulation candles indicate a significant sell-off, often marking a potential market bottom. This script highlights such candles by analyzing volume, price action, and other technical conditions. Below is a detailed presentation of the script and its unique features.
Unique Features of the New Script
Volume-Based Analysis : Uses a volume multiplier to detect unusually high trading volumes, which are characteristic of capitulation events. The default multiplier is 5.0, but it can be adjusted to suit different market conditions.
Support Level Detection : Looks back over a customizable period (default is 150 bars) to find support levels, helping to identify significant price breaks.
ATR-Based Range Condition : Ensures that the price range of a capitulation candle is a multiple of the Average True Range (ATR), confirming significant price movement. The default ATR multiplier is 10.0.
Dynamic Dot Sizes : Plots dots of different sizes below capitulation candles based on volume thresholds, providing a visual indication of the volume's significance.
Visual Indicators : Highlights capitulation candles and plots support levels, offering clear visual cues for potential market bottoms.
Originality and Usefulness
This script uniquely combines volume analysis, support level detection, and ATR-based range conditions to identify capitulation candles. The dynamic dot sizes and clear visual indicators make it an effective tool for traders looking to spot potential reversal points in the cryptocurrency market.
Signal Description
The script includes several features that highlight potential capitulation events:
High Volume Detection : Identifies candles with unusually high trading volumes using a customizable volume multiplier.
Support Level Breaks : Detects candles breaking significant support levels over a customizable lookback period.
ATR Range Condition : Ensures the candle's range is significant compared to the ATR, confirming substantial price movement.
Dynamic Dot Sizes : Plots small, normal, and large dots below candles based on different volume thresholds.
These features assist in identifying potential capitulation events and provide visual cues for traders.
Detailed Description
Input Variables
Volume Multiplier (`volMultiplier`) : Detects high-volume candles using this multiplier. Default is 5.0.
Support Lookback Period (`supportLookback`) : The period over which support levels are calculated. Default is 150.
ATR Multiplier (`atrMultiplier`) : Ensures the candle's range is a multiple of the ATR. Default is 10.0.
Small Volume Multiplier Threshold (`smallThreshold`) : Threshold for small dots. Default is 5.
Normal Volume Multiplier Threshold (`normalThreshold`) : Threshold for normal dots. Default is 10.
Large Volume Multiplier Threshold (`largeThreshold`) : Threshold for large dots. Default is 15.
Functionality
High Volume Detection : The script calculates the simple moving average (SMA) of the volume and checks if the current volume exceeds the SMA by a specified multiplier.
```pine
smaVolume = ta.sma(volume, supportLookback)
isHighVolume = volume > smaVolume * volMultiplier
```
Support Level Detection : Determines the lowest low over the lookback period to identify significant support levels.
```pine
supportLevel = ta.lowest(low , supportLookback)
isLowestLow = low == supportLevel
```
ATR Range Condition : Calculates the ATR and ensures the candle's range is significant compared to the ATR.
```pine
atr = ta.atr(supportLookback)
highestHigh = ta.highest(high, supportLookback)
rangeCondition = (highestHigh - low ) >= (atr * atrMultiplier)
```
Combining Conditions : Combines various conditions to identify capitulation candles.
```pine
isHigherVolumeThanNext = volume > volume
isHigherVolumeThanPrevious = volume > volume
bodySize = math.abs(close - open )
candleRange = high - low
rangeBiggerThanPreviousBody = candleRange > bodySize
isCapitulationCandle = isHighVolume and isHigherVolumeThanPrevious and isHigherVolumeThanNext and isLowestLow and rangeCondition and rangeBiggerThanPreviousBody
```
Dynamic Dot Sizes : Determines dot sizes based on volume thresholds and plots them below the identified capitulation candles.
```pine
isSmall = volume > smaVolume * smallThreshold and volume <= smaVolume * normalThreshold
isNormal = volume > smaVolume * normalThreshold and volume <= smaVolume * largeThreshold
isLarge = volume > smaVolume * largeThreshold
plotshape(series=isCapitulationCandle and isSmall, location=location.belowbar, offset=-1, color=color.rgb(255, 82, 82, 40), style=shape.triangleup, size=size.small)
plotshape(series=isCapitulationCandle and isNormal, location=location.belowbar, offset=-1, color=color.rgb(255, 82, 82, 30), style=shape.triangleup, size=size.normal)
plotshape(series=isCapitulationCandle and isLarge, location=location.belowbar, offset=-1, color=color.rgb(255, 82, 82, 20), style=shape.triangleup, size=size.large)
```
Plotting : The script plots support levels and highlights capitulation candles with different sizes based on volume significance.
```pine
plot(supportLevel, title="Support Level", color=color.rgb(255, 82, 82, 50), linewidth=1, style=plot.style_line)
```
How to Use
Configuring Inputs : Adjust the volume multiplier, support lookback period, ATR multiplier, and volume thresholds as needed.
Interpreting the Indicator : Use the plotted support levels and highlighted capitulation candles to identify potential market bottoms and reversal points.
Signal Confirmation : Look for capitulation candles with high volumes breaking significant support levels and meeting the ATR range condition. The dynamic arrow sizes help to assess the volume's significance.
This script provides a detailed and visual method to identify potential capitulation events in the cryptocurrency market, aiding traders in spotting possible reversal points and making informed trading decisions.
Scalp Slayer (i)📊 The Foundation: Core Parameters and Inputs
Filter Number: This parameter is the cornerstone of the script’s sensitivity control. It adjusts the threshold for market volatility that the script considers significant enough for a trade. By default, it's set to 1.5, striking a balance between aggressiveness and conservatism. Traders can tweak this number to make the script more or less sensitive to price fluctuations. A higher number captures smaller, more frequent price movements, ideal for an aggressive trading style. Conversely, a lower number filters out minor noise, focusing on more substantial movements.
EMA Trend Period: The Exponential Moving Average (EMA) is critical for identifying the market's direction. The script uses an EMA calculated over a default period of 50 bars to discern whether the market is trending up or down. This helps in making decisions that align with the overall market trend, thereby increasing the likelihood of successful trades.
Lookback Period: This parameter, set to 20 periods by default, is used to calculate recent highs and lows. These values are crucial for setting realistic take profit and stop-loss levels, as they reflect recent market behavior. The lookback period helps the script adapt to current market conditions by analyzing recent price actions to identify key support and resistance levels.
Color Settings: For enhanced visualization, the script allows customization of colors for take profit and stop-loss markers. By default, take profit levels are marked in orange, and stop-loss levels in red. This color coding helps traders quickly identify important levels on the chart.
Visibility Controls: The script includes options to toggle the display of buy and sell labels, as well as to enable or disable strategy plotting for backtesting and real-time analysis. These controls help traders tailor the script’s visual output to their preferences, making it easier to focus on key trading signals.
🛠️ The Mechanics: How "Scalp Slayer (i)" Operates
1. Calculating the Trading Range and Trend EMA
True Range Calculation: The script begins by calculating the true range, which is the difference between the high and low prices of a bar. This measure of volatility is crucial for identifying significant price movements.
EMA of True Range: The script then smooths the true range using an Exponential Moving Average (EMA). This helps filter out minor price fluctuations, ensuring that the script only reacts to meaningful changes in price. The sensitivity of this filter is adjusted by the filter number, which multiplies the EMA to fine-tune the script's responsiveness to price changes.
Trend EMA: To determine the market’s trend, the script calculates an EMA over the close prices for the specified trend period (default is 50). This trend EMA acts as a benchmark for identifying whether the market is trending up or down. The script uses this trend filter to ensure trades are made in the direction of the prevailing market trend, thereby reducing the risk of trading against the trend.
2. Identifying Recent Highs and Lows
Recent Highs and Lows: The script uses the lookback period to identify the highest and lowest prices over a set number of bars. These recent highs and lows serve as reference points for setting take profit and stop-loss levels. By analyzing recent price action, the script ensures that these levels are relevant to current market conditions, providing a dynamic and contextually accurate approach to risk management.
🔄 Strategic Entry and Exit Conditions
3. Defining Buy and Sell Conditions
Buy Condition: The script establishes a set of criteria for entering a buy trade. First, the closing price must be above the trend EMA, indicating an upward trend. Additionally, the script looks for a sequence of candles showing progressively higher closes, signifying strong upward momentum. The current trading range must exceed the EMA of the true range, confirming that the market is experiencing significant movement. This combination of trend alignment and momentum ensures that buy trades are placed in favorable market conditions.
Sell Condition: Similarly, for sell trades, the script requires the closing price to be below the trend EMA, indicating a downward trend. It also checks for a sequence of candles with progressively lower closes, indicating strong downward momentum. The trading range must again exceed the EMA of the true range, ensuring that the market is moving significantly. These conditions help ensure that sell trades are only taken when the market is likely to continue moving downwards, increasing the chances of profitable trades.
4. Executing Trades and Setting Profit Targets
Long Entry: When the buy condition is met, the script enters a long position at the closing price of the confirmation bar. It then sets a take profit level at the recent high, which serves as a realistic target based on recent price action. The stop-loss level is set at the recent low, providing a safety net against adverse price movements. This approach ensures that trades are closed at optimal points, maximizing profit while minimizing risk.
Short Entry: When the sell condition is met, the script enters a short position at the closing price of the confirmation bar. The take profit level is set at the recent low, and the stop-loss level is set at the recent high. This setup ensures that short trades are closed at favorable levels, capturing gains while protecting against potential losses.
5. Managing Take Profit and Stop Loss
Take Profit and Stop Loss Mechanism: The script continually monitors the market for conditions that meet the take profit or stop-loss criteria. For long trades, the script closes the position if the price reaches or exceeds the take profit level, ensuring profits are locked in. It also closes the position if the price drops to or below the stop-loss level, preventing further losses. For short trades, the script closes the position if the price drops to or below the take profit level, or rises to or above the stop-loss level. This dynamic management of trades helps ensure that profits are maximized while risks are minimized.
🌟 Enhanced Visuals and Debugging Features
Customizable and Informative Plots
Buy and Sell Labels: The script includes options to display labels for buy and sell signals on the chart. These labels provide clear visual cues for trading opportunities, making it easy to identify entry points at a glance. Traders can customize the visibility of these labels based on their preferences, helping them focus on the most important signals.
Take Profit and Stop Loss Markers: To aid in monitoring trades, the script displays distinctive markers for take profit and stop-loss levels. These markers are color-coded for easy differentiation and are placed on the chart to provide clear indications of where trades are likely to be closed. This visual representation helps traders quickly assess the status of their trades and make informed decisions.
Trend and Price Plots: The script plots the trend EMA and recent highs/lows on the chart for quick reference. These plots provide a visual representation of key levels and trends, helping traders make more informed decisions based on current market conditions. By displaying these critical levels, the script enhances situational awareness and aids in the decision-making process.
Debugging and Validation Tools
Bar Index Plotting: For those interested in validating the script's performance, the script includes options to plot the bar index. This feature allows traders to monitor the script's behavior in real-time, ensuring that it is functioning as expected. This can be particularly useful for debugging and optimizing the script.
Condition Printing: The script also includes options to print detailed information about take profit and stop-loss conditions. This feature provides insights into the script's decision-making process, helping traders understand why certain trades were executed or closed. By providing transparency into the script's logic, this feature aids in fine-tuning and improving the script's performance.
Wolfe Wave Detector [LuxAlgo]The Wolfe Wave Detector displays occurrences of Wolfe Waves, alongside a target line. A multiple swing detection approach is used to maximize the number of detected waves.
The indicator includes a dashboard with the number of detected waves, as well as the number of reached targets.
🔶 USAGE
The Wolfe Wave pattern is a chart pattern composed of five segments, with the initial segment extremities (points XABCD) forming a channel containing price variations.
After the price reaches point D , we can expect a reversal toward a target line (point E ). The target line is obtained by connecting and extending point X -> C .
The script draws the XABCD pattern and a projection of where E might potentially be located.
The projection is derived from the intersection between the target line and a line starting from D , parallel to B-C . From this line, margins are added, left and right, creating a wedge-shaped figure in most cases.
When the price passes the target line, this is highlighted by a dot. The dot and pattern are green by default when the target is above D and red when the target is below D . Colors can be edited in the settings. The dashed target line is colored in the opposite color.
As seen in the above example, the price trend can reverse after reaching the target line.
🔹 Symmetry
Ideally, the Wolfe Wave must have a degree of symmetry; every upward line should have a similar angle to the other upward lines, and the same should be true for the downward lines.
Also, the lines forming the channel should be as parallel as possible.
Users have the option to adjust the tolerance:
Margin controls the wave symmetry of the pattern
Angle controls the channel symmetry of the pattern
It's important to note that in both cases, a lower number will lead to more symmetrical patterns, but they may appear less frequently.
It is also important to note that increasing the Margin can delay validating the pattern. In the meantime, the price could surpass the channel in the opposite direction, invalidating and deleting the otherwise valid pattern.
🔹 Multiple Swings
Users can set a Minimum Swing length (for example 2) and a Maximum Swing length (for example 100) which defines the range of the swing point detection length, higher values for these settings will detect longer-term Wolfe patterns, while a larger range will allow for the detection of a larger number of patterns.
By using multiple swings, it is possible to find smaller next to larger patterns at the same time.
The dashboard shows the number of patterns found and targets reached. When, for example, bullish patterns are disabled in the settings, the dashboard only shows the results of bearish patterns.
🔹 Extend Target Line
The publication includes a setting that allows the Target Line to be extended up to 50 bars further. As seen in the above example, the Target Line can still be reached even after the pattern has been finalized. Once the Target Line is reached, it won't be updated further.
Here is another example of a Target Line being reached later on.
The Target Line acted as a support level, after which where the price changed direction.
🔹 Show Progression
An option is included to show the progression before the pattern is completed. Users can make use of the XABC pattern or visualize where point D should be positioned.
The focus lies on the bar range (between the left and right borders of the grey rectangle). The pattern is considered invalid and deleted when point D is beyond these limits. The height of the rectangle is optional. Ideally, the price should be located between the top and bottom of the rectangle, but it is not mandatory.
Show Progression has three options including:
Full: Show all lines of XABC plus line C-D and rectangle for the position of point D
Partial: Show line C-D and rectangle for the position of point D
None: Only show valid completed patterns
The 'Partial' option in the 'Show Progression' feature is designed to help users locate the desired position of point D without the visual clutter caused by the XABC lines. This can be useful for those who prefer a cleaner visual representation of the evolving pattern.
🔶 SETTINGS
🔹 Swing Length
Minimum: Minimum length used for the swing detection.
Maximum Swing Length: Maximum length used for the swing detection.
🔹 Tolerance
Margin: Influences the symmetry of the pattern; with a higher number allowing for less symmetry.
Angle: Influences the symmetry of the channel; with a higher number allowing for less symmetry.
🔹 Style
Toggle: Bullish/Bearish + colors
Extend Target Line: Extend a maximum of 50 bars or until Target Line is reached
Show Progression: Show pattern progression
Dot Size: The size of the dot when the Target Line is reached
🔹 Dashboard
Show Dashboard: Toggle dashboard which shows the number of found patterns and targets reached.
Location: Location of the dashboard on the chart.
Text Size: Text size.
🔹 Calculation
Calculated Bars: Allows the usage of fewer bars for performance/speed improvement
CE_ZLSMA_5MIN_CANDLECHART-- Overview
The "CE_ZLSMA_5MIN_CANDLECHART" strategy, developed by DailyPanda, is a comprehensive trading strategy designed for analyzing trading on 5-minute candlestick charts.
It aims to use some indicators calculated from a Hekin Ashi chart, while running it on a normal candlestick chart, making sure that no price distortion affects the strategy results .
It also brings a feature to show, on the candlestick chart, where the entries would take place on the HA chart, to also be able to study the effect that the price distortion would make on your backtest.
-- Credit
The code in this script is based on open-source indicators originally written by veryfid and everget, I've made significant changes and additions to the scripts but all credit for the idea goes to them, I just built on top of it:
-- Key Features
It incorporate already built indicators (ZLSMA) and CandelierExit (CE)
-- Zero Lag Least Squares Moving Average (ZLSMA) - by veryfid
The ZLSMA is used to detect trends with minimal lag, improving the accuracy of entry and exit signals.
It incorporates a double-smoothed linear regression to minimize lag and enhance trend-following capabilities.
Buy signals are generated when the price closes above the ZLSMA together with the CE signal.
It is calculated based on the HA candlestick pattern.
-- Chandelier Exit (CE) - by everget
The Chandelier Exit indicator is used to dynamically manage stop-loss levels based on the Average True Range (ATR).
It ensures that stop-loss levels are adaptive to market volatility, protecting profits and limiting losses.
The ATR period and multiplier can be customized to fit different trading styles and risk tolerances.
It is calculated based on the HA candlestick pattern.
-- Heikin Ashi Candles
The strategy leverages Heikin Ashi candlesticks to be able identify trends more clearly and leverage this to stay on winning trades longer.
Traders can choose to display Heikin Ashi candlesticks and order fills on the chart for better visualization.
-- Risk Management
The strategy includes multiple risk management options to protect traders' capital.
Maximum intraday loss limit based on a percentage of equity.
Maximum stop-loss in points to filter out entries with excessive risk.
Daily profit target to stop trading once the goal is achieved.
Options to use fixed contract sizes or dynamically adjust based on a percentage of equity.
These features help traders manage risk and ensure sustainable trading practices.
Moving Averages
Several moving averages (EMA 9, EMA 20, EMA 50, EMA 72, EMA 200, SMA 200, and SMA 500) are plotted to provide additional context and trend confirmation.
A "Zone of Value" is highlighted between the EMA 200 and SMA 200 to identify potential support and resistance areas.
-- Customizable Inputs
The strategy includes various customizable inputs, allowing traders to tailor it to their specific needs.
Start and stop trading times.
Risk management parameters (e.g., maximum stop-loss, daily drawdown limit, and daily profit target).
Display options for Heikin Ashi candles and moving averages.
ZLSMA length and offset.
-- Usage
-- Setting Up the Strategy
Configure the start year for the strategy and the trading hours using the input fields. The first candle of each day will be filled black for easy identification, while candles that are outside the allowed time range will be filled purple.
Customize the risk management parameters to match your risk tolerance and trading style.
Enable or disable the display of Heikin Ashi candlesticks and moving averages as desired.
-- Interpreting Signals
Buy signals are indicated by a "Buy" label when the Heikin Ashi close price is above the ZLSMA and the Chandelier Exit indicates a long position.
The strategy will automatically enter a long position with a stop-loss level determined the swing low.
Positions are closed when the close price falls below the ZLSMA.
-- Risk Management
The strategy monitors the maximum intraday loss and stops trading if the loss limit is reached.
If enabled, also stops trading once the daily profit target is achieved, helping to lock in gains.
You have the option to filter operations based on a maximum accepted stop-loss level, based on your risk tolerance.
You can also operate with a fixed amount of contracts or dynamically adjust it based on your allowed risk per trade, ensuring optimal protection of capital.
-- Visual Aids
The strategy plots various moving averages to provide additional trend context.
The "Zone of Value" between the EMA 200 and SMA 200 highlights potential support and resistance areas.
Heikin Ashi candlesticks and order fills can be displayed to enhance the difference this strategy would take if you were to backtest it on a Heikin Ashi chart.
-- Table of results
This strategy also breaks down the results on a monthly basis for better understanding of your capital development along the way.
-- Conclusion
The "CE_ZLSMA_5MIN_CANDLECHART" strategy is a tool for intraday traders looking to understand and leaverage the Heikin Ashi chart while still using the normal candle chart. Traders can customize the strategy to fit their specific needs, making it a versatile addition to any trading toolkit.
MTF Regime Filter II [CHE]Regime Filter II - Comprehensive Guide
Introduction
The "Regime Filter II " indicator is a tool designed to help traders identify market trends by smoothing price data and applying a color scheme to visualize bullish and bearish conditions. This guide provides a detailed explanation of the script's functionality, benefits, and how to use it effectively in TradingView.
Key Benefits
1. Trend Identification: Smooths price data to highlight underlying trends, making it easier for traders to spot potential buying or selling opportunities.
2. Visual Clarity: Uses distinct color schemes to differentiate between bullish and bearish market conditions, enhancing visual analysis.
3. Customization: Offers various settings to adjust smoothing and averaging lengths, choose between different color schemes, and set visibility for different timeframes.
4. Neutral Candle Option: Provides an option to display neutral candles for clearer visual representation when market conditions are neither strongly bullish nor bearish.
5. Timeframe Adaptability: Includes functions to determine appropriate step sizes based on different timeframes, ensuring the indicator remains accurate across various trading periods.
Script Breakdown
1. Indicator Declaration
The script starts by declaring itself as a TradingView indicator using the latest version of Pine Script. This sets up the framework for the indicator's functionality.
2. User Inputs for Smoothing and Averaging Lengths
The script allows users to input specific lengths for smoothing and averaging intervals. These inputs are crucial for determining how the price data is processed to identify trends. By adjusting these lengths, users can fine-tune the sensitivity of the indicator to market movements.
3. Color Scheme Selection
Users can choose between two color schemes: "Traditional" and "WT1 0 Rule". The selected color scheme will determine how the indicator colors the candles to represent bullish and bearish conditions. This customization enhances the visual appeal and usability of the indicator according to personal preferences.
4. Settings for Timeframe Visibility
The script includes settings that allow users to specify which timeframes the indicator should be visible on. This feature helps traders focus on the most relevant timeframes for their trading strategies. Additionally, users can set the number of recent candles to display, providing a clear view of the most recent market trends.
5. Color Definitions
The indicator defines specific colors for bearish and bullish candles. Bearish candles are colored red, while bullish candles are green. These color definitions are applied based on the selected color scheme and the calculated trend, providing a quick visual reference for market conditions.
6. Time Constants
To manage different timeframes effectively, the script uses constants that represent various time intervals in milliseconds, such as minutes, hours, and days. These constants are used to convert timeframes into a format that the script can work with to determine the appropriate step size for calculations.
7. Step Size Determination
The script includes a function that determines the step size based on the selected timeframe. This function ensures that the indicator adapts to different timeframes, maintaining its accuracy and relevance across various trading periods. The step size is calculated based on time intervals, and appropriate labels (like "60", "240", "1D") are assigned.
- For timeframes less than or equal to 1 minute, the step size is set to "60".
- For timeframes less than or equal to 5 minutes, the step size is set to "240".
- For timeframes less than or equal to 1 hour, the step size is set to "1D" (daily).
- For timeframes less than or equal to 4 hours, the step size is set to "3D" (three days).
- For timeframes less than or equal to 12 hours, the step size is set to "7D" (weekly).
- For timeframes less than or equal to 1 day, the step size is set to "1M" (monthly).
- For timeframes less than or equal to 1 week, the step size is set to "3M" (three months).
- For all other timeframes, the step size is set to "12M" (yearly).
8. Trend Calculation
The core of the indicator is its ability to calculate market trends. Here's a detailed breakdown of how the `calculateTrend` function works:
- Initialization: Variables for the middle price and scale, and summations of high/low prices and ranges, are initialized.
- Summation Loop: A loop runs over the smoothing length to calculate the sum of high and low prices and their range.
- Middle and Scale Calculation: The middle price is determined as the average of high/low sums, and the scale is calculated as a fraction of the average range.
- Normalization: The high, low, and close prices are normalized based on the middle price and scale.
- HT Calculation: The normalized prices are smoothed using a simple moving average (SMA).
- Frequency and Exponential Calculations: The frequency and related constants (a, c1, c2, c3) are calculated for further smoothing.
- Smoothed Moving Average (SMA): A smoothed moving average is computed using the HT values and exponential constants.
- WT1 and WT2 Calculation: The final smoothed values (WT1) and their average (WT2) are derived.
9. Color Application Based on Trend
Once the trend is calculated, the script applies the appropriate color to the candles based on the selected color scheme. This function ensures that the visual representation of the trend is consistent with the user’s preferences.
10. Label Plotting for Timeframes
If the option to display timeframe labels is enabled, the script plots labels on the chart to indicate the current timeframe. This feature helps users quickly identify which timeframe they are analyzing.
11. Shape Plotting Based on Trend and Color Scheme
The indicator plots shapes (squares) on the chart based on the calculated trend and selected color scheme. These shapes provide an additional visual cue for market conditions, enhancing the overall clarity of the indicator.
12. Neutral Candle Color Option
The script includes an option to set the color of neutral candles when market conditions are neither strongly bullish nor bearish. This option helps traders better visualize periods of market indecision.
Summary
The "Regime Filter II " is a powerful and customizable tool for traders, offering clear visual cues for market trends and adaptability to various timeframes. By smoothing price data and applying intuitive color schemes, it helps traders make more informed decisions. With features like adjustable smoothing lengths, multiple color schemes, and optional neutral candle displays, this indicator enhances market analysis and trading strategy development. By following this comprehensive guide, traders can effectively utilize the "Regime Filter II " indicator to enhance their market analysis and make more informed trading decisions.
Best regards
ICT Balance Price Range [UAlgo]The "ICT Balance Price Range " indicator identifies and visualizes potential balance price ranges (BPRs) on a price chart. These ranges are indicative of periods where the market exhibits balance between bullish and bearish forces, often preceding significant price movements.
🔶 What is Balanced Price Range (BPR) ?
Balanced Price Range is a concept based on Fair Value Gap. Balanced price range (BPR) is the area on price chart where two opposite fair value gaps overlap.
When price approaches the Balanced Price Range (BPR), we assume that the price will react quickly and strongly here. This is because its the combination of two fair value gaps and being a good point of interest for smart money traders.
🔶 Key Features:
Bars to Consider: Determines the number of bars to evaluate for BPR conditions.
Threshold for BPR: Sets the minimum range required for a valid BPR to be identified.
Remove Old BPR: Option to automatically remove invalidated BPRs from the chart.
Bearish/Bullish Box Color: Customizable colors for visual representation of bearish and bullish BPRs.
🔶 Disclaimer
This indicator is provided for educational and informational purposes only.
It should not be considered as financial advice or a recommendation to buy or sell any financial instrument.
The use of this indicator involves inherent risks, and users should employ their own judgment and conduct their own research before making any trading decisions. Past performance is not indicative of future results.
🔷 Related Scripts
Fair Value Gaps (FVG)
Smart Money Concept Strategy - Uncle SamThis strategy combines concepts from two popular TradingView scripts:
Smart Money Concepts (SMC) : The strategy identifies key levels in the market (swing highs and lows) and draws trend lines to visualize potential breakouts. It uses volume analysis to gauge the strength of these breakouts.
Smart Money Breakouts : This part of the strategy incorporates the idea of "Smart Money" – institutional traders who often lead market movements. It looks for breakouts of established levels with significant volume, aiming to catch the beginning of new trends.
How the Strategy Works:
Identification of Key Levels: The script identifies swing highs and swing lows based on a user-defined lookback period. These levels are considered significant points where price has reversed in the past.
Drawing Trend Lines: Trend lines are drawn connecting these key levels, creating a visual representation of potential support and resistance zones.
Volume Analysis: The script analyzes the volume during the formation of these levels and during breakouts. Higher volume suggests stronger moves and increases the probability of a successful breakout.
Entry Conditions:
Long Entry: A long entry is triggered when the price breaks above a resistance line with significant volume, and the moving average trend filter (optional) is bullish.
Short Entry: A short entry is triggered when the price breaks below a support line with significant volume, and the moving average trend filter (optional) is bearish.
Exit Conditions:
Stop Loss: Customizable stop loss percentages are implemented to protect against adverse price movements.
Take Profit: Customizable take profit percentages are used to lock in profits.
Credits and Compliance:
This strategy is inspired by the concepts and code from "Smart Money Concepts (SMC) " and "Smart Money Breakouts ." I've adapted and combined elements of both scripts to create this strategy. Full credit is given to the original authors for their valuable contributions to the TradingView community.
To comply with TradingView's House Rules, I've made the following adjustments:
Clearly Stated Inspiration: The description explicitly mentions the original scripts and authors as the inspiration for this strategy.
No Direct Copying: The code has been modified and combined, not directly copied from the original scripts.
Educational Purpose: The primary purpose of this strategy is for learning and backtesting. It's not intended as financial advice.
Important Note:
This strategy is intended for educational and backtesting purposes only. It should not be used for live trading without thorough testing and understanding of the underlying concepts. Past performance is not indicative of future results.
Gold Option Signals with EMA and RSIIndicators:
Exponential Moving Averages (EMAs): Faster to respond to recent price changes compared to simple moving averages.
RSI: Measures the magnitude of recent price changes to evaluate overbought or oversold conditions.
Signal Generation:
Buy Call Signal: Generated when the short EMA crosses above the long EMA and the RSI is not overbought (below 70).
Buy Put Signal: Generated when the short EMA crosses below the long EMA and the RSI is not oversold (above 30).
Plotting:
EMAs: Plotted on the chart to visualize trend directions.
Signals: Plotted as shapes on the chart where conditions are met.
RSI Background Color: Changes to red for overbought and green for oversold conditions.
Steps to Use:
Add the Script to TradingView:
Open TradingView, go to the Pine Script editor, paste the script, save it, and add it to your chart.
Interpret the Signals:
Buy Call Signal: Look for green labels below the price bars.
Buy Put Signal: Look for red labels above the price bars.
Customize Parameters:
Adjust the input parameters (e.g., lengths of EMAs, RSI levels) to better fit your trading strategy and market conditions.
Testing and Validation
To ensure that the script works as expected, you can test it on historical data and validate the signals against known price movements. Adjust the parameters if necessary to improve the accuracy of the signals.
US M2### Relevance and Functionality of the "US M2" Indicator
#### Relevance
The "US M2" indicator is relevant for several reasons:
1. **Macro-Economic Insight**: The M2 money supply is a critical indicator of the amount of liquidity in the economy. Changes in M2 can significantly impact financial markets, including equities, commodities, and cryptocurrencies.
2. **Trend Identification**: By analyzing the M2 money supply with moving averages, the indicator helps identify long-term and short-term trends, providing insights into economic conditions and potential market movements.
3. **Trading Signals**: The indicator generates bullish and bearish signals based on moving average crossovers and the difference between current M2 values and their moving averages. These signals can be useful for making informed trading decisions.
#### How It Works
1. **Data Input**:
- **US M2 Money Supply**: The indicator fetches the US M2 money supply data using the "USM2" symbol with a monthly resolution.
2. **Moving Averages**:
- **50-Period SMA**: Calculates the Simple Moving Average (SMA) over 50 periods (months) to capture short-term trends.
- **200-Period SMA**: Calculates the SMA over 200 periods to identify long-term trends.
3. **Difference Calculation**:
- **USM2 Difference**: Computes the difference between the current M2 value and its 50-period SMA to highlight deviations from the short-term trend.
4. **Amplification**:
- **Amplified Difference**: Multiplies the difference by 100 to make the deviations more visible on the chart.
5. **Bullish and Bearish Conditions**:
- **Bullish Condition**: When the current M2 value is above the 50-period SMA, indicating a positive short-term trend.
- **Bearish Condition**: When the current M2 value is below the 50-period SMA, indicating a negative short-term trend.
6. **Short-Term SMA of Amplified Difference**:
- **14-Period SMA**: Applies a 14-period SMA to the amplified difference to smooth out short-term fluctuations and provide a clearer trend signal.
7. **Plots and Visualizations**:
- **USM2 Plot**: Plots the US M2 data for reference.
- **200-Period SMA Plot**: Plots the long-term SMA to show the broader trend.
- **Amplified Difference Histogram**: Plots the amplified difference as a histogram with green bars for bullish conditions and red bars for bearish conditions.
- **SMA of Amplified Difference**: Plots the 14-period SMA of the amplified difference to track the trend of deviations.
8. **Moving Average Cross Signals**:
- **Bullish Cross**: Plots an upward triangle when the 50-period SMA crosses above the 200-period SMA, signaling a potential long-term uptrend.
- **Bearish Cross**: Plots a downward triangle when the 50-period SMA crosses below the 200-period SMA, signaling a potential long-term downtrend.
### Summary
The "US M2" indicator provides a comprehensive view of the US M2 money supply, highlighting significant trends and deviations. By combining short-term and long-term moving averages with amplified difference analysis, it offers valuable insights and trading signals based on macroeconomic liquidity conditions.
BTC x M2 Divergence (Weekly)### Why the "M2 Money Supply vs BTC Divergence with Normalized RSI" Indicator Should Work
IMPORTANT
- Weekly only indicator
- Combine it with BTC Halving Cycle Profit for better results
The "M2 Money Supply vs BTC Divergence with Normalized RSI" indicator leverages the relationship between macroeconomic factors (M2 money supply) and Bitcoin price movements, combined with technical analysis tools like RSI, to provide actionable trading signals. Here's a detailed rationale on why this indicator should be effective:
1. **Macroeconomic Influence**:
- **M2 Money Supply**: Represents the total money supply, including cash, checking deposits, and easily convertible near money. Changes in M2 reflect liquidity in the economy, which can influence asset prices, including Bitcoin.
- **Bitcoin Sensitivity to Liquidity**: Bitcoin, being a digital asset, often reacts to changes in liquidity conditions. An increase in money supply can lead to higher asset prices as more money chases fewer assets, while a decrease can signal tightening conditions and lower prices.
2. **Divergence Analysis**:
- **Economic Divergence**: The indicator calculates the divergence between the percentage changes in M2 and Bitcoin prices. This divergence can highlight discrepancies between Bitcoin's price movements and broader economic conditions.
- **Market Inefficiencies**: Large divergences may indicate inefficiencies or imbalances that could lead to price corrections or trends. For example, if M2 is increasing (indicating more liquidity) but Bitcoin is not rising proportionately, it might suggest a potential upward correction in Bitcoin's price.
3. **Normalization and Smoothing**:
- **Normalized Divergence**: Normalizing the divergence to a consistent scale (-100 to 100) allows for easier comparison and interpretation over time, making the signals more robust.
- **Smoothing with EMA**: Applying Exponential Moving Averages (EMAs) to the normalized divergence helps to reduce noise and identify the underlying trend more clearly. This double-smoothed divergence provides a clearer signal by filtering out short-term volatility.
4. **RSI Integration**:
- **RSI as a Momentum Indicator**: RSI measures the speed and change of price movements, indicating overbought or oversold conditions. Normalizing the RSI and incorporating it into the divergence analysis helps to confirm the strength of the signals.
- **Combining Divergence with RSI**: By using RSI in conjunction with divergence, the indicator gains an additional layer of confirmation. For instance, a bullish divergence combined with an oversold RSI can be a strong buy signal.
5. **Dynamic Zones and Sensitivity**:
- **Good DCA Zones**: Highlighting zones where the divergence is significantly positive (good DCA zones) indicates periods where Bitcoin might be undervalued relative to economic conditions, suggesting good buying opportunities.
- **Red Zones**: Marking zones with extremely negative divergence, combined with RSI confirmation, identifies potential market tops or bearish conditions. This helps traders avoid buying into overbought markets or consider selling.
- **Peak Detection**: The sensitivity setting for detecting upside down peaks allows for early identification of potential market bottoms, providing timely entry points for traders.
6. **Visual Cues and Alerts**:
- **Clear Visualization**: The plots and background colors provide immediate visual feedback, making it easier for traders to spot significant conditions without deep analysis.
- **Alerts**: Built-in alerts for key conditions (good DCA zones, red zones, sell signals) ensure traders can act promptly based on the indicator's signals, enhancing the practicality of the tool.
### Conclusion
The "M2 Money Supply vs BTC Divergence with Normalized RSI" indicator integrates macroeconomic data with technical analysis to offer a comprehensive view of Bitcoin's market conditions. By analyzing the divergence between M2 money supply and Bitcoin prices, normalizing and smoothing the data, and incorporating RSI for momentum confirmation, the indicator provides robust signals for identifying potential buying and selling opportunities. This holistic approach increases the likelihood of capturing significant market movements and making informed trading decisions.
Sniper Entry using RSI confirmationThis is a sniper entry indicator that provides Buy and Sell signals using other Indicators to give the best possible Entries (note: Entries will not be 100 percent accurate and analysis should be done to support an entry)
Moving Average Crossovers:
The indicator uses two moving averages: a short-term SMA (Simple Moving Average) and a long-term SMA.
When the short-term SMA crosses above the long-term SMA, it generates a buy signal (indicating potential upward momentum).
When the short-term SMA crosses below the long-term SMA, it generates a sell signal (indicating potential downward momentum).
RSI Confirmation:
The indicator incorporates RSI (Relative Strength Index) to confirm the buy and sell signals generated by the moving average crossovers.
RSI is used to gauge the overbought and oversold conditions of the market.
A buy signal is confirmed if RSI is below a specified overbought level, indicating potential buying opportunity.
A sell signal is confirmed if RSI is above a specified oversold level, indicating potential selling opportunity.
Dynamic Take Profit and Stop Loss:
The indicator calculates dynamic take profit and stop loss levels based on the Average True Range (ATR).
ATR is used to gauge market volatility, and the take profit and stop loss levels are adjusted accordingly.
This feature helps traders to manage their risk effectively by setting appropriate profit targets and stop loss levels.
Combining the information provided by these, the indicator will provide an entry point with a provided take profit and stop loss. The indicator can be applied to different asset classes. Risk management must be applied when using this indicator as it is not 100% guaranteed to be profitable.
Goodluck!
Percentile Nearest Rank Without Arrays [CHE] Presentation of the "Percentile Nearest Rank Without Arrays " Indicator
The "Percentile Nearest Rank Without Arrays " is a robust trading indicator designed to calculate the percentile value of a specific price within a defined time frame. This indicator provides traders with a visual representation that helps identify market trends and potential turning points.
Key Features and Functions:
- Percentile Calculation: The indicator calculates the percentile of the closing price within a specified period (default length is 15 periods). This allows traders to view the current price in the context of its historical distribution.
- Customizable Parameters: Traders can adjust the length of the observed period and the desired percentile value, making the analysis more tailored to their trading strategies.
- Color-Coded Visualization: The indicator uses color coding to signal whether the current closing price is above (green) or below (red) the calculated percentile value, providing visual clarity and quick decision-making.
- Efficiency Without Arrays: By avoiding the use of arrays, the indicator is more efficient in terms of computation and memory usage. This results in faster performance, especially when dealing with large datasets or real-time data.
Importance for Traders:
1. Trend Identification: By analyzing whether the current price is above or below a specific percentile value, traders can identify trends early and act accordingly.
2. Risk Management: The indicator helps traders better understand volatility and price distribution, leading to more effective risk management.
3. Trading Strategies: It can be used as part of trading strategies to identify entry and exit points based on statistical distributions.
4. Simplicity and Efficiency: As the indicator operates without the use of arrays, it is more efficient and simpler to implement, reducing computation time and improving the performance of the trading platform.
Scientific Explanation of Percentile Nearest Rank:
The Percentile Nearest Rank method is a statistical technique used to determine the relative standing of a value within a data set. For a given dataset of length \( n \) and a desired percentile \( p \), the method follows these steps:
1. Index Calculation: The index corresponding to the desired percentile is calculated using the formula:
index = ( p / 100 n ) -1
where "ceiling" denotes rounding up to the nearest integer.
2. Value Sorting: The values in the dataset are conceptually sorted from smallest to largest.
3. Count Comparison: For each value in the dataset, count how many values are smaller. When the count matches the calculated index, the value at this position is the percentile value.
4. Result Assignment: The value identified as the percentile value is then used for further analysis or plotting.
This method is advantageous for trading because it provides a non-parametric way to understand price distributions, making it less sensitive to outliers and more robust in volatile markets.
Scientific Context and Utility:
- Statistical Robustness: Unlike mean and median, the percentile provides a robust measure of the data distribution, less influenced by extreme values. This robustness is crucial for traders dealing with volatile markets.
- Non-Parametric Analysis: Percentiles do not assume any underlying distribution (e.g., normal distribution) of the data, making the analysis more flexible and broadly applicable.
- Quantitative Decision Making: By using percentiles, traders can make data-driven decisions based on the relative standing of current prices within historical data, enhancing the objectivity of their strategies.
- Efficiency Without Arrays: Avoiding the use of arrays reduces memory consumption and computational overhead, making the indicator more suitable for real-time applications and large datasets. This improves overall performance and responsiveness on trading platforms, which is crucial for making timely trading decisions.
In summary, the "Percentile Nearest Rank Without Arrays " indicator is a powerful tool for traders seeking to integrate statistical price distribution insights into their trading strategies. It provides a robust, non-parametric, and visually intuitive method to analyze market trends and volatility, while offering enhanced computational efficiency by avoiding the use of arrays.
HPotter Last PriceIf you, like me, like to watch the market in real time for a long time, then this script will be useful to you. Stay tuned.
A script that helps you navigate the current price and the latest highs and lows
IMPORTANT: For the script to work correctly, you must enable "On every tick" in Preoperties.
Throw it on any chart.
On the right appears:
white price - last transaction price
green price - current high that has not been reached (looks at bars in history)
red price - current low that has not been reached (looks at bars in history)
yellow price - new high or low installed