Customizable Multi-Timeframe Doji with Ray and Editable LabelScript Overview
Script Name: Customizable Multi-Timeframe Doji Candle Levels with Ray and Editable Label
Purpose: This script helps traders identify significant price levels based on high timeframe Doji candles, allowing them to visualize key areas of support, resistance, entry, and exit. By plotting real-time Doji levels from higher timeframes directly on the current chart, traders can easily spot areas where market indecision or potential trend reversals have previously occurred, making these levels highly relevant for future price action.
How the Script Works
This script detects Doji candles on a selected higher timeframe (e.g., daily, weekly, monthly) and plots a ray at the Doji’s closing level on the current chart. The Doji candle formation, characterized by an open and close that are very close or equal, is often an indicator of market indecision. By identifying these Doji levels from high timeframes, the script provides traders with insight into where strong support and resistance zones may form.
The script continuously monitors and updates the Doji level based on the selected timeframe, ensuring that only the latest detected Doji candle is displayed on the chart, helping traders avoid clutter and focus on the most recent data.
Core Components and Calculations
1 Doji Detection Logic:
-The script calculates the Doji candle formation based on a small body percentage (defined by the C_DojiBodyPercent parameter) and relative symmetry in upper and lower shadows (defined by C_ShadowPercent and C_ShadowEqualsPercent).
-A Doji is considered valid when the open and close prices are nearly equal, and the shadows are symmetric within the defined parameters, indicating indecision.
2 Multi-Timeframe Data Retrieval:
-Using the request.security() function, the script fetches open, high, low, and close prices from the specified higher timeframe. It applies Doji detection logic to this higher timeframe data.
-barmerge.lookahead_on and barmerge.gaps_on ensure real-time updates, so the Doji level is immediately reflected on the chart when detected.
3 Ray and Label Plotting:
-When a Doji candle is detected on the selected timeframe, the script plots a ray at the Doji's close price, extending forward on the chart.
-Customizable options for the ray, including color, width, and style (solid, dotted, or dashed), help traders visually differentiate the Doji levels from other chart elements.
-An editable label can be positioned alongside the ray to denote the Doji level, with customizable text, color, background, and size to provide additional context.
4 Automatic Line and Label Management:
-The script dynamically deletes any previous ray and label when a new Doji is detected. This approach minimizes chart clutter and ensures that only the most recent Doji level from the higher timeframe is displayed.
Customization Options
1 Timeframe Selection:
Users can choose any timeframe (e.g., hourly, daily, weekly, monthly) to display Doji levels based on their specific trading strategy.
2 Ray and Label Appearance:
Ray: Customize color, width, and line style (solid, dotted, dashed) for better visibility and integration with the chart’s theme.
Label: Customize the label text, background color, text color, text size, and position (above, below, left, or right of the ray) for a personalized view.
How to Use This Script
1 Select the Target Timeframe for Doji Detection: Choose a high timeframe (such as daily or weekly) to view Doji-based support/resistance levels.
2 Set Custom Ray and Label Parameters : Adjust the visual aspects of the ray and label to align with your chart setup and make the Doji level stand out.
3 Interpretation of Doji Levels: Use the plotted Doji levels as potential support or resistance zones. Since Doji candles reflect market indecision, they often precede significant price reversals or strong continuation moves. By analyzing these levels, traders can:
- Identify key support/resistance zones based on historical market indecision.
- Set entry and exit levels around these zones to capitalize on potential reversals or
continuations.
-Spot confluence areas where the Doji level aligns with other indicators or technical patterns.
Recommended Chart Setup
For optimal clarity, use this script on a clean chart, free from overlapping indicators. This script is designed to work independently, so avoid layering multiple support/resistance scripts unless essential to avoid clutter. A clean chart helps ensure that Doji levels are readily visible, enabling a clear focus on significant levels relevant to your trading strategy.
Индикаторы и стратегии
Optimus trader Optimus Trader
Indicator Description:
The Optimus Trader indicator is designed for technical traders looking for entry and exit points in financial markets. It combines signals based on volume, moving averages, VWAP (Volume Weighted Average Price), as well as the recognition of candlestick patterns such as Pin Bar and Inside Bars. This indicator helps identify opportune moments to buy or sell based on trends, volumes, and recent liquidity zones.
Parameters and Features:
1. Simple Moving Average (MA) and VWAP:
- Optimus Trader uses a 50-period simple moving average to determine the underlying trend. It also includes VWAP for precise price analysis based on traded volumes.
- These two indicators help identify whether the market is in an uptrend or downtrend, enhancing the reliability of buy and sell signals.
2. Volume :
- To avoid false signals, a volume threshold is set using a 20-period moving average, adjusted to 1.2 times the average volume. This filters signals by considering only high-volume periods, indicating heightened market interest.
3. Candlestick Pattern Recognition:
- Pin Bar: This sought-after candlestick pattern is detected for both bullish and bearish setups. A bullish or bearish *Pin Bar* often signals a possible reversal or continuation.
- *Inside Bar*: This price compression pattern is also detected, indicating a zone of indecision before a potential movement.
4. Trend:
- An uptrend is confirmed when the price is above the MA and VWAP, while a downtrend is identified when the price is below both indicators.
5. Liquidity Zones:
- Optimus Trader includes an approximate liquidity zone detection feature. By identifying recent support and resistance levels, the indicator detects if the price is near these zones. This feature strengthens the relevance of buy or sell signals.
6. Buy and Sell Signals:
- Buy: A buy signal is generated when the indicator detects a bullish *Pin Bar* or *Inside Bar* in an uptrend with high volume, and the price is close to a liquidity zone.
- Sell: A sell signal is generated when a bearish *Pin Bar* or *Inside Bar* is detected in a downtrend with high volume, and the price is near a liquidity zone.
Signal Display:
The signals are visible directly on the chart:
- A "BUY" label in green is displayed below the bar for buy signals.
- A "SELL" label in red is displayed above the bar for sell signals.
Summary:
This indicator is intended for traders seeking precise entry and exit points by integrating trend analysis, volume, and candlestick patterns. With liquidity zones, *Optimus Trader* helps minimize false signals, providing clear and accurate alerts.
---
This description can be directly added to TradingView to help users quickly understand the features and logic of this indicator.
Fractal Trend Detector [Skyrexio]Introduction
Fractal Trend Detector leverages the combination of Williams fractals and Alligator Indicator to help traders to understand with the high probability what is the current trend: bullish or bearish. It visualizes the potential uptrend with the coloring bars in green, downtrend - in red color. Indicator also contains two additional visualizations, the strong uptrend and downtrend as the green and red zones and the white line - trend invalidation level (more information in "Methodology and it's justification" paragraph)
Features
Optional strong up and downtrends visualization: with the specified parameter in settings user can add/hide the green and red zones of the strong up and downtrends.
Optional trend invalidation level visualization: with the specified parameter in settings user can add/hide the white line which shows the current trend invalidation price.
Alerts: user can set up the alert and have notifications when uptrend/downtrend has been started, strong uptrend/downtrend started.
Methodology and it's justification
In this script we apply the concept of trend given by Bill Williams in his book "Trading Chaos". This approach leverages the Alligator and Fractals in conjunction. Let's briefly explain these two components.
The Williams Alligator, created by Bill Williams, is a technical analysis tool used to identify trends and potential market reversals. It consists of three moving averages, called the jaw, teeth, and lips, which represent different time periods:
Jaw (Blue Line): The slowest line, showing a 13-period smoothed moving average shifted 8 bars forward.
Teeth (Red Line): The medium-speed line, an 8-period smoothed moving average shifted 5 bars forward.
Lips (Green Line): The fastest line, a 5-period smoothed moving average shifted 3 bars forward.
When the lines are spread apart and aligned, the "alligator" is "awake," indicating a strong trend. When the lines intertwine, the "alligator" is "sleeping," signaling a non-trending or range-bound market. This indicator helps traders identify when to enter or avoid trades.
Williams Fractals, introduced by Bill Williams, are a technical analysis tool used to identify potential reversal points on a price chart. A fractal is a series of at least five consecutive bars where the middle bar has the highest high (for a up fractal) or the lowest low (for a down fractal), compared to the two bars on either side.
Key Points:
Up fractal: Formed when the middle bar shows a higher high than the two preceding and two following bars, signaling a potential turning point downward.
Down fractal: Formed when the middle bar has a lower low than the two surrounding bars, indicating a potential upward reversal.
Fractals are often used with other indicators to confirm trend direction or reversal, helping traders make more informed trading decisions.
How we can use its combination? Let's explain the uptrend example. The up fractal breakout to the upside can be interpret as bullish sign, there is a high probability that uptrend has just been started. It can be explained as following: the up fractal created is the potential change in market's behavior. A lot of traders made a decision to sell and it created the pullback with the fractal at the top. But if price is able to reach the fractal's top and break it, this is a high probability sign that market "changed his opinion" and bullish trend has been started. The moment of breaking is the potential changing to the uptrend. Here is another one important point, this breakout shall happen above the Alligator's teeth line. If not, this crossover doesn't count and the downtrend potentially remaining. The inverted logic is true for the down fractals and downtrend.
According to this methodology we received the high probability up and downtrend changes, but we can even add it. If current trend established by the indicator as the uptrend and alligator's lines have the following order: lips is higher than teeth, teeth is higher than jaw, script count it as a strong uptrend and start print the green zone - zone between lips and jaw. It can be used as a high probability support of the current bull market. The inverted logic can be used for bearish trend and red zones: if lips is lower than teeth and teeth is lower than jaw it's interpreted by the indicator as a strong down trend.
Indicator also has the trend invalidation line (white line). If current bar is green and market condition is interpreted by the script as an uptrend you will see the invalidation line below current price. This is the price level which shall be crossed by the price to change up trend to down trend according to algorithm. This level is recalculated on every candle. The inverted logic is valid for downtrend.
How to use indicator
Apply it to desired chart and time frame. It works on every time frame.
Setup the settings with enabling/disabling visualization of strong up/downtrend zones and trend invalidation line. "Show Strong Bullish/Bearish Trends" and "Show Trend Invalidation Price" checkboxes in the settings. By default they are turned on.
Analyze the price action. Indicator colored candle in green if it's more likely that current state is uptrend, in red if downtrend has the high probability to be now. Green zones between two lines showing if current uptrend is likely to be strong. This zone can be used as a high probability support on the uptrend. The red zone show high probability of strong downtrend and can be used as a resistance. White line is showing the level where uptrend or downtrend is going be invalidated according to indicator's algorithm. If current bar is green invalidation line will be below the current price, if red - above the current price.
Set up the alerts if it's needed. Indicator has four custom alerts called "Uptrend has been started" when current bar closed as green and the previous was not green, "Downtrend has been started" when current bar closed red and the previous was not red, "Uptrend became strong" if script started printing the green zone "Downtrend became strong" if script started printing the red zone.
Disclaimer:
Educational and informational tool reflecting Skyrex commitment to informed trading. Past performance does not guarantee future results. Test indicators before live implementation.
Bollinger Bands + RSI StrategyThe Bollinger Bands + RSI strategy combines volatility and momentum indicators to spot trading opportunities in intraday settings. Here’s a concise summary:
Components:
Bollinger Bands: Measures market volatility. The lower band signals potential buying opportunities when the price is considered oversold.
Relative Strength Index (RSI): Evaluates momentum to identify overbought or oversold conditions. An RSI below 30 indicates oversold, suggesting a buy, and above 70 indicates overbought, suggesting a sell.
Strategy Execution:
Buy Signal : Triggered when the price falls below the lower Bollinger Band while the RSI is also below 30.
Sell Signal : Activated when the price exceeds the upper Bollinger Band with an RSI above 70.
Exit Strategy : Exiting a buy position is considered when the RSI crosses back above 50, capturing potential rebounds.
Advantages:
Combines price levels with momentum for more reliable signals.
Clearly defined entry and exit points help minimize emotional trading.
Considerations:
Can produce false signals in very volatile or strongly trending markets.
Best used in markets without a strong prevailing trend.
This strategy aids traders in making decisions based on technical indicators, enhancing their ability to profit from short-term price movements.
Position Size Calculator by Dr. Rahul Ware.Position Size Calculator
The Position Size Calculator script helps traders determine the optimal position size for their trades based on their account balance, risk percentage, and stop loss parameters. It calculates the number of shares to buy and the total position size in INR (Indian Rupees), providing a clear and concise way to manage risk effectively.
Key Features:
Account Balance Input: Specify your account balance in INR to tailor the position size calculations to your specific trading capital.
Risk Percentage Input: Define the percentage of your account balance you are willing to risk on each trade, ensuring you stay within your risk tolerance.
Stop Loss Options: Choose between using a fixed stop loss price or a stop loss percentage to calculate the risk amount per share.
Dynamic Stop Loss Line: The script plots a red dotted line representing the stop loss price on the chart, updating dynamically for the last bar.
Comprehensive Table Display: View key metrics, including account balance, risk percentage, amount at risk, current price, stop loss price, stop loss percentage, position size in INR, and the number of shares to buy, all in a neatly formatted table.
This tool is designed to enhance your trading strategy by providing precise position sizing, helping you manage risk effectively and make informed trading decisions. Use this script to optimize your trade sizes and improve your overall trading performance.
Liquidity Channels [TFO]This indicator was built to visually demonstrate the significance of major, untouched pivots. With traders commonly placing orders at or near significant pivots, these areas are commonly referred to as Resting Liquidity. If we attribute some factor of growth over time, we can quickly visualize that certain pivots originated much further away than others, if their channels appear larger.
A pivot in this case is validated by the Liquidity Strength parameter. If set to 50 for example, then a pivot high is validated if its high is greater than the high of the 50 bars to the left and right of itself. This also implies a delay in finding pivots, as the drawings won't actually appear until validation, which would occur 50 bars after the original high has formed in this case. This is typical of indicators using swing highs and lows, as one must wait some period of time to validate the pivots in question.
The Channel Growth parameter dictates how much the Liquidity Channels will expand over time. The following chart is an example, where the left-hand side is using a Channel Growth of 1, and the right-hand side is using a Channel Growth of 10.
When price reaches these levels, they become invalidated and will stop extending to the right. The other condition for invalidation is the Delete After (Bars) parameter which, when enabled, declares that untouched levels will be deleted if the distance from their origin exceeds this many bars.
This indicator also offers an option to Hide Expanding Channels for those who just want the actual levels on their chart, without the extra visuals, which would look something like the below chart.
Moving Average Pullback Signals [UAlgo]The "Moving Average Pullback Signals " indicator is designed to identify potential trend continuation or reversal points based on moving average (MA) pullback patterns. This tool combines multiple types of moving averages, customized trend validation parameters, and candlestick wick patterns to provide reliable buy and sell signals. By leveraging several advanced MA methods (such as TEMA, DEMA, ZLSMA, and McGinley-D), this script can adapt to different market conditions, providing traders with flexibility and more precise trend-based entries and exits. The addition of a gradient color-coded moving average line and wick validation logic enables traders to visualize market sentiment and trend strength dynamically.
🔶 Key Features
Multiple Moving Average (MA) Calculation Methods: This indicator offers various MA calculation types, including SMA, EMA, DEMA, TEMA, ZLSMA, and McGinley-D, allowing traders to select the MA that best fits their strategy.
Trend Validation and Pattern Recognition: The indicator includes a customizable trend validation length, ensuring that the trend is consistent before buy/sell signals are generated. The "Trend Pattern Mode" setting provides flexibility between "No Trend in Progress," "Trend Continuation," and "Both," tailoring signals to the trader’s preferred style.
Wick Validation Logic: To enhance the accuracy of entries, this indicator identifies specific wick patterns for bullish or bearish pullbacks, which signal potential trend continuation or reversal. Wick length and validation factor are adjustable to suit various market conditions and timeframes.
Gradient Color-coded MA Line: This feature provides a quick visual cue for trend strength, with color changes reflecting relative highs and lows of the MA, enhancing market sentiment interpretation.
Alerts for Buy and Sell Signals: Alerts are triggered when either a bullish or bearish pullback is detected, allowing traders to receive instant notifications without continuously monitoring the chart.
Visual Labels for Reversal Points: The indicator plots labels ("R") at potential reversal points, with color-coded labels for bullish (green) and bearish (red) pullbacks, highlighting pullback opportunities that align with the trend or reversal potential.
🔶 Disclaimer
Use with Caution: This indicator is provided for educational and informational purposes only and should not be considered as financial advice. Users should exercise caution and perform their own analysis before making trading decisions based on the indicator's signals.
Not Financial Advice: The information provided by this indicator does not constitute financial advice, and the creator (UAlgo) shall not be held responsible for any trading losses incurred as a result of using this indicator.
Backtesting Recommended: Traders are encouraged to backtest the indicator thoroughly on historical data before using it in live trading to assess its performance and suitability for their trading strategies.
Risk Management: Trading involves inherent risks, and users should implement proper risk management strategies, including but not limited to stop-loss orders and position sizing, to mitigate potential losses.
No Guarantees: The accuracy and reliability of the indicator's signals cannot be guaranteed, as they are based on historical price data and past performance may not be indicative of future results.
Smooth Price Oscillator [BigBeluga]The Smooth Price Oscillator by BigBeluga leverages John Ehlers' SuperSmoother filter to produce a clear and smooth oscillator for identifying market trends and mean reversion points. By filtering price data over two distinct periods, this indicator effectively removes noise, allowing traders to focus on significant signals without the clutter of market fluctuations.
🔵 KEY FEATURES & USAGE
● SuperSmoother-Based Oscillator:
This oscillator uses Ehlers' SuperSmoother filter, applied to two different periods, to create a smooth output that highlights price momentum and reduces market noise. The dual-period application enables a comparison of long-term and short-term price movements, making it suitable for both trend-following and reversion strategies.
// @function SuperSmoother filter based on Ehlers Filter
// @param price (float) The price series to be smoothed
// @param period (int) The smoothing period
// @returns Smoothed price
method smoother_F(float price, int period) =>
float step = 2.0 * math.pi / period
float a1 = math.exp(-math.sqrt(2) * math.pi / period)
float b1 = 2 * a1 * math.cos(math.sqrt(2) * step / period)
float c2 = b1
float c3 = -a1 * a1
float c1 = 1 - c2 - c3
float smoothed = 0.0
smoothed := bar_index >= 4
? c1 * (price + price ) / 2 + c2 * smoothed + c3 * smoothed
: price
smoothed
● Mean Reversion Signals:
The indicator identifies two types of mean reversion signals:
Simple Mean Reversion Signals: Triggered when the oscillator moves between thresholds of 1 and Overbought or between thresholds -1 and Ovesold, providing additional reversion opportunities. These signals are useful for capturing shorter-term corrections in trending markets.
Strong Mean Reversion Signals: Triggered when the oscillator above the overbought (upper band) or below oversold (lower band) thresholds, indicating a strong reversal point. These signals are marked with a "+" symbol on the chart for clear visibility.
Both types of signals are plotted on the oscillator and the main chart, helping traders to quickly identify potential trade entries or exits.
● Dynamic Bands and Thresholds:
The oscillator includes overbought and oversold bands based on a dynamically calculated standard deviation and EMA. These bands provide visual boundaries for identifying extreme price conditions, helping traders anticipate potential reversals at these levels.
● Real-Time Labels:
Labels are displayed at key thresholds and bands to indicate the oscillator’s status: "Overbought," "Oversold," and "Neutral". Mean reversion signals are also displayed on the main chart, providing an at-a-glance summary of current indicator conditions.
● Customizable Threshold Levels:
Traders can adjust the primary threshold and smoothing length according to their trading style. A higher threshold can reduce signal frequency, while a lower setting will provide more sensitivity to market reversals.
The Smooth Price Oscillator by BigBeluga is a refined, noise-filtered indicator designed to highlight mean reversion points with enhanced clarity. By providing both strong and simple reversion signals, as well as dynamic overbought/oversold bands, this tool allows traders to spot potential reversals and trend continuations with ease. Its dual representation on the oscillator and the main price chart offers flexibility and precision for any trading strategy focused on capturing cyclical market movements.
Systematic Investment Tracker by Ceyhun Gonul### English Description
**Systematic Investment Tracker with Enhanced Features**
This script, titled **Systematic Investment Tracker with Enhanced Features**, is a TradingView tool designed to support systematic investments across different market conditions. It provides traders with two customizable investment strategies — **Continuous Buying** and **Declining Buying** — and includes advanced dynamic investment adjustment features for each.
#### Detailed Explanation of Script Features and Originality
1. **Two Investment Strategies**:
- **Continuous Buying**: This strategy performs purchases consistently at each interval, as set by the user, regardless of market price changes. It follows the principle of dollar-cost averaging, allowing users to build an investment position over time.
- **Declining Buying**: Unlike Continuous Buying, this strategy triggers purchases only when the asset's price has declined from the previous interval's closing price. This approach helps users capitalize on lower price points, potentially improving average costs during downward trends.
2. **Dynamic Investment Adjustment**:
- For both strategies, the script includes a **Dynamic Investment Adjustment** feature. If enabled, this feature increases the purchasing amount by 50% if the current price has fallen by a specific user-defined percentage relative to the previous price. This allows users to accumulate a larger position when the asset is declining, which may benefit long-term cost-averaging strategies.
3. **Customizable Time Frames**:
- Users can specify a **start and end date** for investment, allowing them to restrict or backtest strategies within a specific timeframe. This feature is valuable for evaluating strategy performance over specific market cycles or historical periods.
4. **Graphical Indicators and Labels**:
- The script provides graphical labels on the chart that display purchase points. These indicators help users visualize their investment entries based on the strategy selected.
- A summary **performance label** is also displayed, providing real-time updates on the total amount spent, accumulated quantity, average cost, portfolio value, and profit percentage for each strategy.
5. **Language Support**:
- The script includes English and Turkish language options. Users can toggle between these languages, allowing the summary label text and descriptions to be displayed in their preferred language.
6. **Performance Comparison Table**:
- An optional **Performance Comparison Table** is available, offering a side-by-side analysis of net profit, total investment, and profit percentage for both strategies. This comparison table helps users assess which strategy has yielded better returns, providing clarity on each approach's effectiveness under the chosen parameters.
#### How the Script Works and Its Uniqueness
This closed-source script brings together two established investment strategies in a single, dynamic tool. By integrating continuous and declining purchase strategies with advanced settings for dynamic investment adjustment, the script offers a powerful, flexible tool for both passive and active investors. The design of this script provides unique benefits:
- Enables automated, systematic investment tracking, allowing users to build positions gradually.
- Empowers users to leverage declines through dynamic adjustments to optimize average cost over time.
- Presents an easy-to-read performance label and table, enabling an efficient and transparent performance comparison for informed decision-making.
---
### Türkçe Açıklama
**Gelişmiş Özellikli Sistematik Yatırım Takipçisi**
**Gelişmiş Özellikli Sistematik Yatırım Takipçisi** adlı bu TradingView scripti, çeşitli piyasa koşullarında sistematik yatırım stratejilerini desteklemek üzere tasarlanmış bir araçtır. Script, kullanıcıya iki özelleştirilebilir yatırım stratejisi — **Sürekli Alım** ve **Düşen Alım** — ve her strateji için gelişmiş dinamik yatırım ayarlama seçenekleri sunar.
#### Script Özelliklerinin Detaylı Açıklaması ve Özgünlük
1. **İki Yatırım Stratejisi**:
- **Sürekli Alım**: Bu strateji, fiyat değişimlerine bakılmaksızın kullanıcının belirlediği her aralıkta sabit bir miktar yatırım yapar. Bu yaklaşım, uzun vadede pozisyonu kademeli olarak oluşturmak isteyenler için idealdir.
- **Düşen Alım**: Sürekli Alım’ın aksine, bu strateji yalnızca fiyat bir önceki aralığın kapanış fiyatına göre düştüğünde alım yapar. Bu yöntem, yatırımcıların daha düşük fiyatlardan alım yaparak ortalama maliyeti potansiyel olarak iyileştirmelerine yardımcı olur.
2. **Dinamik Yatırım Ayarlaması**:
- Her iki strateji için de **Dinamik Yatırım Ayarlaması** özelliği bulunmaktadır. Bu özellik aktif edildiğinde, mevcut fiyatın bir önceki fiyata göre kullanıcı tarafından belirlenen bir yüzde oranında düşmesi durumunda alım miktarını %50 artırır. Bu durum, uzun vadede maliyet ortalaması stratejilerine katkıda bulunur.
3. **Özelleştirilebilir Tarih Aralığı**:
- Kullanıcılar, yatırımı belirli bir tarih aralığında sınırlandırmak veya test etmek için bir **başlangıç ve bitiş tarihi** belirleyebilir. Bu özellik, strateji performansını geçmiş piyasa döngüleri veya belirli dönemlerde değerlendirmek için kullanışlıdır.
4. **Grafiksel İşaretleyiciler ve Etiketler**:
- Script, grafik üzerinde alım noktalarını gösteren işaretleyiciler sağlar. Bu görsel göstergeler, kullanıcıların seçilen stratejiye göre yatırım girişlerini görselleştirmesine yardımcı olur.
- Ayrıca, her strateji için harcanan toplam tutar, biriken miktar, ortalama maliyet, portföy değeri ve kâr yüzdesi gibi bilgileri gerçek zamanlı olarak gösteren bir **performans etiketi** sunar.
5. **Dil Desteği**:
- Script, İngilizce ve Türkçe dillerini desteklemektedir. Kullanıcılar, performans etiketi metninin ve açıklamalarının tercih ettikleri dilde görüntülenmesi için dil seçimini yapabilir.
6. **Performans Karşılaştırma Tablosu**:
- İsteğe bağlı olarak kullanılabilen bir **Performans Karşılaştırma Tablosu**, her iki strateji için net kâr, toplam yatırım ve kâr yüzdesi gibi bilgileri yan yana analiz eder. Bu tablo, kullanıcıların hangi stratejinin daha yüksek getiri sağladığını değerlendirmesine yardımcı olur.
#### Scriptin Çalışma Prensibi ve Özgünlüğü
Bu script, iki yatırım stratejisini gelişmiş bir araçta birleştirir. Sürekli ve düşen fiyatlara dayalı alım stratejilerini dinamik yatırım ayarlama özelliğiyle entegre ederek yatırımcılar için güçlü ve esnek bir çözüm sunar. Script’in tasarımı aşağıdaki benzersiz faydaları sağlamaktadır:
- Otomatik, sistematik yatırım takibi yaparak kullanıcıların pozisyonlarını kademeli olarak oluşturmalarına olanak tanır.
- Dinamik ayarlama ile düşüşlerden yararlanarak zaman içinde ortalama maliyeti optimize etme olanağı sağlar.
- Her iki stratejinin performansını basit ve anlaşılır bir şekilde karşılaştıran etiket ve tablo ile verimli bir performans değerlendirmesi sunar.
Machine Learning RSI [BackQuant]Machine Learning RSI
The Machine Learning RSI is a cutting-edge trading indicator that combines the power of Relative Strength Index (RSI) with Machine Learning (ML) clustering techniques to dynamically determine overbought and oversold thresholds. This advanced indicator adapts to market conditions in real-time, offering traders a robust tool for identifying optimal entry and exit points with increased precision.
Core Concept: Relative Strength Index (RSI)
The RSI is a well-known momentum oscillator that measures the speed and change of price movements, oscillating between 0 and 100. Typically, RSI values above 70 are considered overbought, and values below 30 are considered oversold. However, static thresholds may not be effective in all market conditions.
This script enhances the RSI by integrating a dynamic thresholding system powered by Machine Learning clustering, allowing it to adapt thresholds based on historical RSI behavior and market context.
Machine Learning Clustering for Dynamic Thresholds
The Machine Learning (ML) component uses clustering to calculate dynamic thresholds for overbought and oversold levels. Instead of relying on fixed RSI levels, this indicator clusters historical RSI values into three groups using a percentile-based initialization and iterative optimization:
Cluster 1: Represents lower RSI values (typically associated with oversold conditions).
Cluster 2: Represents mid-range RSI values.
Cluster 3: Represents higher RSI values (typically associated with overbought conditions).
Dynamic thresholds are determined as follows:
Long Threshold: The upper centroid value of Cluster 3.
Short Threshold: The lower centroid value of Cluster 1.
This approach ensures that the indicator adapts to the current market regime, providing more accurate signals in volatile or trending conditions.
Smoothing Options for RSI
To further enhance the effectiveness of the RSI, this script allows traders to apply various smoothing methods to the RSI calculation, including:
Simple Moving Average (SMA)
Exponential Moving Average (EMA)
Weighted Moving Average (WMA)
Hull Moving Average (HMA)
Linear Regression (LINREG)
Double Exponential Moving Average (DEMA)
Triple Exponential Moving Average (TEMA)
Adaptive Linear Moving Average (ALMA)
T3 Moving Average
Traders can select their preferred smoothing method and adjust the smoothing period to suit their trading style and market conditions. The option to smooth the RSI reduces noise and makes the indicator more reliable for detecting trends and reversals.
Long and Short Signals
The indicator generates long and short signals based on the relationship between the RSI value and the dynamic thresholds:
Long Signals: Triggered when the RSI crosses above the long threshold, signaling bullish momentum.
Short Signals: Triggered when the RSI falls below the short threshold, signaling bearish momentum.
These signals are dynamically adjusted to reflect real-time market conditions, making them more robust than static RSI signals.
Visualization and Clustering Insights
The Machine Learning RSI provides an intuitive and visually rich interface, including:
RSI Line: Plotted in real-time, color-coded based on its position relative to the dynamic thresholds (green for long, red for short, gray for neutral).
Dynamic Threshold Lines: The script plots the long and short thresholds calculated by the ML clustering process, providing a clear visual reference for overbought and oversold levels.
Cluster Plots: Each RSI cluster is displayed with distinct colors (green, orange, and red) to give traders insights into how RSI values are grouped and how the dynamic thresholds are derived.
Customization Options
The Machine Learning RSI is highly customizable, allowing traders to tailor the indicator to their preferences:
RSI Settings : Adjust the RSI length, source price, and smoothing method to match your trading strategy.
Threshold Settings : Define the range and step size for clustering thresholds, allowing you to fine-tune the clustering process.
Optimization Settings : Control the performance memory, maximum clustering steps, and maximum data points for ML calculations to ensure optimal performance.
UI Settings : Customize the appearance of the RSI plot, dynamic thresholds, and cluster plots. Traders can also enable or disable candle coloring based on trend direction.
Alerts and Automation
To assist traders in staying on top of market movements, the script includes alert conditions for key events:
Long Signal: When the RSI crosses above the long threshold.
Short Signal: When the RSI crosses below the short threshold.
These alerts can be configured to notify traders in real-time, enabling timely decisions without constant chart monitoring.
Trading Applications
The Machine Learning RSI is versatile and can be applied to various trading strategies, including:
Trend Following: By dynamically adjusting thresholds, this indicator is effective in identifying and following trends in real-time.
Reversal Trading: The ML clustering process helps identify extreme RSI levels, offering reliable signals for reversals.
Range-Bound Trading: The dynamic thresholds adapt to market conditions, making the indicator suitable for trading in sideways markets where static thresholds often fail.
Final Thoughts
The Machine Learning RSI represents a significant advancement in RSI-based trading indicators. By integrating Machine Learning clustering techniques, this script overcomes the limitations of static thresholds, providing dynamic, adaptive signals that respond to market conditions in real-time. With its robust visualization, customizable settings, and alert capabilities, this indicator is a powerful tool for traders seeking to enhance their momentum analysis and improve decision-making.
As always, thorough backtesting and integration into a broader trading strategy are recommended to maximize the effectiveness!
Easy CotHow to Use the Commitment of Traders (COT) Report for Market Analysis
The Commitment of Traders (COT) report is a weekly publication by the Commodity Futures Trading Commission (CFTC) that breaks down the open interest in various futures markets. It categorizes traders into three main groups: Commercials, Non-Commercials, and Retail Traders (Non-Reportable positions). Understanding and analyzing the COT report can provide insights into market sentiment and potential reversals, especially in commodity, currency, and stock index futures.
Key Components of the COT Report
Commercials (Hedgers)
These are entities involved in the production or consumption of the underlying asset. For example, oil producers might hedge by selling oil futures to lock in prices, while airlines might buy futures to hedge against rising prices.
Commercials typically act as hedgers, so their positions can indicate the need for protection rather than speculative intent. Because they are less price-sensitive, their positions are usually opposite to the trend near market reversals.
Non-Commercials (Large Speculators)
This group includes hedge funds, asset managers, and large traders who take speculative positions to profit from price movements.
Non-Commercials are often trend-followers, meaning they increase long positions in an uptrend and short positions in a downtrend. When Non-Commercials become extremely bullish or bearish, it may signal a potential market reversal.
Retail Traders (Non-Reportable Positions)
These are smaller individual traders whose positions are too small to be reported individually.
Retail traders tend to be less experienced and are often on the wrong side of major market moves, so extreme positions by retail traders can sometimes signal a market turning point.
How to Interpret the COT Data
1. Identify Extreme Positions
Extreme Long or Short Positions: When a group reaches a historically extreme level of long or short positions, it often signals a potential reversal. For instance, if Non-Commercials are overwhelmingly long, it may indicate that the uptrend is overextended, and a reversal could be near.
Contrarian Indicator: Since Retail Traders are often on the wrong side, you may look for signals where they are extremely long or short, indicating a possible reversal in the opposite direction.
2. Look for Divergences
Divergence Between Groups: If Non-Commercials (speculators) and Retail Traders are moving in opposite directions, it could indicate that a trend is losing momentum and a reversal is possible.
Commercials vs. Non-Commercials: Commercials are often positioned opposite to Non-Commercials. If there’s a divergence where Non-Commercials are highly bullish, but Commercials are increasingly bearish, it might suggest a coming reversal.
3. Trend Confirmation and Reversal Signals
Trend Confirmation: If both Non-Commercials and Retail Traders are aligned in one direction, it might confirm the trend. However, keep in mind that such alignment may signal the later stages of a trend.
Reversal Signals: Look for signs when Non-Commercials are reaching a peak in one direction while Retail Traders peak in the opposite. Such situations can often indicate that the current trend is close to exhaustion.
Using the COT Report in Trading Strategies
Contrarian Trading Strategy
Extreme Positions as Reversal Signals: Use COT data to identify extreme positions. For instance, if Non-Commercials have a very high long position in a commodity, it might suggest that a bullish trend is overextended and a bearish reversal could be near.
Retail Trader Extremes: If Retail Traders are heavily long or short, consider taking the opposite position once you have additional confirmation signals (e.g., technical indicators).
Following the Trend with Large Speculators
Non-Commercials tend to be trend-followers, so if you see them increasingly long (or short) on an asset, it could be a signal to follow the trend until extreme levels are reached.
Using Divergences for Entry and Exit Points
Entry: If Non-Commercials are long, but Retail Traders are heavily short, consider entering a long position as it may confirm the trend.
Exit: If Non-Commercials begin to reduce their positions while Retail Traders increase theirs, it might be time to consider exiting, as the trend could be losing momentum.
Weighted CG Oscillator with ATRATR-Weighted CG Oscillator
The ATR-Weighted CG Oscillator is an enhanced version of the Center of Gravity (CG) Oscillator, originally developed by John Ehlers . By adding the Average True Range (ATR) to dynamically adjust the oscillator’s values based on market volatility, this indicator aims to make trend signals more responsive to price changes, offering an adaptive tool for trend analysis.
Functionality Overview :
The CG Oscillator, a classic trend-following indicator, has been modified here to incorporate the ATR for improved context and adaptability in different market conditions. The indicator calculates the CG Oscillator and scales it by dividing the ATR by the closing price to normalize for volatility. This creates a “weighted” CG Oscillator that generates more contextually relevant signals. A colored line shows green for long signals (above the long threshold), red for short signals (below the short threshold), and gray for neutral conditions.
Input Parameters :
CGO Length : Sets the period of the CG Oscillator calculation.
ATR Length : Determines the period of the ATR calculation. Longer periods smooth out the volatility impact.
Long Threshold : The threshold that triggers a long signal; a long (green) signal occurs when the weighted CG Oscillator crosses above this level.
Short Threshold : The threshold that triggers a short signal; a short (red) signal occurs when the weighted CG Oscillator crosses below this level.
Source : Specifies the data source for CG Oscillator calculations, with the default set to the closing price.
Recommended Use :
This indicator is designed to be an adaptive tool, not your sole resource. To ensure its effectiveness, it’s essential to backtest the indicator on your chosen asset over your preferred timeframe. Market dynamics vary, so testing the indicator’s parameters—especially the thresholds—will allow you to find the settings that best suit your strategy. While the default values work well for some scenarios, customizing the settings will help align the indicator with your unique trading style and the asset’s characteristics.
Momentum TrackerTo screen for momentum movers, one can filter for stocks that have made a noticeable move over a set period—this initial move defines the momentum or swing move. From this list of candidates, we can create a watchlist by selecting those showing a momentum pause, such as a pullback or consolidation, which later could set up for a continuation.
This Momentum Tracker Indicator serves as a study tool to visualize when stocks historically met these momentum conditions. It marks on the chart where a stock would have appeared on the screener, allowing us to review past momentum patterns and screener requirements.
Indicator Calculation
Bullish Momentum: Price is above the lowest point within the lookback period by the specified threshold percentage.
Bearish Momentum: Price is below the highest point within the lookback period by the specified threshold percentage.
The tool is customizable in terms of lookback period and percentage threshold to accommodate different trading styles and timeframes, allowing us to set criteria that align with specific hold times and momentum requirements.
William Fractals + SignalsWilliams Fractals + Trading Signals
This indicator identifies Williams Fractals and generates trading signals based on price sweeps of these fractal levels.
Williams Fractals are specific candlestick patterns that identify potential market turning points. Each fractal requires a minimum of 5 bars (2 before, 1 center, 2 after), though this indicator allows you to customize the number of bars checked.
Up Fractal (High Point) forms when you have a center bar whose HIGH is higher than the highs of 'n' bars before and after it. For example, with n=2, you'd see a pattern where the center bar's high is higher than 2 bars before and 2 bars after it. The indicator also recognizes patterns where up to 4 bars after the center can have equal highs before requiring a lower high.
Down Fractal (Low Point) forms when you have a center bar whose LOW is lower than the lows of 'n' bars before and after it. For example, with n=2, you'd see a pattern where the center bar's low is lower than 2 bars before and 2 bars after it. The indicator also recognizes patterns where up to 4 bars after the center can have equal lows before requiring a higher low.
Trading Signals:
The indicator generates signals when price "sweeps" these fractal levels:
Buy Signal (Green Triangle) triggers when price sweeps a down fractal. This requires price to go BELOW the down fractal's low level and then CLOSE ABOVE it . This pattern often indicates a failed breakdown and potential reversal upward.
Sell Signal (Red Triangle) triggers when price sweeps an up fractal. This requires price to go ABOVE the up fractal's high level and then CLOSE BELOW it. This pattern often indicates a failed breakout and potential reversal downward.
Customizable Settings:
1. Periods (default: 10) - How many bars to check before and after the center bar (minimum value: 2)
2. Maximum Stored Fractals (default: 1) - How many fractal levels to keep in memory. Older levels are removed when this limit is reached to prevent excessive signals and maintain indicator performance.
Important Notes:
• The indicator checks the actual HIGH and LOW prices of each bar, not just closing prices
• Fractal levels are automatically removed after generating a signal to prevent repeated triggers
• Signals are only generated on bar close to avoid false triggers
• Alerts include the ticker symbol and the exact price level where the sweep occurred
Common Use Cases:
• Identifying potential reversal points
• Finding stop-hunt levels where price might reverse
• Setting stop-loss levels above up fractals or below down fractals
• Trading failed breakouts/breakdowns at fractal levels
Enhanced Keltner TrendThe Enhanced Keltner Trend (EKT) indicator builds on the classic Keltner Channel, using volatility to define potential trend channels around a central moving average. It combines customizable volatility measures moving average, giving traders flexibility to adapt the trend channel to various market conditions.
How It Works?
MA Calculation:
A user-defined moving average forms the central line (or price basis) of the Keltner Channel.
Channel Width:
The width of the Keltner Channel depends on market volatility.
You can choose between two methods for measuring the volatility:
ATR-based Width: Uses the Average True Range (ATR) with customizable periods and multipliers.
Price Range Width: Uses the high and low price range over a defined period.
Trend Signal:
The trend is evaluated by price in relation to the Keltner Channel:
Bullish Trend (Blue Line): When the price crosses above the upper band, it signals upward momentum.
Bearish Trend (Orange Line): When the price crosses below the lower band, it signals downward momentum.
What Is Unique?
This Enhanced version of the Keltner Trend is for investors who want to have more control over the Keltner's channels calculation, so they can calibrate it to provide them more alpha when combined with other Technical Indicators.
Use ATR: Gives the user the choice to use the ATR for the channel width calculation, or use the default High - Low over specified period.
ATR Period: Users can modify ATR length to calculate the channels width (Volatility).
ATR Multiplier: Users can fine-tune how much of the volatility they want to factor into the channels, providing more control over the final calculation.
MA Period: Smoothing period for the Moving Averages.
MA Type: Choosing from different Moving Averages types providing different smoothing types.
Setting Alerts:
Built-in alerts for trend detection:
Bullish Trend: When price crosses the upper band, it signals a Bullish Signal (Blue Color)
Bearish Trend: When price crosses the lower band, it signals a Bearish Signal (Orange Color)
Credits to @jaggedsoft , it's a modified version of his.
Auto Fibonacci ModePurpose of the Code:
This Pine Script™ code defines an indicator called "Auto Fibonacci Mode" that automatically plots Fibonacci retracement and extension levels based on recent price data, providing traders with reference levels for potential support and resistance. It also offers an "Auto" mode that determines levels based on the selected moving average type (e.g., EMA, SMA) for added flexibility in trend identification.
Key Components and Functionalities:
Inputs:
lookback (Lookback): Determines how many bars back to look when identifying the highest and lowest prices.
reverse: Reverses the direction of Fibonacci calculations, which is helpful for analyzing both uptrends and downtrends.
auto: When enabled, this option automatically adjusts Fibonacci levels based on a moving average.
mod: Allows the user to select a specific moving average type (EMA, SMA, RMA, HMA, or WMA) for use in "Auto" mode.
Label and Color Options: Customize the display of Fibonacci labels, colors, and whether to show the highest and lowest levels on the chart.
Fibonacci Levels:
Sixteen Fibonacci levels are configurable in the input options, allowing users to choose traditional retracement levels (e.g., 0.236, 0.5, 1.618) as well as custom levels.
These levels are calculated dynamically and adjusted based on the highest and lowest price range within the lookback period.
Calculation of Direction and Fibonacci Levels:
Moving Average Direction: Using the specified moving average, the code evaluates the price direction to determine the trend (upward or downward). This direction can be reversed if the user selects the reverse option.
Fibonacci Level Calculation: Each level is computed based on the highest and lowest prices over the lookback range and adjusted according to the selected trend direction and moving average type.
Plotting Fibonacci Levels:
The script generates lines on the chart to represent each Fibonacci level, with customizable gradient colors.
Labels displaying level values and prices can be enabled, providing easy identification of each level on the chart.
Additional Lines:
Lines representing the highest and lowest prices within the lookback range can also be displayed, highlighting recent support and resistance levels for added context.
Usage:
The Auto Fibonacci Mode indicator is designed for traders interested in Fibonacci retracement and extension levels, particularly those seeking automatic trend detection based on moving averages.
This indicator enables:
Automatic adjustment of Fibonacci levels based on selected moving average type.
Quick visualization of support and resistance areas without manual adjustments.
Analysis flexibility with customizable levels and color gradients for easier trend and reversal identification.
This tool is valuable for traders who rely on Fibonacci analysis and moving averages as part of their technical analysis strategy.
Important Note:
This script is provided for educational purposes and does not constitute financial advice. Traders and investors should conduct their research and analysis before making any trading decisions.
Economic Seasons [Daveatt]Ever wondered what season your economy is in?
Just like Mother Nature has her four seasons, the economy cycles through its own seasons! This indicator helps you visualize where we are in the economic cycle by tracking two key metrics:
📊 What We're Tracking:
1. Interest Rates (USIRYY) - The yearly change in interest rates
2. Inflation Rate (USINTR) - The rate at which prices are rising
The magic happens when we normalize these values (fancy math that makes the numbers play nice together) and compare them to their recent averages. We use a lookback period to calculate the standard deviation and determine if we're seeing higher or lower than normal readings.
🔄 The Four Economic Seasons & Investment Strategy:
1. 🌸 Goldilocks (↑Growth, ↓Inflation)
"Not too hot, not too cold" - The economy is growing steadily without overheating.
BEST TIME TO: Buy growth stocks, technology, consumer discretionary
WHY: Companies can grow earnings in this ideal environment of low rates and stable prices
2. 🌞 Reflation (↑Growth, ↑Inflation)
"Party time... but watch your wallet!" - The economy is heating up.
BEST TIME TO: Buy commodities, banking stocks, real estate
WHY: These sectors thrive when inflation rises alongside growth
3. 🌡️ Inflation (↓Growth, ↑Inflation)
"Ouch, my purchasing power!" - Growth slows while prices keep rising.
BEST TIME TO: Rotate into value stocks, consumer staples, healthcare
WHY: These defensive sectors maintain pricing power during inflationary periods
4. ❄️ Deflation (↓Growth, ↓Inflation)
"Winter is here" - Both growth and inflation are falling.
BEST TIME TO: Focus on quality bonds, cash positions, and dividend aristocrats
WHY: Capital preservation becomes key; high-quality fixed income provides safety
🎯 Strategic Trading Points:
- BUY AGGRESSIVELY: During late Deflation/early Goldilocks (the spring thaw)
- HOLD & ACCUMULATE: Throughout Goldilocks and early Reflation
- START TAKING PROFITS: During late Reflation/early Inflation
- DEFENSIVE POSITIONING: Throughout Inflation and Deflation
⚠️ Warning Signs to Watch:
- Goldilocks → Reflation: Time to reduce growth stock exposure
- Reflation → Inflation: Begin rotating into defensive sectors
- Inflation → Deflation: Quality becomes crucial
- Deflation → Goldilocks: Start building new positions
The blue dot shows you where we are right now in this cycle.
The red arrows in the middle remind us that this is a continuous cycle - one season flows into the next, just like in nature!
💡 Pro Tip: The transitions between seasons often provide the best opportunities - but also the highest risks. Use additional indicators and fundamental analysis to confirm these shifts.
Remember: Just like you wouldn't wear a winter coat in summer, you shouldn't use a Goldilocks strategy during Inflation! Time your trades with the seasons. 🎯
Happy Trading! 📈
Mins Before Market Close AlertThis script will set an alert X mins before the market closes.
This is meant to be added to daily charts (calculations based off of daily bars).
This script can be useful for sending webhooks before the market closes to close open positions or to open new ones.
Simply add it to your daily chart and set up your desired alert (email, webhook, sound, etc.).
You can also change the chart marker to a different shape, color, or location to your preference.
Enjoy this simple alert!
Buy&Sell Hollow CandlesThe Hollow Candles Script is a type of candlestick analysis script designed to highlight the following:
Purpose of the Script: This script provides the user with buy and sell signals based on candlesticks that show an upward or downward reversal.
Mechanism of the Script: When a hollow (unfilled) red candle appears, it signals a potential entry, provided that this candle is at a low point, following a series of red candles with higher volume than previous days. Similarly, it gives a sell signal when a green candle appears at a peak with high sell volume surpassing that of prior days. However, the appearance of these candles alone should not prompt an immediate buy or sell; you should wait for a confirming candle to validate the signal.
Sideways Movement Caution: If these signals appear during a sideways or flat trend, it is not advisable to proceed with buying or selling.
Chart Insights: The chart demonstrates certain buy and sell operations along with some non-ideal signals where decision-making should be based on fundamental analytical experience.
DOGE MVRV Z-ScoreThe MVRV-Z score is a relative indicator, which is the "circulating market value" of Dogecoin minus the "realized market value", and then standardized by the standard of the circulating market value. The formula is:
MVRV-Z Score = (circulation market capitalization - realized market capitalization) / Standard Deviation (circulation market capitalization)
The "realized market value" is based on the value of transactions on-chain, calculating the sum of the "last movement value" of all Dogecoins on the chain. Therefore, when this indicator is too high, it means that the market value of Dogecoin is overvalued relative to its actual value, which is detrimental to the price of Dogecoin; otherwise, it means that the market value of Dogecoin is undervalued. According to past historical experience, when this indicator is at a historical high, the probability of a downward trend in Dogecoin prices increases, and attention should be paid to the risks of chasing higher prices.
Adaptive Kalman filter - Trend Strength Oscillator (Zeiierman)█ Overview
The Adaptive Kalman Filter - Trend Strength Oscillator by Zeiierman is a sophisticated trend-following indicator that uses advanced mathematical techniques, including vector and matrix operations, to decompose price movements into trend and oscillatory components. Unlike standard indicators, this model assumes that price is driven by two latent (unobservable) factors: a long-term trend and localized oscillations around that trend. Through a dynamic "predict and update" process, the Kalman Filter leverages vectors to adaptively separate these components, extracting a clearer view of market direction and strength.
█ How It Works
This indicator operates on a trend + local change Kalman Filter model. It assumes that price movements consist of two underlying components: a core trend and an oscillatory term, representing smaller price fluctuations around that trend. The Kalman Filter adaptively separates these components by observing the price series over time and performing real-time updates as new data arrives.
Predict and Update Procedure: The Kalman Filter uses an adaptive predict-update cycle to estimate both components. This cycle allows the filter to adjust dynamically as the market evolves, providing a smooth yet responsive signal. The trend component extracted from this process is plotted directly, giving a clear view of the prevailing direction. The oscillatory component indicates the tendency or strength of the trend, reflected in the green/red coloration of the oscillator line.
Trend Strength Calculation: Trend strength is calculated by comparing the current oscillatory value against a configurable number of past values.
█ Three Kalman filter Models
This indicator offers three distinct Kalman filter models, each designed to handle different market conditions:
Standard Model: This is a conventional Kalman Filter, balancing responsiveness and smoothness. It works well across general market conditions.
Volume-Adjusted Model: In this model, the filter’s measurement noise automatically adjusts based on trading volume. Higher volumes indicate more informative price movements, which the filter treats with higher confidence. Conversely, low-volume movements are treated as less informative, adding robustness during low-activity periods.
Parkinson-Adjusted Model: This model adjusts measurement noise based on price volatility. It uses the price range (high-low) to determine the filter’s sensitivity, making it ideal for handling markets with frequent gaps or spikes. The model responds with higher confidence in low-volatility periods and adapts to high-volatility scenarios by treating them with more caution.
█ How to Use
Trend Detection: The oscillator oscillates around zero, with positive values indicating a bullish trend and negative values indicating a bearish trend. The further the oscillator moves from zero, the stronger the trend. The Kalman filter trend line on the chart can be used in conjunction with the oscillator to determine the market's trend direction.
Trend Reversals: The blue areas in the oscillator suggest potential trend reversals, helping traders identify emerging market shifts. These areas can also indicate a potential pullback within the prevailing trend.
Overbought/Oversold: The thresholds, such as 70 and -70, help identify extreme conditions. When the oscillator reaches these levels, it suggests that the trend may be overextended, possibly signaling an upcoming reversal.
█ Settings
Process Noise 1: Controls the primary level of uncertainty in the Kalman filter model. Higher values make the filter more responsive to recent price changes, but may also increase susceptibility to random noise.
Process Noise 2: This secondary noise setting works with Process Noise 1 to adjust the model's adaptability. Together, these settings manage the uncertainty in the filter's internal model, allowing for finely-tuned adjustments to smoothness versus responsiveness.
Measurement Noise: Sets the uncertainty in the observed price data. Increasing this value makes the filter rely more on historical data, resulting in smoother but less reactive filtering. Lower values make the filter more responsive but potentially more prone to noise.
O sc Smoothness: Controls the level of smoothing applied to the trend strength oscillator. Higher values result in a smoother oscillator, which may cause slight delays in response. Lower values make the oscillator more reactive to trend changes, useful for capturing quick reversals or volatility within the trend.
Kalman Filter Model: Choose between Standard, Volume-Adjusted, and Parkinson-Adjusted models. Each model adapts the Kalman filter for specific conditions, whether balancing general market data, adjusting based on volume, or refining based on volatility.
Trend Lookback: Defines how far back to look when calculating the trend strength, which impacts the indicator's sensitivity to changes in trend strength. Shorter values make the oscillator more reactive to recent trends, while longer values provide a smoother reading.
Strength Smoothness: Adjusts the level of smoothing applied to the trend strength oscillator. Higher values create a more gradual response, while lower values make the oscillator more sensitive to recent changes.
-----------------
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!
52 Week High/Low Tracking TableThis Indicator helps the User to Quickly view Current Closing Price Compared to the Mentioned Period High and Low.
"Bars Back" indicate the period you need to look back. In case of Daily charts 260 Bars Back usually indicate 52 Weeks/1 year. This is set a default. But you can change it as well.
The Indicator will show the data for below:-
1) High - Highest Close price for the Mentioned Period
2) % from High - The Percentage difference between the Current Close Price Vs Highest Close price for the Mentioned Period. (-) indicate that the current close price is lesser then then High Price.
3) Low - Lowest Close price for the Mentioned Period
4) % from Low - The Percentage difference between the Current Close Price Vs Highest Close price for the Mentioned Period. (-) indicate that the current close price is lesser then then High Price.
You can add this indicator to Quickly Scan multiple stocks to see were they stand.
Dynamic Time Period CandlesThis indicator gives the dynamic history of the current price over various time frames as a series of candles on the right of the display, with optional lines on the chart, so that you can assess the current trend more easily.
In the library I found lots of indicators that looked at the previous xx time period candle, but they then immediately switched to the new xx time candle when it started to be formed. This indicator looks back at the rolling previous time period. With this indicator, you can clearly see how price has been behaving over time.
IMPORTANT SETUP INFO:
Initially, you must go into the settings and select the timeframe (in minutes) that your chart is displaying. If you don't do this then the indicator will look back the wrong number of candles and give you totally wrong results.
You can then setup how high you want the candle labels to be on the chart.
Then you can select settings for each candle that you want displayed. Anywhere between 1 and 5 different timeframes can be displayed on the chart at once.
I initially published an indicator called 'Dynamic 4-Hour Candle (Accurate Highs and Lows)', but this new indicator is so different that it needs to be forked and published as a separate indicator. The reasons for this are below:
The original indicator only looked at the previous 4 hour time period. This indicator allows the user to select any time period that they choose.
The original indicator only looked at one time period. This indicator allows to select between one and five time periods on the chart at once.
The original indicator did not put lines on the chart to show the lookback period and the highs and lows of that time period. This indicator does both those things.
The name of the original indicator in no way now describes what this new indicator is capable of, and would be very misleading to anyone who came across it. This new indicator has a name that much more accurately reflects what its' purpose and functionality is.