Hammer & Inverted Hammer DetectorThis Pine Script indicator detects Hammer and Inverted Hammer candlestick patterns based on price action and VWAP (Volume Weighted Average Price). It evaluates the relationship between the current and previous candles, checking shadow lengths and body size to confirm the pattern. If a Hammer is identified, a green upward label appears below the candle, while an Inverted Hammer is marked with a red downward label above the candle.
Indicadores e estratégias
Johnny's Volatility-Driven Trend Identifier w/ Reversal SignalsJohnny's Volatility-Driven Trend Identifier w/ Reversal Signals is designed to identify high-probability trend shifts and reversals by incorporating volatility, momentum, and impulse-based filtering. It is specifically built for traders who want to capture strong trend movements while minimizing false signals caused by low volatility noise.
By leveraging Rate of Change (ROC), Relative Strength Index (RSI), and Average True Range (ATR)-based volatility detection, the indicator dynamically adapts to market conditions. It highlights breakout trends, reversals, and early signs of momentum shifts using strategically placed labels and color-coded trend visualization.
Inspiration taken from Top G indicator .
What This Indicator Does
The Volatility-Driven Trend Identifier works by:
Measuring Market Extremes & Momentum:
Uses ROC normalization with standard deviation to identify impulse moves in price action.
Implements RSI filtering to determine overbought/oversold conditions that validate trend strength.
Utilizes ATR-based volatility tracking to ensure signals only appear when meaningful market movements are occurring.
Identifying Key Trend Events:
Power Peak (🔥): Marks a confirmed strong downtrend, ideal for shorting opportunities.
Surge (🚀): Indicates a confirmed strong uptrend, signaling a potential long entry.
Soft Surge (↗): Highlights a mild bullish reentry or early uptrend formation.
Soft Peak (↘): Shows a mild bearish reentry or early downtrend formation.
Providing Adaptive Filtering for Reliable Signals:
Filters out weak trends with a volatility check, ensuring signals appear only in strong market conditions.
Implements multi-level confirmation by combining trend strength metrics, preventing false breakouts.
Uses gradient-based visualization to color-code market sentiment for quick interpretation.
What This Indicator Signals
Breakouts & Impulse Moves: 🚀🔥
The Surge (🚀) and Power Peak (🔥) labels indicate confirmed momentum breakouts, where the trend has been validated by a combination of ROC impulse, RSI confirmation, and ATR volatility filtering.
These signals suggest that the market is entering a strong trend, and traders can align their entries accordingly.
Early Trend Formation & Reentries: ↗ ↘
The Soft Surge (↗) and Soft Peak (↘) labels indicate areas where a trend might be forming, but is not yet fully confirmed.
These signals help traders anticipate potential entries before the trend gains full strength.
Volatility-Adaptive Trend Filtering: 📊
Since the indicator only activates in volatile conditions, it avoids the pitfalls of low-range choppy markets where false signals frequently occur.
ATR-driven adaptive windowing allows the indicator to dynamically adjust its sensitivity based on real-time volatility conditions.
How to Use This Indicator
1. Identifying High-Probability Entries
Bullish Entries (Long Trades)
Look for 🚀 Surge signals in an uptrend.
Confirm with RSI (should be above 50 for momentum).
Ensure volatility is increasing to validate the breakout.
Use ↗ Soft Surge signals for early entries before the trend fully confirms.
Bearish Entries (Short Trades)
Look for 🔥 Power Peak signals in a downtrend.
RSI should be below 50, indicating downward momentum.
Volatility should be rising, ensuring market momentum is strong.
Use ↘ Soft Peak signals for early entries before a full bearish confirmation.
2. Avoiding False Signals
Ignore signals when the market is ranging (low ATR).
Check RSI and ROC alignment to ensure trend confirmation.
Use additional confluences (e.g., price action, support/resistance levels, moving averages) for enhanced accuracy.
3. Trend Confirmation & Filtering
The stronger the trend, the higher the likelihood that Surge (🚀) and Power Peak (🔥) signals will continue in their direction.
Soft Surge (↗) and Soft Peak (↘) act as early warning signals before major breakouts occur.
What Makes This a Machine Learning-Inspired Moving Average?
While this indicator is not a direct implementation of machine learning (as Pine Script lacks AI/ML capabilities), it mimics machine learning principles by adapting dynamically to market conditions using the following techniques:
Adaptive Trend Selection:
It does not rely on fixed moving averages but instead adapts dynamically based on volatility expansion and momentum detection.
ATR-based filtering adjusts the indicator’s sensitivity to real-time conditions.
Multi-Factor Confirmation (Feature Engineering Equivalent in ML):
Combines ROC, RSI, and ATR in a structured way, similar to how ML models use multiple inputs to filter and classify data.
Implements conditional trend recognition, ensuring that only valid signals pass through the filter.
Noise Reduction with Data Smoothing:
The algorithm avoids false signals by incorporating trend intensity thresholds, much like how ML models remove outliers to refine predictions.
Adaptive filtering ensures that low-volatility environments do not produce misleading signals.
Why Use This Indicator?
✔ Reduces False Signals: Multi-factor validation ensures only high-confidence signals are triggered.
✔ Works in All Market Conditions: Volatility-adaptive nature allows the indicator to perform well in both trending and ranging markets.
✔ Great for Swing & Intraday Trading: It helps spot momentum shifts early and allows traders to catch major market moves before they fully develop.
✔ Visually Intuitive: Color-coded trends and clear signal markers make it easy to interpret.
Average Candle Size (Points)ATR but with the ability to add threshold lines (UP TO 3) that help gauge how volatile the market is. Also, note that the default threshold values are set up for NQ Futures so you will need to change your values to your specific needs.
Moving Average Condition StrategyA bot strategy I use on octobot using macd and moving average conditions.
High/Low LabelsThis simple Version 6 script labels each bar on the chart with Green labels noting HH for higher highs and HL for higher lows. And Red labels noting LH for lower highs and LL for lower lows. Works on any Trading View chart and any time frame. Any comments or suggestions, please do!
Gold Pro StrategyHere’s the strategy description in a chat format:
---
**Gold (XAU/USD) Trend-Following Strategy**
This **trend-following strategy** is designed for trading gold (XAU/USD) by combining moving averages, MACD momentum indicators, and RSI filters to capture sustained trends while managing volatility risks. The strategy uses volatility-adjusted stops to protect gains and prevent overexposure during erratic price movements. The aim is to take advantage of trending markets by confirming momentum and ensuring entries are not made at extreme levels.
---
**Key Components**
1. **Trend Identification**
- **50 vs 200 EMA Crossover**
- **Bullish Trend:** 50 EMA crosses above 200 EMA, and the price closes above the 200 EMA
- **Bearish Trend:** 50 EMA crosses below 200 EMA, and the price closes below the 200 EMA
2. **Momentum Confirmation**
- **MACD (12,26,9)**
- **Buy Signal:** MACD line crosses above the signal line
- **Sell Signal:** MACD line crosses below the signal line
- **RSI (14 Period)**
- **Bullish Zone:** RSI between 50-70 to avoid overbought conditions
- **Bearish Zone:** RSI between 30-50 to avoid oversold conditions
3. **Entry Criteria**
- **Long Entry:** Bullish trend, MACD bullish crossover, and RSI between 50-70
- **Short Entry:** Bearish trend, MACD bearish crossover, and RSI between 30-50
4. **Exit & Risk Management**
- **ATR Trailing Stops (14 Period):**
- Initial Stop: 3x ATR from entry price
- Trailing Stop: Adjusts to lock in profits as price moves favorably
- **Position Sizing:** 100% of equity per trade (high-risk strategy)
---
**Key Logic Flow**
1. **Trend Filter:** Use the 50/200 EMA relationship to define the market's direction
2. **Momentum Confirmation:** Confirm trend momentum with MACD crossovers
3. **RSI Validation:** Ensure RSI is within non-extreme ranges before entering trades
4. **Volatility-Based Risk Management:** Use ATR stops to manage market volatility
---
**Visual Cues**
- **Blue Line:** 50 EMA
- **Red Line:** 200 EMA
- **Green Triangles:** Long entry signals
- **Red Triangles:** Short entry signals
---
**Strengths**
- **Clear Trend Focus:** Avoids counter-trend trades
- **RSI Filter:** Prevents entering overbought or oversold conditions
- **ATR Stops:** Adapts to gold’s inherent volatility
- **Simple Rules:** Easy to follow with minimal inputs
---
**Weaknesses & Risks**
- **Infrequent Signals:** 50/200 EMA crossovers are rare
- **Potential Missed Opportunities:** Strict RSI criteria may miss some valid trends
- **Aggressive Position Sizing:** 100% equity allocation can lead to large drawdowns
- **No Profit Targets:** Relies on trailing stops rather than defined exit targets
---
**Performance Profile**
| Metric | Expected Range |
|----------------------|---------------------|
| Annual Trades | 4-8 |
| Win Rate | 55-65% |
| Max Drawdown | 25-35% |
| Profit Factor | 1.8-2.5 |
---
**Optimization Recommendations**
1. **Increase Trade Frequency**
Adjust the EMAs to shorter periods:
- `emaFastLen = input.int(30, "Fast EMA")`
- `emaSlowLen = input.int(150, "Slow EMA")`
2. **Relax RSI Filters**
Adjust the RSI range to:
- `rsiBullish = rsi > 45 and rsi < 75`
- `rsiBearish = rsi < 55 and rsi > 25`
3. **Add Profit Targets**
Introduce a profit target at 1.5% above entry:
```pine
strategy.exit("Long Exit", "Long",
stop=longStopPrice,
profit=close*1.015, // 1.5% target
trail_offset=trailOffset)
```
4. **Reduce Position Sizing**
Risk a smaller percentage per trade:
- `default_qty_value=25`
---
**Best Use Case**
This strategy excels in **strong trending markets** such as gold rallies during economic or geopolitical crises. However, during sideways or choppy market conditions, the strategy might require manual intervention to avoid false signals. Additionally, integrating fundamental analysis—like monitoring USD weakness or geopolitical risks—can enhance its effectiveness.
---
This strategy offers a balanced approach for trading gold, combining trend-following principles with risk management tailored to the volatility of the market.
Zero Lag Signals (Pine Script) - CorrectedZero-Lag EMA: It calculates a zero-lag EMA using a custom function. This type of EMA aims to reduce lag compared to a traditional EMA, providing a more responsive indicator of price movement.
Volatility: It calculates volatility using the Average True Range (ATR) indicator and a user-defined multiplier.
Angle: It calculates the angle of the zero-lag EMA by comparing its current value to its value 10 bars ago. This helps determine the trend and momentum of the price.
Buy/Sell Signals:
Buy Signal: Triggered when the angle of the zero-lag EMA is above a certain threshold and the current price is above the EMA.
Sell Signal: Triggered when the angle of the zero-lag EMA is below a certain threshold and the current price is below the EMA.
Key Features:
Zero-Lag EMA: Reduces lag for a more responsive indicator.
Volatility Bands: Helps identify potential entry and exit points based on volatility.
Angle Calculation: Provides insights into the trend and momentum of the price.
Customizable Parameters: Allows users to adjust the length of the EMA, volatility multiplier, and signal angle threshold.
Visual Signals and Alerts: Displays buy and sell signals on the chart and triggers alerts.
This indicator can be used to:
Identify potential buy and sell opportunities in trending markets.
Filter out false signals in choppy markets.
Confirm the strength of a trend.
Time entries and exits based on momentum and volatility.
Trend & ADX by Gideon for Indian MarketsThis indicator is designed to help traders **identify strong trends** using the **Kalman Filter** and **ADX** (Average Directional Index). It provides **Buy/Sell signals** based on trend direction and ADX strength. I wanted to create something for Indian markets since there are not much available.
In a nut-shell:
✅ **Buy when the Kalman Filter turns green, and ADX is strong.
❌ **Sell when the Kalman Filter turns red, and ADX is strong.
📌 **Ignore signals if ADX is weak (below threshold).
📊 Use on 5-minute timeframes for intraday trading.
------------------------------------------------------------------------
1. Understanding the Indicator Components**
- **Green Line:** Indicates an **uptrend**.
- **Red Line:** Indicates a **downtrend**.
- The **line color change** signals a potential **trend reversal**.
**ADX Strength Filter**
- The **ADX (orange line)** measures trend strength.
- The **blue horizontal line** marks the **ADX threshold** (default: 20).
- A **Buy/Sell signal is only valid if ADX is above the threshold**, ensuring a strong trend.
**Buy & Sell Signals**
- **Buy Signal (Green Up Arrow)**
- Appears **one candle before** the Kalman line turns green.
- ADX must be **above the threshold** (default: 20).
- Suggests entering a **long position**.
- **Sell Signal (Red Down Arrow)**
- Appears **one candle before** the Kalman line turns red.
- ADX must be **above the threshold** (default: 20).
- Suggests entering a **short position**.
2. Best Settings for 5-Minute Timeframe**
For day trading on the **5-minute chart**, the following settings work best:
- **Kalman Filter Length:** `50`
- **Process Noise (Q):** `0.1`
- **Measurement Noise (R):** `0.01`
- **ADX Length:** `14`
- **ADX Threshold:** `20`
- **(Increase to 25-30 for more reliable signals in volatile markets)**
3. How to Trade with This Indicator**
**Entry Rules**
✅ **Buy Entry**
- Wait for a **green arrow (Buy Signal).
- Kalman Line must **turn green**.
- ADX must be **above the threshold** (strong trend confirmed).
- Enter a **long position** on the next candle.
❌ **Sell Entry**
- Wait for a **red arrow (Sell Signal).
- Kalman Line must **turn red**.
- ADX must be **above the threshold** (strong trend confirmed).
- Enter a **short position** on the next candle.
**Exit & Risk Management**
📌 **Stop Loss**:
- Place stop-loss **below the previous swing low** (for buys) or **above the previous swing high** (for sells).
📌 **Take Profit:
- Use a **Risk:Reward Ratio of 1:2 or 1:3.
- Exit when the **Kalman Filter color changes** (opposite trend signal).
📌 **Avoid Weak Trends**:
- **No trades when ADX is below the threshold** (low trend strength).
4. Additional Tips
- Works best on **liquid assets** like **Bank Nifty, Nifty 50, and large-cap stocks**.
- **Avoid ranging markets** with low ADX values (<20).
- Use alongside **volume analysis and support/resistance levels** for confirmation.
- Experiment with **ADX Threshold (increase for stronger signals, decrease for more trades).**
Best of Luck traders ! 🚀
Fshariar_Enhanced Quasimodo Pattern**Enhanced Quasimodo Pattern Indicator**
The **Enhanced Quasimodo Pattern Indicator** is a powerful technical analysis tool designed for **TradingView** users. This script identifies the **Quasimodo pattern**, a key reversal formation used by professional traders to anticipate market turning points with high accuracy.
### **Features:**
✅ **Quasimodo Pattern Detection**: Automatically spots **bullish and bearish Quasimodo setups** on the chart.
✅ **Multi-Confirmation Signals**: Incorporates **RSI divergence, volume spikes, and trend filters** to enhance reliability.
✅ **Fibonacci-Based Entry & Exit**: Uses **61.8% and 78.6% Fibonacci retracement levels** for optimal trade entries.
✅ **Dynamic Take Profit & Stop Loss Levels**: Plots **161.8% Fibonacci extensions** as TP targets and SL based on the X-point.
✅ **Multi-Timeframe Trend Analysis**: Uses **EMA 50 & EMA 200** to filter trades in line with the prevailing trend.
✅ **Real-Time Alerts**: Get notified instantly when a **buy or sell signal** is detected.
### **How It Works:**
- **Bearish Quasimodo (Sell Signal)**: Triggered when a higher high is followed by a lower low, indicating a reversal.
- **Bullish Quasimodo (Buy Signal)**: Triggered when a lower low is followed by a higher high, signaling a potential uptrend.
- **Confirmation Criteria**: RSI divergence, volume spikes, and EMA-based trend analysis help filter out false signals.
### **Who Can Benefit?**
- **Day Traders & Swing Traders** looking for high-probability reversal setups.
- **Price Action Traders** who rely on **support & resistance** structures.
- **Fibonacci Traders** seeking **retracement & extension-based entries.**
This indicator is fully customizable, allowing traders to adjust **swing length, RSI settings, and Fibonacci levels** to match their trading strategy. 🚀
📌 **Try it on your TradingView chart today and enhance your technical analysis!**
Developed by **FShariar**
THE EDGE FXThis indicator is designed to enhance chart organization for traders by providing essential tools for analysis and time management. Key features include:
1. Notes and Watermarks:
- Allows traders to add customizable notes and watermarks directly on the chart for better information tracking and organization.
2. Unique Day and Week Separation:
- Dynamically separates days and weeks based on the selected UTC timezone. This feature is ideal for global traders managing different time zones and ensures accurate time segmentation on the chart.
3. Fractal Marking:
- Automatically highlights fractal points on the chart, helping traders identify potential reversal or continuation zones based on classic fractal analysis principles.
How It Works:
- The indicator overlays additional visual elements on the chart without altering the underlying data.
- Time segmentation is achieved using an algorithm that adapts to the selected UTC timezone for clear and accurate visualization.
- Fractal detection follows standard technical analysis rules to identify key price levels.
Usage Instructions:
- Add the indicator to your chart and configure the settings for your preferred timezone.
- Use the notes feature to save and display critical information directly on the chart.
- Utilize fractal markings to analyze potential turning points and market trends.
This indicator provides a streamlined way to manage your chart annotations and fractal analysis, making it an essential tool for both intraday and swing traders.
Emas TriggerHere's the description for your multi-timeframe EMA indicator:
This script is a custom indicator for TradingView that plots four different Exponential Moving Averages (EMAs) on the chart, each calculated from different timeframes: Hourly, Daily, Weekly, and Monthly. These EMAs help identify trends across multiple time horizons, making it easier to spot potential support and resistance levels.
Key Features:
- Hourly EMA (calculated using a 1-hour timeframe) - Shows short-term price movements and immediate trend direction
- Daily EMA (calculated using a daily timeframe) - Helps identify medium-term trends and potential support/resistance levels
- Weekly EMA (calculated using a weekly timeframe) - Provides insight into broader market trends and major support/resistance zones
- Monthly EMA (calculated using a monthly timeframe) - Highlights long-term market direction and significant price levels
Each EMA is displayed using a distinct color and plotted with a step line style for clear visibility:
- Hourly EMA: Green
- Daily EMA: Blue
- Weekly EMA: Dark Blue (#3127e3)
- Monthly EMA: Pink (#f352ff)
The indicator includes customizable input parameters for each timeframe's EMA length, allowing traders to adjust the sensitivity of each moving average according to their trading strategy. This versatility makes it useful for both swing traders and position traders who need to analyze market structure across multiple timeframes.
Relative Strength - MNOPPlotting relative strength for Daily, Weekly and Monthly chart of a current script against two scripts (can use indexes)
Linda Raschke's MACD V2.0
This script is based on Linda Raschke's interpretation of the MACD (Moving Average Convergence Divergence) indicator, designed to provide a refined view of market momentum and trend reversals.
---
Linda Raschke's MACD - Enhanced Trading Indicator
This custom MACD indicator, inspired by Linda Raschke's approach, refines the traditional MACD by offering a more responsive and adaptable view of momentum shifts.
Key Features :
As seen in image above
- Fast & Slow Length : Adjust the periods for the fast and slow moving averages to suit your trading style.
- Source : Choose the data source for calculation (typically closing price).
- Signal Smoothing : Fine-tune the smoothness of the signal line with adjustable settings.
- Customizable MA Types : Select between Simple Moving Average (SMA) or Exponential Moving Average (EMA) for both the oscillator and signal line for more flexibility.
The script displays:
- The MACD line : The difference between the fast and slow moving averages, indicating momentum.
- The Signal line : A smoothed version of the MACD that highlights trend changes.
- The Histogram : Shows the difference between the MACD and Signal line, visualizing the strength of the trend and potential reversals.
Alerts :
- Alerts trigger when the MACD histogram shifts from rising to falling or vice versa, providing early signals of potential momentum changes.
Zero Line : The zero line helps identify the current market trend (above the line is bullish, below is bearish).
This indicator is perfect for traders looking for advanced momentum signals and precise entry/exit points, with options to tweak the moving averages to better match their strategy.
---
Key Differences Between Linda Raschke’s MACD and the Traditional MACD :
1. Different Fast and Slow Lengths
Standard MACD : Typically uses a 12-period fast EMA and a 26-period slow EMA for calculating the MACD line.
Linda Raschke’s MACD : The fast and slow lengths are customizable and are often much shorter. In this script, the default values are 3 for the fast length and 10 for the slow length. These shorter periods help the indicator react faster to price changes and better capture momentum shifts in volatile markets.
2. Faster Response to Momentum Shifts
By shortening the periods for the moving averages and offering customization of the smoothing methods, Linda Raschke’s MACD tends to react more quickly to market changes. This makes it better suited for shorter-term traders or those looking to catch early momentum shifts.
The standard MACD, on the other hand, may be slower to react due to its longer default settings, making it more appropriate for longer-term trend-following strategies.
5. Histogram Coloring and Visual Representation
Standard MACD : The histogram simply shows the difference between the MACD line and the signal line, and the color usually remains constant unless specifically customized.
Linda Raschke’s MACD : The histogram in this script changes color based on whether the histogram is rising or falling compared to the previous bar, making it easier to spot momentum shifts. For example:
Green if the histogram is rising.
Red if the histogram is falling.
Lighter shades if the histogram is in transition, providing a more intuitive view of the market's strength and direction.
6. Alert Conditions
Linda Raschke’s MACD : This script adds specific alert conditions when the MACD histogram transitions from rising to falling (or vice versa), offering traders an early warning signal for potential trend reversals or momentum shifts.
7. Shorter Timeframes
Linda Raschke’s MACD : The shorter settings make it more suited for intraday trading or shorter timeframes, helping to catch early market movements. It can be used more effectively for day traders or scalpers.
Standard MACD : Better suited for longer timeframes and trend-following strategies, as it’s less sensitive to short-term noise.
Summary: Best Timeframes
Ideal Timeframes : 1-minute, 5-minute, 15-minute, 30-minute, 1-hour, and 4-hour charts.
Possible for Swing Trading: Daily charts, but with caution due to quicker signals.
If you're using it for day trading or scalping, I’d suggest focusing on intraday charts (1-minute to 30-minute), and adjusting the signal smoothing and lengths to fine-tune how sensitive the indicator is to price action.
Suggested Values for 1-Minute Chart:
1. Signal Line Smoothing (Length of Signal Line):
Range: The standard setting in your script is 16.
Adjustment for 1-Minute Chart:
You may want to decrease this value for faster responsiveness.
Try 8 to 12 for a more reactive signal line. A lower value (like 8) will make the signal line more responsive to price changes, which is useful for short-term momentum.
Test the range of 10 to 12 if you want to smooth out some noise but still react fairly quickly.
2. Fast and Slow Length (for MACD Oscillator):
The fast and slow moving averages also play a role in the indicator’s speed. For 1-minute charts, you'll want these to be shorter to catch fast market movements.
Fast Length: A value of 3 is good for a responsive MACD on a 1-minute chart. It reacts quickly to recent price changes.
Slow Length: You might want to adjust this slightly to around 7 to 10. A value of 10 will allow the slow line to smooth out more, reducing excessive noise.
ICT-Yasir Macro TimesICT MACRO TIMES
8:50 to 9:10
9:50 to 10:10
10:50 to 11:10
12:50 to 1:10
1:50 to 2:10
2:50 to 3:10
3:15 to 3:45
3:45 to 4:00
Volume with EMA and Coloring RulesSummary
This indicator plots the market’s volume as a histogram in a separate panel (not overlaid on the main price chart). An EMA (Exponential Moving Average) is then calculated based on the volume. The color of each volume bar switches dynamically:
• Blue when the bar’s volume is higher than the EMA
• White when the bar’s volume is lower than or equal to the EMA
This simple visual cue allows you to quickly see if the market’s current volume is above or below its average trend.
How to Use
1. Add to Chart
Apply the indicator to your TradingView chart, and it will open in a separate panel beneath the price.
2. Adjust EMA Length
Modify the “EMA Length” to control how quickly the average volume adapts to changes.
3. Interpretation
• Blue bars may indicate stronger-than-usual participation.
• White bars indicate volume is relatively lower compared to its recent average.
This indicator provides an at-a-glance way to see if trading activity is intensifying or easing, which can be paired with other technical or fundamental tools to help confirm market shifts or potential opportunities.
3ATMANE SUPP AND RESIST WITH TREND BARSupport & Resistance: The indicator identifies potential support and resistance levels based on a zigzag pattern. It uses a "depth" and "deviation" input to determine the swings in price that define the zigzag. You can choose to display these levels as either lines or boxes.
TrendBars: The indicator also calculates and displays TrendBars, which are bars colored green for uptrends and red for downtrends. This is based on a calculation involving the difference between the current price and the price 'per' periods ago, smoothed by an adaptive average period.
Diagonal Lines: The script draws diagonal lines connecting the zigzag turning points. These lines visualize the overall trend and can also have support and resistance lines plotted along them.
Inputs and Customization:
The script offers a wide array of customization options through its inputs:
Current S/R Setting:
Horizontal type: Choose between displaying support/resistance as boxes or lines.
Depth: The lookback period for identifying swing highs and lows for the zigzag calculation. Higher values mean fewer, stronger levels.
Deviation: The minimum price change required to define a new swing in the zigzag. Higher values mean fewer swings.
Color: The color of the horizontal support/resistance lines or boxes.
Extend lines: Extends the horizontal support/resistance lines to the right edge of the chart.
Line count: The maximum number of horizontal support/resistance lines or boxes to display.
Diagonal Line Setting:
Line thickness: The thickness of the diagonal zigzag lines.
Line style: The style of the diagonal zigzag lines (solid, dotted, dashed).
Diagonal color: The color of the main diagonal zigzag line.
Zigzag count: The maximum number of diagonal zigzag lines to display.
Diagonal high color: Color for diagonal support/resistance lines related to highs.
Diagonal low color: Color for diagonal support/resistance lines related to lows.
Diagonal S/R line count: The number of support/resistance lines drawn along the diagonal.
Show diagonal S/R lines: Toggles the display of the diagonal support/resistance lines.
Basic Settings (TrendBars):
Source: The price source to use for the TrendBars calculation (e.g., close, open, high, low).
Period: The period used in the TrendBars calculation.
UI Options (TrendBars):
Color bars?: Toggles the coloring of the bars based on the TrendBars calculation.
How it Works (Simplified):
Zigzag Calculation: The f_zigzag function identifies swing highs and lows based on the depth and deviation inputs.
Support/Resistance Levels: Horizontal lines or boxes are drawn at the identified swing points.
Diagonal Lines: The f_addDiagonalLine function connects the zigzag turning points with diagonal lines.
TrendBars Calculation: The script calculates a smoothed trend based on price changes over the specified period and colors the bars accordingly.
Drawing: The script uses line.new, box.new, and label.new to draw the support/resistance levels, diagonal lines, and labels on the chart.
Key Features:
Dynamic Support/Resistance: The levels are recalculated as new price data becomes available.
Customizable: The numerous inputs allow you to tailor the indicator to your specific needs.
TrendBars Integration: Combines support/resistance with a trend indicator for a more comprehensive view.
Uses:
This indicator can be used to:
Identify potential areas of support and resistance.
Visualize the overall trend.
Confirm trend changes.
Potentially identify entry and exit points.
Limitations:
Repainting: Like many zigzag-based indicators, this one can repaint. This means that the levels may adjust as new bars close, potentially changing the appearance of past signals. Be cautious when using it for backtesting or real-time trading decisions.
Subjectivity: The zigzag calculation involves parameters that can be subjective and may require experimentation to find optimal settings for different markets and timeframes.
False Signals: No indicator is perfect, and this one can also generate false signals. Use it in conjunction with other indicators and your own analysis.
This detailed description should give you a good understanding of how the indicator works and how to use it. Remember to experiment with the different settings to find what works best for you.
Lorentzian Volatility Filtered SignalsThis indicator uses Lorentzian classification and volume to print accurate buy and sell signals with a stop loss and take profit.
Johnny's Machine Learning Moving Average (MLMA) w/ Trend Alerts📖 Overview
Johnny's Machine Learning Moving Average (MLMA) w/ Trend Alerts is a powerful adaptive moving average indicator designed to capture market trends dynamically. Unlike traditional moving averages (e.g., SMA, EMA, WMA), this indicator incorporates volatility-based trend detection, Bollinger Bands, ADX, and RSI, offering a comprehensive view of market conditions.
The MLMA is "machine learning-inspired" because it adapts dynamically to market conditions using ATR-based windowing and integrates multiple trend strength indicators (ADX, RSI, and volatility bands) to provide an intelligent moving average calculation that learns from recent price action rather than being static.
🛠 How It Works
1️⃣ Adaptive Moving Average Selection
The MLMA automatically selects one of four different moving averages:
📊 EMA (Exponential Moving Average) – Reacts quickly to price changes.
🔵 HMA (Hull Moving Average) – Smooth and fast, reducing lag.
🟡 WMA (Weighted Moving Average) – Gives recent prices more importance.
🔴 VWAP (Volume Weighted Average Price) – Accounts for volume impact.
The user can select which moving average type to use, making the indicator customizable based on their strategy.
2️⃣ Dynamic Trend Detection
ATR-Based Adaptive Window 📏
The Average True Range (ATR) determines the window size dynamically.
When volatility is high, the moving average window expands, making the MLMA more stable.
When volatility is low, the window shrinks, making the MLMA more responsive.
Trend Strength Filters 📊
ADX (Average Directional Index) > 25 → Indicates a strong trend.
RSI (Relative Strength Index) > 70 or < 30 → Identifies overbought/oversold conditions.
Price Position Relative to Upper/Lower Bands → Determines bullish vs. bearish momentum.
3️⃣ Volatility Bands & Dynamic Support/Resistance
Bollinger Bands (BB) 📉
Uses standard deviation-based bands around the MLMA to detect overbought and oversold zones.
Upper Band = Resistance, Lower Band = Support.
Helps traders identify breakout potential.
Adaptive Trend Bands 🔵🔴
The MLMA has built-in trend envelopes.
When price breaks the upper band, bullish momentum is confirmed.
When price breaks the lower band, bearish momentum is confirmed.
4️⃣ Visual Enhancements
Dynamic Gradient Fills 🌈
The trend strength (ADX-based) determines the gradient intensity.
Stronger trends = More vivid colors.
Weaker trends = Lighter colors.
Trend Reversal Arrows 🔄
🔼 Green Up Arrow: Bullish reversal signal.
🔽 Red Down Arrow: Bearish reversal signal.
Trend Table Overlay 🖥
Displays ADX, RSI, and Trend State dynamically on the chart.
📢 Trading Signals & How to Use It
1️⃣ Bullish Signals 📈
✅ Conditions for a Long (Buy) Trade:
The MLMA crosses above the lower band.
The ADX is above 25 (confirming trend strength).
RSI is above 55, indicating positive momentum.
Green trend reversal arrow appears (confirmation of a bullish reversal).
🔹 How to Trade It:
Enter a long trade when the MLMA turns bullish.
Set stop-loss below the lower Bollinger Band.
Target previous resistance levels or use the upper band as take-profit.
2️⃣ Bearish Signals 📉
✅ Conditions for a Short (Sell) Trade:
The MLMA crosses below the upper band.
The ADX is above 25 (confirming trend strength).
RSI is below 45, indicating bearish pressure.
Red trend reversal arrow appears (confirmation of a bearish reversal).
🔹 How to Trade It:
Enter a short trade when the MLMA turns bearish.
Set stop-loss above the upper Bollinger Band.
Target the lower band as take-profit.
💡 What Makes This a Machine Learning Moving Average?
📍 1️⃣ Adaptive & Self-Tuning
Unlike static moving averages that rely on fixed parameters, this MLMA automatically adjusts its sensitivity to market conditions using:
ATR-based dynamic windowing 📏 (Expands/contracts based on volatility).
Adaptive smoothing using EMA, HMA, WMA, or VWAP 📊.
Multi-indicator confirmation (ADX, RSI, Volatility Bands) 🏆.
📍 2️⃣ Intelligent Trend Confirmation
The MLMA "learns" from recent price movements instead of blindly following a fixed-length average.
It incorporates ADX & RSI trend filtering to reduce noise & false signals.
📍 3️⃣ Dynamic Color-Coding for Trend Strength
Strong trends trigger more vivid colors, mimicking confidence levels in machine learning models.
Weaker trends appear faded, suggesting uncertainty.
🎯 Why Use the MLMA?
✅ Pros
✔ Combines multiple trend indicators (MA, ADX, RSI, BB).
✔ Automatically adjusts to market conditions.
✔ Filters out weak trends, making it more reliable.
✔ Visually intuitive (gradient colors & reversal arrows).
✔ Works across all timeframes and assets.
⚠️ Cons
❌ Not a standalone strategy → Best used with volume confirmation or candlestick analysis.
❌ Can lag slightly in fast-moving markets (due to smoothing).
Session Highs and Lows (Custom Time Range) Choose your own custom H/L for custom session parameters.
Has inside day, outside day, above/below prior day biases displayed as well.
Volume Delta with Bollinger Bands [EMA]TL;DR
This indicator displays a “Volume Delta” candle chart based on a lower timeframe approximation of up vs. down volume. Bollinger Bands (using an EMA and a configurable standard deviation multiplier) highlight when Volume Delta exceeds typical volatility thresholds. Green bars will darken when Volume Delta is above the upper Bollinger band, and red bars will darken when Volume Delta is below the lower Bollinger band. You can optionally include wicks in the Bollinger calculations. Note : TradingView uses tick-based volume data, so these values may not precisely match true market orders.
What Is Volume Delta ?
• Volume Delta is a metric that identifies buying vs. selling activity in a market by distinguishing between orders transacting at the ask (buy volume) and orders transacting at the bid (sell volume).
• A positive Volume Delta indicates more buy volume during a bar, while a negative Volume Delta indicates more sell volume.
How TradingView Calculates Volume Delta
• TradingView relies on tick data to approximate up/down volume. This may not perfectly capture true order-flow distribution, particularly on higher timeframes or illiquid symbols.
• While it can provide useful insights into volume flow, keep in mind the underlying data’s limitations.
Key Features of This Indicator
1. Automatic or Custom Lower Timeframe Data
• The script can automatically select a lower timeframe for Volume Delta, or you can manually specify one in the settings.
2. Bollinger Bands on Volume Delta
• Uses an EMA of the Volume Delta (or a wick-based average) and calculates a standard deviation.
• The upper and lower bands highlight when activity deviates from typical volatility.
3. Configurable Wick Inclusion
• Decide whether to use only the “close” (lastVolume) of the Volume Delta bar or the average of its wicks ((maxVolume + minVolume) / 2) for Bollinger calculations.
4. Dynamic Bar Colors
• Positive Volume Delta bars turn dark green if they exceed the upper Bollinger band, otherwise lighter green .
• Negative Volume Delta bars turn dark red if they fall below the lower Bollinger band, otherwise lighter red .
How To Use
1. Add the Indicator to Your Chart
• Apply it to any symbol and timeframe in TradingView.
• Configure the lower timeframe for Volume Delta if desired.
2. Adjust Bollinger Settings
• Bollinger Length defines the EMA and standard deviation period.
• Bollinger Multiplier sets how far the bands lie from the EMA.
3. Choose Whether To Use Wicks
• Toggle to use the average of high/low for a potentially more volatile reading.
• Turn it off to rely solely on the Volume Delta “close.”
4. Interpret the Signals
• Dark Green Above the Upper Band : Suggests strong buying pressure above normal.
• Lighter Green : Positive but within typical volatility bounds.
• Dark Red Below the Lower Band : Suggests strong selling pressure below normal.
• Lighter Red : Negative but within typical volatility.
Important Caveats
• TradingView Volume Data : Tick-based and aggregated data may not reflect actual order-flow precisely.
• Context Matters : Combine Volume Delta with other forms of analysis (price action, support/resistance, etc.) to form a more comprehensive strategy.