ADX BoxDescription:
The ADX Box indicator provides traders with a quick and intuitive way to monitor the current trend strength based on the Average Directional Index (ADX), calculated with a customisable period (default: 7 periods).
This compact indicator neatly displays the current ADX value rounded to one decimal place, along with a clear directional arrow:
Green upward triangle (▲): Indicates that ADX is rising above its moving average, signaling increasing trend strength.
Red downward triangle (▼): Indicates that ADX is declining below its moving average, signaling weakening trend strength.
Key Features:
Small and clean visual representation.
Dynamically updates in real-time directly on the chart.
Ideal for quick trend strength assessment without cluttering your workspace.
Recommended Usage:
Quickly identifying whether market trends are strengthening or weakening.
Enhancing decision-making for trend-following or breakout trading strategies.
Complementing other indicators such as ATR boxes for volatility measurement.
Feel free to use, share, and incorporate this indicator into your trading setups for clearer insights and more confident trading decisions!
Indicators and strategies
Dynamic Momentum Bands | AlphaAlgosDynamic Momentum Bands | AlphaAlgos
Overview
The Dynamic Momentum Bands indicator is an advanced technical analysis tool that combines multiple analytical techniques to provide a comprehensive view of market momentum and trend dynamics. By integrating RSI (Relative Strength Index), volatility analysis, and adaptive moving averages, this indicator offers traders a nuanced perspective on market conditions.
Key Features
Adaptive band calculation based on price momentum
Integrated RSI-driven volatility scaling
Multiple moving average type options (EMA, SMA, VWMA)
Smooth, gradient-based band visualization
Optional price bar coloring for trend identification
Technical Methodology
The indicator employs a sophisticated approach to market analysis:
1. Momentum Calculation
Calculates RSI using a customizable length
Uses RSI to dynamically adjust band volatility
Scales band width based on distance from the 50 RSI level
2. Band Construction
Applies a selected moving average type to the price source
Calculates deviation using ATR (Average True Range)
Smooths band edges for improved visual clarity
Configuration Options
Core Settings:
Price Source: Choose the price data used for calculations
RSI Length: Customize the RSI calculation period (1-50)
Band Length: Adjust the moving average period (5-100)
Volatility Multiplier: Fine-tune band width
Band Type: Select between EMA, SMA, and VWMA
Visual Settings:
Bar Coloring: Toggle color-coded price bars
Gradient-based band visualization
Smooth color transitions for trend representation
Trend Identification
The indicator provides trend insights through:
Color-coded bands (blue for bullish, pink for bearish)
Smooth gradient visualization
Optional price bar coloring
Trading Applications
Trend Following:
- Use band position relative to price as trend indicator
- Identify momentum shifts through color changes
- Utilize gradient zones for trend strength assessment
Volatility Analysis:
Observe band width changes
Detect potential breakout or consolidation periods
Use RSI-driven volatility scaling for market context
Best Practices
Adjust RSI length to match trading timeframe
Experiment with different moving average types
Use in conjunction with other technical indicators
Consider volatility multiplier for different market conditions
This indicator is provided for informational purposes only. Always use proper risk management when trading. Past performance is not indicative of future results. Not financial Advise
Multi-Fibonacci Trend Average[FibonacciFlux]Multi-Fibonacci Trend Average (MFTA): An Institutional-Grade Trend Confluence Indicator for Discerning Market Participants
My original indicator/Strategy:
Engineered for the sophisticated demands of institutional and advanced traders, the Multi-Fibonacci Trend Average (MFTA) indicator represents a paradigm shift in technical analysis. This meticulously crafted tool is designed to furnish high-definition trend signals within the complexities of modern financial markets. Anchored in the rigorous principles of Fibonacci ratios and augmented by advanced averaging methodologies, MFTA delivers a granular perspective on trend dynamics. Its integration of Multi-Timeframe (MTF) filters provides unparalleled signal robustness, empowering strategic decision-making with a heightened degree of confidence.
MFTA indicator on BTCUSDT 15min chart with 1min RSI and MACD filters enabled. Note the refined signal generation with reduced noise.
MFTA indicator on BTCUSDT 15min chart without MTF filters. While capturing more potential trading opportunities, it also generates a higher frequency of signals, including potential false positives.
Core Innovation: Proprietary Fibonacci-Enhanced Supertrend Averaging Engine
The MFTA indicator’s core innovation lies in its proprietary implementation of Supertrend analysis, strategically fortified by Fibonacci ratios to construct a truly dynamic volatility envelope. Departing from conventional Supertrend methodologies, MFTA autonomously computes not one, but three distinct Supertrend lines. Each of these lines is uniquely parameterized by a specific Fibonacci factor: 0.618 (Weak), 1.618 (Medium/Golden Ratio), and 2.618 (Strong/Extended Fibonacci).
// Fibonacci-based factors for multiple Supertrend calculations
factor1 = input.float(0.618, 'Factor 1 (Weak/Fibonacci)', minval=0.01, step=0.01, tooltip='Factor 1 (Weak/Fibonacci)', group="Fibonacci Supertrend")
factor2 = input.float(1.618, 'Factor 2 (Medium/Golden Ratio)', minval=0.01, step=0.01, tooltip='Factor 2 (Medium/Golden Ratio)', group="Fibonacci Supertrend")
factor3 = input.float(2.618, 'Factor 3 (Strong/Extended Fib)', minval=0.01, step=0.01, tooltip='Factor 3 (Strong/Extended Fib)', group="Fibonacci Supertrend")
This multi-faceted architecture adeptly captures a spectrum of market volatility sensitivities, ensuring a comprehensive assessment of prevailing conditions. Subsequently, the indicator algorithmically synthesizes these disparate Supertrend lines through arithmetic averaging. To achieve optimal signal fidelity and mitigate inherent market noise, this composite average is further refined utilizing an Exponential Moving Average (EMA).
// Calculate average of the three supertends and a smoothed version
superlength = input.int(21, 'Smoothing Length', tooltip='Smoothing Length for Average Supertrend', group="Fibonacci Supertrend")
average_trend = (supertrend1 + supertrend2 + supertrend3) / 3
smoothed_trend = ta.ema(average_trend, superlength)
The resultant ‘Smoothed Trend’ line emerges as a remarkably responsive yet stable trend demarcation, offering demonstrably superior clarity and precision compared to singular Supertrend implementations, particularly within the turbulent dynamics of high-volatility markets.
Elevated Signal Confluence: Integrated Multi-Timeframe (MTF) Validation Suite
MFTA transcends the limitations of conventional trend indicators by incorporating an advanced suite of three independent MTF filters: RSI, MACD, and Volume. These filters function as sophisticated validation protocols, rigorously ensuring that only signals exhibiting a confluence of high-probability factors are brought to the forefront.
1. Granular Lower Timeframe RSI Momentum Filter
The Relative Strength Index (RSI) filter, computed from a user-defined lower timeframe, furnishes critical momentum-based signal validation. By meticulously monitoring RSI dynamics on an accelerated timeframe, traders gain the capacity to evaluate underlying momentum strength with precision, prior to committing to signal execution on the primary chart timeframe.
// --- Lower Timeframe RSI Filter ---
ltf_rsi_filter_enable = input.bool(false, title="Enable RSI Filter", group="MTF Filters", tooltip="Use RSI from lower timeframe as a filter")
ltf_rsi_timeframe = input.timeframe("1", title="RSI Timeframe", group="MTF Filters", tooltip="Timeframe for RSI calculation")
ltf_rsi_length = input.int(14, title="RSI Length", minval=1, group="MTF Filters", tooltip="Length for RSI calculation")
ltf_rsi_threshold = input.int(30, title="RSI Threshold", minval=0, maxval=100, group="MTF Filters", tooltip="RSI value threshold for filtering signals")
2. Convergent Lower Timeframe MACD Trend-Momentum Filter
The Moving Average Convergence Divergence (MACD) filter, also calculated on a lower timeframe basis, introduces a critical layer of trend-momentum convergence confirmation. The bullish signal configuration rigorously mandates that the MACD line be definitively positioned above the Signal line on the designated lower timeframe. This stringent condition ensures a robust indication of converging momentum that aligns synergistically with the prevailing trend identified on the primary timeframe.
// --- Lower Timeframe MACD Filter ---
ltf_macd_filter_enable = input.bool(false, title="Enable MACD Filter", group="MTF Filters", tooltip="Use MACD from lower timeframe as a filter")
ltf_macd_timeframe = input.timeframe("1", title="MACD Timeframe", group="MTF Filters", tooltip="Timeframe for MACD calculation")
ltf_macd_fast_length = input.int(12, title="MACD Fast Length", minval=1, group="MTF Filters", tooltip="Fast EMA length for MACD")
ltf_macd_slow_length = input.int(26, title="MACD Slow Length", minval=1, group="MTF Filters", tooltip="Slow EMA length for MACD")
ltf_macd_signal_length = input.int(9, title="MACD Signal Length", minval=1, group="MTF Filters", tooltip="Signal SMA length for MACD")
3. Definitive Volume Confirmation Filter
The Volume Filter functions as an indispensable arbiter of trade conviction. By establishing a dynamic volume threshold, defined as a percentage relative to the average volume over a user-specified lookback period, traders can effectively ensure that all generated signals are rigorously validated by demonstrably increased trading activity. This pivotal validation step signifies robust market participation, substantially diminishing the potential for spurious or false breakout signals.
// --- Volume Filter ---
volume_filter_enable = input.bool(false, title="Enable Volume Filter", group="MTF Filters", tooltip="Use volume level as a filter")
volume_threshold_percent = input.int(title="Volume Threshold (%)", defval=150, minval=100, group="MTF Filters", tooltip="Minimum volume percentage compared to average volume to allow signal (100% = average)")
These meticulously engineered filters operate in synergistic confluence, requiring all enabled filters to definitively satisfy their pre-defined conditions before a Buy or Sell signal is generated. This stringent multi-layered validation process drastically minimizes the incidence of false positive signals, thereby significantly enhancing entry precision and overall signal reliability.
Intuitive Visual Architecture & Actionable Intelligence
MFTA provides a demonstrably intuitive and visually rich charting environment, meticulously delineating trend direction and momentum through precisely color-coded plots:
Average Supertrend: Thin line, green/red for uptrend/downtrend, immediate directional bias.
Smoothed Supertrend: Bold line, teal/purple for uptrend/downtrend, cleaner, institutionally robust trend.
Dynamic Trend Fill: Green/red fill between Supertrends quantifies trend strength and momentum.
Adaptive Background Coloring: Light green/red background mirrors Smoothed Supertrend direction, holistic trend perspective.
Precision Buy/Sell Signals: ‘BUY’/‘SELL’ labels appear on chart when trend touch and MTF filter confluence are satisfied, facilitating high-conviction trade action.
MFTA indicator applied to BTCUSDT 4-hour chart, showcasing its effectiveness on higher timeframes. The Smoothed Length parameter is increased to 200 for enhanced smoothness on this timeframe, coupled with 1min RSI and Volume filters for signal refinement. This illustrates the indicator's adaptability across different timeframes and market conditions.
Strategic Applications for Institutional Mandates
MFTA’s sophisticated design provides distinct advantages for advanced trading operations and institutional investment mandates. Key strategic applications include:
High-Probability Trend Identification: Fibonacci-averaged Supertrend with MTF filters robustly identifies high-probability trend continuations and reversals, enhancing alpha generation.
Precision Entry/Exit Signals: Volume and momentum-filtered signals enable institutional-grade precision for optimized risk-adjusted returns.
Algorithmic Trading Integration: Clear signal logic facilitates seamless integration into automated trading systems for scalable strategy deployment.
Multi-Asset/Timeframe Versatility: Adaptable parameters ensure applicability across diverse asset classes and timeframes, catering to varied trading mandates.
Enhanced Risk Management: Superior signal fidelity from MTF filters inherently reduces false signals, supporting robust risk management protocols.
Granular Customization and Parameterized Control
MFTA offers unparalleled customization, empowering users to fine-tune parameters for precise alignment with specific trading styles and market conditions. Key adjustable parameters include:
Fibonacci Factors: Adjust Supertrend sensitivity to volatility regimes.
ATR Length: Control volatility responsiveness in Supertrend calculations.
Smoothing Length: Refine Smoothed Trend line responsiveness and noise reduction.
MTF Filter Parameters: Independently configure timeframes, lookback periods, and thresholds for RSI, MACD, and Volume filters for optimal signal filtering.
Disclaimer
MFTA is meticulously engineered for high-quality trend signals; however, no indicator guarantees profit. Market conditions are unpredictable, and trading involves substantial risk. Rigorous backtesting and forward testing across diverse datasets, alongside a comprehensive understanding of the indicator's logic, are essential before live deployment. Past performance is not indicative of future results. MFTA is for informational and analytical purposes only and is not financial or investment advice.
VSA Vol Key VSA Signals
(1) No Demand – Bearish Signal
Low volume, narrow spread.
Price rises, but volume does not increase → Weak market, lack of buyers.
If this appears in an uptrend, it may indicate a potential reversal.
(2) No Supply – Bullish Signal
Low volume, narrow spread.
Price declines, but volume does not increase → Weak selling pressure.
If this appears in an uptrend, it may confirm the continuation of the uptrend.
(3) Stopping Volume – Bullish Reversal Signal
Strong price decline, but unusually high volume.
Candle shows a long lower wick, closing near the top.
Indicates Smart Money absorbing supply, signaling a potential reversal upwards.
(4) Climactic Volume – Possible Trend Reversal
Extremely high volume with a sharp price increase or decrease.
If this occurs after a long trend, it may indicate a trend reversal.
Smart Money may be taking profits after a prolonged price movement.
(5) Effort vs. Result
If volume is high but price movement is weak → Inefficient buying/selling, possible reversal.
If volume is high and price moves strongly in the same direction → Trend is likely to continue.
Multi-Anchored Linear Regression Channels [TANHEF]█ Overview:
The 'Multi-Anchored Linear Regression Channels ' plots multiple dynamic regression channels (or bands) with unique selectable calculation types for both regression and deviation. It leverages a variety of techniques, customizable anchor sources to determine regression lengths, and user-defined criteria to highlight potential opportunities.
Before getting started, it's worth exploring all sections, but make sure to review the Setup & Configuration section in particular. It covers key parameters like anchor type, regression length, bias, and signal criteria—essential for aligning the tool with your trading strategy.
█ Key Features:
⯁ Multi-Regression Capability:
Plot up to three distinct regression channels and/or bands simultaneously, each with customizable anchor types to define their length.
⯁ Regression & Deviation Methods:
Regressions Types:
Standard: Uses ordinary least squares to compute a simple linear trend by averaging the data and deriving a slope and endpoints over the lookback period.
Ridge: Introduces L2 regularization to stabilize the slope by penalizing large coefficients, which helps mitigate multicollinearity in the data.
Lasso: Uses L1 regularization through soft-thresholding to shrink less important coefficients, yielding a simpler model that highlights key trends.
Elastic Net: Combines L1 and L2 penalties to balance coefficient shrinkage and selection, producing a robust weighted slope that handles redundant predictors.
Huber: Implements the Huber loss with iteratively reweighted least squares (IRLS) and EMA-style weights to reduce the impact of outliers while estimating the slope.
Least Absolute Deviations (LAD): Reduces absolute errors using iteratively reweighted least squares (IRLS), yielding a slope less sensitive to outliers than squared-error methods.
Bayesian Linear: Merges prior beliefs with weighted data through Bayesian updating, balancing the prior slope with data evidence to derive a probabilistic trend.
Deviation Types:
Regressive Linear (Reverse): In reverse order (recent to oldest), compute weighted squared differences between the data and a line defined by a starting value and slope.
Progressive Linear (Forward): In forward order (oldest to recent), compute weighted squared differences between the data and a line defined by a starting value and slope.
Balanced Linear: In forward order (oldest to newest), compute regression, then pair to source data in reverse order (newest to oldest) to compute weighted squared differences.
Mean Absolute: Compute weighted absolute differences between each data point and its regression line value, then aggregate them to yield an average deviation.
Median Absolute: Determine the weighted median of the absolute differences between each data point and its regression line value to capture the central tendency of deviations.
Percent: Compute deviation as a percentage of a base value by multiplying that base by the specified percentage, yielding symmetric positive and negative deviations.
Fitted: Compare a regression line with high and low series values by computing weighted differences to determine the maximum upward and downward deviations.
Average True Range: Iteratively compute the weighted average of absolute differences between the data and its regression line to yield an ATR-style deviation measure.
Bias:
Bias: Applies EMA or inverse-EMA style weighting to both Regression and/or Deviation, emphasizing either recent or older data.
⯁ Customizable Regression Length via Anchors:
Anchor Types:
Fixed: Length.
Bar-Based: Bar Highest/Lowest, Volume Highest/Lowest, Spread Highest/Lowest.
Correlation: R Zero, R Highest, R Lowest, R Absolute.
Slope: Slope Zero, Slope Highest, Slope Lowest, Slope Absolute.
Indicator-Based: Indicators Highest/Lowest (ADX, ATR, BBW, CCI, MACD, RSI, Stoch).
Time-Based: Time (Day, Week, Month, Quarter, Year, Decade, Custom).
Session-Based: Session (Tokyo, London, New York, Sydney, Custom).
Event-Based: Earnings, Dividends, Splits.
External: Input Source Highest/Lowest.
Length Selection:
Maximum: The highest allowed regression length (also fixed value of “Length” anchor).
Minimum: The shortest allowed length, ensuring enough bars for a valid regression.
Step: The sampling interval (e.g., 1 checks every bar, 2 checks every other bar, etc.). Increasing the step reduces the loading time, most applicable to “Slope” and “R” anchors.
Adaptive lookback:
Adaptive Lookback: Enable to display regression regardless of too few historical bars.
⯁ Selecting Bias:
Bias applies separately to regression and deviation.
Positive values emphasize recent data (EMA-style), negative invert, and near-zero maintains balance. (e.g., a length 100, bias +1 gives the newest price ~7× more weight than the oldest).
It's best to apply bias to both (regression and deviation) or just the deviation. Biasing only regression may distort deviation visually, while biasing both keeps their relationship intuitive. Using bias only for deviation scales it without altering regression, offering unique analysis.
⯁ Scale Awareness:
Supports linear and logarithmic price scaling, the regression and deviations adjust accordingly.
⯁ Signal Generation & Alerts:
Customizable entry/exit signals and alerts, detailed in the dedicated section below.
⯁ Visual Enhancements & Real-World Examples:
Optional on-chart table display summarizing regression input criteria (display type, anchor type, source, regression type, regression bias, deviation type, deviation bias, deviation multiplier) and key calculated metrics (regression length, slope, Pearson’s R, percentage position within deviations, etc.) for quick reference.
█ Understanding R (Pearson Correlation Coefficient):
Pearson’s R gauges data alignment to a straight-line trend within the regression length:
Range: R varies between –1 and +1.
R = +1 → Perfect positive correlation (strong uptrend).
R = 0 → No linear relationship detected.
R = –1 → Perfect negative correlation (strong downtrend).
This script uses Pearson’s R as an anchor, adjusting regression length to target specific R traits. Strong R (±1) follows the regression channel, while weak R (0) shows inconsistency.
█ Understanding the Slope:
The slope is the direction and rate at which the regression line rises or falls per bar:
Positive Slope (>0): Uptrend – Steeper means faster increase.
Negative Slope (<0): Downtrend – Steeper means sharper drop.
Zero or Near-Zero Slope: Sideways – Indicating range-bound conditions.
This script uses highest and lowest slope as an anchor, where extremes highlight strong moves and trend lines, while values near zero indicate sideways action and possible support/resistance.
█ Setup & Configuration:
Whether you’re new to this script or want to quickly adjust all critical parameters, the panel below shows the main settings available. You can customize everything from the anchor type and maximum length to the bias, signal conditions, and more.
Scale (select Log Scale for logarithmic, otherwise linear scale).
Display (regression channel and/or bands).
Anchor (how regression length is determined).
Length (control bars analyzed):
• Max – Upper limit.
• Min – Prevents regression from becoming too short.
• Step – Controls scanning precision; increasing Step reduces load time.
Regression:
• Type – Calculation method.
• Bias – EMA-style emphasis (>0=new bars weighted more; <0=old bars weighted more).
Deviation:
• Type – Calculation method.
• Bias – EMA-style emphasis (>0=new bars weighted more; <0=old bars weighted more).
• Multiplier - Adjusts Upper and Lower Deviation.
Signal Criteria:
• % (Price vs Deviation) – (0% = lower deviation, 50% = regression, 100% = upper deviation).
• R – (0 = no correlation, ±1 = perfect correlation; >0 = +slope, <0 = -slope).
Table (analyze table of input settings, calculated results, and signal criteria).
Adaptive Lookback (display regression while too few historical bars).
Multiple Regressions (steps 2 to 7 apply to #1, #2, and #3 regressions).
█ Signal Generation & Alerts:
The script offers customizable entry and exit signals with flexible criteria and visual cues (background color, dots, or triangles). Alerts can also be triggered for these opportunities.
Percent Direction Criteria:
(0% = lower deviation, 50% = regression line, 100% = upper deviation)
Above %: Triggers if price is above a specified percent of the deviation channel.
Below %: Triggers if price is below a specified percent of the deviation channel.
(Blank): Ignores the percent‐based condition.
Pearson's R (Correlation) Direction Criteria:
(0 = no correlation, ±1 = perfect correlation; >0 = positive slope, <0 = negative slope)
Above R / Below R: Compares the correlation to a threshold.
Above│R│ / Below│R│: Uses absolute correlation to focus on strength, ignoring direction.
Zero to R: Checks if R is in the 0-to-threshold range.
(Blank): Ignores correlation-based conditions.
█ User Tips & Best Practices:
Choose an anchor type that suits your strategy, “Bar Highest/Lowest” automatically spots commonly used regression zones, while “│R│ Highest” targets strong linear trends.
Consider enabling or disabling the Adaptive Lookback feature to ensure you always have a plotted regression if your chart doesn’t meet the maximum-length requirement.
Use a small Step size (1) unless relying on R-correlation or slope-based anchors as the are time-consuming to calculate. Larger steps speed up calculations but reduce precision.
Fine-tune settings such as lookback periods, regression bias, and deviation multipliers, or trend strength. Small adjustments can significantly affect how channels and signals behave.
To reduce loading time , show only channels (not bands) and disable signals, this limits calculations to the last bar and supports more extreme criteria.
Use the table display to monitor anchor type, calculated length, slope, R value, and percent location at a glance—especially if you have multiple regressions visible simultaneously.
█ Conclusion:
With its blend of advanced regression techniques, flexible deviation options, and a wide range of anchor types, this indicator offers a highly adaptable linear regression channeling system. Whether you're anchoring to time, price extremes, correlation, slope, or external events, the tool can be shaped to fit a variety of strategies. Combined with customizable signals and alerts, it may help highlight areas of confluence and support a more structured approach to identifying potential opportunities.
LinearRegressionLibrary "LinearRegression"
Calculates a variety of linear regression and deviation types, with optional emphasis weighting. Additionally, multiple of slope and Pearson’s R calculations.
calcSlope(_src, _len, _condition)
Calculates the slope of a linear regression over the specified length.
Parameters:
_src (float) : (float) The source data.
_len (int) : (int) The length of the lookback period for the linear regression.
_condition (bool) : (bool) Flag to enable calculation. Set to true to calculate on every bar; otherwise, set to barstate.islast for efficiency.
Returns: (float) The slope of the linear regression.
calcReg(_src, _len, _condition)
Calculates a basic linear regression, returning y1, y2, slope, and average.
Parameters:
_src (float) : (float) The source data series.
_len (int) : (int) The length of the lookback period.
_condition (bool) : (bool) Flag to enable calculation (true = calculate).
Returns: (float ) An array of 4 values: .
calcRegStandard(_src, _len, _emphasis, _condition)
Calculates an Standard linear regression with optional emphasis.
Parameters:
_src (float) : (series float) The source data series.
_len (int) : (int) The length of the lookback period.
_emphasis (float) : (float) The emphasis factor: 0 for equal weight; >0 emphasizes recent bars; <0 emphasizes older bars.
_condition (bool) : (bool) Flag to enable calculation (true = calculate).
Returns: (float ) .
calcRegRidge(_src, _len, lambda, _emphasis, _condition)
Calculates a ridge regression with optional emphasis.
Parameters:
_src (float) : (float) The source data series.
_len (int) : (int) The length of the lookback period.
lambda (float) : (float) The ridge regularization parameter.
_emphasis (float) : (float) The emphasis factor: 0 for equal weight; >0 emphasizes recent bars; <0 emphasizes older bars.
_condition (bool) : (bool) Flag to enable calculation (true = calculate).
Returns: (float ) .
calcRegLasso(_src, _len, lambda, _emphasis, _condition)
Calculates a Lasso regression with optional emphasis.
Parameters:
_src (float) : (float) The source data series.
_len (int) : (int) The length of the lookback period.
lambda (float) : (float) The Lasso regularization parameter.
_emphasis (float) : (float) The emphasis factor: 0 for equal weight; >0 emphasizes recent bars; <0 emphasizes older bars.
_condition (bool) : (bool) Flag to enable calculation (true = calculate).
Returns: (float ) .
calcElasticNetLinReg(_src, _len, lambda1, lambda2, _emphasis, _condition)
Calculates an Elastic Net regression with optional emphasis.
Parameters:
_src (float) : (float) The source data series.
_len (int) : (int) The length of the lookback period.
lambda1 (float) : (float) L1 regularization parameter (Lasso).
lambda2 (float) : (float) L2 regularization parameter (Ridge).
_emphasis (float) : (float) Emphasis factor: 0 for equal weight; >0 emphasizes recent bars; <0 emphasizes older bars.
_condition (bool) : (bool) Flag to enable calculation (true = calculate).
Returns: (float ) .
calcRegHuber(_src, _len, delta, iterations, _emphasis, _condition)
Calculates a Huber regression using Iteratively Reweighted Least Squares (IRLS).
Parameters:
_src (float) : (float) The source data series.
_len (int) : (int) The length of the lookback period.
delta (float) : (float) Huber threshold parameter.
iterations (int) : (int) Number of IRLS iterations.
_emphasis (float) : (float) Emphasis factor: 0 for equal weight; >0 emphasizes recent bars; <0 emphasizes older bars.
_condition (bool) : (bool) Flag to enable calculation (true = calculate).
Returns: (float ) .
calcRegLAD(_src, _len, iterations, _emphasis, _condition)
Calculates a Least Absolute Deviations (LAD) regression via IRLS.
Parameters:
_src (float) : (float) The source data series.
_len (int) : (int) The length of the lookback period.
iterations (int) : (int) Number of IRLS iterations for LAD.
_emphasis (float) : (float) Emphasis factor: 0 for equal weight; >0 emphasizes recent bars; <0 emphasizes older bars.
_condition (bool) : (bool) Flag to enable calculation (true = calculate).
Returns: (float ) .
calcRegBayesian(_src, _len, priorMean, priorSpan, sigma, _emphasis, _condition)
Calculates a Bayesian linear regression with optional emphasis.
Parameters:
_src (float) : (float) The source data series.
_len (int) : (int) The length of the lookback period.
priorMean (float) : (float) The prior mean for the slope.
priorSpan (float) : (float) The prior variance (or span) for the slope.
sigma (float) : (float) The assumed standard deviation of residuals.
_emphasis (float) : (float) Emphasis factor: 0 for equal weight; >0 emphasizes recent bars; <0 emphasizes older bars.
_condition (bool) : (bool) Flag to enable calculation (true = calculate).
Returns: (float ) .
calcRFromLinReg(_src, _len, _slope, _average, _y1, _condition)
Calculates the Pearson correlation coefficient (R) based on linear regression parameters.
Parameters:
_src (float) : (float) The source data.
_len (int) : (int) The length of the lookback period.
_slope (float) : (float) The slope of the linear regression.
_average (float) : (float) The average value of the source data series.
_y1 (float) : (float) The starting point (y-intercept of the oldest bar) for the linear regression.
_condition (bool) : (bool) Flag to enable calculation. Set to true to calculate on every bar; otherwise, set to barstate.islast for efficiency.
Returns: (float) The Pearson correlation coefficient (R) adjusted for the direction of the slope.
calcRFromSource(_src, _len, _condition)
Calculates the correlation coefficient (R) using a specified length and source data.
Parameters:
_src (float) : (float) The source data.
_len (int) : (int) The length of the lookback period.
_condition (bool) : (bool) Flag to enable calculation. Set to true to calculate on every bar; otherwise, set to barstate.islast for efficiency.
Returns: (float) The correlation coefficient (R).
calcSlopeLengthZero(_src, _len, _minLen, _step, _condition)
Identifies the length at which the slope is flattest (closest to zero).
Parameters:
_src (float) : (float) The source data.
_len (int) : (int) The maximum lookback length to consider (minimum of 2).
_minLen (int) : (int) The minimum length to start from (cannot exceed the max length).
_step (int) : (int) The increment step for lengths.
_condition (bool) : (bool) Flag to enable calculation. Set to true to calculate on every bar; otherwise, set to barstate.islast.
Returns: (int) The length at which the slope is flattest.
calcSlopeLengthHighest(_src, _len, _minLen, _step, _condition)
Identifies the length at which the slope is highest.
Parameters:
_src (float) : (float) The source data.
_len (int) : (int) The maximum lookback length (minimum of 2).
_minLen (int) : (int) The minimum length to start from.
_step (int) : (int) The step for incrementing lengths.
_condition (bool) : (bool) Flag to enable calculation. Set to true to calculate on every bar; otherwise, set to barstate.islast.
Returns: (int) The length at which the slope is highest.
calcSlopeLengthLowest(_src, _len, _minLen, _step, _condition)
Identifies the length at which the slope is lowest.
Parameters:
_src (float) : (float) The source data.
_len (int) : (int) The maximum lookback length (minimum of 2).
_minLen (int) : (int) The minimum length to start from.
_step (int) : (int) The step for incrementing lengths.
_condition (bool) : (bool) Flag to enable calculation. Set to true to calculate on every bar; otherwise, set to barstate.islast.
Returns: (int) The length at which the slope is lowest.
calcSlopeLengthAbsolute(_src, _len, _minLen, _step, _condition)
Identifies the length at which the absolute slope value is highest.
Parameters:
_src (float) : (float) The source data.
_len (int) : (int) The maximum lookback length (minimum of 2).
_minLen (int) : (int) The minimum length to start from.
_step (int) : (int) The step for incrementing lengths.
_condition (bool) : (bool) Flag to enable calculation. Set to true to calculate on every bar; otherwise, set to barstate.islast.
Returns: (int) The length at which the absolute slope value is highest.
calcRLengthZero(_src, _len, _minLen, _step, _condition)
Identifies the length with the lowest absolute R value.
Parameters:
_src (float) : (float) The source data.
_len (int) : (int) The maximum lookback length (minimum of 2).
_minLen (int) : (int) The minimum length to start from.
_step (int) : (int) The step for incrementing lengths.
_condition (bool) : (bool) Flag to enable calculation. Set to true to calculate on every bar; otherwise, set to barstate.islast.
Returns: (int) The length with the lowest absolute R value.
calcRLengthHighest(_src, _len, _minLen, _step, _condition)
Identifies the length with the highest R value.
Parameters:
_src (float) : (float) The source data.
_len (int) : (int) The maximum lookback length (minimum of 2).
_minLen (int) : (int) The minimum length to start from.
_step (int) : (int) The step for incrementing lengths.
_condition (bool) : (bool) Flag to enable calculation. Set to true to calculate on every bar; otherwise, set to barstate.islast.
Returns: (int) The length with the highest R value.
calcRLengthLowest(_src, _len, _minLen, _step, _condition)
Identifies the length with the lowest R value.
Parameters:
_src (float) : (float) The source data.
_len (int) : (int) The maximum lookback length (minimum of 2).
_minLen (int) : (int) The minimum length to start from.
_step (int) : (int) The step for incrementing lengths.
_condition (bool) : (bool) Flag to enable calculation. Set to true to calculate on every bar; otherwise, set to barstate.islast.
Returns: (int) The length with the lowest R value.
calcRLengthAbsolute(_src, _len, _minLen, _step, _condition)
Identifies the length with the highest absolute R value.
Parameters:
_src (float) : (float) The source data.
_len (int) : (int) The maximum lookback length (minimum of 2).
_minLen (int) : (int) The minimum length to start from.
_step (int) : (int) The step for incrementing lengths.
_condition (bool) : (bool) Flag to enable calculation. Set to true to calculate on every bar; otherwise, set to barstate.islast.
Returns: (int) The length with the highest absolute R value.
calcDevReverse(_src, _len, _slope, _y1, _inputDev, _emphasis, _condition)
Calculates the regressive linear deviation in reverse order, with optional emphasis on recent data.
Parameters:
_src (float) : (float) The source data.
_len (int) : (int) The length of the lookback period.
_slope (float) : (float) The slope of the linear regression.
_y1 (float) : (float) The y-intercept (oldest bar) of the linear regression.
_inputDev (float) : (float) The input deviation multiplier.
_emphasis (float) : (float) Emphasis factor: 0 for equal weight; >0 emphasizes recent bars; <0 emphasizes older bars.
_condition (bool) : (bool) Flag to enable calculation (true = calculate).
Returns: A 2-element tuple: .
calcDevForward(_src, _len, _slope, _y1, _inputDev, _emphasis, _condition)
Calculates the progressive linear deviation in forward order (oldest to most recent bar), with optional emphasis.
Parameters:
_src (float) : (float) The source data array, where _src is oldest and _src is most recent.
_len (int) : (int) The length of the lookback period.
_slope (float) : (float) The slope of the linear regression.
_y1 (float) : (float) The y-intercept of the linear regression (value at the most recent bar, adjusted by slope).
_inputDev (float) : (float) The input deviation multiplier.
_emphasis (float) : (float) Emphasis factor: 0 for equal weight; >0 emphasizes recent bars; <0 emphasizes older bars.
_condition (bool) : (bool) Flag to enable calculation (true = calculate).
Returns: A 2-element tuple: .
calcDevBalanced(_src, _len, _slope, _y1, _inputDev, _emphasis, _condition)
Calculates the balanced linear deviation with optional emphasis on recent or older data.
Parameters:
_src (float) : (float) Source data array, where _src is the most recent and _src is the oldest.
_len (int) : (int) The length of the lookback period.
_slope (float) : (float) The slope of the linear regression.
_y1 (float) : (float) The y-intercept of the linear regression (value at the oldest bar).
_inputDev (float) : (float) The input deviation multiplier.
_emphasis (float) : (float) Emphasis factor: 0 for equal weight; >0 emphasizes recent bars; <0 emphasizes older bars.
_condition (bool) : (bool) Flag to enable calculation (true = calculate).
Returns: A 2-element tuple: .
calcDevMean(_src, _len, _slope, _y1, _inputDev, _emphasis, _condition)
Calculates the mean absolute deviation from a forward-applied linear trend (oldest to most recent), with optional emphasis.
Parameters:
_src (float) : (float) The source data array, where _src is the most recent and _src is the oldest.
_len (int) : (int) The length of the lookback period.
_slope (float) : (float) The slope of the linear regression.
_y1 (float) : (float) The y-intercept (oldest bar) of the linear regression.
_inputDev (float) : (float) The input deviation multiplier.
_emphasis (float) : (float) Emphasis factor: 0 for equal weight; >0 emphasizes recent bars; <0 emphasizes older bars.
_condition (bool) : (bool) Flag to enable calculation (true = calculate).
Returns: A 2-element tuple: .
calcDevMedian(_src, _len, _slope, _y1, _inputDev, _emphasis, _condition)
Calculates the median absolute deviation with optional emphasis on recent data.
Parameters:
_src (float) : (float) The source data array (index 0 = oldest, index _len - 1 = most recent).
_len (int) : (int) The length of the lookback period.
_slope (float) : (float) The slope of the linear regression.
_y1 (float) : (float) The y-intercept (oldest bar) of the linear regression.
_inputDev (float) : (float) The deviation multiplier.
_emphasis (float) : (float) Emphasis factor: 0 for equal weight; >0 emphasizes recent bars; <0 emphasizes older bars.
_condition (bool) : (bool) Flag to enable calculation (true = calculate).
Returns:
calcDevPercent(_y1, _inputDev, _condition)
Calculates the percent deviation from a given value and a specified percentage.
Parameters:
_y1 (float) : (float) The base value from which to calculate deviation.
_inputDev (float) : (float) The deviation percentage.
_condition (bool) : (bool) Flag to enable calculation (true = calculate).
Returns: A 2-element tuple: .
calcDevFitted(_len, _slope, _y1, _emphasis, _condition)
Calculates the weighted fitted deviation based on high and low series data, showing max deviation, with optional emphasis.
Parameters:
_len (int) : (int) The length of the lookback period.
_slope (float) : (float) The slope of the linear regression.
_y1 (float) : (float) The Y-intercept (oldest bar) of the linear regression.
_emphasis (float) : (float) Emphasis factor: 0 for equal weight; >0 emphasizes recent bars; <0 emphasizes older bars.
_condition (bool) : (bool) Flag to enable calculation (true = calculate).
Returns: A 2-element tuple: .
calcDevATR(_src, _len, _slope, _y1, _inputDev, _emphasis, _condition)
Calculates an ATR-style deviation with optional emphasis on recent data.
Parameters:
_src (float) : (float) The source data (typically close).
_len (int) : (int) The length of the lookback period.
_slope (float) : (float) The slope of the linear regression.
_y1 (float) : (float) The Y-intercept (oldest bar) of the linear regression.
_inputDev (float) : (float) The input deviation multiplier.
_emphasis (float) : (float) Emphasis factor: 0 for equal weight; >0 emphasizes recent bars; <0 emphasizes older bars.
_condition (bool) : (bool) Flag to enable calculation (true = calculate).
Returns: A 2-element tuple: .
calcPricePositionPercent(_top, _bot, _src)
Calculates the percent position of a price within a linear regression channel. Top=100%, Bottom=0%.
Parameters:
_top (float) : (float) The top (positive) deviation, corresponding to 100%.
_bot (float) : (float) The bottom (negative) deviation, corresponding to 0%.
_src (float) : (float) The source price.
Returns: (float) The percent position within the channel.
plotLinReg(_len, _y1, _y2, _slope, _devTop, _devBot, _scaleTypeLog, _lineWidth, _extendLines, _channelStyle, _colorFill, _colUpLine, _colDnLine, _colUpFill, _colDnFill)
Plots the linear regression line and its deviations, with configurable styles and fill.
Parameters:
_len (int) : (int) The lookback period for the linear regression.
_y1 (float) : (float) The starting y-value of the regression line.
_y2 (float) : (float) The ending y-value of the regression line.
_slope (float) : (float) The slope of the regression line (used to determine line color).
_devTop (float) : (float) The top deviation to add to the line.
_devBot (float) : (float) The bottom deviation to subtract from the line.
_scaleTypeLog (bool) : (bool) Use a log scale if true; otherwise, linear scale.
_lineWidth (int) : (int) The width of the plotted lines.
_extendLines (string) : (string) How lines should extend (none, left, right, both).
_channelStyle (string) : (string) The style of the channel lines (solid, dashed, dotted).
_colorFill (bool) : (bool) Whether to fill the space between the top and bottom deviation lines.
_colUpLine (color) : (color) Line color when slope is positive.
_colDnLine (color) : (color) Line color when slope is negative.
_colUpFill (color) : (color) Fill color when slope is positive.
_colDnFill (color) : (color) Fill color when slope is negative.
Find Untapped LevelsYou can find your daily, weekly and monthly levels with this indicator. You still need to go through each time frame and draw them yourself
Nef33-Volume Footprint ApproximationDescription of the "Volume Footprint Approximation" Indicator
Purpose
The "Volume Footprint Approximation" indicator is a tool designed to assist traders in analyzing market volume dynamics and anticipating potential trend changes in price. It is inspired by the concept of a volume footprint chart, which visualizes the distribution of trading volume across different price levels. However, since TradingView does not provide detailed intrabar data for all users, this indicator approximates the behavior of a footprint chart by using available volume and price data (open, close, volume) to classify volume as buy or sell, calculate volume delta, detect imbalances, and generate trend change signals.
The indicator is particularly useful for identifying areas of high buying or selling activity, imbalances between supply and demand, delta divergences, and potential reversal points in the market. It provides specific signals for bullish and bearish trend changes, making it suitable for traders looking to trade reversals or confirm trends.
How It Works
The indicator uses volume and price data from each candlestick to perform the following calculations:
Volume Classification:
Classifies the volume of each candlestick as "buy" or "sell" based on price movement:
If the closing price is higher than the opening price (close > open), the volume is classified as "buy."
If the closing price is lower than the opening price (close < open), the volume is classified as "sell."
If the closing price equals the opening price (close == open), it compares with the previous close to determine the direction:
If the current close is higher than the previous close, it is classified as "buy."
If the current close is lower than the previous close, it is classified as "sell."
If the current close equals the previous close, the classification from the previous bar is used.
Delta Calculation:
Calculates the volume delta as the difference between buy volume and sell volume (buyVolume - sellVolume).
A positive delta indicates more buy volume; a negative delta indicates more sell volume.
Imbalance Detection:
Identifies imbalances between buy and sell volume:
A buy imbalance occurs when buy volume exceeds sell volume by a defined percentage (default is 300%).
A sell imbalance occurs when sell volume exceeds buy volume by the same percentage.
Delta Divergence Detection:
Positive Delta Divergence: Occurs when the price is falling (for at least 2 bars) but the delta is increasing or becomes positive, indicating that buyers are entering despite the price decline.
Negative Delta Divergence: Occurs when the price is rising (for at least 2 bars) but the delta is decreasing or becomes negative, indicating that sellers are entering despite the price increase.
Trend Change Signals:
Bullish Signal (trendChangeBullish): Generated when the following conditions are met:
There is a positive delta divergence.
The delta has moved from a negative value (e.g., -500) to a positive value (e.g., +200) over the last 3 bars.
There is a buy imbalance.
The price is near a historical support level (approximated as the lowest low of the last 50 bars).
Bearish Signal (trendChangeBearish): Generated when the following conditions are met:
There is a negative delta divergence.
The delta has moved from a positive value (e.g., +500) to a negative value (e.g., -200) over the last 3 bars.
There is a sell imbalance.
The price is near a historical resistance level (approximated as the highest high of the last 50 bars).
Visual Elements
The indicator is displayed in a separate panel below the price chart (overlay=false) and includes the following elements:
Volume Histograms:
Buy Volume: Represented by a green histogram. Shows the volume classified as "buy."
Sell Volume: Represented by a red histogram. Shows the volume classified as "sell."
Note: The histograms overlap, and the last plotted histogram (red) takes visual precedence, meaning the sell volume may cover the buy volume if it is larger.
Delta Line:
Delta Volume: Represented by a blue line. Shows the difference between buy and sell volume.
A line above zero indicates more buy volume; a line below zero indicates more sell volume.
A dashed gray horizontal line marks the zero level for easier interpretation.
Imbalance Backgrounds:
Buy Imbalance: Light green background when buy volume exceeds sell volume by the defined percentage.
Sell Imbalance: Light red background when sell volume exceeds buy volume by the defined percentage.
Divergence Backgrounds:
Positive Delta Divergence: Lime green background when a positive delta divergence is detected.
Negative Delta Divergence: Fuchsia background when a negative delta divergence is detected.
Trend Change Signals:
Bullish Signal: Green label with the text "Bullish Trend Change" when the conditions for a bullish trend change are met.
Bearish Signal: Red label with the text "Bearish Trend Change" when the conditions for a bearish trend change are met.
Information Labels:
Below each bar, a label displays:
Total Vol: The total volume of the bar.
Delta: The delta volume value.
Alerts
The indicator generates the following alerts:
Positive Delta Divergence: "Positive Delta Divergence Detected! Price is falling, but delta is increasing."
Negative Delta Divergence: "Negative Delta Divergence Detected! Price is rising, but delta is decreasing."
Bullish Trend Change Signal: "Bullish Trend Change Signal! Positive Delta Divergence, Delta Rise, Buy Imbalance, and Near Support."
Bearish Trend Change Signal: "Bearish Trend Change Signal! Negative Delta Divergence, Delta Drop, Sell Imbalance, and Near Resistance."
These alerts can be configured in TradingView to receive real-time notifications.
Adjustable Parameters
The indicator allows customization of the following parameters:
Imbalance Threshold (%): The percentage required to detect an imbalance between buy and sell volume (default is 300%).
Lookback Period for Divergence: Number of bars to look back for detecting price and delta trends (default is 2 bars).
Support/Resistance Lookback Period: Number of bars to look back for identifying historical support and resistance levels (default is 50 bars).
Delta High Threshold (Bearish): Minimum delta value 2 bars ago for the bearish signal (default is +500).
Delta Low Threshold (Bearish): Maximum delta value in the current bar for the bearish signal (default is -200).
Delta Low Threshold (Bullish): Maximum delta value 2 bars ago for the bullish signal (default is -500).
Delta High Threshold (Bullish): Minimum delta value in the current bar for the bullish signal (default is +200).
Practical Use
The indicator is useful for the following purposes:
Identifying Trend Changes:
The trend change signals (trendChangeBullish and trendChangeBearish) indicate potential price reversals. For example, a bullish signal near a support level may be an opportunity to enter a long position.
Detecting Divergences:
Delta divergences (positive and negative) can anticipate trend changes by showing a disagreement between price movement and underlying buying/selling pressure.
Finding Key Levels:
Imbalances (green and red backgrounds) often coincide with support and resistance levels, helping to identify areas where the market might react.
Confirming Trends:
A consistently positive delta in an uptrend or a negative delta in a downtrend can confirm the strength of the trend.
Identifying Failed Auctions:
Although not detected automatically, you can manually identify failed auctions by observing a price move to new highs/lows with decreasing volume in the direction of the move.
Limitations
Intrabar Data: It does not use detailed intrabar data, making it less precise than a native footprint chart.
Approximations: Volume classification and support/resistance detection are approximations, which may lead to false signals.
Volume Dependency: It requires reliable volume data, so it may be less effective on assets with inaccurate volume data (e.g., some forex pairs).
False Signals: Divergences and imbalances do not always indicate a trend change, especially in strongly trending markets.
Recommendations
Combine with Other Indicators: Use tools like RSI, MACD, support/resistance levels, or candlestick patterns to confirm signals.
Trade on Higher Timeframes: Signals are more reliable on higher timeframes like 1-hour or 4-hour charts.
Perform Backtesting: Evaluate the indicator's accuracy on historical data to adjust parameters and improve effectiveness.
Adjust Parameters: Modify thresholds (e.g., imbalanceThreshold or supportResistanceLookback) based on the asset and timeframe you are trading.
Conclusion
The "Volume Footprint Approximation" indicator is a powerful tool for analyzing volume dynamics and anticipating price trend changes. By classifying volume, calculating delta, detecting imbalances and divergences, and generating trend change signals, it provides traders with valuable insights into market buying and selling pressure. While it has limitations due to the lack of intrabar data, it can be highly effective when used in combination with other technical analysis tools and on assets with reliable volume data.
Nasan Ultimate Health Index (NUHI)The Nasan Ultimate Health Index (NUHI) is a technical indicator designed to measure the relative health of a stock compared to a benchmark index or sector. By incorporating price action, volume dynamics, and volatility, NUHI provides traders with a clearer picture of a stock’s performance relative to the broader market.
The NUHI is based on the idea that a stock’s relative strength and momentum can be assessed more effectively when adjusted for volume behavior and benchmark comparison. Instead of looking at price movement alone, this indicator factors in:
The stock’s price trend (via EMA)
Volume participation (green vs. red volume) and volume ratio - SMA(volume, 21)/ SMA(volume, 252)
Volatility-adjusted performance (ATR-based scaling)
Comparison with a selected benchmark (e.g., SPX, NDX, sector ETFs)
This results in a normalized and comparative score that helps traders identify outperforming, neutral, and underperforming stocks within a specific market environment.
The NUHI is constructed using the following elements:
1️⃣ Stock Raw Score (Unadjusted Momentum)
The exponential moving average (EMA) of the hlc3 (average of high, low, close) is used to define the price trend.
The difference between the current EMA and the EMA from n bars ago shows whether the stock is gaining or losing momentum.
This difference is divided by the ATR (Average True Range) to adjust for volatility.
2️⃣ Volume Behavior Adjustment
Volume is split into green volume (up candles) and red volume (down candles).
The ratio of green to red volume determines whether buyers or sellers dominate over the selected period (n bars).
If the stock is in an uptrend, green volume is weighted higher; if in a downtrend, red volume is weighted higher.
The stock’s Volume Ratio (short-term SMA divided by long-term SMA) is adjusted based on this weight.
3️⃣ Benchmark Comparison
A similar Raw Score calculation is performed on the selected benchmark (SPX, NDX, or sector ETF).
Benchmark price movements, volume behavior, and ATR adjustments mirror the stock’s calculations.
This provides a reference point for evaluating the stock’s relative strength.
4️⃣ Normalization Process
Both the stock and benchmark raw scores are min-max normalized over the past 252 bars (1-year lookback).
This scales values between 0 and 1, ensuring fair comparisons regardless of absolute price differences.
5️⃣ NUHI Calculation
The final NUHI value is computed using a logarithmic ratio between the normalized stock score and the normalized benchmark score:
This transformation ensures a more symmetrical representation of overperformance and underperformance.
Performance Zones
Strong Outperforming (NUHI between >0.41 and 0.69)
Leading (NUHI between >0.10 and 0.41)
Transitioning Outperformance (NUHI between 0.10 and 0)
Equilibrium (NUHI 0)
Transitioning Underperformance (NUHI between -0.10 and 0)
Lagging (NUHI between < -0.1 and -0.41)
Strong Underperforming (NUHI between< -0.41 and -0.69 )
How to Use NUHI
✅ Identifying Strong Stocks
If NUHI > 0, the stock is outperforming its benchmark.
If NUHI < 0, the stock is underperforming the benchmark.
✅ Trend Confirmation
A steadily rising NUHI and raw score (colored green) suggests sustained strength bullish conditions.
A falling NUHI and raw score (colored orange) indicates weakness and possible rotation into other assets.
✅ Finding Reversals
Bullish Divergence: If NUHI is improving while the stock’s raw score is negative, it may signal a bottoming opportunity.
Bearish Signs: If NUHI is dropping despite price strength, it could hint at underlying weakness.
Why a Stock in a Downtrend Can Have NUHI > 0 (and Vice Versa )
NUHI measures performance relative to both its own history and the benchmark.
A stock’s recent movement is compared to how it usually behaves and how the benchmark is performing.
Example Scenarios:
Stock in a Downtrend but NUHI > 0
The stock may still be in a downtrend (negative raw score), but it’s performing better relative to its past downtrend behavior and better than the benchmark over the same period.
This could mean it’s showing relative strength compared to the broader market or sector.
Stock in an Uptrend but NUHI < 0
Even in a uptrend (positive raw score), the stock might be underperforming relative to its past uptrend behavior and underperforming the benchmark.
What This Means:
NUHI > 0 in a downtrend → The stock is falling less aggressively than usual and/or holding up better than the benchmark.
NUHI < 0 in an uptrend → The stock is gaining less than expected based on its history and/or lagging behind the benchmark.
NUHI helps identify relative strength or weakness .
Forexsom MA Crossover SignalsA Trend-Following Trading Indicator for TradingView
Overview
This indicator plots two moving averages (MA) on your chart and generates visual signals when they cross, helping traders identify potential trend reversals. It is designed to be simple yet effective for both beginners and experienced traders.
Key Features
✅ Dual Moving Averages – Plots a Fast MA (default: 9-period) and a Slow MA (default: 21-period)
✅ Customizable MA Types – Choose between EMA (Exponential Moving Average) or SMA (Simple Moving Average)
✅ Clear Buy/Sell Signals – Displays "BUY" (green label) when the Fast MA crosses above the Slow MA and "SELL" (red label) when it crosses below
✅ Alerts – Get notified when new signals appear (compatible with TradingView alerts)
✅ Clean Visuals – Easy-to-read moving averages with adjustable colors
How It Works
Bullish Signal (BUY) → Fast MA crosses above Slow MA (suggests uptrend)
Bearish Signal (SELL) → Fast MA crosses below Slow MA (suggests downtrend)
Best Used For
✔ Trend-following strategies (swing trading, day trading)
✔ Confirming trend reversals
✔ Filtering trade entries in combination with other indicators
Customization Options
Adjust Fast & Slow MA lengths
Switch between EMA or SMA for smoother or more responsive signals
Why Use This Indicator?
Simple & Effective – No clutter, just clear signals
Works on All Timeframes – From scalping (1M, 5M) to long-term trading (4H, Daily)
Alerts for Real-Time Trading – Never miss a signal
Optimized WPR Strategy with Filters (Debug)Identifying Market Trends:
The 200-period EMA is used to determine the short-term trend of the market.
When the price is above the 200-period EMA, it suggests a potential bullish market and an uptrend, and the strategy will only look for buying opportunities.
When the price is below the 200-period EMA, it suggests a potential bearish market and a downtrend, and the strategy will only look for selling opportunities.
When the 200-period EMA intersects with the price, it indicates that the market may be in a directionless consolidation phase.
Identifying Potential Reversal Points:
The strategy employs two Williams %R (WPR) indicators: one with a 9-period (fast WPR) and another with a 28-period (slow WPR).
WPR is a momentum indicator used to identify overbought and oversold conditions in the market. Its value oscillates between -100 and 0, with values near -100 indicating oversold conditions and values near 0 indicating overbought conditions.
In an uptrend (when the price is above the 200 EMA), the strategy seeks buying opportunities when both WPR indicators cross above -80 (the oversold zone) from below. This is considered a bullish signal, suggesting the market may be about to rebound. Sell signals are ignored at this time.
In a downtrend (when the price is below the 200 EMA), the strategy seeks selling opportunities when both WPR indicators cross below -20 (the overbought zone) from above. This is considered a bearish signal, suggesting the market may be about to reverse downward. Buy signals are ignored at this time.
Summary:
In summary, this strategy first uses the 200-period EMA to determine the overall trend direction of the market. Then, within the confirmed trend direction, it utilizes the simultaneous crossing of the overbought or oversold zones by the dual WPR indicators to identify potential reversal points as entry signals for trading. The strategy emphasizes that trading signals are only valid when both WPR indicators meet the conditions.
Overlay Hourly Candle [odnac] * This script overlays 1-hour candlestick representations on the chart.
* It captures the open, close, high, and low prices for each hourly period.
* The script dynamically updates as new hourly candles form and adjusts the
* box and wick positions accordingly.
*
* Features:
* - Draws an hourly candle with body and wicks.
* - Colors bullish candles in green and bearish candles in red.
* - Updates dynamically as new hourly candles form.
* - Uses TradingView's box and line functions to represent candle structures.
*
* Usage:
* - Add the script to your TradingView chart as an overlay.
* - Observe how the hourly candles appear distinctly on any timeframe.
alphaJohnny Dynamic RSI IndicatorAlphaJohnny Dynamic RSI Indicator (Dyn RSI)
The Dynamic RSI Indicator (Dyn RSI) is a custom Pine Script tool designed for TradingView that aggregates Relative Strength Index (RSI) signals from multiple timeframes to provide a comprehensive view of market momentum. It combines RSI data from Weekly, Daily, 4-hour, 1-hour, and 30-minute intervals, offering traders a flexible and customizable way to analyze trends across different periods.
Key Features:
Multi-Timeframe RSI Aggregation: Combines RSI signals from user-selected timeframes for a holistic momentum assessment.
Dynamic or Equal Weighting: Choose between correlation-based dynamic weights (adjusting based on each timeframe’s correlation with price changes) or equal weights for simplicity.
Smoothed Momentum Line: A visually intuitive line that reflects the strength of the aggregate signal, smoothed for clarity.
Color-Coded Signal Strength:
Dark Green: Strong buy signal
Light Green: Weak buy signal
Yellow: Neutral
Light Red: Weak sell signal
Dark Red: Strong sell signal
Visual Markers: Large green triangles at the bottom for strong buy signals and red triangles at the top for strong sell signals.
How to Use:
Apply to Chart: Add the indicator to your TradingView chart (it will appear in a separate pane).
Customize Settings: Adjust inputs like RSI period, signal thresholds, included timeframes, weighting method, and smoothing period to fit your trading style.
Interpret Signals:
Momentum Line: Watch for color changes to gauge market conditions.
Triangles: Green at the bottom for strong buy opportunities, red at the top for strong sell opportunities.
Notes:
The indicator is designed for a separate pane (overlay=false), with triangles positioned relative to the pane’s range.
Fine-tune thresholds and weights based on your strategy and the asset being analyzed.
The source code is open for modification to suit your needs.
This indicator is ideal for traders seeking a multi-timeframe perspective on RSI to identify potential trend reversals and momentum shifts.
Forex Fire EMA/MA/RSI StrategyEURUSD
The entry method in the Forex Fire EMA/MA/RSI Strategy combines several conditions across two timeframes. Here's a breakdown of how entries are determined:
Long Entry Conditions:
15-Minute Timeframe Conditions:
EMA 13 > EMA 62 (short-term momentum is bullish)
Price > MA 200 (trading above the major trend indicator)
Fast RSI (7) > Slow RSI (28) (momentum is increasing)
Fast RSI > 50 (showing bullish momentum)
Volume is increasing compared to 20-period average
4-Hour Timeframe Confluence:
EMA 13 > EMA 62 (larger timeframe confirms bullish trend)
Price > MA 200 (confirming overall uptrend)
Slow RSI (28) > 40 (showing bullish bias)
Fast RSI > Slow RSI (momentum is supporting the move)
Additional Precision Requirement:
Either EMA 13 has just crossed above EMA 62 (crossover)
OR price has just crossed above MA 200
Short Entry Conditions:
15-Minute Timeframe Conditions:
EMA 13 < EMA 62 (short-term momentum is bearish)
Price < MA 200 (trading below the major trend indicator)
Fast RSI (7) < Slow RSI (28) (momentum is decreasing)
Fast RSI < 50 (showing bearish momentum)
Volume is increasing compared to 20-period average
4-Hour Timeframe Confluence:
EMA 13 < EMA 62 (larger timeframe confirms bearish trend)
Price < MA 200 (confirming overall downtrend)
Slow RSI (28) < 60 (showing bearish bias)
Fast RSI < Slow RSI (momentum is supporting the move)
Additional Precision Requirement:
Either EMA 13 has just crossed under EMA 62 (crossunder)
OR price has just crossed under MA 200
The key aspect of this strategy is that it requires alignment between the shorter timeframe (15m) and the larger timeframe (4h), which helps filter out false signals and focuses on trades that have strong multi-timeframe support. The crossover/crossunder requirement further refines entries by looking for actual changes in direction rather than just conditions that might have been in place for a long time.
Aggregated Spot vs Perp Volume (% Change)Aggregated Spot vs Perp Volume (% Change)
Description
The "Aggregated Spot vs Perp Volume (% Change)" indicator helps crypto traders compare the momentum of spot and perpetual futures (perp) trading volumes across 12 major exchanges. It calculates the percentage change in volume from one bar to the next, highlighting divergences and showing which market—spot or perp—is leading a move. By focusing on relative changes, it eliminates the issue of absolute volume differences, making trends clear.
The indicator aggregates data from Binance, Bybit, OKX, Coinbase, Bitget, MEXC, Phemex, BingX, WhiteBIT, BitMEX, Kraken, and HTX. Users can toggle exchanges and choose to measure volume in coin units (e.g., BTC) or USD.
How It Works
Volume Aggregation:
Fetches spot and perp volume data for the selected crypto (e.g., BTC) from up to 12 exchanges.
Spot volume is included only if perp volume is available for the same pair, ensuring consistency.
Volume can be measured in coin units or USD (volume × spot price).
Percentage Change:
Calculates the percentage change in spot and perp volumes from the previous bar:
Percentage Change = ((Current Volume − Previous Volume) / Previous Volume) ×100
This focuses on relative momentum, making spot and perp volumes directly comparable.
Visualization:
Spot volume % change is plotted as a blue line, and perp volume % change as a red line, both with a linewidth of 1.
Who Should Use It
Crypto Traders: To understand spot vs. perp market dynamics across exchanges.
Momentum Traders: To spot which market is driving price moves via volume divergences.
Scalpers/Day Traders: For identifying short-term shifts in market activity.
Analysts: To study liquidity and sentiment in crypto markets.
How to Use It
Blue line: Spot volume % change.
Red line: Perp volume % change.
Look for divergences (e.g., a sharp rise in the red line but not the blue line suggests perp markets are leading).
Combine with Price:
Use alongside price charts to confirm trends or spot potential reversals.
Context
Spot markets reflect actual asset trading, while perp markets, with leverage, attract speculative activity and often show higher volumes. This indicator uses percentage change to compare their momentum, helping traders identify market leadership and divergences. For example, a 50% increase in both spot and perp volumes plots at the same level, making it easy to see relative shifts across exchanges.
ICT Breakers (BOS / MSS - Market Structure) [ICTProTools]The Breakers (Market Structure) indicator is designed to help traders identify true breaker structures , a key concept in Inner Circle Trader (ICT) methodology. In market structure, Breakers represent powerful shifts where a key high or low is broken, leading to a reversal in market direction. Most tools misinterpret structure shifts, using internal structure , leading to fake breakouts. This tool solves that problem by filtering out false signals , providing clear & structured insights , all with multi-timeframe compatibility.
💎 Key Features
⚡️ Breakers in action
The indicator shows the structure following ICT instructions. A breaker is defined by two lines:
The first line confirms the previous trend (it could be interpreted as a BOS).
The second line highlights the moment price breaks structure (with candle body or wick based on your chosen settings), signaling a shift in trend direction (like an MSS).
Furthermore, it’s important to note that a breaker not only shows the structure, but also defines a potential Point of Interest (POI), an area where price may retrace before continuing its trend.
Here, we can observe two clear structure shifts.
On the far left, the market was in a bearish trend, illustrated by the first visible (dotted and red) line. Shortly after, the second (solid and green) line appears, showing a break that initiates a new bullish trend.
This upward movement continues, with the last confirmation marked by a top structure line. And finally, the structure is broken once again indicating a transition back into a bearish trend.
💪 Real Structure with True Highs / Lows
Unlike many indicators that detect internal breakouts , this tool follows ICT’s true market structure rules .
In a bearish trend , a bullish breaker is only confirmed when the high that created the low is broken , and conversely for a bullish scenario.
Fake breakouts are ignored, preventing misleading signals.
In the image above, the white breakout is correctly ignored by the indicator, as it doesn't align with ICT’s structural rules. That white high is simply part of the internal structure, not the true swing point. Instead, the green line highlights the key level that truly matters, the one whose rupture would have confirmed a real change in market structure.
🔔 Smart Alerts for Structure Updates
Stay one step ahead with customizable alerts designed to notify you instantly when market structure changes occur.
Get notified for BOS (Continuation) and / or MSS (Breaker) events.
Set alerts for bullish , bearish , or both directions.
Choose between once or repeated alerts , based on your strategy.
This feature allows traders to remain focused and reactive , even when monitoring multiple markets.
In the alert settings, select which structure shifts you want to be notified of. Whether you're a scalper or a swing trader, the alerts keep you connected to key moments without needing to constantly monitor the chart.
⏳ Multi-Timeframe Structure
All features of the indicator are fully compatible with higher timeframes .
Get a broader view of market structure without switching timeframes.
Monitor higher timeframe structures and receive alerts, all without leaving your analysis chart .
In this example, the market structure of the 30m timeframe is displayed while on a 5m chart, providing a clearer perspective.
✨ Customization & User Control
Make it yours! The indicator allows full customization:
Swing bars (to confirm high / low)
Select your mode for Breakers (MSS) , using the candle body only or body / wick
Line style (type, width, color)
Choice of displayed timeframe
Activate any alert , with the frequency you want
🎯 Conclusion
✅ Avoid false signals by focusing on true ICT Breakers
✅ Smart alerts to never miss a structural shift
✅ Multi-timeframe support for enhanced analysis
✅ Clean & professional design for an optimal trading experience
Correlation TableThis indicator displays a vertical table that shows the correlation between the asset currently loaded on the chart and up to 32 selected trading pairs. It offers the following features:
Chart-Based Correlation: Correlations are calculated based on the asset you have loaded in your chart, providing relevant insights for your current market focus.
Configurable Pairs: Choose from a list of 32 symbols (e.g., AUDUSD, EURUSD, GBPUSD, etc.) with individual checkboxes to include or exclude each pair in the correlation analysis.
Custom Correlation Length: Adjust the lookback period for the correlation calculation to suit your analysis needs.
Optional EMA Smoothing: Enable an Exponential Moving Average (EMA) on the price data, with a configurable EMA length, to smooth the series before calculating correlations.
Color-Coded Output: The table cells change color based on the correlation strength and direction—neutral, bullish (green), or bearish (red)—making it easy to interpret at a glance.
Clear Table Layout: The indicator outputs a neatly organized vertical table with headers for "Pair" and "Correlation," ensuring the information is displayed cleanly and is easy to understand.
Ideal for traders who want a quick visual overview of how different instruments correlate with their current asset, this tool supports informed multi-asset analysis
ITALIANO:
Questo indicatore visualizza una tabella verticale che mostra la correlazione tra l'asset attualmente caricato sul grafico e fino a 32 coppie di trading selezionate. Offre le seguenti funzionalità:
Correlazione basata sul grafico: le correlazioni vengono calcolate in base all'asset caricato nel grafico, fornendo informazioni pertinenti per il tuo attuale focus di mercato.
Coppie configurabili: scegli da un elenco di 32 simboli (ad esempio, AUDUSD, EURUSD, GBPUSD, ecc.) con caselle di controllo individuali per includere o escludere ciascuna coppia nell'analisi della correlazione.
Lunghezza di correlazione personalizzata: regola il periodo di lookback per il calcolo della correlazione in base alle tue esigenze di analisi.
Smoothing EMA opzionale: abilita una media mobile esponenziale (EMA) sui dati dei prezzi, con una lunghezza EMA configurabile, per smussare la serie prima di calcolare le correlazioni.
Output codificato a colori: le celle della tabella cambiano colore in base alla forza e alla direzione della correlazione, neutra, rialzista (verde) o ribassista (rosso), rendendola facile da interpretare a colpo d'occhio.
Clear Table Layout: l'indicatore genera una tabella verticale ordinatamente organizzata con intestazioni per "Coppia" e "Correlazione", assicurando che le informazioni siano visualizzate in modo chiaro e siano facili da comprendere.
Ideale per i trader che desiderano una rapida panoramica visiva di come diversi strumenti siano correlati con il loro asset corrente, questo strumento supporta un'analisi multi-asset informata
GLXY Support & Resistance ZonesHere’s a structured trading strategy for Galaxy Digital Holdings Ltd. (GLXY) based on a combination of technical analysis, market sentiment, and macro crypto market movement:
⸻
1. Timeframe
• Swing trading timeframe: 1-week to 1-month trades.
• Monitor daily and 4H charts for entries and exits.
⸻
2. Key Factors Driving GLXY
• Strongly correlated to Bitcoin and Ethereum price movement.
• Sensitive to regulatory news in Canada/US and institutional crypto adoption.
• Watch Galaxy’s quarterly earnings and treasury BTC/ETH position updates.
⸻
3. Entry Strategy
A) Technical Setup:
• Buy at major support zones:
• Key support levels: $7.00 CAD, $9.00 CAD (verify current chart levels).
• Enter long positions on bullish reversal candles at these supports.
• Breakout trades:
• Enter long positions on confirmed breakouts above significant resistance (watch volume and 1D close).
• Moving Average Confirmation:
• Only trade long if price is above the 50-day moving average and 50 MA is upward sloping.
B) Macro Confirmation:
• Only take aggressive long positions if BTC price is in an uptrend (above its own 50-day MA).
• Monitor ETH/BTC pair as additional confidence for alt sentiment.
⸻
4. Exit Strategy
• First partial profit target: Previous swing highs or Fibonacci extension levels (commonly 1.272 or 1.618).
• Trailing stop: Move stop-loss to entry when trade is +10%.
• Hard stop-loss: Below the last daily support (2-5% risk).
⸻
5. Diversification
• Do not exceed 5-7% of total portfolio per trade.
• Hedge exposure by monitoring crypto futures or crypto sentiment indexes (eg. Fear & Greed Index).
⸻
6. Optional Short Setup
• Only short if price breaks major support with strong volume, and BTC/ETH are in confirmed downtrends.
• Short target: next daily support zone.
⸻
7. News / Event-based Catalyst
• Enter small positions before major earnings or after big regulatory decisions if crypto sentiment is bullish.
⸻
8. Review
• Reassess the strategy every month based on BTC market structure.
• Track your trade results for GLXY separately to refine position sizing and entry criteria.
⸻
Stacked EMA Candle Colors - Enhanced📊 Stacked EMA Candle Colors – Trend Strength Visualizer
Description:
🚀 Overview:
The Stacked EMA Candle Colors – Trend Strength Visualizer is a simple yet powerful indicator that helps traders identify market trends using Exponential Moving Averages (EMAs). By dynamically coloring candles based on the strength and alignment of multiple EMAs, this tool makes it easier to spot bullish and bearish trends at a glance, without cluttering your chart with multiple EMA lines.
🔹 Key Features:
✅ Four Customizable EMA lengths (adjust in settings)
✅ Candles change color based on EMA stacking (adjustable)
✅ Four-part gradient-based strength visualization for momentum confirmation (adjustable)
✅ Works on all timeframes and asset classes
🎨 How It Works:
When shorter EMAs (e.g., 9, 21) are above longer EMAs (e.g., 50, 200), the trend is bullish, and candles turn green/lime based on momentum strength.
When shorter EMAs are below longer EMAs, the trend is bearish, and candles turn red/pink depending on trend intensity.
If no clear trend is detected, candles remain gray for neutrality.
📈 Ideal for:
✔️ Trend traders who want a clear visual representation of momentum
✔️ Scalpers, day traders, and swing traders looking for quick trend confirmation
✔️ Anyone who wants to enhance their chart readability
🔧 Customization:
Easily adjust the EMA periods in the settings menu to fit your preferred trading strategy!
🚀 Add this indicator to your TradingView chart and spot trends with confidence!
Lower Timeframe *MALower Timeframe Moving Average (MA) Indicator
This indicator calculates a moving average using data from a lower timeframe than the chart's current timeframe.
It provides potentially earlier signals and smoother price action by incorporating more granular price data. It also allows you to keep the same reference frame for your moving average regardless of your currently selected period.
Key Features:
- Uses lower timeframe data to calculate moving averages on higher timeframes
- Supports multiple MA types: SMA, EMA, WMA, VWMA, RMA, and HMA
- Allows selection of various price inputs (close, open, high, low, hl2, hlc3, ohlc4)
- Automatically adjusts MA length based on the ratio between chart timeframe and selected sub-timeframe
15m
5m
IU Bigger than range strategyDESCRIPTION
IU Bigger Than Range Strategy is designed to capture breakout opportunities by identifying candles that are significantly larger than the previous range. It dynamically calculates the high and low of the last N candles and enters trades when the current candle's range exceeds the previous range. The strategy includes multiple stop-loss methods (Previous High/Low, ATR, Swing High/Low) and automatically manages take-profit and stop-loss levels based on user-defined risk-to-reward ratios. This versatile strategy is optimized for higher timeframes and assets like BTC but can be fine-tuned for different instruments and intervals.
USER INPUTS:
Look back Length: Number of candles to calculate the high-low range. Default is 22.
Risk to Reward: Sets the target reward relative to the stop-loss distance. Default is 3.
Stop Loss Method: Choose between:(Default is "Previous High/Low")
- Previous High/Low
- ATR (Average True Range)
- Swing High/Low
ATR Length: Defines the length for ATR calculation (only applicable when ATR is selected as the stop-loss method) (Default is 14).
ATR Factor: Multiplier applied to the ATR to determine stop-loss distance(Default is 2).
Swing High/Low Length: Specifies the length for identifying swing points (only applicable when Swing High/Low is selected as the stop-loss method).(Default is 2)
LONG CONDITION:
The current candle’s range (absolute difference between open and close) is greater than the previous range.
The closing price is higher than the opening price (bullish candle).
SHORT CONDITIONS:
The current candle’s range exceeds the previous range.
The closing price is lower than the opening price (bearish candle).
LONG EXIT:
Stop-loss:
- Previous Low
- ATR-based trailing stop
- Recent Swing Low
Take-profit:
- Defined by the Risk-to-Reward ratio (default 3x the stop-loss distance).
SHORT EXIT:
Stop-loss:
- Previous High
- ATR-based trailing stop
- Recent Swing High
Take-profit:
- Defined by the Risk-to-Reward ratio (default 3x the stop-loss distance).
ALERTS:
Long Entry Triggered
Short Entry Triggered
WHY IT IS UNIQUE:
This strategy dynamically adapts to different market conditions by identifying candles that exceed the previous range, ensuring that it only enters trades during strong breakout scenarios.
Multiple stop-loss methods provide flexibility for different trading styles and risk profiles.
The visual representation of stop-loss and take-profit levels with color-coded plots improves trade monitoring and decision-making.
HOW USERS CAN BENEFIT FROM IT:
Ideal for breakout traders looking to capitalize on momentum-driven price moves.
Provides flexibility to customize stop-loss methods and fine-tune risk management parameters.
Helps minimize drawdowns with a strong risk-to-reward framework while maximizing profit potential.
Stochastic Fusion Elite [trade_lexx]📈 Stochastic Fusion Elite is your reliable trading assistant!
📊 What is Stochastic Fusion Elite ?
Stochastic Fusion Elite is a trading indicator based on a stochastic oscillator. It analyzes the rate of price change and generates buy or sell signals based on various technical analysis methods.
💡 The main components of the indicator
📊 Stochastic oscillator (K and D)
Stochastic shows the position of the current price relative to the price range for a certain period. Values above 80 indicate overbought (an early sale is possible), and values below 20 indicate oversold (an early purchase is possible).
📈 Moving Averages (MA)
The indicator uses 10 different types of moving averages to smooth stochastic lines.:
- SMA: Simple moving average
- EMA: Exponential moving average
- WMA: Weighted moving average
- HMA: Moving Average Scale
- KAMA: Kaufman Adaptive Moving Average
- VWMA: Volume-weighted moving average
- ALMA: Arnaud Legoux Moving Average
- TEMA: Triple exponential moving average
- ZLEMA: zero delay exponential moving average
- DEMA: Double exponential moving average
The choice of the type of moving average affects the speed of the indicator's response to market changes.
🎯 Bollinger Bands (BB)
Bands around the moving average that widen and narrow depending on volatility. They help determine when the stochastic is out of the normal range.
🔄 Divergences
Divergences show discrepancies between price and stochastic:
- Bullish divergence: price is falling and stochastic is rising — an upward reversal is possible
- Bearish divergence: the price is rising, and stochastic is falling — a downward reversal is possible
🔍 Indicator signals
1️⃣ KD signals (K and D stochastic lines)
- Buy signal:
- What happens: the %K line crosses the %D line from bottom to top
- What does it look like: a green triangle with the label "KD" under the chart and the label "Buy" below the bar
- What does this mean: the price is gaining an upward momentum, growth is possible
- Sell signal:
- What happens: the %K line crosses the %D line from top to bottom
- What it looks like: a red triangle with the label "KD" above the chart and the label "Sell" above the bar
- What does this mean: the price is losing its upward momentum, possibly falling
2️⃣ Moving Average Signals (MA)
- Buy Signal:
- What happens: stochastic crosses the moving average from bottom to top
- What it looks like: a green triangle with the label "MA" under the chart and the label "Buy" below the bar
- What does this mean: stochastic is starting to accelerate upward, price growth is possible
- Sell signal:
- What happens: stochastic crosses the moving average from top to bottom
- What it looks like: a red triangle with the label "MA" above the chart and the label "Sell" above the bar
- What does this mean: stochastic is starting to accelerate downwards, a price drop is possible
3️⃣ Bollinger Band Signals (BB)
- Buy signal:
- What happens: stochastic crosses the lower Bollinger band from bottom to top
- What it looks like: a green triangle with the label "BB" under the chart and the label "Buy" below the bar
- What does this mean: stochastic was too low and is now starting to recover
- Sell signal:
- What happens: Stochastic crosses the upper Bollinger band from top to bottom
- What it looks like: a red triangle with a "BB" label above the chart and a "Sell" label above the bar
- What does this mean: stochastic was too high and is now starting to decline
4️⃣ Divergence Signals (Div)
- Buy Signal (Bullish Divergence):
- What's happening: the price is falling, and stochastic is forming higher lows
- What it looks like: a green triangle with a "Div" label under the chart and a "Buy" label below the bar
- What does this mean: despite the falling price, the momentum is already changing in an upward direction
- Sell signal (bearish divergence):
- What's going on: the price is rising, and stochastic is forming lower highs
- What it looks like: a red triangle with a "Div" label above the chart and a "Sell" label above the bar
- What does this mean: despite the price increase, the momentum is already weakening
🛠️ Filters to filter out false signals
1️⃣ Minimum distance between the signals
- What it does: sets the minimum number of candles between signals
- Why it is needed: prevents signals from being too frequent during strong market fluctuations
- How to set it up: Set the number from 0 and above (default: 5)
2️⃣ "Waiting for the opposite signal" mode
- What it does: waits for a signal in the opposite direction before generating a new signal
- Why you need it: it helps you not to miss important trend reversals
- How to set up: just turn the function on or off
3️⃣ Filter by stochastic levels
- What it does: generates signals only when the stochastic is in the specified ranges
- Why it is needed: it helps to catch the moments when the market is oversold or overbought
- How to set up:
- For buy signals: set a range for oversold (for example, 1-20)
- For sell signals: set a range for overbought (for example, 80-100)
4️⃣ MFI filter
- What it does: additionally checks the values of the cash flow index (MFI)
- Why it is needed: confirms stochastic signals with cash flow data
- How to set it up:
- For buy signals: set the range for oversold MFI (for example, 1-25)
- For sell signals: set the range for overbought MFI (for example, 75-100)
5️⃣ The RSI filter
- What it does: additionally checks the RSI values to confirm the signals
- Why it is needed: adds additional confirmation from another popular indicator
- How to set up:
- For buy signals: set the range for oversold MFI (for example, 1-30)
- For sell signals: set the range for overbought MFI (for example, 70-100)
🔄 Signal combination modes
1️⃣ Normal mode
- How it works: all signals (KD, MA, BB, Div) work independently of each other
- When to use it: for general market analysis or when learning how to work with the indicator
2️⃣ "AND" Mode ("AND Mode")
- How it works: the alarm appears only when several conditions are triggered simultaneously
- Combination options:
- KD+MA: signals from the KD and moving average lines
- KD+BB: signals from KD lines and Bollinger bands
- KD+Div: signals from the KD and divergence lines
- KD+MA+BB: three signals simultaneously
- KD+MA+Div: three signals at the same time
- KD+BB+Div: three signals at the same time
- KD+MA+BB+Div: all four signals at the same time
- When to use: for more reliable but rare signals
🔌 Connecting to trading strategies
The indicator can be connected to your trading strategies using 6 different channels.:
1. Connector KD signals: connects only the signals from the intersection of lines K and D
2. Connector MA signals: connects only signals from moving averages
3. Connector BB signal: connects only the signals from the Bollinger bands
4. Connector divergence signals: connects only divergence signals
5. Combined Connector: connects any signals
6. Connector for "And" mode: connects only combined signals
🔔 Setting up alerts
The indicator can send alerts when alarms appear.:
- Alerts for KD: when the %K line crosses the %D line
- Alerts for MA: when stochastic crosses the moving average
- Alerts for BB: when stochastic crosses the Bollinger bands
- Divergence alerts: when a divergence is detected
- Combined alerts: for all types of alarms
- Alerts for "And" mode: for combined signals
🎭 What does the indicator look like on the chart ?
- Main lines K and D: blue and orange lines
- Overbought/oversold levels: horizontal lines at levels 20 and 80
- Middle line: dotted line at level 50
- Stochastic Moving Average: yellow line
- Bollinger bands: green lines around the moving average
- Signals: green and red triangles with corresponding labels
📚 How to start using Stochastic Fusion Elite
1️⃣ Initial setup
- Add an indicator to your chart
- Select the types of signals you want to use (KD, MA, BB, Div)
- Adjust the period and smoothing for the K and D lines
2️⃣ Filter settings
- Set the distance between the signals to get rid of unnecessary noise
- Adjust stochastic, MFI and RSI levels depending on the volatility of your asset
- If you need more reliable signals, turn on the "Waiting for the opposite signal" mode.
3️⃣ Operation mode selection
- First, use the standard mode to see all possible signals.
- When you get comfortable, try the "And" mode for rarer signals.
4️⃣ Setting up Alerts
- Select the types of signals you want to be notified about
- Set up alerts for these types of signals
5️⃣ Verification and adaptation
- Check the operation of the indicator on historical data
- Adjust the parameters for a specific asset
- Adapt the settings to your trading style
🌟 Usage examples
For trend trading
- Use the KD and MA signals in the direction of the main trend
- Set the distance between the signals
- Set stricter levels for filters
For trading in a sideways range
- Use BB signals to detect bounces from the range boundaries
- Use a stochastic level filter to confirm overbought/oversold conditions
- Adjust the Bollinger bands according to the width of the range
To determine the pivot points
- Pay attention to the divergence signals
- Set the distance between the signals
- Check the MFI and RSI filters for additional confirmation
Trendline Breaks with Multi Fibonacci Supertrend StrategyTMFS Strategy: Advanced Trendline Breakouts with Multi-Fibonacci Supertrend
Elevate your algorithmic trading with institutional-grade signal confluence
Strategy Genesis & Evolution
This advanced trading system represents the culmination of a personal research journey, evolving from my custom " Multi Fibonacci Supertrend with Signals " indicator into a comprehensive trading strategy. Built upon the exceptional trendline detection methodology pioneered by LuxAlgo in their " Trendlines with Breaks " indicator, I've engineered a systematic framework that integrates multiple technical factors into a cohesive trading system.
Core Fibonacci Principles
At the heart of this strategy lies the Fibonacci sequence application to volatility measurement:
// Fibonacci-based factors for multiple Supertrend calculations
factor1 = input.float(0.618, 'Factor 1 (Weak/Fibonacci)', minval = 0.01, step = 0.01)
factor2 = input.float(1.618, 'Factor 2 (Medium/Golden Ratio)', minval = 0.01, step = 0.01)
factor3 = input.float(2.618, 'Factor 3 (Strong/Extended Fib)', minval = 0.01, step = 0.01)
These precise Fibonacci ratios create a dynamic volatility envelope that adapts to changing market conditions while maintaining mathematical harmony with natural price movements.
Dynamic Trendline Detection
The strategy incorporates LuxAlgo's pioneering approach to trendline detection:
// Pivotal swing detection (inspired by LuxAlgo)
pivot_high = ta.pivothigh(swing_length, swing_length)
pivot_low = ta.pivotlow(swing_length, swing_length)
// Dynamic slope calculation using ATR
slope = atr_value / swing_length * atr_multiplier
// Update trendlines based on pivot detection
if bool(pivot_high)
upper_slope := slope
upper_trendline := pivot_high
else
upper_trendline := nz(upper_trendline) - nz(upper_slope)
This adaptive trendline approach automatically identifies key structural market boundaries, adjusting in real-time to evolving chart patterns.
Breakout State Management
The strategy implements sophisticated state tracking for breakout detection:
// Track breakouts with state variables
var int upper_breakout_state = 0
var int lower_breakout_state = 0
// Update breakout state when price crosses trendlines
upper_breakout_state := bool(pivot_high) ? 0 : close > upper_trendline ? 1 : upper_breakout_state
lower_breakout_state := bool(pivot_low) ? 0 : close < lower_trendline ? 1 : lower_breakout_state
// Detect new breakouts (state transitions)
bool new_upper_breakout = upper_breakout_state > upper_breakout_state
bool new_lower_breakout = lower_breakout_state > lower_breakout_state
This state-based approach enables precise identification of the exact moment when price breaks through a significant trendline.
Multi-Factor Signal Confluence
Entry signals require confirmation from multiple technical factors:
// Define entry conditions with multi-factor confluence
long_entry_condition = enable_long_positions and
upper_breakout_state > upper_breakout_state and // New trendline breakout
di_plus > di_minus and // Bullish DMI confirmation
close > smoothed_trend // Price above Supertrend envelope
// Execute trades only with full confirmation
if long_entry_condition
strategy.entry('L', strategy.long, comment = "LONG")
This strict requirement for confluence significantly reduces false signals and improves the quality of trade entries.
Advanced Risk Management
The strategy includes sophisticated risk controls with multiple methodologies:
// Calculate stop loss based on selected method
get_long_stop_loss_price(base_price) =>
switch stop_loss_method
'PERC' => base_price * (1 - long_stop_loss_percent)
'ATR' => base_price - long_stop_loss_atr_multiplier * entry_atr
'RR' => base_price - (get_long_take_profit_price() - base_price) / long_risk_reward_ratio
=> na
// Implement trailing functionality
strategy.exit(
id = 'Long Take Profit / Stop Loss',
from_entry = 'L',
qty_percent = take_profit_quantity_percent,
limit = trailing_take_profit_enabled ? na : long_take_profit_price,
stop = long_stop_loss_price,
trail_price = trailing_take_profit_enabled ? long_take_profit_price : na,
trail_offset = trailing_take_profit_enabled ? long_trailing_tp_step_ticks : na,
comment = "TP/SL Triggered"
)
This flexible approach adapts to varying market conditions while providing comprehensive downside protection.
Performance Characteristics
Rigorous backtesting demonstrates exceptional capital appreciation potential with impressive risk-adjusted metrics:
Remarkable total return profile (1,517%+)
Strong Sortino ratio (3.691) indicating superior downside risk control
Profit factor of 1.924 across all trades (2.153 for long positions)
Win rate exceeding 35% with balanced distribution across varied market conditions
Institutional Considerations
The strategy architecture addresses execution complexities faced by institutional participants with temporal filtering and date-range capabilities:
// Time Filter settings with flexible timezone support
import jason5480/time_filters/5 as time_filter
src_timezone = input.string(defval = 'Exchange', title = 'Source Timezone')
dst_timezone = input.string(defval = 'Exchange', title = 'Destination Timezone')
// Date range filtering for precise execution windows
use_from_date = input.bool(defval = true, title = 'Enable Start Date')
from_date = input.time(defval = timestamp('01 Jan 2022 00:00'), title = 'Start Date')
// Validate trading permission based on temporal constraints
date_filter_approved = time_filter.is_in_date_range(
use_from_date, from_date, use_to_date, to_date, src_timezone, dst_timezone
)
These capabilities enable precise execution timing and market session optimization critical for larger market participants.
Acknowledgments
Special thanks to LuxAlgo for the pioneering work on trendline detection and breakout identification that inspired elements of this strategy. Their innovative approach to technical analysis provided a valuable foundation upon which I could build my Fibonacci-based methodology.
This strategy is shared under the same Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license as LuxAlgo's original work.
Past performance is not indicative of future results. Conduct thorough analysis before implementing any algorithmic strategy.