Divergence Indicator Multi [TradingFinder] MACD AO RSI DIV Chart🔵 Introduction
🟣 What is Divergence in Financial Markets?
Divergence in technical analysis happens when the price of a stock moves in a direction opposite to certain indicators. This is a crucial concept in financial markets as it can signal either a trend reversal or a continuation of the current correction in the trend. Understanding divergence helps traders and analysts make more informed decisions.
🟣 Positive Regular Divergence (RD+)
A positive regular divergence occurs at the end of a downtrend, where two price lows form. This divergence appears when the price chart shows a new low, but the indicator does not follow, signaling potential buying opportunities.
Positive divergence indicates increased buying pressure and reduced selling pressure, making it a useful signal for forecasting price increases.
🟣 Negative Regular Divergence (RD-)
A negative regular divergence is seen during an uptrend when two price highs form. The price chart records a new high, but the indicator does not reflect this change, suggesting that a market downturn is likely.
This type of divergence shows strong selling pressure and weaker buying activity, which can help identify selling opportunities.
Both positive and negative divergences are powerful tools for identifying potential trend reversals and key support and resistance levels. For example, when an indicator trends upward while the price moves downward, this creates divergence, warning traders to reconsider their investment strategy.
🟣 Different Types of Divergence in Trading
1. Regular Divergence :
o Positive Regular Divergence (RD+)
o Negative Regular Divergence (RD-)
2. Hidden Divergence :
o Positive Hidden Divergence (HD+)
o Negative Hidden Divergence (HD-)
3.Time Divergence.
Note : This guide focuses specifically on Regular Divergence.
🟣 What is Regular Divergence?
Regular Divergence, often referred to as convergence, occurs when price action and indicators show conflicting patterns, usually signaling the end of a trend. Detecting regular divergence helps traders anticipate potential trend reversals or the formation of reversal patterns.
🔵 How to Use
To optimize the detection of divergence, you can adjust the Fractal Period to specify the length of time for identifying divergence patterns.
Additionally, with the Divergence Detection Method, you can select oscillators like the MACD, RSI, or AO to base divergence detection on.
Divergence in MACD :
MACD divergence occurs when the price chart forms an opposite pattern compared to the MACD line, indicating a potential price reversal.
Divergence in RSI :
In a downtrend, if the price chart forms two consecutive lows with the second lower than the first, but the RSI shows two lows with the second higher, this indicates positive regular divergence, which is a buy signal.
On the other hand, during an uptrend, if the price forms two highs with the second higher than the first, but the RSI shows the second high lower, this points to negative regular divergence, indicating a sell signal.
Divergence in AO (Awesome Oscillator) :
The AO indicator calculates histograms using the difference between 5-period and 34-period simple moving averages. It compares peaks and troughs of these histograms with price movements, detecting divergence and plotting lines and arrows to signal divergence.
🔵 Table
The following table breaks down the main features of the oscillator. It covers four critical categories: Exist, Consecutive, Divergence Quality, and Change Phase Indicator.
Exist : If divergence is detected, a "+" will appear in this row.
Consecutive: Shows the number of consecutive divergences that have formed in a short period.
Divergence Quality : Evaluates the quality of the divergence based on the number of occurrences. One is labeled "Normal," two are "Good," and three or more are considered "Strong."
Change Phase Indicator : If a phase change is detected between two oscillation peaks, this is marked in the table.
Indicators and strategies
Straddle Indicator - Padding GuideThe Straddle Indicator is designed to help traders visualize potential market movements by straddling the current price. This indicator draws two horizontal lines on the chart: one positioned above and one below the current price, based on user-defined offsets.
Key Features:
Dynamic Price Levels: The levels are calculated based on the current closing price, allowing the indicator to adapt to changing market conditions in real time.
Customizable Offsets: Traders can customize the offsets for the lines above and below the current price, providing flexibility to align with their trading strategies or market analysis.
Visual Clarity: The indicator displays the price levels as horizontal lines in distinct colors (green for above and red for below) along with corresponding labels showing the exact price levels, facilitating quick reference.
Current Bar Focus: The lines and labels are updated to only reflect the current bar, minimizing chart clutter and making it easy to focus on the most relevant price action.
This indicator is particularly useful for traders employing straddle strategies, as it helps to anticipate potential price movements and plan entries or exits accordingly.
RSI & Volume Impact Analyzer Ver.1.00Description:
The RSI VOL Score indicator combines the Relative Strength Index (RSI) and volume data through a mathematical calculation to assist traders in identifying and confirming potential trend reversals and continuations. By leveraging both momentum (RSI) and volume data, this indicator provides a more comprehensive view of market strength compared to using RSI or volume alone.
How It Works:
This indicator calculates a score by comparing the RSI against its moving average, adjusted by the volume data. The resulting score quantifies market momentum and strength. When the score crosses its signal line, it may indicate key moments where the market shifts between bullish and bearish trends, potentially helping traders spot these changes earlier.
Calculation Methods:
The RSI VOL Score allows users to select between several calculation methods to suit their strategy:
SMA (Simple Moving Average): Provides a balanced smoothing approach.
EMA (Exponential Moving Average): Reacts more quickly to recent price changes, offering faster signals.
VWMA (Volume Weighted Moving Average): Emphasizes high-volume periods, focusing on stronger market moves.
WMA (Weighted Moving Average): Applies greater weight to recent data for a more responsive signal.
What the Indicator Plots:
Score Line: Represents a combined metric based on RSI and volume, helping traders gauge the overall strength of the trend.
Signal Line: A smoothed version of the score that helps traders identify potential trend changes. Bullish signals occur when the score crosses above the signal line, while bearish signals occur when the score drops below.
Key Features:
Trend Identification: The score and signal line crossovers can help confirm emerging bullish or bearish trends, allowing traders to act on upward or downward momentum.
Customizable Settings: Traders can adjust the lengths of the RSI and signal line and choose between different moving averages (SMA, EMA, VWMA, WMA) to tailor the indicator to their trading style.
Timeframe-Specific: The indicator works within the selected timeframe, ensuring accurate trend analysis based on the current market context.
Practical Use Cases:
Trending Markets: In trending markets, this indicator helps confirm bullish or bearish signals by validating price moves with volume. Traders can use the crossover of the score and signal line as a guide for entering or exiting trades based on trend strength.
Ranging Markets: In ranging markets, the indicator helps filter out false signals by confirming if price movements are backed by volume, making it a useful tool for traders looking to avoid entering during weak or uncertain market conditions.
Interpreting the Score and Signal Lines:
Bullish Signal: A bullish signal occurs when the score crosses above the signal line, indicating a potential upward trend in momentum and price.
Bearish Signal: A bearish signal is generated when the score crosses below the signal line, suggesting a potential downward trend or weakening market momentum.
By mathematically combining RSI and volume data into a single trend score, the RSI VOL Score indicator provides traders with a powerful tool for identifying trend shifts early and making more confident trading decisions.
Important Note:
The signals generated by this indicator should be interpreted in conjunction with other analysis tools. It is always advisable to confirm signals before making any trading decisions.
Disclaimer:
This indicator is designed to assist traders in their decision-making process and does not provide financial advice. The creators of this tool are not responsible for any financial losses or trading decisions made based on its signals. Trading involves significant risk, and users should seek professional advice or conduct their own research before making any trading decisions.
Simple RSI stock Strategy [1D] The "Simple RSI Stock Strategy " is designed to long-term traders. Strategy uses a daily time frame to capitalize on signals generated by the Relative Strength Index (RSI) and the Simple Moving Average (SMA). This strategy is suitable for low-leverage trading environments and focuses on identifying potential buy opportunities when the market is oversold, while incorporating strong risk management with both dynamic and static Stop Loss mechanisms.
This strategy is recommended for use with a relatively small amount of capital and is best applied by diversifying across multiple stocks in a strong uptrend, particularly in the S&P 500 stock market. It is specifically designed for equities, and may not perform well in other markets such as commodities, forex, or cryptocurrencies, where different market dynamics and volatility patterns apply.
Indicators Used in the Strategy:
1. RSI (Relative Strength Index):
- The RSI is a momentum oscillator used to identify overbought and oversold conditions in the market.
- This strategy enters long positions when the RSI drops below the oversold level (default: 30), indicating a potential buying opportunity.
- It focuses on oversold conditions but uses a filter (SMA 200) to ensure trades are only made in the context of an overall uptrend.
2. SMA 200 (Simple Moving Average):
- The 200-period SMA serves as a trend filter, ensuring that trades are only executed when the price is above the SMA, signaling a bullish market.
- This filter helps to avoid entering trades in a downtrend, thereby reducing the risk of holding positions in a declining market.
3. ATR (Average True Range):
- The ATR is used to measure market volatility and is instrumental in setting the Stop Loss.
- By multiplying the ATR value by a custom multiplier (default: 1.5), the strategy dynamically adjusts the Stop Loss level based on market volatility, allowing for flexibility in risk management.
How the Strategy Works:
Entry Signals:
The strategy opens long positions when RSI indicates that the market is oversold (below 30), and the price is above the 200-period SMA. This ensures that the strategy buys into potential market bottoms within the context of a long-term uptrend.
Take Profit Levels:
The strategy defines three distinct Take Profit (TP) levels:
TP 1: A 5% from the entry price.
TP 2: A 10% from the entry price.
TP 3: A 15% from the entry price.
As each TP level is reached, the strategy closes portions of the position to secure profits: 33% of the position is closed at TP 1, 66% at TP 2, and 100% at TP 3.
Visualizing Target Points:
The strategy provides visual feedback by plotting plotshapes at each Take Profit level (TP 1, TP 2, TP 3). This allows traders to easily see the target profit levels on the chart, making it easier to monitor and manage positions as they approach key profit-taking areas.
Stop Loss Mechanism:
The strategy uses a dual Stop Loss system to effectively manage risk:
ATR Trailing Stop: This dynamic Stop Loss adjusts based on the ATR value and trails the price as the position moves in the trader’s favor. If a price reversal occurs and the market begins to trend downward, the trailing stop closes the position, locking in gains or minimizing losses.
Basic Stop Loss: Additionally, a fixed Stop Loss is set at 25%, limiting potential losses. This basic Stop Loss serves as a safeguard, automatically closing the position if the price drops 25% from the entry point. This higher Stop Loss is designed specifically for low-leverage trading, allowing more room for market fluctuations without prematurely closing positions.
to determine the level of stop loss and target point I used a piece of code by RafaelZioni, here is the script from which a piece of code was taken
Together, these mechanisms ensure that the strategy dynamically manages risk while offering robust protection against significant losses in case of sharp market downturns.
The position size has been estimated by me at 75% of the total capital. For optimal capital allocation, a recommended value based on the Kelly Criterion, which is calculated to be 59.13% of the total capital per trade, can also be considered.
Enjoy !
Follow LineFollow Line is a common MT4 FX indicator based on trend following.
The main idea behind the calculation is volatility:
-Indicator Line increases as price goes above Bollinger Bands but with 1 standard deviation.
-Likewise when price moves below the lower Bollinger Band with 1 Standard deviation, Follow -Line decreases down.
-As you can imagine, indicator stays as a flat line when price moves between the bands.
There are two critical settings about the indicator:
1- Bollinger Bands Deviation is set to 1 as default but if you want to have early signals you have to decrease that amount. Also you'd better increase that to have flat values on sideways market conditions for not getting chopped by the early but false signals.
2- ATR Filter is activated in default settings and the indicator follows the trend with a distance from Highs and Lows considering ATR (default length 5) values. If you turn off the ATR filter, the indicator line only takes into account the Highs and the Lows. Indicator will get more agile but the risk of choppy signals can be taken that time. I personally advise you to increase the Bollinger Band Deviation from 1 to between 1.5-2 to stabilize the fake signals when ATR filter is turned off.
Signals can be shown on the graph:
BUY: when Follow Line changes direction from red to blue.(which means Price is above Bollinger Upper Band with 1 standard deviation)
SELL: when Follow Line changes direction from blue to red. (which means Price moves below Bollinger Lower Band with 1 standard deviation)
Finally, some of you may know there are also several Follow Line indicators on TradingView but unfortunately they don't show the same exact values (close but not same) comparing with original version of MT4 and the Metastock version that I've coded recently. So, I shared this stuff to have the exact same values on graphs on all platforms.
Flat Tops/Bottoms aka Devil's MarkThis Pine script indicator is designed to visually depict price inefficiencies, as identified by Flat Top/Bottom Candles (aka Devil's Mark). A Flat Top/Bottom Candle is a scenario where there is an absence of a wick at the top or the bottom of the candle. These represent zones of inefficiency and will frequently act as magnets for price that the market will strive to rebalance in accordance with ICT principles.
Relevance:
Flat Top/Bottom Candles are zones where price delivery didn't provide opportunity for manipulation representing an inefficiency that the market will seek to rebalance. Consequently, these zones can provide good targets for entries in the opposite direction or take profit targets for previous entries in the direction of the Flat Top/Bottom Candle.
How It Works:
The indicator keeps track of all Flat Top/Bottom Candles from the beginning of the available history. It automatically removes all mitigated Flat Top/Bottom Candles, which are situations where the price has gone past the candle without a wick.
Configurability:
You can configure the colors, style & width of the lines used to represent flat top/bottom candles.
What makes this indicator different:
Designed with high performance in mind, to reduce impact on chart render time.
Only keeping the currently valid flat top/bottoms on the chart.
TS CalculatorWhat is Trailing Stop?
A trailing stop is a type of stop-loss order that adjusts itself as the price of an asset moves in a favorable direction. It’s designed to lock in profits or limit losses by following the asset’s price movement. Here’s how it works:
How a Trailing Stop Works
Initial Setup: You set a trailing stop at a certain percentage or dollar amount below (for long trades) or above (for short trades) the current market price.
Price Movement: As the price moves in your favor, the trailing stop moves with it, maintaining the set distance.
Locking in Profits: If the price reverses direction by the set amount, the trailing stop triggers a market order to sell (for long trades) or buy (for short trades), locking in your profits or limiting your losses.
Example
Long Trade: If you buy a stock at $100 and set a trailing stop at 10%, the stop-loss order will initially be at $90. If the stock price rises to $120, the trailing stop moves up to $108 (10% below $120). If the price then drops to $108, the trailing stop triggers a sell order.
Short Trade: If you short a stock at $100 and set a trailing stop at 10%, the stop-loss order will initially be at $110. If the stock price falls to $80, the trailing stop moves down to $88 (10% above $80). If the price then rises to $88, the trailing stop triggers a buy order.
Benefits
Automated Risk Management: It helps manage risk without the need to constantly monitor the market.
Profit Protection: It locks in profits as the price moves in your favor.
Flexibility: It adjusts dynamically with the market price, unlike a fixed stop-loss order.
What this script does ?
This script plots the Trailing Stop from the point of entry to current date, until it hits the trailing stop. Some of the market did not give the trailing stop values exactly so this script may give you a wise view of that.
Variables
Date : Date with YYYY-MM-DD format
Time : Time with HH:MM:SS format
Entry Price : Activation Price of TS order
Bounceback Ratio : Ratio for TS
Order Type : Position of order as Long/Short
There is an also a table implemented which shows
Entry
Ratio
Position
Current Stop
For possible updates feel free to contact me via DM.
CAPE / Shiller PE RatioThe CAPE (Cyclically Adjusted Price-to-Earnings) or Shiller PE ratio is a popular valuation measure used by investors to assess whether a stock or index is over or undervalued relative to its historical earnings. Unlike the traditional P/E ratio, the CAPE ratio smooths earnings over ten years, adjusting for inflation and providing a more stable and long-term view of valuation.
This indicator lets you quickly calculate and visualize the CAPE ratio for any stock on TradingView, helping you make informed decisions about the sustainability of current price levels. With its clear presentation and intuitive setup, you can compare historical CAPE levels and identify potential opportunities for long-term investments or avoid overvalued markets.
Advantages of the CAPE Ratio:
Long-Term Focus : Smooth earnings over ten years, reducing the impact of short-term volatility.
Inflation-Adjusted : Provides a more precise, inflation-adjusted valuation measure over time.
Historical Comparison : Allows for benchmarking against long-term historical averages.
Market Sentiment Indicator : Can highlight overvalued or undervalued markets for long-term investors.
Reduces Noise : Filters out short-term earnings fluctuations, offering a more stable view.
Disadvantages of the CAPE Ratio:
Ignores Recent Earnings : Misses short-term earnings changes, which can affect current valuations.
Outdated Data : Relies on old earnings data that may not reflect recent company performance.
Less Effective for Growth Stocks : May undervalue high-growth stocks focused on future earnings.
Sector Limitations : Works best for broad markets, less so for fast-changing industries.
Debated Predictive Power : It’s unreliable for timing short-term market movements.
In short, the CAPE ratio is excellent for long-term valuation but has limitations for short-term or growth-focused investing.
Disclaimer
Please remember that past performance may not be indicative of future results.
Due to various factors, including changing market conditions, the strategy may no longer perform as well as in historical backtesting.
This post and the script don’t provide any financial advice.
Vertical Lines & Price RangeThis Pine Script indicator visually marks significant historical price points on the chart by drawing vertical lines at intervals of 6 months, 3 months, and 1 month ago. Each vertical line is accompanied by a label indicating the time frame (6M, 3M, 1M). Additionally, it calculates and displays the percentage change between the closing prices at 6 months ago and 3 months ago, as well as between 3 months ago and 1 month ago, using horizontal lines to connect these price points. This tool is useful for analyzing trends and price movements over time, providing traders with a clear visual representation of historical performance.
Dynamic Darvas Lines [CHE] Dynamic Darvas Lines
Unlock Precision Trading with Dynamic Darvas Lines
Overview:
Dynamic Darvas Lines is an advanced trading indicator designed for traders seeking to enhance their market analysis and decision-making process. Building upon the classic Darvas Box theory, this indicator introduces dynamic zone detection and comprehensive customization features, making it an indispensable tool for both novice and experienced traders.
Key Features & Advantages:
1. Dynamic Zone Detection:
- Adaptive Boxes: Automatically identifies and adjusts support and resistance levels based on market volatility and price movements, ensuring that the indicator remains relevant in varying market conditions.
- Real-Time Updates: Continuously recalculates box boundaries, providing up-to-the-minute insights into potential breakout or reversal points.
2. Enhanced Signal Accuracy:
- Buy & Sell Signals: Generates clear and actionable buy and sell signals based on the crossover and crossunder of price with dynamic Darvas lines, helping traders capitalize on optimal entry and exit points.
- Signal Confirmation: Reduces false signals by requiring confirmation through multiple conditions, enhancing overall trade reliability.
3. Comprehensive Customization:
- Adjustable Parameters: Tailor the indicator to your specific trading style with customizable box length, signal colors, and plot shapes.
- Color Management: Differentiate between various market signals with intuitive color coding for buy/sell signals, box boundaries, and debug lines, enhancing visual clarity on your charts.
4. Advanced Visualization:
- Signal Circles: Visual markers highlight significant price levels where buy and sell signals are triggered, making it easier to spot opportunities at a glance.
- Debug Mode: Activate debug lines to display the lowest lows and highest highs within the defined box length, aiding in in-depth market analysis and strategy refinement.
5. Robust Alert System:
- Custom Alerts: Set up real-time alerts for buy and sell signals, ensuring you never miss critical trading opportunities even when you're away from your screen.
- Automated Notifications: Receive instant notifications directly through your trading platform, keeping you informed and ready to act.
6. Seamless Integration:
- Overlay Capability: Easily integrates with your existing charts, allowing you to combine Dynamic Darvas Lines with other technical indicators for a more comprehensive market view.
- Optimized Performance: Efficiently coded in Pine Script V5, ensuring smooth performance without lag, even on lower-end devices.
Use Cases:
- Trend Identification: Detect and follow market trends by observing the formation and breakout of dynamic Darvas boxes, helping you stay aligned with the market’s momentum.
- Breakout Trading: Capitalize on significant price movements when the price breaks out of established Darvas zones, indicating potential strong directional moves.
- Reversal Detection: Identify potential market reversals by monitoring when the price crosses under the lower Darvas line or above the upper Darvas line, signaling a change in market sentiment.
- Risk Management: Utilize the indicator’s clear support and resistance levels to set strategic stop-loss and take-profit points, enhancing your risk-reward ratio.
- Market Analysis: Combine with other technical tools and indicators to perform comprehensive market analysis, improving the accuracy of your trading strategies.
Why Choose Dynamic Darvas Lines ?
Dynamic Darvas Lines stands out with its blend of traditional Darvas Box principles and modern enhancements. Its dynamic nature ensures adaptability across different market conditions, while the extensive customization options provide traders with the flexibility to tailor the indicator to their unique trading strategies. Whether you’re aiming to identify trends, execute breakout trades, or manage risks more effectively, Dynamic Darvas Lines offers the precision and reliability you need to elevate your trading game.
Get Started Today:
Enhance your trading toolkit with Dynamic Darvas Lines and experience the difference in your market analysis and trading performance. Download now and take the first step towards more informed and strategic trading decisions!
Note: Always backtest any trading indicator and use it in conjunction with other analysis tools to develop a robust trading strategy. Trading involves risk, and it's essential to practice sound risk management.
Disclaimer:
The content provided, including all code and materials, is strictly for educational and informational purposes only. It is not intended as, and should not be interpreted as, financial advice, a recommendation to buy or sell any financial instrument, or an offer of any financial product or service. All strategies, tools, and examples discussed are provided for illustrative purposes to demonstrate coding techniques and the functionality of Pine Script within a trading context.
Any results from strategies or tools provided are hypothetical, and past performance is not indicative of future results. Trading and investing involve high risk, including the potential loss of principal, and may not be suitable for all individuals. Before making any trading decisions, please consult with a qualified financial professional to understand the risks involved.
By using this script, you acknowledge and agree that any trading decisions are made solely at your discretion and risk.
Business Cycle Indicators (Normalized)This script aggregates and normalizes several key economic indicators to provide a comprehensive view of the business cycle and overall market conditions. By combining these indicators into a single, normalized average line, the script helps identify overarching trends and shifts in the economy, aiding in more informed trading and investment decisions.
Included Indicators:
Inverted National Financial Conditions Index (NFCI):
Symbol: FRED:NFCI
Measures financial stress in the markets. An inverted NFCI aligns higher values with positive financial conditions.
Inverted Net Percentage of Banks Tightening Lending Standards (DRTSCIS):
Symbol: FRED:DRTSCIS
Reflects changes in bank lending practices. Inverting this indicator means higher values indicate easing lending standards, which is generally positive for economic growth.
HYG Close Price (iShares High Yield Corporate Bond ETF):
Symbol: AMEX:HYG
Represents the performance of high-yield corporate bonds, providing insight into credit market conditions.
Inverted High-Yield Credit Spread (BAMLH0A0HYM2):
Symbol: FRED:BAMLH0A0HYM2
Measures the spread between high-yield bonds and risk-free securities. A narrower (inverted) spread indicates better market conditions.
Manufacturing/Non-Manufacturing New Orders Ratio:
Symbols: ECONOMICS:USMNO (Manufacturing), ECONOMICS:USNMNO (Non-Manufacturing)
Compares manufacturing to non-manufacturing new orders to gauge shifts in economic activity.
US PMI (Purchasing Managers' Index):
Symbol: ECONOMICS:USBCOI
An indicator of the economic health of the manufacturing sector.
10-Year Inflation Breakeven (T10YIE):
Symbol: FRED:T10YIE
Represents market expectations of inflation over the next ten years.
Inverted 10-Year Real Yield (DFII10):
Symbol: FRED:DFII10
Reflects the real yield on 10-year Treasury Inflation-Protected Securities (TIPS). Inverted to align higher values with positive economic sentiment.
Copper/Gold Ratio:
Symbols: CAPITALCOM:COPPER (Copper), TVC:GOLD (Gold)
Compares the prices of copper and gold, often used as a barometer for global economic activity.
Features:
Normalized Indicators: Each indicator is normalized to a 0-100 scale to facilitate direct comparison, regardless of their original units or scales.
Normalized Average Line: Calculates and plots the average of all available normalized indicators, providing a single line that represents the combined economic signals.
Customizable Display:
Show Individual Indicators: Option to display individual normalized indicators for detailed analysis.
Show Normalized Average Line: Option to display the normalized average line for a consolidated view.
Dynamic Labeling: Displays the latest value of the normalized average directly on the chart for quick reference.
How to Use:
Adding the Script:
Apply the script to a chart in TradingView using a timeframe that aligns with the frequency of the economic data (daily or weekly recommended).
Customization:
Show Normalized Average Line: Enabled by default to display the combined indicator.
Show Individual Indicators: Enable this option in the script settings to display all individual normalized indicators.
Interpretation:
Normalized Scale (0-100): Higher values generally indicate stronger economic conditions, while lower values may suggest weakening conditions.
Trend Analysis: Use the normalized average line to identify trends and potential turning points in the business cycle.
Notes:
Data Availability: Ensure you have access to all the data sources used in the script. Some data feeds may require specific TradingView subscriptions.
Indicator Limitations: Economic indicators are subject to revisions and may not reflect real-time market conditions.
No Investment Advice: This script is a tool for analysis and should not be considered as financial advice. Always conduct your own research before making investment decisions.
PRINT_DROVINGLibrary "PRINT_DROVING"
method print_droving(foot_bar, sup)
printing all footprint objects
Namespace types: footprint_type.Footprint_bar
Parameters:
foot_bar (Footprint_bar type from Alesetup/PRINT_TYPE/1) : instance of Footprint_bar type
sup (Support_objects type from Alesetup/PRINT_TYPE/1) : instance of Support_objects type
Returns: Void.
PRINT_LOGICLibrary "PRINT_LOGIC"
method fill_imba_line(imba_line, foot_bar, sup)
fill imbalance line
Namespace types: footprint_type.Imbalance_line
Parameters:
imba_line (Imbalance_line type from Alesetup/PRINT_TYPE/1) : instance of Imbalance_line type
foot_bar (Footprint_bar type from Alesetup/PRINT_TYPE/1) : instance of Footprint_bar type
sup (Support_objects type from Alesetup/PRINT_TYPE/1) : instance of Support_objects type
Returns: Void
method fill_footprint_type(foot_bar, sup)
Namespace types: footprint_type.Footprint_bar
Parameters:
foot_bar (Footprint_bar type from Alesetup/PRINT_TYPE/1) : instance of Footprint_bar type
sup (Support_objects type from Alesetup/PRINT_TYPE/1) : instance of Support_objects type
Returns: Void
method fill_footprint_object(foot_bar, sup)
fill all footprint objects
Namespace types: footprint_type.Footprint_bar
Parameters:
foot_bar (Footprint_bar type from Alesetup/PRINT_TYPE/1) : instance of Footprint_bar type
sup (Support_objects type from Alesetup/PRINT_TYPE/1) : instance of Support_objects type
Returns: Void
PRINT_TYPELibrary "PRINT_TYPE"
Inputs
Inputs objects
Fields:
inbalance_percent (series int) : percentage coefficient to determine the Imbalance of price levels
stacked_input (series int) : minimum number of consecutive Imbalance levels required to draw extended lines
show_summary_footprint (series bool)
procent_volume_area (series int) : definition size Value area
new_imbalance_cond (series bool) : bool input for setup alert on new imbalance buy and sell
new_imbalance_line_cond (series bool) : bool input for setup alert on new imbalance line buy and sell
stop_past_imbalance_line_cond (series bool) : bool input for setup alert on stop past imbalance line buy and sell
Constants
Constants all Constants objects
Fields:
imbalance_high_char (series string) : char for printing buy imbalance
imbalance_low_char (series string) : char for printing sell imbalance
color_title_sell (series color) : color for footprint sell
color_title_buy (series color) : color for footprint buy
color_line_sell (series color) : color for sell line
color_line_buy (series color) : color for buy line
color_title_none (series color) : color None
Calculation_data
Calculation_data data for calculating
Fields:
detail_open (array) : array open from calculation timeframe
detail_high (array) : array high from calculation timeframe
detail_low (array) : array low from calculation timeframe
detail_close (array) : array close from calculation timeframe
detail_vol (array) : array volume from calculation timeframe
previos_detail_close (array) : array close from calculation timeframe
isBuyVolume (series bool) : attribute previosly bar buy or sell
Footprint_row
Footprint_row objects one footprint row
Fields:
price (series float) : row price
buy_vol (series float) : buy volume
sell_vol (series float) : sell volume
imbalance_buy (series bool) : attribute buy inbalance
imbalance_sell (series bool) : attribute sell imbalance
buy_vol_box (series box) : for ptinting buy volume
sell_vol_box (series box) : for printing sell volume
buy_vp_box (series box) : for ptinting volume profile buy
sell_vp_box (series box) : for ptinting volume profile sell
row_line (series label) : for ptinting row price
empty (series bool) : = true attribute row with zero volume buy and zero volume sell
Imbalance_line_var_object
Imbalance_line_var_object var objects printing and calculation imbalance line
Fields:
cum_buy_line (array) : line array for saving all history buy imbalance line
cum_sell_line (array) : line array for saving all history sell imbalance line
Imbalance_line
Imbalance_line objects printing and calculation imbalance line
Fields:
buy_price_line (array) : float array for saving buy imbalance price level
sell_price_line (array) : float array for saving sell imbalance price level
var_imba_line (Imbalance_line_var_object) : var objects this type
Footprint_bar
Footprint_bar all objects one bar with footprint
Fields:
foot_rows (array) : objects one row footprint
imba_line (Imbalance_line) : objects imbalance line
row_size (series float) : size rows
total_vol (series float) : total volume one footprint bar
foot_buy_vol (series float) : buy volume one footprint bar
foot_sell_vol (series float) : sell volume one footprint bar
foot_max_price_vol (map) : map with one value - price row with max volume buy + sell
calc_data (Calculation_data) : objects with detail data from calculation resolution
Support_objects
Support_objects support object for footprint calculation
Fields:
consts (Constants) : all consts objects
inp (Inputs) : all input objects
bar_index_show_condition (series bool) : calculation bool value for show all objects footprint
row_line_color (series color) : calculation value - color for row price
dop_info (series string)
show_table_cond (series bool)
Weekly Initial BalanceWeekly Initial Balance Indicator
The Weekly Initial Balance (IB) indicator is a powerful tool designed for traders to identify key support and resistance levels based on the market's initial activity at the start of each week. By analyzing the first 30 hours of trading.
Key Features:
Customizable IB Period: Define the start hour and duration of the initial balance period to suit your trading schedule and the specific market you are analyzing, I have it set at 30 hours by default.
IB High, Low, and Midpoint Levels: Automatically plots the high, low, and midpoint of the IB period, providing immediate visual reference to critical price levels.
Extension Levels: Calculate and display extension levels based on customizable percentages (e.g., 50%, 100%, 150%), allowing you to project potential breakout targets and identify areas of interest beyond the initial balance range.
Dynamic Lines and Labels: The indicator updates in real-time, extending lines and repositioning labels as new bars form, ensuring you always have the most current information.
Customizable Appearance: Adjust line styles, widths, colors, and label positions to match your charting preferences and improve visual clarity.
How to Use:
Set the IB Parameters:
Week Start Hour (UTC): Specify the hour when the weekly IB period begins. I use 1800EST as that is when the futures market opens.
IB Duration in Hours: Define how many hours constitute the IB period.
Configure Extension Levels:
Input the desired extension percentages to calculate levels beyond the IB range.
Customize Visual Settings:
Adjust line colors, styles, widths, and label offsets to tailor the indicator's appearance.
Interpret the Levels:
Use the IB high and low as immediate support and resistance levels.
Monitor the midpoint for potential pivot areas.
Watch for price interactions with extension levels to anticipate breakouts or reversals.
Benefits:
Identify Key Weekly Levels: Understand the market's initial sentiment each week to gauge potential trends.
Enhance Trading Strategies: Incorporate the IB levels into your trading plan for better entry and exit points.
Adaptable to Various Markets: Suitable for Forex, commodities, indices, and other markets where weekly analysis is beneficial.
Accurate 10x Volume Spike with Corrected Next Candle AnalysisDescription :
The Volume Ten Candles indicator is a technical analysis tool that helps traders identify candles with volume exceeding the previous one by 10 times. This can indicate a potential trend reversal or continuation of the current price movement.
Signal :
The indicator generates a signal when a candle with volume exceeding the previous one by 10 times appears. The signal is displayed on the chart as an arrow or other symbol.
Statistics :
The indicator also displays statistics in the form of a table that shows the number of candles with volume exceeding the previous one by 10 times for a certain period of time. This helps traders assess the strength of the trend and make a decision about entering a trade.
Example of Use :
The Volume Ten Candles indicator can be useful for traders who want to find candles with high volume and use them to enter a trade. For example, if a candle with volume exceeding the previous one by 10 times appears, it may indicate that the market is ready for a price movement. In this case, the trader can open a trade in the direction of this movement.
It is important to note that the Volume Ten Candles indicator is not a guarantee of profit and may produce false signals. Therefore, before using the indicator, it is necessary to conduct testing on historical data and develop a trading strategy.
Statistics Table :
The table displays the number of candles with volume exceeding the previous one by 10 times for each day.
Stochastic RMIThe Relative Momentum Index (RMI) is a technical analysis indicator used to analyze the price movements of assets in a financial market. Similar to the RSI (Relative Strength Index), it helps measure the momentum and strength of the asset's price movements over the recent period. However, the RMI offers a "smoother" view, unlike the RSI. This means that there is less "noise" in the indicator.
As is known, the Stochastic RSI indicator is based on the RSI. What I did was to create a stochastic based on the RMI. If you compare this indicator with the "Stochastic RSI", you will see that there is no difference between them, except that the "Stochastic RMI" is more "smooth" and noiseless.
Industry Group StrengthThe Industry Group Strength indicator is designed to help traders identify the best-performing stocks within specific industry groups. The movement of individual stocks is often closely tied to the overall performance of their industry. By focusing on industry groups, this indicator allows you to find the top-performing stocks within an industry.
Thanks to a recent Pine Script update, an indicator like this is now possible. Special thanks to @PineCoders for introducing the dynamic requests feature.
How this indicator works:
The indicator contains predefined lists of stocks for each industry group. To be included in these lists, stocks must meet the following basic filters:
Market capitalization over 2B
Price greater than $10
Primary listing status
Once the relevant stocks are filtered, the indicator automatically recognizes the industry group of the current stock displayed on the chart. It then retrieves and displays data for that entire industry group.
Data Points Available:
The user can choose between three different data points to rank and compare stocks:
YTD (Year-To-Date) Return: Measures how much a stock has gained or lost since the start of the year.
RS Rating: A relative strength rating for a user-selected lookback period (explained below).
% Return: The percentage return over a user-selected lookback period.
Stock Ranking:
Stocks are ranked based on their performance within their respective industry groups, allowing users to easily identify which stocks are leading or lagging behind others in the same sector.
Visualization:
The indicator presents stocks in a table format, with performance metrics displayed both as text labels and color-coded lines. The color gradient represents the percentile rank, making it visually clear which stocks are outperforming or underperforming within their industry group.
Relative Strength (RS):
Relative Strength (RS) measures a stock’s performance relative to a benchmark, typically the S&P 500 (the default setting). It is calculated by dividing the closing price of the stock by the closing price of the S&P 500.
If the stock rises while the S&P 500 falls, or if the stock rises more sharply than the S&P 500, the RS value increases. Conversely, if the stock falls while the S&P 500 rises, the RS value decreases. This indicator normalizes the RS value into a range from 1 to 99, allowing for easier comparison across different stocks, regardless of their raw performance. This normalized RS value helps traders quickly assess how a stock is performing relative to others.
Key Levels Suite - By LeviathanThis is a comprehensive script, designed to display over 100 key price levels across multiple dimensions, including volume profile levels, HTF levels, VWAPs, SMAs/EMAs, market session levels, day of week levels and more. The indicator offers high flexibility in features, settings and visual appearance.
● The script organizes levels into six main categories:
Higher Timeframe (HTF) Levels
- Current and/or previous period: Open, High, Low, and Midpoint for Daily, Weekly, Monthly, Quarterly, and Yearly timeframes (eg. levels for current weekly high/low and previous weekly high/low).
- These levels provide a clear structure for identifying key support and resistance zones. Traders often use HTF levels to anticipate price reactions, such as bounces or rejections, at major highs and lows. For example, a price nearing the weekly high could signal an area of resistance.
VWAP Levels
- Current and/or previous period: VWAP and upper/lower standard deviations for Daily, Weekly, Monthly, Quarterly, and Yearly timeframes (eg. levels for current daily VWAP and previous weekly VWAP).
- VWAP levels give traders insight into whether the current price is above or below the fair market value for a given period. It’s often used as a reference point for trend direction or S/R. If the price remains above VWAP, the trend may be seen as bullish, while breaks below VWAP can suggest a shift toward bearish sentiment. Standard deviations help identify areas where the price may be overextended, offering opportunities for mean reversion trades.
Moving Average Levels
- EMA and SMA for three customizable lengths (eg. levels for 200 EMA, 50 EMA and 100 SMA).
- These levels act as dynamic support and resistance lines that adjust with price movement. Traders use them to confirm trend direction and watch for reactions around these levels, particularly in trending markets. For example, when the price pulls back to a 200 EMA, it could present an opportunity to enter a trade in line with the prevailing trend.
Volume Profile Levels
- Current and previous: Point of Control (POC), Value Area High (VAH), and Value Area Low (VAL) for Daily, Weekly, Monthly, Quarterly, and Yearly timeframes (eg. levels for current day POC and previous day POC).
- Volume Profile levels highlight price areas where significant trading occurred. The POC indicates the price where the most volume was traded and can act as a strong magnet for price. VAH and VAL mark the boundaries of value areas, making them excellent spots for breakout or mean reversion trades. Traders look for price reactions around these zones to either join or fade moves.
Market Session Levels
- Current and previous: Open, high, low, and midpoint for three user-defined sessions, with default being Tokyo, London, and New York (eg. levels for current New York session open and previous New York session high and low).
- Session levels allow traders to track how price behaves across different global market sessions. For instance, the New York open often brings increased liquidity and volatility. Traders often use these levels to anticipate sharp moves or continuations, especially after session highs and lows are broken, signaling shifts in market momentum.
Day of Week Levels
- Open, high, low, and midpoint for Monday through Sunday (eg. levels for Monday's high and low and Tuesday open).
- These levels help traders identify recurring intraday or intraweek price behaviors. For example, highs or lows established earlier in the week can serve as benchmarks for breakouts or retracements later on. Monday’s open or Friday’s high/low often reflect market sentiment going into or out of the weekend, providing valuable clues for planning trades.
● About the script
I published this script because it was heavily requested by my Tradingview followers who wanted a clean and feature-rich indicator that can display various levels they use in their analysis. The indicator can display levels that are not available in other similar public scripts and makes sure to calculate and load calculation-intensive levels (like volume profile levels, higher timeframe vwap levels, etc) as fast and efficiently as possible. It is one of the only scripts I've published that is not open source. The code is protected because it includes some proprietary calculations (eg: for POC/VAH/VAL), that I don't wish to open source, but I still want to publish a heavily requested script in a public and free format.
● How to use the script
1. Add the script to your chart
Start by adding the script to your chart like any other indicator.
2. Open the indicator settings
Click the settings icon to access all customization options.
3. Select which level groups to display
In the "Controls" section, choose which groups of levels (HTF, VWAP, Moving Averages, etc.) you want displayed. This allows you to quickly toggle between different sets of levels depending on your analysis needs, without overcrowding the chart.
4. Adjust group-specific settings
Scroll down to access detailed settings for each group. For any group, you can choose:
- The relevant time parameter (e.g., Daily, Weekly, Monthly, etc for HTF/VWAP/Volume Profile levels, length for Moving Average levels, day for Day of Week Levels, etc).
- Specific levels to display (e.g., Open/High/Low/Midpoint for HTF, VWAP, Day of Week, Session levels and POC/VAH/VAL for Volume Profile levels).
- For applicable groups, you can also toggle previous period levels by selecting them from the row starting with the "↳" icon.
5. Customize visual appearance
In the "Appearance" section, you have full control over how the levels and labels look. You can:
- Choose what details appear in the labels (e.g., level name, price, or percentage distance from current price).
- Pick from different line types, line style (solid, dashed, dotted), adjust line width, and manage the length of the lines using "Offset Right" and "Offset Left" settings.
- Modify font, label size, and color options. If multiple levels overlap at the same price, use the “Merge Levels” option to combine them into one, reducing visual clutter.
6. Customize level names to your preference
In the "Labels" section, you can rename any parameter to match your preferred abbreviations (e.g., change “Weekly Open” to “wO” or any other shorthand that works for you).
● Key Features:
- Display various different important levels, all in one indicator
- Seamless control of which group of levels / specific level to display
- Choose from various line and label styles to display levels.
- Labels can show the level's title (customizable abbreviations), price, and percentage distance from the current price.
- Merge nearby levels to reduce chart clutter, either for identical levels or those within a user-defined percentage range.
- Fully customizable visual appearance of levels to suit individual preferences.
Consecutive CandlesTrading as Easy as One, Two, and Three
Unlock the power of simplicity in trading with this innovative script inspired by KepalaBesi. Designed for traders of all levels, this script provides a user-friendly approach to market analysis, enabling you to make informed trading decisions effortlessly.
Key Features:
Simplified Signals: Receive clear buy and sell signals based on robust technical indicators. The script streamlines your trading process, allowing you to focus on execution rather than analysis.
Customizable Settings: Tailor the script to fit your trading style. Adjust parameters to suit your risk tolerance and market preferences, ensuring a personalized trading experience.
Visual Clarity: Benefit from intuitive visual cues on your chart, making it easy to identify optimal entry and exit points. The clean interface helps you make quick decisions without confusion.
Whether you’re a seasoned trader or just starting, "Trading as Easy as One, Two, and Three" simplifies your trading journey, turning complex strategies into straightforward actions. Embrace a more efficient way to trade and elevate your performance in the markets!
Get Started Today!
Join the community of traders who have discovered the ease of trading with KepalaBesi's inspired script. Elevate your trading experience and achieve your financial goals with confidence!
Three Bar Reversal Pattern [LuxAlgo]The Three Bar Reversal Pattern indicator identifies and highlights three bar reversal patterns on the user price chart.
The script also provides an option for incorporating various trend indicators used to filter out detected signals, allowing them to enhance their accuracy and help obtain a more comprehensive analysis.
🔶 USAGE
The script automates the detection of three-bar reversal patterns and provides a clear, visually identifiable signal for potential trend reversals.
When a reversal chart pattern is confirmed and price action aligns with the pattern, the pattern's boundaries are extended, forming levels, with the upper boundary often acting as a resistance and the lower boundary as a support.
The script allows users to filter patterns based on a specific trend direction detected by multiple trend indicators. Users can choose to view patterns that are either aligned with the detected trend or opposite to it.
Included trend indicators are: Moving Average Cloud, Supertrend, and Donchian Channels.
🔶 DETAILS
The three-bar reversal pattern is a technical analysis pattern that signals a potential reversal in the prevailing trend. The pattern consists of three consecutive bar formations:
First Bar and Second Bar: 2 consecutive of the same sentiment, representing the prevailing trend in the market.
Third Bar: Confirms the reversal by closing beyond the high or low of the first bar, signaling a potential change in market sentiment.
Various types of three-bar reversal patterns are documented. The script supports two main types:
Normal Pattern: Detects three-bar reversal patterns without requiring the third bar closing price to surpass the high (bullish pattern) or low (bearish pattern) of the first bar. It identifies basic formations signaling potential trend reversals.
Enhanced Pattern: Specifically identifies three-bar reversal patterns where the third bar closing price surpasses the high (bullish pattern) or low (bearish pattern) of the first bar. This type provides a more selective signal for stronger trend reversals.
🔶 SETTINGS
Pattern Type: Users can choose the type of 3-bar reversal patterns to detect: Normal, Enhanced, or All. "Normal" detects patterns that do not necessarily surpass the high/low of the first bar. "Enhanced" detects patterns where the third bar surpasses the high/low of the first bar. "All" detects both Normal and Enhanced patterns.
Derived Support and Resistance: Toggles the visibility of the support and resistance levels/zones.
🔹 Trend Filtering
Filtering: Allows users to filter patterns based on the trend indicators: Moving Average Cloud, Supertrend, and Donchian Channels. The "Aligned" option only detects patterns that align with the trend and conversely, the "Opposite" option detects patterns that go against the trend.
🔹 Trend Indicator Settings
Moving Average Cloud: Allows traders to choose the type of moving averages (SMA, EMA, HMA, etc.) and set the lengths for fast and slow-moving averages.
Supertrend: Options to set the ATR length and factor for Supertrend.
Donchian Channels: Option to set the length for the channel calculation.
🔶 RELATED SCRIPTS
Reversal-Candlestick-Structure .
Reversal-Signals .
Long Wick Indicator
This indicator identifies and highlights candles with long wicks, which can be useful for various trading strategies.
Key Features:
1. Timeframe Limitation:
- Optional feature to limit the indicator to specific timeframes
- User can set a maximum timeframe (default: 5 minutes)
2. Customizable Wick-to-Body Ratio:
- User-defined minimum ratio for wick length to body length (default: 0.8)
3. Customizable Visual Indicators:
- Triangles appear above or below candles with long wicks (user can change triangles to another symbol)
- Yellow triangle pointing up: long bottom wick
- Yellow triangle pointing down: long top wick
Functionality:
- Calculates body size and wick sizes for each candle
- Compares wick sizes to body size using the user-defined ratio
- Plots indicators only if the current timeframe is within the specified limit (if enabled)
Usage:
Add this indicator to your TradingView chart to identify potential setups.
Customization:
Users can adjust the wick-to-body ratio and timeframe limitations in the indicator settings to suit their trading style and strategy.
[ AlgoChart ] - Pearson Index CorrelationCorrelation Indicator (Pearson Index)
The correlation indicator measures the strength and direction of the relationship between two financial assets using the Pearson Index.
Correlation values range from +100 to -100, where:
+100 indicates perfect positive correlation, meaning the two assets tend to move in the same direction.
-100 indicates perfect negative correlation, where the two assets move in opposite directions.
The neutral zone ranges from +25% to -25%, suggesting that the asset movements are independent, with no clear correlation between them.
Interpreting Correlation Levels:
Correlation above +75%: The two assets tend to move similarly and in the same direction. This may indicate a risk of overexposure if both assets are traded in the same direction, as their movements will be very similar, increasing the likelihood of double losses or gains.
Correlation below -75%: The two assets tend to move similarly but in opposite directions. This correlation level can be useful for strategies that benefit from opposing movements between assets, such as trading pairs with inverse dynamics.
Practical Use of the Indicator:
Risk management: Use the indicator to monitor asset correlations before opening positions. High correlation may indicate you are duplicating exposure, as two highly correlated assets tend to move similarly. This helps avoid excessive risk and improves portfolio diversification.
Statistical Arbitrage: During moments of temporary decorrelation between two assets, the indicator can be used for statistical arbitrage strategies. In such cases, you can take advantage of the divergence by opening positions and closing them when the correlation returns to higher or positive levels, thus potentially profiting from the reconvergence of movements.
While the correlation indicator provides valuable insights into asset relationships, it is most effective when used in conjunction with other concepts and tools. On its own, it may offer limited relevance in trading decisions.