Multi-Regression StrategyIntroducing the "Multi-Regression Strategy" (MRS) , an advanced technical analysis tool designed to provide flexible and robust market analysis across various financial instruments.
This strategy offers users the ability to select from multiple regression techniques and risk management measures, allowing for customized analysis tailored to specific market conditions and trading styles.
Core Components:
Regression Techniques:
Users can choose one of three regression methods:
1 - Linear Regression: Provides a straightforward trend line, suitable for steady markets.
2 - Ridge Regression: Offers a more stable trend estimation in volatile markets by introducing a regularization parameter (lambda).
3 - LOESS (Locally Estimated Scatterplot Smoothing): Adapts to non-linear trends, useful for complex market behaviors.
Each regression method calculates a trend line that serves as the basis for trading decisions.
Risk Management Measures:
The strategy includes nine different volatility and trend strength measures. Users select one to define the trading bands:
1 - ATR (Average True Range)
2 - Standard Deviation
3 - Bollinger Bands Width
4 - Keltner Channel Width
5 - Chaikin Volatility
6 - Historical Volatility
7 - Ulcer Index
8 - ATRP (ATR Percentage)
9 - KAMA Efficiency Ratio
The chosen measure determines the width of the bands around the regression line, adapting to market volatility.
How It Works:
Regression Calculation:
The selected regression method (Linear, Ridge, or LOESS) calculates the main trend line.
For Ridge Regression, users can adjust the lambda parameter for regularization.
LOESS allows customization of the point span, adaptiveness, and exponent for local weighting.
Risk Band Calculation:
The chosen risk measure is calculated and normalized.
A user-defined risk multiplier is applied to adjust the sensitivity.
Upper and lower bounds are created around the regression line based on this risk measure.
Trading Signals:
Long entries are triggered when the price crosses above the regression line.
Short entries occur when the price crosses below the regression line.
Optional stop-loss and take-profit mechanisms use the calculated risk bands.
Customization and Flexibility:
Users can switch between regression methods to adapt to different market trends (linear, regularized, or non-linear).
The choice of risk measure allows adaptation to various market volatility conditions.
Adjustable parameters (e.g., regression length, risk multiplier) enable fine-tuning of the strategy.
Unique Aspects:
Comprehensive Regression Options:
Unlike many indicators that rely on a single regression method, MRS offers three distinct techniques, each suitable for different market conditions.
Diverse Risk Measures: The strategy incorporates a wide range of volatility and trend strength measures, going beyond traditional indicators to provide a more nuanced view of market dynamics.
Unified Framework:
By combining advanced regression techniques with various risk measures, MRS offers a cohesive approach to trend identification and risk management.
Adaptability:
The strategy can be easily adjusted to suit different trading styles, timeframes, and market conditions through its various input options.
How to Use:
Select a regression method based on your analysis of the current market trend (linear, need for regularization, or non-linear).
Choose a risk measure that aligns with your trading style and the market's current volatility characteristics.
Adjust the length parameter to match your preferred timeframe for analysis.
Fine-tune the risk multiplier to set the desired sensitivity of the trading bands.
Optionally enable stop-loss and take-profit mechanisms using the calculated risk bands.
Monitor the regression line for potential trend changes and the risk bands for entry/exit signals.
By offering this level of customization within a unified framework, the Multi-Regression Strategy provides traders with a powerful tool for market analysis and trading decision support. It combines the robustness of regression analysis with the adaptability of various risk measures, allowing for a more comprehensive and flexible approach to technical trading.
Regressions
Double Top, Double Bottom & Head and Shoulders Patterns [ST]Double Top, Double Bottom & Head and Shoulders Patterns
Description in English:
This indicator identifies double top, double bottom, head and shoulders, and inverse head and shoulders patterns on a 4-hour timeframe. It marks the pivot points with circles and outlines the structures with lines, providing clear visual signals of these important reversal patterns.
The colors are customizable for each pattern type.
Detailed Explanation:
Configuration:
Pivot Length: This input defines the period over which pivot points are calculated. The default value is 10.
Circle Color: This input sets the color of the circles that mark the identified double top and double bottom patterns. The default color is blue.
Line Color: This input sets the color of the lines that circle the identified structures of double top and double bottom patterns. The default color is red.
Head and Shoulders Color: This input sets the color of the circles and lines that mark the head and shoulders patterns. The default color is orange.
Inverse Head and Shoulders Color: This input sets the color of the circles and lines that mark the inverse head and shoulders patterns. The default color is purple.
Pattern Identification:
Pivot High and Low: The script uses the pivothigh and pivotlow functions to identify local maxima and minima, essential for detecting the patterns.
Double Top: Identified when there are two pivot highs within the pivot length, and the second high is equal to the first. This pattern typically indicates a potential reversal from an uptrend to a downtrend.
Double Bottom: Identified when there are two pivot lows within the pivot length, and the second low is equal to the first. This pattern typically indicates a potential reversal from a downtrend to an uptrend.
Head and Shoulders: Identified when there is a higher pivot high (head) between two lower pivot highs (shoulders), indicating a potential reversal from an uptrend to a downtrend.
Inverse Head and Shoulders: Identified when there is a lower pivot low (head) between two higher pivot lows (shoulders), indicating a potential reversal from a downtrend to an uptrend.
Drawing Circles and Lines:
Double Top: Marked with blue circles and red lines.
Double Bottom: Marked with blue circles and red lines.
Head and Shoulders: Marked with orange circles and lines.
Inverse Head and Shoulders: Marked with purple circles and lines.
Indicator Benefits:
Pattern Identification: Helps traders identify key reversal patterns (double top, double bottom, head and shoulders, and inverse head and shoulders) on the 4-hour timeframe.
Visual Cues: Provides clear visual signals for these patterns, aiding in making informed trading decisions.
Customizable Parameters: Allows traders to adjust the pivot length, circle color, line color, head and shoulders color, and inverse head and shoulders color to suit different trading strategies and market conditions.
Justification of Component Combination:
Combining pivot point identification with pattern recognition provides a robust method for detecting significant reversal patterns. The visual cues enhance the trader's ability to quickly spot these patterns on the chart.
How Components Work Together:
The script first identifies pivot points based on the specified pivot length.
It then checks for the presence of double top, double bottom, head and shoulders, and inverse head and shoulders patterns using these pivot points.
When a pattern is identified, it is marked with a circle on the chart, and lines are drawn around the structure to provide a clear visual indication of the pattern's presence.
Título: Padrões de Morro Duplo, Fundo Duplo e Ombro-Cabeça-Ombro
Descrição em Português:
Este indicador identifica padrões de morro duplo, fundo duplo, ombro-cabeça-ombro e ombro-cabeça-ombro invertido no gráfico de 4 horas.
Ele marca os pontos de pivô com círculos e contorna as estruturas com linhas, fornecendo sinais visuais claros desses importantes padrões de reversão. As cores são personalizáveis para cada tipo de padrão.
Explicação Detalhada:
Configuração:
Comprimento do Pivô: Este input define o período sobre o qual os pontos de pivô são calculados. O valor padrão é 10.
Cor do Círculo: Este input define a cor dos círculos que marcam os padrões identificados de morro duplo e fundo duplo. A cor padrão é azul.
Cor da Linha: Este input define a cor das linhas que contornam as estruturas identificadas de morro duplo e fundo duplo. A cor padrão é vermelha.
Cor de Ombro-Cabeça-Ombro: Este input define a cor dos círculos e linhas que marcam os padrões de ombro-cabeça-ombro. A cor padrão é laranja.
Cor de Ombro-Cabeça-Ombro Invertido: Este input define a cor dos círculos e linhas que marcam os padrões de ombro-cabeça-ombro invertido. A cor padrão é lilás.
Identificação de Padrões:
Pivô Alto e Baixo: O script usa as funções pivothigh e pivotlow para identificar máximas e mínimas locais, essenciais para detectar os padrões.
Morro Duplo: Identificado quando há duas máximas de pivô dentro do comprimento do pivô, e a segunda máxima é igual à primeira. Este padrão geralmente indica uma reversão potencial de uma tendência de alta para uma tendência de baixa.
Fundo Duplo: Identificado quando há duas mínimas de pivô dentro do comprimento do pivô, e a segunda mínima é igual à primeira. Este padrão geralmente indica uma reversão potencial de uma tendência de baixa para uma tendência de alta.
Ombro-Cabeça-Ombro: Identificado quando há uma máxima de pivô mais alta (cabeça) entre duas máximas de pivô mais baixas (ombros), indicando uma reversão potencial de uma tendência de alta para uma tendência de baixa.
Ombro-Cabeça-Ombro Invertido: Identificado quando há uma mínima de pivô mais baixa (cabeça) entre duas mínimas de pivô mais altas (ombros), indicando uma reversão potencial de uma tendência de baixa para uma tendência de alta.
Desenho de Círculos e Linhas:
Morro Duplo: Marcado com círculos azuis e linhas vermelhas.
Fundo Duplo: Marcado com círculos azuis e linhas vermelhas.
Ombro-Cabeça-Ombro: Marcado com círculos e linhas laranjas.
Ombro-Cabeça-Ombro Invertido: Marcado com círculos e linhas lilás.
Benefícios do Indicador:
Identificação de Padrões: Ajuda os traders a identificar padrões-chave de reversão (morro duplo, fundo duplo, ombro-cabeça-ombro e ombro-cabeça-ombro invertido) no gráfico de 4 horas.
Sinais Visuais: Fornece sinais visuais claros para esses padrões, auxiliando na tomada de decisões informadas.
Parâmetros Personalizáveis: Permite que os traders ajustem o comprimento do pivô, a cor do círculo, a cor da linha, a cor de ombro-cabeça-ombro e a cor de ombro-cabeça-ombro invertido para se adequar a diferentes estratégias de negociação e condições de mercado.
Justificação da Combinação de Componentes:
Combinar a identificação de pontos de pivô com o reconhecimento de padrões fornece um método robusto para detectar padrões de reversão significativos. Os sinais visuais melhoram a capacidade do trader de identificar rapidamente esses padrões no gráfico.
Como os Componentes Funcionam Juntos:
O script primeiro identifica os pontos de pivô com base no comprimento do pivô especificado.
Em seguida, verifica a presença de padrões de morro duplo, fundo duplo, ombro-cabeça-ombro e ombro-cabeça-ombro invertido usando esses pontos de pivô.
Quando um padrão é identificado, ele é marcado com um círculo no gráfico, e linhas são desenhadas ao redor da estrutura para fornecer uma indicação visual clara da presença do padrão.
Moving avg with regMoving avg with reg
A Moving avg with reg is a series of moving averages plotted on the same chart, each with different time periods. This visual tool helps traders identify the underlying trend and potential reversal points in the market. By observing the interaction and spacing between the moving averages, traders can gauge the market's strength and momentum.
Key Points:
Trend Identification: Multiple moving averages help confirm the direction of the trend. If the shorter-period moving averages are above the longer-period ones, it indicates an uptrend, and vice versa.
Reversal Signals: When shorter-period moving averages cross longer-period ones, it may signal a potential trend reversal.
Market Strength: The spacing between the moving averages indicates the strength of the trend. Wider spacing suggests a strong trend, while narrow spacing may indicate a weakening trend.
Regression Line
A Regression Line, specifically the Linear Regression Indicator (LRI), is a statistical tool used to determine the direction and strength of a trend by fitting a straight line to the price data over a specified period. This line minimizes the distance between itself and the actual price points, providing a clear visual representation of the trend.
Key Points:
Trend Direction: The slope of the regression line indicates the direction of the trend. A positive slope suggests an uptrend, while a negative slope indicates a downtrend.
Price Deviations: The distance between the actual price and the regression line can highlight overbought or oversold conditions. Large deviations may suggest a potential correction.
Predictive Power: By extending the regression line, traders can make predictions about future price movements based on the current trend.
Super IndicatorOverview of the Combined Indicator
This combined indicator leverages three major technical analysis tools:
Bollinger Bands
Linear Regression Channels
Scalping Strategy Indicators (RSI, MACD, SMA)
Each of these tools provides unique insights into market conditions, and their integration offers a comprehensive view of price movements, trends, and potential trading signals.
1. Bollinger Bands
Purpose:
Bollinger Bands are used to measure market volatility and identify overbought or oversold conditions.
Components:
Basis (Middle Band): Typically a 20-period Simple Moving Average (SMA).
Upper Band: Basis + (2 * Standard Deviation).
Lower Band: Basis - (2 * Standard Deviation).
Why They Complement:
Bollinger Bands expand and contract based on market volatility. When the bands are narrow, it indicates low volatility and potential for a significant move. Wide bands indicate high volatility. This helps traders gauge the strength of market moves and potential reversals.
2. Linear Regression Channels
Purpose:
Linear Regression Channels identify the overall trend direction and measure deviation from the mean price over a specific period.
Components:
Middle Line (Linear Regression Line): The line of best fit through the price data over a specified period.
Upper and Lower Lines: Channels created by adding/subtracting a multiple of the standard deviation or another deviation measure from the regression line.
Why They Complement:
Linear Regression Channels provide a clear visual representation of the trend direction and the range within which prices typically fluctuate. This can help traders identify trend continuations and reversals, making it easier to spot entry and exit points.
3. Scalping Strategy Indicators
Purpose:
The RSI, MACD, and SMA are used to generate short-term buy and sell signals, which are essential for scalping strategies aimed at capturing quick profits from small price movements.
Components:
RSI (Relative Strength Index): Measures the speed and change of price movements, typically over 14 periods. It helps identify overbought and oversold conditions.
MACD (Moving Average Convergence Divergence): Consists of the MACD line, Signal line, and histogram. It helps identify changes in the strength, direction, momentum, and duration of a trend.
SMA (Simple Moving Average): The average price over a specified period, used to smooth out price data and identify trends.
Why They Complement:
These indicators provide short-term signals that can confirm or refute the signals given by Bollinger Bands and Linear Regression Channels. For example, a buy signal might be more reliable if the price is near the lower Bollinger Band and the MACD crosses above its signal line.
How They Work Together
Scenario 1: Confirming Trend Continuations
Bollinger Bands: Price staying near the upper band suggests a strong uptrend.
Linear Regression Channels: Price staying above the middle line confirms the uptrend.
5-Minute Scalping Strategy: RSI not in overbought territory, and MACD showing bullish momentum confirms continuation.
Scenario 2: Identifying Reversals
Bollinger Bands: Price touching or moving outside the lower band suggests oversold conditions.
Linear Regression Channels: Price at the lower channel line indicates potential support.
5-Minute Scalping Strategy: RSI in oversold territory, and MACD showing a bullish crossover indicates a reversal.
Scenario 3: Volatility Breakouts
Bollinger Bands: Bands contracting indicates low volatility and potential breakout.
Linear Regression Channels: Price moving away from the middle line signals potential breakout direction.
Scalping Strategy: MACD and RSI confirming the breakout direction for entry.
Input Parameters:
Define settings for Bollinger Bands, Linear Regression Channels, and the scalping strategy.
Allow users to customize lengths, multipliers, and colors.
Bollinger Bands Calculation:
Calculate the basis (SMA) and standard deviation.
Derive the upper and lower bands from the basis and standard deviation.
Linear Regression Channel Calculation:
Compute the slope, average, and intercept of the linear regression line.
Calculate deviations to plot upper and lower channel lines.
5-Minute Scalping Strategy:
Calculate RSI, MACD, and SMA for short-term trend analysis.
Define buy and sell conditions based on these indicators.
Plotting and Alerts:
Plot Bollinger Bands and Linear Regression Channels on the chart.
Plot buy and sell signals with shapes.
Set alerts for key conditions like exiting the regression channel bounds and trend switches.
Conclusion
By combining Bollinger Bands, Linear Regression Channels, and a 5-minute scalping strategy, this indicator offers a robust tool for traders. Bollinger Bands provide volatility insights, Linear Regression Channels highlight trend direction and potential reversals, and the scalping strategy offers precise entry and exit points. Together, these tools can enhance a trader's ability to make informed decisions in various market conditions.
Moving Average Cross Probability [AlgoAlpha]Moving Average Cross Probability 📈✨
The Moving Average Cross Probability by AlgoAlpha calculates the probability of a cross-over or cross-under between the fast and slow values of a user defined Moving Average type before it happens, allowing users to benefit by front running the market.
✨ Key Features:
📊 Probability Histogram: Displays the Probability of MA cross in the form of a histogram.
🔄 Data Table: Displays forecast information for quick analysis.
🎨 Customizable MAs: Choose from various moving averages and customize their length.
🚀 How to Use:
🛠 Add Indicator: Add the indicator to favorites, and customize the settings to suite your trading style.
📊 Analyze Market: Watch the indicator to look for trend shifts early or for trend continuations.
🔔 Set Alerts: Get notified of bullish/bearish points.
✨ How It Works:
The Moving Average Cross Probability Indicator by AlgoAlpha determines the probability by looking at a probable range of values that the price can take in the next bar and finds out what percentage of those possibilities result in the user defined moving average crossing each other. This is done by first using the HMA to predict what the next price value will be, a standard deviation based range is then calculated. The range is divided by the user defined resolution and is split into multiple levels, each of these levels represent a possible value for price in the next bar. These possible predicted values are used to calculate the possible MA values for both the fast and slow MAs that may occur in the next bar and are then compared to see how many of those possible MA results end up crossing each other.
Stay ahead of the market with the Moving Average Cross Probability Indicator AlgoAlpha! 📈💡
Cosine Kernel Regressions [QuantraSystems]Cosine Kernel Regressions
Introduction
The Cosine Kernel Regressions indicator (CKR) uses mathematical concepts to offer a unique approach to market analysis. This indicator employs Kernel Regressions using bespoke tunable Cosine functions in order to smoothly interpret a variety of market data, providing traders with incredibly clean insights into market trends.
The CKR is particularly useful for traders looking to understand underlying trends without the 'noise' typical in raw price movements. It can serve as a standalone trend analysis tool or be combined with other indicators for more robust trading strategies.
Legend
Fast Trend Signal Line - This is the foreground oscillator, it is colored upon the earliest confirmation of a change in trend direction.
Slow Trend Signal Line - This oscillator is calculated in a similar manner. However, it utilizes a lower frequency within the cosine tuning function, allowing it to capture longer and broader trends in one signal. This allows for tactical trading; the user can trade smaller moves without losing sight of the broader trend.
Case Study
In this case study, the CKR was used alongside the Triple Confirmation Kernel Regression Oscillator (KRO)
Initially, the KRO indicated an oversold condition, which could be interpreted as a signal to enter a long position in anticipation of a price rebound. However, the CKR’s fast trend signal line had not yet confirmed a positive trend direction - suggesting that entering a trade too early and without confirmation could be a mistake.
Waiting for a confirmed positive trend from the CKR proved beneficial for this trade. A few candles after the oversold signal, the CKR's fast trend signal line shifted upwards, indicating a strong upward momentum. This was the optimal entry point suggested by the CKR, occurring after the confirmation of the trend change, which significantly reduced the likelihood of entering during a false recovery or continuation of the downtrend.
This is one of the many uses of the CKR - by timing entries using the fast signal line , traders could avoid unnecessary losses by preventing premature entries.
Methodology
The methodology behind CKR is a multi-layered approach and utilizes many ‘base’ indicators.
Relative Strength Index
Stochastic Oscillator
Bollinger Band Percent
Chande Momentum Oscillator
Commodity Channel Index
Fisher Transform
Volume Zone Oscillator
The calculated output from each indicator is standardized and scaled before being averaged. This prevents any single indicator from overpowering the resulting signal.
// ╔════════════════════════════════╗ //
// ║ Scaling/Range Adjustment ║ //
// ╚════════════════════════════════╝ //
RSI_ReScale (_res ) => ( _res - 50 ) * 2.8
STOCH_ReScale (_stoch ) => ( _stoch - 50 ) * 2
BBPCT_ReScale (_bbpct ) => ( _bbpct - 0.5 ) * 120
CMO_ReScale (_chandeMO ) => ( _chandeMO * 1.15 )
CCI_ReScale (_cci ) => ( _cci / 2 )
FISH_ReScale (_fish1 ) => ( _fish1 * 30 )
VZO_ReScale (_VP, _TV ) => (_VP / _TV) * 110
These outputs are then fed into a customized cosine kernel regression function, which smooths the data, and combines all inputs into a single coherent output.
// ╔════════════════════════════════╗ //
// ║ COSINE KERNEL REGRESSIONS ║ //
// ╚════════════════════════════════╝ //
// Define a function to compute the cosine of an input scaled by a frequency tuner
cosine(x, z) =>
// Where x = source input
// y = function output
// z = frequency tuner
var y = 0.
y := math.cos(z * x)
Y
// Define a kernel that utilizes the cosine function
kernel(x, z) =>
var y = 0.
y := cosine(x, z)
math.abs(x) <= math.pi/(2 * z) ? math.abs(y) : 0. // cos(zx) = 0
// The above restricts the wave to positive values // when x = π / 2z
The tuning of the regression is adjustable, allowing users to fine-tune the sensitivity and responsiveness of the indicator to match specific trading strategies or market conditions. This robust methodology ensures that CKR provides a reliable and adaptable tool for market analysis.
Linear Regression InterceptLinear Regression Intercept (LRI) is a statistical method used to forecast future values based on past data. Financial markets frequently employ it to identify the underlying trend and determine when prices are overextended. Linear regression utilizes the least squares method to create a trendline by minimizing the distance between observed price data and the line. The LRI indicator calculates the intercept of this trendline for each data point, providing insights into price trends and potential trading opportunities.
Calculation and Interpretation of the LRI
The linear regression intercept is calculated using the following formula:
LRI = Y - (b * X)
Where Y represents the dependent variable (price), b is the slope of the regression line, and X is the independent variable (time). To determine the slope b, you can use the formula:
b = Σ / Σ(X - X_mean)^2
Once you have computed the LRI, it can be interpreted as the point at which the regression line intersects the Y-axis (price) when the independent variable (time) is zero. A positive LRI value indicates an upward trend, while a negative value suggests a downward trend. Traders can adjust the parameters of the LRI by modifying the period over which the linear regression is computed, which can impact the indicator’s sensitivity to recent price changes.
How to Use the LRI in Trading
To effectively use the LRI in trading, traders should consider the following:
Understanding the signals generated by the technical indicator: A rising LRI suggests an upward trend, whereas a falling LRI indicates a downward trend. Traders may use this information to help determine the market’s direction and identify reversals.
Combining the technical indicator with other indicators: The LRI can be used in conjunction with other technical indicators, such as moving averages, the Relative Strength Index (RSI), or traditional linear regression lines, to obtain a more comprehensive view of the market. In the case of traditional linear regression lines, the LRI helps traders identify the starting point of the trend, providing additional context to the overall trend direction.
Using the technical indicator for entry and exit signals: When the LRI crosses above or below a specific threshold, traders may consider it a potential entry or exit point. For example, if the LRI crosses above zero, it might signal a possible buying opportunity.
Support and Resistance Polynomial Regressions | Flux ChartsOverview
This script is a dynamic form of support and resistance. Support and resistance plots areas where price commonly reverses its direction or “pivots”. A resistance line for instance is typically found by locating a price point where multiple high pivots occur. A high pivot is where a price increases for a number of bars then decreases for a number of bars creating a local maximum. This script takes the high pivots points but rather than using a horizontal line a polynomial regressed line is used.
It is common to see consecutive higher highs or lower lows or a mixed pattern of both so a classical support or resistance line can be insufficient. This script lets users find a polynomial of best fit for high pivots and low pivots creating a resistance and support line respectively.
Here are the same two sets of high and low pivots the first using linear regressed support and resistance lines the second using quadratic.
Here are the predicted results:
The Quadratic regression gives a much more accurate prediction of future pivot areas and the increase in variance of the data.
Quick Start
Add the script to the chart. Then select a left point and right point on the chart. This will be the data the script uses to calculate a best fit resistance line. Then select another left and right point that will be for the support line.
Now you can confirm your basic settings like the type of regression: Linear Regression, Quadratic Regression, Cubic Regression or Custom Regression.
After confirming the lines will be plotted on the graph.
Custom Polynomial Regression Setting
Polynomials follow the form:
The degree of a polynomial is the highest exponent in the equation. For example the polynomial ax^2 + bx + c has a degree of 2.
Here are the default polynomial options and their equivalent custom polynomial entry:
This allows us to create regressions with a custom number of inflection points. An inflection point is a point where the graph changes from concave up to concave down or vice versa. The maximum number of inflection points a polynomial can have is the degree - 2. Having multiple inflection points in our regression allows for having a closer fit minimizing error.
It should be noted that having a closer fit is not inherently better; this can cause overfitting. Overfitting is when a model is too closely fit to the training data and not generalizable to the population data.
Kaspa Power LawSimple Power Law Indicator for Kaspa with addition of adjustable bands above and below the Power Law Price. Best used on Logarithmic view on Daily Time Frame.
Monte Carlo Shuffled Projection [LuxAlgo]The Monte Carlo Shuffled Projection tool randomly simulates future price points based on historical bar movements made within a user-selected window.
The tool shows potential paths price might take in the future, as well as highlighting potential support/resistance levels.
Note that simulations and their resulting elements are subject to slight changes over time.
🔶 USAGE
By randomly simulating bar movements, a range is developed of potential price action which could be utilized to locate future price development as well as potential support/resistance levels.
Performing a large number of simulations and taking the average at each step will converge toward the result highlighted by the "Average Line", and can point out where the price might develop assuming the trend and amount of volatility persist.
Current closing price + Sum of changes in the calculation window)
This constraint will cause the simulations to always display an endpoint consistent with the current lookback's slope.
While this may be helpful to some traders, this indicator includes an option to produce a less biased range as seen below:
🔶 DETAILS
The Monte Carlo Shuffled Projection tool creates simulations based on the most recent prices within a user-set window. Simulations are done as follows:
Collect each bar's price changes in the user-set window.
Randomize the order of each change in the window.
Project the cumulative sum of the shuffled changes from the current closing price.
Collect data on each point along the way.
This is the process for the Default calculation, for the 'Randomize Direction' calculation, when added onto the front for every other change, the value is inverted, creating the randomized endpoints for each simulation.
The script contains each simulation's data for that bar with a maximum of 1000 simulations.
To get a glimpse behind the scenes each simulation (up to 99) can be viewed using the 'Visualize Simulations' Options as seen below.
Because the script holds the full simulation data, the script can also do calculations on this data, such as calculating standard deviations.
In this script the Standard deviation lines are the average of all standard deviations across the vertical data groups, this provides a singular value that can be displayed a distance away from the simulation center line.
🔶 SETTINGS
Color and Toggle Options are Provided throughout.
Lookback: Sets the number of Bars to include in calculations.
Simulation Count: Sets the number of randomized simulations to calculate. (Max 1000)
Randomize Direction: See Details Above. Creates a more 'Normalized' Distribution
Visualize Simulations: See Details Above. Turns on Visualizations, and colors are randomly generated. Visualized max does not cap the calculated max. If 1000 simulations are used, the data will be from 1000 simulations, however only the last 99 simulations will be visualized.
Standard Deviation Multiplier: Sets the multiplier to use for the Standard Deviation distance away from the center line.
Volume-Supported Linear Regression Trend Modified StrategyHi everyone, this will be my first published script on Tradingview, maybe more to come.
For quite some time I have been looking for a script that performs no matter if price goes up or down or sideways. I believe this strategy comes pretty close to that. Although nowhere near the so called "buy&hold equity" of BTC, it has produced consistent profits even when price goes down.
It is a strategy which seems to work best on the 1H timeframe for cryptocurrencies.
Just by testing different settings for SL and TP you can customize it for each pair.
THE STRATEGY:
Basically, I used the Volume Supported Linear Regression Trend Model that LonesomeTheBlue has created and modified a few things such as entry and exit conditions. So all credits go to him!
LONG ENTRY: When there is a bullish cross of the short term trend (the histogram/columns), while the long term trend is above 0 and rising.
SHORT ENTRY: When there is a bearish cross (green to red) of the short-term trend (the histogram/columns), while the long term trend is beneath 0 and decreasing.
LONG EXIT: Bearish crossover of short-term trend while long term trend is below 0
SHORT EXIT: Bullish crossover of short-term trend while long term trend is above 0
Combining this with e.g. a SL of 2% and a TP of 20% (as used in my backtesting), combined with pyramiding and correct risk management, it gives pretty consistent results.
Be aware, this is only for educational purpose and in no means financial advise. Past results do not guarantee future results. This strategy can lose money!
Enjoy :)
PS: It works not only on BTC of course, works even better on some other major crypto pairs. I'll leave it to you to find out which ones ;)
Long-Term Trend DetectorThe Long-Term Trend Detector is a powerful tool designed to identify sustainable trends in price movements, offering significant advantages for traders and investors.
Key Benefits:
1. Projection Confidence: This indicator leverages Pearson's R, a statistical measure that indicates the strength of the linear relationship between price and trend projection. A higher Pearson's R value reflects a stronger correlation, providing increased confidence in the identified trend direction.
2. Adaptive Channel Detection: By calculating deviations and correlations over varying lengths, the indicator dynamically adapts to changing market conditions. This adaptive nature ensures robust trend detection across different time frames.
3. Visual Clarity: The indicator visually displays long-term trend channels on the chart, offering clear insights into potential price trajectories. This visualization aids in decision-making by highlighting periods of strong trend potential.
4. Flexibility and Customization: Users can customize parameters such as deviation multiplier, line styles, transparency levels, and display preferences. This flexibility allows traders to tailor the indicator to their specific trading strategies and preferences.
5. Historical Analysis: The indicator can analyze extensive historical data (up to 5000 bars back) to provide comprehensive trend insights. This historical perspective enables users to assess trends over extended periods, enhancing strategic decision-making.
In summary, the Long-Term Trend Detector empowers traders with accurate trend projections and confidence levels, facilitating informed trading decisions. Its adaptive nature and customizable features make it a valuable tool for identifying and capitalizing on long-term market trends.
TrippleMACDCryptocurrency Scalping Strategy for 1m Timeframe
Introduction:
Welcome to our cutting-edge cryptocurrency scalping strategy tailored specifically for the 1-minute timeframe. By combining three MACD indicators with different parameters and averaging them, along with applying RSI, we've developed a highly effective strategy for maximizing profits in the cryptocurrency market. This strategy is designed for automated trading through our bot, which executes trades using hooks. All trades are calculated for long positions only, ensuring optimal performance in a fast-paced market.
Key Components:
MACD (Moving Average Convergence Divergence):
We've utilized three MACD indicators with varying parameters to capture different aspects of market momentum.
Averaging these MACD indicators helps smooth out noise and provides a more reliable signal for trading decisions.
RSI (Relative Strength Index):
RSI serves as a complementary indicator, providing insights into the strength of bullish trends.
By incorporating RSI, we enhance the accuracy of our entry and exit points, ensuring timely execution of trades.
Strategy Overview:
Long Position Entries:
Initiate long positions when all three MACD indicators signal bullish momentum and the RSI confirms bullish strength.
This combination of indicators increases the probability of successful trades, allowing us to capitalize on uptrends effectively.
Utilizing Linear Regression:
Linear regression is employed to identify consolidation phases in the market.
Recognizing consolidation periods helps us avoid trading during choppy price action, ensuring optimal performance.
Suitability for Grid Trading Bots:
Our strategy is well-suited for grid trading bots due to frequent price fluctuations and opportunities for grid activation.
The strategy's design accounts for price breakthroughs, which are advantageous for grid trading strategies.
Benefits of the Strategy:
Consistent Performance Across Cryptocurrencies:
Through rigorous testing on various cryptocurrency futures contracts, our strategy has demonstrated favorable results across different coins.
Its adaptability makes it a versatile tool for traders seeking consistent profits in the cryptocurrency market.
Integration of Advanced Techniques:
By integrating multiple indicators and employing linear regression, our strategy leverages advanced techniques to enhance trading performance.
This strategic approach ensures a comprehensive analysis of market conditions, leading to well-informed trading decisions.
Conclusion:
Our cryptocurrency scalping strategy offers a sophisticated yet user-friendly approach to trading in the fast-paced environment of the 1-minute timeframe. With its emphasis on automation, accuracy, and adaptability, our strategy empowers traders to navigate the complexities of the cryptocurrency market with confidence. Whether you're a seasoned trader or a novice investor, our strategy provides a reliable framework for achieving consistent profits and maximizing returns on your investment.
Sector ETFs performance overviewThe indicator provides a nuanced view of sector performance through ETF analysis, focusing on long-term price trends and deviations from these trends to gauge relative strength or weakness. It utilizes a methodical approach to smooth out ETF price data and then applies a regression analysis to pinpoint the primary trend direction. By examining how far the current price deviates from this regression line, the indicator identifies potential overbought or oversold conditions within various sectors.
Core Analysis Techniques:
Logarithmic Transformation and Regression: This process transforms ETF closing prices on a logarithmic scale to better understand sector growth patterns and dynamics. A linear regression of these prices helps define the overarching trend, crucial for understanding market movements.
Volatility Bands for Market State Assessment: The indicator calculates standard deviation based on logarithmic prices to establish dynamic bands around the regression line. These bands are instrumental in identifying market states, highlighting when sectors may be overextended from their central trend.
Sector-Specific Analysis: By focusing on distinct sector ETFs, the tool enables targeted analysis across various market segments. This specificity allows for a granular look at sectors like technology, healthcare, and financials, providing insights tailored to each area.
Adaptability and Insight:
Customizable Parameters: The indicator offers users the ability to adjust key parameters such as regression length and smoothing factors. This customization ensures that the analysis can be tailored to individual preferences and market outlooks.
Trend Direction and Momentum: It assesses the ETF's price movement relative to historical data and the established volatility bands, helping to clarify the sector's trend strength and potential directional shifts.
Strategic Application:
Focusing on trend and volatility analysis rather than direct trading signals, the indicator aids in forming a strategic view of sector investments. It's particularly useful for:
Spotting macroeconomic trends through the lens of sector ETF performance.
Informing portfolio decisions with nuanced insights into sector momentum and market conditions.
Anticipating potential market shifts by evaluating how current prices align with historical volatility and trend patterns.
This tool stands out as a vital resource for analyzing sector-level market trends, offering detailed insights into the dynamics of economic sectors for comprehensive market analysis.
Sector ETF macro trendThe Sector ETF Macro Trend indicator is designed for technical analysis of broad economic trends through sector-specific exchange-traded funds (ETFs). It uses logarithmic price transformation, linear regression, and volatility analysis to examine sector trends and stability, providing a technical basis for analytical assessment.
Core Analysis Techniques
Logarithmic Transformation and Regression: Converts ETF closing prices logarithmically to reveal sector growth patterns and dynamics. Linear regression on these prices defines the main trend direction, essential for trend analysis.
Volatility Bands for Market State Assessment: Applies standard deviation on logarithmic prices to create dynamic bands around the trendline, identifying overbought or oversold sector conditions by marking deviations from the central trend.
Sector-Specific Analysis: Selection among different sector ETFs allows for precise examination of sectors like technology, healthcare, and financials, enabling focused insights into specific market segments.
Adaptability and Insight
Customizable Parameters: Offers flexibility in modifying regression length and smoothing factors to accommodate various analysis strategies and risk preferences.
Trend Direction and Momentum: Evaluates the ETF's trajectory against historical data and volatility bands to determine sector trend strength and direction, aiding in the prediction of market shifts.
Strategic Application
Without providing explicit trading signals, the indicator focuses on trend and volatility analysis for a strategic view on sector investments. It supports:
Identifying macroeconomic trends through ETF performance analysis.
Informing portfolio decisions with insights into sector momentum and stability.
Forecasting market movements by analyzing overbought or oversold conditions against the ETF price movement and volatility bands.
The Sector ETF Macro Trend indicator serves as a technical tool for analyzing sector-level market trends, offering detailed insights into the dynamics of economic sectors for thorough market analysis.
Custom Swing Index [AstroHub]Custom Swing Index - Unleashing Precision in Trend Analysis
🌟 Overview:
The Custom Swing Index is a meticulously crafted tool that empowers traders with advanced insights into market dynamics, specifically focusing on identifying potential trend reversals. Developed by AstroHub, this indicator stands out for its unique combination of price-related calculations, ratios, and averages, providing a comprehensive and nuanced view of market sentiment.
📈 Key Components:
Price Calculation:
- Price Change: Captures the difference between the current and previous closing prices.
- High and Low Points: Analyzes the high and low points of each bar for crucial price movement data.
Ratios and Averages:
- Upper-Lower Shadow Ratio: Measures the relationship between the upper and lower shadows.
- Open-Close Ratio: Evaluates the ratio of opening to closing prices.
- Sum Price Changes: Sums up price changes over a specified period.
Differences and Shadows:
- Open-Close Difference: Considers the difference between opening and closing prices.
- Upper and Lower Shadow Ratios: Examines the proportions of upper and lower shadows.
Bar Size Metrics:
- Average Bar Size: Determines the average size of each bar.
- High-Low Difference: Measures the difference between the high and low points.
Swing Indicator Calculation:
- The Custom Swing Index is the result of combining these components, creating a dynamic metric that reflects potential trend reversals.
🚥 How to Use:
Understanding the Indicator:
- Bullish signals may be indicated when the swing index surpasses a defined threshold.
- Bearish signals may be indicated when the swing index falls below the negative threshold.
Visual Interpretation:
- Color-coded bars enhance visual interpretation, turning green for bullish conditions and red for bearish conditions.
Entry Points:
- Look for entry points where circle markings are present, indicating potential opportunities.
Alerts:
- Integrated alerts keep traders informed of significant swings, ensuring timely decision-making.
[S] Rolling TrendlineThe Rolling Linear Regression Trendline is a sophisticated technical analysis tool designed to offer traders a dynamic view of market trends over a selectable period. This indicator employs linear regression to calculate and plot a trendline that best fits the closing prices within a specified window, either defined by a number of bars or a set period in days, independent of the chart's timeframe.
Key Features:
Dynamic Window Selection: Users can choose the calculation window based on a fixed number of bars or days, providing flexibility to adapt to different trading strategies and timeframes. For the 'days' option, the indicator calculates the equivalent number of bars based on the chart's timeframe, ensuring relevance across various market conditions and trading sessions.
Linear Regression Analysis: At its core, the indicator uses linear regression to identify the trend direction by calculating the slope and intercept of the trendline. This method offers a statistical approach to trend analysis, highlighting potential uptrends or downtrends based on the positioning and direction of the trendline.
Customizable Period: Traders can input their desired period (N), allowing for tailored analysis. Whether it's short-term movements or longer-term trends, the indicator can adjust to focus on specific time horizons, enhancing its utility across different trading styles and objectives.
Applications:
Trend Identification: By plotting a trendline that mathematically fits the closing prices over the chosen period, traders can quickly identify the prevailing market trend, aiding in bullish or bearish decision-making.
Support and Resistance: The trendline can also serve as a dynamic level of support or resistance, offering potential entry or exit points based on the price's interaction with the trendline.
Strategic Planning: With the ability to adjust the calculation window, traders can align the indicator with their trading strategy, whether focusing on intraday movements or broader swings.
Using this indicator with other parameters can widen you view of the market and help identifying trends
Least Median of Squares Regression | ymxbThe Least Median of Squares (LMedS) is a robust statistical method predominantly used in the context of regression analysis. This technique is designed to fit a model to a dataset in a way that is resistant to outliers. Developed as an alternative to more traditional methods like Ordinary Least Squares (OLS) regression, LMedS is distinguished by its focus on minimizing the median of the squares of the residuals rather than their mean. Residuals are the differences between observed and predicted values.
The key advantage of LMedS is its robustness against outliers. In contrast to methods that minimize the mean squared residuals, the median is less influenced by extreme values, making LMedS more reliable in datasets where outliers are present. This is particularly useful in linear regression, where it identifies the line that minimizes the median of the squared residuals, ensuring that the line is not overly influenced by anomalies.
STATISTICAL PROPERTIES
A critical feature of the LMedS method is its robustness, particularly its resilience to outliers. The method boasts a high breakdown point, which is a measure of an estimator's capacity to handle outliers. In the context of LMedS, this breakdown point is approximately 50%, indicating that it can tolerate corruption of up to half of the input data points without a significant degradation in accuracy. This robustness makes LMedS particularly valuable in real-world data analysis scenarios, where outliers are common and can severely skew the results of less robust methods.
Rousseeuw, Peter J.. “Least Median of Squares Regression.” Journal of the American Statistical Association 79 (1984): 871-880.
The LMedS estimator is also characterized by its equivariance under linear transformations of the response variable. This means that whether you transform the data first and then apply LMedS, or apply LMedS first and then transform the data, the end result remains consistent. However, it's important to note that LMedS is not equivariant under affine transformations of both the predictor and response variables.
ALGORITHM
The algorithm randomly selects pairs of points, calculates the slope (m) and intercept (b) of the line, and then evaluates the median squared deviation (mr2) from this line. The line minimizing this median squared deviation is considered the best fit.
DISCLAIMER
In the LMedS approach, a subset of the data is randomly selected to compute potential models (e.g., lines in linear regression). The method then evaluates these models based on the median of the squared residuals. Since the selection of data points is random, different runs may select different subsets, leading to variability in the computed models.
F.B_Vortex Indicator ProThe "F.B_Vortex Indicator Pro" is a technical analysis tool designed to identify trends in financial markets. It calculates two Vortex Indicators (VI) based on price movements, considering positive and negative price changes.
The smoothed VI+ line represents the smoothed negative trend, while the smoothed VI+ line represents the smoothed positive trend.
The crossing of the smoothed VI+ line above the smoothed VI+ line could indicate a potential bullish trend.
Conversely, the crossing of the smoothed VI+ line above the smoothed VI+ line suggests a possible bearish trend.
The "Smoothed VI-" line is also displayed.
When the Smoothed VI- line is above both the smoothed VI+ line and the smoothed VI+ line, it may signal a transition to a bearish main trend or indicate an expected one.
When the Smoothed VI- line is below both the smoothed VI+ line and the smoothed VI+ line, it may indicate a transition to a bullish main trend or suggest an expected one.
Adjustments can be made using input parameters such as length and smoothing periods to tailor the indicator to specific market conditions.
Divergence AnalyzerUnlock the potential of your trading strategy with the Divergence Analyzer, a sophisticated indicator designed to identify divergence patterns between two financial instruments. Whether you're a seasoned trader or just starting, this tool provides valuable insights into market trends and potential trading opportunities.
Key Features:
1. Versatility in Symbol Selection:
- Choose from a wide range of symbols for comparison, including popular indices like XAUUSD and SPX.
- Seamlessly toggle between symbols to analyze divergences and make informed trading decisions.
2. Flexible Calculation Options:
- Customizable options allow you to use a different symbol for calculation instead of the chart symbol.
- Fine-tune your analysis by selecting specific symbols for comparison based on your trading preferences.
3. Logarithmic Scale Analysis:
- Utilizes logarithmic scales for accurate representation of price movements.
- Linear regression coefficients are calculated on the logarithmic scale, providing a comprehensive view of trend strength.
4. Dynamic Length and Smoothing:
- Adjust the length parameter to adapt the indicator to different market conditions.
- Smoothed linear regression with exponential moving averages enhances clarity and reduces noise.
5. Standard Deviation Normalization:
- Normalizes standard deviations over 200 periods, offering a standardized view of price volatility.
- Easily compare volatility levels across different symbols for effective divergence analysis.
6. Color-Coded Divergence Visualization:
- Clearly distinguish positive and negative divergences with customizable color options.
- Visualize divergence deltas with an intuitive color scheme for quick and effective interpretation.
7. Symbol Information Table:
- An included table provides at-a-glance information about the selected symbols.
- Identify Symbol 1 and Symbol 2, along with their corresponding positive and negative divergence colors.
How to Use:
1. Select symbols for analysis using the user-friendly inputs.
2. Customize calculation options based on your preferences.
3. Analyze the divergence delta plot for clear visual indications.
4. Refer to the symbol information table for a quick overview of selected instruments.
Empower your trading strategy with the Divergence Analyzer and gain a competitive edge in the dynamic world of financial markets. Start making more informed decisions today!
Adaptive Trend Finder (log)In the dynamic landscape of financial markets, the Adaptive Trend Finder (log) stands out as an example of precision and professionalism. This advanced tool, equipped with a unique feature, offers traders a sophisticated approach to market trend analysis: the choice between automatic detection of the long-term or short-term trend channel.
Key Features:
1. Choice Between Long-Term or Short-Term Trend Channel Detection: Positioned first, this distinctive feature of the Adaptive Trend Finder (log) allows traders to customize their analysis by choosing between the automatic detection of the long-term or short-term trend channel. This increased flexibility adapts to individual trading preferences and changing market conditions.
2. Autonomous Trend Channel Detection: Leveraging the robust statistical measure of the Pearson coefficient, the Adaptive Trend Finder (log) excels in autonomously locating the optimal trend channel. This data-driven approach ensures objective trend analysis, reducing subjective biases, and enhancing overall precision.
3. Precision of Logarithmic Scale: A distinctive characteristic of our indicator is its strategic use of the logarithmic scale for regression channels. This approach enables nuanced analysis of linear regression channels, capturing the subtleties of trends while accommodating variations in the amplitude of price movements.
4. Length and Strength Visualization: Traders gain a comprehensive view of the selected trend channel, with the revelation of its length and quantification of trend strength. These dual pieces of information empower traders to make informed decisions, providing insights into both the direction and intensity of the prevailing trend.
In the demanding universe of financial markets, the Adaptive Trend Finder (log) asserts itself as an essential tool for traders, offering an unparalleled combination of precision, professionalism, and customization. Highlighting the choice between automatic detection of the long-term or short-term trend channel in the first position, this indicator uniquely caters to the specific needs of each trader, ensuring informed decision-making in an ever-evolving financial environment.
Triple Confirmation Kernel Regression Overlay [QuantraSystems]Kernel Regression Oscillator - Overlay
Introduction
The Kernel Regression Oscillator (ᏦᏒᎧ) represents an advanced tool for traders looking to capitalize on market trends.
This Indicator is valuable in identifying and confirming trend directions, as well as probabilistic and dynamic oversold and overbought zones.
It achieves this through a unique composite approach using three distinct Kernel Regressions combined in an Oscillator.
The additional Chart Overlay Indicator adds confidence to the signal.
Which is this Indicator.
This methodology helps the trader to significantly reduce false signals and offers a more reliable indication of market movements than more widely used indicators can.
Legend
The upper section is the Overlay. It features the Signal Wave to display the current trend.
Its Overbought and Oversold zones start at 50% and end at 100% of the selected Standard Deviation (default σ = 3), which can indicate extremely rare situations which can lead to either a softening momentum in the trend or even a mean reversion situation.
The lower one is the Base Chart.
The Indicator is linked here
It features the Kernel Regression Oscillator to display a composite of three distinct regressions, also displaying current trend.
Its Overbought and Oversold zones start at 50% and end at 100% of the selected Standard Deviation (default σ = 2), which can indicate extremely rare situations.
Case Study
To effectively utilize the ᏦᏒᎧ, traders should use both the additional Overlay and the Base
Chart at the same time. Then focus on capturing the confluence in signals, for example:
If the 𝓢𝓲𝓰𝓷𝓪𝓵 𝓦𝓪𝓿𝓮 on the Overlay and the ᏦᏒᎧ on the Base Chart both reside near the extreme of an Oversold zone the probability is higher than normal that momentum in trend may soften or the token may even experience a reversion soon.
If a bar is characterized by an Oversold Shading in both the Overlay and the Base Chart, then the probability is very high to experience a reversion soon.
In this case the trader may want to look for appropriate entries into a long position, as displayed here.
If a bar is characterized by an Overbought Shading in either Overlay or Base Chart, then the probability is high for momentum weakening or a mean reversion.
In this case the trade may have taken profit and closed his long position, as displayed here.
Please note that we always advise to find more confluence by additional indicators.
Recommended Settings
Swing Trading (1D chart)
Overlay
Bandwith: 45
Width: 2
SD Lookback: 150
SD Multiplier: 2
Base Chart
Bandwith: 45
SD Lookback: 150
SD Multiplier: 2
Fast-paced, Scalping (4min chart)
Overlay
Bandwith: 75
Width: 2
SD Lookback: 150
SD Multiplier: 3
Base Chart
Bandwith: 45
SD Lookback: 150
SD Multiplier: 2
Notes
The Kernel Regression Oscillator on the Base Chart is also sensitive to divergences if that is something you are keen on using.
For maximum confluence, it is recommended to use the indicator both as a chart overlay and in its Base Chart.
Please pay attention to shaded areas with Standard Deviation settings of 2 or 3 at their outer borders, and consider action only with high confidence when both parts of the indicator align on the same signal.
This tool shows its best performance on timeframes lower than 4 hours.
Traders are encouraged to test and determine the most suitable settings for their specific trading strategies and timeframes.
The trend following functionality is indicated through the "𝓢𝓲𝓰𝓷𝓪𝓵 𝓦𝓪𝓿𝓮" Line, with optional "Up" and "Down" arrows to denote trend directions only (toggle “Show Trend Signals”).
Methodology
The Kernel Regression Oscillator takes three distinct kernel regression functions,
used at similar weight, in order to calculate a balanced and smooth composite of the regressions. Part of it are:
The Epanechnikov Kernel Regression: Known for its efficiency in smoothing data by assigning less weight to data points further away from the target point than closer data points, effectively reducing variance.
The Wave Kernel Regression: Similarly assigning weight to the data points based on distance, it captures repetitive and thus wave-like patterns within the data to smoothen out and reduce the effect of underlying cyclical trends.
The Logistic Kernel Regression: This uses the logistic function in order to assign weights by probability distribution on the distance between data points and target points. It thus avoids both bias and variance to a certain level.
kernel(source, bandwidth, kernel_type) =>
switch kernel_type
"Epanechnikov" => math.abs(source) <= 1 ? 0.75 * (1 - math.pow(source, 2)) : 0.0
"Logistic" => 1/math.exp(source + 2 + math.exp(-source))
"Wave" => math.abs(source) <= 1 ? (1 - math.abs(source)) * math.cos(math.pi * source) : 0.
kernelRegression(src, bandwidth, kernel_type) =>
sumWeightedY = 0.
sumKernels = 0.
for i = 0 to bandwidth - 1
base = i*i/math.pow(bandwidth, 2)
kernel = kernel(base, 1, kernel_type)
sumWeightedY += kernel * src
sumKernels += kernel
(src - sumWeightedY/sumKernels)/src
// Triple Confirmations
Ep = kernelRegression(source, bandwidth, 'Epanechnikov' )
Lo = kernelRegression(source, bandwidth, 'Logistic' )
Wa = kernelRegression(source, bandwidth, 'Wave' )
By combining these regressions in an unbiased average, we follow our principle of achieving confluence for a signal or a decision, by stacking several edges to increase the probability that we are correct.
// Average
AV = math.avg(Ep, Lo, Wa)
The Standard Deviation bands take defined parameters from the user, in this case sigma of ideally between 2 to 3,
to help the indicator detect extremely improbable conditions and thus take an inversely probable signal from it to forward to the user.
The parameter settings and also the visualizations allow for ample customizations by the trader. The indicator comes with default and recommended settings.
For questions or recommendations, please feel free to seek contact in the comments.
Triple Confirmation Kernel Regression Base [QuantraSystems]Kernel Regression Oscillator - BASE
Introduction
The Kernel Regression Oscillator (ᏦᏒᎧ) represents an advanced tool for traders looking to capitalize on market trends.
This Indicator is valuable in identifying and confirming trend directions, as well as probabilistic and dynamic oversold and overbought zones.
It achieves this through a unique composite approach using three distinct Kernel Regressions combined in an Oscillator. The additional Chart Overlay Indicator adds confidence to the signal.
This methodology helps the trader to significantly reduce false signals and offers a more reliable indication of market movements than more widely used indicators can.
Legend
The upper section is the Overlay. It features the Signal Wave to display the current trend.
Its Overbought and Oversold zones start at 50% and end at 100% of the selected Standard Deviation (default σ = 3), which can indicate extremely rare situations which can lead to either a softening momentum in the trend or even a mean reversion situation.
The lower one is the Base Chart - This Indicator.
It features the Kernel Regression Oscillator to display a composite of three distinct regressions, also displaying current trend.
Its Overbought and Oversold zones start at 50% and end at 100% of the selected Standard Deviation (default σ = 2), which can indicate extremely rare situations.
Case Study
To effectively utilize the ᏦᏒᎧ, traders should use both the additional Overlay and the Base
Chart at the same time. Then focus on capturing the confluence in signals, for example:
If the 𝓢𝓲𝓰𝓷𝓪𝓵 𝓦𝓪𝓿𝓮 on the Overlay and the ᏦᏒᎧ on the Base Chart both reside near the extreme of an Oversold zone the probability is higher than normal that momentum in trend may soften or the token may even experience a reversion soon.
If a bar is characterized by an Oversold Shading in both the Overlay and the Base Chart, then the probability is very high to experience a reversion soon.
In this case the trader may want to look for appropriate entries into a long position, as displayed here.
If a bar is characterized by an Overbought Shading in either Overlay or Base Chart, then the probability is high for momentum weakening or a mean reversion.
In this case the trade may have taken profit and closed his long position, as displayed here.
Please note that we always advise to find more confluence by additional indicators.
Recommended Settings
Swing Trading (1D chart)
Overlay
Bandwith: 45
Width: 2
SD Lookback: 150
SD Multiplier: 2
Base Chart
Bandwith: 45
SD Lookback: 150
SD Multiplier: 2
Fast-paced, Scalping (4min chart)
Overlay
Bandwith: 75
Width: 2
SD Lookback: 150
SD Multiplier: 3
Base Chart
Bandwith: 45
SD Lookback: 150
SD Multiplier: 2
Notes
The Kernel Regression Oscillator on the Base Chart is also sensitive to divergences if that is something you are keen on using.
For maximum confluence, it is recommended to use the indicator both as a chart overlay and in its Base Chart.
Please pay attention to shaded areas with Standard Deviation settings of 2 or 3 at their outer borders, and consider action only with high confidence when both parts of the indicator align on the same signal.
This tool shows its best performance on timeframes lower than 4 hours.
Traders are encouraged to test and determine the most suitable settings for their specific trading strategies and timeframes.
The trend following functionality is indicated through the "𝓢𝓲𝓰𝓷𝓪𝓵 𝓦𝓪𝓿𝓮" Line, with optional "Up" and "Down" arrows to denote trend directions only (toggle “Show Trend Signals”).
Methodology
The Kernel Regression Oscillator takes three distinct kernel regression functions,
used at similar weight, in order to calculate a balanced and smooth composite of the regressions. Part of it are:
The Epanechnikov Kernel Regression: Known for its efficiency in smoothing data by assigning less weight to data points further away from the target point than closer data points, effectively reducing variance.
The Wave Kernel Regression: Similarly assigning weight to the data points based on distance, it captures repetitive and thus wave-like patterns within the data to smoothen out and reduce the effect of underlying cyclical trends.
The Logistic Kernel Regression: This uses the logistic function in order to assign weights by probability distribution on the distance between data points and target points. It thus avoids both bias and variance to a certain level.
kernel(source, bandwidth, kernel_type) =>
switch kernel_type
"Epanechnikov" => math.abs(source) <= 1 ? 0.75 * (1 - math.pow(source, 2)) : 0.0
"Logistic" => 1/math.exp(source + 2 + math.exp(-source))
"Wave" => math.abs(source) <= 1 ? (1 - math.abs(source)) * math.cos(math.pi * source) : 0.
kernelRegression(src, bandwidth, kernel_type) =>
sumWeightedY = 0.
sumKernels = 0.
for i = 0 to bandwidth - 1
base = i*i/math.pow(bandwidth, 2)
kernel = kernel(base, 1, kernel_type)
sumWeightedY += kernel * src
sumKernels += kernel
(src - sumWeightedY/sumKernels)/src
// Triple Confirmations
Ep = kernelRegression(source, bandwidth, 'Epanechnikov' )
Lo = kernelRegression(source, bandwidth, 'Logistic' )
Wa = kernelRegression(source, bandwidth, 'Wave' )
By combining these regressions in an unbiased average, we follow our principle of achieving confluence for a signal or a decision, by stacking several edges to increase the probability that we are correct.
// Average
AV = math.avg(Ep, Lo, Wa)
The Standard Deviation bands take defined parameters from the user, in this case sigma of ideally between 2 to 3,
to help the indicator detect extremely improbable conditions and thus take an inversely probable signal from it to forward to the user.
The parameter settings and also the visualizations allow for ample customizations by the trader. The indicator comes with default and recommended settings.
For questions or recommendations, please feel free to seek contact in the comments.