CandelaCharts - Swing Failure Pattern (SFP) 📝 Overview
The Swing Failure Pattern (SFP) indicator is designed to identify and highlight Swing Failure Patterns on a user’s chart. This pattern typically emerges when significant market participants generate liquidity by driving price action to key levels. An SFP occurs when the price temporarily breaks above a resistance level or below a support level, only to quickly reverse and return within the previous range. These movements are often associated with stop-loss hunting or liquidity grabs, providing traders with potential opportunities to anticipate reversals or key market turning points.
A Bullish SFP occurs when the price dips below a key support level, triggering stop-loss orders, but then swiftly reverses upward, signaling a potential upward trend or reversal.
A Bearish SFP happens when the price spikes above a key resistance level, triggering stop-losses of short positions, but then quickly reverses downward, indicating a potential bearish trend or reversal.
The indicator is a powerful tool for traders, helping to identify liquidity grabs and potential reversal points in real-time. By marking bullish and bearish Swing Failure Patterns on the chart, it provides clear visual cues for spotting market traps set by major players, enabling more informed trading decisions and improved risk management.
📦 Features
Bullish/Bearish SFPs
Styling
⚙️ Settings
Length: Determines the detection length of each SFP
Bullish SFP: Displays the bullish SFPs
Bearish SFP: Displays the bearish SFPs
Label: Controls the labels size
⚡️ Showcase
Bullish
Bearish
Both
📒 Usage
The best approach is to combine a few complementary indicators to gain a clearer market perspective. This doesn’t mean relying on the Golden Cross, RSI divergences, SFPs, and funding rates simultaneously, but rather focusing on one or two that align well in a given scenario.
The example above demonstrates the confluence of a Bearish Swing Failure Pattern (SFP) with an RSI divergence. This combination strengthens the signal, as the Bearish SFP indicates a potential reversal after a liquidity grab, while the RSI divergence confirms weakening momentum at the key level. Together, these indicators provide a more robust setup for identifying potential market reversals with greater confidence.
🚨 Alerts
This script provides alert options for all signals.
Bearish Signal
A bearish signal is triggered when a Bearish SFP is formed.
Bullish Signal
A bullish signal is triggered when a Bullish SFP is formed.
⚠️ Disclaimer
Trading involves significant risk, and many participants may incur losses. The content on this site is not intended as financial advice and should not be interpreted as such. Decisions to buy, sell, hold, or trade securities, commodities, or other financial instruments carry inherent risks and are best made with guidance from qualified financial professionals. Past performance is not indicative of future results.
Pivot points and levels
IPO Lifecycle Sell Strategy [JARUTIR]IPO Lifecycle Sell Strategy with Dynamic Buy Date and Multiple Sell Rules
This custom TradingView script is designed for traders looking to capitalize on dynamic strategies for IPOs and growth stocks, by implementing several sell rules based on price action and technical indicators. It provides a set of sell rules that are applied dynamically depending on the stock's lifecycle and price action, allowing users to lock in profits and minimize drawdowns based on key technical thresholds.
The four sell strategies incorporated into this script are inspired by the book "The Lifecycle Trade", a resource that focuses on capturing profits while managing risk in different phases of a stock's lifecycle, from IPO to high-growth stages.
Key Features:
Buy Price and Buy Date: You can either manually input your buy price and date or let the script automatically detect the buy date based on the specified buy price.
Multiple Sell Strategies: Choose from 4 predefined sell strategies:
Ascender Rule : Captures strong momentum from IPO stocks by selling portions at specific price levels or technical conditions.
Midterm Rule : Focuses on holding for longer periods, with defensive sell signals triggered when the stock deviates significantly from peak price or key moving averages.
40 Week Rule : Designed for long-term holds, this rule triggers a sell when the stock closes below the 40-week moving average.
Everest Rule : Aggressive strategy for selling into strength based on parabolic moves or gap downs, ideal for high momentum stocks.
Interactive Features:
Horizontal Green Line showing the buy price level from the buy date.
Visual Sell Signals appear only after the buy date to ensure that your analysis is relevant to the stock lifecycle.
Customizable settings, allowing you to choose your preferred sell rule strategy and automate buy date detection.
This script is perfect for traders using a strategic, systematic approach to IPOs and high-growth stocks, whether you're looking for quick exits during momentum phases or holding for longer-term growth.
Usage:
Input your Buy Price and Buy Date, or allow the script to automate the buy date detection.
Select a Sell Rule strategy based on your risk profile and trading style.
View visual signals for selling when specific conditions are met.
Frequently Asked Questions (FAQs):
Q1: How do I input my Buy Price and Buy Date?
The script allows you to either manually input the Buy Price and Buy Date or use the automated detection. If you choose automated detection, the script will automatically assign the buy date when the price crosses above your set Buy Price.
Q2: What is the purpose of the "Sell Rules"?
The script offers four sell strategies to help manage different types of stocks in varying phases of their lifecycle:
Ascender Rule: Targets IPO stocks showing positive momentum.
Midterm Rule: A defensive strategy for stocks in a steady uptrend.
40 Week Rule: Long-term hold strategy designed to ride stocks through extended growth.
Everest Rule: Aggressive strategy to capture profits during parabolic price moves.
Q3: What is the significance of the Green Line at Buy Price?
The Green Line represents your entry point (Buy Price) on the chart. It will appear from the buy date onwards, helping you track the performance of your stock relative to your entry.
Q4: Can I customize the Sell Strategy?
Yes! You can choose from the available Sell Rules (Ascender Rule, Midterm Rule, 40 Week Rule, Everest Rule) via an input option in the script. Each strategy has its own unique triggers based on price action, moving averages, and time-based conditions.
Q5: Does this script work for stocks and crypto?
Yes, this script is designed for both stocks and cryptocurrencies. It works on any asset where price data and timeframes are available.
Q6: How do the Weekly Moving Averages (WSMA) work in this strategy?
The script uses weekly moving averages (WSMA) to track longer-term trends. These are essential for some of the sell rules, such as the Midterm Rule and 40 Week Rule, which rely on the stock's movement relative to the 40-week moving average.
Q7: Will the script plot a Sell Signal immediately after the Buy Date?
No, sell signals will only be plotted after the Buy Date. This ensures that the sell strategy is relevant to your actual holding period and avoids premature triggers.
Q8: How do I interpret the Sell Signal?
The script will plot a Red Sell Signal above the bar when the sell conditions are met, based on the selected strategy. This indicates that it may be a good time to exit the position according to your chosen rule.
Q9: Can I use this strategy on different timeframes?
Yes, you can apply the script to any timeframe. However, some sell strategies, like the Midterm Rule and 40 Week Rule, are designed to work best with weekly data, so it's recommended to use these strategies with longer timeframes.
Q10: Does this script have any alerts?
Yes! The script supports alert conditions that will notify you when the sell conditions are met according to your selected rule. You can set up alerts to stay informed without needing to watch the chart constantly.
Q11: What if I want to disable some of the sell rules?
You can select your preferred sell rule using the "Select Sell Rule" dropdown. If you don’t want to use a particular rule, simply choose a different strategy or leave it inactive.
------------------------------
Disclaimer:
This strategy is intended for educational purposes only. It should not be considered financial advice. Always perform your own research and consult with a professional before making any trading decisions. Trading involves significant risk, and you should never trade with money you cannot afford to lose.
MCP Stop Strategy [JARUTIR]The MCP Stop Strategy is a trading tool designed to help traders lock in profits and manage risks. It is based on the concept of setting a MCP (Mental Capacity Preservation) Stop explained in the book "The Lifecycle Trade". I call it Maximum Controllable Profit Stop which helps protect profits once a stock or asset reaches a new peak. The MCP Stop is dynamically calculated based on the Buy Price and the All Time High Price (Peak Price), and is adjusted using a customizable percentage (MCP%) to retain a portion of the gains from the peak price during a drawdown.
Key Features :
MCP Stop Calculation: The script calculates the MCP Stop as:
MCP Stop = Buy Price + (Peak Price - Buy Price) x MCP%
This helps you protect a portion of your gains (defined by MCP%) as the price moves in your favor.
Flexible Buy Date Option:
You can either manually input a Buy Date or let the script automatically detect the Buy Date when the price first meets or exceeds the user-defined Buy Price.
After the Buy Date, the MCP Stop, Buy Price, and Peak Price are plotted on the chart for easy visualization.
Customizable Parameters:
Buy Price: The price at which the asset was bought.
MCP Percentage: The percentage of profit from the peak that you want to retain in case of a drawdown.
Lookback Length: The number of bars to consider when calculating the Peak Price (All Time High).
How to Use the Script :
Set the Buy Price: Enter the price at which you bought the asset.
Set the MCP%: Enter the percentage of profits you want to protect from the peak. For example, if you want to retain 10% of the gain from the peak, set this to 10.
Choose the Buy Date Method:
Automated Buy Date: The script will automatically detect the first bar where the price meets or exceeds the Buy Price.
Manual Buy Date: If you prefer to specify a particular Buy Date, input the desired date and time.
View the MCP Stop and Peak Price: After the Buy Date (either manually or automatically detected), the MCP Stop, Buy Price, and Peak Price will be plotted on the chart.
Monitor the MCP Stop Trigger: The script will alert you when the price falls below the MCP Stop, indicating a potential exit point to protect profits.
Frequently Asked Questions (FAQs):
1. What is the MCP Stop?
The MCP Stop is a dynamic stop-loss level that adjusts based on your Buy Price and the All Time High Price (Peak Price). It protects a portion of your gains from the peak, which is defined by the MCP%. For example, if you set the MCP% to 10%, the script will retain 10% of the gains from the peak and use this as a stop-loss.
2. How does the Buy Date work?
The Buy Date is the date when you entered the position:
If you choose Automated Buy Date, the script will automatically set the Buy Date to the first bar when the price meets or exceeds the Buy Price.
If you choose Manual Buy Date, you can specify a particular date and time when you want the strategy to start calculating and plotting the MCP Stop and Peak Price.
3. What happens if the price falls below the MCP Stop?
If the price drops below the MCP Stop, the script will mark this as a potential exit point, helping you protect profits. A visual alert (MCP STOP) will be shown on the chart when the price reaches or falls below the MCP Stop.
4. Can I adjust the Lookback Length for Peak Price?
Yes, you can customize the Lookback Length (the number of bars the script considers when calculating the Peak Price) by entering a value in the input field. By default, it is set to 1000 bars, which represents a few months of historical data, but you can increase or decrease this based on your trading strategy.
5. Why would I want to use the automated Buy Date?
The Automated Buy Date is useful for traders who want the script to automatically track the Buy Date when the price first reaches or exceeds the Buy Price. This is helpful when you're unsure of the exact entry date but know the price at which you bought the asset. It simplifies the process by eliminating the need for manual input.
6. Can I use this strategy for long and short positions?
The current version of this script is designed for long positions, where you buy an asset and want to protect your profits as the price increases. If you're interested in applying it to short positions, you would need to adjust the logic accordingly (e.g., tracking the lowest price instead of the peak price).
7. Can I modify the script to fit my trading strategy?
Yes, this script is highly customizable. You can adjust parameters such as Buy Price, MCP%, and Lookback Length to suit your specific trading style. You can also tweak the visual appearance of the plotted lines and alerts.
Disclaimer:
This strategy is intended for educational purposes only. It should not be considered financial advice. Always perform your own research and consult with a professional before making any trading decisions. Trading involves significant risk, and you should never trade with money you cannot afford to lose.
Market Open Levels v3This indicator "Market Open Levels v3" allows a chart user to automatically display up to 20 previous price levels at the open price of up to 8 different markets simultaneously on one indicator.
The user can specify custom labels for each market's price level, as well as adjust the GMT Offset to allow for market open times in a different timezone than the chart's displayed time.
Displays price level at specified market open times. For instance, if a user specifies a market opens at 08:00, then a price level (horizontal line) will be drawn at the most recent 08:00 candle's open price (if GMT Offset is set to 0).
See tooltips for more information on specific inputs.
Support and Resistance LinesDraw the last 5 support and resistance lines. It works on the current timeframe. You can adjust the sensibility by changing the diff variable.
Adaptive MAAdaptive Moving Average (AMA)
Overview
The Adaptive Moving Average (AMA) script is designed to calculate and plot a moving average that adapts dynamically based on market conditions. This script uses pivot-based periods for its calculation, allowing it to adjust its behavior in response to market volatility and trends. It supports both Simple Moving Average (SMA) and Exponential Moving Average (EMA).
Features
Dynamic Period Calculation: Leverages the DynamicPeriodPublic library to compute periods based on pivot points, providing an adaptive length for the moving average.
Customizable Parameters: Users can choose predefined "Fast" and "Slow" settings or manually configure the parameters for greater control.
Supports SMA and EMA: Flexibility to choose between SMA and EMA for the moving average calculation.
Inputs
Source ( src ): Data source for the moving average (e.g., close price).
Default: close
Length Type ( length_type ): Determines the type of period calculation.
Options: Fast, Slow, Manual
MA Type ( ma_type ): Specifies the type of moving average to calculate.
Options: SMA, EMA
Manual Parameters (used when length_type is set to Manual):
Left Bars ( left_bars ): Number of left-hand bars for pivot detection.
Right Bars ( right_bars ): Number of right-hand bars for pivot detection.
Number of Pivots ( num_pivots ): Minimum number of pivots for dynamic period calculation.
Length Multiplier ( length_mult ): Multiplier applied to the calculated period.
Use Cases
Trend Analysis: Identify market trends with an average that adapts to changing conditions.
Volatility-Based Strategies: Adjust strategies dynamically in response to market volatility.
Custom Configurations: Fine-tune pivot parameters for specific markets or assets using the "Manual" mode.
Example Usage
Select the desired length type (Fast, Slow, or Manual).
If Manual is selected, configure the pivot detection parameters and length multiplier.
Choose the moving average type (SMA or EMA).
Observe the adaptive moving average plotted on the chart.
DynamicPeriodPublicDynamic Period Calculation Library
This library provides tools for adaptive period determination, useful for creating indicators or strategies that automatically adjust to market conditions.
Overview
The Dynamic Period Library calculates adaptive periods based on pivot points, enabling the creation of responsive indicators and strategies that adjust to market volatility.
Key Features
Dynamic Periods: Computes periods using distances between pivot highs and lows.
Customizable Parameters: Users can adjust detection settings and period constraints.
Robust Handling: Includes fallback mechanisms for cases with insufficient pivot data.
Use Cases
Adaptive Indicators: Build tools that respond to market volatility by adjusting their periods dynamically.
Dynamic Strategies: Enhance trading strategies by integrating pivot-based period adjustments.
Function: `dynamic_period`
Description
Calculates a dynamic period based on the average distances between pivot highs and lows.
Parameters
`left` (default: 5): Number of left-hand bars for pivot detection.
`right` (default: 5): Number of right-hand bars for pivot detection.
`numPivots` (default: 5): Minimum pivots required for calculation.
`minPeriod` (default: 2): Minimum allowed period.
`maxPeriod` (default: 50): Maximum allowed period.
`defaultPeriod` (default: 14): Fallback period if no pivots are found.
Returns
A dynamic period calculated based on pivot distances, constrained by `minPeriod` and `maxPeriod`.
Example
//@version=6
import CrimsonVault/DynamicPeriodPublic/1
left = input.int(5, "Left bars", minval = 1)
right = input.int(5, "Right bars", minval = 1)
numPivots = input.int(5, "Number of Pivots", minval = 2)
period = DynamicPeriodPublic.dynamic_period(left, right, numPivots)
plot(period, title = "Dynamic Period", color = color.blue)
Implementation Notes
Pivot Detection: Requires sufficient historical data to identify pivots accurately.
Edge Cases: Ensures a default period is applied when pivots are insufficient.
Constraints: Limits period values to a user-defined range for stability.
High/Mid/Low of the Previous Month, Week and Day + MAIntroducing the Ultimate Price Action Indicator
Take your trading to the next level with this feature-packed indicators. Designed to provide key price insights, this tool offers:
- Monthly, Weekly, and Daily Levels : Displays the High, Midpoint, and Low of the previous month, week, and day.
- Logarithmic Price Lines : Option to plot price levels logarithmically for enhanced accuracy.
- Customizable Labels : Display labels on price lines for better clarity. (This feature is optional.)
- Dual Moving Averages : Add two customizable Moving Averages (Simple, Exponential, or Weighted) directly on the price chart. (This feature is optional.)
This code combines features from the Moving Average Exponential and Daily Weekly Monthly Highs & Lows (sbtnc) indicators, with custom modifications to implement unique personal ideas.
Perfect for traders who want to combine precision with simplicity. Whether you're analyzing historical levels or integrating moving averages into your strategy, this indicator provides everything you need for informed decision-making.
To prevent change chart scale, right click on Price Scale and enable "Scale price chart only"
Key LevelsKey Levels Indicator
In the world of trading, manually identifying and plotting key levels for every close can be a tedious and error-prone task. This indicator stands out by automatically detecting and plotting only those levels where a significant shift in market sentiment has occurred. Unlike traditional indicators that plot lines for every open or close, this tool focuses on levels where liquidity has changed hands, indicating a potential shift in momentum.
How It Works:
- The indicator identifies Higher Timeframe (HTF) reversals, plotting levels only when a bearish candle is followed by a bullish one, or vice versa.
- Weekly levels are represented by dashed lines, while monthly levels are solid, providing clear visual differentiation.
- Levels are drawn at the open price of the reversal candle, starting precisely at the beginning of the new HTF bar.
Why It's Different:
- Focuses on genuine shifts in market sentiment rather than arbitrary price points.
- Automatically manages the number of visible levels to prevent chart clutter.
- Ideal for range traders and mean reversion strategies, offering insights into potential support and resistance zones where market participants have shown a change in behavior.
Usage Note:
While this indicator provides valuable insights, it should not be used in isolation. Always consider the broader market context and combine it with other analysis techniques for optimal results.
Settings:
- Toggle weekly/monthly levels
- Adjust the number of visible levels (1-20)
- Customize level colors
Fibonacci Confluence Toolkit [LuxAlgo]The Fibonacci Confluence Toolkit is a technical analysis tool designed to help traders identify potential price reversal zones by combining key market signals and patterns. It highlights areas of interest where significant price action or reactions are anticipated, automatically applies Fibonacci retracement levels to outline potential pullback zones, and detects engulfing candle patterns.
Its unique strength lies in its reliance solely on price patterns, eliminating the need for user-defined inputs, ensuring a robust and objective analysis of market dynamics.
🔶 USAGE
The script begins by detecting CHoCH (Change of Character) points—key indicators of shifts in market direction. This script integrates the principles of pure price action as applied in Pure-Price-Action-Structures , where further details on the detection process can be found.
The detected CHoCH points serve as the foundation for defining an Area of Interest (AOI), a zone where significant price action or reactions are anticipated.
As new swing highs or lows emerge within the AOI, the tool automatically applies Fibonacci retracement levels to outline potential retracement zones. This setup enables traders to identify areas where price pullbacks may occur, offering actionable insights into potential entries or reversals.
Additionally, the toolkit highlights engulfing candle patterns within these zones, further refining entry points and enhancing confluence for better-informed trading decisions based on real-time trend dynamics and price behavior.
🔶 SETTINGS
🔹 Market Patterns
Bullish Structures: Enable or disable all bullish components of the indicator.
Bearish Structures: Enable or disable all bearish components of the indicator.
Highlight Area of Interest: Toggle the option to highlight the Areas of Interest (enabled or disabled).
CHoCH Line: Choose the line style for the CHoCH (Solid, Dashed, or Dotted).
Width: Adjust the width of the CHoCH line.
🔹 Retracement Levels
Choose which Fibonacci retracement levels to display (e.g., 0, 0.236, 0.382, etc.).
🔹 Swing Levels & Engulfing Patterns
Swing Levels: Select how swing levels are marked (symbols like ◉, △▽, or H/L).
Engulfing Candle Patterns: Choose which engulfing candle patterns to detect (All, Structure-Based, or Disabled).
🔶 RELATED SCRIPTS
Pure-Price-Action-Structures.
Psychological Levels- Rounding Numbers Psychological Levels Indicator
Overview:
The Psychological Levels Indicator automatically identifies and plots significant price levels based on psychological thresholds, which are key areas where market participants often focus their attention. These levels act as potential support or resistance zones due to human behavioral tendencies to round off numbers. This indicator dynamically adjusts the levels based on the stock's price range and ensures seamless visibility across the chart.
Key Features:
Dynamic Step Sizes:
The indicator adjusts the levels dynamically based on the stock price:
For prices below 500: Levels are spaced at 10.
For prices between 500 and 3000: Levels are spaced at 50, 100, and 1000.
For prices between 3000 and 10,000: Levels are spaced at 100 and 1000.
For prices above 10,000: Levels are spaced at 500 and 1000.
Extended Visibility:
The plotted levels are extended across the entire chart for improved visualization, ensuring traders can easily monitor these critical zones over time.
Customization Options:
Line Color: Choose the color for the levels to suit your charting style.
Line Style: Select from solid, dashed, or dotted lines.
Line Width: Adjust the thickness of the lines for better clarity.
Clean and Efficient Design:
The indicator only plots levels relevant to the visible chart range, avoiding unnecessary clutter and ensuring a clean workspace.
How It Works:
It calculates the relevant step sizes based on the price:
Smaller step sizes for lower-priced stocks.
Larger step sizes for higher-priced stocks.
Primary, secondary, and (if applicable) tertiary levels are plotted dynamically:
Primary Levels: The most granular levels based on the stock price.
Secondary Levels: Higher-order levels for broader significance.
Tertiary Levels: Additional levels for lower-priced stocks to enhance detail.
These levels are plotted across the chart, allowing traders to visualize key psychological areas effortlessly.
Use Cases:
Day Trading: Identify potential intraday support and resistance levels.
Swing Trading: Recognize key price zones where trends may pause or reverse.
Long-Term Investing: Gain insights into significant price zones for entry or exit strategies.
Multi Ticker Price TableTable showing the current price of up to 7 tickers
- Tickers are user choice
- Table background is customizable
- User has the choice to turn the Daily % column off
[blackcat] L1 Institutional Golden Bottom Indicator█ OVERVIEW
The script " L1 Institutional Golden Bottom Indicator" is an indicator designed to identify potential institutional buying interest or a "golden bottom" in the market. It calculates a series of values based on price movements and plots them on a chart to help traders make informed decisions.
█ LOGICAL FRAMEWORK
The script is structured into several main sections:
1 — Function Definitions: Custom functions xsa and calculate_institutional_golden_bottom are defined.
2 — Input Parameters: The user can set a threshold value for institutional interest.
3 — Calculations: The script calculates various indicators and conditions, including the institutional buy signal.
4 — Plotting: The results of the calculations are plotted on the chart.
5 — Labeling: When a golden bottom is detected, a label is placed on the chart.
The flow of data starts with the input parameters, proceeds through the calculation functions, and finally results in plotted outputs and labels.
█ CUSTOM FUNCTIONS
1 — xsa(src, len, wei)
• Purpose: To calculate a weighted moving average.
• Parameters:
– src: Source data (e.g., price).
– len: Length of the moving average.
– wei: Weighting factor.
• Return Value: The calculated weighted moving average.
2 — calculate_institutional_golden_bottom(close, high, low, threshold)
• Purpose: To determine the institutional golden bottom indicator.
• Parameters:
– close: Closing price.
– high: Highest price.
– low: Lowest price.
– threshold: User-defined threshold for institutional interest. By tuning the threshold value the user can properly identify the institutional golden bottom of the instrument. So, I can say this parameter is used to tune the "sensitivity" of this indicator.
• Return Value: An array containing the institutional indicator, golden bottom signal, and additional values (a1, b1, c1, d1).
█ KEY POINTS AND TECHNIQUES
• Weighted Moving Average (WMA): The xsa function implements a weighted moving average, which is useful for smoothing price data.
• Crossover Detection: The script uses a crossover condition to detect when the institutional indicator crosses above the threshold, indicating a potential buying opportunity.
• Conditional Logic: The script includes conditional statements to control the output of certain values only when specific conditions are met.
• Plotting and Labeling: The script uses plot and label.new functions to visualize the indicator and highlight significant events on the chart.
█ EXTENDED KNOWLEDGE AND APPLICATIONS
• Modifications: The script could be enhanced by adding more customizable parameters, such as different lengths for the moving averages or additional conditions for the golden bottom signal.
• Extensions: Similar techniques could be applied to other types of indicators, such as momentum oscillators or trend-following systems to identify market turning points.
• Related Concepts: Understanding weighted moving averages, crossover signals, and conditional plotting in Pine Script would be beneficial for enhancing this script and applying similar logic to other trading strategies.
MA Multi-Timeframe [ChartPrime]The MA Multi-Timeframe indicator is designed to provide multi-timeframe moving averages (MAs) for better trend analysis across different periods. This tool allows traders to monitor up to four different MAs on a single chart, each coming from a selectable timeframe and type (SMA, EMA, SMMA, WMA, VWMA). The indicator helps traders gauge both short-term and long-term price trends, allowing for a clearer understanding of market dynamics.
⯁ KEY FEATURES AND HOW TO USE
⯌ Multi-Timeframe Moving Averages :
The indicator allows traders to select up to four MAs, each from different timeframes. These timeframes can be set in the input settings (e.g., Daily, Weekly, Monthly), and each moving average can be displayed with its corresponding timeframe label directly on the chart.
Example of different timeframes for MAs:
⯌ Moving Average Types :
Users can choose from several types of moving averages, including SMA, EMA, SMMA, WMA, and VWMA, making the indicator adaptable to different strategies and market conditions. This flexibility allows traders to tailor the MAs to their preference.
Example of different types of MAs:
⯌ Dashboard Display :
The indicator includes a built-in dashboard that shows each MA, its timeframe, and whether the price is currently above or below that MA. This dashboard provides a quick overview of the trend across different timeframes, allowing traders to determine whether the overall trend is up or down.
Example of trend overview via the dashboard:
⯌ Polyline Representation :
Each MA is plotted using polylines to avoid plot functions and create a curves across up to 4000 bars back, ensuring that historical data is visualized clearly for a deeper analysis of how the price interacts with these levels over time.
if barstate.islast
for i = 0 to 4000
cp.push(chart.point.from_index(bar_index , ma ))
polyline.delete(polyline.new(cp, curved = false, line_color = color, line_style = style) )
Example of polylines for moving averages:
⯌ Customization Options :
Traders can customize the length of the MAs for all timeframes using a single input. The color, style (solid, dashed, dotted) of each moving average are also customizable, giving users full control over the visual appearance of the indicator on their chart.
Example of custom MA styles:
⯁ USER INPUTS
MA Type : Select the type of moving average for each timeframe (SMA, EMA, SMMA, WMA, VWMA).
Timeframe : Choose the timeframe for each moving average (e.g., Daily, Weekly, Monthly).
MA Length : Set the length for the moving averages, which will be applied to all four MAs.
Line Style : Customize the style of each MA line (solid, dashed, or dotted).
Colors : Set the color for each MA for better visual distinction.
⯁ CONCLUSION
The MA Multi-Timeframe indicator is a versatile and powerful tool for traders looking to monitor price trends across multiple timeframes with different types of moving averages. The dashboard simplifies trend identification, while the customizable options make it easy to adapt to individual trading strategies. Whether you're analyzing short-term price movements or long-term trends, this indicator offers a comprehensive solution for tracking market direction.
DonAlt - Smart Money Toolkit [BigBeluga]DonAlt - Smart Money Toolkit is inspired by the analytical insights of popular crypto influencer DonAlt.
This advanced toolkit integrates smart money concepts with key technical analysis elements to enhance your trading decisions.
🔵 KEY FEATURES:
SUPPORT AND RESISTANCE LEVELS Automatically identifies critical market turning points with significant volume. Levels turn green when the price is above them and red when below, providing a visual cue for key market thresholds.
ORDER BLOCKS: Highlights significant price zones preceding major price movements.
- If the move is down , it searches for the last bullish candle and plots a block from its body.
- If the move is up , it searches for the last bearish candle and creates a block from its body.
These blocks help identify areas of institutional interest and potential reversals.
TRENDLINES: Automatically plots trendlines to identify breakout zones or price accumulation areas.
• Bullish trendlines accumulation form when the current low is higher than the previous low.
• Bearish trendlines accumulation emerge when the current high is lower than the previous high.
• Bullish trendlines Breakout form when the price break above it.
• Bearish trendlines Breakout form when the price break below it.
Volatility Integration: The levels incorporate normalized volatility to ensure only significant zones are highlighted, filtering noise and emphasizing meaningful data.
🔵 WHEN TO USE:
This toolkit is ideal for traders seeking to align with "smart money" strategies by identifying key areas of institutional activity, strong support and resistance zones, and potential breakout setups.
🔵 CUSTOMIZATION:
Toggle the visibility of levels, order blocks, or trendlines to match your trading style and focus.
Colors of the Bull and Bear key features
Extend trendline
Period Separator & Candle OHLCThis script combines two powerful tools for traders: period separators and custom timeframe-based OHLC (Open, High, Low, Close) data visualization. Here's what it does:
Period Separators:
The script draws vertical lines to indicate the start of new time periods based on a user-defined timeframe (e.g., hourly, daily, weekly).
Users can customize the separator color, line style (solid, dashed, dotted), and width to suit their preferences.
Fetches OHLC data from a higher or custom timeframe (e.g., 4 hours) and overlays it on the current chart.
Users can choose to display the open, high, low, and close prices as dots or circles for easy visualization.
Optionally, the open and close dots can be visually connected with a filled bar for a candlestick-like effect.
The script color-codes the close price relative to the open (green if higher, red if lower) to highlight price direction at a glance.
Fully Customizable:
Users have full control over which OHLC values to display and whether the dots should be filled.
Transparency settings for plotted dots and fills are also adjustable for optimal visibility on different chart styles.
How It Is Useful for Trading:
Timeframe Analysis:
The period separators make it easy to distinguish trading activity across custom time intervals. This is crucial for intraday, swing, and long-term traders who analyze price movements within specific periods.
Multi-Timeframe Insights:
By overlaying OHLC data from a higher timeframe on a lower timeframe chart, traders can identify key support and resistance levels, pivots, and trends that are not immediately visible on the current timeframe.
Trend Recognition:
The color-coded close dots (green for bullish, red for bearish) provide an instant visual cue of market sentiment, helping traders confirm or refute their bias.
Whether you're a scalper, day trader, or position trader, the flexibility in timeframe selection, styling, and data presentation ensures this tool can adapt to your trading strategy.
Donchian Trend Ribbon (Gradient)Donchian Trend Ribbon (Gradient) Indicator
The Donchian Trend Ribbon (Gradient) uses Donchian Channels to visualize trend direction, strength, and market phases. Columns with varying colors and intensity help traders quickly assess trends.
Key Components:
Green Columns (Bullish):
Appear when price is above the upper Donchian Channel boundary.
Bright green in the top zone (25-50): Strong bullish trend.
Darker green in the lower zone (0-25): Weak/moderate bullish trend.
A full-height bright green column indicates a very strong upward move.
Red Columns (Bearish):
Appear when price is below the lower Donchian Channel boundary.
Bright red in the top zone (25-50): Strong bearish trend.
Darker red in the lower zone (0-25): Weak/moderate bearish trend.
A full-height bright red column indicates a very strong downward move.
Black Columns (Neutral):
Indicate no trend or market consolidation.
Signal to wait for trend emergence.
Expanding Steps:
Steps expanding downward from the upper edge (50) suggest diminishing momentum.
Steps expanding upward from the lower edge (0) indicate growing trend strength.
Methods of Use:
Identify Trends: Green (buy) or red (sell) columns in the top zone (25-50) signal strong trends.
Assess Strength: Bright colors = strong trends, darker colors = weaker trends. Full-height bright columns indicate very strong moves.
Neutral Phases: Black columns suggest waiting for a trend.
Example Strategy:
Buy when green columns appear in the 25-50 range with bright intensity.
Sell when red columns appear in the 25-50 range with bright intensity.
Exit positions if columns turn black or darker-colored.
Auto-Support v 0.3The "Auto-Support v 0.3" indicator is designed to automatically detect and plot multiple levels of support and resistance on a chart. It aims to help traders identify key price levels where the market tends to reverse or consolidate. Here’s a breakdown of its functionality and goals:
Objective:
The primary objective of the Auto-Support v 0.3 indicator is to provide traders with a clear, visual representation of support and resistance levels. These levels are determined based on a predefined sensitivity parameter, which adjusts how tightly or loosely the indicator reacts to recent price movements. The indicator can be applied to any chart to assist in identifying potential entry and exit points for trades, enhancing technical analysis by displaying these important price zones.
Description:
Support and Resistance Calculation:
The indicator calculates multiple levels of support and resistance using the highest and lowest prices over a defined period. The "sensitivity" parameter, which ranges from 1 to 10, determines how sensitive the calculation is to recent price changes. A higher value increases the number of bars used to calculate these levels, making the levels more stable but less responsive to short-term price movements.
Visual Representation:
The support levels are drawn in green with a customizable transparency setting, while resistance levels are displayed in red with similar transparency controls. This visual representation helps traders identify these levels on the chart and see the strength or weakness of the support/resistance zones depending on the transparency setting.
Multiple Levels:
The indicator plots 10 distinct levels of support and resistance (from 1 to 10), which can offer a more granular view of price action. Traders can use these levels to assess potential breakout or breakdown points.
Customization:
Sensitivity: The sensitivity input allows traders to adjust how aggressively the indicator reacts to recent price data. This ensures flexibility, enabling the indicator to be tailored to different trading styles and market conditions.
Transparency: The transparency input adjusts the visual opacity of the support and resistance lines, making it easier to overlay the indicator without obscuring other chart elements.
Key Goals:
Dynamic Support/Resistance Identification: Automatically detect and display relevant support and resistance levels based on price history, removing the need for manual chart analysis.
Customizable Sensitivity: Offer a flexible method to adjust how the indicator identifies key levels, allowing it to fit different market conditions.
Clear Visualization: Provide easy-to-read support and resistance levels with customizable colors and transparencies, enhancing visual clarity and decision-making.
Multiple Levels: Display up to 10 levels of support and resistance, allowing traders to consider both short-term and longer-term price action when making trading decisions.
By using this indicator, traders can more effectively identify key price zones where price may reverse, consolidate, or break out, providing a solid foundation for developing trading strategies.
Logarithmic Regression AlternativeLogarithmic regression is typically used to model situations where growth or decay accelerates rapidly at first and then slows over time. Bitcoin is a good example.
𝑦 = 𝑎 + 𝑏 * ln(𝑥)
With this logarithmic regression (log reg) formula 𝑦 (price) is calculated with constants 𝑎 and 𝑏, where 𝑥 is the bar_index .
Instead of using the sum of log x/y values, together with the dot product of log x/y and the sum of the square of log x-values, to calculate a and b, I wanted to see if it was possible to calculate a and b differently.
In this script, the log reg is calculated with several different assumed a & b values, after which the log reg level is compared to each Swing. The log reg, where all swings on average are closest to the level, produces the final 𝑎 & 𝑏 values used to display the levels.
🔶 USAGE
The script shows the calculated logarithmic regression value from historical swings, provided there are enough swings, the price pattern fits the log reg model, and previous swings are close to the calculated Top/Bottom levels.
When the price approaches one of the calculated Top or Bottom levels, these levels could act as potential cycle Top or Bottom.
Since the logarithmic regression depends on swing values, each new value will change the calculation. A well-fitted model could not fit anymore in the future.
Swings are based on Weekly bars. A Top Swing, for example, with Swing setting 30, is the highest value in 60 weeks. Thirty bars at the left and right of the Swing will be lower than the Top Swing. This means that a confirmation is triggered 30 weeks after the Swing. The period will be automatically multiplied by 7 on the daily chart, where 30 becomes 210 bars.
Please note that the goal of this script is not to show swings rapidly; it is meant to show the potential next cycle's Top/Bottom levels.
🔹 Multiple Levels
The script includes the option to display 3 Top/Bottom levels, which uses different values for the swing calculations.
Top: 'high', 'maximum open/close' or 'close'
Bottom: 'low', 'minimum open/close' or 'close'
These levels can be adjusted up/down with a percentage.
Lastly, an "Average" is included for each set, which will only be visible when "AVG" is enabled, together with both Top and Bottom levels.
🔹 Notes
Users have to check the validity of swings; the above example only uses 1 Top Swing for its calculations, making the Top level unreliable.
Here, 1 of the Bottom Swings is pretty far from the bottom level, changing the swing settings can give a more reliable bottom level where all swings are close to that level.
Note the display was set at "Logarithmic", it can just as well be shown as "Regular"
In the example below, the price evolution does not fit the logarithmic regression model, where growth should accelerate rapidly at first and then slows over time.
Please note that this script can only be used on a daily timeframe or higher; using it at a lower timeframe will show a warning. Also, it doesn't work with bar-replay.
🔶 DETAILS
The code gathers data from historical swings. At the last bar, all swings are calculated with different a and b values. The a and b values which results in the smallest difference between all swings and Top/Bottom levels become the final a and b values.
The ranges of a and b are between -20.000 to +20.000, which means a and b will have the values -20.000, -19.999, -19.998, -19.997, -19.996, ... -> +20.000.
As you can imagine, the number of calculations is enormous. Therefore, the calculation is split into parts, first very roughly and then very fine.
The first calculations are done between -20 and +20 (-20, -19, -18, ...), resulting in, for example, 4.
The next set of calculations is performed only around the previous result, in this case between 3 (4-1) and 5 (4+1), resulting in, for example, 3.9. The next set goes even more in detail, for example, between 3.8 (3.9-0.1) and 4.0 (3.9 + 0.1), and so on.
1) -20 -> +20 , then loop with step 1 (result (example): 4 )
2) 4 - 1 -> 4 +1 , then loop with step 0.1 (result (example): 3.9 )
3) 3.9 - 0.1 -> 3.9 +0.1 , then loop with step 0.01 (result (example): 3.93 )
4) 3.93 - 0.01 -> 3.93 +0.01, then loop with step 0.001 (result (example): 3.928)
This ensures complicated calculations with less effort.
These calculations are done at the last bar, where the levels are displayed, which means you can see different results when a new swing is found.
Also, note that this indicator has been developed for a daily (or higher) timeframe chart.
🔶 SETTINGS
Three sets
High/Low
• color setting
• Swing Length settings for 'High' & 'Low'
• % adjustment for 'High' & 'Low'
• AVG: shows average (when both 'High' and 'Low' are enabled)
Max/Min (maximum open/close, minimum open/close)
• color setting
• Swing Length settings for 'Max' & 'Min'
• % adjustment for 'Max' & 'Min'
• AVG: shows average (when both 'Max' and 'Min' are enabled)
Close H/Close L (close Top/Bottom level)
• color setting
• Swing Length settings for 'Close H' & 'Close L'
• % adjustment for 'Close H' & 'Close L'
• AVG: shows average (when both 'Close H' and 'Close L' are enabled)
Show Dashboard, including Top/Bottom levels of the desired source and calculated a and b values.
Show Swings + Dot size
Session High/Low Average & Range [1CG]The Session High/Low Average & Range indicator independently measures the average price movement from the opening price in each direction. It also displays the maximum high and low distance, called Range. Separating the averages and range into highs and lows helps analyze the volatility of the market as well as the direction.
USE EXAMPLES
Session Open
Session Close
Customization
Minimal - 1x and 2x Averages are replaced with custom lines, in order to show distance to3x.
Calculations
Average High: (high price of session - session opening price) / (session period)
Average Low: (session opening price - low price of session) / (session period)
Range High: The highest price of the last (session period)
Range Low: The lowest price of the last (session period)
INPUTS
Session
Here you can choose the hours for your session and time zone. The default is London session in New York time. Next, the session period determines how many sessions to sample from for the average and range lines, the default is 20. Lastly, you can choose the number of sessions to appear on the chart not including the current session if you are in one, 5 by default.
Lines
All of the lines allow you to change the color, width, and style. They also have a label option to choose to display the price. The bottom of the section allows you to change the location and size of the label text.
**Open Line** -Displays the opening price for the length of the session.
**Average Lines** - Displays the 1x, 2x, and 3x the average distance from open in each direction. Additionally, you can toggle a background color to highlight the area.
**Custom Lines** - Displays a customizable multiple of either the average or range. By default the first custom line displays the Range at a 1x multiplier and the second line displays an Average at a 1.5x multiplier
Display Distance
Here you can choose to display the distance from the lines to the open. This data is marked with a “Δ”. For the three Average lines this will display in the area between the line and the open in the position and size of your choice. The custom lines will have the distance information displayed on the line itself. This helps keep the data organized.
Top-Down Trend and Key Levels with Swing Points//by antaryaami0
Overview
The “Top-Down Trend and Key Levels with Swing Points” indicator is a comprehensive tool designed to enhance your technical analysis by integrating multiple trading concepts into a single, easy-to-use script. It combines higher timeframe trend analysis, key price levels, swing point detection, and ranging market identification to provide a holistic view of market conditions. This indicator is particularly useful for traders who employ multi-timeframe analysis, support and resistance levels, and price action strategies.
Key Features
1. Higher Timeframe Trend Background Shading:
• Purpose: Identifies the prevailing trend on a higher timeframe to align lower timeframe trading decisions with the broader market direction.
• How it Works: The indicator compares the current higher timeframe close with the previous one to determine if the trend is up, down, or ranging.
• Customization:
• Trend Timeframe: Set your preferred higher timeframe (e.g., Daily, Weekly).
• Up Trend Color & Down Trend Color: Customize the background colors for uptrends and downtrends.
• Ranging Market Color: A separate color to indicate when the market is moving sideways.
2. Key Price Levels:
• Previous Day High (PDH) and Low (PDL):
• Purpose: Identifies key support and resistance levels from the previous trading day.
• Visualization: Plots horizontal lines at PDH and PDL with labels.
• Customization: Option to show or hide these levels and customize their colors.
• Pre-Market High (PMH) and Low (PML):
• Purpose: Highlights the price range during the pre-market session, which can indicate potential breakout levels.
• Visualization: Plots horizontal lines at PMH and PML with labels.
• Customization: Option to show or hide these levels and customize their colors.
3. First 5-Minute Marker (F5H/F5L):
• Purpose: Marks the high or low of the first 5 minutes after the market opens, which is significant for intraday momentum.
• How it Works:
• If the first 5-minute high is above the Pre-Market High (PMH), an “F5H” label is placed at the first 5-minute high.
• If the first 5-minute high is below the PMH, an “F5L” label is placed at the first 5-minute low.
• Visualization: Labels are placed at the 9:35 AM candle (closing of the first 5 minutes), colored in purple by default.
• Customization: Option to show or hide the marker and adjust the marker color.
4. Swing Points Detection:
• Purpose: Identifies significant pivot points in price action to help recognize trends and reversals.
• How it Works: Uses left and right bars to detect pivot highs and lows, then determines if they are Higher Highs (HH), Lower Highs (LH), Higher Lows (HL), or Lower Lows (LL).
• Visualization: Plots small markers (circles) with labels (HH, LH, HL, LL) at the corresponding swing points.
• Customization: Adjust the number of left and right bars for pivot detection and the size of the markers.
5. Ranging Market Detection:
• Purpose: Identifies periods when the market is consolidating (moving sideways) within a defined price range.
• How it Works: Calculates the highest high and lowest low over a specified period and determines if the price range is within a set percentage threshold.
• Visualization: Draws a gray box around the price action during the ranging period and labels the high and low prices at the end of the range.
• Customization: Adjust the range detection period and threshold, as well as the box color.
6. Trend Coloring on Chart:
• Purpose: Provides a visual cue for the short-term trend based on a moving average.
• How it Works: Colors the candles green if the price is above the moving average and red if below.
• Customization: Set the moving average length and customize the uptrend and downtrend colors.
How to Use the Indicator
1. Adding the Indicator to Your Chart:
• Copy the Pine Script code provided and paste it into the Pine Script Editor on TradingView.
• Click “Add to Chart” to apply the indicator.
2. Configuring Inputs and Settings:
• Access Inputs:
• Click on the gear icon next to the indicator’s name on your chart to open the settings.
• Customize Key Levels:
• Show Pre-Market High/Low: Toggle on/off.
• Show Previous Day High/Low: Toggle on/off.
• Show First 5-Minute Marker: Toggle on/off.
• Set Trend Parameters:
• Trend Timeframe for Background: Choose the higher timeframe for trend analysis.
• Moving Average Length for Bar Color: Set the period for the moving average used in bar coloring.
• Adjust Ranging Market Detection:
• Range Detection Period: Specify the number of bars to consider for range detection.
• Range Threshold (%): Set the maximum percentage range for the market to be considered ranging.
• Customize Visuals:
• Colors: Adjust colors for trends, levels, markers, and ranging market boxes.
• Label Font Size: Choose the size of labels displayed on the chart.
• Level Line Width: Set the thickness of the lines for key levels.
3. Interpreting the Indicator:
• Background Shading:
• Green Shade: Higher timeframe is in an uptrend.
• Red Shade: Higher timeframe is in a downtrend.
• Gray Box: Market is ranging (sideways movement).
• Key Levels and Markers:
• PDH and PDL Lines: Represent resistance and support from the previous day.
• PMH and PML Lines: Indicate potential breakout levels based on pre-market activity.
• F5H/F5L Labels: Early indication of intraday momentum after market open.
• Swing Point Markers:
• HH (Higher High): Suggests bullish momentum.
• LH (Lower High): May indicate a potential bearish reversal.
• HL (Higher Low): Supports bullish continuation.
• LL (Lower Low): Indicates bearish momentum.
• Ranging Market Box:
• Gray Box Around Price Action: Highlights consolidation periods where breakouts may occur.
• Range High and Low Labels: Provide the upper and lower bounds of the consolidation zone.
4. Applying the Indicator to Your Trading Strategy:
• Trend Alignment:
• Use the higher timeframe trend shading to align your trades with the broader market direction.
• Key Levels Trading:
• Watch for price reactions at PDH, PDL, PMH, and PML for potential entry and exit points.
• Swing Points Analysis:
• Identify trend continuations or reversals by observing the sequence of HH, HL, LH, and LL.
• Ranging Market Strategies:
• During ranging periods, consider range-bound trading strategies or prepare for breakout trades when the price exits the range.
• Intraday Momentum:
• Use the F5H/F5L marker to gauge early market sentiment and potential intraday trends.
Practical Tips
• Adjust Settings to Your Trading Style:
• Tailor the indicator’s inputs to match your preferred timeframes and trading instruments.
• Combine with Other Indicators:
• Use in conjunction with volume indicators, oscillators, or other technical tools for additional confirmation.
• Backtesting:
• Apply the indicator to historical data to observe how it performs and refine your settings accordingly.
• Stay Updated on Market Conditions:
• Be aware of news events or economic releases that may impact market behavior and the effectiveness of technical levels.
Customization Options
• Time Zone Adjustment:
• The script uses “America/New_York” time zone by default. Adjust the timezone variable in the script if your chart operates in a different time zone.
var timezone = "Your/Timezone"
• Session Times:
• Modify the Regular Trading Session and Pre-Market Session times in the indicator settings to align with the trading hours of different markets or exchanges.
• Visual Preferences:
• Colors: Personalize the indicator’s colors to suit your visual preferences or to enhance visibility.
• Label Sizes: Adjust label sizes if you find them too intrusive or not prominent enough.
• Marker Sizes: Further reduce or enlarge the swing point markers by modifying the swing_marker_size variable.
Understanding the Indicator’s Logic
1. Higher Timeframe Trend Analysis:
• The indicator retrieves the closing prices of a higher timeframe using the request.security() function.
• It compares the current higher timeframe close with the previous one to determine the trend direction.
2. Key Level Calculation:
• Previous Day High/Low: Calculated by tracking the highest and lowest prices of the previous trading day.
• Pre-Market High/Low: Calculated by monitoring price action during the pre-market session.
3. First 5-Minute Marker Logic:
• At 9:35 AM (end of the first 5 minutes after market open), the indicator evaluates whether the first 5-minute high is above or below the PMH.
• It then places the appropriate label (F5H or F5L) on the chart.
4. Swing Points Detection:
• The script uses ta.pivothigh() and ta.pivotlow() functions to detect pivot points.
• It then determines the type of swing point based on comparisons with previous swings.
5. Ranging Market Detection:
• The indicator looks back over a specified number of bars to find the highest high and lowest low.
• It calculates the percentage difference between these two points.
• If the difference is below the set threshold, the market is considered to be ranging, and a box is drawn around the price action.
Limitations and Considerations
• Indicator Limitations:
• Maximum Boxes and Labels: Due to Pine Script limitations, there is a maximum number of boxes and labels that can be displayed simultaneously.
• Performance Impact: Adding multiple visual elements (boxes, labels, markers) can affect the performance of the script on lower-end devices or with large amounts of data.
• Market Conditions:
• False Signals: Like any technical tool, the indicator may produce false signals, especially during volatile or erratic market conditions.
• Not a Standalone Solution: This indicator should be used as part of a comprehensive trading strategy, including risk management and other forms of analysis.
Conclusion
The “Top-Down Trend and Key Levels with Swing Points” indicator is a versatile tool that integrates essential aspects of technical analysis into one script. By providing insights into higher timeframe trends, highlighting key price levels, detecting swing points, and identifying ranging markets, it equips traders with valuable information to make more informed trading decisions. Whether you are a day trader looking for intraday opportunities or a swing trader aiming to align with the broader trend, this indicator can enhance your chart analysis and trading strategy.
Disclaimer
Trading involves significant risk, and it’s important to understand that past performance is not indicative of future results. This indicator is a tool to assist in analysis and should not be solely relied upon for making trading decisions. Always conduct thorough research and consider seeking advice from financial professionals before engaging in trading activities.
Daily High/Low Levels with mitigationThis Pine Script script defines a TradingView indicator named "Daily High/Low Levels" designed to track and display the daily high and low levels of a trading session, with added functionality for marking levels as mitigated when certain conditions are met. Here's a breakdown of its functionality:
Key Features
Session Start Time: The script allows you to specify a custom session start time in 24-hour format. This ensures the levels align with your trading session preferences.
Daily Highs and Lows:
Tracks the high and low levels for each session.
Retains the highs and lows for a configurable number of previous days.
Visualization:
Creates horizontal lines for each session's high and low levels.
Supports customization of line colors and styles.
Mitigation Tracking:
Monitors whether a high or low level has been "mitigated" (touched or exceeded by subsequent price action).
Changes the line style and color to indicate mitigation.
Provides an alert when mitigation occurs.
Configurable Extensions:
Lines can be extended beyond mitigation or stopped at the bar index where mitigation occurs, depending on user preference.
Efficient Array Management:
Uses arrays to manage daily highs, lows, their respective indices, and lines.
Ensures the size of stored data does not exceed the configured limit (daysToTrack).
Alerts:
Sends alerts when high or low levels are mitigated, which can be used for trading decisions.
Inputs
Session Start Hour/Minute: Defines when a new session starts.
Days to Track: Sets the number of previous days to display high/low levels.
Colors: Allows customization of line colors for unmitigated and mitigated levels.
Extend Lines: Toggles whether lines should extend past the mitigation point.
Code Highlights
New Session Detection: The script detects the start of a new session based on the configured session start time and resets daily highs/lows.
Line Management: Horizontal rays are created for highs and lows, and mitigated lines are updated with a dashed style and faded color.
Mitigation Logic: The script checks whether current price action exceeds stored high or low levels and updates their status and appearance accordingly.
Memory Management: Ensures the size of the arrays (highs, lows, lines) does not exceed the configured daysToTrack, deleting the oldest elements as necessary.
This indicator is highly customizable and useful for traders who want to track and analyze daily support and resistance levels, incorporating mitigation as a dynamic feature.
Fibonacci Snap Tool [TradersPro]
OVERVIEW
The Fibonacci Snap tool automatically snaps to the swing high and swing low of the price data shown on the chart display. Fibonacci retracement levels can be used for entry, exit, or as a confirmation of trend continuation.
If the swing high on the chart comes before the swing low, the price is in a downtrend.If the swing high comes after the swing low, the price is in an uptrend.
We call the 23.60% Fibonacci level the momentum zone of the trend. Price in a solid trend, either up or down, will typically hold the 23.60% Fibonacci level as support (demand) in an uptrend or resistance (supply) in a downtrend.
Deeper Fibonacci levels of 38.20%, 50.00%, and 61.80% are corrective supply/demand zones. As price moves against the found trend, it can move into this range block we call the corrective zone.
Fibonacci retracement levels are used to identify potential supply/demand areas where price could reverse or consolidate. These levels are based on key ratios derived from the Fibonacci sequence, and we only use the core 23.60%, 38.20%, 50.00%, and 61.80% ratios.
CONCEPTS
Price action moves in trend cycles, these retracement levels help traders measure proportional relationships between the high/low swings in the price trend.
When a price trend is moving against the trend, traders can find opportunities to trade with the current trend at key Fibonacci levels. Fibonacci levels can be used to anticipate where price might find supply/demand imbalance and continue moving in the trend direction.
Traders apply the indicator by selecting a window of price they want to analyze in the chart display, and the Fibonacci Snap tool will snap to the high and low of the visible price display.
The Intent and Use of This Tool
The 23.60% level acts as a momentum or continuation of trend. The 38.20% to 61.80% range are corrective zones of the trend.
The 61.80% level, also known as the golden ratio (Google the term “Golden Ratio”; it's fun), can often represent the location of supply/demand imbalance.
In an uptrend, it can represent the area of no more selling supply, and the balance can shift to buying demand. In a downtrend, it can represent the area of no more buying demand and the balance can shift to selling supply.
When used with the Momentum Zones indicator, these two tools create a powerful combination for traders to find, implement, and manage trades.