Master LTC/BTC Mining Energy Ratio, Usage (GW) & Miner CountThis Pine Script indicator, "Master LTC/BTC Mining Energy Ratio, Usage (GW) & Miner Count," calculates and visualizes key metrics for Litecoin (LTC) and Bitcoin (BTC) mining operations. Using IntoTheBlock hashrate data, it estimates the number of L7 (LTC) and S19 (BTC) miners, computes energy consumption in gigawatts (GW) based on calibrated efficiency values, and derives the LTC/BTC energy ratio as a percentage. The script plots these metrics—energy ratio, LTC/BTC energy usage, and miner counts (in thousands)—and displays a concise table summarizing the results. Assuming most miners use previous-generation hardware, it provides a clear comparison of the energy dynamics between LTC’s Scrypt and BTC’s SHA-256 algorithms.
Indicatori e strategie
Tighter Support, Resistance, and Consolidation ZonesScript that shows Support, Resistance and Consolidation.
Zweig Market Breadth Thrust Indicator+Trigger [LazyBear x rwak]The Breadth Thrust (BT) indicator is a market momentum indicator developed by Dr. Martin Zweig. According to Dr. Zweig, a Breadth Thrust occurs when, during a 10-day period, the Breadth Thrust indicator rises from below 40 percent to above 61.5 percent.
A "Thrust" indicates that the stock market has rapidly changed from an oversold condition to one of strength, but has not yet become overbought. This is very rare and has happened only a few times. Dr. Zweig also points out that most bull markets begin with a Breadth Thrust.
This version of the Breadth Thrust indicator includes a trigger visualized with red circles, making it easier to spot when the indicator crosses the critical 61.5% level, signaling potential bullish momentum.
All parameters are configurable. You can draw BT for NYSE, NASDAQ, AMEX, or based on combined data (i.e., AMEX+NYSE+NASD). There is also a "CUSTOM" mode supported, so you can enter your own ADV/DEC symbols.
Credit: The original Breadth Thrust logic was created by LazyBear, whose public indicators can be found here , and app-store indicators here .
More info:
Definition of Breadth Thrust
A Breadth Thrust Signal
A Rare "Zweig" Buy Signal
Zweig Breadth Thrust: Redux
Returns & Distance from ATHHere’s what that Pine Script does, in everyday terms:
1. **Look back in time**
- It grabs the closing price from **3 months ago** and **1 month ago** by asking TradingView’s “monthly” data for the symbol.
2. **Calculate percentage changes**
- **3-month return** = (today’s close – close 3 months ago) ÷ (close 3 months ago) × 100
- **1-month return** = (today’s close – close 1 month ago) ÷ (close 1 month ago) × 100
3. **Track the highest price ever seen (ATH)**
- It keeps a running “all-time high” variable, updating it any time today’s high exceeds the previous ATH.
4. **Compute how far you are below ATH**
- **% from ATH** = (ATH – today’s close) ÷ ATH × 100
5. **Build a little stats table on your chart**
- It makes a 2-row by 3-column box in the **top-center** of your price panel.
- The **first row** has labels: “3M % Return”, “1M % Return”, “% from ATH”.
- The **second row** shows the three computed numbers, each formatted to two decimal places and suffixed with “%.”
6. **Refresh only once per bar**
- All of these values and the table get updated **at the close** of each bar, so your table always shows the latest stats without cluttering the chart with extra drawings.
In short, this indicator quietly collects the right historical prices, does three simple percent-change math steps, and then displays those three key numbers in a neat, always-visible box at the top of your TradingView chart.
RSI Strength & Consolidation Zones (Zeiierman)█ Overview
RSI Strength & Consolidation Zones (Zeiierman) is a hybrid momentum and volatility visualization tool that blends enhanced RSI interpretation with ADX-driven consolidation detection. This indicator doesn't just show where RSI is trending — it interprets how strong that trend is, when that strength changes, and where the market may be consolidating in anticipation of breakout movement.
Using a combination of Kalman-filtered RSI, custom-built DMI/ADX, and low-volatility zone recognition, it gives traders a dynamic RSI with strength-based coloring, while also highlighting consolidation zones to spot breakout opportunities.
█ Its uniqueness
Traditional RSI indicators lack context. They may show you when the market is overbought or oversold, but they won’t tell you how strong that condition is, or whether it’s likely to result in continuation or consolidation.
This tool aims to solve that by introducing adaptive strength metrics and structural compression zones, allowing traders to anticipate when the market is likely preparing for a move.
█ How It Works
⚪ Enhanced RSI
Combines traditional RSI and a custom RSI implementation
Smooths both through a Kalman filter for trend direction
Final RSI line reflects smoothed consensus between manual and built-in RSI
Adds an RSI + Strength overlay to show when the directional conviction is increasing
⚪ ADX-Driven Strength Layer
Directional Movement Index (DMI) is calculated both manually and with built-in smoothing
The average ADX value is used to calculate a strength modifier
When ADX exceeds 20, RSI is dynamically enhanced or dampened to reflect directional force
Resulting visual: RSI appears stronger or weaker based on confirmed trend conditions
⚪ Consolidation Zone Detection
When ADX falls below 20, the indicator enters a consolidation zone state
Boxes are drawn dynamically to contain the price within these low-volatility structures
Once the price breaks out of the zone, the indicator plots a breakout signal (▲ or ▼)
⚪ Breakouts
Breakout markers are placed at the first close outside the consolidation box
These signals serve as early indicators for potential trend continuation or reversal
█ How to Use
⚪ Confirm Momentum Strength
Use the RSI + Strength line to determine whether current momentum is backed by trend conviction. If strength expands alongside rising RSI, the move has confirmation.
⚪ Consolidations Zones
When RSI is around the midline, and a consolidation box appears, expect lower volatility and a range-bound market, followed by a breakout.
⚪ Use Breakout Signals for Entry
Look for ▲ or ▼ markers as early triggers. These often coincide with volume expansions or structural breaks.
█ Settings Explained
RSI Length – Number of bars used for RSI. Shorter = more sensitive.
DMI Length – Used in both custom and built-in ADX/DI calculations.
ADX Smoothing – Smooths the trend strength signal. Higher values = smoother strength detection.
Trend Confirmation (Filter Strength) – Adjusts the responsiveness of the Kalman filter.
-----------------
Disclaimer
The content provided in my scripts, indicators, ideas, algorithms, and systems is for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or a solicitation to buy or sell any financial instruments. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
Trend Direction on 1 Hour Timeframe1 Hour timeframe indicator of trend direction using EMA 9/21. Chart as background color indicating trend.
NR4/NR7 + Trend + Refined MACD + VWAP FilterRefined Trend-Following Strategy with NR4/NR7, MACD, and VWAP Filters
This trading strategy combines multiple technical filters to identify high-probability momentum setups, using a refined approach to the MACD for added precision. It’s designed for active traders looking to capitalise on strong trends while avoiding false signals.
Key Features:
Narrow Range Days (NR4/NR7): The strategy first looks for stocks with a narrow range, either NR4 (lowest range of the last four days) or NR7 (lowest range of the last seven days). This identifies stocks that have consolidated and may be preparing for a breakout or strong move.
Trend Analysis with EMAs: Price must be above the 20-period EMA, confirming a bullish trend. Additionally, the 10-period EMA must be above the 20-period EMA, ensuring that the short-term trend is aligned with the longer-term trend, adding to the setup’s strength.
Refined MACD Filter:
If the fast MACD line (12-period) is above the slow MACD line (26-period), the strategy accepts any difference, allowing for a full range of momentum opportunities.
If the fast MACD line is below the slow MACD line, the difference must be no more than 5%. This allows the strategy to capture tight price action setups without excluding potential trends due to a small discrepancy.
VWAP Confirmation: The strategy requires the price to be above the Volume Weighted Average Price (VWAP), adding a layer of volume-based confirmation to ensure that the stock is in a strong, positive trend relative to its average price.
Why This Works: This system is designed to take advantage of stocks that show consolidation (NR4/NR7) and then provide a clear, systematic approach for confirming their breakout potential through trend-following indicators like EMAs, MACD, and VWAP. The nuanced MACD filter adds a layer of flexibility, ensuring that no potential trend is overlooked while preventing false signals due to slight technical discrepancies.
By combining multiple layers of trend confirmation and dynamic filters for volatility, momentum, and volume, the strategy offers a refined approach to capturing high-probability setups, helping traders avoid overfitting to noise and focus on the most promising opportunities.
NR4/NR7 + Trend + MACD + VWAP FilterThe Ultimate Momentum-Compression Strategy
This strategy merges the power of price compression and trend confirmation, ensuring you're trading when the market is coiled and ready to move. By combining multiple filters—NR4/NR7, trend alignment, MACD momentum, and VWAP support—this setup identifies high-probability trade opportunities in dynamic, trending stocks. Here's how it works:
NR4/NR7 Patterns: These are narrow-range days where the current price range is smaller than the previous 4 or 7 days. This signals potential breakout or continuation setups, as the market is compressing before making a move.
Trend Confirmation: To ensure you're not trading against the current trend, the price must be above the 20 EMA, and the 10 EMA must be above the 20 EMA. This confirms a bullish structure, with the price trending in your favour.
MACD Momentum: The fast MACD line must be above the slow MACD line, confirming the trend is not only intact but also gaining momentum.
VWAP Filter: Price must be above the VWAP (Volume Weighted Average Price). This is the final confirmation that the market is in a strong, bullish phase, with buyers dominating the market.
By requiring all these conditions to align, this strategy takes the guesswork out of day trading. It ensures you're trading within a well-established trend, with compression patterns and momentum backing your trade. The result? You’re entering positions with confidence and clarity, poised to ride strong, sustained moves.
This strategy is for the trader who values both flexibility and discipline—able to capture dynamic moves while staying aligned with market structure and momentum. It’s a refined, systematic approach that makes decisions clear, without the emotional second-guessing.
ka66: ADR EstimationThis is based on Daryl Guppy's Average Daily Range indicator, the link is difficult to find, but it is an estimation/projection indicator for a daily range.
The thesis is (if I understand correctly):
The range (high - low) of a particular day can be determined, with 85% probability, by taking the ranges of the last 5 days, and getting their average, then multiplying this average value by 0.75. This final value is the estimated range for the next day.
The indicator does not say anything about potential direction, so it may be used as a Take Profit or Stop Loss estimator for the trading strategy in use. Either on the daily timeframe, or an intraday timeframe.
And if we enter the market intraday for a day trade, when the day's range has already exceeded or is close to exceeding the estimated/projected value, perhaps the move is already quite exhausted, and the trade needs to be reconsidered.
A further implication is: if 0.75 multiple occurs with 85% probability, then a lower multiple is even more probable, if one was looking for a more conservative estimate.
The indicator shows three things for a visual inspection of the validity of this concept (and allows basic customisation of parameters):
The day's range, shown in a translucent gray/deep green, as columns. This is the current bar's range. If intraday, it will repaint.
The 5 day average up to the current bar, shown as a step-line plot in orange. If intraday, it will repaint.
The projected range: a thinner blue histogram column, this is offset one bar forward, as it is a future estimate/forward-looking. It too will repaint if the current day is still not complete.
To evaluate the historical results of the chosen settings visually (eye-ball it!), compare the blue histogram bar to the gray bar/column, i.e. the estimate vs. actual range:
When the blue bar is generally within the gray column, and close enough to that column's size/range, then the projected estimation has been reasonable.
if the blue bar tends to be relatively smaller than the gray bar, then we are underestimating often. Increase the projection multiple setting, as a simple fix.
if the blue bar tends to exceed the range of the gray bar a lot, we are overestimating often. Lower the projection multiple setting, as a simple fix.
Guppy's document says that they basically calculate this ADR for multiple markets and focus on markets with the top 5 ranges (in descending order, of course), to maximise the profit potential on intraday trades planned for the next day. Because it is an estimation, this calculation can be run at the end of the day on completed bars.
This indicator also allows displaying the value as percentages, taking the logic of the ATR% (ATR Percent) indicator, which divides the ATR by the close value and multiplies it by 100 to get a normalised percentage value, allowing it to be compared across markets (but in the same timeframe!).
Godfather of Support & Resistance Godfather of Support & Resistance
Overview
The Godfather of Support & Resistance script is a powerful tool designed to help traders identify critical support and resistance levels on their charts. These price levels are vital for understanding market behavior, as they often act as turning points where prices reverse, consolidate, or break through. By automating the detection of these levels, this script simplifies your trading decisions and enhances your technical analysis.
How It Works
Pivot Points for Level Detection:
The script uses pivot points to identify potential support (lows) and resistance (highs) levels:
A pivot high is a local peak (a high surrounded by lower highs).
A pivot low is a local trough (a low surrounded by higher lows).
You can adjust the Pivot Length (pivotLen) input to control the sensitivity of detection. Smaller values detect more levels, while larger values focus on major levels.
Dynamic Grouping with Tolerance:
The script dynamically groups nearby price levels using a tolerance percentage. This tolerance is based on the level's price, making it adaptive to all types of assets (low- and high-priced).
For example, if the tolerance is set to 1% and a level is at $100, levels within $1 are grouped together.
Touch Count for Significance:
The script tracks how many times the price interacts with each level (touch count). Only levels that meet or exceed the Minimum Touches (minTouches) input are displayed on the chart. This ensures only meaningful levels are highlighted.
Clear Visual Representation:
Resistance Levels (Red Lines): Represent areas where the price tends to reverse downward.
Support Levels (Green Lines): Represent areas where the price tends to reverse upward.
Labels are added to each level (optional) to display the price and the number of touches for better decision-making.
Inputs You Can Customize
Minimum Touches to Show Level:
Set the minimum number of price interactions required for a level to be displayed.
Maximum Lines to Keep:
Limit the number of support and resistance lines displayed to keep your chart clean and focused.
Pivot Length:
Customize the sensitivity of pivot point detection. Smaller values detect more levels, while larger values focus on key levels.
Tolerance for Touch Detection (%):
Adjust the grouping tolerance as a percentage of the price. For example, 1% groups levels that are within 1% of each other.
How to Use
Apply the Script:
Add the script to your TradingView chart, and it will automatically detect and plot support and resistance levels.
Analyze the Levels:
Use Resistance Levels (red lines) as potential sell zones or areas to place stop-loss orders above.
Use Support Levels (green lines) as potential buy zones or areas to place stop-loss orders below.
Customize for Your Trading Style:
Adjust the inputs to match your preferred strategy and the timeframe or asset you're analyzing.
Example Use Case
Imagine you're analyzing a stock:
Resistance Level: The script identifies resistance at $150 with 3 touches. This might be a potential sell zone if the price struggles to break through.
Support Level: The script identifies support at $130 with 4 touches. This might be a potential buy zone if the price shows signs of bouncing upward.
Key Features
Automatically detects and plots support and resistance levels.
Tracks the number of price touches to filter out weak levels.
Adapts dynamically to price ranges using a percentage-based tolerance.
Fully customizable to suit different trading styles and assets.
Clean and professional chart display with a limit on the number of lines.
Notes
This script is for educational purposes only and should not be considered financial advice.
Always perform your own analysis and manage risk before making trading decisions.
Why Use This Script?
The Godfather of Support & Resistance script simplifies your trading decisions by automating the detection of critical price levels. Whether you're a beginner or an experienced trader, this script is designed to save you time and help you focus on making informed trades.
Start using it today to master the art of support and resistance trading!
Let me know if you need further refinements for this description!
Multi-Timeframe Support & Resistance - KSKClean Multi-Timeframe Support & Resistance (S&R) Tool
This indicator automatically plots previous period Highs and Lows for:
🟢 Daily
🔵 Weekly
🟣 Monthly
It provides a clean visual reference for key market levels, which can act as areas of:
Support & Resistance
Breakout or Rejection zones
Entry/Exit decision points
Table Summary:
Compact 2-column table showing all major levels
Can be positioned manually (Top Left, Top Right, etc.)
Auto-refreshes every few bars for performance
GER MCB V2My version of Market Cipher B. V1
Combination of oscillator, vwap, rsi all in one.
Multi-timeframe.
SuperZweig thrust (<= 30 dias)SuperZweig Thrust (≤ 30-day breadth trigger)
This study tracks the classic Zweig Breadth Thrust pattern, but restricts valid signals to a 30-bar (≈ 30-trading-day) window.
---
What it plots
| Plot | Meaning |
|------|---------|
| **Blue line** – `EMA10` | 10-bar exponential moving average of the _breadth ratio_:`advancing issues / (advancing + declining)` |
| **Red h-line 0.35** | Oversold threshold ( < 0.35 ) |
| **Green h-line 0.64** | Overbought threshold ( > 0.64 ) |
| **Red “×”** | The moment EMA10 crosses **down** through 0.35 |
| **Green “●”** | The moment EMA10 crosses **up** through 0.64 |
| **Green “BUY” label** | Complete Super-Zweig thrust: red × followed by green ● **within 30 daily bars** |
Signal logic
1. **Trigger phase** – when EMA10 drops below 0.35
*Script starts a 30-bar countdown.*
2. **Confirmation phase** – if, while the countdown is active, EMA10 rises above 0.64:
*A single “BUY” label is plotted beneath that bar.*
3. **Expiry** – if 30 bars elapse without the 0.64 cross, the cycle resets; no signal is produced.
4. After any valid “BUY” the cycle also resets, so a new signal requires a fresh cross < 0.35.
Inputs
* **EMA length** – default 10.
* **Advancing / Declining symbols** – default `ADVS` / `DECS` (NYSE issues); can be pointed to any Exchange-specific or custom breadth tickers.
Typical use
Apply on a **daily chart** of a broad index (e.g., S&P; 500).
A printed “BUY” indicates a historically rare surge in market breadth often associated with durable rallies. Combine with other risk-management and trend filters before trading.
NR4/NR7 + Trend + MACD Filter📈 NR4/NR7 Breakout Scanner — with Trend & Momentum Filters
This script scans for NR4 and NR7 patterns—tight inside days that often precede explosive moves. But we don’t stop there. We filter for high-probability setups only, using:
✅ Trend Confirmation:
Price is above the 20 EMA
10 EMA is above the 20 EMA
(We’re not buying weakness. The structure must be bullish.)
✅ Momentum Confirmation (MACD Filter):
The MACD fast line is above the signal line
(Momentum must already be in gear—not catching a falling knife.)
This combo gives you a coiled spring setup—tight range, in a clear trend, with momentum pushing in your favour.
It’s ideal for breakout traders, swing traders, and anyone who wants to avoid false starts on the wrong side of the tape.
NR4 setups are marked orange,
NR7 setups are marked purple.
Stick to the right side of the trend, and let the squeeze do the rest.
[blackcat] L2 Volatility ShieldOVERVIEW
The L2 Volatility Shield indicator merges the Parabolic SAR (PSAR) with a volatility filter to provide dynamic stop-loss levels tailored to market conditions. This tool assists traders in identifying suitable shield loss positions to safeguard their trading capital amidst market volatility. It enhances traditional PSAR shields by incorporating the True Range (TR), enabling precise tracking of significant price movements 📊✅.
FEATURES
Combines PSAR and True Range (TR) for enhanced volatility analysis:
PSAR: Determines potential trend reversals based on price action.
True Range: Measures market volatility using high-low differences and price extremes.
Generates a Volatility Shield Line:
Adjusted dynamically based on volatility settings.
Reflects changing market conditions and provides clear visual cues.
Customizable parameters for personalized use:
Volatility Period: Lookback window for volatility measurement.
Volatility Multiplier: Controls the sensitivity of stop-loss adjustments.
Visual representation with gradient colors indicating varying volatility levels 🎨
HOW TO USE
Add the indicator to your TradingView chart by selecting it from the indicators list.
Set the Volatility Period and Volatility Multiplier according to your preferred sensitivity.
Monitor the Volatility Shield Line on the chart for dynamic stop-loss guidance.
Consider entering or exiting positions based on price interactions with the shield line.
Adjust parameters as needed to fit different trading instruments and timeframes.
CALCULATION STEPS
Calculate the PSAR indicator using predefined parameters.
Compute the True Range as the maximum of:
High-Low difference.
Difference between high and previous close.
Difference between low and previous close.
Determine the Volatility Shield Line by adjusting PSAR with volatility factors derived from TR, period, and multiplier.
Plot the shield line on the chart with gradient colors reflecting current volatility levels.
STRATEGIES FOR USING THE VOLATILITY SHIELD LINE
Enter long positions when prices break above the shield line.
Enter short positions when prices fall below the shield line.
Close existing positions or take counter-trades upon breaches of the shield line.
Adapt parameters to suit diverse trading environments and asset classes.
LIMITATIONS
May produce false signals during extreme market events or rapid shifts.
Requires thorough testing and optimization for individual trading styles and assets.
Effectiveness varies depending on market conditions and selected parameters.
NOTES
Ensure adequate historical data for accurate calculations.
Backtest extensively on demo accounts before deploying in live trading scenarios.
Fine-tune parameters regularly to maintain relevance amid evolving market dynamics.
NR4/NR7 + Refined Trend FilterThis version allows the candle to pull toward the 10 EMA without disqualifying the trend—but keeps things on a bullish leash.
Machine Learning | Adaptive Trend Signals [Bitwardex]⚙️🧠Machine Learning | Adaptive Trend Signals
🔷Overview
Machine Learning | Adaptive Trend Signals is a Pine Script™ v6 indicator designed to visualize market trends and generate signals through a combination of volatility clustering, Gaussian smoothing, and adaptive trend calculations. Built as an overlay indicator, it integrates advanced techniques inspired by machine learning concepts, such as K-Means clustering, to adapt to changing market conditions. The script is highly customizable, includes a backtesting module, and supports alert conditions, making it suitable for traders exploring trend-based strategies and developers studying volatility-driven indicator design.
🔷Functionality
The indicator performs the following core functions:
• Volatility Clustering: Uses K-Means clustering to categorize market volatility into high, medium, and low states, adjusting trend sensitivity accordingly.
• Trend Calculation: Computes adaptive trend lines (SmartTrend) based on volatility-adjusted standard deviation, smoothed RSI, and ADX filters.
• Signal Generation: Identifies potential buy and sell points through trend line crossovers and directional confirmation.
• Backtesting Module: Tracks trade outcomes based on the SmartTrend3 value, displaying win rate and total trades.
• Visualization: Plots trend lines with gradient colors and optional signal markers (bullish 🐮 and bearish 🐻).
• Alerts: Provides configurable alerts for trend shifts and volatility state changes.
🔷Technical Methodology
Volatility Clustering with K-Means
The indicator employs a K-Means clustering algorithm to classify market volatility, measured via the Average True Range (ATR), into three distinct clusters:
• Data Collection: Gathers ATR values over a user-defined training period (default: 100 bars).
• Centroid Initialization: Sets initial centroids at the highest, lowest, and midpoint ATR values within the training period.
• Iterative Clustering: Assigns ATR data points to the nearest centroid, recalculates centroid means, and repeats until convergence.
• Dynamic Adjustment: Assigns a volatility state (high, medium, or low) based on the closest centroid, adjusting the trend factor (e.g., tighter for high volatility, wider for low volatility).
This approach allows the indicator to adapt its sensitivity to varying market conditions, providing a data-driven foundation for trend calculations.
🔷Gaussian Smoothing
To enhance signal clarity and reduce noise, the indicator applies Gaussian kernel smoothing to:
• RSI: Smooths the Relative Strength Index (calculated from OHLC4) to filter short-term fluctuations.
• SmartTrend: Smooths the primary trend line for a more stable output.
The Gaussian kernel uses a sigma value derived from the user-defined smoothing length, ensuring mathematically consistent noise reduction.
🔷SmartTrend Calculation
The pineSmartTrend function is the core of the indicator, producing three trend lines:
• SmartTrend: The primary trend line, calculated using a volatility-adjusted standard deviation, smoothed RSI, and ADX conditions.
• SmartTrend2: A secondary trend line with a wider factor (base factor * 1.382) for signal confirmation.
SmartTrend3: The average of SmartTrend and SmartTrend2, used for plotting and backtesting.
Key components of the calculation include:
• Dynamic Standard Deviation: Scales based on ATR relative to its 50-period smoothed average, with multipliers (1.0 to 1.4) applied according to volatility thresholds.
• RSI and ADX Filters: Requires RSI > 50 for bullish trends or < 50 for bearish trends, alongside ADX > 15 and rising to confirm trend strength.
Volatility-Adjusted Bands: Constructs upper and lower bands around price action, adjusted by the volatility cluster’s dynamic factor.
🔷Signal Generation
The generate_signals function generates signals as follows:
• Buy Signal: Triggered when SmartTrend crosses above SmartTrend2 and the price is above SmartTrend, with directional confirmation.
• Sell Signal: Triggered when SmartTrend crosses below SmartTrend2 and the price is below SmartTrend, with directional confirmation.
Directional Logic: Tracks trend direction to filter out conflicting signals, ensuring alignment with the broader market context.
Signals are visualized as small circles with bullish (🐮) or bearish (🐻) emojis, with an option to toggle visibility.
🔷Backtesting
The get_backtest function evaluates signal outcomes using the SmartTrend3 value (rather than closing prices) to align with the trend-based methodology.
It tracks:
• Total Trades: Counts completed long and short trades.
• Win Rate: Calculates the percentage of trades where SmartTrend3 moves favorably (higher for longs, lower for shorts).
Position Management: Closes opposite positions before opening new ones, simulating a single-position trading system.
Results are displayed in a table at the top-right of the chart, showing win rate and total trades. Note that backtest results reflect the indicator’s internal logic and should not be interpreted as predictive of real-world performance.
🔷Visualization and Alerts
• Trend Lines: SmartTrend3 is plotted with gradient colors reflecting trend direction and volatility cluster, accompanied by a secondary line for visual clarity.
• Signal Markers: Optional buy/sell signals are plotted as small circles with customizable colors.
• Alerts: Supports alerts for:
• Bullish and bearish trend shifts (confirmed on bar close).
Transitions to high, medium, or low volatility states.
🔷Input Parameters
• ATR Length (default: 14): Period for ATR calculation, used in volatility clustering.
• Period (default: 21): Common period for RSI, ADX, and standard deviation calculations.
• Base SmartTrend Factor (default: 2.0): Base multiplier for volatility-adjusted bands.
• SmartTrend Smoothing Length (default: 10): Length for Gaussian smoothing of the trend line.
• Show Buy/Sell Signals? (default: true): Enables/disables signal markers.
• Bullish/Bearish Color: Customizable colors for trend lines and signals.
🔷Usage Instructions
• Apply to Chart: Add the indicator to any TradingView chart.
• Configure Inputs: Adjust parameters to align with your trading style or market conditions (e.g., shorter ATR length for faster markets).
• Interpret Output:
• Trend Lines: Use SmartTrend3’s direction and color to gauge market bias.
• Signals: Monitor bullish (🐮) and bearish (🐻) markers for potential entry/exit points.
• Backtest Table: Review win rate and total trades to understand the indicator’s behavior in historical data.
• Set Alerts: Configure alerts for trend shifts or volatility changes to support manual or automated trading workflows.
• Combine with Analysis: Use the indicator alongside other tools or market context, as it is designed to complement, not replace, comprehensive analysis.
🔷Technical Notes
• Data Requirements: Requires at least 100 bars for accurate volatility clustering. Ensure sufficient historical data is loaded.
• Market Suitability: The indicator is designed for trend detection and may perform differently in ranging or volatile markets due to its reliance on RSI and ADX filters.
• Backtesting Scope: The backtest module uses SmartTrend3 values, which may differ from price-based outcomes. Results are for informational purposes only.
• Computational Intensity: The K-Means clustering and Gaussian smoothing may increase processing time on lower timeframes or with large datasets.
🔷For Developers
The script is modular, well-commented, encouraging reuse and modification with proper attribution.
Key functions include:
• gaussianSmooth: Applies Gaussian kernel smoothing to any data series.
• pineSmartTrend: Computes adaptive trend lines with volatility and momentum filters.
• getDynamicFactor: Adjusts trend sensitivity based on volatility clusters.
• get_backtest: Evaluates signal performance using SmartTrend3.
Developers can extend these functions for custom indicators or strategies, leveraging the volatility clustering and smoothing methodologies. The K-Means implementation is particularly useful for adaptive volatility analysis.
🔷Limitations
• The indicator is not predictive and should be used as part of a broader trading strategy.
• Performance varies by market, timeframe, and parameter settings, requiring user experimentation.
• Backtest results are based on historical data and internal logic, not real-world trading conditions.
• Volatility clustering assumes sufficient historical data; incomplete data may affect accuracy.
🔷Acknowledgments
Developed by Bitwardex, inspired by machine learning concepts and adaptive trading methodologies. Community feedback is welcome via TradingView’s platform.
🔷 Risk Disclaimer
Trading involves significant risks, and most traders may incur losses. Bitwardex AI Algo is provided for informational and educational purposes only and does not constitute financial advice or a recommendation to buy or sell any financial instrument . The signals, metrics, and features are tools for analysis and do not guarantee profits or specific outcomes. Past performance is not indicative of future results. Always conduct your own due diligence and consult a financial advisor before making trading decisions.
NR4/NR7 + Strong Uptrend FilterNR4/NR7 Tight Range Breakout Scanner with Trend Confirmation
This script identifies explosive breakout candidates by scanning for NR4 (Narrowest Range in 4 days) and NR7 (Narrowest Range in 7 days) setups, only when the underlying stock is showing strong bullish alignment.
Why This Matters
Narrow range candles often precede volatility. When you combine that compression with a strong uptrend, you’re essentially spotting a coiled spring—just before the snap. Most traders chase moves. This one waits—quiet, deliberate, prepared.
Trend Filter Criteria
To ensure quality and avoid weak setups, the scanner only signals when:
The closing price is above the 10 EMA
The 10 EMA is above the 20 EMA
This confirms strong short-term momentum and trend alignment—what some call a “momentum staircase.” It keeps you on the frontside of the move and filters out chop, fakeouts, and death-by-a-thousand-wick scenarios.
Visuals
Orange Label → NR4 in a strong trend
Purple Label → NR7 in a strong trend
Background also highlights to give subtle visual cues
Best Use Case
Scan end-of-day or intraday on your watchlist. Combine it with:
MACD expansion
Low float + news catalysts
Volume surges
Breakout-ready chart structure
Result?
You don’t chase.
You don’t guess.
You stalk high-probability trades like a nobleman with a sniper rifle.
[blackcat] L2 FiboKAMA Adaptive TrendOVERVIEW
The L2 FiboKAMA Adaptive Trend indicator leverages advanced technical analysis techniques by integrating Fibonacci principles with the Kaufman Adaptive Moving Average (KAMA). This combination creates a dynamic and responsive tool designed to adapt seamlessly to changing market conditions. By providing clear buy and sell signals based on adaptive momentum, this indicator helps traders identify potential entry and exit points effectively. Its intuitive design and robust features make it a valuable addition to any trader’s arsenal 📊💹.
According to the principle of Kaufman's Adaptive Moving Average (KAMA), it is a type of moving average line specifically designed for markets with high volatility. Unlike traditional moving averages, KAMA can automatically adjust its period based on market conditions to improve accuracy and responsiveness. This makes it particularly useful for capturing market trends and reducing false signals in varying market environments.
The use of Fibonacci magic numbers (3, 8, 13) enhances the performance and accuracy of KAMA. These numbers have special mathematical properties that align well with the changing trends of KAMA moving averages. Combining them with KAMA can significantly boost its effectiveness, making it a popular choice among traders seeking reliable signals.
This fusion not only smoothens price fluctuations but also ensures quick responses to market changes, offering dependable entry and exit points. Thanks to the flexibility and precision of KAMA combined with Fibonacci magic numbers, traders can better manage risks and aim for higher returns.
FEATURES
Enhanced Kaufman Adaptive Moving Average (KAMA): Incorporates Fibonacci principles for improved adaptability:
Source Price: Allows customization of the price series used for calculation (default: HLCC4).
Fast Length: Determines the period for quicker adjustments to recent price changes.
Slow Length: Sets the period for smoother transitions over longer-term trends.
Dynamic Lines:
KAMA Line: A yellow line representing the primary adaptive moving average, which adapts quickly to new trends.
Trigger Line: A fuchsia line serving as a reference point for detecting crossovers and generating signals.
Visual Cues:
Buy Signals: Green 'B' labels indicating potential buying opportunities.
Sell Signals: Red 'S' labels signaling possible selling points.
Fill Areas: Colored regions between the KAMA and Trigger lines to visually represent trend directions and strength.
Alert Functionality: Generates real-time alerts for both buy and sell signals, ensuring timely notifications for actionable insights 🔔.
Customizable Parameters: Offers flexibility through adjustable inputs, allowing users to tailor the indicator to their specific trading strategies and preferences.
HOW TO USE
Adding the Indicator:
Open your TradingView chart and navigate to the indicators list.
Select L2 FiboKAMA Adaptive Trend and add it to your chart.
Configuring Parameters:
Adjust the Source Price to choose the desired price series (e.g., close, open, high, low).
Set the Fast Length to define how quickly the indicator responds to recent price movements.
Configure the Slow Length to determine the smoothness of long-term trend adaptations.
Interpreting Signals:
Monitor the chart for green 'B' labels indicating buy signals and red 'S' labels for sell signals.
Observe the colored fill areas between the KAMA and Trigger lines to gauge trend strength and direction.
Setting Up Alerts:
Enable alerts within the indicator settings to receive notifications whenever buy or sell signals are triggered.
Customize alert messages and frequencies according to your trading plan.
Combining with Other Tools:
Integrate this indicator with additional technical analysis tools and fundamental research for comprehensive decision-making.
Confirm signals using other indicators like RSI, MACD, or Bollinger Bands for increased reliability.
Optimizing Performance:
Backtest the indicator across various assets and timeframes to understand its behavior under different market conditions.
Fine-tune parameters based on historical performance and current market dynamics.
Integrating Magic Numbers:
Understand the basic principles of KAMA to find suitable entry points for Fibonacci magic numbers.
Utilize the efficiency ratio to measure market volatility and adjust moving average parameters accordingly.
Apply Fibonacci magic numbers (3, 8, 13) to enhance the responsiveness and accuracy of KAMA.
LIMITATIONS
Market Volatility: May produce false signals during periods of extreme volatility or sideways movement.
Parameter Sensitivity: Requires careful tuning of fast and slow lengths to balance responsiveness and stability.
Asset-Specific Behavior: Effectiveness can vary significantly across different financial instruments and time horizons.
Complementary Analysis: Should be used alongside other analytical methods to enhance accuracy and reduce risk.
NOTES
Historical Data: Ensure adequate historical data availability for precise calculations and backtesting.
Demo Testing: Thoroughly test the indicator on demo accounts before deploying it in live trading environments.
Continuous Learning: Stay updated with market trends and continuously refine your strategy incorporating feedback from the indicator's performance.
Risk Management: Always implement proper risk management practices regardless of the signals provided by the indicator.
ADVANCED USAGE TIPS
Multi-Timeframe Analysis: Apply the indicator across multiple timeframes to gain deeper insights into underlying trends.
Divergence Strategy: Look for divergences between price action and the KAMA line to spot potential reversals early.
Volume Integration: Combine volume analysis with the indicator to confirm the strength of identified trends.
Custom Scripting: Modify the script to include additional filters or conditions tailored to your unique trading approach.
IMPROVING KAMA PERFORMANCE
Increase Length: Extend the KAMA length to consider more historical data, reducing the impact of short-term price fluctuations.
Adjust Fast and Slow Lengths: Make KAMA smoother by increasing the fast length and decreasing the slow length.
Use Smoothing Factor: Apply a smoothing factor to control the level of smoothness; typical values range from 0 to 1.
Combine with Other Indicators: Pair KAMA with other smoothing indicators like EMA or SMA for more reliable signals.
Filter Noise: Use filters or other technical analysis tools to eliminate price noise, enhancing KAMA's effectiveness.
NR4/NR7 + 10 EMA Trend Filter📝 Description:
This script spots NR4 and NR7 days—those deceptively quiet candles where price volatility contracts... right before a potential breakout.
But here’s the twist:
It only highlights setups when the stock is above the 10 EMA, filtering for bullish trends with real momentum behind them.
We’re not interested in weak sauce. We want spring-loaded coils in strong uptrends.
🧠 What It Does:
🔍 NR4 (Narrow Range 4): Today's range is the smallest of the last 4 days
🧨 NR7 (Narrow Range 7): Today's range is the smallest of the last 7 days
🧭 Trend Filter: Highlights only when price is above the 10-period EMA
🎯 Visual Cues: Orange background and label for NR4, purple for NR7
Stochastics + CM Williams VixFix (Simple Buy Signal)📈 Stochastics + CM Williams VixFix (Simple Buy Signal)
This indicator combines two powerful tools to detect potential bottoming opportunities:
✅ Stochastics: Looks for momentum reversals. A signal is triggered when both %K and %D are below the oversold threshold (default: 20), suggesting the asset is deeply oversold.
✅ CM Williams Vix Fix: A volatility-based fear detector. When it spikes above its dynamic threshold, it indicates potential panic selling — often preceding a market bounce.
💡 Buy Signal is generated when:
%K and %D are both below 20
VixFix shows a volatility spike (green condition)
Use this script to identify high-probability reversal setups, especially during market corrections or panic phases.
NR4/NR7 IndicatorWhat It Does:
Detects NR4 = today's range smaller than last 3
Detects NR7 = today's range smaller than last 6
Plots coloured labels + background so you can spot ‘em at a glance
SPY 0DTE Scalper - Auto AlertsTimeframes:
Main chart: 1-minute (for precision entries)
Confirmations: 3-minute or 5-minute (to avoid fakeouts)
Indicators I Use:
VWAP – Orange line → Institutional fair value
EMA 9 – Green line → Short-term momentum
EMA 21 – Red line → Trend filter
Custom Pullback Signal Script – Marks buy/sell/pullback signals with labels (triangles)
Above VWAP = Bullish Bias
Below VWAP = Bearish Bias
Institutions treat this as the "fair price" — so I do too.
EMA 9 (Green):
If price hugs or bounces off EMA 9 = 🔥 strong continuation move.
I use this as my guide for momentum.
EMA 21 (Red):
Great for trend confirmation.
Above EMA 21 = Trend building to the upside.
Below EMA 21 = Weakness or possible reversal.
💸 Step 3: How I Read the Signals
✅ BUY Signal:
Price breaks above VWAP with volume 1.5x+ average
Candle must close strong (not a wickfest)
EMA 9 becomes my trailing stop for the move
🚨 SELL Signal:
Price breaks below VWAP with strong volume
Clean body close below → momentum shift to the downside
EMA 9 again = trailing resistance guide
🔵 Pullback Long (Blue Triangle Under Candle):
Bullish continuation entry
Price pulls back to EMA 9 or 21, but stays above VWAP
Low-risk re-entry after a breakout
🟣 Pullback Short (Purple Triangle Above Candle):
Bearish continuation entry
Price retraces into EMA 9, but stays below VWAP & EMA 21
Ideal for catching second legs after breakdowns