Divergence Detector [TradingFinder] RSI + MACD + AO Oscillator ๐ต Introduction
๐ฃ Understanding Divergence
As mentioned, divergence occurs in technical analysis when a stock's price behaves contrary to indicators on the price chart. Divergence can signify either a reversal of the stock's trend or a continuation of the previous trend correction.
Divergences can act as reversal patterns or continuation patterns. Moreover, divergences can be utilized to identify potential support and resistance levels.
For instance, when an indicator is trending upwards and positive, but the price is declining and trending downwards, divergence occurs. Divergence in a stock indicates trader indecision in buying and selling and warns traders to reconsider their decisions regarding buying or holding the stock.
Divergence aids analysts in identifying critical price points. In indicator divergences, it serves as a potent signal in the realm of technical analysis.
๐ฃ Types of Divergence
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
Key Note : This indicator is specifically designed to identify "Regular Divergence" only. Therefore, the following explanation pertains to this type of divergence.
๐ต Regular Divergence/Convergence
Regular Divergence(Convergence) occurs due to conflicting behavior between the indicator and the price chart, typically at the end of a trend. Recognizing Regular Divergence suggests an anticipation of a trend reversal or a pattern resembling a reversal.
๐ฃ Positive Regular Divergence (RD+)
In contrast to negative divergence, positive Regular Divergence occurs at the end of a downtrend and between two price lows. It manifests when the price forms a new low on the price chart, but the indicator fails to recognize it.
Positive Regular Divergence indicates strong buying pressure and weak selling pressure. Following the identification of positive divergence on the chart, one can anticipate a price increase for the examined stock.
๐ฃ Negative Regular Divergence (RD-)
This type of Regular Divergence emerges between two price highs during an uptrend. A new high is formed on the price chart, but the indicator fails to acknowledge it. This scenario indicates negative Regular Divergence.
The likelihood of a subsequent market downturn is high. Negative divergence signifies strong selling pressure and weak buying pressure, suggesting an unfavorable future for the stock.
๐ต How to use
By utilizing the "Fractal Period" input, you can specify your desired periods for identifying divergences.
Additionally, through the "Divergence Detect Method" feature, you can choose which oscillators (MACD, RSI, or AO) to base divergence identification on.
Divergence in MACD Oscillator :
Divergence in the MACD indicator occurs when the price chart and the MACD line form a noticeable opposing pattern, meaning the price moves contrary to the MACD line. In this scenario, one expects a reversal in price direction.
Divergence in RSI Oscillator :
If divergence occurs during a downtrend on the price chart (two consecutive lows, with the second low being lower) and on the corresponding RSI point (two consecutive lows, with the second low being higher), it signifies positive Regular Divergence and implies a buying signal.
Conversely, if divergence occurs during an uptrend on the price chart (two consecutive highs, with the second high being higher) and on the corresponding RSI point (two consecutive highs, with the second high being lower), it indicates negative Regular Divergence, signaling a selling opportunity.
Divergence in AO Oscillator :
The AO indicator calculates histograms similar to the AO base. It calculates the difference between the simple moving averages of 5 and 34 periods based on the median of each bar. Then, it plots the bars based on the difference.
It then compares the histograms to detect peaks and troughs in the AO histograms and compares the identified peaks and troughs to the price. Whenever divergence is detected, it plots lines and arrows.
๐ต Table
The table contains information on the functional features of this oscillator that you can utilize. Four categories of information are presented in the table: "Exist," "Consecutive," "Divergence Quality," and "Change Phase Indicator."
Exist :
If divergence exists, you'll see "+" in this row.
Consecutive :
Divergences may occur consecutively. If same-type divergences form within short intervals, you can observe the count in this row.
Divergence Quality : Based on the number of consecutive divergences, their quality can be evaluated. If one divergence exists, its quality is considered "Normal." If two divergences exist, the quality is "Good," and if three or more divergences exist, the quality is considered "Strong."
Change Phase Indicator : If a phase change occurs between two oscillation peaks formed based on divergence, this change is identified and displayed in this row.
Search in scripts for "Table"
WTI Crude Oil Lot Size Calculator by AdrianFx94Indicator on Trading Chart: Once you add this script to your trading chart (specifically a WTI Crude Oil chart), it appears as an indicator. This means it runs alongside the price data and other technical analysis tools you might be using.
Input Your Trading Parameters:
Balance (USD): You need to enter your trading account balance in USD. This is the amount of money you have in your account.
Risk Percentage (%): This is where you define the percentage of your account balance that you're willing to risk in a single trade. For example, if your account balance is $5000 and you set the risk percentage to 1%, you're willing to risk $50 on a trade.
Stop Loss Pip Size (Pip): Here, you enter the size of your stop loss in pips. A pip is a small measure of change in a currency pair in the forex market. In the context of WTI Crude Oil trading, it represents a small change in the price.
Automated Lot Size Calculation: Based on the inputs you provide, the script automatically calculates the lot size you should use for your trade. The calculation takes into account the balance you're willing to risk, the percentage of risk, and the stop loss size. This helps in managing risk by suggesting the amount of WTI Crude Oil you should trade (in lots) that aligns with your risk tolerance.
Display Results in a Table: The script generates a table displayed on the top right corner of your chart. This table shows:
Your entered balance (in USD).
The risk percentage you've set.
The calculated lot size, which indicates how many lots of WTI Crude Oil you can trade based on your risk management parameters.
Real-Time Updates: As this script is part of an indicator on your chart, it updates in real time. This means if your account balance changes or if you decide to adjust your risk parameters, you can re-enter these values, and the script will update the lot size accordingly.
This tool is particularly useful for WTI Crude Oil traders who follow strict risk management rules. By automating the calculation of the lot size, it saves time and helps in making informed and disciplined trading decisions.
Day/Week/Month Metrics (Zeiierman)โ Overview
The Day/Week/Month Metrics (Zeiierman) indicator is a powerful tool for traders looking to incorporate historical performance into their trading strategy. It computes statistical metrics related to the performance of a trading instrument on different time scales: daily, weekly, and monthly. Breaking down the performance into daily, weekly, and monthly metrics provides a granular view of the instrument's behavior.
The indicator requires the chart to be set on a daily timeframe.
โ Key Statistics
โช Day in month
The performance of financial markets can show variability across different days within a month. This phenomenon, often referred to as the "monthly effect" or "turn-of-the-month effect," suggests that certain days of the month, especially the first and last days, tend to exhibit higher than average returns in many stock markets around the world. This effect is attributed to various factors including payroll contributions, investment of monthly dividends, and psychological factors among traders and investors.
โช Edge
The Edge calculation identifies days within a month that consistently outperform the average monthly trading performance. It provides a statistical advantage by quantifying how often trading on these specific days yields better returns than the overall monthly average. This insight helps traders understand not just when returns might be higher, but also how reliable these patterns are over time. By focusing on days with a higher "Edge," traders can potentially increase their chances of success by aligning their strategies with historically more profitable days.
โช Month
Historically, the stock market has exhibited seasonal trends, with certain months showing distinct patterns of performance. One of the most well-documented patterns is the "Sell in May and go away" phenomenon, suggesting that the period from November to April has historically brought significantly stronger gains in many major stock indices compared to the period from May to October. This pattern highlights the potential impact of seasonal investor sentiment and activities on market performance.
โช Day in week
Various studies have identified the "day-of-the-week effect," where certain days of the week, particularly Monday and Friday, show different average returns compared to other weekdays. Historically, Mondays have been associated with lower or negative average returns in many markets, a phenomenon often linked to the settlement of trades from the previous week and negative news accumulation over the weekend. Fridays, on the other hand, might exhibit positive bias as investors adjust positions ahead of the weekend.
โช Week in month
The performance of markets can also vary within different weeks of the month, with some studies suggesting a "week of the month effect." Typically, the first and the last week of the month may show stronger performance compared to the middle weeks. This pattern can be influenced by factors such as the timing of economic reports, monthly investment flows, and options and futures expiration dates which tend to cluster around these periods, affecting investor behavior and market liquidity.
โ How It Works
โช Day in Month
For each day of the month (1-31), the script calculates the average percentage change between the opening and closing prices of a trading instrument. This metric helps identify which days have historically been more volatile or profitable.
It uses arrays to store the sum of percentage changes for each day and the total occurrences of each day to calculate the average percentage change.
โช Month
The script calculates the overall gain for each month (January-December) by comparing the closing price at the start of a month to the closing price at the end, expressed as a percentage. This metric offers insights into which months might offer better trading opportunities based on historical performance.
Monthly gains are tracked using arrays that store the sum of these gains for each month and the count of occurrences to calculate the average monthly gain.
โช Day in Week
Similar to the day in the month analysis, the script evaluates the average percentage change between the opening and closing prices for each day of the week (Monday-Sunday). This information can be used to assess which days of the week are typically more favorable for trading.
The script uses arrays to accumulate percentage changes and occurrences for each weekday, allowing for the calculation of average changes per day of the week.
โช Week in Month
The script assesses the performance of each week within a month, identifying the gain from the start to the end of each week, expressed as a percentage. This can help traders understand which weeks within a month may have historically presented better trading conditions.
It employs arrays to track the weekly gains and the number of weeks, using a counter to identify which week of the month it is (1-4), allowing for the calculation of average weekly gains.
โ How to Use
Traders can use this indicator to identify patterns or trends in the instrument's performance. For example, if a particular day of the week consistently shows a higher percentage of bullish closes, a trader might consider this in their strategy. Similarly, if certain months show stronger performance historically, this information could influence trading decisions.
Identifying High-Performance Days and Periods
Day in Month & Day in Week Analysis: By examining the average percentage change for each day of the month and week, traders can identify specific days that historically have shown higher volatility or profitability. This allows for targeted trading strategies, focusing on these high-performance days to maximize potential gains.
Month Analysis: Understanding which months have historically provided better returns enables traders to adjust their trading intensity or capital allocation in anticipation of seasonally stronger or weaker periods.
Week in Month Analysis: Identifying which weeks within a month have historically been more profitable can help traders plan their trades around these periods, potentially increasing their chances of success.
โ Settings
Enable or disable the types of statistics you want to display in the table.
Table Size: Users can select the size of the table displayed on the chart, ranging from "Tiny" to "Auto," which adjusts based on screen size.
Table Position: Users can choose the location of the table 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!
MACD_TRIGGER_CROSS_TRIANGLEMACD Triangle Trigger Indicator by thebearfib
Overview
The MACD Cross Triangle Indicator is a powerful tool for traders who rely on the MACD's signal line crossovers to make informed trading decisions. This indicator enhances the traditional MACD by allowing users to customize triggers for bullish and bearish signals and by displaying these signals directly on the chart with visually distinctive labels.
Features
Customizable Color Scheme: Choose distinct colors for bullish and bearish signals to fit your chart's theme or your personal preference.
Flexible Trigger Conditions: Select from a variety of trigger conditions based on MACD and signal line behaviors over a specified number of bars back.
Visual Signal Indicators: Bullish and bearish signals are marked with upward and downward triangles, making it easy to spot potential entry or exit points.
Detailed Trigger Descriptions: A comprehensive table lists all available triggers and their descriptions, aiding in selection and understanding of each trigger's mechanism.
Configuration Options
Bullish and Bearish Colors: Customize the color of the labels for bullish (upward) and bearish (downward) signals.
Trend Lookback Period: Choose how far back (in bars) the indicator should look to determine the trend, affecting the calculation of certain triggers.
Trigger Selection for Bullish and Bearish Signals: Pick specific triggers for both bullish and bearish conditions from a list of 10 different criteria, ranging from MACD crossovers to historical comparisons of MACD, signal line, and histogram values.
Label Size and Font Settings: Adjust the size of the signal labels on the chart and the font size of the trigger descriptions table to ensure readability and fit with your chart layout.
Trigger Descriptions Table Position and Color: Customize the position and color of the trigger descriptions table to match your chart's aesthetic and layout preferences.
Trigger Mechanisms
Trigger 1 to 10: Each trigger corresponds to a specific condition involving the MACD line, signal line, and histogram. These include crossovers, directional changes compared to previous bars, and comparisons of current values to historical values.
Usage
1. Select Trigger Conditions: Choose the desired triggers for bullish and bearish signals based on your trading strategy.
2. Customize Visuals: Set your preferred colors for the bullish and bearish labels, adjust label and font sizes, and configure the trigger descriptions table.
3. Analyze Signals: Watch for the upward (bullish) and downward (bearish) triangles to identify potential trading opportunities based on MACD crossover signals.
Conclusion
The MACD Cross Triangle Indicator offers a customizable and visually intuitive way to leverage MACD crossover signals for trading. With its flexible settings and clear signal indicators, traders can tailor the indicator to fit their strategy and improve their decision-making process on TradingView.
Divergence AnalyzerUnlock the potential of your trading strategy with the Divergence Analyzer, a sophisticated indicator designed to identify divergence patterns between two financial instruments. Whether you're a seasoned trader or just starting, this tool provides valuable insights into market trends and potential trading opportunities.
Key Features:
1. Versatility in Symbol Selection:
- Choose from a wide range of symbols for comparison, including popular indices like XAUUSD and SPX.
- Seamlessly toggle between symbols to analyze divergences and make informed trading decisions.
2. Flexible Calculation Options:
- Customizable options allow you to use a different symbol for calculation instead of the chart symbol.
- Fine-tune your analysis by selecting specific symbols for comparison based on your trading preferences.
3. Logarithmic Scale Analysis:
- Utilizes logarithmic scales for accurate representation of price movements.
- Linear regression coefficients are calculated on the logarithmic scale, providing a comprehensive view of trend strength.
4. Dynamic Length and Smoothing:
- Adjust the length parameter to adapt the indicator to different market conditions.
- Smoothed linear regression with exponential moving averages enhances clarity and reduces noise.
5. Standard Deviation Normalization:
- Normalizes standard deviations over 200 periods, offering a standardized view of price volatility.
- Easily compare volatility levels across different symbols for effective divergence analysis.
6. Color-Coded Divergence Visualization:
- Clearly distinguish positive and negative divergences with customizable color options.
- Visualize divergence deltas with an intuitive color scheme for quick and effective interpretation.
7. Symbol Information Table:
- An included table provides at-a-glance information about the selected symbols.
- Identify Symbol 1 and Symbol 2, along with their corresponding positive and negative divergence colors.
How to Use:
1. Select symbols for analysis using the user-friendly inputs.
2. Customize calculation options based on your preferences.
3. Analyze the divergence delta plot for clear visual indications.
4. Refer to the symbol information table for a quick overview of selected instruments.
Empower your trading strategy with the Divergence Analyzer and gain a competitive edge in the dynamic world of financial markets. Start making more informed decisions today!
Z-ScoreThe "Z-Score" indicator is a unique and powerful tool designed to help traders identify overbought and oversold conditions in the market. Below is an explanation of its features, usefulness, and what makes it special:
Features:
Z-Score Calculation: The indicator calculates the Z-Score, a statistical measure that represents how far the current price is from the moving average (MA) in terms of standard deviations. It helps identify extreme price movements.
Customizable Parameters: Traders can adjust key parameters such as the Z-Score threshold, the type of MA (e.g., SMA, EMA), and the length of the moving average to suit their trading preferences.
Signal Options: The indicator offers flexibility in terms of signaling. Traders can choose whether to trigger signals when the Z-Score crosses the specified threshold or when it moves away from the threshold.
Visual Signals : Z-Score conditions are represented visually on the chart with color-coded background highlights. Overbought conditions are marked with a red background, while oversold conditions are indicated with a green background.
Information Table: A dynamic information table displays essential details, including the MA type, MA length, MA value, standard deviation, current price, and Z-Score. This information table helps traders make informed decisions.
Usefulness:
Overbought and Oversold Signals: Z-Score is particularly valuable for identifying overbought and oversold market conditions. Traders can use this information to potentially enter or exit positions.
Statistical Analysis: The Z-Score provides a statistical measure of price deviation, offering a data-driven approach to market analysis.
Customization: Traders can customize the indicator to match their trading strategies and preferences, enhancing its adaptability to different trading styles.
Visual Clarity: The visual signals make it easy for traders to quickly spot potential trade opportunities on the price chart.
In summary, the Z-Score indicator is a valuable tool for traders looking to incorporate statistical analysis into their trading strategies. Its customizability, visual signals, and unique statistical approach make it an exceptional choice for identifying overbought and oversold market conditions and potential trading opportunities.
RSI Screener Multi Timeframe [5ema]This indicator is the simple version of my indicator: RSI Screener and Divergence .
Only show table with values, signals at 5 custom timeframes.
-----
I reused some functions, made by (i believe that):
ยฉpaaax: The table position function.
@kingthies: The RSI divergence function.
@QuantNomad: The function calculated value and array screener for 40+ instruments.
I have commented in my code. Thanks so much!
-----
How it works:
1. Input :
Length of RSI => calculate RSI.
Upper/lower => checking RSI overbought/oversold.
Right bars / left bars => returns price of the pivot low & high point => checking divergence.
Range upper / lower bars => compare the low & high point => checking divergence.
Timeframe => request.security another time frame.
Table position => display screener table.
2. Input bool:
Regular Bearish divergence.
Hidden Bullish divergence .
Hidden Bearish divergence.
3. Basic calculated:
Make function for RSI , pivot low & high point of RSI and price.
Request.security that function for earch time frame.
Result RSI, Divergence.
4. Condition of signal:
Buy condition:
RSI oversold (1)
Bullish divergence (2).
=> Buy if (1) and (2), review buy (1) or (2).
Sell condition:
RSI overbought (3).
Bearish divergence (4).
=> Sell if (3) and (4), review sell (3) or (4).
-----
Table screener:
Time frame.
RSI (green - oversold, red - overbought)
Divergence (>> - regular bullish , << regular bearish , > - hidden bullish , < - hidden bearish ).
Signal (green โฆฟ - Buy, red โฆฟ - Sell, green ใ - review buy, red ใ - review sell).
- Regular Bearish divergence:
- Regular Bullish divergence:
- Regular Bullish divergence + RSI overSold
- Regular Bearish divergence + RSI overBought
-----
This indicator is for reference only, you need your own method and strategy.
If you have any questions, please let me know in the comments.
Price Range Volume Profile [Pt]โ Introduction
The Price Range Volume Profile (PRVP) is a revolutionary indicator. This tool stands out from its peers due to its unique ability to capture the entire price chart history, thus providing a comprehensive volume profile of the entire asset's trading history, as available on TradingView chart. It's worth noting that I believe this tool is the first of its kind to accomplish such a feat. A much recommended tool if you are a volume profile trader.
โ Main Features
โบ Historical Lookback: This feature dives deep into the past, grasping all the historical data of an asset. It's equipped to handle up to 20,000 bars, although users without a premium TradingView account are advised to keep it at a maximum of 10,000 bars, or just use the "Full Historical Lookback" feature.
โบ Volume Profile / POC: Displays the distribution of volume across price levels for the selected price range. The Point of Control (POC), which is the price level with the highest traded volume, is also highlighted.
โบ Customization: Users have the flexibility to adjust the profile's appearance, including profile width, horizontal offset, and the option to fill the background of the profile range.
โบ Time Weighting: This feature allows users to give more weight to recent trading activity, which can be especially useful for intraday traders or during times of high volatility. Note that this feature will impact the volume profile and POC level.
โบ Settings Table: A settings table is displayed on the chart for users to quickly reference their input parameters.
โ Input Parameters
โบ Lookback Timeframe: Determines the period for which the volume profile is generated.
โบ Price Range: The percentage distance to consider for the profile, adjusted above and below the current closing price.
โบ Profile Step size: The granularity of the volume profile. Users can opt for automatic step size based on a predefined calculation or set their preferred tick step size.
โบ Historical Bars Lookback: Determines the number of bars to include in the volume profile calculation.
โบ Profile Visuals: Adjust the appearance and layout of the volume profile on the chart.
โบ Extra: Additional settings including the display of a settings table and its location.
โ Basic Understanding of Volume Profile - How to use PRVP?
Volume Profile is a valuable tool for traders who want insights into where the majority of trading activity has occurred. Here are some tips to make the most of it:
โบ Understand the Basics: Before using the Volume Profile, ensure you understand the difference between it and the standard volume histogram. While both represent volume, the former displays it against price while the latter shows it against time.
โบ Identify High Volume Nodes (HVN) and Low Volume Nodes (LVN):
โ HVN: Areas where there's a lot of trading activity and where the price has spent a lot of time. These areas can act as strong support or resistance.
โ LVN: Areas where there's a lack of trading activity. Prices might move quickly through these areas, and they can act as potential breakpoints or accelerators for price movement.
โบ Locate the Point of Control (POC): This is the price level with the highest traded volume for a specified period. It often acts as a magnet for price, and it can serve as a pivot or reference point.
โบ Trend Confirmation: A shift in the volume profile from one price level to another can confirm a trend. For instance, if higher volume starts to build at higher price levels, it may indicate a strong uptrend.
โบ Watch for Volume Gaps: If there's a significant gap in the volume profile, prices may move quickly through these levels as there's little historical trading activity to act as support or resistance.
โ Other Usage Tips
โ For optimal performance, ensure that the chosen timeframe aligns closely with the chart timeframe. Differences in timeframes may lead to minor discrepancies in the volume profile.
โ To address any errors arising from too many levels displayed on the volume profile, consider increasing the Profile Step size or reducing the Price Range.
AI-Bank-Nifty Tech AnalysisThis code is a TradingView indicator that analyzes the Bank Nifty index of the Indian stock market. It uses various inputs to customize the indicator's appearance and analysis, such as enabling analysis based on the chart's timeframe, detecting bullish and bearish engulfing candles, and setting the table position and style.
The code imports an external script called BankNifty_CSM, which likely contains functions that calculate technical indicators such as the RSI, MACD, VWAP, and more. The code then defines several table cell colors and other styling parameters.
Next, the code defines a table to display the technical analysis of eight bank stocks in the Bank Nifty index. It then defines a function called get_BankComponent_Details that takes a stock symbol as input, requests the stock's OHLCV data, and calculates several technical indicators using the imported CSM_BankNifty functions.
The code also defines two functions called get_EngulfingBullish_Detection and get_EngulfingBearish_Detection to detect bullish and bearish engulfing candles.
Finally, the code calculates the technical analysis for each bank stock using the get_BankComponent_Details function and displays the results in the table. If the engulfing input is enabled, the code also checks for bullish and bearish engulfing candles and displays buy/sell signals accordingly.
The FRAMA stands for "Fractal Adaptive Moving Average," which is a type of moving average that adjusts its smoothing factor based on the fractal dimension of the price data. The fractal dimension reflects self-similarity at different scales. The FRAMA uses this property to adapt to the scale of price movements, capturing short-term and long-term trends while minimizing lag. The FRAMA was developed by John F. Ehlers and is commonly used by traders and analysts in technical analysis to identify trends and generate buy and sell signals. I tried to create this indicator in Pine.
In this context, "RS" stands for "Relative Strength," which is a technical indicator that compares the performance of a particular stock or market sector against a benchmark index.
The "Alligator" is a technical analysis tool that consists of three smoothed moving averages. Introduced by Bill Williams in his book "Trading Chaos," the three lines are called the Jaw, Teeth, and Lips of the Alligator. The Alligator indicator helps traders identify the trend direction and its strength, as well as potential entry and exit points. When the three lines are intertwined or close to each other, it indicates a range-bound market, while a divergence between them indicates a trending market. The position of the price in relation to the Alligator lines can also provide signals, such as a buy signal when the price crosses above the Alligator lines and a sell signal when the price crosses below them.
In addition to these, we have several other commonly used technical indicators, such as MACD, RSI, MFI (Money Flow Index), VWAP, EMA, and Supertrend. I used all the built-in functions for these indicators from TradingView. Thanks to the developer of this TradingView Indicator.
I also created a BankNifty Components Table and checked it on the dashboard.
Candle Counter [theEccentricTrader]โ โ OVERVIEW
This indicator counts the number of confirmed candle scenarios on any given candlestick chart and displays the statistics in a table, which can be repositioned and resized at the user's discretion.
โ โ CONCEPTS
Green and Red Candles
A green candle is one that closes with a high price equal to or above the price it opened.
A red candle is one that closes with a low price that is lower than the price it opened.
Upper Candle Trends
A higher high candle is one that closes with a higher high price than the high price of the preceding candle.
A lower high candle is one that closes with a lower high price than the high price of the preceding candle.
A double-top candle is one that closes with a high price that is equal to the high price of the preceding candle.
Lower Candle Trends
A higher low candle is one that closes with a higher low price than the low price of the preceding candle.
A lower low candle is one that closes with a lower low price than the low price of the preceding candle.
A double-bottom candle is one that closes with a low price that is equal to the low price of the preceding candle.
โ โ FEATURES
Inputs
Start Date
End Date
Position
Text Size
Show Sample Period
Show Plots
Table
The table is colour coded, consists of three columns and twenty-two rows. Blue cells denote all candle scenarios, green cells denote green candle scenarios and red cells denote red candle scenarios.
The candle scenarios are listed in the first column with their corresponding total counts to the right, in the second column. The last row in column one, row twenty-two, displays the sample period which can be adjusted or hidden via indicator settings.
Rows two and three in the third column of the table display the total green and red candles as percentages of total candles. Rows four to nine in column three, coloured blue, display the corresponding candle scenarios as percentages of total candles. Rows ten to fifteen in column three, coloured green, display the corresponding candle scenarios as percentages of total green candles. And lastly, rows sixteen to twenty-one in column three, coloured red, display the corresponding candle scenarios as percentages of total red candles.
Plots
I have added plots as a visual aid to the various candle scenarios listed in the table. Green up-arrows denote higher high candles when above bar and higher low candles when below bar. Red down-arrows denote lower high candles when above bar and lower low candles when below bar. Similarly, blue diamonds when above bar denote double-top candles and when below bar denote double-bottom candles. These plots can also be hidden via indicator settings.
โ โ HOW TO USE
This indicator is intended for research purposes and strategy development. I hope it will be useful in helping to gain a better understanding of the underlying dynamics at play on any given market and timeframe. It can, for example, give you an idea of any inherent biases such as a greater proportion of green candles to red. Or a greater proportion of higher low green candles to lower low green candles. Such information can be very useful when conducting top down analysis across multiple timeframes, or considering trailing stop loss methods.
What you do with these statistics and how far you decide to take your research is entirely up to you, the possibilities are endless.
This is just the first and most basic in a series of indicators that can be used to study objective price action scenarios and develop a systematic approach to trading.
โ โ LIMITATIONS
Some higher timeframe candles on tickers with larger lookbacks such as the DXY, do not actually contain all the open, high, low and close (OHLC) data at the beginning of the chart. Instead, they use the close price for open, high and low prices. So, while we can determine whether the close price is higher or lower than the preceding close price, there is no way of knowing what actually happened intra-bar for these candles. And by default candles that close at the same price as the open price, will be counted as green. You can avoid this problem by utilising the sample period filter.
The green and red candle calculations are based solely on differences between open and close prices, as such I have made no attempt to account for green candles that gap lower and close below the close price of the preceding candle, or red candles that gap higher and close above the close price of the preceding candle. I can only recommend using 24-hour markets, if and where possible, as there are far fewer gaps and, generally, more data to work with. Alternatively, you can replace the scenarios with your own logic to account for the gap anomalies, if you are feeling up to the challenge.
It is also worth noting that the sample size will be limited to your Trading View subscription plan. Premium users get 20,000 candles worth of data, pro+ and pro users get 10,000, and basic users get 5,000. If upgrading is currently not an option, you can always keep a rolling tally of the statistics in an excel spreadsheet or something of the like.
ConsoleLibrary "Console"
โ โ OVERVIEW
An easy way to output messages to a console like table using a a simple "print" function that can be called from anywhere in your code including functions.
โ โ Supports:
- Scrollable console messages
- Customisable number of displayed messages
- More than one "console" for different types of output if required
- The ability to choose which message to start viewing from (useful if the message list is long)
- The ability to place the console table at different positions on the chart to mitigate against
overwriting an existing table.
โ โ Limitations:
The "scrollbar" handle is actually a modified time widget handle. As the handle is grabbed and moved left or right across the chart bars, this script calculates the offset of the bar being pointed to from the last bar in the chart and uses that as the console message offset. However, It isn't possible to position this on the last chart bar with code.
So there are two solutions:
1) Manually change timestamp of the variable scrollStart to the current time (roughly)
eg. scrollStart = "25 Dec 2022 14:30 +0000"
2) Use a higher timeframe (Weeks or Months) and visually find the scroll bar. If it is to the right of the chart bars the console output will read NaN. Grab the handle and move it left and it will snap to the last chart candle position. If it is to the left then find it and move it to the right as needed.
โ โ Notes On Usage
- Import the library as console (the call will be console.print(...) )
- Assign a console variable name and call the console.initialise function
eg. var con1=console.initialise()
- Use the console.print() function to print a message or messages
This takes two parameters:
_consoleName :this is the console name you are printing to
_message: this is the message that you want to display. It is a string and can be built in the normal way using any pinescript string functions like str.tostring() etc
- Use the console.display function to display the messages.
To work as intended this display function should be placed at the last line with the following code
if i_showMessages
....if i_displayTable == "con1"
........display(con1, i_lineOffset, i_rowsToDisplay, i_gotoMsg, posn)
(More "consoles" can be written to and the example code provided with the library shows this in more detail. Also, the indents don't show in these notes)
Lastly, placement of a console.print() without a qualifying "if" statement will occur for every bar. This may be desired. If not then use under an if statement (example in the supplied code).
Happy debugging :)
-----------------------------------------------------------------------------------------------------------
initialise()
โโinitialise: creates the message array
โโParameters:
โโโโ none :
โโReturns: message array: this is assigned to the "console" identifier
print(_consoleName, _message)
โโused to output the desired text string to the console
โโParameters:
โโโโ _consoleName : : the message array
โโโโ _message : : the console message
โโReturns: none
display(_consoleName, _lineOffset, _rowsToDisplay, _gotoMsg, _posn)
โโdisplay: placed in the last section of code. Displays the console messages
โโParameters:
โโโโ _consoleName : : the message array
โโโโ _lineOffset : : the setting of the scroll bar (time widget)
โโโโ _rowsToDisplay : : how many rows to show in the console table
โโโโ _gotoMsg : : which message to display from (default is 0)
โโโโ _posn : : where the console table will be displayed
โโReturns: none
_matrixLibrary "_matrix"
Library helps visualize matrix as array of arrays and enables users to use array methods such as push, pop, shift, unshift etc along with cleanup activities on drawing objects wherever required
unshift(mtx, row) unshift array of lines to first row of the matrix
โโParameters:
โโโโ mtx : matrix of lines
โโโโ row : array of lines to be inserted in row
โโReturns: resulting matrix of lines
unshift(mtx, row) unshift array of labels to first row of the matrix
โโParameters:
โโโโ mtx : matrix of labels
โโโโ row : array of labels to be inserted in row
โโReturns: resulting matrix labels
unshift(mtx, row) unshift array of boxes to first row of the matrix
โโParameters:
โโโโ mtx : matrix of boxes
โโโโ row : array of boxes to be inserted in row
โโReturns: resulting matrix of boxes
unshift(mtx, row) unshift array of linefill to first row of the matrix
โโParameters:
โโโโ mtx : matrix of linefill
โโโโ row : array of linefill to be inserted in row
โโReturns: resulting matrix of linefill
unshift(mtx, row) unshift array of tables to first row of the matrix
โโParameters:
โโโโ mtx : matrix of tables
โโโโ row : array of tables to be inserted in row
โโReturns: resulting matrix of tables
unshift(mtx, row) unshift array of int to first row of the matrix
โโParameters:
โโโโ mtx : matrix of int
โโโโ row : array of int to be inserted in row
โโReturns: resulting matrix of int
unshift(mtx, row) unshift array of float to first row of the matrix
โโParameters:
โโโโ mtx : matrix of float
โโโโ row : array of float to be inserted in row
โโReturns: resulting matrix of float
unshift(mtx, row) unshift array of bool to first row of the matrix
โโParameters:
โโโโ mtx : matrix of bool
โโโโ row : array of bool to be inserted in row
โโReturns: resulting matrix of bool
unshift(mtx, row) unshift array of string to first row of the matrix
โโParameters:
โโโโ mtx : matrix of string
โโโโ row : array of string to be inserted in row
โโReturns: resulting matrix of string
unshift(mtx, row) unshift array of color to first row of the matrix
โโParameters:
โโโโ mtx : matrix of colors
โโโโ row : array of colors to be inserted in row
โโReturns: resulting matrix of colors
push(mtx, row) push array of lines to end of the matrix row
โโParameters:
โโโโ mtx : matrix of lines
โโโโ row : array of lines to be inserted in row
โโReturns: resulting matrix of lines
push(mtx, row) push array of labels to end of the matrix row
โโParameters:
โโโโ mtx : matrix of labels
โโโโ row : array of labels to be inserted in row
โโReturns: resulting matrix of labels
push(mtx, row) push array of boxes to end of the matrix row
โโParameters:
โโโโ mtx : matrix of boxes
โโโโ row : array of boxes to be inserted in row
โโReturns: resulting matrix of boxes
push(mtx, row) push array of linefill to end of the matrix row
โโParameters:
โโโโ mtx : matrix of linefill
โโโโ row : array of linefill to be inserted in row
โโReturns: resulting matrix of linefill
push(mtx, row) push array of tables to end of the matrix row
โโParameters:
โโโโ mtx : matrix of tables
โโโโ row : array of tables to be inserted in row
โโReturns: resulting matrix of tables
push(mtx, row) push array of int to end of the matrix row
โโParameters:
โโโโ mtx : matrix of int
โโโโ row : array of int to be inserted in row
โโReturns: resulting matrix of int
push(mtx, row) push array of float to end of the matrix row
โโParameters:
โโโโ mtx : matrix of float
โโโโ row : array of float to be inserted in row
โโReturns: resulting matrix of float
push(mtx, row) push array of bool to end of the matrix row
โโParameters:
โโโโ mtx : matrix of bool
โโโโ row : array of bool to be inserted in row
โโReturns: resulting matrix of bool
push(mtx, row) push array of string to end of the matrix row
โโParameters:
โโโโ mtx : matrix of string
โโโโ row : array of string to be inserted in row
โโReturns: resulting matrix of string
push(mtx, row) push array of colors to end of the matrix row
โโParameters:
โโโโ mtx : matrix of colors
โโโโ row : array of colors to be inserted in row
โโReturns: resulting matrix of colors
shift(mtx) shift removes first row from matrix of lines
โโParameters:
โโโโ mtx : matrix of lines from which the shift operation need to be performed
โโReturns: void
shift(mtx) shift removes first row from matrix of labels
โโParameters:
โโโโ mtx : matrix of labels from which the shift operation need to be performed
โโReturns: void
shift(mtx) shift removes first row from matrix of boxes
โโParameters:
โโโโ mtx : matrix of boxes from which the shift operation need to be performed
โโReturns: void
shift(mtx) shift removes first row from matrix of linefill
โโParameters:
โโโโ mtx : matrix of linefill from which the shift operation need to be performed
โโReturns: void
shift(mtx) shift removes first row from matrix of tables
โโParameters:
โโโโ mtx : matrix of tables from which the shift operation need to be performed
โโReturns: void
shift(mtx) shift removes first row from matrix of int
โโParameters:
โโโโ mtx : matrix of int from which the shift operation need to be performed
โโReturns: void
shift(mtx) shift removes first row from matrix of float
โโParameters:
โโโโ mtx : matrix of float from which the shift operation need to be performed
โโReturns: void
shift(mtx) shift removes first row from matrix of bool
โโParameters:
โโโโ mtx : matrix of bool from which the shift operation need to be performed
โโReturns: void
shift(mtx) shift removes first row from matrix of string
โโParameters:
โโโโ mtx : matrix of string from which the shift operation need to be performed
โโReturns: void
shift(mtx) shift removes first row from matrix of colors
โโParameters:
โโโโ mtx : matrix of colors from which the shift operation need to be performed
โโReturns: void
pop(mtx) pop removes last row from matrix of lines
โโParameters:
โโโโ mtx : matrix of lines from which the pop operation need to be performed
โโReturns: void
pop(mtx) pop removes last row from matrix of labels
โโParameters:
โโโโ mtx : matrix of labels from which the pop operation need to be performed
โโReturns: void
pop(mtx) pop removes last row from matrix of boxes
โโParameters:
โโโโ mtx : matrix of boxes from which the pop operation need to be performed
โโReturns: void
pop(mtx) pop removes last row from matrix of linefill
โโParameters:
โโโโ mtx : matrix of linefill from which the pop operation need to be performed
โโReturns: void
pop(mtx) pop removes last row from matrix of tables
โโParameters:
โโโโ mtx : matrix of tables from which the pop operation need to be performed
โโReturns: void
pop(mtx) pop removes last row from matrix of int
โโParameters:
โโโโ mtx : matrix of int from which the pop operation need to be performed
โโReturns: void
pop(mtx) pop removes last row from matrix of float
โโParameters:
โโโโ mtx : matrix of float from which the pop operation need to be performed
โโReturns: void
pop(mtx) pop removes last row from matrix of bool
โโParameters:
โโโโ mtx : matrix of bool from which the pop operation need to be performed
โโReturns: void
pop(mtx) pop removes last row from matrix of string
โโParameters:
โโโโ mtx : matrix of string from which the pop operation need to be performed
โโReturns: void
pop(mtx) pop removes last row from matrix of colors
โโParameters:
โโโโ mtx : matrix of colors from which the pop operation need to be performed
โโReturns: void
clear(mtx) clear clears the matrix of lines
โโParameters:
โโโโ mtx : matrix of lines which needs to be cleared
โโReturns: void
clear(mtx) clear clears the matrix of labels
โโParameters:
โโโโ mtx : matrix of labels which needs to be cleared
โโReturns: void
clear(mtx) clear clears the matrix of boxes
โโParameters:
โโโโ mtx : matrix of boxes which needs to be cleared
โโReturns: void
clear(mtx) clear clears the matrix of linefill
โโParameters:
โโโโ mtx : matrix of linefill which needs to be cleared
โโReturns: void
clear(mtx) clear clears the matrix of tables
โโParameters:
โโโโ mtx : matrix of tables which needs to be cleared
โโReturns: void
clear(mtx) clear clears the matrix of int
โโParameters:
โโโโ mtx : matrix of int which needs to be cleared
โโReturns: void
clear(mtx) clear clears the matrix of float
โโParameters:
โโโโ mtx : matrix of float which needs to be cleared
โโReturns: void
clear(mtx) clear clears the matrix of bool
โโParameters:
โโโโ mtx : matrix of bool which needs to be cleared
โโReturns: void
clear(mtx) clear clears the matrix of string
โโParameters:
โโโโ mtx : matrix of string which needs to be cleared
โโReturns: void
clear(mtx) clear clears the matrix of colors
โโParameters:
โโโโ mtx : matrix of colors which needs to be cleared
โโReturns: void
Logging in Pine ScriptI'm building quite a lot of pretty complicated indicators/strategies in Pine Script. Quite often they don't work from the 1 try so I have to debug them heavily.
In Pine Script there are no fancy debuggers so you have to be creative. You can plot values on your screens, check them in the data window, etc.
If you want to display some textual information, you can plot some info as labels on the screen.
It's not the most convenient way, so with the appearance of tables in Pine Script, I decided to implement a custom logger that will allow me to track some useful information about my indicator over time.
Tables work much better for this kind of thing than labels. They're attached to your screen, you can nicely scale them and you can style them much better.
The idea behind it is very simple. I used few arrays to store the message, bar number, timestamp, and type of the message (you can color messages depend on the type for example).
There is a function log_msg that just append new messages to these arrays.
In the end, for the last bar, I create the table and display the last X messages in it.
In parameters, you can show/hide the entire journal, change the number of messages displayed and choose an offset. With offset, you can basically scroll through the history of messages.
Currently, I implemented 3 types of messages, and I color messages according to these types:
Message - gray
Warning - yellow
Error - red
Of course, it's a pretty simple example, you can create a much fancier way of styling your logs.
What do you think about it? Is it useful for you? What do you use to debug code in Pine Script?
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 good as in historical backtesting.
This post and the script donโt provide any financial advice.
Daily GAP StatsI did not write the script from scratch but rather started editing code of an existing one. The original code came from a script called GAP DETECTOR by @Asch-
First up: I am a trader, not a programmer and therefore my code most likely is inefficient. If someone with more expertise would like to help and optimize it - feel free to get in touch, I am always happy to learn some new tricks. :)
This script does 2 things:
- It shows daily gaps stats based on user inputs
- It shows color coded labels on gap days with additional information in tooltips ( important: make sure to read 'known issues/limitations' at the end )
User Inputs
==========
Although the input dialog is pretty straight forward, I do a quick rundown:
- Length: max lookback time
- Gap Direction: self explanatory
- Show All Gaps | Cont Only | Reversal Only | Off:
This refers to the way labels are displayed on gap days (again: make sure to read known issues/limitations!)
- Show All Gaps: does what it says
- Cont Only: only shows gaps where price continued in the gap direction. If you filter for gap ups and chose 'Cont only' you will only see labels on gap days where price closed above the open (and vice versa if you scan for gap downs).
- Reversal Only: you will only see labels for closes below the open on gap up days (and the opposite on gap down days)
- Off: self explanatory
- Gap Measure in ATR/PCT: self explanatory, ATR is calculated over a 10d period
- Gap Size (Abs Values): no negative values allowed here. If you filter for gap downs and enter 3 it means it will show gaps where the stock fell more than 3 ATR/PCT on the open.
- RVOL Factor: along with significant gaps should come significant volume. RVOL = volume of the gap day / 20d average volume
- Viewing Options: Placing the stats label in the window is a bit tricky (see knonw issues/limitations) and I was not sure which way I liked better. See for yourself what works best for you.
Known Isusses/Limitations:
=======================
- Positioning of the stats table:
As to my knowledge, Tradingview only allows label positioning relative to price and not relative to the chart window. I tried to always display the gap stats table in the upper right corner, using 52wk high as y-coordinate. This works ok most of the time, but is not pretty. If anybody has some fancy way to tag the label in a fixed position, please get in touch.
- Max number of labels per script:
TradingView has a limitation that allows a maxium of ~50 labels per script. If there are more labels, TradingView will automatically cut the oldest ones, without any notification. I have found this behaviour to be rather inconsistent - sometimes it'll dump labels even if there are a lot fewer than 50. Hopefully TradingView will drop this limitation at one point in the future.
Important: The inconsistent display of the gap day labels has NO INFLUENCE on the calculations in the gap stats table - the count and the calculations are complete and correct!
Unmitigated MTF High Low - Cave Diving Plot
IntroductionThe Unmitigated MTF High Low -
Cave Diving Plot is a multi-timeframe (MTF) indicator designed for NQ and ES futures traders who want to identify high-probability entry and exit zones based on unmitigated price levels. The "Cave Diving" visualization helps you navigate between support (floor) and resistance (ceiling) zones, while the integrated Strat analysis provides directional context.
Who Is This For?
Futures traders (NQ, ES) trading during ETH and RTH sessions
Scalpers and day traders looking for precise entry/exit levels
Traders using The Strat methodology for directional analysis
Anyone seeking confluence between price action and key levels
Core Concepts
1. Unmitigated Level:
An unmitigated level is a price high or low that has been created but not yet tested (touched) by price. These levels act as magnets - price often returns to test them.Key Properties:
Resistance (Highs): Price has created a high but hasn't revisited it
Support (Lows): Price has created a low but hasn't revisited it
Mitigation: When price touches a level, it becomes "mitigated" and loses strength
2. The Cave Diving MetaphorThink of trading as cave diving between two zones:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ CEILING (Upper Band) โ โ 1st & 2nd Unmitigated Highs
โ ๐ฅ Resistance Zone โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ THE TUNNEL โ โ Price navigates here
โ (Trading Channel) โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ ๐ข Support Zone โ
โ FLOOR (Lower Band) โ โ 1st & 2nd Unmitigated Lows
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Trading Concept:
Ceiling: Formed by the 1st and 2nd most recent unmitigated highs
Floor: Formed by the 1st and 2nd most recent unmitigated lows
Tunnel: The space between ceiling and floor where price operates
Cave Diving: Navigating between these zones for entries and exits
3. Session-Based Age TrackingLevels are tracked by session age:
Session: 6:00 PM to 5:00 PM NY time (23-hour window)
Age 0: Created in the current session (today)
Age 1: Created 1 session ago (yesterday)
Age 2+: Older levels (more significant)
Why Age Matters:
Older unmitigated levels are typically stronger magnets
Fresh levels (Age 0) may be weaker and easier to break
Age 2+ levels often provide high-probability reversal zones
Indicator Components
Visual Elements
1. Colored Bands (Cave Zones)Upper Band (Pink/Maroon - 95% transparency)
Space between 1st and 2nd unmitigated highs
Acts as resistance zone
Price often hesitates or reverses here
Lower Band (Teal - 95% transparency)
Space between 1st and 2nd unmitigated lows
Acts as support zone
Price often finds buyers here
2. Information Table Located in your chosen corner (default: Bottom Right), the table displays:
5 most recent unmitigated highs (top section)
Tunnel row (middle separator)
5 most recent unmitigated lows (bottom section)
Reading the TableTable Structure
โโโโโโโโโโฌโโโโโโโโโโโฌโโโโโโโโโฌโโโโโโโโ
โ Level โ $ โ Points โ Age โ
โโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโผโโโโโโโโค
โ โโโโโ โ 21,450.25โ +45.30 โ 3 โ โ 5th High (oldest)
โ โโโโ โ 21,425.50โ +32.75 โ 2 โ โ 4th High
โ โโโ โ 21,410.00โ +25.00 โ 1 โ โ 3rd High
โ โโ โ 21,400.75โ +18.50 โ 1 โ โ 2nd High
โ โ โ 21,395.25โ +12.00 โ 0 โ โ 1st High (newest)
โโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโผโโโโโโโโค
โ Tunnel โ ๐ข โ ฮ 85.50โ 2U โ โ Current State
โโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโผโโโโโโโโค
โ โ โ 21,310.00โ -15.25 โ 0 โ โ 1st Low (newest)
โ โโ โ 21,295.50โ -22.75 โ 1 โ โ 2nd Low
โ โโโ โ 21,280.25โ -30.00 โ 1 โ โ 3rd Low
โ โโโโ โ 21,265.75โ -38.50 โ 2 โ โ 4th Low
โ โโโโโ โ 21,250.00โ -45.00 โ 3 โ โ 5th Low (oldest)
โโโโโโโโโโดโโโโโโโโโโโดโโโโโโโโโดโโโโโโโโColumn
Breakdown
Column 1: Level (Arrows)
Green arrows (โ): Resistance levels above current price
Red arrows (โ): Support levels below current price
Arrow count: Indicates recency (1 arrow = newest, 5 arrows = oldest)
Why This Matters:
More arrows = older level = stronger magnet for price
Column 2: $ (Price)
Exact price of the unmitigated level
Use this for limit orders and stop placement
Column 3: Points (Distance)
Positive (+) for highs: Points above current price
Negative (-) for lows: Points below current price
Helps gauge proximity to key levels
Trading Application:
If you're +2.50 points from resistance, a reversal may be imminent
If you're -45.00 points from support, you're far from the floor
Column 4: Age (Sessions)
Number of full 6pm-5pm sessions the level has survived
Age 0: Created today (current session)
Age 1+: Created in previous sessions
Significance Ladder:
Age 0: Weak, may break easily
Age 1-2: Medium strength
Age 3+: Strong, high-probability reaction zone
Tunnel Row (Critical Information)โ Tunnel โ ๐ข โ ฮ 85.50โ 2U โ
โโโฌโโ โโโฌโโ โโโโฌโโโ โโโฌโโ
โ โ โ โ
Label Direction Range Strat
1. Tunnel Label: Identifies the separator row
2. Direction Indicator (๐ข/๐ด)
๐ข Green Circle: Current 15m bar closed bullish (above previous close)
๐ด Red Circle: Current 15m bar closed bearish (below previous close)
3. ฮ (Delta/Range)
Distance in points between 1st High and 1st Low
Shows the tunnel width (trading range)
Example: ฮ 85.50 = 85.50 points between ceiling and floor
Trading Use:
Wide tunnel (>100 points): More room to trade, consider range strategies
Narrow tunnel (<50 points): Tight range, expect breakout
4. Strat Pattern
1: Inside bar (consolidation)
2U: 2 Up (bullish directional bar)
2D: 2 Down (bearish directional bar)
3: Outside bar (expansion/volatility)
Color Coding:
Green: 2U (bullish)
Red: 2D (bearish)
Yellow: 3 (expansion)
Gray: 1 (inside/neutral)
Annual Lump Sum: Yearly & CompoundedAnnual Lump Sum Investment Analyzer (Yearly vs. Compounded)
Overview
This Pine Script indicator simulates a disciplined "Lump Sum" investing strategy. It calculates the performance of buying a fixed dollar amount (e.g., $10,000) on the very first trading day of every year and holding it indefinitely.
Unlike standard backtesters that only show a total percentage, this tool breaks down performance by "Vintage" (the year of purchase), allowing you to see which specific years contributed most to your wealth.
Key Features
Automated Execution: Automatically detects the first trading bar of every new year to simulate a buy.
Dual-Yield Analysis: The table provides two distinct ways to view returns:
Yearly %: How the market performed specifically during that calendar year (Jan 1 to Dec 31).
Compounded %: The total return of that specific year's investment from the moment it was bought until today.
Live Updates: For the current year, the "End Price" and "Yields" update in real-time with market movements.
Portfolio Summary: Displays your Total Invested Capital vs. Total Current Value at the top of the table.
Table Column Breakdown
The dashboard in the bottom-right corner displays the following:
Year: The vintage year of the investment.
Buy Price: The price of the asset on the first trading day of that year.
End Price: The price on the last trading day of that year (or the current price if the year is still active).
Yearly %: The isolated performance of that specific calendar year. (Green = The market ended the year higher than it started).
Compounded %: The "Diamond Hands" return. This shows how much that specific $10,000 tranche is up (or down) right now relative to the current price.
How to Use
Add the script to your chart.
Crucial: Set your chart timeframe to Daily (D). This ensures the script correctly identifies the first trading day of the year.
Open the Settings (Inputs) to adjust:
Annual Investment Amount: Default is $10,000.
Table Size: Adjust text size (Tiny, Small, Normal, Large).
Max Rows: Limit how many historical years are shown to keep the chart clean.
Use Case
This tool is perfect for investors who want to visualize the power of long-term holding. It allows you to see that even if a specific year had a bad "Yearly Yield" (e.g., buying in 2008), the "Compounded Yield" might still be massive today due to time in the market.
Altcoin Relative Macro StrengthAltcoin Relative Macro Strength
Overview
The Altcoin Relative Macro Strength indicator measures the altcoin market's price performance relative to global macroeconomic conditions. By comparing TOTAL3ES (total altcoin market capitalization excluding Bitcoin, Ethereum and stable coins) against a composite macro trend, the indicator identifies periods of relative overvaluation and undervaluation.
Methodology
Global Macro Trend Calculation:
The macro trend synthesizes three primary components:
- ISM PMI โ A proxy for the business cycle phase
- Global Liquidity โ An aggregate measure of major central bank balance sheets and broad money supply
- IWM (Russell 2000) โ Small-cap equity exposure, reflecting risk-on/risk-off market sentiment
Global Liquidity is calculated as:
Fed Balance Sheet - Reverse Repo - Treasury General Account + U.S. M2 + China M2
The final Global Macro Trend is:
ISM PMI ร Global Liquidity ร IWM
Theoretical Framework:
The global macro trend integrates liquidity expansion/contraction with business cycle dynamics and small-cap equity performance. The inclusion of IWM reflects altcoins' tendency to behave as high-beta risk assets, exhibiting sensitivity similar to small-cap equities. This composite exhibits strong directional correlation with altcoin market movements, capturing the risk-on/risk-off dynamics that drive altcoin performance.
Interpretation
Primary Signal:
The histogram displays the rolling percentage change of TOTAL3ES relative to the global macro trend (default: 21-period average). Positive divergence indicates altcoins are outperforming macro conditions; negative divergence suggests underperformance relative to the underlying economic and risk environment.
Data Tables:
Alts/Macro Change โ Percentage deviation of the altcoin market's average value from the Global Macro Trend's average over the specified period
Macro Trend โ Directional assessment of the macro trend based on slope and trend agreement:
๐ต BULLISH โฒ โ Positive slope with upward trend
โช NEUTRAL โ โ Slope and trend direction disagree
๐ฃ BEARISH โผ โ Negative slope with downward trend
Macro Slope โ Percentage rate of change in the global macro trend
Altcoin Valuation โ Relative valuation category based on TOTAL3/Macro deviation:
๐ข Extreme Discount / Deep Discount / Discount
๐ก Fair Value
๐ด Premium / Large Premium / Extreme Premium
TOTAL3ES Mcap โ Current total altcoin market capitalization (in billions)
Visual Components:
๐ Histogram: Alts/Macro Change
๐ข Green = Positive deviation (altcoins outperforming)
๐ด Red = Negative deviation (altcoins underperforming)
๐ Macro Slope Line
Color-coded to match trend assessment
Scaled for visibility (adjustable in settings)
Application
This indicator is designed to identify mean reversion opportunities by highlighting periods when the altcoin market materially diverges from fundamental macro and risk conditions. Extreme positive values may indicate overvaluation; extreme negative values may signal undervaluation relative to the prevailing economic and risk appetite backdrop.
Strategy Considerations:
- Identify extremes: Look for periods when the histogram reaches elevated positive or negative levels
- Assess valuation: Use the Altcoin Valuation reading to gauge relative over/undervaluation
Confirm with risk sentiment: Check whether macro conditions and risk appetite support or contradict current price levels
- Mean reversion: Consider that significant deviations from trend historically tend to revert
Note: This indicator identifies relative valuation based on macro conditions and risk sentimentโit does not predict price direction or timing.
Settings
Lookback Period โ 21 bars (default) โ Number of bars for calculating rolling averages
Macro Slope Scale โ 3.0 (default) โ Multiplier for macro slope line visibility
YM Ultimate SNIPER# YM Ultimate SNIPER - Documentation & Trading Guide
## ๐ฏ Unified GRA + DeepFlow | YM-Optimized for Low Volatility
**TARGET: 3-7 High-Confluence Trades per Day**
> **Philosophy:** *YM's lower volatility is not a weaknessโit's our edge. Predictability + precision = consistent profits.*
---
## โก QUICK REFERENCE CARD
```
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ YM ULTIMATE SNIPER - QUICK REFERENCE โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ ๐ฐ YM BASICS: โ
โ โโโโโโโโโโโโโ โ
โ โข 1 tick = 1 point = $5/contract โ
โ โข Typical daily range: 150-400 points โ
โ โข 30-40% less volatile than NQ โ
โ โข More institutional, less retail noise โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ ๐ฏ TIER THRESHOLDS (YM-OPTIMIZED): โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ S-TIER: 50+ pts = $250+/contract โ HOLD (Institutional sweep) โ
โ A-TIER: 25-49 pts = $125-245/contract โ SWING (Strong momentum) โ
โ B-TIER: 12-24 pts = $60-120/contract โ SCALP (Quick grab) โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ โฐ SESSION WINDOWS: โ
โ โโโโโโโโโโโโโโโโโโโ โ
โ LDN โ 3:00-5:00 AM ET (European flow) โ
โ NY โ 9:30-11:30 AM ET (US opening drive) โ
โ PWR โ 3:00-4:00 PM ET (End-of-day rebalancing) โ
โ โ
โ Expected Trades: 1-2 LDN | 2-3 NY | 1-2 PWR = 4-7 total โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ ๐ CONFLUENCE SCORING (MAX 10 POINTS): โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ Tier Signal: S=3, A=2, B=1 points โ
โ In Active Zone: +2 points โ
โ POC Aligned: +1 point (POC at body extreme) โ
โ Imbalance Support:+1 point (supporting IMB nearby) โ
โ Strong Volume: +1 point (2x+ average) โ
โ Strong Delta: +1 point (70%+ dominance) โ
โ CVD Momentum: +1 point (CVD trending with signal) โ
โ โ
โ MINIMUM SCORE: 5/10 to show signal (adjustable) โ
โ IDEAL SCORE: 7+/10 for highest probability โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ ๐จ SIGNAL TYPES: โ
โ โโโโโโโโโโโโโโโโโ โ
โ S๐ฏ / A๐ฏ / B๐ฏ โ GRA Tier Signals (Full confluence) โ
โ Z๐ฏ โ Zone Entry (At DFZ zone + delta + volume) โ
โ SP โ Single Print (Institutional impulse) โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ โ ENTRY CHECKLIST: โ
โ โโโโโโโโโโโโโโโโโโโ โ
โ โก Signal appears (check Score โฅ5) โ
โ โก Session active (LDN!/NY!/PWR!) โ
โ โก Table: Vol GREEN, Delta colored, Body GREEN โ
โ โก CVD arrow (โฒ/โผ) matches direction โ
โ โก Note stop/target lines on chart โ
โ โก Check Zone status (bonus if IN ZONE) โ
โ โก Execute at signal candle close โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ ๐ฏ POSITION SIZING BY TIER: โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ S-TIER (50+ pts): Full size, hold 2-5 min, target 2.5:1 R:R โ
โ A-TIER (25-49): 75% size, hold 1-3 min, target 2.0:1 R:R โ
โ B-TIER (12-24): 50% size, hold 30-90 sec, target 1.5:1 R:R โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ โ DO NOT TRADE WHEN: โ
โ โโโโโโโโโโโโโโโโโโโโ โ
โ โ Session shows "---" โ
โ โ Score < 5/10 โ
โ โ Vol shows RED (<1.8x) โ
โ โ Delta < 62% โ
โ โ Multiple conflicting signals โ
โ โ Just before major news (FOMC, NFP, etc.) โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
```
---
## ๐ WHY YM? LEVERAGING LOW VOLATILITY
### The YM Advantage
Most traders avoid YM because "it doesn't move enough." This is precisely why it's perfect for precision scalping:
| Factor | NQ | YM | Advantage |
|--------|----|----|-----------|
| **Daily Range** | 300-600 pts | 150-400 pts | More predictable moves |
| **Tick Value** | $5/tick (4 ticks/pt) | $5/tick (1 tick/pt) | Simpler math |
| **Retail Noise** | High | Low | Cleaner signals |
| **Whipsaws** | Frequent | Rare | Fewer fakeouts |
| **Trend Persistence** | Short | Long | Easier holds |
| **Fill Quality** | Variable | Consistent | Better execution |
### Why 3-7 Trades is the Sweet Spot
```
YM SESSION BREAKDOWN:
โโโโโโโโโโโโโโโโโโโโ
LONDON (3-5 AM ET): 1-2 trades
โโโ Why: European institutions positioning for US open
โโโ Character: Slow build-up, clean trends
โโโ Best signals: Zone entries + A/B tier
NY OPEN (9:30-11:30 AM ET): 2-3 trades
โโโ Why: Highest volume, most institutional activity
โโโ Character: Initial balance formation, breakouts
โโโ Best signals: S/A tier, zone confluence
POWER HOUR (3-4 PM ET): 1-2 trades
โโโ Why: End-of-day rebalancing, MOC orders
โโโ Character: Mean reversion or trend acceleration
โโโ Best signals: Zone entries, B tier quick scalps
TOTAL: 4-7 high-quality setups per day
```
---
## ๐ง YM-SPECIFIC OPTIMIZATIONS
This unified indicator has been specifically tuned for YM's characteristics:
### Tier Thresholds
| Tier | NQ (Original) | YM (Optimized) | Rationale |
|------|---------------|----------------|-----------|
| S-Tier | 100 pts | **50 pts** | YM's daily range is ~50% of NQ |
| A-Tier | 50 pts | **25 pts** | Proportional scaling |
| B-Tier | 20 pts | **12 pts** | Still 5%+ of typical daily range |
### Filter Adjustments
| Filter | NQ Value | YM Value | Why |
|--------|----------|----------|-----|
| Volume Ratio | 1.5x | **1.8x** | Higher bar = less retail noise |
| Delta Threshold | 60% | **62%** | Tighter for cleaner signals |
| Body Ratio | 70% | **72%** | More conviction required |
| Range Multiplier | 1.3x | **1.4x** | Bigger move = real signal |
| Gap ATR% | 30% | **25%** | Smaller gaps still significant |
| Zone Age | 50 bars | **75 bars** | Zones last longer in slow market |
### Why These Changes Work
1. **Higher Volume Bar**: YM has more institutional flow. Requiring 1.8x volume ensures we're catching real moves, not retail chop.
2. **Tighter Delta**: With less noise, we can demand clearer buyer/seller dominance before entering.
3. **Longer Zone Life**: YM trends persist longer. A zone that would be stale in NQ is still viable in YM.
4. **Smaller Gap Threshold**: YM gaps are naturally smaller. 25% of ATR in YM is significant institutional activity.
---
## ๐ CONFLUENCE SCORING SYSTEM
The unified indicator uses a 10-point confluence scoring system to filter for only the highest-probability setups:
### Score Breakdown
```
CONFLUENCE SCORE CALCULATION:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
BASE POINTS (Tier):
โโโ S-Tier signal: +3 points
โโโ A-Tier signal: +2 points
โโโ B-Tier signal: +1 point
BONUS POINTS:
โโโ Inside Active Zone (DFZ): +2 points
โ โโโ Price within bull/bear zone = institutional level
โ
โโโ POC Alignment: +1 point
โ โโโ POC at body extreme = strong conviction
โ
โโโ Imbalance Support: +1 point
โ โโโ Supporting imbalance within 1 ATR
โ
โโโ Strong Volume (2x+): +1 point
โ โโโ Exceptional institutional participation
โ
โโโ Strong Delta (70%+): +1 point
โ โโโ Clear one-sided aggression
โ
โโโ CVD Momentum: +1 point
โโโ CVD trending with signal direction
MAXIMUM POSSIBLE: 10 points
```
### Score Interpretation
| Score | Quality | Action | Expected Win Rate |
|-------|---------|--------|-------------------|
| 8-10 | ๐ฅ Elite | Full size, hold for target | 75-80% |
| 6-7 | ๐ฅ Strong | Standard size, manage actively | 65-70% |
| 5 | ๐ฅ Valid | Reduced size, quick scalp | 55-60% |
| <5 | โซ Filtered | No signal shown | N/A |
### Adjusting Minimum Score
- **Conservative (Score โฅ6)**: Fewer trades, higher win rate
- **Standard (Score โฅ5)**: Balanced approach, 3-7 trades/day
- **Aggressive (Score โฅ4)**: More trades, requires active management
---
## ๐ SIGNAL TYPES EXPLAINED
### 1. GRA Tier Signals (S๐ฏ, A๐ฏ, B๐ฏ)
These are the primary signals from the merged GRA system:
```
TIER SIGNAL REQUIREMENTS:
โโโโโโโโโโโโโโโโโโโโโโโโโโโ
ALL must be TRUE:
โโโ โ Point movement meets tier threshold
โโโ โ Volume โฅ 1.8x average
โโโ โ Delta โฅ 62% (buy or sell dominance)
โโโ โ Body โฅ 72% of candle range
โโโ โ Range โฅ 1.4x average
โโโ โ Small opposite wick (<50% of body)
โโโ โ CVD confirms direction (if enabled)
โโโ โ Active session (LDN/NY/PWR)
โโโ โ Confluence Score โฅ minimum (default 5)
```
### 2. Zone Entry Signals (Z๐ฏ)
When price enters a DeepFlow zone with confirmation:
```
ZONE ENTRY REQUIREMENTS:
โโโโโโโโโโโโโโโโโโโโโโโโโโโ
ALL must be TRUE:
โโโ โ Price inside fresh/tested zone (not broken)
โโโ โ Delta โฅ 62% in zone direction
โโโ โ Volume โฅ 1.5x average
โโโ โ Active session
NOTE: Z๐ฏ only appears when NOT already showing tier signal
(prevents duplicate signals on same candle)
```
### 3. Single Print Markers (SP)
Mark institutional impulse candles for future S/R:
```
SINGLE PRINT REQUIREMENTS:
โโโโโโโโโโโโโโโโโโโโโโโโโโโ
ALL must be TRUE:
โโโ โ Range โฅ 1.6x average
โโโ โ Body โฅ 72% of range
โโโ โ Volume โฅ 1.8x average
โโโ โ Delta โฅ 62% confirms direction
โโโ โ Active session
USE: Horizontal lines at high/low act as future S/R
```
---
## ๐ฏ TRADING STRATEGIES
### Strategy 1: Zone + Tier Confluence (Highest Probability)
```
THE ULTIMATE YM SETUP:
โโโโโโโโโโโโโโโโโโโโโโโ
Setup:
1. Active DeepFlow zone exists (green box below for long)
2. Price pulls back INTO the zone
3. Tier signal fires INSIDE the zone (S๐ฏ/A๐ฏ)
4. Score shows 7+/10
Entry: Signal candle close
Stop: Below zone bottom (for longs)
Target: Based on tier (1.5-2.5:1 R:R)
Why It Works:
โข Zone = institutional limit orders
โข Tier signal = momentum confirmation
โข Double confirmation = high probability
Expected Win Rate: 70-75%
```
### Strategy 2: Pure Tier Signal with POC Stop
```
SNIPER TIER TRADE:
โโโโโโโโโโโโโโโโโโ
Setup:
1. Tier signal appears (preferably A or S)
2. Score โฅ 5/10
3. Note POC level on signal candle
4. Red/green stop/target lines appear
Entry: Signal candle close
Stop: Beyond POC (shown on chart)
Target: Auto-calculated based on tier
Key: POC placement matters
โข POC near candle bottom (longs) = STRONG
โข POC in middle = weaker signal
โข POC at extreme = possible exhaustion
Expected Win Rate: 60-65%
```
### Strategy 3: Zone Bounce (Continuation)
```
ZONE BOUNCE TRADE:
โโโโโโโโโโโโโโโโโโ
Setup:
1. Fresh zone created during session
2. Price leaves zone, moves in zone direction
3. Price returns to test zone (within 15 bars)
4. Z๐ฏ signal appears or rejection candle forms
Entry: At CE line (middle of zone)
Stop: Beyond zone edge
Target: Previous swing high/low
Why It Works:
โข Zones represent unfilled orders
โข First retest often finds support/resistance
โข Lower volatility = cleaner bounces
Expected Win Rate: 55-60%
```
### Strategy 4: Single Print Scalp
```
SINGLE PRINT SCALP:
โโโโโโโโโโโโโโโโโโโ
Setup:
1. Single Print (SP) marker appears
2. Note the gold/purple lines at high/low
3. Wait for price to return to SP level
4. Look for rejection or tier signal at level
Entry: At SP line with confirmation
Stop: Beyond the SP line
Target: Quick 1:1 or to next structure
Why It Works:
โข SP = price moved too fast, orders unfilled
โข Price often returns to "fill" these levels
โข YM's slower pace makes retests likely
Expected Win Rate: 55-60%
```
---
## ๐ TABLE LEGEND
| Field | Reading | Color Meaning |
|-------|---------|---------------|
| **Pts** | Current candle points | Gold/Green/Yellow = Tiered |
| **Tier** | S/A/B/X | Tier color or white |
| **Vol** | Volume ratio | ๐ข โฅ1.8x, ๐ด <1.8x |
| **Delta** | Buy/Sell % | ๐ข Buy dom, ๐ด Sell dom |
| **Body** | Body % of range | ๐ข โฅ72%, ๐ด <72% |
| **CVD** | Trend direction | โฒ Bullish, โผ Bearish |
| **Sess** | Active session | ๐ก LDN!/NY!/PWR!, โซ --- |
| **POC** | Point of Control | ๐ก Gold price level |
| **Zone** | Zone position | ๐ข BUYโฌ, ๐ด SELLโฌ, โซ --- |
| **Zones** | Active zone count | #B/#S format |
| **Score** | Confluence score | ๐ข 7+, ๐ก 5-6, โซ <5 |
| **IMB** | Recent imbalances | Count in last 10 bars |
| **R:R** | Risk/Reward | ๐ข On signal, โซ No signal |
---
## โฐ SESSION-SPECIFIC PLAYBOOKS
### London Session (3:00-5:00 AM ET)
```
CHARACTER: Slow, methodical, trend-building
VOLUME: Medium (50-70% of NY)
BEST SETUPS: Zone entries, A/B tier with zones
PLAYBOOK:
โข Enter on zone retests
โข Expect 15-25 pt moves
โข Don't fight early direction
โข Watch for pre-NY positioning
TYPICAL TRADES: 1-2
```
### NY Open (9:30-11:30 AM ET)
```
CHARACTER: Fast, volatile, high-conviction
VOLUME: Highest of day
BEST SETUPS: S/A tier, zone confluence
PLAYBOOK:
โข First 15 min: Observe Initial Balance
โข 9:45-10:15: Best setups form
โข S-tier signals = ride the wave
โข Be aggressive on high scores
TYPICAL TRADES: 2-3
```
### Power Hour (3:00-4:00 PM ET)
```
CHARACTER: Rebalancing, MOC orders
VOLUME: Medium-high (70-80% of NY)
BEST SETUPS: B tier scalps, zone entries
PLAYBOOK:
โข Watch for mean reversion setups
โข Quick scalps around POC levels
โข Don't hold through close
โข Take profits at 1:1 R:R
TYPICAL TRADES: 1-2
```
---
## ๐ง RECOMMENDED SETTINGS
### Conservative (Fewer, Better Trades)
| Setting | Value | Notes |
|---------|-------|-------|
| Min Confluence Score | 6 | Only strong setups |
| Min Volume Ratio | 2.0 | Higher bar |
| Delta Threshold | 65% | Stricter dominance |
| Max Zones | 8 | Less clutter |
### Standard (Balanced)
| Setting | Value | Notes |
|---------|-------|-------|
| Min Confluence Score | 5 | Default |
| Min Volume Ratio | 1.8 | Default |
| Delta Threshold | 62% | Default |
| Max Zones | 12 | Default |
### Aggressive (More Opportunities)
| Setting | Value | Notes |
|---------|-------|-------|
| Min Confluence Score | 4 | More signals |
| Min Volume Ratio | 1.5 | Lower bar |
| Delta Threshold | 60% | Looser |
| Max Zones | 15 | More context |
---
## ๐จ ALERT SETUP
Configure these alerts in TradingView:
| Alert | Priority | Action |
|-------|----------|--------|
| ๐ฏ YM S-TIER LONG/SHORT | ๐ด CRITICAL | Drop everything, check immediately |
| ๐ฏ YM A-TIER LONG/SHORT | ๐ HIGH | Evaluate within 15 seconds |
| ๐ฏ YM B-TIER LONG/SHORT | ๐ก MEDIUM | Check if available |
| ๐ฏ YM ZONE BUY/SELL | ๐ข STANDARD | Good context entry |
| ๐ฆ NEW ZONE | ๐ต INFO | Mark on mental map |
| โญ SINGLE PRINT | ๐ต INFO | Note for future S/R |
| SESSION OPEN | โช INFO | Prepare to trade |
### Alert Message Format
```
๐ฏ YM A-LONG | YM1! @ 42,150 | 68%B | Score: 7/10 | IN ZONE | POC: 42,125 | Stop: 42,098 | SWING
```
---
## โ ๏ธ COMMON MISTAKES TO AVOID
| Mistake | Why It's Bad | Solution |
|---------|-------------|----------|
| Trading outside sessions | Low volume = noise | Wait for LDN/NY/PWR |
| Ignoring score | Low scores = low probability | Require โฅ5/10 |
| Fighting the zone | Zones are institutional | Trade WITH zones |
| Oversizing B-tier | Quick scalps, not holds | 50% size max |
| Holding through news | Volatility spike | Exit before FOMC, NFP |
| Chasing after signal | Entry on close only | Miss it = wait for next |
| Ignoring POC position | Middle POC = indecision | Strong = extreme POC |
---
## ๐ DAILY TRADE JOURNAL TEMPLATE
```
DATE: ___________
SESSION: โก LDN โก NY โก PWR
TRADE 1:
โโโ Time: _______
โโโ Signal: S๐ฏ / A๐ฏ / B๐ฏ / Z๐ฏ
โโโ Score: ___/10
โโโ Entry: _______
โโโ Stop: _______
โโโ Target: _______
โโโ In Zone: โก Yes โก No
โโโ Result: +/- ___ pts ($_____)
โโโ Notes: _______________________
TRADE 2:
DAILY SUMMARY:
โโโ Total Trades: ___
โโโ Win Rate: ___%
โโโ Net P/L: $_____
โโโ Best Setup: _______
โโโ Improvement: _______________________
```
---
## ๐ GOLDEN RULES FOR YM
> **"YM rewards patience. Wait for the confluenceโit's worth it."**
> **"Low volatility means you can size up. One good trade beats five forced trades."**
> **"Score 7+ is your edge. Anything less is gambling."**
> **"The zone + tier combo is your bread and butter. Master it."**
> **"Leave every trade with money. YM gives you time to manage."**
---
## ๐ VISUAL GUIDE
```
PERFECT YM SNIPER SETUP:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Current Price
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ BEARISH ZONE (Red) โ
โ- - - - - - - CE Line (Entry for shorts) - - - - - - โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโชโโโโโโโโโโโโโโโโโโ SP High (Purple)
โ
โโโโโโโโโโโโโโโโโโโโโโโค
โโโโโโโโโโโโโโโโโโโโโโโ โ A๐ฏ LONG Signal
โโโโโโโโโโโโโโโโโโโโโโโ Score: 8/10
โ โโโโโโโโโโโโโโโโโโโโ โ POC (Gold) near bottom = STRONG
โโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโค
โ
โโโโโโโโโโโโโโโโโโโชโโโโโโโโโโโโโโโโโโ SP Low (Purple)
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ BULLISH ZONE (Green) โ
โ- - - - - - - CE Line (Entry for longs) - - - - - - -โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
Stop Loss
CONFLUENCE CHECK:
โ A-Tier signal (+2)
โ At edge of bullish zone (+2)
โ POC at bottom of candle (+1)
โ Strong volume 2.3x (+1)
โ Delta 72% buyers (+1)
โ CVD bullish (+1)
TOTAL: 8/10 = ELITE SETUP
ACTION: Full size LONG at signal candle close
STOP: Below zone bottom
TARGET: 2:1 R:R (auto-calculated)
```
---
## ๐ง TROUBLESHOOTING
| Issue | Cause | Fix |
|-------|-------|-----|
| No signals appearing | Score too high | Lower min score to 4-5 |
| Too many signals | Score too low | Raise min score to 6+ |
| Zones cluttering chart | Max zones high | Reduce to 8-10 |
| POC not showing | Tiered filter on | Check "POC Only Tiered" |
| Session not highlighting | Wrong timezone | Verify timezone setting |
| Alerts not firing | Not configured | Set up in TradingView alerts |
---
## ๐ PINE SCRIPT V6 TECHNICAL NOTES
This indicator uses advanced features:
- **User Defined Types (UDT)**: Clean state management for zones/imbalances
- **`request.security_lower_tf()`**: Intrabar volume analysis
- **Dynamic Array Management**: Efficient memory for drawings
- **Confluence Scoring Engine**: Multi-factor signal qualification
- **Auto Stop/Target**: Dynamic risk management calculation
**Minimum TradingView Plan:** Pro (for intrabar data access)
---
*ยฉ Alexandro Disla - YM Ultimate SNIPER*
*Pine Script v6 | TradingView*
*Unified GRA v5 + DeepFlow Zones | YM-Optimized*
ADX Forecast Colorful [DiFlip]ADX Forecast Colorful
Introducing one of the most advanced ADX indicators available โ a fully customizable analytical tool that integrates forward-looking forecasting capabilities. ADX Forecast Colorful is a scientific evolution of the classic ADX, designed to anticipate future trend strength using linear regression. Instead of merely reacting to historical data, this indicator projects the future behavior of the ADX, giving traders a strategic edge in trend analysis.
โฏ Real-Time ADX Forecasting
For the first time, a public ADX indicator incorporates linear regression (least squares method) to forecast the future behavior of ADX. This breakthrough approach enables traders to anticipate trend strength changes based on historical momentum. By applying linear regression to the ADX, the indicator plots a projected trendline n periods ahead โ helping users make more accurate and timely trading decisions.
โฏ Highly Customizable
The indicator adapts seamlessly to any trading style. It offers a total of 26 long entry conditions and 26 short entry conditions, making it one of the most configurable ADX tools on TradingView. Each condition is fully adjustable, enabling the creation of statistical, quantitative, and automated strategies. You maintain full control over the signals to align perfectly with your system.
โฏ Innovative and Science-Based
This is the first public ADX indicator to apply least-squares predictive modeling to ADX dynamics. Technically, it embeds machine learning logic into a traditional trend-strength indicator. Using linear regression as a predictive engine adds powerful statistical rigor to the ADX, turning it into an intelligent, forward-looking signal generator.
โฏ Scientific Foundation: Linear Regression
Linear regression is a fundamental method in statistics and machine learning used to model the relationship between a dependent variable y and one or more independent variables x. The basic formula for simple linear regression is:
y = ฮฒโ + ฮฒโx + ฮต
Where:
yย ย = predicted value (e.g., future ADX)
xย ย = explanatory variable (e.g., bar index or time)
ฮฒโย = intercept
ฮฒโย = slope (rate of change)
ฮตย ย ย = random error term
The goal is to estimate ฮฒโ and ฮฒโ by minimizing the sum of squared errors. This is achieved using the least squares method, ensuring the best linear fit to historical data. Once the coefficients are calculated, the model extends the regression line forward, generating the ADX projection based on recent trends.
โฏ Least Squares Estimation
To minimize the error, the regression coefficients are calculated as:
ฮฒโ = ฮฃ((xแตข - xฬ)(yแตข - ศณ)) / ฮฃ((xแตข - xฬ)ยฒ)
ฮฒโ = ศณ - ฮฒโxฬ
Where:
ฮฃ = summation
xฬ and ศณ = means of x and y
i ranges from 1 to n (number of data points)
These formulas provide the best linear unbiased estimator under Gauss-Markov conditions โ assuming constant variance and linearity.
โฏ Linear Regression in Machine Learning
Linear regression is a foundational algorithm in supervised learning. Its power in producing quantitative predictions makes it essential in AI systems, predictive analytics, time-series forecasting, and automated trading. Applying it to the ADX essentially places an intelligent forecasting engine inside a classic trend tool.
โฏ Visual Interpretation
Imagine an ADX time series like this:
Time โ
ADX ย โ
The regression line smooths these values and projects them n periods forward, creating a predictive trajectory. This forecasted ADX line can intersect with the actual ADX, offering smarter buy and sell signals.
โฏ Summary of Scientific Concepts
Linear Regression: Models variable relationships with a straight line.
Least Squares: Minimizes prediction errors for best fit.
Time-Series Forecasting: Predicts future values using historical data.
Supervised Learning: Trains models to predict outcomes from inputs.
Statistical Smoothing: Reduces noise and highlights underlying trends.
โฏ Why This Indicator Is Revolutionary
Scientifically grounded: Based on rigorous statistical theory.
Unprecedented: First public ADX using least-squares forecast modeling.
Smart: Uses machine learning logic.
Forward-Looking: Generates predictive, not just reactive, signals.
Customizable: Flexible for any strategy or timeframe.
โฏ Conclusion
By merging ADX and linear regression, this indicator enables traders to predict market momentum rather than merely follow it. ADX Forecast Colorful is not just another indicator โ itโs a scientific leap forward in technical analysis. With 26 fully configurable entry conditions and smart forecasting, this open-source tool is built for creating cutting-edge quantitative strategies.
โฏ Example of simple linear regression with one independent variable
This example demonstrates how a basic linear regression works when there is only one independent variable influencing the dependent variable. This type of model is used to identify a direct relationship between two variables.
โฏ In linear regression, observations (red) are considered the result of random deviations (green) from an underlying relationship (blue) between a dependent variable (y) and an independent variable (x)
This concept illustrates that sampled data points rarely align perfectly with the true trend line. Instead, each observed point represents the combination of the true underlying relationship and a random error component.
โฏ Visualizing heteroscedasticity in a scatterplot with 100 random fitted values using Matlab
Heteroscedasticity occurs when the variance of the errors is not constant across the range of fitted values. This visualization highlights how the spread of data can change unpredictably, which is an important factor in evaluating the validity of regression models.
โฏ The datasets in Anscombeโs quartet were designed to have nearly the same linear regression line (as well as nearly identical means, standard deviations, and correlations) but look very different when plotted
This classic example shows that summary statistics alone can be misleading. Even with identical numerical metrics, the datasets display completely different patterns, emphasizing the importance of visual inspection when interpreting a model.
โฏ Result of fitting a set of data points with a quadratic function
This example illustrates how a second-degree polynomial model can better fit certain datasets that do not follow a linear trend. The resulting curve reflects the true shape of the data more accurately than a straight line.
โฏ What is the ADX?
The Average Directional Index (ADX) is a technical analysis indicator developed by J. Welles Wilder. It measures the strength of a trend in a market, regardless of whether the trend is up or down.
The ADX is an integral part of the Directional Movement System, which also includes the Plus Directional Indicator (+DI) and the Minus Directional Indicator (-DI). By combining these components, the ADX provides a comprehensive view of market trend strength.
โฏ How to use the ADX?
The ADX is calculated based on the moving average of the price range expansion over a specified period (usually 14 periods). It is plotted on a scale from 0 to 100 and has three main zones:
Strong Trend: When the ADX is above 25, indicating a strong trend.
Weak Trend: When the ADX is below 20, indicating a weak or non-existent trend.
Neutral Zone: Between 20 and 25, where the trend strength is unclear.
โฏ Entry Conditions
Each condition below is fully configurable and can be combined to build precise trading logic.
๐ BUY
๐
ฐ๏ธ ย Signal Validity: The signal will remain valid for X bars .
๐
ฐ๏ธย Signal Sequence: Configurable as AND or OR .
๐
ฐ๏ธย +DI > -DI
๐
ฐ๏ธย +DI < -DI
๐
ฐ๏ธย +DI > ADX
๐
ฐ๏ธย +DI < ADX
๐
ฐ๏ธย -DI > ADX
๐
ฐ๏ธย -DI < ADX
๐
ฐ๏ธย ADX > Threshold
๐
ฐ๏ธย ADX < Threshold
๐
ฐ๏ธย +DI > Threshold
๐
ฐ๏ธย +DI < Threshold
๐
ฐ๏ธย -DI > Threshold
๐
ฐ๏ธย -DI < Threshold
๐
ฐ๏ธย +DI (Crossover) -DI
๐
ฐ๏ธย +DI (Crossunder) -DI
๐
ฐ๏ธย +DI (Crossover) ADX
๐
ฐ๏ธย +DI (Crossunder) ADX
๐
ฐ๏ธย +DI (Crossover) Threshold
๐
ฐ๏ธย +DI (Crossunder) Threshold
๐
ฐ๏ธย -DI (Crossover) ADX
๐
ฐ๏ธย -DI (Crossunder) ADX
๐
ฐ๏ธย -DI (Crossover) Threshold
๐
ฐ๏ธย -DI (Crossunder) Threshold
๐ฎ +DI (Crossover) -DI Forecast
๐ฎ +DI (Crossunder) -DI Forecast
๐ฎ ADX (Crossover) +DI Forecast
๐ฎ ADX (Crossunder) +DI Forecast
๐ SELL
๐
ฐ๏ธ ย Signal Validity: The signal will remain valid for X bars .
๐
ฐ๏ธย Signal Sequence: Configurable as AND or OR .
๐
ฐ๏ธย +DI > -DI
๐
ฐ๏ธย +DI < -DI
๐
ฐ๏ธย +DI > ADX
๐
ฐ๏ธย +DI < ADX
๐
ฐ๏ธย -DI > ADX
๐
ฐ๏ธย -DI < ADX
๐
ฐ๏ธย ADX > Threshold
๐
ฐ๏ธย ADX < Threshold
๐
ฐ๏ธย +DI > Threshold
๐
ฐ๏ธย +DI < Threshold
๐
ฐ๏ธย -DI > Threshold
๐
ฐ๏ธย -DI < Threshold
๐
ฐ๏ธย +DI (Crossover) -DI
๐
ฐ๏ธย +DI (Crossunder) -DI
๐
ฐ๏ธย +DI (Crossover) ADX
๐
ฐ๏ธย +DI (Crossunder) ADX
๐
ฐ๏ธย +DI (Crossover) Threshold
๐
ฐ๏ธย +DI (Crossunder) Threshold
๐
ฐ๏ธย -DI (Crossover) ADX
๐
ฐ๏ธย -DI (Crossunder) ADX
๐
ฐ๏ธย -DI (Crossover) Threshold
๐
ฐ๏ธย -DI (Crossunder) Threshold
๐ฎ +DI (Crossover) -DI Forecast
๐ฎ +DI (Crossunder) -DI Forecast
๐ฎ ADX (Crossover) +DI Forecast
๐ฎย ADX (Crossunder) +DI Forecast
๐ค Automation
All BUY and SELL conditions are compatible with TradingView alerts, making them ideal for fully or semi-automated systems.
โฏ Unique Features
Linear Regression: (Forecast)
Signal Validity: The signal will remain valid for X bars
Signal Sequence: Configurable as AND/OR
Condition Table: BUY/SELL
Condition Labels: BUY/SELL
Plot Labels in the Graph Above: BUY/SELL
Automate and Monitor Signals/Alerts: BUY/SELL
Background Colors: "bgcolor"
Background Colors: "fill"
Linear Regression (Forecast)
Signal Validity: The signal will remain valid for X bars
Signal Sequence: Configurable as AND/OR
Table of Conditions: BUY/SELL
Conditions Label: BUY/SELL
Plot Labels in the graph above: BUY/SELL
Automate & Monitor Signals/Alerts: BUY/SELL
Background Colors: "bgcolor"
Background Colors: "fill"
DeepFlow Zones SNIPER# DeepFlow Zones SNIPER - Documentation & Cheatsheet
## ๐ฏ DeepFlow Zones - SNIPER Edition
**Horizontal Limit Order Zones | Institutional FVG + Single Prints**
> **Philosophy:** *Only mark the zones where institutions MUST have orders. Everything else is noise.*
---
## โก QUICK CHEATSHEET
```
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ DEEPFLOW ZONES SNIPER - QUICK REFERENCE โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ ๐ฏ ZONE CREATION REQUIREMENTS (ALL MUST BE TRUE): โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ FVG exists โ Gap between candle low and 2-bar-ago high โ
โ โ Gap Size โ At least 30% of ATR (significant gap) โ
โ โ Impulse Candle โ 1.8x average range + 65% body ratio โ
โ โ Volume โ 2.0x+ average on impulse candle โ
โ โ Direction โ Middle candle confirms gap direction โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ ๐ ZONE TYPES: โ
โ โโโโโโโโโโโโโโ โ
โ ๐ข BULLISH ZONE โ Green box BELOW price (buy zone) โ
โ ๐ด BEARISH ZONE โ Red box ABOVE price (sell zone) โ
โ โซ TESTED ZONE โ Gray box (CE level touched) โ
โ โฌ BROKEN ZONE โ Dark gray (price closed through) โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ โญ SINGLE PRINT LINES: โ
โ โโโโโโโโโโโโโโโโโโโโโโ โ
โ Requirements: โ
โ โข Range 1.8x+ average โ
โ โข Body 65%+ of range โ
โ โข Volume 2.0x+ average โ
โ โข Delta 60%+ confirms direction โ
โ โ
โ Usage: โ
โ โข Gold lines at HIGH and LOW of impulse candle โ
โ โข Price often returns to these levels โ
โ โข Use as support/resistance for entries โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ ๐จ ENTRY SIGNALS: โ
โ โโโโโโโโโโโโโโโโโโโ โ
โ BUY๐ฏ appears when: โ
โ โข Price is inside BULLISH zone โ
โ โข Delta shows 60%+ buy dominance โ
โ โข Volume is 1.5x+ average โ
โ โ
โ SELL๐ฏ appears when: โ
โ โข Price is inside BEARISH zone โ
โ โข Delta shows 60%+ sell dominance โ
โ โข Volume is 1.5x+ average โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ ๐ ZONE ANATOMY: โ
โ โโโโโโโโโโโโโโโโโ โ
โ โ
โ BULLISH FVG ZONE: BEARISH FVG ZONE: โ
โ โ
โ Current Low โโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ 2-bar-ago Low โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โโโโโ ZONE โโโโโโโโโโโโโโ โ โโโโโ ZONE โโโโโโโโโโโโโโ โ
โ โ- - - CE (50%) - - - - - โ โ- - - CE (50%) - - - - - โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโ โ โโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ 2-bar-ago High โโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ Current High โ
โ โ
โ Entry: At or near CE line Entry: At or near CE line โ
โ Stop: Below zone bottom Stop: Above zone top โ
โ Target: 1:1 or 2:1 R:R Target: 1:1 or 2:1 R:R โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ โ ZONE IS INVALID WHEN: โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Gap size < 30% of ATR (too small) โ
โ โ No impulse candle (weak move) โ
โ โ Volume < 2x average (retail move) โ
โ โ Zone age > 50 bars (stale) โ
โ โ Price already closed through zone โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
```
---
## ๐ DETAILED DOCUMENTATION
### What Makes SNIPER Zones Different?
Standard FVG indicators create zones everywhere. SNIPER zones only appear when there's **institutional footprint**:
| Filter | Standard FVG | SNIPER Zones | Why It Matters |
|--------|-------------|--------------|----------------|
| Gap Size | Any gap | **โฅ30% ATR** | Significant imbalance |
| Volume | Optional | **2.0x+ avg** | Institutional volume |
| Impulse | None | **1.8x range** | Real momentum |
| Body | None | **65%+ ratio** | Conviction candle |
| Max Zones | 20-50 | **10 max** | Only the best |
| Zone Life | 100 bars | **50 bars** | Fresh zones only |
---
### How Zones Are Created
```
BULLISH FVG FORMATION:
โโโโโโโโโโโโโโโโโโโโโโโ
Bar 0 (2 bars ago): Bar 1 (Impulse): Bar 2 (Current):
โโโโโโโ โโโโโโโ โโโโโโโ
โ โ โโโโโโโ โ โ
โ โ HIGH โโโโโโ โโโโโโโ โ โ
โ โ โ โโโโโโโ โ โ
โโโโโโโ โ โโโโโโโ โ โโโ LOW
โ โโโโโโโ โโโโโโโ
โ โ
โโโโโโโโโ GAP โโโโโโโโโโโโโโโโโ
(FVG ZONE)
Requirements Met:
โ Current LOW > 2-bar-ago HIGH (gap exists)
โ Gap โฅ 30% of ATR (significant)
โ Bar 1 range โฅ 1.8x average (impulse)
โ Bar 1 body โฅ 65% of range (conviction)
โ Bar 1 volume โฅ 2x average (institutional)
โ Bar 1 was bullish (direction confirms)
RESULT: VALID SNIPER BULLISH ZONE CREATED
```
---
### Single Print Lines Explained
Single Prints mark **institutional impulse candles** where price moved so fast that no orders were filled at those levels. These levels often act as magnets for price.
```
SINGLE PRINT CANDLE:
โโโโโโโโโโโโโโโโโโโโ
HIGH โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ (Gold Line)
โ
โโโโโโโโโโโโโโโโโโโค
โโโโโโโโโโโโโโโโโโโ โ Large body (65%+)
โโโโโโโโโโโโโโโโโโโ โ Strong volume (2x+)
โโโโโโโโโโโโโโโโโโโ โ Clear delta (60%+)
โโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโค
โ
LOW โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ (Gold Line)
These horizontal lines extend 500 bars into the future.
Price often returns to test these levels.
```
---
### Entry Strategy
#### Zone Entry Checklist
```
โก Zone is active (green/red, not gray)
โก Price enters zone from outside
โก Wait for entry signal (BUY๐ฏ or SELL๐ฏ)
โก Verify: Delta + Volume confirming
โก Enter at CE line (dotted white line)
โก Stop below/above zone
โก Target: Opposite side of zone (1:1) or 2:1
```
#### Single Print Entry
```
โก Price returns to single print level
โก Look for reaction (rejection candle)
โก Combine with GRA signal if possible
โก Enter on confirmation candle
โก Stop beyond the single print line
```
---
### Table Legend
| Field | Reading | Color Meaning |
|-------|---------|---------------|
| **Delta** | Buy/Sell % | ๐ข Buy dom, ๐ด Sell dom, โช Neutral |
| **Vol** | Volume ratio | ๐ข โฅ2x, โช <2x |
| **Buy โฌ** | Active buy zones | Count of bullish zones |
| **Sell โฌ** | Active sell zones | Count of bearish zones |
| **Zone** | Current position | AT BUY / AT SELL / --- |
| **Impulse** | Current bar status | ๐ก Yes (impulse), โซ No |
---
### Zone States
| State | Visual | Meaning | Action |
|-------|--------|---------|--------|
| **Fresh** | Bright color | Never tested | Best entries |
| **Tested** | Gray | CE touched | Still valid, less reliable |
| **Broken** | Dark gray | Price closed through | Invalid, ignore |
---
### Integration with GRA v5
The magic happens when you combine both indicators:
```
HIGHEST PROBABILITY SETUP:
โโโโโโโโโโโโโโโโโโโโโโโโโโ
1. DeepFlow shows active zone (green/red box)
2. Price enters the zone
3. GRA5 fires a signal INSIDE the zone
4. Delta confirms on both indicators
5. Volume confirms on both indicators
This is your SNIPER entry. Take it.
Example:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Price enters BULLISH zone โ
โ GRA5 shows: A๐ฏ LONG โ
โ DFZ shows: BUY๐ฏ โ
โ Table: Vol 2.1x, Delta 67%B โ
โ โ
โ ACTION: Full size LONG at CE โ
โ STOP: Below zone bottom โ
โ TARGET: 2:1 R:R โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
```
---
### Settings by Instrument
| Instrument | Vol Mult | Gap ATR | Impulse | Max Zones |
|------------|----------|---------|---------|-----------|
| **NQ/ES** | 2.0x | 30% | 1.8x | 10 |
| **YM** | 2.0x | 30% | 1.8x | 10 |
| **GC** | 2.5x | 40% | 2.0x | 8 |
| **BTC** | 2.0x | 25% | 1.5x | 10 |
---
### Common Mistakes
| Mistake | Why It's Bad | Solution |
|---------|-------------|----------|
| Trading every zone | Most zones fail | Wait for entry signal |
| Entering at zone edge | Wrong R:R | Enter at CE (middle) |
| Ignoring broken zones | Already invalidated | Gray = don't trade |
| No delta confirmation | Could be false zone | BUY๐ฏ/SELL๐ฏ required |
| Too many zones | Chart noise | Max 10 zones |
---
### Alert Configuration
| Alert | Priority | Action |
|-------|----------|--------|
| ๐ฏ BUY/SELL ZONE ENTRY | ๐ด High | Check chart immediately |
| NEW BULL/BEAR ZONE | ๐ Medium | Note new zone location |
| ๐ฏ SINGLE PRINT | ๐ข Low | Mark potential S/R |
---
### Pine Script v6 Notes
This indicator uses Pine Script v6 features:
- Array-based zone management
- `request.security_lower_tf()` for delta
- Dynamic zone state tracking
- Efficient garbage collection
**Minimum TradingView Plan:** Pro (for intrabar data)
---
## ๐ Golden Rules
1. **Fewer zones = Better zones.** If you see more than 5 active zones, your settings are too loose.
2. **Fresh zones > Tested zones.** The first touch is always the best.
3. **CE is king.** The middle of the zone (50% level) is your entry point.
4. **Zone + GRA signal = Sniper entry.** This confluence is what we're hunting for.
5. **Gray zones don't exist.** Once broken, pretend the zone was never there.
---
*ยฉ Alexandro Disla - DeepFlow Zones SNIPER*
*Pine Script v6 | TradingView*
Relative Performance Analyzer [AstrideUnicorn]Relative Performance Analyzer (RPA) is a performance analysis tool inspired by the data comparison features found in professional trading terminals. The RPA replicates the analytical approach used by portfolio managers and institutional analysts who routinely compare multiple securities or other types of data to identify relative strength opportunities, make allocation decisions, choose the most optimal investment from several alternatives, and much more.
Key Features:
Multi-Symbol Comparison: Track up to 5 different symbols simultaneously across any asset class or dataset
Two Performance Calculation Methods: Choose between percentage returns or risk-adjusted returns
Interactive Analysis: Drag the start date line on the chart or manually choose the start date in the settings
Professional Visualization: High-contrast color scheme designed for both dark and light chart themes
Live Performance Table: Real-time display of current return values sorted from the top to the worst performers
Practical Use Cases:
ETF Selection: Compare similar ETFs (e.g., SPY vs IVV vs VOO) to identify the most efficient investment
Sector Rotation: Analyze which sectors are showing relative strength for strategic allocation
Competitive Analysis: Compare companies within the same industry to identify leaders (e.g., APPLE vs SAMSUNG vs XIAOMI)
Cross-Asset Allocation: Evaluate performance across stocks, bonds, commodities, and currencies to guide portfolio rebalancing
Risk-Adjusted Decisions: Use risk-adjusted performance to find investments with the best returns per unit of risk
Example Scenarios:
Analyze whether tech stocks are outperforming the broader market by comparing XLK to SPY
Evaluate which emerging market ETF (EEM vs VWO) has provided better risk-adjusted returns over the past year
HOW DOES IT WORK
The indicator calculates and visualizes performance from a user-defined starting point using two methodologies:
Percentage Returns: Standard total return calculation showing percentage change from the start date
Risk-Adjusted Returns: Cumulative returns divided by the volatility (standard deviation), providing insight into the efficiency of performance. An expanding window is used to calculate the volatility, ensuring accurate risk-adjusted comparisons throughout the analysis period.
HOW TO USE
Setup Your Comparison: Enable up to 5 assets and input their symbols in the settings
Set Analysis Period: When you first launch the indicator, select the start date by clicking on the price chart. The vertical start date line will appear. Drag it on the chart or manually input a specific date to change the start date.
Choose Return Type: Select between percentage or risk-adjusted returns based on your analysis needs
Interpret Results
Use the real-time table for precise current values
SETTINGS
Assets 1-5: Toggle on/off and input symbols for comparison (stocks, ETFs, indices, forex, crypto, fundamental data, etc.)
Start Date: Set the initial point for return calculations (drag on chart or input manually)
Return Type: Choose between "Percentage" or "Risk-Adjusted" performance.
D+P All-in-OneD+P=DARVAS+PIVOT
In this script i tried make small combo of multiple metrics.
Along with Darvas+Pivot we have EMA10,20&RSI d,w,m table. i fixed this table to middle right so that its easy to use while using phone.
There is floater table having Day Low& Previous Day Low-% differnce from current price
We have RS rating of O'Neil
Small table having MarketCap,Industry and sector.
TraderDemircan Fibonacci + XABCD Formation v1.0This indicator automatically identifies the most recent significant swing low (Point X) and the subsequent swing high (Point A) to plot a comprehensive set of Fibonacci extension levels.
Beyond a standard Fibonacci tool, this script also projects a potential harmonic XABCD pattern. It identifies a retracement level (Point B) and projects a "C" target based on the XA=BC price projection. This provides traders with a complete visual framework of key support/resistance levels and potential price targets based on the last significant impulse move.
How It Works
Swing Detection (X & A Points): The script scans the previous Lookback Bars (user-defined) to find the lowest low, which it labels as Point X. It then finds the highest high that occurred after Point X, labeling it as Point A.
Fibonacci Levels: The price range between X and A (the "XA leg") is used as the basis (0.0 to 1.0) to draw 18 different Fibonacci levels, including key extensions (1.272, 1.618, 2.618, etc.) and retracements.
XABCD Projection (B & C Points):
Point B: The script dynamically identifies Point B at either the 0.382 or 0.5 retracement level of the XA leg, depending on the current price action. This shows the level that is currently acting as support.
Point C (Target): A target (Point C) is projected by adding the price range of the XA leg to the B point. This creates a classic XA=BC (or AB=CD, where the first leg is XA) price projection, offering a potential target for the next upward move.
Key Features
Automatic Swing Detection: Automatically finds and plots the X and A points, adapting to the latest price action.
Comprehensive Fibonacci Suite: Includes 18 toggleable Fibonacci levels (from 0.0 to 4.618) to cover all common retracement and extension targets.
XABCD Pattern & Target: Visually plots the X-A, A-B, and the projected B-C legs, clearly highlighting the C target.
Dynamic "B" Point: The B point label (0.382 or 0.5) updates to reflect which retracement level is currently in play.
On-Screen Info Table: A clean table in the top-right corner displays the exact price values for X, A, B, and the C Target for quick reference.
Full Customization: Users can control the visibility, color, width, and style of every Fibonacci level and pattern line.
Label Options: Toggle price labels (on the right) and percentage/level labels (on the left) for a clean or detailed chart.






















