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.
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.
Pairs trading[Maxxxz7]Pairs Trading
This script is designed to analyze and visualize the divergence or convergence of two selected financial instruments, making it an excellent tool for implementing a pairs trading strategy. Developed for the TradingView platform, it offers extensive customization options for analysis.
Key Features:
Asset Selection:
The first asset can be taken directly from the chart or specified manually.
The second asset is always selected manually.
Data Normalization:
Calculates the percentage change of both assets relative to their initial prices.
Includes an offset for better visual interpretation.
Visualization:
Plots normalized price charts for both assets.
Highlights crossovers between the assets.
Displays the spread (difference between normalized prices) graphically.
Alerts (Works only on the 30-minute timeframe):
Configurable thresholds to trigger alerts (e.g., when the difference is smaller or larger than a set value).
Alerts for crossovers of prices and exponential moving averages (EMA).
Dynamic Labels:
Automatically adds labels to mark key events: crossovers, critical spread values, and current price information.
EMA and Deviation Analysis:
Calculates EMA for each asset.
Alerts for EMA crossovers.
100s Level LinesPurpose of the Script
- Visualize Key Levels: The script highlights round-number levels (e.g., 100, 200, 300) automatically, making it easy to identify areas where price action might react.
- Improve Decision-Making: These levels can serve as benchmarks for entry, exit, stop-loss, or take-profit placement.
- Simplicity: Instead of manually drawing levels, the script dynamically updates to match the chart's price range.
Features of the Script
- Dynamic Level Calculation: The script calculates 100s levels based on the asset's current price range and plots lines above and below the visible chart area.
- Customizable Settings: Adjust line color, style (solid, dashed, or dotted), and width to suit your charting preferences.
- Auto-Scaling: Automatically adjusts to the chart's visible price range, ensuring plotted levels are always relevant.
- Labeling: Each line can optionally display its exact value (e.g., "1400," "1500") for easy reference.
- Performance Optimization: Efficient calculations ensure the script doesn’t slow down TradingView, even on volatile instruments like the US100.
How the Script Works
- The script detects the highest and lowest visible prices on the chart to define the range.
- Starting from the lowest 100-point increment within the visible range, the script calculates all 100-point levels up to the highest visible price.
- It plots horizontal lines across the chart for each calculated level.
- Optionally, labels can be added to display the value of each level.
How to Use the Script
- Copy the script code into the Pine Script editor in TradingView and apply it to your chart.
- Open the script settings to adjust line color, style, width, and label visibility.
- Use the plotted 100s levels as psychological support and resistance zones for trade entries, exits, and stop-loss or take-profit placement.
Example Use Cases
- Identify potential reversal points as the price approaches a 100s level in intraday trading.
- Confirm support or resistance zones on higher timeframes for swing trading setups.
- Use the levels to trail stop-losses during trending markets and lock in profits incrementally.
Customizable Options
- Line Color: Change the color of the horizontal lines.
- Line Style: Choose solid, dashed, or dotted lines.
- Line Width: Adjust the thickness of the lines for better visibility.
- Show Labels: Toggle price values on or off for each level.
Advantages
- Saves Time: Automatically plots levels, eliminating manual effort.
- Adaptable: Works on all timeframes and assets.
- Psychological Relevance: Highlights levels that align with trader psychology and market behavior.
Fractal Trail [UAlgo]The Fractal Trail is designed to identify and utilize Williams fractals as dynamic trailing stops. This tool serves traders by marking key fractal points on the chart and leveraging them to create adaptive stop-loss trails, enhancing risk management and trade decision-making.
Williams fractals are pivotal in identifying potential reversals and critical support/resistance levels. By plotting fractals dynamically and providing configurable options, this indicator allows for personalized adjustments based on the trader's strategy.
This script integrates both visual fractal markers and adjustable trailing stops, offering insights into market trends while catering to a wide variety of trading styles and timeframes.
🔶 Key Features
Williams Fractals Identification: The indicator marks Williams Fractals on the chart, which are significant highs and lows within a specified range. These fractals are crucial for identifying potential reversal points in the market.
Dynamic Trailing Stops: The indicator generates dynamic trailing stops based on the identified fractals. These stops adjust automatically as new fractals are formed, providing a responsive and adaptive approach to risk management.
Fractal Range: Users can specify the number of bars to the left and right for analyzing fractals, allowing for flexibility in identifying significant price points.
Trail Buffer Percentage: A percentage-based safety margin can be added between the fractal price and the trailing stop, providing additional control over risk management.
Trail Invalidation Source: Users can choose whether the trailing stop flips based on candle closing prices or the extreme points (high/low) of the candles.
Alerts and Notifications: The indicator provides alerts for when the price crosses the trailing stops, as well as when new Williams Fractals are confirmed. These alerts can be customized to fit the trader's notification preferences.
🔶 Interpreting the Indicator
Fractal Markers: The triangles above and below the bars indicate Williams Fractals. These markers help traders identify potential reversal points in the market.
Trailing Stops: The dynamic trailing stops are plotted as lines on the chart. These lines adjust based on the latest identified fractals, providing a visual representation of potential support and resistance levels.
Fill Colors: The optional fill colors between the trailing stops and the price action help traders quickly identify the current trend and potential pullback zones.
🔶 Disclaimer
Use with Caution: This indicator is provided for educational and informational purposes only and should not be considered as financial advice. Users should exercise caution and perform their own analysis before making trading decisions based on the indicator's signals.
Not Financial Advice: The information provided by this indicator does not constitute financial advice, and the creator (UAlgo) shall not be held responsible for any trading losses incurred as a result of using this indicator.
Backtesting Recommended: Traders are encouraged to backtest the indicator thoroughly on historical data before using it in live trading to assess its performance and suitability for their trading strategies.
Risk Management: Trading involves inherent risks, and users should implement proper risk management strategies, including but not limited to stop-loss orders and position sizing, to mitigate potential losses.
No Guarantees: The accuracy and reliability of the indicator's signals cannot be guaranteed, as they are based on historical price data and past performance may not be indicative of future results.
Detrended Price Oscillator [NexusSignals]Detrended Price Oscillator (DPO) is a detrended price oscillator, used in technical analysis, strips out price trends in an effort to estimate the length of price cycles from peak to peak or trough to trough.
DPO is not a momentum indicator, instead highlights peaks and troughs in price, which are used to estimate buy and sell points in line with the historical cycle. (cf. to investopedia)
DPO indicator made by NexusSignals components :
a filled area that allow users to see easy the trend of an asset;
a sma moving average on chart (default length is 20)
a 20 sma on oscillator, both ma's are color coded to show uptrend / downtrend
a donchian channel applied to the dpo to show breakouts, breakdowns and resistances/support, reversals
few alerts for price crossing above ma, cross above the 0 dpo line, and for cross above and below the donchian channels top and bottom
How you can use DPO indicator ?
The detrended price oscillator (DPO) can be used for measuring the distance between peaks and troughs in the indicator that may help traders to make future decisions as they can locate the most recent trough and determine when the next one may occur in the meassured distance on oscillator between peaks and troughs.
You can use the indicator to find the potential price reversals, for example when the price of an asset is in a bearish trend and the dpo is bouncing from the donchian channel bottom, that may be a potential swing low for that asset, same thing in a bullish trend when the dpo rejecting at top of donchian channel may be a trend reversal, a pullback or swing high.
When DPO is above the 0 trend is in an uptrend and when dpo is below the zero the asset is possible to move into a downtrend.
Also crosses of DPO above and below the DPO moving average may signalising a trend change.
Automatic Fibonacci Levels with EMAAutomatic Fibonacci Levels with EMA
Description:
This script automatically calculates and displays Fibonacci retracement levels based on the highest and lowest prices over a dynamic lookback period. The Fibonacci levels are recalculated on every bar to adapt to price changes, providing an ongoing analysis of key support and resistance areas.
The Fibonacci levels are dynamically colored to reflect the trend direction, determined by the position of the price relative to the Exponential Moving Average (EMA). When the market is in an uptrend (price above EMA), Fibonacci levels are displayed in green, and in a downtrend (price below EMA), they are shown in red. This color coding helps traders quickly identify the current market direction.
Key Features:
Dynamic Fibonacci Levels: Automatically adjusts Fibonacci retracement levels based on recent price action, recalculated with each new bar.
EMA Trend Confirmation: The trend is confirmed by the position of the price relative to the 20-period EMA. Fibonacci levels are color-coded to reflect this trend.
Customizable Lookback Period: Adjust the base lookback period (default 50) and scale it according to your preferred timeframe for more or less sensitivity to recent price action.
Flexible Fibonacci Duration: The Fibonacci levels remain on the chart for a customizable duration (default 2 bars), allowing for visual clarity while adapting to new price action.
Timeframe Scaling: The script automatically adjusts the lookback period based on a scaling factor, making it suitable for different timeframes.
How to Use:
Use the Fibonacci levels to identify potential support and resistance zones based on the market's current price range.
Combine the trend color coding with your own strategy to enhance decision-making, whether for long or short entries.
Adjust the Lookback Period and Fibonacci Duration based on your trading style and timeframe preferences.
This script provides an automatic and customizable way to visualize Fibonacci retracements in a dynamic manner, helping traders make informed decisions based on trend direction and key price levels.
Note: As with any trading tool, always use proper risk management and test the script before using it in live trading.