Trend Analysis
Smoothed Moving Average ModifiedA feature has been added to the standard version of the SMMA: the user can specify an integer value to move the SMMA. A positive value will move the average forward (to the right), while a negative value will move it backward (to the left) relative to current price.
Supertrend EMA & KNNSupertrend EMA & KNN
The Supertrend EMA indicator cuts through the noise to deliver clear trend signals.
This tool is built using the good old Exponential Moving Averages (EMAs) with a novel of machine learning; KNN (K Nearest Neighbors) breakout detection method.
Key Features:
Effortless Trend Identification: Supertrend EMA simplifies trend analysis by automatically displaying a color-coded EMA. Green indicates an uptrend, red signifies a downtrend, and the absence of color suggests a potential range.
Dynamic Breakout Detection: Unlike traditional EMAs, Supertrend EMA incorporates a KNN-based approach to identify breakouts. This allows for faster color changes compared to standard EMAs, offering a more dynamic picture of the trend.
Customizable Parameters: Fine-tune the indicator to your trading style. Adjust the EMA length for trend smoothing, KNN lookback window for breakout sensitivity, and breakout threshold for filtering noise.
A Glimpse Under the Hood:
Dual EMA Power: The indicator utilizes two EMAs. A longer EMA (controlled by the "EMA Length" parameter) provides a smooth trend direction, while a shorter EMA (controlled by the "Short EMA Length" parameter) triggers color changes, aiming for faster response to breakouts.
KNN Breakout Detection: This innovative feature analyzes price action over a user-defined lookback period (controlled by the "KNN Lookback Length" parameter) to identify potential breakouts. If the price surpasses a user-defined threshold (controlled by the "Breakout Threshold" parameter) above the recent highs, a green color is triggered, signaling a potential uptrend. Conversely, a breakdown below the recent lows triggers a red color, indicating a potential downtrend.
Trading with Supertrend EMA:
Ride the Trend: When the indicator displays green, look for long (buy) opportunities, especially when confirmed by bullish price action patterns on lower timeframes. Conversely, red suggests potential shorting (sell) opportunities, again confirmed by bearish price action on lower timeframes.
Embrace Clarity: The color-coded EMA provides a clear visual representation of the trend, allowing you to focus on price action and refine your entry and exit strategies.
A Word of Caution:
While Supertrend EMA offers faster color changes than traditional EMAs, it's important to acknowledge a slight inherent lag. Breakout detection relies on historical data, and there may be a brief delay before the color reflects a new trend.
To achieve optimal results, consider:
Complementary Tools: Combine Supertrend EMA with other indicators or price action analysis for additional confirmation before entering trades.
Solid Risk Management: Always practice sound risk management strategies such as using stop-loss orders to limit potential losses.
Supertrend EMA is a powerful tool designed to simplify trend identification and enhance your trading experience. However, remember, no single indicator guarantees success. Use it with a comprehensive trading strategy and disciplined risk management for optimal results.
Disclaimer:
While the Supertrend EMA indicator can be a valuable tool for identifying potential trend changes, it's important to note that it's not infallible. Market conditions can be highly dynamic, and indicators may sometimes provide false signals. Therefore, it's crucial to use this indicator in conjunction with other technical analysis tools and sound risk management practices. Always conduct thorough research and consider consulting with a financial advisor before making any investment decisions.
Smoothed Moving Average ModifiedStandard SMMA. An input called offset is only added which allows the user to specify an integer value to move the SMMA. A positive value will move the average forward (to the right), while a negative value will move it backward (to the left) relative to current prices.
COIN/ETH RatioThis TradingView indicator calculates and visualizes the ratio between Coinbase's stock price (COIN) and Ethereum's price (ETH) to help traders compare Coinbase's performance relative to Ethereum over time. This can be useful for those interested in understanding correlations or relative strength between a traditional crypto exchange stock and a major cryptocurrency.
Brono MacroThis indicator, developed by someone (satz) helps identify macro market trends and potential reversal points by aligning with Institutional Order Flow. It provides visual markers for key timeframes and allows traders to better time entries and exits based on larger market movements. Perfect for traders using ICT (Inner Circle Trader) concepts, it highlights critical time periods on the chart, enabling a strategic approach to trading major market trends.
WiseOwl Indicator - 1.0 The WiseOwl Indicator - 1.0 is a technical analysis tool designed to help traders identify potential entry points and market trends based on Exponential Moving Averages (EMAs) across multiple timeframes. It focuses on providing clear visual cues for bullish and bearish market conditions, as well as potential breakout opportunities.
Key Features
Multi-Timeframe EMA Analysis: Calculates EMAs on the current timeframe, Daily timeframe, and 15-minute timeframe to confirm trends.
Bullish and Bearish Market Identification: Determines market conditions based on the 200-period EMA on the Daily timeframe.
Directional Candle Coloring: Highlights candles based on their position relative to EMAs to provide immediate visual feedback.
Entry Signals: Plots buy and sell signals on the chart when specific conditions are met on the 1-hour and 4-hour timeframes.
Breakout Candle Highlighting: Colors candles differently when significant price movements occur, indicating potential breakout opportunities.
How It Works
Market Condition Determination:
Bullish Market: When the close price is above the 200-period EMA on the Daily timeframe.
Bearish Market: When the close price is below the 200-period EMA on the Daily timeframe.
Directional Candle Coloring:
Green Background: Applied when the close is above the 50-period EMA and the market is not bearish.
Red Background: Applied when the close is below the 50-period EMA and the market is not bullish.
Uses the Average True Range (ATR) to define a range threshold.
Suppresses signals when EMAs are within this range, indicating a sideways market.
Plotting Entry Signals:
Plots arrows on the chart for potential long and short entries on the 1-hour and 4-hour timeframes.
Breakout Candle Coloring:
Colors candles blue when a bullish breakout condition is met.
Colors candles orange when a bearish breakout condition is met.
How to Use
Trend Identification: Use the background coloring to quickly identify the overall market trend.
Green Background: Suggests bullish conditions; consider looking for long opportunities.
Red Background: Suggests bearish conditions; consider looking for short opportunities.
Entry Signals: Look for plotted arrows on the chart.
Green Upward Arrow: Indicates a potential long entry signal on the 1-hour or 4-hour timeframe.
Red Downward Arrow: Indicates a potential short entry signal on the 1-hour or 4-hour timeframe.
Breakout Opportunities: Watch for candles colored blue or orange.
Blue Candles: Highlight significant upward price movements.
Orange Candles: Highlight significant downward price movements.
Avoiding Ranging Markets: Be cautious when signals are suppressed due to ranging conditions; the market may not have a clear direction.
Example Usage
Identifying a Bullish Market:
The background turns green.
Price crosses above the 50 EMA.
A green upward arrow appears below a candle on the 1-hour or 4-hour chart.
Identifying a Bearish Market:
The background turns red.
Price crosses below the 50 EMA.
A red downward arrow appears above a candle on the 1-hour or 4-hour chart.
Notes
Open-Source Code: The script is open-source, allowing users to review and understand the logic behind the indicator.
Educational Purpose: This indicator is intended to aid in technical analysis and should not be used as the sole basis for trading decisions.
Disclaimer
This indicator is for educational purposes only and does not constitute financial advice. Trading involves risk, and you should consult with a qualified financial advisor before making any investment decisions.
Moving Average Simple Tool [OmegaTools]This TradingView script is a versatile Moving Average Tool that offers users multiple moving average types and a customizable overbought and oversold (OB/OS) sensitivity feature. It is designed to assist in identifying potential price trends, reversals, and momentum by using different average calculations and providing visual indicators for deviation levels. Below is a detailed breakdown of the settings, functionality, and visual elements within the Moving Average Simple Tool.
Indicator Overview
Indicator Name: Moving Average Simple Tool
Short Title: MA Tool
Purpose: Provides a choice of six moving average types with configurable sensitivity, which helps traders identify trend direction, potential reversal zones, and overbought or oversold conditions.
Input Parameters
Source (src): This option allows the user to select the data source for the moving average calculation. By default, it is set to close, but users can choose other options like open, high, low, or any custom price data.
Length (lnt): Defines the period length for the moving average. By default, it is set to 21 periods, allowing users to adjust the moving average sensitivity to either shorter or longer periods.
Average Type (mode): This input defines the moving average calculation type. Six types of averages are available:
SMA (Simple Moving Average)
EMA (Exponential Moving Average)
WMA (Weighted Moving Average)
VWMA (Volume-Weighted Moving Average)
RMA (Rolling Moving Average)
Middle Line: Calculates the average between the highest and lowest price over the period specified in Length. This is useful for a mid-range line rather than a traditional moving average.
Sensitivity (sens): This parameter controls the sensitivity of the overbought and oversold levels. The sensitivity value can range from 1 to 40, where a lower value represents a higher sensitivity and a higher value allows for smoother OB/OS zones.
Color Settings:
OS (Oversold Color, upc): The color applied to deviation areas that fall below the oversold threshold.
OB (Overbought Color, dnc): The color applied to deviation areas that exceed the overbought threshold.
Middle Line Color (midc): A gradient color that visually blends between overbought and oversold colors for smoother visual transitions.
Calculation Components
Moving Average Calculation (mu): Based on the chosen Average Type, this calculation derives the moving average or middle line value for the selected source and length.
Deviation (dev): The deviation of the source value from the moving average is calculated. This is useful to determine whether the current price is significantly above or below the average, signaling potential buying or selling opportunities.
Overbought (ob) and Oversold (os) Levels: These levels are calculated using a linear percentile interpolation based on the deviation, length, and sensitivity inputs. The higher the sensitivity, the narrower the overbought and oversold zones, allowing users to capture more frequent signals.
Visual Elements
Moving Average Line (mu): This line represents the moving average based on the selected calculation method and is plotted with a dynamic color based on deviation thresholds. When the deviation crosses into overbought or oversold zones, it shifts to the corresponding OB/OS colors, providing a visual indication of potential trend reversals.
Deviation Plot (dev): This plot visualizes the deviation values as a column plot, with colors matching the overbought, oversold, or neutral states. This helps users to quickly assess whether the price is trending or reverting back to its mean.
Overbought (ob) and Oversold (os) Levels: These levels are plotted as fixed lines, helping users identify when the deviation crosses into overbought or oversold zones.
Market Stats Panel [Daveatt]█ Introduction
I've created a script that brings TradingView's watchlist stats panel functionality directly to your charts. This isn't just another performance indicator - it's a pixel-perfect (kidding) recreation of TradingView's native stats panel.
Important Notes
You might need to adjust manually the scaling the firs time you're using this script to display nicely all the elements.
█ Core Features
Performance Metrics
The panel displays key performance metrics (1W, 1M, 3M, 6M, YTD, 1Y) in real-time, with color-coded boxes (green for positive, red for negative) for instant performance assessment.
Display Modes
Switch seamlessly between absolute prices and percentage returns, making it easy to compare assets across different price scales.
Absolute mode
Percent mode
Historical Comparison
View year-over-year performance with color-coded lines, allowing for quick historical pattern recognition and analysis.
Data Structure Innovation
Let's talk about one of the most interesting challenges I faced. PineScript has this quirky limitation where request.security() can only return 127 tuples at most. £To work around this, I implemented a dual-request system. The first request handles indices 0-63, while the second one takes care of indices 64-127.
This approach lets us maintain extensive historical data without compromising script stability.
And here's the cool part: if you need to handle even more years of historical data, you can simply extend this pattern by adding more request.security() calls.
Each additional call can fetch another batch of monthly open prices and timestamps, following the same structure I've used.
Think of it as building with LEGO blocks - you can keep adding more pieces to extend your historical reach.
Flexible Date Range
Unlike many scripts that box you into specific timeframes, I've designed this one to be completely flexible with your date selection. You can set any start year, any end year, and the script will dynamically scale everything to match. The visual presentation automatically adjusts to whatever range you choose, ensuring your data is always displayed optimally.
█ Customization Options
Visual Settings
The panel's visual elements are highly customizable. You can adjust the panel width to perfectly fit your workspace, fine-tune the line thickness to match your preferences, and enjoy the pre-defined year color scheme that makes tracking historical performance intuitive and visually appealing.
Box Dimensions
Every aspect of the performance boxes can be tailored to your needs. Adjust their height and width, fine-tune the spacing between them, and position the entire panel exactly where you want it on your chart. The goal is to make this tool feel like it's truly yours.
█ Technical Challenges Solved
Polyline Precision
Creating precise polylines was perhaps the most demanding aspect of this project.
The challenge was ensuring accurate positioning across both time and price axes, while handling percentage mode scaling with precision.
The script constantly updates the current year's data in real-time, seamlessly integrating new information as it comes in.
Axis Management
Getting the axes right was like solving a complex puzzle. The Y-axis needed to scale dynamically whether you're viewing absolute prices or percentages.
The X-axis required careful month labeling that stays clean and readable regardless of your selected timeframe.
Everything needed to align perfectly while maintaining proper spacing in all conditions.
█ Final Notes
This tool transforms complex market data into clear, actionable insights. Whether you're day trading or analyzing long-term trends, it provides the information you need to make informed decisions. And remember, while we can't predict the future, we can certainly be better prepared for it with the right tools at hand.
A word of warning though - seeing those red numbers in a beautifully formatted panel doesn't make them any less painful! 😉
---
Happy Trading! May your charts be green and your stops be far away!
Daveatt
M.Kiriti RSI with SMA & WMAThis script is a custom RSI indicator with added SMA and WMA moving averages to smooth RSI trends and improve analysis of momentum shifts.
1. RSI Calculation: Measures 14-period RSI of the closing price, default threshold levels at 70 (overbought) and 30 (oversold).
2. Moving Averages (SMA and WMA):
- SMA and WMA are applied to RSI for trend smoothing.
- SMA gives equal weight; WMA gives more weight to recent values, making it more responsive.
3.Overbought/Oversold Lines and Labels:
- Horizontal lines and scale labels at 70 (overbought) and 30 (oversold) make these levels easy to reference.
This indicator is useful for identifying potential reversal points and momentum trends when RSI crosses its moving averages.
Smoothed Heiken Ashi Trend FilterThis indicator applies the Heiken Ashi technique with added smoothing and trend filtering to help reduce noise and improve trend detection.
Components of the Indicator:
Heiken Ashi Calculations:
Heiken Ashi Close (ha_close): This is the smoothed average of the current bar’s open, high, low, and close prices, calculated with a simple moving average (SMA) to filter out noise.
Heiken Ashi Open (ha_open): This is the average of the previous Heiken Ashi Open and the current Heiken Ashi Close. It’s also initialized to smooth the transition on the first bar.
Heiken Ashi High (ha_high) and Low (ha_low): These values are calculated as the highest and lowest values among the high, Heiken Ashi Open, and Heiken Ashi Close for each bar.
Smoothing and Noise Reduction:
Smoothing Length: The indicator applies a smoothing length to the Heiken Ashi Close, calculated with an SMA. This reduces minor fluctuations, giving a clearer view of the price action.
Minimum Body Size Filter: This filter calculates the body size of each Heiken Ashi candle and compares it to a percentage of the Average True Range (ATR). Only significant candles (those with larger bodies) are plotted, reducing weak or indecisive signals.
Trend Filtering with Moving Average:
The indicator uses a simple moving average (SMA) as a trend filter. By comparing the Heiken Ashi Close to the moving average:
Bullish Trend: The Heiken Ashi candle is green when it’s above the moving average.
Bearish Trend: The Heiken Ashi candle is red when it’s below the moving average.
How to Use This Indicator:
Trend Identification:
Green candles signify a bullish trend, while red candles signify a bearish trend.
The smoothing and trend filtering make it easier to identify sustained trends and avoid reacting to short-term fluctuations.
Filtering Out Noise:
Minor price fluctuations and small-bodied candles (often resulting in indecisive signals) are filtered out, leaving only significant signals.
Adjustable Parameters:
Smoothing Length: Controls the degree of smoothing applied to the Heiken Ashi Close value. Increasing this value will make the Heiken Ashi candles smoother.
Minimum Body Size: This is a percentage of the ATR, used to filter out small or indecisive candles.
Trend Moving Average Length: Controls the period of the moving average used as a trend filter.
This Smoothed Heiken Ashi Trend Filter indicator is useful for identifying trends and filtering out noisy signals. By smoothing and filtering, it helps traders focus on the overall trend rather than minor price movements.
Let me know if there’s anything more you’d like to add or adjust!
Swing Percentile Lines [QuantVue]The Swing High/Low Percentile Indicator is designed to help traders identify key price levels based on the most recent swing high and low. By anchoring to the most recent swing high and swing low, the indicator automatically generates percentile lines ( 25%, 50%, 75%) that act as dynamic support and resistance levels.
What Does the Indicator Do?
The Swing High/Low Percentile Indicator works by identifying the most recent significant price swings, whether it's a swing high or swing low. It then calculates the range between these points and divides the distance into percentage-based levels. These levels are plotted on the chart as clear, easy-to-read lines at 25%, 50%, and 75% of the range between the swing high and low.
These percentile lines serve as dynamic price zones where traders can anticipate potential reactions, whether the market is trending or consolidating.
How Can Traders Use the Indicator?
Support and Resistance: The percentile lines act as evolving support and resistance zones. Traders can anticipate price bounces or breaks at these levels, providing opportunities for trend-following or reversal trades.
Trend Identification: The indicator helps traders determine the strength of a trend. In a strong uptrend, price will likely stay above the 50% or 75% lines, while in a downtrend, it may remain below the 50% or 25% lines. This gives traders an edge in recognizing the overall market direction.
Entry and Exit Points: Traders can use the percentile lines to time their entries and exits. For example, entering a trade on a pullback to the 25% or 50% line offers a favorable risk-to-reward ratio. Similarly, the percentile lines serve as natural profit targets, allowing traders to plan exits as the price approaches the 50% or 75% levels.
Risk Management: The clear delineation of price levels makes it easy for traders to set stop-loss orders. For example, if price falls below the 25% line in an uptrend, it may signal weakness, prompting an exit or reduced position size.
Breakout and Breakdown Scenarios: When price breaks above a recent swing high or below a swing low, the percentile lines provide traders with pullback entry opportunities or key levels to watch for continuation of the move.
On Balance Volume Oscillator of Trading Volume TrendOn Balance Volume Oscillator of Trading Volume Trend
Introduction
This indicator, the "On Balance Volume Oscillator of Trading Volume Trend," is a technical analysis tool designed to provide insights into market momentum and potential trend reversals by combining the On Balance Volume (OBV) and Relative Strength Index (RSI) indicators.
Calculation and Methodology
* OBV Calculation: The indicator first calculates the On Balance Volume, which is a cumulative total of the volume of up days minus the volume of down days. This provides a running tally of buying and selling pressure.
* RSI of OBV: The RSI is then applied to the OBV values to smooth the data and identify overbought or oversold conditions.
* Exponential Moving Averages (EMAs): Two EMAs are calculated on the RSI of OBV. A shorter-term EMA (9-period in this case) and a longer-term EMA (100-period) are used to generate signals.
Interpretation and Usage
* EMA Crossovers: When the shorter-term EMA crosses above the longer-term EMA, it suggests increasing bullish momentum. Conversely, a downward crossover indicates weakening bullish momentum or increasing bearish pressure.
* RSI Divergences: Divergences between the price and the indicator can signal potential trend reversals. For example, if the price is making new highs but the indicator is failing to do so, it could be a bearish divergence.
* Overbought/Oversold Conditions: When the RSI of OBV is above 70, it suggests the market may be overbought and a potential correction could be imminent. Conversely, when it is below 30, it suggests the market may be oversold.
Visual Representation
The indicator is plotted on a chart with multiple lines and filled areas:
* Two EMAs: The shorter-term EMA and longer-term EMA are plotted to show the trend of the OBV.
* Filled Areas: The area between the two EMAs is filled with a color to indicate the strength of the trend. The color changes based on whether the shorter-term EMA is above or below the longer-term EMA.
* RSI Bands: Horizontal lines at 30 and 70 mark the overbought and oversold levels for the RSI of OBV.
Summary
The On Balance Volume Oscillator of Trading Volume Trend provides a comprehensive view of market momentum and can be a valuable tool for traders. By combining the OBV and RSI, this indicator helps identify potential trend reversals, overbought and oversold conditions, and the strength of the current trend.
Note: This indicator should be used in conjunction with other technical analysis tools and fundamental analysis to make informed trading decisions.
Formation Defined Moving Support and ResistanceThe script was originally coded in 2018 with Pine Script version 3, and it was in protected code status. It has been updated and optimised for Pine Script v5 and made completely open source.
The Formation Defined Moving Support and Resistance indicator is a sophisticated tool for identifying dynamic support and resistance levels based on specific price formations and level interactions. This indicator goes beyond traditional static support and resistance by updating levels based on predefined formation patterns and market behaviour, providing traders with a more responsive view of potential support and resistance zones.
Features:
The indicator detects essential price levels:
Lower Low (LL)
Higher Low (HL)
Higher High (HH)
Lower High (LH)
Equal Lower Low (ELL)
Equal Higher Low (EHL)
Equal Higher High (EHH)
Equal Lower High (ELH)
By identifying these key points, the script builds a foundation for tracking and responding to changes in price structure.
Pre-defined Formations and Comparisons:
The indicator calculates and recognises nine different pre-defined formations, such as bullish and bearish formations, based on the sequence of price levels.
These formations are compared against previous levels and formations, allowing for a sophisticated understanding of recent market movements and momentum shifts.
This formation-based approach provides insights into whether the price is likely to maintain, break, or reverse key levels.
Dynamic Support and Resistance Levels:
The indicator offers an option to toggle Moving Support and Resistance Levels.
When enabled, the support and resistance levels dynamically adjust:
Upon a change in the detected formation.
When the bar’s closing price breaks the last defined support or resistance level.
This feature ensures that the support and resistance levels adapt quickly to market changes, giving a more accurate and responsive perspective.
Customisable Price Source:
Users can choose the price source for level detection, selecting between close or high/low prices.
This flexibility allows the indicator to adapt to different trading styles, whether the focus is on closing prices for more conservative levels or on highs and lows for more sensitive level tracking.
This indicator can benefit traders relying on dynamic support and resistance rather than fixed, historical levels. It adapts to recent price actions and market formations, making it useful for identifying entry and exit points, trend continuation or reversal, and setting trailing stops based on updated support and resistance levels.
US Party Rule Indicator**Here's a description you can use for the indicator:**
**US Party Rule Indicator**
This indicator visually represents the political party in power in the United States over a specified period. It overlays a colored 200-day Exponential Moving Average (EMA) on the chart. The color of the EMA changes to reflect the ruling party, providing a visual representation of political influence on market trends.
**Key Features:**
- **Dynamic Color-Coded EMA:** The 200-EMA changes color to indicate the party in power (Red for Republican, Blue for Democrat).
- **Clear Visual Representation:** The colored EMA provides an easy-to-understand visual cue for identifying periods of different political parties.
- **Historical Context:** By analyzing the historical data, you can gain insights into potential correlations between party rule and market trends.
**How to Use:**
1. **Add the Indicator:** Add the "US Party Rule Indicator" to your chart.
2. **Interpret the Color:** The color of the 200-EMA indicates the ruling party at that time.
3. **Analyze Market Trends:** Use the indicator to identify potential correlations between political events and market movements.
**Note:** This indicator is for informational purposes only and should not be used as the sole basis for investment decisions. Always conduct thorough research and consider consulting with a financial advisor.
Returns Stationarity Analysis (YavuzAkbay)This indicator analyzes the stationarity of a stock's price returns over time. Stationarity is an important property of time series data, as it determines the validity of statistical analysis and forecasting methods.
The indicator provides several visual cues to help assess the stationarity of the price returns:
Price Returns: Displays the daily percentage change in the stock's closing price.
Moving Average: Shows the smoothed trend of the price returns using a simple moving average.
Z-Score: Calculates the standardized z-score of the price returns, highlighting periods of significant deviation from the mean.
Autocorrelation: Plots the autocorrelation of the price returns, which measures the persistence or "memory" in the time series. High autocorrelation suggests non-stationarity.
The indicator also includes the following features:
Customizable lookback period and smoothing window for the moving statistics.
Lag parameter for the autocorrelation calculation.
Shaded bands to indicate the significance levels for the z-score and autocorrelation.
Visual signals (red dots) to highlight periods that are potentially non-stationary, based on a combination of high z-score and autocorrelation.
Informative labels to guide the interpretation of the results.
This indicator can be a useful tool for stock market analysts and traders to identify potential changes in the underlying dynamics of a stock's price behavior, which may have implications for forecasting, risk management, and investment strategies.
High/Low Location Frequency [LuxAlgo]The High/Low Location Frequency tool provides users with probabilities of tops and bottoms at user-defined periods, along with advanced filters that offer deep and objective market information about the likelihood of a top or bottom in the market.
🔶 USAGE
There are four different time periods that traders can select for analysis of probabilities:
HOUR OF DAY: Probability of occurrence of top and bottom prices for each hour of the day
DAY OF WEEK: Probability of occurrence of top and bottom prices for each day of the week
DAY OF MONTH: Probability of occurrence of top and bottom prices for each day of the month
MONTH OF YEAR: Probability of occurrence of top and bottom prices for each month
The data is displayed as a dashboard, which users can position according to their preferences. The dashboard includes useful information in the header, such as the number of periods and the date from which the data is gathered. Additionally, users can enable active filters to customize their view. The probabilities are displayed in one, two, or three columns, depending on the number of elements.
🔹 Advanced Filters
Advanced Filters allow traders to exclude specific data from the results. They can choose to use none or all filters simultaneously, inputting a list of numbers separated by spaces or commas. However, it is not possible to use both separators on the same filter.
The tool is equipped with five advanced filters:
HOURS OF DAY: The permitted range is from 0 to 23.
DAYS OF WEEK: The permitted range is from 1 to 7.
DAYS OF MONTH: The permitted range is from 1 to 31.
MONTHS: The permitted range is from 1 to 12.
YEARS: The permitted range is from 1000 to 2999.
It should be noted that the DAYS OF WEEK advanced filter has been designed for use with tickers that trade every day, such as those trading in the crypto market. In such cases, the numbers displayed will range from 1 (Sunday) to 7 (Saturday). Conversely, for tickers that do not trade over the weekend, the numbers will range from 1 (Monday) to 5 (Friday).
To illustrate the application of this filter, we will exclude results for Mondays and Tuesdays, the first five days of each month, January and February, and the years 2020, 2021, and 2022. Let us review the results:
DAYS OF WEEK: `2,3` or `2 3` (for crypto) or `1,2` or `1 2` (for the rest)
DAYS OF MONTH: `1,2,3,4,5` or `1 2 3 4 5`
MONTHS: `1,2` or `1 2`
YEARS: `2020,2021,2022` or `2020 2021 2022`
🔹 High Probability Lines
The tool enables traders to identify the next period with the highest probability of a top (red) and/or bottom (green) on the chart, marked with two horizontal lines indicating the location of these periods.
🔹 Top/Bottom Labels and Periods Highlight
The tool is capable of indicating on the chart the upper and lower limits of each selected period, as well as the commencement of each new period, thus providing traders with a convenient reference point.
🔶 SETTINGS
Period: Select how many bars (hours, days, or months) will be used to gather data from, max value as default.
Execution Window: Select how many bars (hours, days, or months) will be used to gather data from
🔹 Advanced Filters
Hours of day: Filter which hours of the day are excluded from the data, it accepts a list of hours from 0 to 23 separated by commas or spaces, users can not mix commas or spaces as a separator, must choose one
Days of week: Filter which days of the week are excluded from the data, it accepts a list of days from 1 to 5 for tickers not trading weekends, or from 1 to 7 for tickers trading all week, users can choose between commas or spaces as a separator, but can not mix them on the same filter.
Days of month: Filter which days of the month are excluded from the data, it accepts a list of days from 1 to 31, users can choose between commas or spaces as separator, but can not mix them on the same filter.
Months: Filter months to exclude from data. Accepts months from 1 to 12. Choose one separator: comma or space.
Years: Filter years to exclude from data. Accepts years from 1000 to 2999. Choose one separator: comma or space.
🔹 Dashboard
Dashboard Location: Select both the vertical and horizontal parameters for the desired location of the dashboard.
Dashboard Size: Select size for dashboard.
🔹 Style
High Probability Top Line: Enable/disable `High Probability Top` vertical line and choose color
High Probability Bottom Line: Enable/disable `High Probability Bottom` vertical line and choose color
Top Label: Enable/disable period top labels, choose color and size.
Bottom Label: Enable/disable period bottom labels, choose color and size.
Highlight Period Changes: Enable/disable vertical highlight at start of period
FTMO Rules MonitorFTMO Rules Monitor: Stay on Track with Your FTMO Challenge Goals
TLDR; You can test with this template whether your strategy for one asset would pass the FTMO challenges step 1 then step 2, then with real money conditions.
Passing a prop firm challenge is ... challenging.
I believe a toolkit allowing to test in minutes whether a strategy would have passed a prop firm challenge in the past could be very powerful.
The FTMO Rules Monitor is designed to help you stay within FTMO’s strict risk management guidelines directly on your chart. Whether you’re aiming for the $10,000 or the $200,000 account challenge, this tool provides real-time tracking of your performance against FTMO’s rules to ensure you don’t accidentally breach any limits.
NOTES
The connected indicator for this post doesn't matter.
It's just a dummy double supertrends (see below)
The strategy results for this script post does not matter as I'm posting a FTMO rules template on which you can connect any indicator/strategy.
//@version=5
indicator("Supertrends", overlay=true)
// Supertrend 1 Parameters
var string ST1 = "Supertrend 1 Settings"
st1_atrPeriod = input.int(10, "ATR Period", minval=1, maxval=50, group=ST1)
st1_factor = input.float(2, "Factor", minval=0.5, maxval=10, step=0.5, group=ST1)
// Supertrend 2 Parameters
var string ST2 = "Supertrend 2 Settings"
st2_atrPeriod = input.int(14, "ATR Period", minval=1, maxval=50, group=ST2)
st2_factor = input.float(3, "Factor", minval=0.5, maxval=10, step=0.5, group=ST2)
// Calculate Supertrends
= ta.supertrend(st1_factor, st1_atrPeriod)
= ta.supertrend(st2_factor, st2_atrPeriod)
// Entry conditions
longCondition = direction1 == -1 and direction2 == -1 and direction1 == 1
shortCondition = direction1 == 1 and direction2 == 1 and direction1 == -1
// Optional: Plot Supertrends
plot(supertrend1, "Supertrend 1", color = direction1 == -1 ? color.green : color.red, linewidth=3)
plot(supertrend2, "Supertrend 2", color = direction2 == -1 ? color.lime : color.maroon, linewidth=3)
plotshape(series=longCondition, location=location.belowbar, color=color.green, style=shape.triangleup, title="Long")
plotshape(series=shortCondition, location=location.abovebar, color=color.red, style=shape.triangledown, title="Short")
signal = longCondition ? 1 : shortCondition ? -1 : na
plot(signal, "Signal", display = display.data_window)
To connect your indicator to this FTMO rules monitor template, please update it as follow
Create a signal variable to store 1 for the long/buy signal or -1 for the short/sell signal
Plot it in the display.data_window panel so that it doesn't clutter your chart
signal = longCondition ? 1 : shortCondition ? -1 : na
plot(signal, "Signal", display = display.data_window)
In the FTMO Rules Monitor template, I'm capturing this external signal with this input.source variable
entry_connector = input.source(close, "Entry Connector", group="Entry Connector")
longCondition = entry_connector == 1
shortCondition = entry_connector == -1
🔶 USAGE
This indicator displays essential FTMO Challenge rules and tracks your progress toward meeting each one. Here’s what’s monitored:
Max Daily Loss
• 10k Account: $500
• 25k Account: $1,250
• 50k Account: $2,500
• 100k Account: $5,000
• 200k Account: $10,000
Max Total Loss
• 10k Account: $1,000
• 25k Account: $2,500
• 50k Account: $5,000
• 100k Account: $10,000
• 200k Account: $20,000
Profit Target
• 10k Account: $1,000
• 25k Account: $2,500
• 50k Account: $5,000
• 100k Account: $10,000
• 200k Account: $20,000
Minimum Trading Days: 4 consecutive days for all account sizes
🔹 Key Features
1. Real-Time Compliance Check
The FTMO Rules Monitor keeps track of your daily and total losses, profit targets, and trading days. Each metric updates in real-time, giving you peace of mind that you’re within FTMO’s rules.
2. Color-Coded Visual Feedback
Each rule’s status is shown clearly with a ✓ for compliance or ✗ if the limit is breached. When a rule is broken, the indicator highlights it in red, so there’s no confusion.
3. Completion Notification
Once all FTMO requirements are met, the indicator closes all open positions and displays a celebratory message on your chart, letting you know you’ve successfully completed the challenge.
4. Easy-to-Read Table
A table on your chart provides an overview of each rule, your target, current performance, and whether you’re meeting each goal. The table adjusts its color scheme based on your chart settings for optimal visibility.
5. Dynamic Position Sizing
Integrated ATR-based position sizing helps you manage risk and avoid large drawdowns, ensuring each trade aligns with FTMO’s risk management principles.
Daveatt
Pulse DPO: Major Cycle Tops and Bottoms█ OVERVIEW
Pulse DPO is an oscillator designed to highlight Major Cycle Tops and Bottoms .
It works on any market driven by cycles. It operates by removing the short-term noise from the price action and focuses on the market's cyclical nature.
This indicator uses a Normalized version of the Detrended Price Oscillator (DPO) on a 0-100 scale, making it easier to identify major tops and bottoms.
Credit: The DPO was first developed by William Blau in 1991.
█ HOW TO READ IT
Pulse DPO oscillates in the range between 0 and 100. A value in the upper section signals an OverBought (OB) condition, while a value in the lower section signals an OverSold (OS) condition.
Generally, the triggering of OB and OS conditions don't necessarily translate into swing tops and bottoms, but rather suggest caution on approaching a market that might be overextended.
Nevertheless, this indicator has been customized to trigger the signal only during remarkable top and bottom events.
I suggest using it on the Daily Time Frame , but you're free to experiment with this indicator on other time frames.
The indicator has Built-in Alerts to signal the crossing of the Thresholds. Please don't act on an isolated signal, but rather integrate it to work in conjunction with the indicators present in your Trading Plan.
█ OB SIGNAL ON: ENTERING OVERBOUGHT CONDITION
When Pulse DPO crosses Above the Top Threshold it Triggers ON the OB signal. At this point the oscillator line shifts to OB color.
When Pulse DPO enters the OB Zone, please beware! In this Area the Major Players usually become Active Sellers to the Public. While the OB signal is On, it might be wise to Consider Selling a portion or the whole Long Position.
Please note that even though this indicator aims to focus on major tops and bottoms, a strong trending market might trigger the OB signal and stay with it for a long time. That's especially true on young markets and on bubble-mode markets.
█ OB SIGNAL OFF: EXITING OVERBOUGHT CONDITION
When Pulse DPO crosses Below the Top Threshold it Triggers OFF the OB signal. At this point the oscillator line shifts to its normal color.
When Pulse DPO exits the OB Zone, please beware because a Major Top might just have occurred. In this Area the Major Players usually become Aggressive Sellers. They might wind up any remaining Long Positions and Open new Short Positions.
This might be a good area to Open Shorts or to Close/Reverse any remaining Long Position. Whatever you choose to do, it's usually best to act quickly because the market is prone to enter into panic mode.
█ OS SIGNAL ON: ENTERING OVERSOLD CONDITION
When Pulse DPO crosses Below the Bottom Threshold it Triggers ON the OS signal. At this point the oscillator line shifts to OS color.
When Pulse DPO enters the OS Zone, please beware because in this Area the Major Players usually become Active Buyers accumulating Long Positions from the desperate Public.
While the OS signal is On, it might be wise to Consider becoming a Buyer or to implement a Dollar-Cost Averaging (DCA) Strategy to build a Long Position towards the next Cycle. In contrast to the tops, the OS state usually takes longer to resolve a major bottom.
█ OS SIGNAL OFF: EXITING OVERSOLD CONDITION
When Pulse DPO crosses Above the Bottom Threshold it Triggers OFF the OS signal. At this point the oscillator line shifts to its normal color.
When Pulse DPO exits the OS Zone, please beware because a Major Bottom might already be in place. In this Area the Major Players become Aggresive Buyers. They might wind up any remaining Short Positions and Open new Long Positions.
This might be a good area to Open Longs or to Close/Reverse any remaining Short Positions.
█ WHY WOULD YOU BE INTERESTED IN THIS INDICATOR?
This indicator is built over a solid foundation capable of signaling Major Cycle Tops and Bottoms across many markets. Let's see some examples:
Early Bitcoin Years: From 0 to 1242
This chart is in logarithmic mode in order to properly display various exponential cycles. Pulse DPO is properly signaling the major early highs from 9-Jun-2011 at 31.50, to the next one on 9-Apr-2013 at 240 and the epic top from 29-Nov-2013 at 1242.
Due to the massive price movements, the OB condition stays pinned during most of the exponential price action. But as you can see, the OB condition quickly vanishes once the Cycle Top has been reached. As the market matures, the OB condition becomes more exceptional and triggers much closer from the Cycle Top.
With regards to Cycle Bottoms, the early bottom of 2 after having peaked at 31.50 doesn’t get captured by the indicator. That is the only cycle bottom that escapes the Pulse DPO when the bottom threshold is set at a value of 5. In that event, the oscillator low reached 6.95.
Bitcoin Adoption Spreading: From 257 to 73k
This chart is in logarithmic mode in order to properly display various exponential cycles. Pulse DPO is properly signaling all the major highs from 17-Dec-2017 at 19k, to the next one on 14-Apr-2021 at 64k and the most recent top from 9-Nov-2021 at 68k.
During the massive run of 2017, the OB condition still stayed triggered for a few weeks on each swing top. But on the next cycles it started to signal only for a few days before each swing top actually happened. The OB condition during the last cycle top triggered only for 3 days. Therefore the signal grows in focus as the market matures.
At the time of publishing this indicator, Bitcoin printed a new All Time High (ATH) on 13-Mar-2024 at 73k. That run didn’t trigger the OB condition. Therefore, if the indicator is correct the Bitcoin market still has some way to grow during the next months.
With regards to Cycle Bottoms, the bottom of 3k after having peaked at19k got captured within the wide OS zone. The bottom of 15k after having peaked at 68k got captured too within the OS accumulation area.
Gold
Pulse DPO behaves surprisingly well on a long standing market such as Gold. Moving back to the 197x years it’s been signaling most Cycle Tops and Bottoms with precision. During the last cycle, it shows topping at 2k and bottoming at 1.6k.
The current price action is signaling OB condition in the range of 2.5k to 2.7k. Looking at past cycles, it tends to trigger on and off at multiple swing tops until reaching the final cycle top. Therefore this might indicate the first wave within a potential gold run.
Oil
On the Oil market, we can see that most of the cycle tops and bottoms since the 80s got signaled. The only exception being the low from 2020 which didn’t trigger.
EURUSD
On Forex markets the Pulse DPO also behaves as expected. Looking back at EURUSD we can see the marketing triggering OB and OS conditions during major cycle tops and bottoms from recent times until the 80s.
S&P 500
On the S&P 500 the Pulse DPO catched the lows from 2016 and 2020. Looking at present price action, the recent ATH didn’t trigger the OB condition. Therefore, the indicator is allowing room for another leg up during the next months.
Amazon
On the Amazon chart the Pulse DPO is mirroring pretty accurately the major swings. Scrolling back to the early 2000s, this chart resembles early exponential swings in the crypto space.
Tesla
Moving onto a younger tech stock, Pulse DPO captures pretty accurately the major tops and bottoms. The chart is shown in logarithmic scale to better display the magnitude of the moves.
█ SETTINGS
This indicator is ideal for identifying major market turning points while filtering out short-term noise. You are free to adjust the parameters to align with your preferred trading style.
Parameters : This section allows you to customize any of the Parameters that shape the Oscillator.
Oscillator Length: Defines the period for calculating the Oscillator.
Offset: Shifts the oscillator calculation by a certain number of periods, which is typically half the Oscillator Length.
Lookback Period: Specifies how many bars to look back to find tops and bottoms for normalization.
Smoothing Length: Determines the length of the moving average used to smooth the oscillator.
Thresholds : This section allows you to customize the Thresholds that trigger the OB and OS conditions.
Top: Defines the value of the Top Threshold.
Bottom: Defines the value of the Bottom Threshold.
Watchlist & Symbols Distribution [Daveatt]TLDR;
I got bored so I just coded the TradingView watchlist interface in Pinescript :)
TLDR 2:
Sharing it open-source what took me 1 full day to code - haven't coded in Pinescript in a long time, so I'm a bit slow for now :)
█ OVERVIEW
This script offers a comprehensive market analysis tool inspired by TradingView's native watchlist interface features.
It combines an interactive watchlist with powerful distribution visualization capabilities and a performance comparison panel.
The script was developed with a focus on providing multiple visualization methods while working within PineScript's limitations.
█ DEVELOPMENT BACKGROUND
The pie chart implementation was greatly inspired by the ( "Crypto Map Dashboard" script / )
adapting its circular visualization technique to create dynamic distribution charts. However, due to PineScript's 500-line limitation per script, I had to optimize the code to allow users to switch between pie chart analysis and performance comparison modes rather than displaying both simultaneously.
█ SETUP AND DISPLAY
For optimal visualization, users need to adjust the chart's display settings manually.
This involves:
Expanding the indicator window vertically to accommodate both the watchlist and graphical elements
Adjusting the Y-axis scale by dragging it to ensure proper spacing for the comparison panel grid
Modifying the X-axis scale to achieve the desired time window display
Fine-tuning these adjustments whenever switching between pie chart and comparison panel modes
These manual adjustments are necessary due to PineScript's limitations in controlling chart scaling programmatically. While this requires some initial setup, it allows users to customize the display to their preferred viewing proportions.
█ MAIN FEATURES
Distribution Analysis
The script provides three distinct distribution visualization modes through a pie chart.
Users can analyze their symbols by exchanges, asset types (such as Crypto, Forex, Futures), or market sectors.
If you can't see it well at first, adjust your chart scaling until it's displayed nicely.
Asset Exchanges
www.tradingview.com
Asset Types
Asset Sectors
The pie charts feature an optional 3D effect with adjustable depth and angle parameters. To enhance visual customization, four different color schemes are available: Default, Pastel, Dark, and Neon.
Each segment of the pie chart includes interactive tooltips that can be configured to show different levels of detail. Importantly, the pie chart only visualizes the distribution of selected assets (those marked with a checkmark in the watchlist), providing a focused view of the user's current interests.
Interactive Watchlist
The watchlist component displays real-time data for up to 10 user-defined symbols. Each entry shows current price, price changes (both absolute and percentage), volume metrics, and a comparison toggle.
The table is dynamically updated and features color-coded entries that correspond to their respective performance lines in the comparison chart. The watchlist serves as both an information display and a control panel for the comparison feature.
Performance Comparison
One of the script's most innovative features is its performance comparison panel.
Using polylines for smooth visualization, it tracks the 30-day performance of selected symbols relative to a 0% baseline.
The comparison chart includes a sophisticated grid system with 5% intervals and a dynamic legend showing current performance values.
The polyline implementation allows for fluid, continuous lines that accurately represent price movements, providing a more refined visual experience than traditional line plots. Like the pie charts, the comparison panel only displays performance lines for symbols that have been selected in the watchlist, allowing users to focus on their specific assets of interest.
█ TECHNICAL IMPLEMENTATION
The script utilizes several advanced PineScript features:
Dynamic array management for symbol tracking
Polyline-based charting for smooth performance visualization
Real-time data processing with security calls
Interactive tooltips and labels
Optimized drawing routines to maintain performance
Selective visualization based on user choices
█ CUSTOMIZATION
Users can personalize almost every aspect of the script:
Symbol selection and comparison preferences
Visual theme selection with four distinct color schemes
Pie chart dimensions and positioning
Tooltip information density
Component visibility toggles
█ LIMITATIONS
The primary limitation stems from PineScript's 500-line restriction per script.
This constraint necessitated the implementation of a mode-switching system between pie charts and the comparison panel, as displaying both simultaneously would exceed the line limit. Additionally, the script relies on manual chart scale adjustments, as PineScript doesn't provide direct control over chart scaling when overlay=false is enabled.
However, these limitations led to a more focused and efficient design approach that gives users control over their viewing experience.
█ CONCLUSION
All those tools exist in the native TradingView watchlist interface and they're better than what I just did.
However, now it exists in Pinescript... so I believe it's a win lol :)
David_candle length with average and candle directionThis indicator,
calculates the difference between the highest and lowest price (High-Low difference) for a specified number of periods and displays it in a table. Here are the functions and details included:
Number of Periods: The user can define the number of periods (e.g., 10) for which the High-Low differences are calculated.
Table Position: The position of the table that displays the results can be selected by the user (top left, top right, bottom left, or bottom right).
High-Low Difference per Candle: For each defined period, the difference between the highest and lowest price of the respective candle is calculated.
Candle Direction: The color of the displayed text in the table changes based on the candle direction:
Green for bullish candles (close price higher than open price).
Red for bearish candles (close price lower than open price).
White for neutral candles (close price equal to open price).
Average: Below the High-Low differences, the average value of the calculated differences is displayed in yellow text.
This indicator is useful for visually analyzing the volatility and movement range within the recent candles by highlighting the average High-Low difference.
Horizontal Lines at Custom IntervalsThis Pine Script indicator, "Horizontal Lines at Custom Intervals," is a versatile tool designed to help traders visualize key price levels at regular intervals above and below a specified starting price. It is particularly useful for identifying support and resistance zones, psychological price levels, or potential entry and exit points around a central price reference.
Customizable Starting Price**: Set a central price around which the lines will be drawn, such as a current asset price, pivot level, or significant historical level.
- **Adjustable Intervals and Range**: Choose the interval distance (in points) between each horizontal line, as well as the total range above and below the starting price. This flexibility allows the indicator to adapt to different asset classes and timeframes.
- **Full Chart Extensions**: Each line is set to extend across the entire chart, providing a clear, continuous visual reference that spans both past and future price action.
- **Editable Line Style, Width, and Color**: Personalize the appearance of the lines with selectable color, width, and style options (Solid, Dotted, Dashed), enabling the indicator to match your charting preferences and visual style.
### Applications:
1. **Support and Resistance Identification**: Traders can use the evenly spaced lines to identify potential support and resistance zones around the starting price, helping to mark areas of interest where price may react.
2. **Psychological Levels**: Round-number levels often hold psychological significance in trading. By setting intervals to common round numbers, this indicator can help identify these critical levels.
3. **Scalping and Range Trading**: This tool is especially valuable in range-bound markets, where repeated price action within defined levels allows traders to buy and sell around predictable zones.
4. **Trend Reversal and Breakout Signals**: In trending markets, observing how price interacts with these levels can offer insights into possible breakouts or trend reversals.
### Example Use Case:
For instance, if BankNifty is trading around 51,130, you can set this as the starting price. With 50-point intervals and a range of 1,000 points, the indicator will plot lines at 50-point increments both above and below 51,130, covering a total range of 2,000 points. This setup provides clear visual cues for potential price reaction zones as the asset moves through different price levels.
This indicator is a simple yet powerful addition to any trader’s toolkit, offering a structured approach to analyzing price levels and making informed trading decisions.
Distance Indicator:52W H/L,MA,ADR%Description:
This indicator provides key metrics for analyzing the market's distance from significant levels. It includes options to display the distance in percentage terms from:
52-Week High and Low: Shows how far the current close price is from the highest and lowest price over the past 52 weeks.
Selected Moving Averages (MA): Tracks the distance of the current close from multiple moving averages (10, 21, 30, 50 periods), with an option to choose either EMA or SMA. This allows traders to quickly gauge momentum relative to short and long-term trends.
Average Daily Range (ADR%): Calculates the average daily range (high minus low) over the past 14 days as a percentage of the current close, helping to understand recent volatility.
3-Month Move: Tracks the percentage distance from the lowest price of the past 3 months to the current close.
Customization Options:
Include/Exclude Plots: Turn each indicator on or off as needed.
Color and Transparency: Customizable colors and transparency levels for each plot for easy visualization.
MA Type Selection: Choose between SMA or EMA for moving averages to suit trading preferences.
Note: All calculations are based on the daily timeframe, ensuring consistent and reliable values regardless of the chart’s selected timeframe.