Pivot Point Profile [LuxAlgo]The Pivot Point Profile indicator groups and displays data accumulated from previous pivot points, providing a comprehensive method for prioritizing and displaying areas of interest directly given by swing highs and lows.
Users have access to common settings present in other profile-type indicators.
🔶 USAGE
The Pivot Point Profile is particularly helpful in identifying highly active reversal zones that have been visited multiple times by price. Because of this, we could generally expect these areas to serve as future points of interest, often acting as support or resistance when re-visited.
The profile displays data associated with both Pivot Highs and Pivot Lows. Each row consists of pivot high and pivot low counts side-by-side, forming the total width of the row.
By analyzing the row as a whole, we can gain a better understanding of WHERE to look for interactions.
By analyzing the pivot counts independently, we can gain a better understanding of WHAT to expect when returning to these areas.
For example:
If a row in the profile contains entirely Pivot Lows, this could be seen as an indication to look for buyers to hold that level for a continuation upwards. A break of this level could be interpreted as a lack of interest from previous buyers at this level, indicating a further move down.
🔹 Concentrated Areas
Each row in the profile displays the current count of high pivots and low pivots within the selected lookback. The largest count for each pivot direction is identified as a "Concentrated Area (CA)", these CAs are highlighted over the chart with a line displaying the average of all pivots within that CA. The CA Average is the average of all pivot points (in the majority direction) within the given row.
These can hold more importance as potential support/resistance areas.
Note: The CA Threshold can be manually adjusted to highlight all rows based on a user-selected value.
🔶 DETAILS
🔹 Calculation
The idea behind the Pivot Point Profile is a new analysis method for pivot points, taking the idea of a volume profile and adapting it to display pivot points instead of volume. By using this data, in theory, we should be able to better prioritize zones to anticipate reversals, as well as identify key levels to watch for buyer & seller interactions to use as confirmations in direction.
The (vertical) width of each row is the product of the script's "Row Size", this is the number of rows that the profile will consist of. With a max of 250, the profile can be decently granular. That being said, A more granular profile will have fewer overlapping pivot points. By decreasing the row size (Using fewer rows in the profile) you will increase the tolerance for grouping pivot points. Potentially leading to a more comprehensive Profile. Inversely, By reducing the tolerance for grouping, you will better visualize only similar highs and lows but may have noisier data to sift through.
The Profile is calculated based on a "Lookback" parameter, using only the lookback amount of previous high and low pivots to calculate the profile. Configuring this parameter alongside "Pivot Length", will allow for great control over the frame of reference of the profile.
Note: This indicator is capable of utilizing the full chart history of pivot points, this can be done by enabling the "Use Full Chart History" setting, this will cause the script will calculate from everything it has access to on your current chart.
🔹 Display
The Pivot Point Profile display can be customized to fit a various range of chart styles and visual needs. The specific settings to adjust these can be located in the "Profile Display" Section of the User Inputs.
Profile Width: Sets the Left to Right Width of the Profile. This is the maximum width that the profile will occupy and will scale to fit within this width.
Profile Offset: Sets the distance of the Profile's Axis from the current chart candle. This moves the entire profile left and right to enable to user to set the distance between the profile and the current candle.
Direction: Changes the display direction of the profile, allowing for "Left", "Right", or "Center" display styles.
🔶 SETTINGS
🔹 Pivot Point Parameters
Pivot Type: Choose between "Fractal Pivots" or "SMC Structure" to use as the basis for pivots.
Length: Sets the length for the pivot calculations.
🔹 Profile Calculations Parameters
Lookback: Sets the number of pivots to calculate within, in increments of high and low pairs. (Setting this to 1 = 1 Pivot High & 1 Pivot Low)
Use Full Chart History: Disregards the set lookback and instead uses all available chart data to calculate from.
Row Size: Sets the total number of rows to calculate the profile with.
🔹 Profile Display
Profile Width: Sets the max left & right width (in bars) that the profile will occupy.
Profile Offset: Sets the distance of the profile axis from the last chart bar.
Direction: Sets the display direction
🔹 Concentrated Areas
Highlight CAs: Extends the rows left from concentrated areas.
CA Threshold: Manually set the threshold for determining concentrated areas, when disabled, only the largest rows will be displayed.
CA Averages: Toggles the concentrated area averages for each pivot direction.
Note: CA Averages can be displayed independently without CA Highlights being displayed, and vice versa.
トレンド分析
ATR Gerchik LightAverage True Range ( ATR ) is a technical analysis indicator that measures volatility in the market. ATR is a moving average of the true range over a period of time.
ATR calculation procedure:
1. Determine the true maximum - this is the highest of the current maximum and yesterday's closing price of the day.
2. Determine the true minimum - this is the smallest of the current minimum and yesterday's closing price.
3. Determine the true range - this is the distance between the true maximum and minimum.
4. We exclude extremely large candles (> x2 ATR) and extremely small ones (< 0.5 ATR) from the obtained true ranges.
5. We calculate the average for the selected period based on the remaining range.
6. We calculate the percentage of the current True Range relative to the average ATR value for the previous period.
Description:
If you analyze it yourself, you will see that 75-80% of the time, the instrument moves only 1 ATR per day. You must understand that if an instrument has, for example, moved 80% of its daily range, it is not advisable to purchase it. This is comparable to a car's fuel tank: if the tank is almost empty, the car won't go far. Most indicators that calculate ATR include anomalous candles, which give unreliable results and lead to incorrect decisions. Because of this, many traders prefer to calculate ATR on their own.
However, the Gerchik ATR indicator accounts for anomalous candles and filters out extremely large candles (> 2x ATR) and extremely small ones (< 0.5x ATR). Additionally, this indicator immediately shows the consumed “fuel” of the instrument as a percentage, so you don't have to calculate the distance traveled yourself. This allows you to make quick, informed decisions. If we see that the tank is almost empty, it is logical not to get into that car today. When building any strategy, you must rely on the average movement.
Key Features:
Anomalous Candle Filtering: Excludes extremely large and small candles to provide more reliable ATR values.
Consumed Fuel Indicator: Shows the percentage of the ATR consumed, helping traders quickly assess the remaining potential movement.
Daily Timeframe Focus: Designed specifically for use on daily charts for accurate long-term analysis.
Practical Applications:
Entry and Exit Points: Use the ATR to determine optimal entry and exit points by assessing market volatility and potential price movement.
Stop-Loss Placement: Calculate stop-loss levels based on ATR to ensure they are placed at appropriate distances, accounting for current market volatility.
Trend Confirmation: Use the percentage of ATR consumed to confirm the strength of a trend and decide whether to enter or exit trades.
Examples of Use:
Trend Following: During strong trends, ATR helps identify periods of increased volatility, signaling potential breakouts or reversals.
Range Trading: In ranging markets, ATR can highlight periods of low volatility, indicating consolidation and potential breakout zones.
Note: The indicator is displayed and works only on the daily timeframe!
The indicator was created according to the instructions, description of the functionality, and strategy of Mr. Gerchik. Thank you so much, Chief!
________________________
Average True Range ( ATR , средний истинный диапазон) – это индикатор технического анализа, который измеряет волатильность на рынке. ATR представляет собой скользящее среднее истинного диапазона за определенный период времени.
Порядок расчета ATR:
1. Определяем истинный максимум – это наивысшее из текущего максимума и вчерашней цены закрытия дня.
2. Определяем истинный минимум – это наименьшее из текущего минимума и вчерашней цены закрытия.
3. Определяем истинный диапазон – это расстояние между истинным максимумом и минимумом.
4. Исключаем из полученных истинных диапазонов экстремально большие свечи (> x2 ATR) и экстремально маленькие (< 0.5 ATR).
5. Рассчитываем среднее за выбранный период исходя из оставшегося диапазона.
6 . Рассчитываем процент текущего истинного диапазона (True Range) относительно среднего значения ATR за предыдущий период.
Описание:
Если вы сами проанализируете, то увидите, что 75-80% времени инструмент ходит только 1 ATR. И вы должны понимать, что если инструмент внутри дня прошел, к примеру, 80% своего движения, то этот инструмент больше нельзя покупать. Это можно сравнить с баком машины: если бак почти пустой, машина далеко не уедет. Большинство индикаторов, которые рассчитывают ATR, производят расчет с паранормальными свечами. Это дает недостоверный результат и приводит к неверным решениям. Многие трейдеры из-за этого не используют готовые индикаторы и предпочитают считать ATR самостоятельно. Но индикатор ATR Gerchik учитывает паранормальные свечи и фильтрует экстремально большие свечи (> x2 ATR) и экстремально маленькие (< 0.5 ATR). Также этот индикатор сразу показывает израсходованный "бензин" инструмента в процентах. И вам не надо самостоятельно высчитывать пройденный путь. Вы можете быстро принимать правильные решения. Если мы видим, что бак почти пустой, логично не садиться в эту машину сегодня. Когда вы строите какую-то стратегию, вы должны обязательно полагаться на среднестатистическое движение.
Существует много стратегий, завязанных на ATR, которые учитывают волатильность инструмента, запас хода, точки разворота, места выставления стоп-лоссов (SL) и тейк-профитов (TP) и другие факторы. Я не буду останавливаться на них, так как каждый может найти описание этих стратегий и использовать их на свой выбор.
Индикатор отображается и работает только на дневном таймфрейме!
Индикатор создан по наставлениям, описанию функционала и стратегии господина Герчика. Огромное спасибо, Шеф!
Groupings [SS]Hey everyone,
Releasing this indicator called groupings.
If you watch/read my analyses on Tradingview, you will have heard me talk about groups. Groups is something I invented. What it is, is just taking the Euclidean Distance (ED) of the previous 5 candles in a specified period (i.e. daily timeframe, weekly, 1 minute, 5 minute, etc.) and rounding the ED up to a whole number.
I have had great success in this approach because the information provided is broad enough to give leniency in interpretation but narrow enough to hone in on potential moves and target prices.
This indicator is a simplified version of how I do groupings in other software, however it is no less powerful!
What do groups tell us?
A "group" takes into account the previous 5 candles, using the ED. This gives Pinescript a general idea of what the short term trend looks like mathematically. From there, Pinescript can look for other groups that looked similar to how this current trend looks. From there, it can offer us insights into what tends to happen in candles subsequent to this group. For example, the ATR range, the close range and whether it is bearish or bullish.
And that is precisely how this indicator operates, Pinescript will calculate the group of the previous 5 canndles in the timeframe period you are looking at. It will then lookback over the designated "train" length and identify previous groups, and what happened in those groups. It looks specifically at:
- What is that average High ATR associated with that group,
- What is the average Low ATR associated with that group,
- What is the average close range associated with that group,
- What is the sentiment associated with that group.
How to use the indicator?
In terms of use, the indicator is relatively simple to use. It will plot three lines, a red for the anticipated low range, a green for the anticipated high range and purple for the opening range (where the current candle opened at).
In addition, it will plot a dot for the anticipated close area. When the dot is green, it expects a bullish close. When the dot is red, it expects a bearish close.
The indicator is going to give you a heads up as to whether we are in a bullish group, what you can anticipate the high and low range to be and where you can anticipate the close.
Of course, its not always exact, as in the image above you can see it underestimated the high range and over-estimated the low range; however, we did close within the anticipate range.
The indicator is meant to help you with your bias. I will reference this indicator on the daily timeframe at open to see what the expectations are for the day.
However, you can use it on any timeframe you wish.
Other functions:
The indicator can plot the EMA 9, 21 and 5. These are the 3 indicators I like and I find them helpful for both intraday and swing trading. However, they can be toggled off if you do not wish to view them.
In addition, the EMAs will be green if the ticker is trending above the EMA 21 (which is a critical EMA for me to determine the immediate sentiment). If the ticker is below, they will turn red.
There is also the ability to adjust the train time. The default is 1,000 candles back, but I usually have it on 1500. If you have a lot of indicators and a lot going on, on your chart, you may find that 1500 is too much and it will lag/error. That’s okay, 500 candles is sufficient and will not put a lot of stress on Pinescript.
Concluding remarks
Its overall a fairly simple concept and indicator, but it has been a neat and helpful / insightful invention. I originally developed this using R and happy to have now brought it into Pinescript.
I hope you enjoy!
Safe trades everyone!
Frequency and Volume ProfileFREQUENCY & VOLUME PROFILE
⚪ OVERVIEW
The Frequency and Volume Profile indicator plots a frequency or volume profile based on the visible bars on the chart, providing insights into price levels with significant trading activity.
⚪ USAGE
● Market Structure Analysis:
Identify key price levels where significant trading activity occurred, which can act as support and resistance zones.
● Volume Analysis:
Use the volume mode to understand where the highest trading volumes have occurred, helping to confirm strong price levels.
● Trend Confirmation:
Analyze the distribution of trading activity to confirm or refute trends, mark important levels as support and resistance, aiding in making more informed trading decisions.
● Frequency Distribution:
In statistics, a frequency distribution is a list of the values that a variable takes in a sample. It is usually a list. Displayed as a histogram.
⚪ SETTINGS
Source: Select the price data to use for the profile calculation (default: hl2).
Move Profile: Set the number of bars to offset the profile from the current bar (default: 100).
Mode: Choose between "Frequency" and "Volume" for the profile calculation.
Profile Color: Customize the color of the profile lines.
Lookback Period: Uses 5000 bars for daily and higher timeframes, otherwise 10000 bars.
The Frequency Profile indicator is a powerful tool for visualizing price levels with significant trading activity, whether in terms of frequency or volume. Its dynamic calculation and customizable settings make it a versatile addition to any trading strategy.
Hourly Trading System (Zeiierman)█ Overview
The Hourly Trading System (Zeiierman) is designed to enhance your trading by highlighting critical price levels and trends on an hourly basis. This indicator plots the open prices of hourly and 4-hour candles, visualizes retests, displays average price lines, and overlays higher timeframe candlesticks. It is particularly beneficial for intraday traders seeking to capitalize on short-term price movements and volume patterns.
█ How It Works
This indicator works by plotting significant price levels and zones based on hourly and 4-hour candle opens. It also includes functionalities for identifying retests of these levels, calculating and displaying average prices, and showing high and low labels for each hour.
█ Timeframe
The Hourly Trading System is designed to be used on the 1-minute or 5-minute timeframe. This system is tailored for intraday trading, allowing traders to find optimal entries around hourly opening levels and providing an easy method to identify the hourly trend. It works effectively on any market.
█ How to Use
Trend Analysis
Quickly gauge where the current price stands relative to key hourly and 4-hour levels. The plotted lines and zones serve as potential support and resistance areas, helping traders identify crucial points for entry or exit.
Utilize the 1-hour average and higher timeframe candles to understand the overall market trend. Aligning intraday strategies with larger trends can enhance trading decisions.
Use the bar coloring to quickly gauge the 1-hour trend on a lower timeframe. The bar colors indicate whether the hourly trend is bullish (green) or bearish (red), helping traders make quicker decisions in alignment with the overall trend.
Retest Identification
Enable retest signals to see where the price retested the hourly open levels. These retest points often signal strong price reactions, offering opportunities for trades based on support/resistance flips.
One effective strategy to incorporate is looking for price flips when a new hour starts. This approach involves monitoring price action at the beginning of each hour. If the price breaks and retests the hourly open level with strong momentum, it could indicate a potential trend reversal or continuation. This strategy is effective in volatile markets where price movements are significant at the start of each new hour.
Liquidity Sweep Strategy
Another common and effective strategy is the liquidity sweep. This involves identifying key levels where liquidity is likely to accumulate, such as previous hour highs and lows, and observing how the price interacts with these price levels. When the price sweeps through these levels, triggering stop-loss orders or pending orders, it often results in a sharp price movement followed by a reversal. Traders can capitalize on these movements by entering trades in the direction of the reversal once the liquidity sweep has occurred.
Equal Highs and Lows Strategy
The Equal Highs and Lows strategy leverages the concept of identifying levels where the price forms multiple highs or lows at the same level over different hourly periods. These equal highs and lows often indicate strong support or resistance levels where liquidity is accumulated. When the price approaches these levels, it is likely to trigger stop-loss orders and lead to significant price movements. Traders can look for breakouts or reversals around these levels to enter trades with higher probability setups.
█ Settings
Zone Width: Specifies the width of the zone around the 1-Hour Open as a percentage. Adjust this to widen or narrow the zone.
Show Retests: Enables or disables the display of retest markers. Retest markers show where the price has retested the 1-Hour Open line.
Number of Retests: Sets the number of retests to display. Adjust this to see more or fewer retest markers.
Volume Filter: Enables or disables the volume filter for retests. Use this to highlight retests with significant volume.
Volume Filter Length: Sets the length of the volume filter, smoothing the volume data to reduce noise.
1-Hour Average Line: Enables or disables the 1-hour average price line. This line shows the average price over the past hour.
Hourly High & Low Labels: Enables or disables the display of hourly high and low labels, marking the highest and lowest prices within each hour.
Candlesticks: Enables or disables the display of candlesticks on the chart, providing a detailed view of price action.
Bar Color: Enables or disables bar coloring based on price direction, with up bars in green and down bars in red.
Timeframe: Sets the timeframe for higher timeframe candles. Adjust this to match the period you want to analyze.
Number of Candles: Sets the number of higher timeframe candles to display. Increase this to see more candles on the chart.
Location: Sets the location for higher timeframe candles, allowing you to position them left or right on the chart.
-----------------
Disclaimer
The information contained in my Scripts/Indicators/Ideas/Algos/Systems does not constitute financial advice or a solicitation to buy or sell any securities of any type. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
My Scripts/Indicators/Ideas/Algos/Systems are only for educational purposes!
Ripster MTF CloudsDescription:
MTF EMA Cloud By Ripster
EMA Cloud System is a Trading System Invented by Ripster where areas are shaded between two desired EMAs. The concept implies the EMA cloud area serves as support or resistance for Intraday & Swing Trading. This can be utilized effectively on 10 Min for day trading and 1Hr/Daily for Swings. Ripster himself utilizes various combinations of the 5-12, 34-50, 8-9, 20-21 EMA clouds but the possibilities are endless to find what works best for you.
“Ideally, 5-12 or 5-13 EMA cloud acts as a fluid trendline for day trades. 8-9 EMA Clouds can be used as pullback Levels –(optional). Additionally, a high level price over or under 34-50 EMA clouds confirms either bullish or bearish bias on the price action for any timeframe” – Ripster
This indicator is an extension of the Ripster EMA Clouds. It allows you to visualize Exponential Moving Average (EMA) clouds from any time frame on your current chart, regardless of the chart's own time frame. This functionality is especially useful for traders who want to monitor higher time frame trends and support/resistance levels while trading on lower time frames.
What does this code do?
The Ripster MTF Clouds indicator displays two sets of EMA clouds. Each set consists of a short EMA and a long EMA. By default, the indicator uses Daily 20/21 and 50/55 EMAs, but you can customize these settings to fit your trading strategy. The EMAs are plotted on your chart along with their corresponding clouds, colored for easy differentiation:
EMA 1 (default 50/55): Plotted in blue.
EMA 2 (default 20/21): Plotted in teal.
The indicator uses the security function to fetch EMA values from higher time frames and plots them on your current chart, allowing you to see how these higher time frame EMAs interact with your current time frame's price action.
How to use this indicator:
Adjust Resolution:
Set the "Resolution" input to the time frame from which you want to fetch EMA values. For example, set it to "1H" if you want to see 1-hour EMAs on your current chart.
Customize EMAs:
Modify the "EMA 1 Short Length" and "EMA 1 Long Length" inputs to change the default 50/55 EMAs.
Adjust the "EMA 2 Short Length" and "EMA 2 Long Length" inputs to change the default 20/21 EMAs.
Monitor Clouds:
The indicator fills the area between the short and long EMAs, creating a cloud that helps visualize the trend. A blue cloud indicates the area between the EMA 1 pair, while a teal cloud indicates the area between the EMA 2 pair.
Use Multiple Instances:
You can add multiple instances of this indicator to your chart to monitor multiple higher time frames simultaneously. For instance, one instance can show daily clouds while another shows hourly clouds.
Integration with Trading Strategy:
Use this indicator to identify higher time frame trends and support/resistance levels, which can help improve your trading decisions on lower time frames.
For example, you can go long when the stock is above the 50-55 EMA clouds and 20-21 EMA clouds with daily resolution on a 10-minute chart and short when it is below it.
Similarly, you can short a stock under the 1-hour 34/50 EMA clouds while still trading on a 10-minute chart.
ICT Single Candle Order Block (SCOB) [UAlgo]The "ICT Single Candle Order Block (SCOB) " designed for traders who utilize the concept of Order Blocks in their trading strategy. Order Blocks are significant price levels where institutions or smart money have placed their trades, leading to potential future price reactions when these levels are revisited. This indicator focuses on identifying and highlighting Single Candle Order Blocks (SCOBs), allowing traders to visually analyze key price levels on their charts.
🔶 What is Single Candle Order Block (SCOB) ?
A Single Candle Order Block (SCOB) is a specific type of Order Block that is identified based on a single candlestick pattern. These patterns indicate potential areas where significant buying or selling interest has occurred, often leading to a notable price reaction when revisited. In the context of this indicator, a bullish SCOB is identified when a specific bullish candlestick pattern is met, and a bearish SCOB is identified based on a bearish candlestick pattern.
Bullish SCOB: Detected when the open price of two bars ago is higher than its close, the close price of the previous bar is higher than its open, the current close price is higher than the open, the low of the previous bar is lower than the low of two bars ago, and the current close is higher than the high of the previous bar.
Bearish SCOB: Detected when the open price of two bars ago is lower than its close, the close price of the previous bar is lower than its open, the current close price is lower than the open, the high of the previous bar is higher than the high of two bars ago, and the current close is lower than the low of the previous bar.
🔶 Key Features
Show Single Candle Order Block (SCOB): Toggle the visibility of the Single Candle Order Blocks on the chart.
Mitigation Method: Choose between "Close" and "Wick" methods for determining whether a SCOB has been mitigated (price has interacted with the block).
Show Last X SCOBs: Control the number of most recent SCOBs displayed on the chart, allowing you to focus on the most relevant price levels.
Volatility Filter: Enable or disable the volatility filter, which uses the Average True Range (ATR) to filter out less significant SCOBs. When enabled, only SCOBs with an ATR above the mean value of the ATR are displayed.
Customizable Colors: Configure the colors for bullish and bearish SCOBs to enhance visual clarity. The indicator uses cooler RGB values to ensure the blocks are distinct and easily noticeable.
🔶 Disclaimer
The "ICT Single Candle Order Block (SCOB) " indicator is provided for educational and informational purposes only. Trading involves significant risk and may not be suitable for all investors.
Past performance is not indicative of future results. Users should use this indicator in conjunction with their own research and trading strategy.
Super IndicatorOverview of the Combined Indicator
This combined indicator leverages three major technical analysis tools:
Bollinger Bands
Linear Regression Channels
Scalping Strategy Indicators (RSI, MACD, SMA)
Each of these tools provides unique insights into market conditions, and their integration offers a comprehensive view of price movements, trends, and potential trading signals.
1. Bollinger Bands
Purpose:
Bollinger Bands are used to measure market volatility and identify overbought or oversold conditions.
Components:
Basis (Middle Band): Typically a 20-period Simple Moving Average (SMA).
Upper Band: Basis + (2 * Standard Deviation).
Lower Band: Basis - (2 * Standard Deviation).
Why They Complement:
Bollinger Bands expand and contract based on market volatility. When the bands are narrow, it indicates low volatility and potential for a significant move. Wide bands indicate high volatility. This helps traders gauge the strength of market moves and potential reversals.
2. Linear Regression Channels
Purpose:
Linear Regression Channels identify the overall trend direction and measure deviation from the mean price over a specific period.
Components:
Middle Line (Linear Regression Line): The line of best fit through the price data over a specified period.
Upper and Lower Lines: Channels created by adding/subtracting a multiple of the standard deviation or another deviation measure from the regression line.
Why They Complement:
Linear Regression Channels provide a clear visual representation of the trend direction and the range within which prices typically fluctuate. This can help traders identify trend continuations and reversals, making it easier to spot entry and exit points.
3. Scalping Strategy Indicators
Purpose:
The RSI, MACD, and SMA are used to generate short-term buy and sell signals, which are essential for scalping strategies aimed at capturing quick profits from small price movements.
Components:
RSI (Relative Strength Index): Measures the speed and change of price movements, typically over 14 periods. It helps identify overbought and oversold conditions.
MACD (Moving Average Convergence Divergence): Consists of the MACD line, Signal line, and histogram. It helps identify changes in the strength, direction, momentum, and duration of a trend.
SMA (Simple Moving Average): The average price over a specified period, used to smooth out price data and identify trends.
Why They Complement:
These indicators provide short-term signals that can confirm or refute the signals given by Bollinger Bands and Linear Regression Channels. For example, a buy signal might be more reliable if the price is near the lower Bollinger Band and the MACD crosses above its signal line.
How They Work Together
Scenario 1: Confirming Trend Continuations
Bollinger Bands: Price staying near the upper band suggests a strong uptrend.
Linear Regression Channels: Price staying above the middle line confirms the uptrend.
5-Minute Scalping Strategy: RSI not in overbought territory, and MACD showing bullish momentum confirms continuation.
Scenario 2: Identifying Reversals
Bollinger Bands: Price touching or moving outside the lower band suggests oversold conditions.
Linear Regression Channels: Price at the lower channel line indicates potential support.
5-Minute Scalping Strategy: RSI in oversold territory, and MACD showing a bullish crossover indicates a reversal.
Scenario 3: Volatility Breakouts
Bollinger Bands: Bands contracting indicates low volatility and potential breakout.
Linear Regression Channels: Price moving away from the middle line signals potential breakout direction.
Scalping Strategy: MACD and RSI confirming the breakout direction for entry.
Input Parameters:
Define settings for Bollinger Bands, Linear Regression Channels, and the scalping strategy.
Allow users to customize lengths, multipliers, and colors.
Bollinger Bands Calculation:
Calculate the basis (SMA) and standard deviation.
Derive the upper and lower bands from the basis and standard deviation.
Linear Regression Channel Calculation:
Compute the slope, average, and intercept of the linear regression line.
Calculate deviations to plot upper and lower channel lines.
5-Minute Scalping Strategy:
Calculate RSI, MACD, and SMA for short-term trend analysis.
Define buy and sell conditions based on these indicators.
Plotting and Alerts:
Plot Bollinger Bands and Linear Regression Channels on the chart.
Plot buy and sell signals with shapes.
Set alerts for key conditions like exiting the regression channel bounds and trend switches.
Conclusion
By combining Bollinger Bands, Linear Regression Channels, and a 5-minute scalping strategy, this indicator offers a robust tool for traders. Bollinger Bands provide volatility insights, Linear Regression Channels highlight trend direction and potential reversals, and the scalping strategy offers precise entry and exit points. Together, these tools can enhance a trader's ability to make informed decisions in various market conditions.
Market Structure & Session Alerts### Market Structure & Session Alerts Indicator
#### Overview
The "Market Structure & Session Alerts" indicator is a comprehensive tool designed to assist traders in identifying key market structure levels, detecting liquidity sweeps, and receiving alerts for specific trading sessions. This indicator is particularly useful for traders who want to keep an eye on previous high and low levels and be alerted during pre-London and pre-New York sessions.
#### Features
1. **Previous High/Low Levels:**
- **Daily, Weekly, and Monthly Highs and Lows:** The indicator plots the previous day, week, and month high and low levels on the chart. These levels can be crucial for identifying support and resistance zones.
- **Toggle Display:** Users can choose to show or hide these levels using the "Show Previous Day/Week/Month High/Low" option.
2. **Liquidity Sweep Detection:**
- **Liquidity Sweep Identification:** The indicator detects liquidity sweeps when the current price closes above the previous day's high. This can signal potential reversals or continuations in the market.
- **Visual Alerts:** When a liquidity sweep is detected, a green triangle is plotted below the bar.
3. **Session Alerts:**
- **Session Timings:** Users can set specific start and end times for the pre-London and pre-New York sessions to match their timezone.
- **Visual Background Highlight:** The background of the chart is highlighted in yellow during the defined session times to provide a visual cue.
- **Alert Messages:** The indicator can generate alerts to notify traders when the market enters the pre-London or pre-New York session.
4. **Current Price Line:**
- The current price is plotted as a black line, providing a clear visual reference for the current market price.
#### How to Use
1. **Input Parameters:**
- `Show Previous Day/Week/Month High/Low`: Enable or disable the display of previous high/low levels.
- `Show Liquidity Sweep`: Enable or disable the detection and display of liquidity sweeps.
- `Show Session Alerts`: Enable or disable session alerts and background highlights.
2. **Session Timing Adjustments:**
- Set the `Pre-London Start`, `Pre-London End`, `Pre-New York Start`, and `Pre-New York End` times according to your timezone to ensure accurate session alerts.
3. **Alerts:**
- Make sure alerts are enabled in your TradingView settings to receive notifications when the market enters the pre-London or pre-New York sessions.
#### Example Use Cases
- **Day Traders:** Identify potential support and resistance levels using the previous day's high and low.
- **Swing Traders:** Use weekly and monthly high and low levels to determine significant market structure points.
- **Scalpers:** Detect liquidity sweeps to identify potential quick trades.
- **Session Traders:** Be alerted when the market enters key trading sessions to align your trading strategy with major market activities.
This indicator combines multiple market analysis tools into one, providing a robust system for traders to enhance their trading decisions and market awareness.
Cumulative Volume Difference MapThe "Cumulative Volume Difference Map" is designed to help traders and market analysts understand volume trends over various timeframes. This script analyzes the difference between cumulative positive and negative volume to provide a trend outlook based on volume changes compared to previous bars, by calculating the cumulative positive and negative volume, then deriving a ratio that represents the difference between these volumes. By examining this ratio over different timeframes, the indicator helps identify whether the market sentiment is trending positively or negatively.
Key Features
Volume Analysis:
The script accumulates volume for periods where the closing price is higher or lower than the previous bar, providing a clear picture of buying versus selling pressure.
Trend Detection:
It evaluates the volume ratio over multiple look-back periods, allowing users to see how the trend develops over different timeframes. This multi-period analysis helps in identifying consistent trends and potential reversals.
Visual Representation:
The indicator plots trend signals on the chart, visually representing whether the volume trend is positive or negative over various historical periods.
How to Use
Trend Identification:
Use this indicator to identify periods of sustained buying or selling pressure. Positive trends indicate more cumulative buying volume, while negative trends suggest more cumulative selling volume.
Multi-Period Analysis:
Analyze the trend signals over different timeframes to understand both short-term and long-term volume trends. This can help in making informed trading decisions based on the overall market sentiment.
Chart Integration:
The plotted signals can be used alongside other technical indicators to confirm trends or spot divergences, enhancing your overall market analysis strategy.
Candlestick Structure [LuxAlgo]The Candlestick Structure indicator detects major market trends and displays various candlestick patterns aligning with the detected trend, filtering out potentially unwanted patterns as a result. Multiple trend detection methods are included and can be selected by the users.
A dashboard showing the alignment percentage of each individual pattern is also provided.
🔶 USAGE
By distinguishing major and minor trend detection, we can still detect patterns based on minor trends, yet filter out the patterns that do not align with the major trend.
By detecting candlestick patterns that align with a major trend, we can effectively detect the ending points of retracements, potentially providing various entry points of interest within a trend.
Users are able to track the alignment of each candlestick pattern in the dashboard to reveal which patterns typically align with the trend and which may not.
Note: Alignment % only checks if the pattern's direction is the same as the current trend direction. These are only raw readings and not any type of confidence score.
🔶 DETAILS
In this indicator, we are identifying and tracking 16 different Candlestick Patterns.
🔹 Bullish Patterns
Hammer: Identified by a small upper wick (or no upper wick) with a small body, and an elongated lower wick whose length is 2X greater than the candle body’s width.
Inverted Hammer: Identified by a small lower wick (or no lower wick) with a small body, and an elongated upper wick whose length is 2X greater than the candle body’s width.
Bullish Engulfing: A 2 bar pattern identified by a large bullish candle body fully encapsulating (opening lower and closing higher) the previous small (bearish) candle body.
Rising 3: A 5 bar pattern identified by an initial full-bodied bullish candle, followed by 3 bearish candles that trade within the high and low of the initial candle, followed by another full-bodied bullish candle closing above the high of the initial candle.
3 White Soldiers: Identified by 3 full-bodied bullish candles, each opening within the body and closing below the high, of the previous candle.
Morning Star: A 3 bar pattern identified by a full-bodied bearish candle, followed by a small-bodied bearish candle, followed by a full-bodied bullish candle that closes above the halfway point of the first candle.
Bullish Harami: A 2 bar pattern, identified by an initial bearish candle, followed by a small bullish candle whose range is entirely contained within the body of the initial candle.
Tweezer Bottom: A 2 bar pattern identified by an initial bearish candle, followed by a bullish candle, both having equal lows.
🔹 Bearish Patterns
Hanging Man: Identified by a small upper wick (or no upper wick) with a small body, and an elongated lower wick whose length is 2X greater than the candle body’s width.
Shooting Star: Identified by a small lower wick (or no lower wick) with a small body, and an elongated upper wick whose length is 2X greater than the candle body’s width.
Bearish Engulfing: A 2 bar pattern identified by a large bearish candle body fully encapsulating (opening higher and closing lower) the previous small (bullish) candle body.
Falling 3: A 5 bar pattern identified by an initial full-bodied bearish candle, followed by 3 bullish candles that trade within the high and low of the initial candle, followed by another full-bodied bearish candle closing below the low of the initial candle.
3 Black Crows: Identified by 3 full-bodied bearish candles, each open within the body and closing below the low, of the previous candle.
Evening Star: A 3 bar pattern identified by a full-bodied bullish candle, followed by a small-bodied bullish candle, followed by a full-bodied bearish candle that closes below the halfway point of the first candle.
Bearish Harami: A 2 bar pattern, identified by an initial bullish candle, followed by a small bearish candle whose range is entirely contained within the body of the initial candle.
Tweezer Top: A 2 bar pattern identified by an initial bullish candle, followed by a bearish candle, both having equal highs.
🔹 Trend Types
Major trend is displayed at all times, the display will change depending on the trend method selected.
The minor trend can also be visualized; to avoid confusion, the minor trend can optionally be displayed through the candle colors.
Supertrend: Displays Upper and Lower SuperTrend, When we break above the upper, it is considered an Uptrend. When we break below the lower, it is considered a Downtrend.
EMAs: Displays Fast and Slow EMAs, When Fast>Slow, it is considered an Uptrend. When Fast<Slow, it is considered a Downtrend.
ChoCh: Displays ChoCh Lines and Labels, When a Bullish ChoCh occurs, it is now considered as an Uptrend. When a Bearish ChoCh occurs, it is now considered a Downtrend.
Donchian Channel: Displays the Highest and Lowest Values, When we break above the Highest, it is considered an Uptrend. When we break below the Lowest, it is considered a Downtrend.
Below is an example of the Change of Character (ChoCh) method of trend detection.
Note: In this description, each screenshot has a different trend method in use, scroll through if you are looking for a specific one.
🔶 SETTINGS
Candlestick Patterns: Choose which candlestick patterns to include in calculations.
Minor Trend Length: Determines the Donchian Channel length to use for minor trend identification.
Major Trend Method: Determines which trend method to use for identifying Major Trend.
Major Trend Parameters: Various inputs for controlling Major trends, depending on the specific method you have selected.
Color Candles: Colors the chart candles based on minor trend.
Dashboard: Control display size and location of Alignment Dashboard.
Midpoint Line with Dynamic Bands, RSI Filter, and AlertsTitle: Midpoint Line with Dynamic Bands, RSI Filter, and Alerts
Description:
This Pine Script indicator provides a comprehensive analysis tool combining dynamic midpoint bands, RSI filtering, and alert conditions for overbought and oversold market states.
Features:
Dynamic Midpoint Bands:
Calculates the midpoint based on the highest high and lowest low over a user-defined lookback period.
Supports both percentage and fixed point offsets for the upper and lower bands.
Threshold Levels:
Defines overbought and oversold thresholds using a user-specified percentage.
RSI Filter:
Uses a 100-period RSI to filter market trends.
Plots candles in green if RSI > 50 and in red if RSI < 50.
Visual Overlays:
Fills the overbought area in red and the oversold area in green.
Plots green arrows below the bars when RSI > 50 and the price is in the oversold area.
Plots red arrows above the bars when RSI < 50 and the price is in the overbought area.
Alerts:
Generates alerts for potential long and short trading opportunities based on the defined conditions.
How to Use:
Customize the lookback period, percentage offset, fixed point offset, and threshold percentage as needed.
Use the RSI filter to identify the prevailing market trend.
Watch for visual signals (arrows) indicating potential buy or sell opportunities.
Set up alerts to receive notifications when long or short conditions are met.
This script provides traders with a robust tool for identifying key market conditions and making informed trading decisions. Customize the parameters to fit your trading strategy and use the visual cues and alerts to enhance your market analysis.
Intermarket Correlation TableThe Correlation Coefficient is used to measure the correlation between two sets of data. In the trading world, the Correlation Coefficient is a measure of the correlation between two data sets of financial instruments. The correlation between two financial instruments is the degree in which they are related. Correlation is based on a scale of 1 to -1. The closer the Correlation Coefficient is to 1, the higher their positive correlation. The instruments will move up and down together. The closer the Correlation coefficient is to -1, the more they move in opposite directions. A value at 0 indicates that there is no correlation.
This indicator uses the built in ta.correlation function to calculate the correlation coefficient between DXY and NQ, ES, YM, US10Y, and ZN respectively. It then presents the data in a customizable table that is view as an overlay on your chart.
Adjust the length of the correlation factor to calculate higher time frame correlation.
Asset background changes based on current candle direction.
Coefficient background color changes based on whether the assets are properly correlated.
DXY is inversely correlated to NQ, ES, YM, and ZN.
DXY is directly correlated to US10Y.
The colors are reflected as such.
Market Structures + ZigZag [TradingFinder] CHoCH/BOS - MSS/MSB🟣 Introduction
🔵 Market Structure
Grasping market structure entails examining market behavior. Essentially, market structure refers to the formation and progression of the market within its trends.
Market structures are generally fractal and nested, leading us to classify them into internal (minor) and external (major) structures. There are several definitions of market structure, with differing perspectives such as Smart Money and ICT offering their own interpretations.
🔵 Zig Zag
The Zigzag indicator is a lagging tool that identifies points on a price chart where significant changes occur compared to the previous wave. By connecting these points, it helps traders detect trends.
This indicator minimizes random price fluctuations, aiming to clarify the primary price trend.
Pivots are points on a price chart where the direction changes. Also known as reversal points, pivots form when supply and demand forces overpower one another.
There are various types of technical analysis pivots, which can be divided into two categories: minor pivots and major pivots, each with distinct significance in analysis.
Major Pivot : These pivots signify substantial changes in the chart's direction and occur at the end of trends. Analysts focusing on primary analysis prioritize major pivot points. In fact, most technical analysis tools are evaluated and based on major pivots.
Minor Pivot : These pivots highlight smaller, subsidiary points and directions, appearing at the end of corrections. Analysts who focus on minor pivots represent small trends. It's important to note that minor pivots are not suitable for use in primary technical tools.
Identifying Minor and Major Pivots :
Minor pivots are formed between two major pivots and do not break the opposing major pivot. (Internal Pivot)
Major pivots are those that either successfully break the opposing pivot or move beyond the previous pivot of the same type. (External Pivot)
🟣 How to Use
🔵 Identifying Break of Structure (BOS)
In a given trend, such as a downtrend, a Break of Structure occurs when the price drops below the previous low and forms a new low (LL). In an uptrend, a BOS (MSB) happens when the price rises and exceeds the last high.
To confirm a trend, at least one BOS is required. The break above or below the previous high or low must be validated by the closing of at least one candle beyond that level.
🔵 Identifying Change of Character (CHOCH)
Change of Character (CHOCH) is an essential concept in market structure analysis, indicating a trend change. In other words, a trend concludes with a CHOCH (MSS). For example, in a downtrend, the price declines with BOS.
While BOS highlights the trend's strength, a CHOCH occurs when the price rises and surpasses the last high, signaling a transition from a downtrend to an uptrend.
This does not imply immediately entering a buy trade; instead, it is prudent to wait for a BOS in the upward direction to confirm the uptrend.
Unlike BOS, confirming a CHOCH does not require a candle to close; simply breaking above or below the previous high or low with the candle's wick is sufficient. The following examples illustrate bearish and bullish CHOCH.
Terms :
Market Structure Shift = MSS
Market Structure Break = MSB
🔵 Zig Zag
Based on identifying pivots and drawing zigzag lines, you can have different uses of this indicator.
Including :
Identifying pivot types along with major and minor recognition.
Identifying internal and external breakouts.
Identifying support and resistance levels.
Identifying Elliott Waves.
Identifying classic patterns.
Identifying pivots with higher validity.
Identifying trends and range areas.
🟣 Settings
Pivot Period Market Structure and ZigZag Line: Using this input, you can determine the pivot period for identifying swings.
Through the settings, you can customize the display, visibility, and color of each line as desired.
Multi Asset Histogram [ChartPrime]Multi Asset Histogram Indicator
Overview:
The "Multi Asset Histogram" indicator provides a comprehensive visualization of the performance of multiple assets relative to each other. By calculating a score for each asset and displaying it in a histogram format, this indicator helps traders quickly identify the trends, dominant asset and the average performance of the assets in the selected group.
Key Features:
◆ Multi-Asset Score Calculation:
The indicator calculates a trend score for each selected asset based on the price source (e.g., hl2).
The trend score is determined by comparing the current price to the prices over the past bars back defined by user, adding or subtracting points based on whether the current price is higher or lower than previous prices.
// Score Function
trscore(src) =>
total = 0.0
for i = 1 to 50
total += (src >= nz(src ) ? 1 : -1)
total
◆ Flexible Symbol Input:
Traders can input up to 10 different symbols (e.g., BTCUSD, ETHUSD, etc.) to be included in the histogram analysis.
◆ Dynamic Visualization:
A histogram is plotted for each asset, with bars colored based on the score, providing a clear visual representation of the relative performance.
Color gradients from red to aqua indicate the performance, with red representing negative scores and aqua representing positive scores.
◆ Adaptive Histogram Lines:
The width and placement of histogram lines adapt based on the calculated scores, ensuring clear visualization regardless of the values.
Dashed lines represent the mean score of all assets, helping traders identify the overall market trend.
◆Detailed Labels and Values:
Labels are placed on the histogram to display the exact score for each asset.
Mean value and zero line labels provide additional context for the overall performance.
◆ Visual Scaling Lines:
Zero line and mean line are clearly marked, helping traders understand the distribution and scale of scores.
Scales on the left and right of the histogram indicate the performance range.
◆ Informative Table:
A table is displayed on the chart, showing the dominant asset (the one with the highest score) and the mean score of all assets.
The table updates dynamically to reflect real-time changes in asset performance.
◆ Settings:
Length: The value of number bars back is greater or less than the current value of the source
Source: The price source to be used for score calculation (e.g., hl2).
Symbols: Up to 10 different asset symbols can be input for analysis.
Usage Notes:
This indicator is useful for traders who monitor multiple assets simultaneously and need a quick visual reference to identify the strongest and weakest performers.
The color coding and dynamic labels make it easy to interpret the relative performance and make informed trading decisions.
This indicator is designed to enhance multi-asset analysis by providing a clear, visual representation of each asset's performance relative to the others, making it easier to identify trends and dominant assets in the market.
Power Hour Money StrategyDescription of the Pine Script Code: "Power Hour Money Strategy"
This Pine Script strategy, "Power Hour Money Strategy," is designed to trade based on the alignment of multiple time frames (month, week, day, and hour). The strategy aims to enter long or short positions depending on whether all selected time frames are in sync (all green for long positions, all red for short positions). Additionally, the script includes configurations for trading during specific sessions and automatically closing positions at the end of the trading day.
Core Features:
1. Time Frame Sync Check:
- The strategy evaluates whether the current price is higher than the opening price for the month, week, day, and hour to determine if each time frame is "green" (bullish) or "red" (bearish).
2. Session Control:
- The user can select between different trading sessions:
- "NY Session 9:30-11:30"
- "Extended NY Session 8-4"
- "All Sessions"
- Trades are only executed if the current time falls within the selected session.
3. Trailing Stop Mechanism:
- The strategy includes an optional trailing stop mechanism for both long and short positions.
- The trailing stop is configured with a percentage loss from the current price to protect gains.
4. End-of-Day Position Management:
- An option is provided to automatically close all positions at the end of the trading day (5:45 PM Eastern Time).
Detailed Code Breakdown:
1. Input Settings:
- **Session Selection**: Allows the user to choose the trading session.
- **End-of-Day Close**: Option to automatically close positions at the end of the day.
- **Trailing Stop Loss**: Enables or disables the trailing stop loss feature and sets the percentage for long and short positions.
2. Time Frame Calculations:
- The script uses `request.security` to get the opening prices for higher time frames (monthly, weekly, daily, and hourly).
- It compares the current close price to these opening prices to determine if each time frame is green or red.
3. Session Time Definitions:
- Defines the start and end times for the NY session (9:30-11:30 AM) and the extended session (8:00 AM - 4:00 PM).
4. Trade Execution:
- The strategy checks if all selected time frames are in sync and if the current time falls within the trading session.
- If all conditions are met, it enters a long or short position.
5. Trailing Stop Loss Implementation:
- Adjusts the stop price based on the trailing percentage and the current position's size.
- Automatically exits positions if the trailing stop condition is met.
6. End-of-Day Close Implementation:
- Uses a timestamp to check if the current time is 5:45 PM Eastern Time.
- Closes all positions if the end-of-day condition is met.
7. Plotting and Logging:
- Plots indicators to visualize the green/red status of each time frame.
- Logs information about the status of each time frame for debugging and analysis.
Example Usage:
Entering a Long Position: If the month, week, day, and hour are all green and the current time is within the selected session, a long position is entered.
Entering a Short Position: If the month, week, day, and hour are all red and the current time is within the selected session, a short position is entered.
Trailing Stop: Protects gains by exiting the position if the price moves against the set trailing stop percentage.
End-of-Day Close: Automatically closes all open positions at 5:45 PM Eastern Time if enabled.
This strategy is particularly useful for traders who want to ensure that multiple time frames are in alignment before entering a trade and who wish to manage positions effectively throughout the trading day with specific session controls and trailing stops.
Double FVG-BPR [QuantVue]The Double FVG BPR Indicator is a versatile tool that helps traders identify potential support and resistance levels through the concept of balanced price ranges.
A Balanced Price Range (BPR) is a zone on a price chart where the market has found equilibrium after a period of price imbalance.
It is identified by detecting a Fair Value Gap (FVG) in one direction, followed by an overlapping Fair Value Gap in the opposite direction.
Components of a Balanced Price Range
Fair Value Gap (FVG): A FVG occurs when there is a rapid price movement, creating a gap in the price chart where minimal trading occurs. This gap represents an imbalance between supply and demand.
Bullish FVG: A bullish FVG is identified when the low of a candle is higher than the high of a candle two periods ago, and the close of the previous candle is higher than the high of that same period.
Bearish FVG: A bearish FVG is identified when the high of a candle is lower than the low of a candle two periods ago, and the close of the previous candle is lower than the low of that same period.
Overlapping Fair Value Gap: For a BPR to be formed, an initial FVG must be followed by an overlapping FVG in the opposite direction. This creates a balanced zone where the price has moved up (or down) quickly and then moved down (or up) with similar intensity, suggesting a temporary equilibrium.
The area between the high and low points of these overlapping FVGs forms the BPR. This zone represents a temporary market equilibrium where supply and demand have balanced out after a period of significant price movement in both directions.
How to Use
Support and Resistance Levels: The upper and lower boundaries of the BPR act as dynamic support and resistance levels. Traders can use these levels to place buy and sell orders, anticipating that the price may find support or face resistance within these zones.
Trend Reversal and Continuation: The BPR can signal potential trend reversals or continuations.
If the price moves back into the BPR after a breakout, it may indicate a reversal. Conversely, if the price breaks out of the BPR with strong momentum, it may signal a trend continuation.
Moving Average CyclesMoving Average Cycles Indicator
Description:
The Moving Average Cycles indicator is a versatile tool designed to help traders identify and analyze bullish and bearish cycles based on price movements relative to a moving average. This indicator offers valuable insights into market trends and potential reversal points.
Key Features:
Customizable Moving Average: Users can adjust the MA period and resolution (Daily, Weekly, Monthly) to suit their trading style.
Cycle Identification: The indicator tracks bull and bear cycles, providing visual cues through color-coded histograms.
Comprehensive Metrics: A detailed table displays crucial cycle statistics, including:
Current cycle information (candles and % distance from MA)
Maximum and average cycle lengths (in candles)
Maximum and average percentage distances from the MA
How to Use:
Apply the indicator to your chart and adjust the MA period and resolution as needed.
Green histograms represent bullish cycles, while red histograms indicate bearish cycles.
Use the metrics table to gain insights into historical cycle behavior and current market positioning.
This indicator is designed to complement your existing trading strategy by providing a clear visual representation of market cycles and detailed statistical information. It can be particularly useful for identifying potential trend reversals and gauging the strength of current trends compared to the past.
Note: Past performance does not guarantee future results. This indicator is meant for informational purposes only and should not be considered as financial advice. Always combine multiple analysis tools and conduct your own research before making trading decisions.
This script is published as open-source under the Mozilla Public License 2.0. Feel free to use and modify it, but please provide appropriate credit if you build upon this work.
I hope you find this Moving Average Cycles indicator helpful in your trading journey. If you have any questions or suggestions for improvement, please feel free to leave a comment below.
Correlation Analysis Tool📈 What Does It Do?
Correlation Calculation: Measures the correlation between a selected asset (Asset 1) and up to four additional assets (Asset 2, Asset 3, Asset 4, Asset 5).
User Inputs: Allows you to define the primary asset and up to four comparison assets, as well as the period for correlation calculations.
Correlation Matrix: Displays a matrix of correlation coefficients as a text label on the chart.
🔍 How It Works
Inputs: Enter the symbols for Asset 1 (main asset) and up to four other assets for comparison.
Correlation Period: Specify the period over which the correlations are calculated.
Calculations: Computes log returns for each asset and calculates the correlation coefficients.
Display: Shows a textual correlation matrix at the top of the chart with percentage values.
⚙️ Features
Customizable Assets: Input symbols for one primary asset and up to four other assets.
Flexible Period: Choose the period for correlation calculation.
Correlation Coefficients: Outputs correlation values for all asset pairs.
Textual Correlation Matrix: Provides a correlation matrix with percentage values for quick reference.
🧩 How to Use
Add the Script: Apply the script to any asset’s chart.
Set Asset Symbols: Enter the symbols for Asset 1 and up to four other assets.
Adjust Correlation Period: Define the period for which correlations are calculated.
Review Results: Check the correlation matrix displayed on the chart for insights.
🚨 Limitations
Historical Data Dependency: Correlations are based on historical data and might not reflect future market conditions.
No Visual Plots Yet: This script does not include visual plots; it only provides a textual correlation matrix.
💡 Best Ways To Use
Sector Comparison: Compare assets within the same sector or industry for trend analysis.
Diversification Analysis: Use the correlations to understand how different assets might diversify or overlap in your portfolio.
Strategic Decision Making: Utilize correlation data for making informed investment decisions and portfolio adjustments.
📜 Disclaimer
This script is for educational and informational purposes only. Please conduct your own research and consult with a financial advisor before making investment decisions. The author is not responsible for any losses or damages resulting from the use of this script.
Symbols Correlation, built for pair tradingOverview:
This script is designed for pairs trading. If you are not familiar with pairs trading, I suggest learning about it, as it can be a profitable strategy in neutral markets (or neutral trends between two assets). The correlation between two assets is the foundation of pairs trading, and without it, the chances of making a profit are low.
Correlation can be described in two opposite ways:
1: Absolute positive correlation (meaning the asset prices move together).
-1: Absolute negative correlation (meaning the asset prices move in opposite directions).
Any value between 1 and -1 indicates some degree of correlation, but generally, values higher than 0.7 or lower than -0.7 are considered significant.
Features:
Typically, correlation is measured using the closing prices. This script adds three more correlation studies based on open, high, and low prices. By using all four lines, we can get a better understanding of the pair's correlation.
How to Read This Indicator:
To use this indicator effectively, you need to input your pair as a ratio. For example, if your pair is TSN and ZBH, enter it in the symbol search as: TSN/ZBH
Gray Area : This area indicates "no high correlation" (default is between -0.8 and 0.8, adjustable in the settings).
Gray Line : This represents the close correlation within the "no high correlation" range.
Green Line : This represents the close correlation within the "high correlation" range.
Dot Lines : These represent the open, high, and low correlations.
Example Interpretations:
A : All four lines are close together & the line is green – very good correlation!
B : The line is gray, and the dot lines are apart – not a strong correlation.
C : When the close correlation remains green for a long time, it signals a strong correlation.
Application in Pairs Trading:
In pairs trading, aim for the highest possible correlation, and it is important to have a sustained correlation over a long period. Pairs that correlate only part of the year but not consistently are less reliable for pairs trading.
This is an example for good correlation for pairs trading:
This is an example for bad correlation for pairs trading:
Here is a view of my full indicators when doing pairs trading:
Supports & Resistances [UAlgo]The "Supports & Resistances " indicator is designed to identify and visualize key support and resistance levels on the price chart. It utilizes the Average True Range (ATR) and Pivot Points to define the boundaries of S & R zones and considers historical price action to assess the strength of these zones.
🔶 How to Obtain Zones
The script continuously analyzes the price action and identifies potential support and resistance zones based on the following criteria:
Zone Creation: For swing highs, a zone is created with the high price at the zone length as the top and the top minus the Average True Range (ATR) as the bottom. Conversely, for swing lows, the zone is created with the low price at the zone length as the bottom and the low plus the ATR as the top.
Zone Strength Calculation: The script iterates through historical bars within the zone and counts how many times the price (low for support, high for resistance) touched but failed to break entirely through the zone. This count is assigned as the zone's "strength".
Zone Display and Removal: It identifying zones by assigning a "strength" value based on how many times the price has approached but failed to break the zone. This helps prioritize stronger potential support/resistance levels. Only zones exceeding the defined "strength threshold" are visually displayed on the chart. Weaker zones or those broken by price are automatically removed.
🔶 Parameters
Zone Length: Traders can adjust S & R detection sensitivity, length to be used to find pivot points.
Strength Threshold: Set the minimum number of times the price needs to touch but fail to break a zone for it to be considered "strong" and displayed.
Visual Settings: Tailor the appearance of the support/resistance zones by defining separate colors and text size for borders, backgrounds, and zone text.
🔶 Disclaimer
The "Supports & Resistances " indicator is provided for educational and informational purposes only.
It should not be considered as financial advice or a recommendation to buy or sell any financial instrument.
The use of this indicator involves inherent risks, and users should employ their own judgment and conduct their own research before making any trading decisions. Past performance is not indicative of future results.
🔷 Related Scripts
Support and Resistance with Signals
ATR Based Support and Resistance Zones
Zero Lag Exponential Moving Average ForLoop [InvestorUnknown]Overview
The Zero Lag Exponential Moving Average (ZLEMA) ForLoop indicator is designed for traders seeking a responsive and adaptive tool to identify trend changes. By leveraging a range of lengths and different moving average (MA) types, this indicator helps smooth out price data and provides timely signals for market entry and exit.
User Inputs
Start and End Lengths: Define the range of lengths over which the IIRF values are calculated.
Moving Average Type: Choose from EMA, SMA, WMA, VWMA, or TMA for trend smoothing.
Moving Average Length: Specify the length for the chosen MA type.
Calculation Source: Select the price data used for calculations.
Signal Calculation
Signal Mode (sigmode): Determines the type of signal generated by the indicator. Options are "Fast", "Slow", "Thresholds Crossing", and "Fast Threshold".
1. Slow: is a simple crossing of the midline (0).
2. Fast: positive signal depends if the current MA > MA or MA is above 0.99, negative signals comes if MA < MA or MA is below -0.99.
3. Thresholds Crossing: simple ta.crossover and ta.crossunder of the user defined threshold for Long and Short.
4. Fast Threshold: signal changes if the value of MA changes by more than user defined threshold against the current signal
col1 = MA > 0 ? colup : coldn
var color col2 = na
if MA > MA or MA > 0.99
col2 := colup
if MA < MA or MA < -0.99
col2 := coldn
var color col3 = na
if ta.crossover(MA,longth)
col3 := colup
if ta.crossunder(MA,shortth)
col3 := coldn
var color col4 = na
if (MA > MA + fastth)
col4 := colup
if (MA < MA - fastth)
col4 := coldn
color col = switch sigmode
"Slow" => col1
"Fast" => col2
"Thresholds Crossing" => col3
"Fast Threshold" => col4
Visualization Settings
Bull Color (colup): The color used to indicate bullish signals.
Bear Color (coldn): The color used to indicate bearish signals.
Color Bars (barcol): Option to color the bars based on the signal.
Custom function
// Function to calculate an array of ZLEMA values over a range of lengths
ZLEMAForLoop(a, b, c, s) =>
// Initialize an array to hold ZLEMA trend values
var Array = array.new_float(b - a + 1, 0.0)
// Loop through the range from 'a' to 'b'
for x = 0 to (b - a)
// Calculate the current length
len = a + x
// Calculate the lag based on the length
lag = math.floor((len - 1) / 2)
// Calculate the smoothing factor alpha
alpha = 2 / (len + 1)
// Initialize the ZLEMA variable
zlema = 0.0
// Compute the ZLEMA value
zlema := na(zlema ) ? (s + s - s ) : alpha * (s + s - s ) + (1 - alpha) * nz(zlema )
// Determine the trend based on ZLEMA value
trend = zlema > zlema ? 1 : -1
// Store the trend in the array
array.set(Array, x, trend)
// Calculate the average of the trend values
Avg = array.avg(Array)
// Apply the selected moving average type to the average trend value
float MA = switch maType
"EMA" => ta.ema(Avg, c) // Exponential Moving Average
"SMA" => ta.sma(Avg, c) // Simple Moving Average
"WMA" => ta.wma(Avg, c) // Weighted Moving Average
"VWMA" => ta.vwma(Avg, c) // Volume-Weighted Moving Average
"TMA" => ta.trima(Avg, c) // Triangular Moving Average
=>
runtime.error("No matching MA type found.") // Error handling for unsupported MA type
float(na)
// Return the array of trends, the average trend, and the moving average
Important Considerations
Speed vs. Stability: The ZLEMA ForLoop is designed for fast response times, making it ideal for short-term trading strategies. However, its sensitivity also means it may generate more signals, some of which could be false positives.
Use with Other Indicators: To improve the reliability of the signals, it is recommended to use the ZLEMA ForLoop in conjunction with other technical indicators.
Customization: Tailor the settings to match your trading style and risk tolerance. Adjusting the lengths, MA type, and thresholds can significantly impact the indicator's performance.
Conclusion
The ZLEMA ForLoop indicator offers a flexible tool for traders looking to capture trend changes quickly. By providing multiple modes and customization options, it allows traders to fine-tune their analysis and make informed decisions. For best results, use this indicator alongside other analytical tools to confirm signals and avoid potential false entries.
Infinite Impulse Response Filter ForLoop [InvestorUnknown]Overview
The Infinite Impulse Response Filter ForLoop indicator is designed for seeking quick and accurate trend identification. Leveraging the Infinite Impulse Response (IIR) filter technique, this indicator provides fast and responsive signals to aid in market timing and trend following.
User Inputs
Start and End Lengths: Define the range of lengths over which the IIRF values are calculated.
Moving Average Type: Choose from EMA, SMA, WMA, VWMA, or TMA for trend smoothing.
Moving Average Length: Specify the length for the chosen MA type.
Calculation Source: Select the price data used for calculations (default is close price).
Signal Calculation
Signal Mode (sigmode): Determines the type of signal generated by the indicator. Options are "Fast", "Slow", "Thresholds Crossing", and "Fast Threshold".
1. Slow: is a simple crossing of the midline (0).
2. Fast: positive signal depends if the current MA > MA or MA is above 0.99, negative signals comes if MA < MA or MA is below -0.99.
3. Thresholds Crossing: simple ta.crossover and ta.crossunder of the user defined threshold for Long and Short.
4. Fast Threshold: signal changes if the value of MA changes by more than user defined threshold against the current signal
col1 = MA > 0 ? colup : coldn
var color col2 = na
if MA > MA or MA > 0.99
col2 := colup
if MA < MA or MA < -0.99
col2 := coldn
var color col3 = na
if ta.crossover(MA,longth)
col3 := colup
if ta.crossunder(MA,shortth)
col3 := coldn
var color col4 = na
if (MA > MA + fastth)
col4 := colup
if (MA < MA - fastth)
col4 := coldn
color col = switch sigmode
"Slow" => col1
"Fast" => col2
"Thresholds Crossing" => col3
"Fast Threshold" => col4
Visualization Settings
Bull Color (colup): The color used to indicate bullish signals.
Bear Color (coldn): The color used to indicate bearish signals.
Color Bars (barcol): Option to color the bars based on the signal.
Custom function
// Function to calculate an array of IIRF values over a range of lengths
IIRFforLoop(a, b, c, s) =>
// Initialize an array to store IIRF values
var Array = array.new_float(b - a + 1, 0.0)
// Loop over the range from 'a' to 'b'
for x = 0 to (b - a)
// Calculate the length for the current iteration
len = a + x
// Calculate the IIRF alpha parameter
iirfAlpha = 2 / (len + 1)
// Calculate the lag for the IIRF calculation
iirfLag = math.round(1 / iirfAlpha - 1)
// Initialize the IIRF value
iirf = 0.0
// Update the IIRF value using the IIR filter formula
iirf := iirfAlpha * (s + ta.change(s, iirfLag)) + (1 - iirfAlpha) * nz(iirf )
// Determine the trend based on the current and previous IIRF values
trend = iirf > iirf ? 1 : -1
// Store the trend value in the array
array.set(Array, x, trend)
// Calculate the average of the IIRF values in the array
Avg = array.avg(Array)
// Calculate the moving average of the average IIRF values based on the selected MA type
float MA = switch maType
"EMA" => ta.ema(Avg, c) // Exponential Moving Average
"SMA" => ta.sma(Avg, c) // Simple Moving Average
"WMA" => ta.wma(Avg, c) // Weighted Moving Average
"VWMA" => ta.vwma(Avg, c) // Volume Weighted Moving Average
"TMA" => ta.trima(Avg, c) // Triangular Moving Average
=>
runtime.error("No matching MA type found.") // Error handling for invalid MA type
float(na)
// Return the array of IIRF values, their average, and the moving average
Important Considerations
Rapid Signal Response: The IIRF ForLoop is designed to provide very fast trend signals, making it suitable for short-term trading and quick decision-making.
Complementary Tool: While powerful, the IIRF ForLoop should be used in conjunction with other indicators and market analysis techniques to confirm signals and improve trading accuracy.
Conclusion
The Infinite Impulse Response Filter ForLoop indicator is a highly responsive and flexible tool that can significantly enhance your trading strategy. Its ability to quickly identify trends and generate signals based on various moving average types and customizable thresholds makes it invaluable for active traders. For the best results, use this indicator alongside other technical analysis tools to confirm signals and ensure robust trading decisions.