RSI Slope Filtered Signals [UAlgo]The "RSI Slope Filtered Signals " is a technical analysis tool designed to enhance the accuracy of RSI (Relative Strength Index) signals by incorporating slope analysis. This indicator not only considers the RSI value but also analyzes the slope of the RSI over a specified number of bars, providing a more refined signal that accounts for the momentum and trend strength. By utilizing both positive and negative slope arrays, the indicator dynamically adjusts its thresholds, ensuring that signals are responsive to changing market conditions. This tool is particularly useful for traders looking to identify overbought and oversold conditions with a higher degree of precision, filtering out noise and providing clear visual cues for potential market reversals.
🔶 Key Features
Dynamic Slope Analysis: Measures the slope of RSI over a customizable number of bars, offering insights into the momentum and trend direction.
Adaptive Thresholds: Uses historical slope data to calculate dynamic thresholds, adjusting signal sensitivity based on market conditions.
Normalized Slope Calculation: Normalizes the slope values to provide a consistent measure across different market conditions, making the indicator more versatile.
Clear Signal Visualization: The indicator plots both positive and negative normalized slopes with color gradients, visually representing the strength of the trend.
Overbought and Oversold Signals: Plots overbought and oversold signals directly on the chart when the calculated value reaches the user-specified threshold, helping traders identify potential reversal points.
Customizable Settings: Allows users to adjust the RSI length, slope measurement bars, and lookback periods, providing flexibility to tailor the indicator to different trading strategies.
🔶 Interpreting the Indicator
The "RSI Slope Filtered Signals " indicator is designed to be easy to interpret. Here's how you can use it:
Normalized Slope: The indicator plots the normalized slope of the RSI, with values above zero indicating positive momentum and values below zero indicating negative momentum. A higher positive slope suggests a strong upward trend, while a deeper negative slope indicates a strong downward trend.
Reversal Signals: The indicator plots several horizontal lines at different thresholds (+3, +2, +1, 0, -1, -2, -3). These levels are used to gauge the strength of the momentum based on the normalized slope. For example, a normalized slope crossing above the +2 threshold may indicate a strong bullish trend, while crossing below the -2 threshold may suggest a strong bearish trend. These thresholds help in understanding the intensity of the current trend and provide context for interpreting the indicator's signals.
This indicator generates overbought and oversold signals not solely based on the RSI entering extreme levels (above 70 for overbought and below 30 for oversold), but also by considering the behavior of the normalized slope relative to specific thresholds. Specifically, the Overbought Signal (🔽) is triggered when the RSI is above 70 and the normalized slope from the previous bar is greater than or equal to the upper threshold, with the current slope being lower than the previous slope, indicating a potential bearish reversal as momentum may be slowing down.
Similarly, the Oversold Signal (🔼) is generated when the RSI is below 30 and the normalized slope from the previous bar is less than or equal to the lower threshold, with the current slope being higher than the previous slope, signaling a potential bullish reversal as the downward momentum may be weakening.
Area Plots: The indicator also plots the positive and negative slopes as filled areas, providing a quick visual cue for the strength and direction of the trend. Green areas represent positive slopes (upward momentum), while red areas represent negative slopes (downward momentum).
By combining these elements, the "RSI Slope Filtered Signals " provides a comprehensive view of the market's momentum, helping traders make more informed decisions by filtering out false signals and focusing on the significant trends.
🔶 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.
M-oscillator
Average of CBO and CBO divergence histogramShort Description:
This indicator combines a Custom Bias Oscillator (CBO) with its Divergence Histogram and computes their average for use to assess the market's bias based on candlestick analysis, from the aforementioned CBO indicator.
Full Description:
Overview:
This indicator integrates two powerful analytical tools into a single script: a Custom Bias Oscillator (CBO) and its Divergence Histogram. This indicator provides traders with a comprehensive view of market bias and divergence between price movements and volume, enhanced by an optional signal line derived from the combined average of these metrics.
Key Features:
Custom Bias Oscillator (CBO):
The CBO is calculated based on the body and wick biases of candlesticks, normalized by the Average True Range (ATR) to account for market volatility.
The CBO is scaled by the divergence between the Rate of Change (ROC) of volume and the ROC of the adjusted bias, ensuring it reflects potential reversals or continuations in the market.
Divergence Histogram:
The Divergence Histogram is derived from the difference between the CBO and its signal line.
This difference is normalized and plotted to provide visual cues for potential divergences, which may indicate trend exhaustion or the beginning of a new trend.
Combined Average with Signal Line:
The indicator calculates the average of the CBO and the normalized divergence, creating a combined signal that offers a more rounded perspective on market conditions.
A signal line, generated by smoothing the combined average, is plotted to help traders identify potential buy or sell signals based on crossovers.
Customization:
The indicator includes customizable parameters for the periods of the oscillator, signal line, ATR, ROC, and the combined signal line, allowing traders to tailor the indicator to different market conditions and timeframes.
How to Use:
Buy Signal: Consider a long position when the combined average crosses above the signal line, indicating potential bullish momentum.
Sell Signal: Consider a short position when the combined average crosses below the signal line, indicating potential bearish momentum.
Divergence Analysis: Use the Divergence Histogram to identify areas where price movements may be diverging from volume, signaling potential reversals or corrections.
Disclaimer:
This indicator is designed for educational and informational purposes only. It is not financial advice. Always perform your own analysis before making any investment decisions. Past performance is not indicative of future results.
Normalized Willspread IndicatorNot sure to call it as willspread or not, because i take this idea from Larry William's original willspread indicator and did some modifications which found out to be more effective in my opinion, which is by subtracting 21 and 3 ma, this indicator is found on Trade_Stocks_and_Commodities_With_the_Insiders page155. Feel free to find out.
Here's what I modified, instead of using the subtraction between two ma, I use one ma only, I find more accurate in spotting oversold and overbought value. This indicator is useful for metals. It basically compares the value between two assets, let's say u are watching gold, u can select compare it to dxy, us30Y or gold, let's say u choose to compare to dxy, and the indicator shows the the index is overvalued which is above 80 levels, then it is suggesting that gold is overvalued, the same logic apply to undervalued as well which is 20 levels. This is not a entry or exit tool but as additional confluence, u can use any entry method u want like supply and demand and use this indicator to validate your idea, not sure whether it works on forex or not, so far i think it works well on metals.
The bar colour corresponding to the index when it is overbought or oversold. U can switch off it if you dont need it. Do note that this is a repainting indicator, so u must refer to previous week close.
EMA Crossover Buy/Sell IndicatorScript Overview
This script is a trading indicator designed to identify potential buy and sell signals based on the crossover of two Exponential Moving Averages (EMAs):
Indicator Title and Setup:
The script is named "EMA Crossover Buy/Sell Indicator" and is plotted directly on the price chart.
EMAs Calculation:
It calculates two EMAs: a 20-period EMA and a 50-period EMA. These are used to analyze the market trends over different time frames.
Plotting EMAs:
The 20-period EMA is shown on the chart in blue.
The 50-period EMA is shown in orange.
These lines help visualize the current trend and potential points of interest where the moving averages intersect.
Generating Signals:
A buy signal is triggered when the 20-period EMA crosses above the 50-period EMA.
A sell signal is triggered when the 20-period EMA crosses below the 50-period EMA.
These signals suggest potential buying or selling opportunities based on the crossover of the EMAs.
Displaying Signals:
Buy signals are marked with green labels below the bars on the chart.
Sell signals are marked with red labels above the bars on the chart.
This visual representation helps traders quickly identify potential trading opportunities.
Alerts:
Alerts are set up to notify the trader when a buy or sell signal occurs.
The alert messages specify whether the signal is a buying opportunity or a selling opportunity based on the EMA crossovers.
Altcoin Total Average Divergence (YavuzAkbay)The "Average Price and Divergence" indicator is a strong tool built exclusively for cryptocurrency traders who understand the significance of comparing altcoins to Bitcoin (BTC). While traditional research frequently focusses on the value of cryptocurrencies against fiat currencies such as the US dollar, this indicator switches the focus to the value of altcoins against Bitcoin itself, allowing you to detect potential market opportunities and divergences.
The indicator allows you to compare the price of an altcoin to Bitcoin (e.g., ETHBTC, SOLBTC), which is critical for determining how well an altcoin performs against the main cryptocurrency. This is especially important for investors who expect Bitcoin's price will continue to rise logarithmically and want to ensure that their altcoin holdings retain or expand in market capitalisation compared to Bitcoin.
The indicator computes the average price of the chosen cryptocurrency relative to Bitcoin over the viewable portion of the chart. This average acts as a benchmark, indicating the normal value around which the altcoin's price moves.
The primary objective of this indicator is to calculate and plot the divergence, which is the difference between the altcoin's current price relative to Bitcoin and its average value. This divergence can reveal probable overbought or oversold conditions, allowing traders to make better decisions about entry and exit points.
The divergence is represented as a histogram, with bars representing the magnitude of the difference between the current and average prices. Positive values indicate that the altcoin is trading above its average value in comparison to Bitcoin, whereas negative values indicate that it is trading below its average.
The indicator automatically adjusts to the chart's visible range, ensuring that the average price and divergence are always calculated using the most relevant data. This makes the indicator extremely sensitive to changes in the chart view and market conditions.
How to Use:
A significant positive divergence may imply that the cryptocurrency is overbought in comparison to Bitcoin and is headed for a correction. A significant negative divergence, on the other hand, may indicate that the cryptocurrency has been oversold and is cheap in comparison to Bitcoin.
Tracking how an altcoin's price deviates from its average relative to Bitcoin can provide insights about the market's opinion towards that altcoin. Persistent positive divergence may suggest high market confidence, whilst constant negative divergence may imply a lack of interest or eroding fundamentals.
Use divergence data to better time your trades, either by entering when a cryptocurrency is discounted in comparison to its average (negative divergence) or departing when it is overpriced (positive divergence). This allows you to capture value as the price returns to its mean.
Ideal For:
Cryptocurrency Traders who want to understand how altcoins are performing relative to Bitcoin rather than just against fiat currencies.
Long-term Investors looking to ensure their altcoin investments are maintaining or growing their value relative to Bitcoin.
Market Analysts interested in identifying potential reversals or continuations in altcoin prices based on divergence from their average value relative to Bitcoin.
Price Oscillator TR### Summary: How to Use the Price Oscillator with EMA Indicator
The **Price Oscillator with EMA** is a custom technical analysis tool designed to help traders identify potential buying and selling opportunities based on price momentum. Here's how to use it:
1. **Understanding the Oscillator**:
- The oscillator is calculated by normalizing the current price relative to the highest high and lowest low over a specified lookback period. It fluctuates between -70 and +70.
- When the oscillator is near +70, the price is close to the recent highs, indicating potential overbought conditions. Conversely, when it’s near -100, the price is close to recent lows, indicating potential oversold conditions.
2. **Exponential Moving Average (EMA)**:
- The indicator includes an EMA of the oscillator to smooth out price fluctuations and provide a clearer signal.
- The EMA helps to filter out noise and confirm trends.
3. **Trading Signals**:
- **Bullish Signal**: A potential buying opportunity is signaled when the oscillator crosses above its EMA. This suggests increasing upward momentum.
- **Bearish Signal**: A potential selling opportunity is signaled when the oscillator crosses below its EMA. This indicates increasing downward momentum.
4. **Visual Aids**:
- The indicator includes horizontal lines at +70, 0, and -70 to help you quickly assess overbought, neutral, and oversold conditions.
- The blue line represents the oscillator, while the orange line represents the EMA of the oscillator.
### How to Use:
- **Set your parameters**: Adjust the lookback period and EMA length to fit your trading strategy and time frame.
- **Watch for Crossovers**: Monitor when the oscillator crosses the EMA. A crossover from below to above suggests a buy, while a crossunder from above to below suggests a sell.
- **Confirm with Other Indicators**: For more reliable signals, consider using this indicator alongside other technical tools like volume analysis, trend lines, or support/resistance levels.
This indicator is ideal for traders looking to capture momentum-based trades in various market conditions.
MACD Trail | Flux Charts💎 GENERAL OVERVIEW
Introducing our new MACD Trail indicator! Moving average convergence/divergence (MACD) is a well-known indicator among traders. It's a trend-following indicator that uses the relationship between two exponential moving averages (EMAs). This indicator aims to use MACD to generate a trail that follows the current price of the ticker, which can act as a support / resistance zone. More info about the process in the "How Does It Work" section.
Features of the new MACD Trail Indicator :
A Trail Generated Using MACD Calculation
Customizable Algorithm
Customizable Styling
📌 HOW DOES IT WORK ?
First of all, this indicator calculates the current MACD of the ticker using the user's input as settings. Let X = MACD Length setting ;
MACD ~= X Period EMA - (X * 2) Period EMA
Then, two MACD Trails are generated, one being bullish and other being bearish. Let ATR = 30 period ATR (Average True Range)
Bullish MACD Trail = Current Price + MACD - (ATR * 1.75)
Bearish MACD Trail = Current Price + MACD + (ATR * 1.75)
The indicator starts by rendering only the Bullish MACD Trail. Then if it's invalidated (candlestick closes below the trail) it switches to Bearish MACD Trail. The MACD trail switches between bullish & bearish as they get invalidated.
The trail type may give a hint about the current trend of the price action. The trail itself also can act as a support / resistance zone, here is an example :
🚩 UNIQUENESS
While MACD is one of the most used indicators among traders, this indicator aims to add another functionality to it by rendering a trail based on it. This trail may act as a support / resistance zone as described above, and gives a glimpse about the current trend. The indicator also has custom MACD Length and smoothing options, as well as various style options.
⚙️ SETTINGS
1. General Configuration
MACD Length -> This setting adjusts the EMA periods used in MACD calculation. Increasing this setting will make MACD more responseive to longer trends, while decreasing it may help with detection of shorter trends.
Smoothing -> The smoothing of the MACD Trail. Increasing this setting will help smoothen out the MACD Trail line, but it can also make it less responsive to the latest changes.
Moments Functions
This script is a TradingView Pine Script (version 5) for calculating and plotting statistical moments of a financial series. Here's a breakdown of what it does:
Script Overview
Purpose:
The script calculates and visualizes moments such as Mean, Variance, Skewness, and Kurtosis of a price series.
It also provides the option to display log returns and various statistical bands.
Inputs:
Moments Selection: Choose from Mean, Variance, Skewness, or Excess Kurtosis.
Source Settings: Define the lookback period and source data (e.g., closing price or log returns).
Plot Settings: Control visibility and styling of plots, bands, and information panels.
Colors Settings: Customize colors for different plot elements.
Functions:
f_va(): Computes sample variance.
f_sd(): Computes sample standard deviation.
f_skew(): Computes sample skewness.
f_kurt(): Computes sample kurtosis.
seskew(): Calculates the standard error of skewness.
sekurt(): Calculates the standard error of kurtosis.
skewcv(): Computes critical values for skewness.
kurtcv(): Computes critical values for kurtosis.
Outputs:
Plots:
Moment values (Mean, Variance, Skewness, Kurtosis).
Log Returns (if selected).
Standard Deviation Bands (if selected).
Critical Values for Skewness and Kurtosis (if selected).
Information Panel: Displays current statistical values and their significance.
Customization:
Users can customize appearance and behavior of the script through various input options, including colors, line thickness, and background settings.
Key Variables and Constants
Constants:
zscoreS and zscoreL: Z-scores for confidence intervals based on sample size.
skewrv and kurtrv: Reference values for skewness and excess kurtosis.
Sample Functions:
f_va() and f_sd(): Custom functions to calculate sample variance and standard deviation.
f_skew() and f_kurt(): Custom functions to calculate skewness and kurtosis.
Critical Values:
Functions skewcv() and kurtcv() calculate critical values used to assess statistical significance of skewness and kurtosis.
Plotting
Plot Types:
Mean, variance, skewness, and excess kurtosis are plotted based on user selection.
Log returns are plotted if enabled.
Standard deviation bands and critical values are plotted if enabled.
Labels:
Information panel labels display mean, variance/standard deviation, skewness, and kurtosis values along with their significance.
Example Usage
To use this script:
Add it to a TradingView chart.
Adjust inputs to configure which statistical moments to display, the source data, and the appearance of the plots.
Review the plotted data and labels to analyze the statistical properties of the selected price series.
This script is useful for traders and analysts looking to perform advanced statistical analysis on financial data directly within TradingView.
When comparing two stock prices over a period of time, the statistical moments—mean, variance, skewness, and kurtosis—can provide a deep insight into the behavior of the stock prices and their distributions. Here’s what each moment signifies in this context:
1. Mean
Definition: The mean (or average) is the sum of the stock prices over the period divided by the number of data points. It represents the central value of the price series.
Interpretation: When comparing two stocks, the mean tells you the average price level of each stock over the period. A higher mean indicates that, on average, the stock price is higher compared to another stock with a lower mean.
Comparison Insight: If Stock A has a higher mean price than Stock B, it implies that Stock A's prices are generally higher than those of Stock B over the given period.
2. Variance
Definition: Variance measures the dispersion or spread of the stock prices around the mean. It is the average of the squared differences from the mean.
Interpretation: A higher variance indicates that the stock prices fluctuate more widely from the mean, implying greater volatility. Conversely, a lower variance indicates more stable and predictable prices.
Comparison Insight: Comparing the variances of two stocks helps in assessing which stock has more price volatility. If Stock A has a higher variance than Stock B, it means Stock A's prices are more volatile and less predictable compared to Stock B.
3. Skewness
Definition: Skewness measures the asymmetry of the distribution of stock prices around the mean. It can be positive, negative, or zero:
Positive Skewness: The distribution has a long right tail, with more frequent small returns and fewer large positive returns.
Negative Skewness: The distribution has a long left tail, with more frequent small returns and fewer large negative returns.
Zero Skewness: The distribution is symmetric around the mean.
Interpretation: Skewness tells you about the direction of outliers in the stock price distribution. Positive skewness means a higher probability of large positive returns, while negative skewness means a higher probability of large negative returns.
Comparison Insight: By comparing skewness, you can understand the nature of extreme returns for two stocks. For example, if Stock A has positive skewness and Stock B has negative skewness, Stock A might have more frequent large gains, whereas Stock B might have more frequent large losses.
4. Kurtosis
Definition: Kurtosis measures the "tailedness" of the distribution of stock prices. It indicates how much of the distribution is in the tails versus the center. High kurtosis means more outliers (extreme returns), while low kurtosis means fewer outliers.
Interpretation:
High Kurtosis: Indicates a higher likelihood of extreme price movements (both high and low) compared to a normal distribution.
Low Kurtosis: Indicates that extreme price movements are less common.
Comparison Insight: Comparing kurtosis between two stocks shows which stock has more extreme returns. If Stock A has higher kurtosis than Stock B, it means Stock A has more frequent extreme price changes, suggesting more risk or opportunities for large gains or losses.
Summary
Mean: Compares average price levels.
Variance: Compares price volatility.
Skewness: Compares the asymmetry of price movements.
Kurtosis: Compares the likelihood of extreme price changes.
By analyzing these statistical moments, you can gain a comprehensive view of how the two stocks behave relative to each other, which can inform investment decisions based on risk, return expectations, and the nature of price movements.
Gabriel's Relative Unrealized Profit with Dynamic MVRV Histogram
Certainly! Here’s an enhanced description of the Gabriel's Relative Unrealized Profit with Dynamic MVRV Histogram indicator with detailed usage instructions and explanations of why it's effective:
Gabriel's Relative Unrealized Profit with Dynamic MVRV Histogram
Description:
The Gabriel's Relative Unrealized Profit with Dynamic MVRV Histogram is an advanced trading indicator designed to offer in-depth insights into asset profitability and market valuation. By integrating Relative Unrealized Profit (RUP) and the Market Value to Realized Value (MVRV) Ratio, this indicator provides a nuanced view of an asset's performance and potential trading signals.
Key Components:
SMA Length and Volume Indicator:
SMA Length: Defines the period for the Simple Moving Average (SMA) used to calculate the entry price, defaulted to 14 periods. This smoothing technique helps estimate the average historical price at which the asset was acquired.
Volume Indicator: Allows selection between "volume" and "vwap" (Volume-Weighted Average Price) for calculating entry volume. The choice impacts the calculation of entry volume, either based on standard trading volume or a weighted average price.
Realized Price Calculation:
Computes the average price over a specified period (default of 30 periods) to establish the realized price. This serves as a benchmark for evaluating the cost basis of the asset.
MVRV Calculation:
Current Price: The most recent closing price of the asset, representing its market value.
Total Cost: Calculated as the product of the entry price and entry volume, reflecting the total investment made.
Unrealized Profit: The difference between the current price and the entry price, multiplied by entry volume, indicating profit or loss that has yet to be realized.
Relative Unrealized Profit: Expressed as a percentage of the total cost, showing how much profit or loss exists relative to the initial investment.
Market Value and Realized Value: Market Value is the current price multiplied by entry volume, while Realized Value is the realized price multiplied by entry volume. The MVRV Ratio is obtained by dividing Market Value by Realized Value.
Normalization:
Normalizes both Relative Unrealized Profit and MVRV Ratio to a standardized range of -100 to 100. This involves calculating the minimum and maximum values over a 100-period window to ensure comparability and relevance.
Histogram Calculation:
The histogram is derived from the difference between the normalized Relative Unrealized Profit and the normalized MVRV Ratio. It visually represents the disparity between the two metrics, highlighting potential trading signals.
Plotting and Alerts:
Plots:
Normalized Relative Unrealized Profit (Blue Line): Plotted in blue, this line shows the scaled measure of unrealized profit. Positive values indicate potential gains, while negative values suggest potential losses.
Normalized MVRV Ratio (Red Line): Plotted in red, this line represents the scaled MVRV Ratio. Higher values suggest that the asset’s market value significantly exceeds its realized value, indicating potential overvaluation, while lower values suggest potential undervaluation.
Histogram (Green Bars): Plotted in green, this histogram displays the difference between the normalized Relative Unrealized Profit and the normalized MVRV Ratio. Positive bars indicate that the asset’s profitability is exceeding its market valuation, while negative bars suggest the opposite.
Alerts:
High Histogram Alert: Activated when the histogram value exceeds 50. This condition signals a strong positive divergence, indicating that the asset's profitability is outperforming its market valuation. It may suggest a buying opportunity or indicate that the asset is undervalued relative to its potential profitability.
Low Histogram Alert: Triggered when the histogram value falls below -50. This condition signals a strong negative divergence, indicating that the asset's profitability is lagging behind its market valuation. It may suggest a selling opportunity or indicate that the asset is overvalued relative to its profitability.
How to Use the Indicator:
Setup: Customize the SMA Length, Volume Indicator, and Realized Price Length based on your trading strategy and asset volatility. These parameters allow you to tailor the indicator to different market conditions and asset types.
Interpretation:
Blue Line (Normalized Relative Unrealized Profit): Monitor this line to gauge the profitability of holding the asset. Significant positive values suggest that the asset is currently in a profitable position relative to its purchase price.
Red Line (Normalized MVRV Ratio): Use this line to assess whether the asset is trading at a premium or discount relative to its cost basis. Higher values may indicate overvaluation, while lower values suggest undervaluation.
Green Bars (Histogram): Observe the histogram for deviations between RUP and MVRV Ratio. Large positive bars indicate that the asset's profitability is strong relative to its valuation, signaling potential buying opportunities. Large negative bars suggest that the asset's profitability is weak relative to its valuation, signaling potential selling opportunities.
Trading Strategy:
Bullish Conditions: When the histogram shows large positive values, it suggests that the asset’s profitability is strong compared to its valuation. Consider this as a potential buying signal, especially if the histogram remains consistently positive.
Bearish Conditions: When the histogram displays large negative values, it indicates that the asset’s profitability is weak compared to its valuation. This may signal a potential selling opportunity or caution, particularly if the histogram remains consistently negative.
Why This Indicator is Effective:
Integrated Metrics: Combining Relative Unrealized Profit and MVRV Ratio provides a comprehensive view of asset performance. This integration allows traders to evaluate both profitability and market valuation in one cohesive tool.
TICK Price Label Colors[Salty]The ticker symbol for the NYSE CUMULATIVE Tick Index is TICK. The Tick Index is a short-term indicator that shows the number of stocks trading up minus the number of stocks trading down. Traders can use this ratio to make quick trading decisions based on market movement. For example, a positive tick index can indicate market optimism, while readings of +1,000 and -1,000 can indicate overbought or oversold conditions.
This script is used to color code the price label of the Symbol values zero or above in Green(default), and values below zero in red(default). For a dynamic symbol like the TICK this tells me the market is bullish when Green or Bearish when Red. I was previously using the baseline style with a Base level of 50 to accomplish this view of the symbol, but it was always difficult to maintain the zero level at the zero TICK value. This indicator is always able to color code the price label properly. Also, it has the benefit of setting the timeframe to 1 second(default) that is maintained even when the chart timeframe is changed.
Update: Added the ability to show the TICK Symbol to support viewing multiple TICK tickers at once as shown.
25-Day Momentum IndexDescription:
The 25-Day Momentum Index (25D MI) is a technical indicator designed to measure the strength and direction of price movements over a 25-day period. Inspired by classic momentum analysis, this indicator helps traders identify trends and potential reversal points in the market.
How It Works:
Momentum Calculation: The 25D MI calculates momentum as the difference between the current closing price and the closing price 25 days ago. This difference provides insights into the market's recent strength or weakness.
Plotting: The indicator plots the Momentum Index as a blue line, showing the raw momentum values. A zero line is also plotted in gray to serve as a reference point for positive and negative momentum.
Highlighting Zones:
Positive Momentum: When the Momentum Index is above zero, it is plotted in green, highlighting positive momentum phases.
Negative Momentum: When the Momentum Index is below zero, it is plotted in red, highlighting negative momentum phases.
Usage:
A rising curve means an increase in upward momentum - if it is above the zero line. A rising curve below the zero line signifies a decrease in downward momentum. By the same token, a falling curve means an increase in downward momentum below the zero line, a decrease in upward momentum above the zero line.
This indicator is ideal for traders looking to complement their strategy with a visual tool that captures the essence of market momentum over a significant period. Use it to enhance your technical analysis and refine your trading decisions.
Ultimate Bands [BigBeluga]Ultimate Bands
The Ultimate Bands indicator is an advanced technical analysis tool that combines elements of volatility bands, oscillators, and trend analysis. It provides traders with a comprehensive view of market conditions, including trend direction, momentum, and potential reversal points.
🔵 KEY FEATURES
● Ultimate Bands
Consists of an upper band, lower band, and a smooth middle line
Based on John Ehler's SuperSmoother algorithm for reduced lag
Bands are calculated using Root Mean Square Deviation (RMSD) for adaptive volatility measurement
Helps identify potential support and resistance levels
● Ultimate Oscillator
Derived from the price position relative to the Ultimate Bands
Oscillates between overbought and oversold levels
Provides insights into potential reversals and trend strength
● Trend Signal Line
Based on a Hull Moving Average (HMA) of the Ultimate Oscillator
Helps identify the overall trend direction
Color-coded for easy trend interpretation
● Heatmap Visualization
Displays the current state of the oscillator and trend signal
Provides an intuitive visual representation of market conditions
Shows overbought/oversold status and trend direction at a glance
● Breakout Signals
Optional feature to detect and display breakouts beyond the Ultimate Bands
Helps identify potential trend reversals or continuations
Visualized with arrows on the chart and color-coded candles
🔵 HOW TO USE
● Trend Identification
Use the color and position of the Trend Signal Line to determine the overall market trend
Refer to the heatmap for a quick visual confirmation of trend direction
● Entry Signals
Look for price touches or breaks of the Ultimate Bands for potential entry points
Use oscillator extremes in conjunction with band touches for stronger signals
Consider breakout signals (if enabled) for trend-following entries
● Exit Signals
Use opposite band touches or breakouts as potential exit points
Monitor the oscillator for divergences or extreme readings as exit signals
● Overbought/Oversold Analysis
Use the Ultimate Oscillator and heatmap to identify overbought/oversold conditions
Look for potential reversals when the oscillator reaches extreme levels
● Confirmation
Combine Ultimate Bands, Oscillator, and Trend Signal for stronger trade confirmation
Use the heatmap for quick visual confirmation of market conditions
🔵 CUSTOMIZATION
The Ultimate Bands indicator offers several customization options:
Adjust the main calculation length for bands and oscillator
Modify the number of standard deviations for band calculation
Change the signal line length for trend analysis
Toggle the display of breakout signals and candle coloring
By fine-tuning these settings, traders can adapt the Ultimate Bands indicator to various market conditions and personal trading strategies.
The Ultimate Bands indicator provides a multi-faceted approach to market analysis, combining volatility-based bands, oscillator analysis, and trend identification in one comprehensive tool. Its adaptive nature and visual cues make it suitable for both novice and experienced traders across various timeframes and markets. The integration of multiple analytical elements offers traders a rich set of data points to inform their trading decisions.
Market Structure Oscillator [LuxAlgo]The Market Structure Oscillator indicator analyzes and synthesizes short-term, intermediate-term, and long-term market structure shifts and breaks, visualizing the output as oscillators and graphical representations of real-time market structures on the main price chart.
The oscillator presentation of the detected market structures helps traders visualize trend momentum and strength, identifying potential trend reversals, and providing different perspectives to enhance the analysis of classic market structures.
🔶 USAGE
A market structure shift signals a potential change in market sentiment or direction, while a break of structure indicates a continuation of the current trend. Detecting these events in real-time helps traders recognize both trend changes and continuations. The market structure oscillator translates these concepts visually, offering deeper insights into market momentum and strength. It aids traders in identifying overbought or oversold conditions, potential trend reversals, and confirming trend direction.
Oscillators often generate signals based on crossing certain thresholds or diverging from price movements, providing cues for traders to enter or exit positions.
The weights determine the influence of each period (short-term, intermediate-term, long-term) on the final oscillator value. By changing the weights, traders can emphasize or de-emphasize the importance of each period. Higher weights increase their respective market structure's influence on the oscillator value. For example, if the weight for the short-term period is set to 0, the final value of the oscillator will be calculated using only the intermediate-term and long-term market structures.
The indicator features a Cycle Oscillator component, which uses the market structure oscillator values to generate a histogram and provide further insights into market cycles and potential signals. The Cycle Oscillator aids in timing by allowing traders to more easily see the median length of an oscillation around the average point, helping them identify both favorable prices and favorable moments for trading.
Users can also display detected market structures on the price chart by enabling the corresponding market structure toggle from the "Market Structures on Chart" settings group.
🔶 DETAILS
The script initiates its analysis by detecting swing levels, which form the fundamental basis for its operations. It begins by identifying short-term swing points, automatically detected solely based on market movements without any reliance on user-defined input. Short-Term Swing Highs (STH) are peaks in price surrounded by lower highs on both sides, while Short-Term Swing Lows (STL) are troughs surrounded by higher lows.
To identify intermediate-term and long-term swing points, the script uses previously detected short-term swing points as reference points. It examines these points to determine intermediate-term swings and further analyzes intermediate-term swings to identify long-term swing points. This method ensures a thorough and unbiased evaluation of market dynamics, providing traders with reliable insights into market structures.
Once swing levels are detected, the process continues with the analysis of Market Structure Shifts (MSS) and Breaks of Structure (BoS). A Market Structure Shift, also known as a Change of Character (CHoCH), is a critical event in price action analysis that suggests a potential shift in market sentiment or direction. It occurs when the price reverses from an established trend, indicating that the current trend may be losing momentum and a reversal could be imminent.
On the other hand, a Break of Structure signifies the continuation of the existing market trend. This event occurs when the price decisively moves beyond a previous swing high or low, confirming the strength and persistence of the prevailing trend.
The indicator analyzes price patterns using a pure price action approach and identifies market structures for short-term, intermediate-term, and long-term periods. The collected data is then normalized and combined using specified weights to calculate the final Market Structure Oscillator value.
🔶 SETTINGS
The indicator incorporates user-defined settings, allowing users to tailor it according to their preferences and trading strategies.
🔹 Market Structure Oscillator
Market Structure Oscillator: Toggles the visibility of the market structures oscillator.
Short Term Weight: Defines the weight for the short-term market structure.
Intermediate Term Weight: Defines the weight for the intermediate-term market structure.
Long Term Weight: Defines the weight for the long-term market structure.
Oscillator Smoothing: Determines the smoothing factor for the oscillator.
Gradient Colors: Allows customization of bullish and bearish gradient colors.
Market Structure Oscillator Crosses: Provides signals based on market structure oscillator equilibrium level crosses.
🔹 Cycle Oscillator
Cycle Oscillator - Histogram: Toggles the visibility of the cycle oscillator.
Cycle Signal Length: Defines the length of the cycle signal.
Cycle Oscillator Crosses: Provides signals based on cycle oscillator crosses.
🔹 Market Structures on Chart
Market Structures: Allows plotting of market structures (short, intermediate, and long term) on the chart.
Line, Label, and Color: Options to display lines and labels for different market structures with customizable colors.
🔹 Oscillator Components
Oscillators: Separately plots short-term, intermediate-term, and long-term oscillators. Provides options to display these oscillators with customizable colors.
🔶 RELATED SCRIPTS
Market-Structures-(Intrabar)
Regression Indicator [BigBeluga]Regression Indicator
Indicator Overview:
The Regression Indicator is designed to help traders identify trends and potential reversals in price movements. By calculating a regression line and a normalized regression indicator, it provides clear visual signals for market direction, aiding in making informed trading decisions. The indicator dynamically updates with the latest market data, ensuring timely and relevant signals.
Key Features:
⦾ Calculations
Regression Indicator: Calculates the linear regression coefficients (slope and intercept) and derives the normalized distance close from the regression line.
// @function regression_indicator is a Normalized Ratio of Regression Lines with close
regression_indicator(src, length) =>
sum_x = 0.0
sum_y = 0.0
sum_xy = 0.0
sum_x_sq = 0.0
distance = 0.0
// Calculate Sum
for i = 0 to length - 1 by 1
sum_x += i + 1
sum_y += src
sum_xy += (i + 1) * src
sum_x_sq += math.pow(i + 1, 2)
// Calculate linear regression coefficients
slope = (length * sum_xy - sum_x * sum_y)
/ (length * sum_x_sq - math.pow(sum_x, 2))
intercept = (sum_y - slope * sum_x) / length
// Calculate Regression Indicator
y1 = intercept + slope
distance := (close - y1)
distance_n = ta.sma((distance - ta.sma(distance, length1))
/ ta.stdev(distance, length1), 10)
⦿ Reversion Signals:
Marks potential trend reversal points.
⦿ Trend Identification:
Highlights when the regression indicator crosses above or below the zero line, signaling potential trend changes.
⦿ Color-Coded Candles:
Changes candle colors based on the regression indicator's value.
⦿ Arrow Markers:
Indicate trend directions on the chart.
⦿ User Inputs
Regression Length: Defines the period for calculating the regression line.
Normalization Length: Period used to normalize the regression indicator.
Signal Line: Length for averaging the regression indicator to generate signals.
Main Color: Color used for plotting the regression line and signals.
The Regression Indicator is a powerful tool for analyzing market trends and identifying potential reversal points. With customizable inputs and clear visual aids, it enhances the trader's ability to make data-driven decisions. The dynamic nature of the indicator ensures it remains relevant with up-to-date market information, making it a valuable addition to any trading strategy."
Oscillator Scatterplot Analysis [Trendoscope®]In this indicator, we demonstrate how to plot oscillator behavior of oversold-overbought against price movements in the form of scatterplots and perform analysis. Scatterplots are drawn on a graph containing x and y-axis, where x represent one measure whereas y represents another. We use the library Graph to collect the data and plot it as scatterplot.
Pictorial explanation of components is defined in the chart below.
🎲 This indicator performs following tasks
Calculate and plot oscillator
Identify oversold and overbought areas based on various methods
Measure the price and bar movement from overbought to oversold and vice versa and plot them on the chart.
In our example,
The x-axis represents price movement. The plots found on the right side of the graph has positive price movements, whereas the plots found on the left side of the graph has negative price movements.
The y-axis represents the number of bars it took for reaching overbought to oversold and/or oversold to overbought. Positive bars mean we are measuring oversold to overbought, whereas negative bars are a measure of overbought to oversold.
🎲 Graph is divided into 4 equal quadrants
Quadrant 1 is the top right portion of the graph. Plots in this quadrant represent the instances where positive price movement is observed when the oscillator moved from oversold to overbought
Quadrant 2 is the top left portion of the graph. Plots in this quadrant represent the instances where negative price movement is observed when the oscillator moved from oversold to overbought.
Quadrant 3 is the bottom left portion of the chart. Plots in this quadrant represent the instances where negative price movement is observed when the oscillator moved from overbought to oversold.
Quadrant 4 is the bottom right portion of the chart. Plots in this quadrant represent the instances where positive price movement is observed when the oscillator moved from overbought to oversold.
🎲 Indicator components in Detail
Let's dive deep into the indicator.
🎯 Oscillator Selection
Select the Oscillator and define the overbought oversold conditions through input settings
Indicator - Oscillator base used for performing analysis
Length - Loopback length on which the oscillator is calculated
OB/OS Method - We use Bollinger Bands, Keltener Channel and Donchian channel to calculate dynamic overbought and oversold levels instead of static 80-10. This is also useful as other type of indicators may not be within 0-100 range.
Length and Multiplier are used for the bands for calculating Overbought/Oversold boundaries.
🎯 Define Graph Properties
Select different graph properties from the input settings that will instruct how to display the scatterplot.
Type - this can be either scatterplot or heatmap. Scatterplot will display plots with specific transparency to indicate the data, whereas heatmap will display background with different transparencies.
Plot Color - this is the color in which the scatterplot or heatmap is drawn
Plot Size - applicable mainly for scatterplot. Since the character we use for scatterplot is very tiny, the large at present looks optimal. But, based on the user's screen size, we may need to select different sizes so that it will render properly.
Rows and Columns - Number of rows and columns allocated per quadrant. This means, the total size of the chart is 2X rows and 2X columns. Data sets are divided into buckets based on the number of available rows and columns. Hence, changing this can change the appearance of the overall chart, even though they are representing the same data. Also, please note that tables can have max 10000 cells. If we increase the rows and columns by too much, we may get runtime errors.
Outliers - this is used to exclude the extreme data. 20% outlier means, the chart will ignore bottom 20% and top 20% when defining the chart boundaries. However, the extreme data is still added to the boundaries.
Momentum with ATR and Volatility [ST]Momentum with ATR and Volatility
Description in English:
This indicator combines price momentum with market volatility to identify entry and exit points in trades.
It utilizes the difference in closing prices (momentum) and the Average True Range (ATR) to measure volatility. Buy and sell signals are generated based on the combination of these two components.
Detailed Explanation:
Configuration:
Momentum Length: This input defines the period for calculating the momentum, which is the difference between the closing prices. The default value is 10.
ATR Length: This input defines the period for calculating the Average True Range (ATR), which measures market volatility. The default value is 14.
ATR Threshold: This input defines the threshold multiplier for the ATR to generate buy and sell signals. The default value is 3.5.
Momentum Calculation:
Momentum is calculated as the difference between the current closing price and the closing price momentum_length periods ago.
ATR Calculation:
The ATR is calculated based on the specified length and is used to measure market volatility.
Buy and Sell Signals:
Buy Signal: Generated when momentum is positive, the current close is higher than the previous close, and momentum is greater than ATR * threshold.
Sell Signal: Generated when momentum is negative, the current close is lower than the previous close, and momentum is less than -ATR * threshold.
Plotting:
Buy signals are plotted as green triangles below the bars.
Sell signals are plotted as red triangles above the bars.
Momentum and ATR thresholds are plotted in a separate panel below the main chart.
Momentum is plotted as a blue line.
The ATR threshold lines are plotted as solid orange lines.
Indicator Benefits:
Momentum Measurement: Helps traders gauge the momentum of price movements.
Volatility Measurement: Utilizes ATR to measure market volatility, providing a more comprehensive analysis.
Visual Cues: Provides clear visual signals for buy and sell points, aiding in making informed trading decisions.
Justification of Component Combination:
Combining momentum with ATR provides a more robust measure of potential entry and exit points by considering both price movement and market volatility.
How Components Work Together:
The script calculates momentum and ATR for the specified periods.
It generates buy and sell signals based on the conditions of momentum and ATR.
The signals and values are plotted on the chart to provide a visual representation, helping traders identify potential trading opportunities.
Título: Indicador de Momentum com ATR e Volatilidade
Descrição em Português:
Este indicador combina o momentum do preço com a volatilidade do mercado para identificar pontos de entrada e saída em operações.
Utiliza a diferença entre os preços de fechamento (momentum) e o Average True Range (ATR) para medir a volatilidade. Sinais de compra e venda são gerados com base na combinação desses dois componentes.
Explicação Detalhada:
Configuração:
Comprimento do Momentum: Este parâmetro define o período para calcular o momentum, que é a diferença entre os preços de fechamento. O valor padrão é 10.
Comprimento do ATR: Este parâmetro define o período para calcular o Average True Range (ATR), que mede a volatilidade do mercado. O valor padrão é 14.
Limite do ATR: Este parâmetro define o multiplicador de limite para o ATR para gerar sinais de compra e venda. O valor padrão é 3.5.
Cálculo do Momentum:
O momentum é calculado como a diferença entre o preço de fechamento atual e o preço de fechamento momentum_length períodos atrás.
Cálculo do ATR:
O ATR é calculado com base no comprimento especificado e é usado para medir a volatilidade do mercado.
Sinais de Compra e Venda:
Sinal de Compra: Gerado quando o momentum é positivo, o fechamento atual é maior que o fechamento anterior, e o momentum é maior que ATR * threshold.
Sinal de Venda: Gerado quando o momentum é negativo, o fechamento atual é menor que o fechamento anterior, e o momentum é menor que -ATR * threshold.
Plotagem:
Sinais de compra são plotados como triângulos verdes abaixo das barras.
Sinais de venda são plotados como triângulos vermelhos acima das barras.
O momentum e os limites do ATR são plotados em um painel separado abaixo do gráfico principal.
O momentum é plotado como uma linha azul.
As linhas de limite do ATR são plotadas como linhas laranjas sólidas.
Benefícios do Indicador:
Medição do Momentum: Ajuda os traders a avaliar o momentum dos movimentos de preços.
Medição da Volatilidade: Utiliza o ATR para medir a volatilidade do mercado, proporcionando uma análise mais abrangente.
Sinais Visuais: Fornece sinais visuais claros para pontos de compra e venda, auxiliando na tomada de decisões informadas.
Justificação da Combinação de Componentes:
Combinar o momentum com o ATR fornece uma medida mais robusta de potenciais pontos de entrada e saída ao considerar tanto o movimento dos preços quanto a volatilidade do mercado.
Como os Componentes Funcionam Juntos:
O script calcula o momentum e o ATR para os períodos especificados.
Gera sinais de compra e venda com base nas condições de momentum e ATR.
Os sinais e valores são plotados no gráfico para fornecer uma representação visual, ajudando os traders a identificar oportunidades de negociação potenciais.
Trend Strength with Volatility and Volume [ST]Trend Strength with Volatility and Volume
Description in English:
This indicator combines market volatility and trading volume to measure the current trend strength. It helps identify when the trend is gaining or losing momentum.
Detailed Explanation:
Configuration:
Length: This input defines the period over which the moving average is calculated. The default value is 14.
MA Type: This input allows you to choose between a Simple Moving Average (SMA) and an Exponential Moving Average (EMA).
Volatility Length: This input defines the period over which the ATR (Average True Range) is calculated. The default value is 14.
Volume Length: This input defines the period over which the moving average of volume is calculated. The default value is 14.
Trend Strength Calculation:
Moving Average (MA): The script calculates the moving average of the closing price based on the selected type (SMA or EMA) and period.
Volatility (ATR): The ATR is used to measure market volatility over the specified period.
Volume MA: The script calculates the moving average of the trading volume based on the selected type (SMA or EMA) and period.
Trend Strength: The trend strength is calculated as the difference between the closing price and the moving average, divided by the volatility, and multiplied by the volume normalized by its moving average.
Plotting:
The trend strength is plotted as a line chart. Positive values indicate a strong upward trend, while negative values indicate a strong downward trend.
A horizontal line is added at the zero level to help identify the neutral point.
Indicator Benefits:
Trend Identification: Helps traders identify the strength of the current trend by combining price, volatility, and volume.
Visual Cues: Provides clear visual signals for trend strength, aiding in making informed trading decisions.
Customizable Parameters: Allows traders to adjust the length of the moving averages, ATR, and volume to suit different trading strategies and market conditions.
Justification of Component Combination:
Combining price, volatility, and volume provides a comprehensive measure of trend strength. This combination enhances the trader's ability to make informed decisions based on multiple market factors.
How Components Work Together:
The script calculates the moving average of the closing price and trading volume.
It measures market volatility using the ATR.
The trend strength is calculated by combining these components, providing a robust measure of the current trend's strength.
Título: Força da Tendência com Volatilidade e Volume
Descrição em Português:
Este indicador combina a volatilidade do mercado, medida pelo ATR (Average True Range), e o volume de negociações para medir a força da tendência atual. Ele ajuda a identificar quando a tendência está ganhando ou perdendo força.
Explicação Detalhada:
Configuração:
Comprimento: Este parâmetro define o período para o cálculo da média móvel. O valor padrão é 14.
Tipo de MA: Este parâmetro permite escolher entre uma Média Móvel Simples (SMA) e uma Média Móvel Exponencial (EMA).
Comprimento da Volatilidade: Este parâmetro define o período para o cálculo do ATR (Average True Range). O valor padrão é 14.
Comprimento do Volume: Este parâmetro define o período para o cálculo da média móvel do volume. O valor padrão é 14.
Cálculo da Força da Tendência:
Média Móvel (MA): O indicador calcula a média móvel do preço de fechamento com base no tipo selecionado (SMA ou EMA) e período.
Volatilidade (ATR): O ATR é usado para medir a volatilidade do mercado ao longo do período especificado.
Média Móvel do Volume: O indicador calcula a média móvel do volume de negociação com base no tipo selecionado (SMA ou EMA) e período.
Força da Tendência: A força da tendência é calculada como a diferença entre o preço de fechamento e a média móvel, dividida pela volatilidade e multiplicada pelo volume normalizado pela sua média móvel.
Plotagem:
A força da tendência é plotada como um gráfico de linhas. Valores positivos indicam uma forte tendência de alta, enquanto valores negativos indicam uma forte tendência de baixa.
Uma linha horizontal é adicionada no nível zero para ajudar a identificar o ponto neutro.
Benefícios do Indicador:
Identificação de Tendências: Este indicador ajuda os traders a identificar a força da tendência atual, combinando preço, volatilidade e volume.
Sinais Visuais Claros: Fornece sinais visuais claros para a força da tendência, facilitando a tomada de decisões informadas.
Parâmetros Personalizáveis: Os traders podem ajustar o comprimento das médias móveis, ATR e volume para se adequar a diferentes estratégias de negociação e condições de mercado.
Justificação da Combinação de Componentes:
A combinação de preço, volatilidade e volume fornece uma medida abrangente da força da tendência.
Isso melhora a capacidade dos traders de tomar decisões informadas com base em múltiplos fatores do mercado.
Como os Componentes Funcionam Juntos:
O indicador calcula a média móvel do preço de fechamento e do volume de negociação.
Mede a volatilidade do mercado usando o ATR.
A força da tendência é calculada combinando esses componentes, fornecendo uma medida robusta da força da tendência atual.
Money Flow Index Crossover IndicatorThe "Money Flow Index Crossover Indicator" is a specialized technical analysis tool designed to assist traders by providing a clear visualization of potential buy and sell signals based on the Money Flow Index (MFI) and its smoothed moving average (SMA). This indicator delineates overbought and oversold zones, offering valuable insights into market dynamics. It operates as an oscillator on a separate pane, helping traders identify bullish and bearish market conditions with greater precision. By incorporating k-Nearest Neighbor (KNN) machine learning techniques, this indicator enhances the reliability and accuracy of the signals provided.
Originality and Usefulness:
This script is not just a simple mashup of existing indicators but integrates multiple components to create a unique and comprehensive analysis tool. The combined information from the MFI, its smoothed moving average, and the KNN machine learning techniques influence the form and accuracy of the Money Flow Index Average line and the Smoothed Money Flow Index line giving a visually helpful representation of overbought and oversold conditions. These lines are displayed in an oscillator style crossover, allowing users to visualize potential buy and sell zones for setting up potential signals. The user can adjust various settings of these tools behind the code to fine-tune the behavior and sensitivity of these lines. This integration provides a more robust and insightful trading tool that can adapt to different market conditions and trading styles.
How It Works:
Inputs:
MFI Settings:
Show Signals: Allows users to toggle the display of MFI and SMA crossing signals, which are critical for identifying potential market reversals.
Plot Amount: Determines the number of plots in the heat map, ranging from 2 to 28, enabling customization based on user preference.
Source: Defines the data source for MFI calculations, typically set to OHLC4 for a balanced view of price movements.
Smooth Initial MFI Length: Specifies the smoothing length for the initial MFI calculations to reduce noise and enhance signal clarity.
MFI SMA Length: Sets the length for the SMA used to smooth the MFI average, providing a more stable reference line.
Machine Learning Settings:
Use KInSource: Option to average MFI data by adding a lookback to the source, improving the accuracy of historical comparisons.
KNN Distance Requirement: Defines the distance calculation method for KNN (Max, Min, Both) to refine the data filtering process.
Machine Learning Length: Specifies the amount of machine learning data stored for smoothing results, balancing between responsiveness and stability.
KNN Length: Sets the number of KNN used to calculate the allowable distance range, enhancing the precision of the machine learning model.
Fast and Slow Lengths: Defines the lengths for fast and slow MFI calculations, allowing the indicator to capture different market dynamics.
Smoothing Length: Determines the length at which MFI calculations start for a more smoothed result, reducing false signals.
Variables and Functions:
KNN Function: Filters machine learning data to calculate valid distances based on defined criteria, ensuring more accurate MFI averages.
MFI Calculations: Computes both fast and slow MFI values, applies smoothing, and stores them for KNN processing to refine signal generation.
MFI KNN Calculation: Uses the KNN function to calculate the machine learning average of MFI values, enhancing signal reliability.
MFI Average and SMA: Calculates the average and smoothed MFI values, which are crucial for determining crossover signals.
Calculations:
MFI Values: Calculates current fast and slow MFI values and applies smoothing to reduce market noise.
Storage Arrays: Stores MFI data in arrays for KNN processing, enabling historical comparison and pattern recognition.
KNN Processing: Computes the machine learning average of MFI values using the KNN function, improving the robustness of signals.
MFI Average: Scales the MFI average to fit the heat map and calculates the smoothed SMA, providing a clear visual representation of trends.
Crossover Signals: Identifies bullish (MFI crossing above SMA) and bearish (MFI crossing below SMA) signals, which are key for making trading decisions.
Plots and Visuals:
MFI Average and SMA Lines: Plots the MFI average and smoothed SMA on the chart, allowing traders to easily visualize market trends and potential reversals.
Zones: Defines and plots overbought, neutral, and oversold zones for easy visualization. The recommended settings for these zones are:
Overbought Zone: Level set to approximately 24.6, indicating a potential market top.
Neutral Zone: Level set to 14, representing a balanced market condition.
Oversold Zone: Level set to 5.4, signaling a potential market bottom.
Crossover Marks: Plots circles on the chart to indicate bullish and bearish crossover signals, making it easier to spot entry and exit points.
Visual Alerts:
Bullish and Bearish Alerts: one can see overbought and oversold conditions and up alert conditions for bullish and bearish MFI crossover signals, enabling traders to have access to visual cues when these events are on trajectory to occur and, if they occur, act promptly with the visual representation of its zones.
Why It's Helpful:
The "Money Flow Index Crossover Indicator" provides traders with a sophisticated tool to identify potential buy and sell conditions based on the combined information of the MFI and its smoothed moving average. The KNN machine learning techniques enhance the accuracy of this indicator's clear visual representation of overbought, neutral, and oversold zones. This combination of data represented on the chart helps traders make informed decisions about market conditions. This indicator is particularly useful for traders looking to refine their entry and exit points by leveraging advanced data analysis in respect to overbought and oversold conditions.
Disclaimer:
This indicator is intended to assist traders in making informed decisions based on technical analysis. However, it is not a guarantee of future performance and should be used in conjunction with other analysis techniques and risk management practices. Past performance is not indicative of future results, and traders should exercise caution and perform their own due diligence before making any trading decisions.
Chebyshev Filter Divergences [ChartPrime]The Chebyshev Filter Divergences Oscillator
The Chebyshev Filter indicator is a powerful tool designed to identify potential divergences between price and a filtered version of price based on the Chebyshev filter algorithm. It helps to spot mean reversion points by highlighting areas where price and the filtered price exhibit conflicting signals.
Chebyshev Filter Background:
The Chebyshev filter, named after the Russian mathematician Pafnuty Chebyshev , was invented in the mid-19th century. It's a type of filter used in signal processing and digital signal processing for smoothing or removing unwanted frequency components from a signal.
It provides a sharp cutoff between the passband and stopband of a filter while minimizing ripple in the passband or stopband.
Chebyshev filters are widely used in various applications, including audio and image processing, telecommunications, and financial analysis, due to their efficiency and effectiveness in filtering out noise and extracting relevant information from signals.
◆ Indicator Calculation:
The indicator first applies a Chebyshev filter to the price data, producing a filtered price series. It then normalizes this filtered price series to a range, where it can be used as oscillator with divergences.
◆ Visualization:
The filtered price series is plotted on the chart, highlighting areas where it deviates from its smoothed average.
Bullish and bearish divergences are marked on the chart with specific lines and colors, indicating potential shifts in market sentiment.
Signs of change in direction are also marked on the chart, providing additional insights into possible mean reversals of price.
◆ User Inputs:
Ripple (dB): Specifies the desired ripple factor in decibels for the Chebyshev filter.
Normalization Length: Sets the length of the normalization period used in the Chebyshev filter.
Pivots to Right and Left: Determines the number of pivot points to the right and left of the current point to consider when detecting divergences.
Max and Min of Lookback Range: Specifies the maximum and minimum lookback range for identifying divergences.
Show Divergences: Enables or disables the display of bullish and bearish divergences.
Visual Settings: Allows customization of colors for visual clarity.
In conclusion, the Chebyshev Filter Divergences indicator, with its ability to identify potential mean reversion points through divergences between price and a filtered version of price, offers traders a valuable tool for decision-making in the financial markets. By highlighting areas of divergence, traders can potentially capitalize on market inefficiencies and make more informed trading decisions.
S&P Short-Range Oscillator**SHOULD BE USED ON THE S&P 500 ONLY**
The S&P Short-Range Oscillator (SRO), inspired by the principles of Jim Cramer's oscillator, is a technical analysis tool designed to help traders identify potential buy and sell signals in the stock market, specifically for the S&P 500 index. The SRO combines several market indicators to provide a normalized measure of market sentiment, assisting traders in making informed decisions.
The SRO utilizes two simple moving averages (SMAs) of different lengths: a 5-day SMA and a 10-day SMA. It also incorporates the daily price change and market breadth (the net change of closing prices). The 5-day and 10-day SMAs are calculated based on the closing prices. The daily price change is determined by subtracting the opening price from the closing price. Market breadth is calculated as the difference between the current closing price and the previous closing price.
The raw value of the oscillator, referred to as SRO Raw, is the sum of the daily price change, the 5-day SMA, the 10-day SMA, and the market breadth. This raw value is then normalized using its mean and standard deviation over a 20-day period, ensuring that the oscillator is centered and maintains a consistent scale. Finally, the normalized value is scaled to fit within the range of -15 to 15.
When interpreting the SRO, a value below -5 indicates that the market is potentially oversold, suggesting it might be a good time to start buying stocks as the market could be poised for a rebound. Conversely, a value above 5 suggests that the market is potentially overbought. In this situation, it may be prudent to hold on to existing positions or consider selling if you have substantial gains.
The SRO is visually represented as a blue line on a chart, making it easy to track its movements. Red and green horizontal lines mark the overbought (5) and oversold (-5) levels, respectively. Additionally, the background color changes to light red when the oscillator is overbought and light green when it is oversold, providing a clear visual cue.
By incorporating the S&P Short-Range Oscillator into your trading strategy, you can gain valuable insights into market conditions and make more informed decisions about when to buy, sell, or hold your stocks. However, always consider other market factors and perform your own analysis before making any trading decisions.
The S&P Short-Range Oscillator is a powerful tool for traders looking to gain insights into market sentiment. It provides clear buy and sell signals through its combination of multiple indicators and normalization process. However, traders should be aware of its lagging nature and potential complexity, and use it in conjunction with other analysis methods for the best results.
Disclaimer
The S&P Short-Range Oscillator is for informational purposes only and should not be considered financial advice. Trading involves risk, and you should conduct your own research or consult a financial advisor before making investment decisions. The author is not responsible for any losses incurred from using this indicator. Use at your own risk.
Momentum & Squeeze Oscillator [UAlgo]The Momentum & Squeeze Oscillator is a technical analysis tool designed to help traders identify shifts in market momentum and potential squeeze conditions. This oscillator combines multiple timeframes and periods to provide a detailed view of market dynamics. It enhances the decision-making process for both short-term and long-term traders by visualizing momentum with customizable colors and alerts.
🔶 Key Features
Custom Timeframe Selection: Allows users to select a custom timeframe for oscillator calculations, providing flexibility in analyzing different market periods.
Recalculation Option: Enables or disables the recalculation of the indicator, offering more control over real-time data processing.
Squeeze Background Visualization: Highlights potential squeeze conditions with a background color, helping traders quickly spot consolidation periods.
Adjustable Squeeze Sensitivity: Users can modify the sensitivity of the squeeze detection, tailoring the indicator to their specific trading style and market conditions.
Bar Coloring Condition: Option to color the price bars based on momentum conditions, enhancing the visual representation of market trends.
Threshold Bands: Option to fill threshold bands for a clearer visualization of overbought and oversold levels.
Reference Lines: Display reference lines for overbought, oversold, and mid-levels, aiding in quick assessment of momentum extremes.
Multiple Output Modes: Offers different output visualization modes, including:
ALL: Displays all calculated momentum values (fast, medium, slow).
AVG: Shows the average momentum, providing a consolidated view.
STD: Displays the standard deviation of momentum, useful for understanding volatility.
Alerts: Configurable alerts for key momentum events such as crossovers and squeeze conditions, keeping traders informed of important market changes.
🔶 Usage
The Momentum & Squeeze Oscillator can be used for various trading purposes:
Trend Identification: Use the oscillator to determine the direction and strength of market trends. By analyzing the average, fast, medium, and slow momentum lines, traders can gain insights into short-term and long-term market movements.
Squeeze Detection: The indicator highlights periods of low volatility (squeeze conditions) which often precede significant price movements. Traders can use this information to anticipate and prepare for potential breakouts.
Overbought/Oversold Conditions: The oscillator helps identify overbought and oversold conditions, indicating potential reversal points. This is particularly useful for timing entry and exit points in the market.
Momentum Shifts: By monitoring the crossover of momentum lines with key levels (e.g., the 50 level), traders can spot shifts in market momentum, allowing them to adjust their positions accordingly.
🔶 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.
Normalized Hull Moving Average Oscillator w/ ConfigurationsThis indicator uniquely uses normalization techniques applied to the Hull Moving Average (HMA) and allows the user to choose between a number of different types of normalization, each with their own advantages. This indicator is one in a series of experiments I've been working on in looking at different methods of transforming data. In particular, this is a more usable example of the power of data transformation, as it takes the Hull Moving Average of Alan Hull and turns it into a powerful oscillating indicator.
The indicator offers multiple types of normalization, each with its own set of benefits and drawbacks. My personal favorites are the Mean Normalization , which turns the data series into one centered around 0, and the Quantile Transformation , which converts the data into a data set that is normally distributed.
I've also included the option of showing the mean, median, and mode of the data over the period specified by the length of normalization. Using this will allow you to gather additional insights into how these transformations affect the distribution of the data series.
Types of Normalization:
1. Z-Score
Overview: Standardizes the data by subtracting the mean and dividing by the standard deviation.
Benefits: Centers the data around 0 with a standard deviation of 1, reducing the impact of outliers.
Disadvantages: Works best on data that is normally distributed
Notes: Best used with a mid-longer length of transformation.
2. Min-Max
Overview: Scales the data to fit within a specified range, typically 0 to 1.
Benefits: Simple and fast to compute, preserves the relationships among data points.
Disadvantages: Sensitive to outliers, which can skew the normalization.
Notes: Best used with mid-longer length of transformation.
3. Mean Normalization
Overview: Subtracts the mean and divides by the range (max - min).
Benefits: Centers data around 0, making it easier to compare different datasets.
Disadvantages: Can be affected by outliers, which influence the range.
Notes: Best used with a mid-longer length of transformation.
4. Max Abs Scaler
Overview: Scales each feature by its maximum absolute value.
Benefits: Retains sparsity and is robust to large outliers.
Disadvantages: Only shifts data to the range , which might not always be desirable.
Notes: Best used with a mid-longer length of transformation.
5. Robust Scaler
Overview: Uses the median and the interquartile range for scaling.
Benefits: Robust to outliers, does not shift data as much as other methods.
Disadvantages: May not perform well with small datasets.
Notes: Best used with a longer length of transformation.
6. Feature Scaling to Unit Norm
Overview: Scales data such that the norm (magnitude) of each feature is 1.
Benefits: Useful for models that rely on the magnitude of feature vectors.
Disadvantages: Sensitive to outliers, which can disproportionately affect the norm. Not normally used in this context, though it provides some interesting transformations.
Notes: Best used with a shorter length of transformation.
7. Logistic Function
Overview: Applies the logistic function to squash data into the range .
Benefits: Smoothly compresses extreme values, handling skewed distributions well.
Disadvantages: May not preserve the relative distances between data points as effectively.
Notes: Best used with a shorter length of transformation. This feature is actually two layered, we first put it through the mean normalization to ensure that it's generally centered around 0.
8. Quantile Transformation
Overview: Maps data to a uniform or normal distribution using quantiles.
Benefits: Makes data follow a specified distribution, useful for non-linear scaling.
Disadvantages: Can distort relationships between features, computationally expensive.
Notes: Best used with a very long length of transformation.
Conclusion
This indicator is a powerful example into how normalization can alter and improve the usability of a data series. Each method offers unique insights and benefits, making this indicator a useful tool for any trader. Try it out, and don't hesitate to reach out if you notice any glaring flaws in the script, room for improvement, or if you just have questions.
CofG Oscillator w/ Added Normalizations/TransformationsThis indicator is a unique study in normalization/transformation techniques, which are applied to the CG (center of gravity) Oscillator, a popular oscillator made by John Ehlers.
The idea to transform the data from this oscillator originated from observing the original indicator, which exhibited numerous whips. Curious about the potential outcomes, I began experimenting with various normalization/transformation methods and discovered a plethora of interesting results.
The indicator offers 10 different types of normalization/transformation, each with its own set of benefits and drawbacks. My personal favorites are the Quantile Transformation , which converts the dataset into one that is mostly normally distributed, and the Z-Score , which I have found tends to provide better signaling than the original indicator.
I've also included the option of showing the mean, median, and mode of the data over the period specified by the transformation period. Using this will allow you to gather additional insights into how these transformations effect the distribution of the data series.
I've also included some notes on what each transformation does, how it is useful, where it fails, and what I've found to be the best inputs for it (though I'd encourage you to play around with it yourself).
Types of Normalization/Transformation:
1. Z-Score
Overview: Standardizes the data by subtracting the mean and dividing by the standard deviation.
Benefits: Centers the data around 0 with a standard deviation of 1, reducing the impact of outliers.
Disadvantages: Works best on data that is normally distributed
Notes: Best used with a mid-longer transformation period.
2. Min-Max
Overview: Scales the data to fit within a specified range, typically 0 to 1.
Benefits: Simple and fast to compute, preserves the relationships among data points.
Disadvantages: Sensitive to outliers, which can skew the normalization.
Notes: Best used with mid-longer transformation period.
3. Decimal Scaling
Overview: Normalizes data by moving the decimal point of values.
Benefits: Simple and straightforward, useful for data with varying scales.
Disadvantages: Not commonly used, less intuitive, less advantageous.
Notes: Best used with a mid-longer transformation period.
4. Mean Normalization
Overview: Subtracts the mean and divides by the range (max - min).
Benefits: Centers data around 0, making it easier to compare different datasets.
Disadvantages: Can be affected by outliers, which influence the range.
Notes: Best used with a mid-longer transformation period.
5. Log Transformation
Overview: Applies the logarithm function to compress the data range.
Benefits: Reduces skewness, making the data more normally distributed.
Disadvantages: Only applicable to positive data, breaks on zero and negative values.
Notes: Works with varied transformation period.
6. Max Abs Scaler
Overview: Scales each feature by its maximum absolute value.
Benefits: Retains sparsity and is robust to large outliers.
Disadvantages: Only shifts data to the range , which might not always be desirable.
Notes: Best used with a mid-longer transformation period.
7. Robust Scaler
Overview: Uses the median and the interquartile range for scaling.
Benefits: Robust to outliers, does not shift data as much as other methods.
Disadvantages: May not perform well with small datasets.
Notes: Best used with a longer transformation period.
8. Feature Scaling to Unit Norm
Overview: Scales data such that the norm (magnitude) of each feature is 1.
Benefits: Useful for models that rely on the magnitude of feature vectors.
Disadvantages: Sensitive to outliers, which can disproportionately affect the norm. Not normally used in this context, though it provides some interesting transformations.
Notes: Best used with a shorter transformation period.
9. Logistic Function
Overview: Applies the logistic function to squash data into the range .
Benefits: Smoothly compresses extreme values, handling skewed distributions well.
Disadvantages: May not preserve the relative distances between data points as effectively.
Notes: Best used with a shorter transformation period. This feature is actually two layered, we first put it through the mean normalization to ensure that it's generally centered around 0.
10. Quantile Transformation
Overview: Maps data to a uniform or normal distribution using quantiles.
Benefits: Makes data follow a specified distribution, useful for non-linear scaling.
Disadvantages: Can distort relationships between features, computationally expensive.
Notes: Best used with a very long transformation period.
Conclusion
Feel free to explore these normalization/transformation techniques to see how they impact the performance of the CG Oscillator. Each method offers unique insights and benefits, making this study a valuable tool for traders, especially those with a passion for data analysis.