MLB Momentum IndicatorMLB Momentum Indicator is a no‐lookahead technical indicator designed to signal intraday trend shifts and potential reversal points. It combines several well‐known technical components—Moving Averages, MACD, RSI, and optional ADX & Volume filters—to deliver high‐probability buy/sell signals on your chart.
Below is an overview of how it works and what each part does:
1. Moving Average Trend Filter
The script uses two moving averages (fast and slow) to determine the primary trend:
isUpTrend if Fast MA > Slow MA
isDownTrend if Fast MA < Slow MA
You can select the MA method—SMA, EMA, or WMA—and customize lengths.
Why it matters: The indicator only gives bullish signals if the trend is up, and bearish signals if the trend is down, helping avoid trades that go against the bigger flow.
2. MACD Confirmation (Momentum)
Uses MACD (with user‐defined Fast, Slow, and Signal lengths) to check momentum:
macdBuySignal if the MACD line crosses above its signal line (bullish)
macdSellSignal if the MACD line crosses below its signal line (bearish)
Why it matters: MACD crossovers confirm an emerging momentum shift, aligning signals with actual price acceleration rather than random fluctuation.
3. RSI Overbought/Oversold Filter
RSI (Relative Strength Index) is calculated with a chosen length, plus Overbought & Oversold thresholds:
For long signals: the RSI must be below the Overbought threshold (e.g. 70).
For short signals: the RSI must be above the Oversold threshold (e.g. 30).
Why it matters: Prevents buying when price is already overbought or shorting when price is too oversold, filtering out possible poor‐risk trades.
4. Optional ADX Filter (Trend Strength)
If enabled, ADX must exceed a chosen threshold (e.g., 20) for a signal to be valid:
This ensures you’re only taking trades in markets that have sufficient directional momentum.
Why it matters: It weeds out choppy, sideways conditions where signals are unreliable.
5. Optional Volume Filter (High‐Participation Moves)
If enabled, the indicator checks whether current volume is above a certain multiple of its moving average (e.g., 1.5× average volume).
Why it matters: High volume often indicates stronger institutional interest, validating potential breakouts or reversals.
6. ATR & Chandelier (Visual Reference)
For reference only, the script can display ATR‐based stop levels or a Chandelier Exit line:
ATR (Average True Range) helps gauge volatility and can inform stop‐loss distances.
Chandelier Exit is a trailing stop technique that adjusts automatically as price moves.
Why it matters: Though this version of the script doesn’t execute trades, these lines help you see how far to place stops or how to ride a trend.
7. Final Bullish / Bearish Signal
When all conditions (trend, MACD, RSI, optional ADX, optional Volume) line up for a long, a green “Long” arrow appears.
When all conditions line up for a short, a red “Short” arrow appears.
Why it matters: You get a clear, on‐chart signal for each potential entry, rather than needing to check multiple indicators manually.
8. Session & Date Filtering
The script allows choosing a start/end date and an optional session window (e.g. 09:30–16:00).
Why it matters: Helps limit signals to a specific historical backtest range or trading hours, which can be crucial for day traders (e.g., stock market hours only).
Putting It All Together
Primary Trend → ensures you trade in line with the bigger direction.
MACD & RSI → confirm momentum and avoid overbought/oversold extremes.
ADX & Volume → optional filters for strong trend strength & genuine interest.
Arrows → each potential buy (Long) or sell (Short) signal is clearly shown on your chart.
Use Cases
5‐Minute Scalping: Shorter RSI/MACD lengths to catch small, frequent intraday moves.
Swing Trading: Larger MAs, bigger RSI thresholds, and using ADX to filter only major trends.
Cautious Approach: Enable volume & ADX filters to reduce false signals in choppy markets.
Benefits & Limitations
Benefits:
Consolidates multiple indicators into one overlay.
Clear buy/sell signals with optional dynamic volatility references.
Flexible user inputs adapt to different trading styles/timeframes.
Limitations:
Like all technical indicators, it can produce false signals in sideways or news‐driven markets.
Success depends heavily on user settings and the particular market’s behavior.
Summary
The MLB Momentum Indicator combines a trend filter (MAs), momentum check (MACD), overbought/oversold gating (RSI), and optional ADX/Volume filters to create clear buy/sell arrows on your chart. This approach encourages trading in sync with both trend and momentum, and helps avoid suboptimal entries when volume or trend strength is lacking. It can be tailored to scalp micro‐moves on lower timeframes or used for higher‐timeframe swing trading by adjusting the input settings.
อินดิเคเตอร์และกลยุทธ์
Average MomentumThis indicator will calculate for any given equity four values: the simple average of the indicated equity for a timeframe of one month, three months, six months for twelve months. Then the script will create the average value of those four averages and display it in red if the value decreases and green if it progresses. It is useful as an indicator to go risk off.
Absolute Rate Of Changeabsolute value of ROC indicator. helpful for determining if the momentum is accelerating in regardless of direction
Uptrick: Acceleration ShiftsIntroduction
Uptrick: Acceleration Shifts is designed to measure and visualize price momentum shifts by focusing on acceleration —the rate of change in velocity over time. It uses various moving average techniques as a trend filter, providing traders with a clearer perspective on market direction and potential trade entries or exits.
Purpose
The main goal of this indicator is to spot strong momentum changes (accelerations) and confirm them with a chosen trend filter. It attempts to distinguish genuine market moves from noise, helping traders make more informed decisions. The script can also trigger multiple entries (smart pyramiding) within the same trend, if desired.
Overview
By measuring how quickly price velocity changes (acceleration) and comparing it against a smoothed average of itself, this script generates buy or sell signals once the acceleration surpasses a given threshold. A trend filter is added for further validation. Users can choose from multiple smoothing methods and color schemes, and they can optionally enable a small table that displays real-time acceleration values.
Originality and Uniqueness
This script offers an acceleration-based approach, backed by several different moving average choices. The blend of acceleration thresholds, a trend filter, and an optional extra-entry (pyramiding) feature provides a flexible toolkit for various trading styles. The inclusion of multiple color themes and a slope-based coloring of the trend line adds clarity and user customization.
Inputs & Features
1. Acceleration Length (length)
This input determines the number of bars used when calculating velocity. Specifically, the script computes velocity by taking the difference in closing prices over length bars, and then calculates acceleration based on how that velocity changes over an additional length. The default is 14.
2. Trend Filter Length (smoothing)
This sets the lookback period for the chosen trend filter method. The default of 50 results in a moderately smooth trend line. A higher smoothing value will create a slower-moving trend filter.
3. Acceleration Threshold (threshold)
This multiplier determines when acceleration is considered strong enough to trigger a main buy or sell signal. A default value of 2.5 means the current acceleration must exceed 2.5 times the average acceleration before signaling.
4. Smart Pyramiding Strength (pyramidingThreshold)
This lower threshold is used for additional (pyramiding) entries once the main trend has already been identified. For instance, if set to 0.5, the script looks for acceleration crossing ±0.5 times its average acceleration to add extra positions.
5. Max Pyramiding Entries (maxPyramidingEntries)
This sets a limit on how many extra positions can be opened (beyond the first main signal) in a single directional trend. The default of 3 ensures traders do not become overexposed.
6. Show Acceleration Table (showTable)
When enabled, a small table displaying the current acceleration and its average is added to the top-right corner of the chart. This table helps monitor real-time momentum changes.
7. Smart Pyramiding (enablePyramiding)
This toggle decides whether additional entries (buy or sell) will be generated once a main signal is active. If enabled, these extra signals act as filtered entries, only firing when acceleration re-crosses a smaller threshold (pyramidingThreshold). These signals have a '+' next to their signal on the label.
8. Select Color Scheme (selectedColorScheme)
Allows choosing between various pre-coded color themes, such as Default, Emerald, Sapphire, Golden Blaze, Mystic, Monochrome, Pastel, Vibrant, Earth, or Neon. Each theme applies a distinct pair of colors for bullish and bearish conditions.
9. Trend Filter (TrendFilter)
Lets the user pick one of several moving average approaches to determine the prevailing trend. The options include:
Short Term (TEMA)
EWMA
Medium Term (HMA)
Classic (SMA)
Quick Reaction (DEMA)
Each method behaves differently, balancing reactivity and smoothness.
10. Slope Lookback (slopeOffset)
Used to measure the slope of the trend filter over a set number of bars (default is 10). This slope then influences the coloring of the trend filter line, indicating bullish or bearish tilt.
Note: The script refers to this as the "Massive Slope Index," but it effectively serves as a Trend Slope Calculation, measuring how the chosen trend filter changes over a specified period.
11. Alerts for Buy/Sell and Pyramiding Signals
The script includes built-in alert conditions that can be enabled or configured. These alerts trigger whenever the script detects a main Buy or Sell signal, as well as extra (pyramiding) signals if Smart Pyramiding is active. This feature allows traders to receive immediate notifications or automate a trading response.
Calculation Methodology
1. Velocity and Acceleration
Velocity is derived by subtracting the closing price from its value length bars ago. Acceleration is the difference in velocity over an additional length period. This highlights how quickly momentum is shifting.
2. Average Acceleration
The script smooths raw acceleration with a simple moving average (SMA) using the smoothing input. Comparing current acceleration against this average provides a threshold-based signal mechanism.
3. Trend Filter
Users can pick one of five moving average types to form a trend baseline. These range from quick-reacting methods (DEMA, TEMA) to smoother options (SMA, HMA, EWMA). The script checks whether the price is above or below this filter to confirm trend direction.
4. Buy/Sell Logic
A buy occurs when acceleration surpasses avgAcceleration * threshold and price closes above the trend filter. A sell occurs under the opposite conditions. An additional overbought/oversold check (based on a longer SMA) refines these signals further.
When price is considered oversold (i.e., close is below a longer-term SMA), a bullish acceleration signal has a higher likelihood of success because it indicates that the market is attempting to reverse from a lower price region. Conversely, when price is considered overbought (close is above this longer-term SMA), a bearish acceleration signal is more likely to be valid. This helps reduce false signals by waiting until the market is extended enough that a reversal or continuation has a stronger chance of following through.
5. Smart Pyramiding
Once a main buy or sell signal is triggered, additional (filtered) entries can be taken if acceleration crosses a smaller multiplier (pyramidingThreshold). This helps traders scale into strong moves. The script enforces a cap (maxPyramidingEntries) to limit risk.
6. Visual Elements
Candles can be recolored based on the active signal. Labels appear on the chart whenever a main or pyramiding entry signal is triggered. An optional table can show real-time acceleration values.
Color Schemes
The script includes a variety of predefined color themes. For bullish conditions, it might use turquoise or green, and for bearish conditions, magenta or red—depending on which color scheme the user selects. Each scheme aims to provide clear visual differentiation between bullish and bearish market states.
Why Each Indicator Was Part of This Component
Acceleration is employed to detect swift changes in momentum, capturing shifts that may not yet appear in more traditional measures. To further adapt to different trading styles and market conditions, several moving average methods are incorporated:
• TEMA (Triple Exponential Moving Average) is chosen for its ability to reduce lag more effectively than a standard EMA while still reacting swiftly to price changes. Its construction layers exponential smoothing in a way that can highlight sudden momentum shifts without sacrificing too much smoothness.
• DEMA (Double Exponential Moving Average) provides a faster response than a single EMA by using two layers of exponential smoothing. It is slightly less smoothed than TEMA but can alert traders to momentum changes earlier, though with a higher risk of noise in choppier markets.
• HMA (Hull Moving Average) is known for its balance of smoothness and reduced lag. Its weighted calculations help track trend direction clearly, making it useful for traders who want a smoother line that still reacts fairly quickly.
• SMA (Simple Moving Average) is the classic baseline for smoothing price data. It offers a clear, stable perspective on long-term trends, though it reacts more slowly than other methods. Its simplicity can be beneficial in lower-volatility or more stable market environments.
• EWMA (Exponentially Weighted Moving Average) provides a middle ground by emphasizing recent price data while still retaining some degree of smoothing. It typically responds faster than an SMA but is less aggressive than DEMA or TEMA.
Alongside these moving average techniques, the script employs a slope calculation (referred to as the “Massive Slope Index”) to visually indicate whether the chosen filter is sloping upward or downward. This adds an extra layer of clarity to directional analysis. The indicator also uses overbought/oversold checks, based on a longer-term SMA, to help filter out signals in overstretched markets—reducing the likelihood of false entries in conditions where the price is already extensively extended.
Additional Features
Alerts can be set up for both main signals and additional pyramiding signals, which is helpful for automated or semi-automated trading. The optional acceleration table offers quick reference values, making momentum monitoring more intuitive. Including explicit alert conditions for Buy/Sell and Pyramiding ensures traders can respond promptly to market movements or integrate these triggers into automated strategies.
Summary
This script serves as a comprehensive momentum-based trading framework, leveraging acceleration metrics and multiple moving average filters to identify potential shifts in market direction. By combining overbought/oversold checks with threshold-based triggers, it aims to reduce the noise that commonly plagues purely reactive indicators. The flexibility of Smart Pyramiding, customizable color schemes, and built-in alerts allows users to tailor their experience and respond swiftly to valid signals, potentially enhancing trading decisions across various market conditions.
Disclaimer
All trading involves significant risk, and users should apply their own judgment, risk management, and broader analysis before making investment decisions.
Minimalist Trading Plan ChecklistMinimalist Trading Plan Checklist
A clean, customizable indicator to monitor your trading plan.
Features:
Checklist: Monitor bias, narrative, context, entry.
Timeframes: Set or leave blank (❌).
Risk-Reward Ratio: Display in a neat box.
News Checkbox: Toggle for high-impact events.
Customizable: Adjust colors and layout.
Stay organized and focused on your strategy with this minimalist tool.
Short and sweet! Let me know if you need further tweaks. 😊
Initial BalanceInitial Balance Pro – Precision Trading with Market Open Dynamics
The Initial Balance Pro indicator is designed to provide traders with a clear, structured view of the market's opening price action, helping to identify key levels for intraday trading. It automatically calculates and plots the initial balance (IB) high and low, allowing traders to gauge early market sentiment and potential breakout zones.
Features:
✅ Customizable Initial Balance Period – Set your preferred IB range, whether the first 30, 60, or any custom minutes after market open.
✅ Breakout & Rejection Zones – Visually highlight key areas where price action may find support, resistance, or breakout opportunities.
✅ Midpoint & Extension Levels – Identify the IB midpoint and customizable extension levels to anticipate possible price targets.
✅ Session Flexibility – Works across various trading sessions, including pre-market and post-market hours.
✅ Alerts & Notifications – Get notified when price breaches IB levels, helping you stay ahead of key moves.
Why Use Initial Balance?
The initial balance is a fundamental concept in market profile analysis. Institutional traders often set their positions within this range, making it a crucial reference point for potential trend continuation or reversal. When price breaks above or below the IB, it can signal high-probability trade opportunities, especially when combined with volume and order flow analysis.
Perfect For:
📈 Futures & Forex Traders – Utilize the IB for breakout and mean-reversion strategies.
📊 Equity & Options Traders – Identify key levels for intraday momentum plays.
🔍 Price Action Traders – Improve trade execution with a structured market approach.
Optimize your intraday trading strategy with Initial Balance Pro , giving you a refined edge in market structure and price action analysis. 🚀
Similar Bars Pattern DetecterDescription:
The Similar Bars Pattern Detector is a professional Pine Script indicator designed for TradingView users who want to identify sequences of similar candlesticks in a row. Whether you're looking for bullish or bearish patterns, this tool helps you spot repeating formations based on customizable settings.
Features:
✅ Detects patterns of consecutive similar bars
✅ Works for both bullish and bearish trends
✅ Uses tick-based range filtering for precise detection
✅ Fully customizable: adjust number of candles, trend type, and range
✅ Highlights detected patterns directly on the chart
🔹 Ideal for traders who rely on pattern recognition to confirm trends and price movements.
🔹 Works across all markets and timeframes.
💡 How to Use:
1️⃣ Set the number of candles to detect a repeating pattern.
2️⃣ Choose bullish or bearish trend direction.
3️⃣ Adjust the tick range to fine-tune pattern similarity.
🚀 Enhance your trading analysis with this powerful pattern recognition tool!
DMI + ADX + Key Level NACHOMIXCRYPTOThe DMI + ADX + Key Level NACHOMIXCRYPTO indicator is a technical analysis tool that combines the Directional Movement Index (DMI) and the Average Directional Index (ADX) to assess trend strength and direction. It also includes customizable key levels for better visualization.
Components:
ADX (Average Directional Index):
Measures the strength of a trend, regardless of its direction.
Values below 25 indicate a weak trend or range-bound market.
Values between 25-50 suggest a strong trend.
Values between 50-75 indicate a very strong trend.
Values above 75 represent an extremely strong trend.
+DI (Positive Directional Indicator) and -DI (Negative Directional Indicator):
+DI indicates bullish strength, shown in green.
-DI indicates bearish strength, shown in red.
The comparison between these two lines helps determine the market direction.
Features:
Trend Detection:
When +DI is above -DI and ADX is above the key level, it signals a bullish trend.
When -DI is above +DI and ADX is above the key level, it signals a bearish trend.
Key Level Line:
A customizable horizontal line that marks the threshold for trend strength.
Trend Background Color:
Green for strong uptrends and red for strong downtrends.
Signal Arrows:
A green upward triangle is plotted when a new bullish trend starts.
A red downward triangle is plotted when a new bearish trend starts.
Trend Strength Labels:
The indicator displays the current market strength classification and whether the trend is bullish, bearish, or neutral.
Strength Analysis Table:
Provides insights on whether the market has bullish, bearish, mixed strength, or no strength at all.
This indicator is particularly useful for traders looking to identify strong trends and catch early trend reversals.
Volume Profile [ActiveQuants]The Volume Profile indicator visualizes the distribution of trading volume across price levels over a user-defined historical period. It identifies key liquidity zones, including the Point of Control (POC) (price level with the highest volume) and the Value Area (price range containing a specified percentage of total volume). This tool is ideal for traders analyzing support/resistance levels, market sentiment , and potential price reversals .
█ CORE METHODOLOGY
Vertical Price Rows: Divides the price range of the selected lookback period into equal-height rows.
Volume Aggregation: Accumulates bullish/bearish or total volume within each price row.
POC: The row with the highest total volume.
Value Area: Expands from the POC until cumulative volume meets the user-defined threshold (e.g., 70%).
Dynamic Visualization: Rows are plotted as horizontal boxes with widths proportional to their volume.
█ KEY FEATURES
- Customizable Lookback & Resolution
Adjust the historical period ( Lookback ) and granularity ( Number of Rows ) for precise analysis.
- Configurable Profile Width & Horizontal Offset
Control the relative horizontal length of the profile rows, and set the distance from the current bar to the POC row’s anchor.
Important: Do not set the horizontal offset too high. Indicators cannot be plotted more than 500 bars into the future.
- Value Area & POC Highlighting
Set the percentage of total volume required to form the Value Area , ensuring that key volume levels are clearly identified.
Value Area rows are colored distinctly, while the POC is marked with a bold line.
- Flexible Display Options
Show bullish/bearish volume splits or total volume.
Place the profile on the right or left of the chart.
- Gradient Coloring
Rows fade in color intensity based on their relative volume strength .
- Real-Time Adjustments
Modify horizontal offset, profile width, and appearance without reloading.
█ USAGE EXAMPLES
Example 1: Basic Volume Profile with Value Area
Settings:
Lookback: 500 bars
Number of Rows: 100
Value Area: 70%
Display Type: Up/Down
Placement: Right
Image Context:
The profile appears on the right side of the chart. The POC (orange line) marks the highest volume row. Value Area rows (green/red) extend above/below the POC, containing 70% of total volume.
Example 2: Total Volume with Gradient Colors
Settings:
Lookback: 800 bars
Number of Rows: 100
Profile Width: 60
Horizontal Offset: 20
Display Type: Total
Gradient Colors: Enabled
Image Context:
Rows display total volume in a single color with gradient transparency. Darker rows indicate higher volume concentration.
Example 3: Left-Aligned Profile with Narrow Value Area
Settings:
Lookback: 600 bars
Number of Rows: 100
Profile Width: 45
Horizontal Offset: 500
Value Area: 50%
Profile Placement: Left
Image Context:
The profile shifts to the left, with a tighter Value Area (50%).
█ USER INPUTS
Calculation Settings
Lookback: Historical bars analyzed (default: 500).
Number of Rows: Vertical resolution of the profile (default: 100).
Profile Width: Horizontal length of rows (default: 50).
Horizontal Offset: Distance from the current bar to the POC (default: 50).
Value Area (%): Cumulative volume threshold for the Value Area (default: 70%).
Volume Display: Toggle between Up/Down (bullish/bearish) or Total volume.
Profile Placement: Align profile to the Right or Left of the chart.
Appearance
Rows Border: Customize border width/color.
Gradient Colors: Enable fading color effects.
Value Area Colors: Set distinct colors for bullish and bearish Value Area rows.
POC Line: Adjust color, width, and visibility.
█ CONCLUSION
The Volume Profile indicator provides a dynamic, customizable view of market liquidity. By highlighting the POC and Value Area, traders can identify high-probability reversal zones, gauge market sentiment, and align entries/exits with key volume levels.
█ IMPORTANT NOTES
⚠ Lookback Period: Shorter lookbacks prioritize recent activity but may omit critical levels.
⚠ Horizontal Offset Limitation: Avoid excessively high offsets (e.g., close to ±300). TradingView restricts plotting indicators more than 500 bars into the future, which may truncate or hide the profile.
⚠ Risk Management: While the indicator highlights areas of concentrated volume, always use it in combination with other technical analysis tools and proper risk management techniques.
█ RISK DISCLAIMER
Trading involves substantial risk. The Volume Profile highlights historical liquidity but does not predict future price movements. Always use stop-loss orders and confirm signals with additional analysis. Past performance is not indicative of future results.
📊 Happy trading! 🚀
CHG FROM OPEN %As an intraday trader, I'm more interested in seeing the CHG FROM OPEN % than the CHG % measured from yesterday's close. I overlay this script on a separate Volume pane so it doesn't hide my price chart, and I hide the line since the line isn't particularly useful to me.
This script shows the current real-time CHG FROM OPEN % when you hover outside of the chart during regular trading hours (all times NYC/EST). Hovering over the chart will show you the historical CHG FROM OPEN % and, if extended hours, the CHG FROM OPEN % at the previous close.
You can also find CHG FROM OPEN % in the stock screener, but having it in the chart is more convenient for me.
Volume Aggregated Spot & FuturesAggregated volume for cryptos using spot and perpetual contracts but only those that are based on normal volume and not on tick volume.
Provides more reliable volume than volume from one provider.
Thanks to HALDRO because it's his code and I simplified it to create this version.
Volume Predictor [PhenLabs]📊 Volume Predictor
Version: PineScript™ v6
📌 Description
The Volume Predictor is an advanced technical indicator that leverages machine learning and statistical modeling techniques to forecast future trading volume. This innovative tool analyzes historical volume patterns to predict volume levels for upcoming bars, providing traders with valuable insights into potential market activity. By combining multiple prediction algorithms with pattern recognition techniques, the indicator delivers forward-looking volume projections that can enhance trading strategies and market analysis.
🚀 Points of Innovation:
Machine learning pattern recognition using Lorentzian distance metrics
Multi-algorithm prediction framework with algorithm selection
Ensemble learning approach combining multiple prediction methods
Real-time accuracy metrics with visual performance dashboard
Dynamic volume normalization for consistent scale representation
Forward-looking visualization with configurable prediction horizon
🔧 Core Components
Pattern Recognition Engine : Identifies similar historical volume patterns using Lorentzian distance metrics
Multi-Algorithm Framework : Offers five distinct prediction methods with configurable parameters
Volume Normalization : Converts raw volume to percentage scale for consistent analysis
Accuracy Tracking : Continuously evaluates prediction performance against actual outcomes
Advanced Visualization : Displays actual vs. predicted volume with configurable future bar projections
Interactive Dashboard : Shows real-time performance metrics and prediction accuracy
🔥 Key Features
The indicator provides comprehensive volume analysis through:
Multiple Prediction Methods : Choose from Lorentzian, KNN Pattern, Ensemble, EMA, or Linear Regression algorithms
Pattern Matching : Identifies similar historical volume patterns to project future volume
Adaptive Predictions : Generates volume forecasts for multiple bars into the future
Performance Tracking : Calculates and displays real-time prediction accuracy metrics
Normalized Scale : Presents volume as a percentage of historical maximums for consistent analysis
Customizable Visualization : Configure how predictions and actual volumes are displayed
Interactive Dashboard : View algorithm performance metrics in a customizable information panel
🎨 Visualization
Actual Volume Columns : Color-coded green/red bars showing current normalized volume
Prediction Columns : Semi-transparent blue columns representing predicted volume levels
Future Bar Projections : Forward-looking volume predictions with configurable transparency
Prediction Dots : Optional white dots highlighting future prediction points
Reference Lines : Visual guides showing the normalized volume scale
Performance Dashboard : Customizable panel displaying prediction method and accuracy metrics
📖 Usage Guidelines
History Lookback Period
Default: 20
Range: 5-100
This setting determines how many historical bars are analyzed for pattern matching. A longer period provides more historical data for pattern recognition but may reduce responsiveness to recent changes. A shorter period emphasizes recent market behavior but might miss longer-term patterns.
🧠 Prediction Method
Algorithm
Default: Lorentzian
Options: Lorentzian, KNN Pattern, Ensemble, EMA, Linear Regression
Selects the algorithm used for volume prediction:
Lorentzian: Uses Lorentzian distance metrics for pattern recognition, offering excellent noise resistance
KNN Pattern: Traditional K-Nearest Neighbors approach for historical pattern matching
Ensemble: Combines multiple methods with weighted averaging for robust predictions
EMA: Simple exponential moving average projection for trend-following predictions
Linear Regression: Projects future values based on linear trend analysis
Pattern Length
Default: 5
Range: 3-10
Defines the number of bars in each pattern for machine learning methods. Shorter patterns increase sensitivity to recent changes, while longer patterns may identify more complex structures but require more historical data.
Neighbors Count
Default: 3
Range: 1-5
Sets the K value (number of nearest neighbors) used in KNN and Lorentzian methods. Higher values produce smoother predictions by averaging more historical patterns, while lower values may capture more specific patterns but could be more susceptible to noise.
Prediction Horizon
Default: 5
Range: 1-10
Determines how many future bars to predict. Longer horizons provide more forward-looking information but typically decrease accuracy as the prediction window extends.
📊 Display Settings
Display Mode
Default: Overlay
Options: Overlay, Prediction Only
Controls how volume information is displayed:
Overlay: Shows both actual volume and predictions on the same chart
Prediction Only: Displays only the predictions without actual volume
Show Prediction Dots
Default: false
When enabled, adds white dots to future predictions for improved visibility and clarity.
Future Bar Transparency (%)
Default: 70
Range: 0-90
Controls the transparency of future prediction bars. Higher values make future bars more transparent, while lower values make them more visible.
📱 Dashboard Settings
Show Dashboard
Default: true
Toggles display of the prediction accuracy dashboard. When enabled, shows real-time accuracy metrics.
Dashboard Location
Default: Bottom Right
Options: Top Left, Top Right, Bottom Left, Bottom Right
Determines where the dashboard appears on the chart.
Dashboard Text Size
Default: Normal
Options: Small, Normal, Large
Controls the size of text in the dashboard for various display sizes.
Dashboard Style
Default: Solid
Options: Solid, Transparent
Sets the visual style of the dashboard background.
Understanding Accuracy Metrics
The dashboard provides key performance metrics to evaluate prediction quality:
Average Error
Shows the average difference between predicted and actual values
Positive values indicate the prediction tends to be higher than actual volume
Negative values indicate the prediction tends to be lower than actual volume
Values closer to zero indicate better prediction accuracy
Accuracy Percentage
A measure of how close predictions are to actual outcomes
Higher percentages (>70%) indicate excellent prediction quality
Moderate percentages (50-70%) indicate acceptable predictions
Lower percentages (<50%) suggest weaker prediction reliability
The accuracy metrics are color-coded for quick assessment:
Green: Strong prediction performance
Orange: Moderate prediction performance
Red: Weaker prediction performance
✅ Best Use Cases
Anticipate upcoming volume spikes or drops
Identify potential volume divergences from price action
Plan entries and exits around expected volume changes
Filter trading signals based on predicted volume support
Optimize position sizing by forecasting market participation
Prepare for potential volatility changes signaled by volume predictions
Enhance technical pattern analysis with volume projection context
⚠️ Limitations
Volume predictions become less accurate over longer time horizons
Performance varies based on market conditions and asset characteristics
Works best on liquid assets with consistent volume patterns
Requires sufficient historical data for pattern recognition
Sudden market events can disrupt prediction accuracy
Volume spikes may be muted in predictions due to normalization
💡 What Makes This Unique
Machine Learning Approach : Applies Lorentzian distance metrics for robust pattern matching
Algorithm Selection : Offers multiple prediction methods to suit different market conditions
Real-time Accuracy Tracking : Provides continuous feedback on prediction performance
Forward Projection : Visualizes multiple future bars with configurable display options
Normalized Scale : Presents volume as a percentage of maximum volume for consistent analysis
Interactive Dashboard : Displays key metrics with customizable appearance and placement
🔬 How It Works
The Volume Predictor processes market data through five main steps:
1. Volume Normalization:
Converts raw volume to percentage of maximum volume in lookback period
Creates consistent scale representation across different timeframes and assets
Stores historical normalized volumes for pattern analysis
2. Pattern Detection:
Identifies similar volume patterns in historical data
Uses Lorentzian distance metrics for robust similarity measurement
Determines strength of pattern match for prediction weighting
3. Algorithm Processing:
Applies selected prediction algorithm to historical patterns
For KNN/Lorentzian: Finds K nearest neighbors and calculates weighted prediction
For Ensemble: Combines multiple methods with optimized weighting
For EMA/Linear Regression: Projects trends based on statistical models
4. Accuracy Calculation:
Compares previous predictions to actual outcomes
Calculates average error and prediction accuracy
Updates performance metrics in real-time
5. Visualization:
Displays normalized actual volume with color-coding
Shows current and future volume predictions
Presents performance metrics through interactive dashboard
💡 Note:
The Volume Predictor performs optimally on liquid assets with established volume patterns. It’s most effective when used in conjunction with price action analysis and other technical indicators. The multi-algorithm approach allows adaptation to different market conditions by switching prediction methods. Pay special attention to the accuracy metrics when evaluating prediction reliability, as sudden market changes can temporarily reduce prediction quality. The normalized percentage scale makes the indicator consistent across different assets and timeframes, providing a standardized approach to volume analysis.
Share Value Indicator**Share Value Indicator**
This TradingView indicator allows traders to track the real-time total value of their stock holdings. Users can input the number of shares they own, and the script calculates the total value based on the current stock price. A horizontal ray is drawn at the last price level, and a label displays the total value of the shares. The indicator updates dynamically, ensuring only one ray and label are visible at a time. Ideal for traders who want to visualize their investment's real-time worth directly on the chart.
Money Flow Divergence IndicatorOverview
The Money Flow Divergence Indicator is designed to help traders and investors identify key macroeconomic turning points by analyzing the relationship between U.S. M2 money supply growth and the S&P 500 Index (SPX). By comparing these two crucial economic indicators, the script highlights periods where market liquidity is outpacing or lagging behind stock market growth, offering potential buy and sell signals based on macroeconomic trends.
How It Works
1. Data Sources
S&P 500 Index (SPX500USD): Tracks the stock market performance.
U.S. M2 Money Supply (M2SL - Federal Reserve Economic Data): Represents available liquidity in the economy.
2. Growth Rate Calculation
SPX Growth: Percentage change in the S&P 500 index over time.
M2 Growth: Percentage change in M2 money supply over time.
Growth Gap (Delta): The difference between M2 growth and SPX growth, showing whether liquidity is fueling or lagging behind market performance.
3. Visualization
A histogram displays the growth gap over time:
Green Bars: M2 growth exceeds SPX growth (potential bullish signal).
Red Bars: SPX growth exceeds M2 growth (potential bearish signal).
A zero line helps distinguish between positive and negative growth gaps.
How to Use It
✅ Bullish Signal: When green bars appear consistently, indicating that liquidity is outpacing stock market growth. This suggests a favorable environment for buying or holding positions.
❌ Bearish Signal: When red bars appear consistently, meaning stock market growth outpaces liquidity expansion, signaling potential overvaluation or a market correction.
Best Timeframes for Analysis
This indicator works best on monthly timeframes (M) since it is designed for long-term investors and macro traders who focus on broad economic cycles.
Who Should Use This Indicator?
📈 Long-term investors looking for macroeconomic trends.
📊 Swing traders who incorporate liquidity analysis in their strategies.
💰 Portfolio managers assessing market liquidity conditions.
🚀 Use this indicator to stay ahead of market trends and make informed investment decisions based on macroeconomic liquidity shifts! 🚀
Lowess Channel + (RSI) [ChartPrime]The Lowess Channel + (RSI) indicator applies the LOWESS (Locally Weighted Scatterplot Smoothing) algorithm to filter price fluctuations and construct a dynamic channel. LOWESS is a non-parametric regression method that smooths noisy data by fitting weighted linear regressions at localized segments. This technique is widely used in statistical analysis to reveal trends while preserving data structure.
In this indicator, the LOWESS algorithm is used to create a central trend line and deviation-based bands. The midline changes color based on trend direction, and diamonds are plotted when a trend shift occurs. Additionally, an RSI gauge is positioned at the end of the channel to display the current RSI level in relation to the price bands.
lowess_smooth(src, length, bandwidth) =>
sum_weights = 0.0
sum_weighted_y = 0.0
sum_weighted_xy = 0.0
sum_weighted_x2 = 0.0
sum_weighted_x = 0.0
for i = 0 to length - 1
x = float(i)
weight = math.exp(-0.5 * (x / bandwidth) * (x / bandwidth))
y = nz(src , 0)
sum_weights := sum_weights + weight
sum_weighted_x := sum_weighted_x + weight * x
sum_weighted_y := sum_weighted_y + weight * y
sum_weighted_xy := sum_weighted_xy + weight * x * y
sum_weighted_x2 := sum_weighted_x2 + weight * x * x
mean_x = sum_weighted_x / sum_weights
mean_y = sum_weighted_y / sum_weights
beta = (sum_weighted_xy - mean_x * mean_y * sum_weights) / (sum_weighted_x2 - mean_x * mean_x * sum_weights)
alpha = mean_y - beta * mean_x
alpha + beta * float(length / 2) // Centered smoothing
⯁ KEY FEATURES
LOWESS Price Filtering – Smooths price fluctuations to reveal the underlying trend with minimal lag.
Dynamic Trend Coloring – The midline changes color based on trend direction (e.g., bullish or bearish).
Trend Shift Diamonds – Marks points where the midline color changes, indicating a possible trend shift.
Deviation-Based Bands – Expands above and below the midline using ATR-based multipliers for volatility tracking.
RSI Gauge Display – A vertical gauge at the right side of the chart shows the current RSI level relative to the price channel.
Fully Customizable – Users can adjust LOWESS length, band width, colors, and enable or disable the RSI gauge and adjust RSIlength.
⯁ HOW TO USE
Use the LOWESS midline as a trend filter —bullish when green, bearish when purple.
Watch for trend shift diamonds as potential entry or exit signals.
Utilize the price bands to gauge overbought and oversold zones based on volatility.
Monitor the RSI gauge to confirm trend strength—high RSI near upper bands suggests overbought conditions, while low RSI near lower bands indicates oversold conditions.
⯁ CONCLUSION
The Lowess Channel + (RSI) indicator offers a powerful way to analyze market trends by applying a statistically robust smoothing algorithm. Unlike traditional moving averages, LOWESS filtering provides a flexible, responsive trendline that adapts to price movements. The integrated RSI gauge enhances decision-making by displaying momentum conditions alongside trend dynamics. Whether used for trend-following or mean reversion strategies, this indicator provides traders with a well-rounded perspective on market behavior.
ootaLibrary "oota"
Collection of all custom and enhanced TA indicators - Object oriented methods implementation
method tr(c, useTrueRange)
returns true range of the candle
Namespace types: Candle
Parameters:
c (Candle) : Candle object containing ohlc data
useTrueRange (bool) : Use true range for atr calculation instead of just high/low difference
method ma(maType, length, source)
returns custom moving averages
Namespace types: simple CustomSeries
Parameters:
maType (simple CustomSeries) : Custom series type
length (simple int) : Moving Average Length
source (float) : Moving Average Source
Returns: moving average for the given type and length
method atr(maType, length, useTrueRange, c)
returns ATR with custom moving average
Namespace types: simple CustomSeries
Parameters:
maType (simple CustomSeries) : Custom series type
length (simple int) : Moving Average Length
useTrueRange (bool) : Use true range for atr calculation instead of just high/low difference
c (Candle) : Candle object containing ohlc
Returns: ATR for the given moving average type and length
method atrpercent(maType, length, useTrueRange, c)
returns ATR as percentage of close price
Namespace types: simple CustomSeries
Parameters:
maType (simple CustomSeries) : Custom series type
length (simple int) : Moving Average Length
useTrueRange (bool) : Use true range for atr calculation instead of just high/low difference
c (Candle) : Candle object containing ohlc
Returns: ATR as percentage of close price for the given moving average type and length
method bb(maType, length, multiplier, sticky, c)
returns Bollinger band for custom moving average
Namespace types: simple CustomSeries
Parameters:
maType (simple CustomSeries) : Custom series type
length (simple int) : Moving Average Length
multiplier (float) : Standard Deviation multiplier
sticky (simple bool) : - sticky boundaries which will only change when value is outside boundary.
c (Candle) : Candle object containing ohlc
Returns: Bollinger band with custom moving average for given source, length and multiplier
method bbw(maType, length, multiplier, sticky, c)
returns Bollinger bandwidth for custom moving average
Namespace types: simple CustomSeries
Parameters:
maType (simple CustomSeries) : Custom series type
length (simple int) : Moving Average Length
multiplier (float) : Standard Deviation multiplier
sticky (simple bool) : sticky boundaries which will only change when value is outside boundary.
c (Candle) : Candle object containing ohlc
Returns: Bollinger Bandwidth for custom moving average for given source, length and multiplier
method bpercentb(maType, length, multiplier, sticky, c)
returns Bollinger Percent B for custom moving average
Namespace types: simple CustomSeries
Parameters:
maType (simple CustomSeries) : Custom series type
length (simple int) : Moving Average Length
multiplier (float) : Standard Deviation multiplier
sticky (simple bool) : - sticky boundaries which will only change when value is outside boundary.
c (Candle) : Candle object containing ohlc
Returns: Bollinger Percent B for custom moving average for given source, length and multiplier
method kc(maType, length, multiplier, useTrueRange, sticky, c)
returns Keltner Channel for custom moving average
Namespace types: simple CustomSeries
Parameters:
maType (simple CustomSeries) : Custom series type
length (simple int) : Moving Average Length
multiplier (float) : Standard Deviation multiplier
useTrueRange (simple bool) : - if set to false, uses high-low.
sticky (simple bool) : - sticky boundaries which will only change when value is outside boundary.
c (Candle) : Candle object containing ohlc
Returns: Keltner Channel for custom moving average for given souce, length and multiplier
method kcw(maType, length, multiplier, useTrueRange, sticky, c)
returns Keltner Channel Width with custom moving average
Namespace types: simple CustomSeries
Parameters:
maType (simple CustomSeries) : Custom series type
length (simple int) : Moving Average Length
multiplier (float) : Standard Deviation multiplier
useTrueRange (simple bool) : - if set to false, uses high-low.
sticky (simple bool) : - sticky boundaries which will only change when value is outside boundary.
c (Candle) : Candle object containing ohlc
Returns: Keltner Channel Width for custom moving average
method kpercentk(maType, length, multiplier, useTrueRange, sticky, c)
returns Keltner Channel Percent K Width with custom moving average
Namespace types: simple CustomSeries
Parameters:
maType (simple CustomSeries) : Custom series type
length (simple int) : Moving Average Length
multiplier (float) : Standard Deviation multiplier
useTrueRange (simple bool) : - if set to false, uses high-low.
sticky (simple bool) : - sticky boundaries which will only change when value is outside boundary.
c (Candle) : Candle object containing ohlc
Returns: Keltner Percent K for given moving average, source, length and multiplier
method dc(c, length, sticky)
returns Custom Donchian Channel
Namespace types: Candle
Parameters:
c (Candle) : Candle object containing ohlc
length (simple int) : - donchian channel length
sticky (simple bool) : - sticky boundaries which will only change when value is outside boundary.
Returns: Donchian channel
method dcw(c, length, sticky)
returns Donchian Channel Width
Namespace types: Candle
Parameters:
c (Candle) : Candle object containing ohlc
length (simple int) : - donchian channel length
sticky (simple bool) : - sticky boundaries which will only change when value is outside boundary.
Returns: Donchian channel width
method dpercentd(c, length, sticky)
returns Donchian Channel Percent of price
Namespace types: Candle
Parameters:
c (Candle) : Candle object containing ohlc
length (simple int) : - donchian channel length
sticky (simple bool) : - sticky boundaries which will only change when value is outside boundary.
Returns: Donchian channel Percent D
method supertrend(maType, length, multiplier, useTrueRange, waitForClose, delayed, c)
supertrend Simple supertrend based on atr but also takes into consideration of custom MA Type, sources
Namespace types: simple CustomSeries
Parameters:
maType (simple CustomSeries) : Custom Series
length (simple int) : ATR Length
multiplier (simple float) : ATR Multiplier
useTrueRange (simple bool) : - if set to false, uses high-low.
waitForClose (simple bool) : : Considers source for direction change crossover if checked. Else, uses highSource and lowSource.
delayed (simple bool) : : if set to true lags supertrend atr stop based on target levels.
c (Candle) : Candle object containing ohlc
Returns: dir : Supertrend direction
supertrend : BuyStop if direction is 1 else SellStop
method oscillatorRange(seriesType, source, highlowLength, rangeLength, sticky)
oscillatorRange - returns Custom overbought/oversold areas for an oscillator input
Namespace types: simple CustomSeries
Parameters:
seriesType (simple CustomSeries) : - Custom series type
source (float) : - Osillator source such as RSI, COG etc.
highlowLength (simple int) : - length on which highlow of the oscillator is calculated
rangeLength (simple int) : - length used for calculating oversold/overbought range - usually same as oscillator length
sticky (simple bool) : - overbought, oversold levels won't change unless crossed
Returns: Dynamic overbought and oversold range for oscillator input
method oscillator(oscillatorType, length, shortLength, longLength, c)
oscillator - returns Choice of oscillator with custom overbought/oversold range
Namespace types: simple OscillatorType
Parameters:
oscillatorType (simple OscillatorType) : OscillatorType object
length (simple int) : - Oscillator length - not used for TSI
shortLength (simple int) : - shortLength only used for TSI
longLength (simple int) : - longLength only used for TSI
c (Candle) : Candle object containing ohlc
Returns: Oscillator value
method oscillatorWithRange(oscillatorType, length, shortLength, longLength, seriesType, highlowLength, sticky, c)
oscillatorWithRange - returns Choice of oscillator with custom overbought/oversold range
Namespace types: simple OscillatorType
Parameters:
oscillatorType (simple OscillatorType) : OscillatorType object
length (simple int) : - Oscillator length - not used for TSI
shortLength (simple int) : - shortLength only used for TSI
longLength (simple int) : - longLength only used for TSI
seriesType (simple CustomSeries) : - CustomSeries enum type
highlowLength (simple int) : - length on which highlow of the oscillator is calculated
sticky (simple bool) : - overbought, oversold levels won't change unless crossed
c (Candle) : Candle object containing ohlc
Returns: Oscillator value along with dynamic overbought and oversold range for oscillator input
Candle
Custom candle object
Fields:
o (series float) : open
h (series float) : high
l (series float) : low
c (series float) : close
barindex (series int) : bar_index
bartime (series int) : time
bartimeclose (series int) : time_close
v (series float) : volume
Volume-Weighted MA Crossover [AlphaAlgos]Volume-Weighted MA Crossover
Overview:
The Volume-Weighted MA Crossover is a sophisticated trend-following indicator designed to capture reliable trend reversals and trend continuation signals using volume and price action. By combining the power of Volume-Weighted Moving Averages (VWMA) and the simplicity of Simple Moving Averages (SMA) , this indicator provides a more robust and reliable trend filter. It ensures that trend signals are supported by strong market volume, offering a deeper insight into market strength and potential price movements.
How It Works:
The Volume-Weighted MA Crossover indicator calculates a Volume-Weighted Moving Average (VWMA) of the chosen price source (typically close ), which takes into account both the price and volume of each bar. This ensures that price movements with higher volume are weighted more heavily, providing a better reflection of actual market sentiment.
In conjunction with the VWMA, a traditional Simple Moving Average (SMA) is used to filter out noise and smooth price data, providing a more stable trend direction. The crossover between the VWMA and SMA serves as the primary trading signal:
Long Signal (Bullish Crossover) : The VWMA crosses above the SMA, indicating that a strong bullish trend is likely underway, supported by increased volume and price action.
Short Signal (Bearish Crossover) : The VWMA crosses below the SMA, signaling that a bearish trend is emerging, backed by decreasing volume and price reversal.
The Volume-Weighted MA Crossover can be used as a standalone indicator or in conjunction with other tools to enhance your trading strategy, offering both trend-following and volume confirmation.
Key Features:
Volume Sensitivity : The VWMA adjusts the moving average based on volume, providing a more accurate representation of price action during high-volume periods. This makes the indicator more sensitive to market dynamics, ensuring that price movements during significant volume spikes are prioritized.
Trend Confirmation : The crossover of the VWMA and SMA offers clear and actionable signals, helping traders identify trend reversals early and with more confidence.
Clean Signal Presentation : With color-coded signal markers , this indicator makes it easy to spot actionable entry points.
Customizable Settings : Tailor the VWMA and SMA periods, volume multiplier, and source price according to your preferred market conditions and timeframes, allowing the indicator to fit your trading style.
How to Use It:
Trend Direction : Look for crossovers between the VWMA and SMA to identify potential trend changes:
Volume Confirmation : The volume-weighted aspect of this indicator ensures that trends are confirmed by volume. A bullish trend with a VWMA crossing above the SMA suggests that the upward movement is supported by strong market sentiment (high volume). Conversely, a bearish trend with a VWMA crossing below the SMA indicates a reversal is supported by volume reduction.
Trend Continuation & Reversal : This indicator works particularly well during strong trending markets. However, it can also identify potential reversals, particularly during periods of high volume and rapid price changes.
Best Timeframe to Use:
This indicator is adaptable to multiple timeframes and can be used across various market types. However, it tends to work most effectively on medium to long-term charts (such as 1-hour, 4-hour, and daily charts) where trends have the potential to develop more clearly and with more volume participation.
Ideal for:
Trend-following traders looking for reliable signals that are confirmed by both price action and volume.
Swing traders who want to enter trades at the beginning of a new trend or after a confirmed trend reversal.
Day traders seeking clear and easy-to-read signals on intra-day charts, helping to pinpoint optimal entry and exit points during volatile market conditions.
Conclusion:
The Volume-Weighted MA Crossover is an essential tool for any trader looking to improve their trend-following strategy. By incorporating both volume and price action into a VWMA and SMA crossover , it offers a more refined approach to identifying and confirming trends. Whether you're a trend follower , swing trader , or day trader , this indicator provides clear, actionable signals backed by volume confirmation, giving you the confidence to execute your trades with precision.
Williams Fractals Ultimate (Donchian Adjusted)Williams Fractals Ultimate (Donchian Adjusted)
Understanding Williams Fractals
Williams Fractals are a simple yet powerful tool used to identify potential turning points in the market. They highlight local highs (up fractals) and local lows (down fractals) based on a set period.
An up fractal appears when a price peak is higher than the surrounding prices.
A down fractal appears when a price low is lower than the surrounding prices.
Fractals help traders spot support and resistance levels, potential trend reversals, and price breakout zones.
Why Adjust Fractals with the Donchian Channel?
The standard Williams Fractals method identifies local highs and lows without considering broader market context. This script enhances fractal accuracy by integrating the Donchian Channel, which tracks the highest highs and lowest lows over a set period.
- The Donchian Baseline is calculated as the average of the highest high and lowest low over a selected period.
- Fractals are filtered based on this baseline:
Up Fractals are only shown if they are above the Donchian baseline.
Down Fractals are only shown if they are below the Donchian baseline.
This filtering method removes weak signals and ensures that only relevant fractals aligned with market structure are displayed.
Key Features of the Script
Customizable Fractal & Donchian Periods – Allows traders to fine-tune fractal sensitivity.
Donchian-Based Filtering – Reduces noise and highlights meaningful fractals.
Fractal ZigZag Line (Optional) – Helps visualize price swings more clearly.
Why Is This So Effective?
Stronger trend signals – Filtering with the Donchian baseline eliminates unreliable fractals.
Clearer price action – The optional ZigZag line visually connects significant highs and lows.
Easy trend identification – Helps traders confirm breakout zones and key price levels.
This script is a technical analysis tool and does not guarantee profitable trades. Always combine it with other indicators and risk management strategies before making trading decisions.
Custom Time Alert with Vertical Line📌 Detailed Explanation of the Custom Time Alert with Vertical Line in Pine Script v5
This script is a time-based alert system designed for TradingView. It allows traders to set a specific hour and minute for alerts and provides visual indicators on the chart, including a marker when the alert triggers and a vertical line at the alert time.
🔹 Main Features
Custom Alert Time → Users can specify the exact hour and minute for an alert.
Time Zone Offset Support → Users can manually adjust their local UTC offset to ensure alerts trigger at the correct time.
Real-Time Alert Condition → When the market reaches the set time, an alert notification is triggered.
Chart Visualization → A red marker appears when the alert is activated, and a blue vertical line is drawn at the alert time.
Automated Calculation → The script adjusts the alert time based on the user’s time zone settings.
🛠️ How It Works
User Input for Alert Time
The script allows users to enter their desired alert hour (0-23) and minute (0-59).
This ensures the alert triggers at the exact specified time.
Time Zone Offset Handling
Users enter their UTC offset (e.g., New York is -5, Tokyo is +9).
This ensures alerts work correctly regardless of the user’s location.
Time Calculation
The script adjusts the TradingView time by adding the time zone offset in milliseconds.
This converts the UTC-based TradingView time into the user’s local time.
Checking for a Time Match
The script constantly checks if the current hour and minute match the user-defined alert time.
If they match, the script activates an alert.
Triggering Alerts
The script uses TradingView’s alertcondition() function to create an alert.
When the time matches, TradingView sends a notification (e.g., pop-up, sound, or mobile alert).
Chart Markers for Visual Alerts
A red marker is displayed on the chart when the alert triggers.
A blue vertical line is drawn at the exact alert time.
📌 Example Use Cases
📈 1. Forex Traders Monitoring Market Opens
A forex trader who trades the London session wants an alert when the market opens at 8:00 AM UTC.
The trader sets:
Alert Hour = 8
Alert Minute = 0
Time Zone Offset = 0 (for UTC)
When the market reaches 8:00 AM UTC, the script triggers an alert.
📈 2. Stock Market Open Alerts
A trader in New York (EST) wants an alert at 9:30 AM Eastern Time (New York Stock Exchange open).
New York’s UTC offset is -5.
The trader sets:
Alert Hour = 9
Alert Minute = 30
Time Zone Offset = -5
The script ensures the alert triggers at 9:30 AM EST.
📈 3. Crypto Trader Watching a Specific Time
A crypto trader wants an alert for a specific strategy at 3:00 PM in Tokyo (UTC+9).
Tokyo’s UTC offset is +9.
The trader sets:
Alert Hour = 15
Alert Minute = 0
Time Zone Offset = +9
The script ensures the alert triggers exactly at 3:00 PM Tokyo time.
regressionUtilitiesLibrary "regressionUtilities"
get_linear_regression(bar_index_array, prices_array, stdDev_mult)
: Generates the linear regression channel for an array of values.
Parameters:
bar_index_array (array) : (array): Array with bar indexes
prices_array (array) : (array): Array with prices
stdDev_mult (float) : (float): Standard deviation multiple for the channels
Returns: : Returns x1, x2, y1_mid, y2_mid, y1_up, y2_up, y1_dn, y2_dn, m, b, R2, stdDev
get_optimal_linearRegression_channel(max_length, min_length, source, stdDev_mult, show_data_table, tableYpos, tableXpos, table_textSize, barsToRight, plot_labels, include_levels)
: Gets the best fitting linear regression using optimum length
Parameters:
max_length (int) : (int): Maximum bar length
min_length (int) : (int): Minimum bar length
source (float) : (float): Source for the regression
stdDev_mult (float) : (float): Array with prices
show_data_table (bool) : (bool): Activates and shows the data table
tableYpos (string)
tableXpos (string)
table_textSize (string)
barsToRight (int)
plot_labels (bool)
include_levels (bool)
Returns: : Returns three line objects that conform the regression channel, plus the optimal length and maximum r2
get_regressionChannel_data(max_length, min_length, source, stdDev_mult, plot_linearRegression, plot_labels, include_levels, barsToRight)
: Gets data for the linear regression channel
Parameters:
max_length (int) : (int): Maximum length for the linear regression.
min_length (int) : (int): Minimum length for the linear regression.
source (float) : (float): Source for the linear regression
stdDev_mult (float) : (float): Multiple for the standar deviations for the linear regression channel.
plot_linearRegression (bool)
plot_labels (bool)
include_levels (bool)
barsToRight (int)
Returns: : Returns a maps with the regression levels, the direction flag and the datatable map.
get_regressionChannel_data_v2(max_length, min_length, source, stdDev_mult, plot_linearRegression, plot_labels, include_levels, barsToRight)
Parameters:
max_length (int)
min_length (int)
source (float)
stdDev_mult (float)
plot_linearRegression (bool)
plot_labels (bool)
include_levels (bool)
barsToRight (int)
get_cuadratic_regression(x_array, y_array, bars_to_project, max_length)
: Gets the best fitting linear regression using optimum length
Parameters:
x_array (array) : (array): Maximum bar length
y_array (array) : (array): Minimum bar length
bars_to_project (int) : (int): Array with prices
max_length (int)
Returns: : Returns three line objects
Premarket VolumeTimeframe: Use on intraday charts (e.g., 1-minute, 5-minute) with extended hours enabled.
Behavior: The plot will appear at 4:00 AM, grow as volume accumulates, and disappear at 9:30 AM each day.
Dynamic Candle Range Point IndicatorThe "Dynamic Candle Range Point Indicator" (DCRPI) does two important jobs at once. For each candle on your chart, it shows you exactly how many points the price moved in two different ways:
1. At the top of each candle, you'll see how many points the price moved from open to close (the body range)
2. At the bottom, you'll see the total movement from the highest to lowest point (the full range)
The really smart part is how it colors the borders of candles based on how much the price moved. This gives you a quick visual way to spot significant price movements:
- Small movements keep the standard green/red colors
- Medium movements (25-30 points) show as yellow
- Larger movements get more unique colors (orange, purple, blue, etc.)
This makes it easy to instantly identify which candles had the most significant price movement without having to read all the numbers. You can quickly spot the most volatile candles across your chart by their distinctive border colors.
The indicator is lightweight and should run smoothly on most charts without causing performance issues.
ADX + DMI (HMA Version)📝 Description (What This Indicator Does)
🚀 ADX + DMI (HMA Version) is a trend strength oscillator that enhances the traditional ADX by using the Hull Moving Average (HMA) instead of EMA.
✅ This results in a much faster and more responsive trend detection while filtering out choppy price action.
🎯 What This Indicator Does:
1️⃣ Measures Trend Strength – ADX shows when a trend is strong or weak.
2️⃣ Identifies Trend Direction – DI+ (Green) shows bullish momentum, DI- (Red) shows bearish momentum.
3️⃣ Uses Hull Moving Average (HMA) for Faster Signals – Removes lag and reacts faster to trend changes.
4️⃣ Reduces False Signals – Traditional ADX lags behind, but this version reacts quickly to reversals.
5️⃣ Good for Scalping & Day Trading – Especially for BTC 5-min and lower timeframes.
⚙ Indicator Inputs (Customization)
Input Name Example Value Purpose
ADX Length 14 Defines the smoothing for the ADX value.
DI Length 14 Defines how DI+ and DI- are calculated.
HMA Length 24 Hull Moving Average smoothing for ADX & DI+.
Trend Threshold 25 The level above which ADX confirms a strong trend.
📌 You can adjust these settings to optimize for different assets and timeframes.
🎯 Trading Rules & How to Use It
✅ How to Identify a Strong Trend:
When ADX (Blue Line) is above 25→ A strong trend is in play.
When ADX is below 25 → The market is choppy or ranging.
✅ How to Use DI+ and DI- for Trend Direction:
If DI+ (Green) is above DI- (Red), the market is in an uptrend.
If DI- (Red) is above DI+ (Green), the market is in a downtrend.
✅ How to Confirm Entries & Exits:
1️⃣ Enter Long when DI+ crosses above DI- while ADX is rising above 25.
2️⃣ Enter Short when DI- crosses above DI+ while ADX is rising above 25.
3️⃣ Avoid trading when ADX is below 25 – the market is in a choppy range.
This should not be used as a stand alone oscillator. Trading takes skill and is risky. Use at your own risk.
This is not advise on how to trade, these are just examples of how I use the oscillator. Trade at your own risk.
You can put this on your chart versus the tradingview adx and you can adjust the settings to see the difference. This was optimized for btc on the 5 min chart. You can adjust for your trading strategy.
RSI Disparity SignalRSI Disparity Signal Indicator
Overview:
This TradingView indicator detects when the RSI is significantly lower than its RSI-based moving average (RSI MA). Whenever the RSI is 20 points or more below the RSI MA, a signal (red dot) appears above the corresponding candlestick.
How It Works:
Calculates RSI using the default 14-period setting.
Calculates the RSI-based Moving Average (RSI MA) using a 14-period simple moving average (SMA).
Measures the disparity between the RSI and its MA.
Generates a signal when the RSI is 20 points or more below the RSI MA.
Plots a red circle above the candlestick whenever this condition is met.
Customization:
You can modify the RSI length and MA period to fit your trading strategy.
Change the plotshape() style to use different symbols like triangles or arrows.
Adjust the disparity threshold (currently set at 20) to make the signal more or less sensitive.
Use Case:
This indicator can help identify potentially oversold conditions where RSI is significantly below its average, signaling possible price reversals.