VBSMI Strategy by QTX Algo SystemsVolatility Based SMI Strategy by QTX Algo Systems
Overview
The Volatility Based SMI Strategy transforms our popular VBSMI with Dynamic Bands indicator into a fully automated strategy that traders can backtest inside TradingView. It retains all core logic from the indicator—including adaptive volatility scaling and trend-based overbought/oversold thresholds—but adds two configurable entry methods, exit conditions, and a dual-mode trade execution engine.
This script is published separately from the VBSMI indicator because some traders use VBSMI as a confluence tool within their existing system, while others prefer a rules-based strategy that can be simulated, optimized, and tracked over time. This script serves the latter use case.
How It Works
Like the original indicator, this strategy uses:
Double-Smoothed SMI Calculation: Based on smoothed momentum using EMA of the relative and full range.
Adaptive Volatility Scaling: Uses a normalized BBWP-based factor to reflect current market volatility.
Dynamic Band Adjustment: Trend direction and strength shift overbought/oversold levels upward or downward.
Band Tilt & Compression Controls: Inputs allow users to define how aggressively the bands shift with trend conditions.
What’s different is the strategy layer—you now choose from two types of entry and exit logic, and two execution styles.
🛠️ Entry & Exit Modes
There are two logic modes for both entry and exit, allowing you to adapt the strategy to your own philosophy:
Cross Mode (SMI Crosses EMA):
Entry: Buy when SMI crosses above its EMA
Exit: Close when SMI crosses below its EMA
Exit OB/OS Mode (Band Exit Logic):
Entry: Buy when price exits dynamic oversold zone (crosses back above tilted oversold band)
Exit: Close when price exits dynamic overbought zone (crosses back below tilted overbought band)
You can mix and match the modes (e.g., enter on Cross, exit on Band Exit).
⚙️ Spot vs. Leverage Mode
Spot Mode
Designed for traders who prefer long-only setups
Enters a long position and holds until the exit condition is met
Prevents overlapping trades—ensures only one position at a time
Leverage Mode
Designed for those testing bi-directional systems (e.g., long/short switching)
Automatically flips between long and short entries depending on the signals
Useful for testing symmetrical strategies or inverse conditions
Both modes work across any asset class and timeframe.
Customization Options
Users can adjust:
Smoothing K/D: Controls how fast or slow the momentum reacts
SMI EMA Length: Determines the responsiveness of the signal line
Trend Lookback Period: Influences how stable the dynamic band tilt is
Band Tilt & Compression Strengths: Refines how far bands adjust based on trend
Entry/Exit Logic Type: Choose between “Cross” or “Exit OB/OS” logic
Trading Mode: Select either "Spot" or "Leverage" depending on your use case
Why It’s Published Separately
This script is not a cosmetic or minor variation of the original indicator. It introduces:
Entry/exit logic
Order execution
Strategy testing capabilities
Mode selection (Spot vs. Leverage)
Signal logic control (Cross vs. Band Exit)
Because the original VBSMI indicator is widely used as a charting and confirmation tool, converting it into a strategy changes how it functions. This version is intended for strategy evaluation and automation, while the original remains available for discretionary and visual use.
Use Cases
This strategy is best suited for:
Evaluating VBSMI-based signals in backtests
Comparing entry and exit logic over time
Testing setups on different assets and timeframes
Automating VBSMI-based logic in a structured and risk-aware framework
Disclaimer
This strategy is for educational purposes only. It does not guarantee future results or profitability. Always test in simulation before using any strategy live, and use proper risk management and trade discipline.
Statistics
Mark Days with >4% Gain (vs. Previous Close)Shows days when the overall market increased by more than 4%
Quantify [Trading Model] | FractalystNote: In this description, "TM" refers to Trading Model (not trademark) and "EM" refers to Entry Model
What’s the indicator’s purpose and functionality?
You know how to identify market bias but always struggle with figuring out the best exit method, or even hesitating to take your trades?
I've been there. That's why I built this solution—once and for all—to help traders who know the market bias but need a systematic and quantitative approach for their entries and trade management.
A model that shows you real-time market probabilities and insights, so you can focus on execution with confidence—not doubt or FOMO.
How does this Quantify differentiate from Quantify ?
Have you managed to code or even found an indicator that identifies the market bias for you, so you don’t have to manually spend time analyzing the market and trend?
Then that’s exactly why you might need the Quantify Trading Model.
With the Trading Model (TM) version, the script automatically uses your given bias identification method to determine the trend (bull vs bear and neutral), detect the bias, and provide instant insight into the trades you could’ve taken.
To avoid complications from consecutive signals, it uses a kNN machine learning algorithm that processes market structure and probabilities to predict the best future patterns.
(You don’t have to deal with any complexity—it’s all taken care of for you.)
Quantify TM uses the k-Nearest Neighbors (kNN) machine learning algorithm to learn from historical market patterns and adapt to changing market structures. This means it can recognize similar market conditions from the past and apply those lessons to current trading decisions.
On the other hand, Quantify EM requires you to manually select your directional bias. It then focuses solely on generating entry signals based on that pre-determined bias.
While the entry model version (EM) uses your manual bias selection to determine the trend, it then provides insights into trades you could’ve taken and should be taking.
Trading Model (TM)
- Uses `input.source()` to incorporate your personal methodology for identifying market bias
- Automates everything—from bias detection to entry and exit decisions
- Adapts to market bias changes through kNN machine learning optimization
- Reduces human intervention in trading decisions, limiting emotional interference
Entry Model (EM)
- Focuses specifically on optimizing entry points within your pre-selected directional bias
- Requires manual input for determining market bias
- Provides entry signals without automating alerts or bias rules
Can the indicator be applied to any market approach/trading strategy?
Yes, if you have clear rules for identifying the market bias, then you can code your bias detection and then use the input.source() user input to retrieve the direction from your own indicator, then the Quantify uses machine-learning identify the best setups for you.
Here's an example:
//@version=6
indicator('Moving Averages Bias', overlay = true)
// Input lengths for moving averages
ma10_length = input.int(10, title = 'MA 10 Length')
ma20_length = input.int(20, title = 'MA 20 Length')
ma50_length = input.int(50, title = 'MA 50 Length')
// Calculate moving averages
ma10 = ta.sma(close, ma10_length)
ma20 = ta.sma(close, ma20_length)
ma50 = ta.sma(close, ma50_length)
// Identify bias
var bias = 0
if close > ma10 and close > ma20 and close > ma50 and ma10 > ma20 and ma20 > ma50
bias := 1 // Bullish
bias
else if close < ma10 and close < ma20 and close < ma50 and ma10 < ma20 and ma20 < ma50
bias := -1 // Bearish
bias
else
bias := 0 // Neutral
bias
// Plot the bias
plot(bias, title = 'Identified Bias', color = color.blue,display = display.none)
Once you've created your custom bias indicator, you can integrate it with Quantify :
- Add your bias indicator to your chart
- Open the Quantify settings
- Set the Bias option to "Auto"
- Select your custom indicator as the bias source
The machine learning algorithms will then analyze historical price action and identify optimal setups based on your defined bias parameters. Performance statistics are displayed in summary tables, allowing you to evaluate effectiveness across different timeframes.
Can the indicator be used for different timeframes or trading styles?
Yes, regardless of the timeframe you’d like to take your entries, the indicator adapts to your trading style.
Whether you’re a swing trader, scalper, or even a position trader, the algorithm dynamically evaluates market conditions across your chosen timeframe.
How Quantify Helps You Trade Profitably?
The Quantify Trading Model offers several powerful features that can significantly improve your trading profitability when used correctly:
Real-Time Edge Assessment
It displays real-time probability of price moving in your favor versus hitting your stoploss
This gives you immediate insight into risk/reward dynamics before entering trades
You can make more informed decisions by knowing the statistical likelihood of success
Historical Edge Validation
Instantly shows whether your trading approach has demonstrated an edge in historical data
Prevents you from trading setups that historically haven't performed well
Gives confidence when entering trades that have proven statistical advantages
Optimized Position Sizing
Analyzes each setup's success rate to determine the adjusted Kelly criterion formula
Customizes position sizing based on your selected maximum drawdown tolerance
Helps prevent account-destroying losses while maximizing growth potential
Advanced Exit Management
Utilizes market structure-based trailing stop-loss mechanisms
Maximizes the average risk-reward ratio profit per winning trade
Helps capture larger moves while protecting gains during market reversals
Emotional Discipline Enforcement
Eliminates emotional bias by adhering to your pre-defined rules for market direction
Prevents impulsive decisions by providing objective entry and exit signals
Creates psychological distance between your emotions and trading decisions
Overtrading Prevention
Highlights only setups that demonstrate positive expectancy
Reduces frequency of low-probability trades
Conserves capital for higher-quality opportunities
Systematic Approach Benefits
By combining machine learning algorithms with your personal bias identification methods, Quantify helps transform discretionary trading approaches into more systematic, probability-based strategies.
What Entry Models are used in Quantify Trading Model version?
The Quantify Trading Model utilizes two primary entry models to identify high-probability trade setups:
Breakout Entry Model
- Identifies potential trade entries when price breaks through significant swing highs and swing lows
- Captures momentum as price moves beyond established trading ranges
- Particularly effective in trending markets when combined with the appropriate bias detection
- Optimized by machine learning to filter false breakouts based on historical performance
Fractals Entry Model
- Utilizes fractal patterns to identify potential reversal or continuation points
- Also uses swing levels to determine optimal entry locations
- Based on the concept that market structure repeats across different timeframes
- Identifies local highs and lows that form natural entry points
- Enhanced by machine learning to recognize the most profitable fractal formations
- These entry models work in conjunction with your custom bias indicator to ensure trades are taken in the direction of the overall market trend. The machine learning component analyzes historical performance of these entry types across different market conditions to optimize entry timing and signal quality.
How Does This Indicator Identify Market Structure?
1. Swing Detection
• The indicator identifies key swing points on the chart. These are local highs or lows where the price reverses direction, forming the foundation of market structure.
2. Structural Break Validation
• A structural break is flagged when a candle closes above a previous swing high (bullish) or below a previous swing low (bearish).
• Break Confirmation Process:
To confirm the break, the indicator applies the following rules:
• Valid Swing Preceding the Break: There must be at least one valid swing point before the break.
3. Numeric Labeling
• Each confirmed structural break is assigned a unique numeric ID starting from 1.
• This helps traders track breaks sequentially and analyze how the market structure evolves over time.
4. Liquidity and Invalidation Zones
• For every confirmed structural break, the indicator highlights two critical zones:
1. Liquidity Zone (LIQ): Represents the structural liquidity level.
2. Invalidation Zone (INV): Acts as Invalidation point if the structure fails to hold.
How does the trailing stop-loss work? what are the underlying calculations?
A trailing stoploss is a dynamic risk management tool that moves with the price as the market trend continues in the trader’s favor. Unlike a fixed take profit, which stays at a set level, the trailing stoploss automatically adjusts itself as the market moves, locking in profits as the price advances.
In Quantify, the trailing stoploss is enhanced by incorporating market structure liquidity levels (explain above). This ensures that the stoploss adjusts intelligently based on key price levels, allowing the trader to stay in the trade as long as the trend remains intact, while also protecting profits if the market reverses.
What is the Kelly Criterion, and how does it work in Quantify?
The Kelly Criterion is a mathematical formula used to determine the optimal position size for each trade, maximizing long-term growth while minimizing the risk of large drawdowns. It calculates the percentage of your portfolio to risk on a trade based on the probability of winning and the expected payoff.
Quantify integrates this with user-defined inputs to dynamically calculate the most effective position size in percentage, aligning with the trader’s risk tolerance and desired exposure.
How does Quantify use the Kelly Criterion in practice?
Quantify uses the Kelly Criterion to optimize position sizing based on the following factors:
1. Confidence Level: The model assesses the confidence level in the trade setup based on historical data and sample size. A higher confidence level increases the suggested position size because the trade has a higher probability of success.
2. Max Allowed Drawdown (User-Defined): Traders can set their preferred maximum allowed drawdown, which dictates how much loss is acceptable before reducing position size or stopping trading. Quantify uses this input to ensure that risk exposure aligns with the trader’s risk tolerance.
3. Probabilities: Quantify calculates the probabilities of success for each trade setup. The higher the probability of a successful trade (based on historical price action and liquidity levels), the larger the position size suggested by the Kelly Criterion.
How can I get started to use the indicator?
1. Set Your Market Bias
• Choose Auto.
• Select the source you want Quantify to use as for bias identification method (explained above)
2. Choose Your Entry Timeframes
• Specify the timeframes you want to focus on for trade entries.
• The indicator will dynamically analyze these timeframes to provide optimal setups.
3. Choose Your Entry Model and BE/TP Levels
• Choose a model that suits your personality
• Choose a level where you'd like the script to take profit or move stop-loss to BE
4. Set and activate the alerts
What tables are used in the Quantify?
• Quarterly
• Monthly
• Weekly
Terms and Conditions | Disclaimer
Our charting tools are provided for informational and educational purposes only and should not be construed as financial, investment, or trading advice. They are not intended to forecast market movements or offer specific recommendations. Users should understand that past performance does not guarantee future results and should not base financial decisions solely on historical data.
Built-in components, features, and functionalities of our charting tools are the intellectual property of @Fractalyst Unauthorized use, reproduction, or distribution of these proprietary elements is prohibited.
- By continuing to use our charting tools, the user acknowledges and accepts the Terms and Conditions outlined in this legal disclaimer and agrees to respect our intellectual property rights and comply with all applicable laws and regulations.
Uptrick: Stellar NexusOverview
Uptrick: Stellar Nexus is a multi-layered chart tool designed to help traders visualize market behavior with enhanced clarity and depth. It presents various overlays, signal triggers, and an asset-level behavioral table in one cohesive interface. Its core focus is to illustrate how different market states shift over time. By displaying directional structures, dynamic zones, momentum shifts, and a real-time probability assessment of multiple assets, it aims to deliver a comprehensive perspective for those looking to navigate complex market environments more confidently.
Purpose
The primary purpose of Stellar Nexus is to unify several market assessment methods into a single framework, sparing users the need to rely on multiple disjointed indicators. It is especially useful for traders who value having layered signals, interactive overlays, and a quick reference to asset-specific metrics within one tool. By consolidating multiple market insights, the script aspires to reduce guesswork, limit information overload, and present clear triggers for potential trade opportunities or risk management decisions.
Originality
Stellar Nexus stands out because it relies on a proprietary set of logic layers, each carefully designed to detect nuanced shifts in price movement. The script brings forward a streamlined depiction of underlying market changes through color-coded zones, shape markers, and short textual tags. Its architecture also accommodates multiple “modes” of viewing the market—be it through layered cloud structures, trend ribbons, or step-based overlays—so traders can adapt its outputs to match changing conditions. The presence of a specialized probability table and a real-time market state meter (HUD Meter) further underscores its uniqueness, providing at-a-glance scoring for various instruments and a gauge that visually displays ongoing transitions from trending to ranging phases.
Inputs
Stellar Nexus includes several user-configurable settings, organized into themed groups. Each input subtly modifies how information is derived or rendered on the chart:
General
Silken Veil (integer input) : Governs how smooth or responsive various underlying signals will appear.
Canvas (dropdown) : Chooses the primary visual overlay style among Nebula Trail, Velora, or Stellar Stepfilter.
Signals (dropdown) : Selects which built-in signal engine (Fluxor or Flowgen) is responsible for painting buy and sell markers.
Nova Tension (integer input) : Influences the internal motion sensitivity used by certain triggers.
Astral Ribbon (integer input) : Imparts a broader directional bias layer that can highlight whether the current environment is bullish or bearish.
Bands
Phase Delay (integer input) : Impacts baseline offsets for certain dynamic band calculations.
Band Softener (float input) : Creates a blended baseline, balancing two distinct smoothing techniques.
Spread Factor (float input) : Scales how wide or narrow the generated envelope bands become.
Layer Offset (float input) : Adjusts spacing between multiple layered boundaries in the band structure.
Smooth Mode (dropdown boolean) : Toggles an extra layer of smoothing on or off for the plotted envelopes.
Feed Matrix
Burst (integer input) : Adjusts how the Flowgen engine interprets momentum buildup. Higher values generally lead to more conservative signals.
Delta Curve Sync (integer input) : Alters the sensitivity of directional alignment within the Flowgen system, refining how quickly the script adapts to market slope changes.
Lambda Pulse Shift (integer input) : Controls timing offsets within the Flowgen structure, subtly influencing the trigger timing of transitions.
Sync Drift Limit (integer input) : Provides a stabilizing effect on the internal motion detection engine, helping reduce erratic behavior during choppy conditions.
WMA Open Filter Tunnel (integer input) : Filters signal validity by applying a dynamic range check on opening price structures, reducing false positives in unstable markets.
Probability Table
Show Predictability Table (boolean) : Enables or disables a table of asset metrics.
Show Numeric Values (boolean) : Switches between displaying numeric values and using simple directional markers in the table cells.
Stepfilter
Sensitivity (dropdown) : Offers a range of speed profiles (Very Fast to Very Slow and TURTLE option) that define how quickly or slowly the step-based overlay reacts to price changes.
HUD Meter
Show Stellar HUD Meter (boolean) : Turns on or off a specialized gauge for quick insight into trending vs. ranging conditions.
Take Profit Signals
Show TP Signals (boolean) : Determines whether exit or take-profit markers are displayed after certain conditions have been met.
Phase Length (integer input) : Influences the internal baseline used for the exit signal logic.
Sync Channel (integer input) : Sets a period within which different data points are compared or synced.
Filter (integer input) : Imposes an additional smoothing on exit-related cues.
Features
Signals (Fluxor and Flowgen)
Fluxor
Logic: Fluxor focuses on detecting specific price transitions, validating them against an internal directional and momentum layer, and then confirming the move based on the script’s overarching market bias.
Visual Representation: When Fluxor is activated, up and down label markers (“▲+” or “▼+”) appear at points the system regards as noteworthy transitions. These do not guarantee trades but are designed to guide users on when buying or selling pressure may have intensified or reversed.
How It Helps: Fluxor is streamlined for those who want simpler, clearer triggers that factor in both trend alignment and short-term motion shifts. This option is more for mean reversion traders.
Flowgen
Logic: Flowgen employs a slightly more sophisticated approach that evaluates multiple “environmental layers,” including structural alignment, directional slope checks, and distinct open-state filters.
Visual Representation: When Flowgen senses a valid transition, it prints discrete up and down markers, much like Fluxor, but triggered by different, multi-layer considerations.
How It Helps: Flowgen caters to traders who desire more emphasis on layered agreement—where multiple aspects of the market must line up before a signal is shown. This option is more for trend following traders.
Overlays (Nebula Trail, Velora, Stellar Stepfilter)
Nebula Trail
Purpose: This indicator employs dynamic, color-coded bands around price action to illustrate prevailing market bias and track which side—bulls or bears—wields greater influence, aligning with a trend-following approach.
Usage: This indicator creates outer and inner “band” regions that can function as potential support or resistance in alignment with market momentum. In bullish phases, the cloud below price acts as a supportive barrier, whereas during bearish conditions, the cloud above price provides a point of resistance. When a bearish signal is detected, traders may enter short positions on a price bounce off this band and then exit when subsequent take-profit cues appear, effectively leveraging the band for both entry and exit strategies.
Velora
Purpose: Extends the concept of band visualization into layered “tiers,” giving a more fine-grained view of how price transitions from one band to another.
Representation: Zones are subdivided into multiple steps, each with distinct shading. As the script’s internal logic detects shifts between bullish or bearish conditions, these layered bands expand or contract to reflect changing momentum.
Usage: Velora subdivides zones into multiple steps, each featuring distinct shading. As the script's internal logic detects shifts between bullish or bearish conditions, these layered bands expand or contract, signaling changes in momentum. When price enters the upper band, especially if the HUD meter shows less definitive momentum, it may hint at a non-trending environment; conversely, in a bearish scenario, the lower band can act as potential support. Narrower bands often point to an impending breakout, while wider bands can suggest a possible reversion in price. Velora is well-suited for traders wanting to see more intermediate zones where the market may hesitate or show partial confirmation—ideal for refined entries or exits.
Smooth:
Choppy:
Stellar Stepfilter
Purpose: Focuses on a persistent directional line that only updates when the script’s logic deems a genuine shift is taking place.
Representation: A single line plots on the chart to represent the “locked” direction. During periods of noise or indecision, this line may remain static, reducing false signals. Optionally, bars can be recolored to reflect bullish or bearish states.
Usage: Traders who prefer a minimalistic, stand-back approach often select Stellar Stepfilter for its ability to filter out choppy conditions and highlight clearer momentum strides. When the line remains flat—particularly in the very slow or “turtle” mode—it signals a ranging market, offering valuable insight into periods of reduced volatility. In TURTLE mode, bars are recolored green or orange to reflect locked trend direction more visibly. TURTLE mode offers the most conservative setting within the Stepfilter engine, emphasizing stability and clarity by reacting only to the strongest directional conditions and visually reinforcing its state through bar coloring.
Very Fast
Very Slow
TURTLE Mode
Probability Table
Description: The Probability Table is displayed on the top-right corner (by default). It automatically fetches data for a handful of assets (in this case, five popular cryptocurrencies), then scores each asset on multiple behavioral metrics. By default, the Probability Table monitors SOL, BTC, ETH, BNB, and XRP from Binance.
Metrics Explained:
HV: Suggests how the asset’s price is fluctuating relative to a standard reference.
ATR/Vol: A ratio that provides insight into volatility compared to trading activity.
WBR: Compares candle wicks against their bodies to gauge the frequency of price swings outside an open-close range.
Liq Clust: Indicates if there are pockets of stable or unstable liquidity.
Momentum: Observes shifts in buying or selling pressure.
PRI: Shows a baseline measure of how far price has deviated from a certain average over time.
Final Verdict: Based on each metric’s reading, an overall classification emerges: Predictable, Moderate, or Chaotic.
How It Helps: Traders can quickly scan this table to see if an asset’s environment is “Predictable” (potentially more structured), “Moderate” (balanced or transitional), or “Chaotic” (unstable and riskier). Each cell can optionally show either numeric approximations or simple “up/down” arrows to reduce clutter.
Non Numeric Values
Numeric Values
Stellar HUD Meter
Description: Located at the top center of the chart, this horizontal gauge toggles between “Trending” and “Ranging,” representing how firmly price is locked in directional expansion versus sideways hesitation.
Mechanics (General): The gauge increments or decrements over time, smoothing out abrupt shifts. A pointer slides across the meter, indicating whether conditions are leaning more toward persistent momentum or uncertain, choppy movement.
How It Helps: This immediate visual feedback helps traders decide if momentum strategies or mean-reversion approaches are more suitable at a given moment, avoiding reliance on guesswork alone.
Take Profit Signals
Description: After any buy or sell trigger occurs (either through Fluxor or Flowgen), the script can flag up to three potential exit points.
Trigger Logic (General): These exits appear when certain internal checks sense that short-term upside or downside pressure may be waning.
Representation: Small markers (“X”) appear near the top or bottom of the candle.
How It Helps: Rather than passively holding a position, these optional signals remind traders of possible exhaustion points. If they choose to follow them, it can help secure partial or full profits during a trend.
Why more than one indicator?
Having more than one internal indicator engine allows Stellar Nexus to adapt to different market behaviors and personal trading styles. Sometimes traders require swift, high-frequency triggers (Fluxor). Other times, they prefer more layered agreement before taking a position (Flowgen). Similarly, each overlay—Nebula Trail, Velora, and Stellar Stepfilter—offers a distinct method for visualizing price action. Markets are dynamic, and no single representation is ideal for all conditions. By blending multiple approaches into one script, Stellar Nexus provides flexibility: a user can switch between sets of signals or overlays based on market phase, personal risk preference, or the timeframe being traded.
Additional Features
Alert System: Built-in alerts for every trigger or state change ensure that traders can receive real-time notifications, even when away from the chart. The alert system includes buy/sell triggers, trend shifts, overlay transitions, take-profit points, and predictability status changes across monitored assets.
Selective Visibility: Users can enable or disable various modules—Probability Table, HUD Meter, Take Profit Signals—to keep their chart interface uncluttered.
State Persistence: Certain modules “lock in” their reading until a strong reason emerges to change it, which can help minimize false flips in volatile conditions.
Tailored Aesthetics: Color choices and label styling are curated to be visually distinct, reducing confusion when multiple signals or overlays occur simultaneously.
Conclusion
Uptrick: Stellar Nexus is a comprehensive, multi-layer script that merges aesthetic clarity with functional depth. It combines diverse overlays, signal engines, probability analyses, and a heads-up market meter into one cohesive tool. By handling trending vs. ranging states, evaluating asset predictability, and offering selective take-profit cues, it serves as a versatile companion for traders who want organized, visually intuitive guidance. Its originality is found not only in how it disguises internal computations, but in the ease with which users can cycle through different overlays and signals to suit changing market conditions. As always, personal due diligence, market awareness, and risk management remain essential. Stellar Nexus simply provides a refined canvas on which to read and interpret price action more confidently.
Disclaimer
This indicator is provided solely for informational and educational purposes. It does not constitute investment advice or a recommendation to engage in any trading activities. Trading and investing in financial markets involve significant risk, and past performance is not indicative of future results. Always conduct your own research, utilize proper risk management, and consider consulting a qualified financial professional before making any investment decisions. Neither the creator nor any contributors to this script accept any liability for financial losses or damages arising from its use. Users of this indicator assume full responsibility for their trading activities.
Market OracleMarket Oracle Indicator: User Guide
Market Oracle is a powerful, all-in-one trading indicator for TradingView that combines multiple technical signals into a clear, actionable dashboard. Built for traders seeking a reliable edge, it analyzes trend, momentum, volatility, volume, and more to generate high-confidence buy and sell signals. With features like dynamic position sizing, market regime performance tracking, and customizable settings, it’s perfect for stocks, forex, crypto, or any market on any timeframe.
What It Does
Market Oracle evaluates market conditions using a blend of proven indicators (RSI, Stochastic RSI, EMAs, SuperTrend, MACD, Ichimoku Cloud, Bollinger Bands, ATR, ADX, and candlestick patterns) to produce a Composite Score (0-100) that reflects bullish or bearish strength. It generates:
Buy/Sell Signals: Triggered when the score crosses user-defined thresholds, filtered by volume, ADX, and trading hours.
Dynamic Position Sizing: Adjusts trade size based on volatility (ATR), reducing risk in choppy markets.
Market Regime Insights: Tracks performance in trending vs. ranging markets to highlight strategy strengths.
Comprehensive Dashboard: Displays real-time metrics like signal confidence, stop/take-profit levels, win rates, and more.
Whether you’re a day trader, swing trader, or long-term investor, Market Oracle simplifies decision-making with clear insights and robust backtesting.
Key Features
Composite Score:
Combines trend (EMAs, SuperTrend, MACD), momentum (RSI, Stochastic RSI), volatility (Bollinger Bands, ATR), volume (OBV, MA), Ichimoku Cloud, divergences, multi-timeframe trends, and candlestick patterns.
Score > 50 indicates bullishness; < 50 indicates bearishness. Extreme values (>90 or <10) flag overbought/oversold conditions.
Smart Signals:
Buy signals trigger when the score exceeds a threshold (default 70), with filters for volume, ADX strength, and Ichimoku/pattern confirmation.
Sell signals trigger below 100-threshold (default 30), with similar filters.
Signals include confidence levels (0-100%) based on indicator alignment.
Dynamic Position Sizing:
Scales trade size using ATR to limit risk in volatile markets (e.g., smaller positions when ATR is high).
Caps volatility adjustments (default 3x ATR) to maintain reasonable sizing.
Bases risk on a user-defined percentage (default 1% per trade).
Market Regime Performance:
Identifies trending (high ADX or wide Bollinger Bands) vs. ranging markets.
Tracks win rates separately for each regime, helping you optimize strategies for specific conditions.
Backtesting Metrics:
Shows buy/sell win rates, recent win rate, trending/ranging win rates, profit factor, max drawdown, and equity trend.
Helps evaluate strategy performance over time.
Customizable Dashboard:
Displays key metrics: Composite Score, Trend, Momentum, Volatility, Ichimoku, ADX, Divergences, Signal Status, Confidence, Stop/Take-Profit, Position Size, and more.
Toggles to show/hide backtest stats, Ichimoku Cloud, or multi-timeframe trends.
Clean layout with no clutter (e.g., no unnecessary “!” markers).
Alerts:
Set alerts for Buy/Sell Signals, Signal Exits, High Scores, or Overbought/Oversold conditions.
Messages include score and confidence (e.g., “Oracle+: Buy signal (Score: 75.2, Confidence: 80%)”).
Flexible Settings:
Adjust thresholds, indicator lengths, weights, risk parameters, and more.
Enable/disable features like trailing stops, market regime filters, or trading hour restrictions.
How to Use It
1. Add to TradingView
Copy the Market Oracle script into TradingView’s Pine Editor.
Click “Add to Chart” to apply it to your chosen market (e.g., BTC/USD, EUR/USD, SPY).
The dashboard appears in the bottom-right corner, showing real-time data.
2. Read the Dashboard
The dashboard is split into three sections:
Market State:
Composite Score: Current score and confidence (e.g., “75.2 (50.4%)”). “(OB)” or “(OS)” flags overbought/oversold.
Adjusted Threshold: Signal trigger level, adjusted for market regime.
Trend/MTF Trend: Bullish, Bearish, or Neutral (based on EMAs, SuperTrend, higher timeframe).
Momentum: Bullish, Bearish, or Neutral (RSI, Stochastic RSI).
Volatility: High or Low (Bollinger Bands, ATR).
Ichimoku Cloud: Bullish, Bearish, or Neutral (if enabled).
ADX Strength: Strong or Weak.
Divergence: Bullish, Bearish, or None (RSI, MACD).
Signals:
Signal Status: “Buy”, “Sell”, or “None”.
Signal Confidence: Percentage (e.g., “80%”) based on indicator agreement.
Stop Level/Take-Profit: Price levels for risk management.
Position Size: Units to trade, adjusted for volatility.
Avg Trade Duration: Average bars per trade.
Signal History: Recent signals/exits (e.g., “Buy | Buy Win”).
Backtest (optional):
Buy/Sell Win Rate: Percentage of winning trades.
Recent Win Rate: Win rate for recent trades.
Trending/Ranging Win Rate: Performance by market condition.
Profit Factor: Profit-to-loss ratio.
Max Drawdown: Largest equity drop.
Equity Trend: Up, Down, or Flat.
3. Customize Settings
Access the indicator’s settings by clicking the gear icon:
Signal Sensitivity:
Base Signal Threshold (default 70): Higher = stricter signals.
Min Confidence for Alerts (default 60%): Filters weaker alerts.
Risk Management:
Risk % per Trade (default 1%): Sets base risk.
Max ATR Multiplier (default 3.0): Caps position size reduction.
Take-Profit Ratio (default 2.0): Sets reward-to-risk ratio.
Use Trailing Stop (default false): Enable for dynamic stops.
Filters:
Use Volume Filter (default true): Requires above-average volume.
Use ADX Filter (default true): Requires strong trend (ADX > 25).
Use Market Regime Filter (default true): Adjusts thresholds for trending/ranging markets.
Avoid Specific Hours (default false): Skip signals during set hours (e.g., 0-6 UTC).
Indicators:
Adjust lengths for RSI (14), EMAs (20/50), MACD (12/26/9), etc.
Enable/disable Use Candlestick Patterns (default true) and choose type (Hammer, Engulfing, etc.).
Display:
Show Backtest Metrics (default true): Show win rates and stats.
Show Ichimoku Cloud (default true): Include cloud signals.
Show MTF Trend (default true): Include higher timeframe trend.
4. Set Alerts
In TradingView, click the alarm icon and select Market Oracle conditions:
Buy/Sell Signal: Triggers on new signals with sufficient confidence.
Signal Exit: Triggers when a trade closes (stop or take-profit hit).
High Score Alert: Triggers when score exceeds a threshold (default 80).
Overbought/Oversold: Warns of extreme conditions (if enabled).
Alerts include details for easy tracking (e.g., score, confidence).
5. Test and Trade
Test Markets: Try on forex (EUR/USD 1H), crypto (BTC/USD 4H), or stocks (AAPL daily).
Check Volatility: Monitor Position Size in volatile markets (e.g., XAU/USD); it shrinks to reduce risk.
Evaluate Regimes: Use “Trending Win Rate” and “Ranging Win Rate” to see where the strategy shines.
Backtest: Review Profit Factor and Max Drawdown to assess performance.
Start Small: Use a demo account to test signals before trading live.
Tips for Success
Match Your Style: Adjust scoreThreshold and timeframe to suit day trading (e.g., 15m, stricter threshold) or swing trading (e.g., 4H, looser threshold).
Monitor Regimes: If “Trending Win Rate” is higher, focus signals during strong trends (high ADX).
Manage Risk: Keep riskPerTrade low (e.g., 0.5-2%) and review Position Size for sanity.
Combine with Analysis: Use signals alongside support/resistance or news events for confirmation.
Tune Parameters: Experiment with atrVolatilityCap (e.g., 2.0 for tighter sizing) or adxThreshold (e.g., 30 for stronger trends).
Avoid Overtrading: Filter signals with minConfidenceForAlert (e.g., 70%) to focus on high-probability setups.
Example Scenarios
Crypto Breakout (BTC/USD 4H):
Composite Score jumps to 82, Signal Status shows “Buy” with 80% confidence.
Position Size is moderate due to high ATR during a rally.
“Trending Win Rate” is 65%, suggesting strength in directional moves.
Set an alert and enter with a 2:1 take-profit (e.g., stop at 60,000, target at 62,000).
Forex Range (EUR/USD 1H):
Score hovers near 45, no signal (Neutral).
“Ranging Win Rate” is 55%, indicating decent performance in consolidation.
Wait for a score above 70 or use a higher timeframe (e.g., Daily MTF Trend).
Stock Swing (AAPL daily):
Score hits 75, “Buy” signal with a small Position Size (low ATR).
Dashboard shows Bullish Ichimoku and MTF Trend.
Trade with a trailing stop to capture a multi-day move.
Why Choose Market Oracle?
All-in-One: Combines multiple indicators into one easy-to-read dashboard, saving you time.
Adaptive: Adjusts signals and sizing for market conditions (trending, ranging, volatile).
Transparent: Shows confidence, win rates, and risk levels to build trust in trades.
Customizable: Tailor to any market, timeframe, or trading style with dozens of settings.
No Clutter: Clean interface with no distracting visuals, just actionable data.
Getting Started
Add Market Oracle to your chart and explore the dashboard.
Test on a market you trade (e.g., ETH/USD 1H) with default settings.
Adjust scoreThreshold or riskPerTrade to match your risk tolerance.
Set alerts for Buy/Sell Signals and monitor performance via “Trending Win Rate” and “Profit Factor”.
Join TradingView communities to share setups and tips!
For questions or tweaks (e.g., adding VWAP, changing alert conditions), consult your indicator’s developer or TradingView’s Pine Script resources. Happy trading!
Average Body RangeThe Average Body Range (ABR) indicator calculates the average size of a candle's real body over a specified period. Unlike the traditional Average Daily Range (ADR), which measures the full range from high to low, the ABR focuses solely on the absolute difference between the open and close of each bar. This provides insight into market momentum and trading activity by reflecting how much price is actually moving from open to close , not just in total.
This indicator is especially useful for identifying:
Periods of strong directional movement (larger body sizes)
Low-volatility or indecisive markets (smaller body sizes)
Changes in trend conviction or momentum
Customization:
Length: Number of bars used to compute the average (default: 14)
Use ABR to enhance your understanding of price behavior and better time entries or exits based on market strength.
RTH and ETH RangesKey Functions :
Visualizes Regular Trading Hours (RTH) and Extended Trading Hours (ETH) price ranges
Tracks session highs, lows, and 50% levels where significant market reactions occur
Detects breakouts beyond previous session extremes
Trading Applications :
Exposes potential liquidity raids at session boundaries where smart money targets stop orders
Identifies critical price thresholds where institutional activity concentrates
Highlights divergences between RTH and ETH behavior that precede directional moves
Provides measurement of session volatility differences
Maps key price levels for objective entry and exit parameters
Reveals market dynamics at session transitions where institutional positioning changes
Dirty Market IndexThis indicator is designed to out an index displaying the level of dirtiness in market.
This level is defined by:
Sum of shadow lengths of last n candles (n is input and user can change it, it's 100 by default)
divided by
Sum of full candle bodies of last n candles (high - low)
This factor indicates how many percents of the market movement has been placed in shadows of candles, the higher this number, the dirtier market would be.
POF🔶 Smoothed POF Profile – Multi-Session Market Structure Tool 🔶
The Smoothed POF Profile is a precision-engineered market structure indicator that identifies the Point of Focus (POF) — the price level where market participation was most active — across Daily, Weekly, and Monthly sessions and plots them with smoothed over form to avoid whipsaws.
🔍 Powered by a custom-built algorithm for session profiling, this tool highlights:
🔶 POF: The most frequently traded or accepted price during a session
🟩 VAH / VAL: Dynamic Value Area High and Low markers (no cluttered lines — clean label-only display)
📐 The core logic utilizes a proprietary data refinement method that adapts to session volatility and filters out insignificant noise to avoid false shifts in structure. This results in smoothed POF readings that remain stable and meaningful — even during high-volatility periods.
🧠 Designed for traders who want to track evolving value, this tool provides a high-level view of where the market is finding agreement — and where price is likely to revert or expand from.
✅ Key Features:
Fully automated: Tracks Daily, Weekly, and Monthly sessions in real-time
Session-aware calculation of key structure levels
Elegant, non-obtrusive chart visuals (no histogram or volume bars)
Fully configurable Value Area % and display toggles
Multi-session color-coding (🟧 Daily, 🔵 Weekly, 🟣 Monthly)
🧭 Trading Applications:
POF Bias: Use POF as an evolving balance point. Price above = bullish lean, price below = bearish tilt
VAH/VAL Zones: Anticipate rejection or consolidation when price re-enters the value area. Use breakouts for continuation bias
Session Stack Confluence: When Daily, Weekly, and Monthly POFs cluster, it often signals strong interest zones and potential turning points
🧩 Use alongside your preferred price action, volume, or trend confirmation tools. This is not a signal-based system — it’s a contextual framework to help you align with market intent and structure.
⚠️ Disclaimer: This tool is intended for educational and informational purposes only. It is not financial advice. Use with proper risk management and your own due diligence.
Prop Firm Guard: Risk & Sizing Tracker by TFTProp Firm Guard: Risk & Sizing Tracker by TFT
Overview:
This script is designed to help prop firm traders stay within risk rules and avoid emotional overtrading. It tracks your max loss limits, daily loss rules, and gives real-time position sizing suggestions based on your account status.
This tool is especially helpful for newer traders navigating prop firm challenges and rules like trailing drawdowns and daily stopouts.
Key Features:
✅ Real-time tracking of max loss and daily loss limits
✅ Supports both Intraday and End-of-Day (EOD) drawdown styles
✅ Calculates remaining “distance” to max/daily loss levels
✅ Automatically locks max loss once it trails up to starting balance
✅ Provides smart, tier-based position sizing suggestions (5%–50%)
✅ Shows profit target progress and live daily P&L
Use Case Example:
Let’s say you’re trading a $50,000 prop account with a $2,000 max drawdown limit.
If you're using Intraday Drawdown:
• You start the day at $50,000.
• During the day, your balance grows to $51,000 (including unrealized profits).
• The drawdown logic will trail this intraday high — so your new max loss limit becomes $49,000 (51K - 2K).
• If your balance drops to $49,400, this tool will show you’re $400 away from breaching the limit.
• Sizing suggestions will adjust accordingly to keep you in a safe range.
If you're using End-of-Day (EOD) Drawdown:
• The same scenario (account grows to $51,000 intraday) won’t affect your max loss limit immediately.
• EOD drawdown is only updated based on your end-of-day closing balance.
• So even if you hit $51K intraday, your max loss limit still remains at $48,000 (50K - 2K) until the trading day closes and updates your best equity.
• This mode offers more flexibility during the day — and the tool reflects this in how it calculates distances and sizing.
📌 It will then suggest a conservative sizing range — maybe 5–10% of your allowed contract size — until you're safer again.
📌 Make sure you update your current balance after each trade and follow your risk settings.
Inputs Explained (with Tips):
• Overall Account Starting Balance: Your full prop account size (e.g., 50000 or 100000, 150000, 300000, so on)
• Day Start Balance: What your balance was when the trading day started
• Daily Max Loss: How much you’re allowed to lose in one day (used only for EOD drawdown)
• Daily Profit Target: Your goal for the day (e.g., 500 or 1000 or so on)
• Allowed Overall Drawdown: Usually 4% for prop firms — like 2000 on 50K, or 6000 on 300K
• Drawdown Mode:
→ Intraday: Includes floating/unrealized profits in drawdown logic
→ EOD: Uses only end-of-day equity for drawdown logic
• Best Day High: Your highest balance to date. If not above your starting balance, this is ignored
• Intraday High (Manual): Optional override if your peak balance isn’t same as equity (used only for intraday drawdown mode)
• Current Equity: Update this during the session to reflect your live balance — everything else updates automatically
What You’ll See on the Chart:
🟩 Equity Section: Start balance, current balance, intraday high, best day high
🟥 Risk Section:
• Max loss limit (based on trailing logic)
• Distance from current balance to that limit
• Daily loss limit and distance (EOD mode only)
🟦 Performance Metrics:
• Daily P&L in $ and %
• Progress to profit target (shows ✅ Accomplished when goal is hit)
📦 Sizing Suggestion:
Based on how close you are to a drawdown breach, and your total drawdown tier.
Ranges from ⚠️ 5–10% to ✅ 40–50% of your max allowed contract size.
Who It's Best For:
• Built and optimized for 50K prop firm accounts
• Works well with 100K, 150K, or even 300K — but the sizing logic is most precise at 50K
• Best suited for futures or forex prop firm traders using account challenge-style rules
Manual Input Required:
Due to TradingView limitations, we cannot read your actual trades or live balance.
You'll need to update the Current Equity field yourself — but the rest is auto-calculated from there.
Most inputs (like overall balance and drawdown) are set once and rarely changed.
Beta Notice:
This tool is currently in beta and under testing. It's free for now and designed to help the trading community — but accuracy may vary.
Please send feedback if you'd like to suggest improvements or report bugs.
Disclaimer:
This tool is for educational purposes only and does not provide trading advice or signal any trades.
Always trade according to your firm’s rules. The author is not responsible for losses resulting from use of this script.
3 Candles Gap3 Candle Gap Indicator is made to detect these types of patterns:
1. 3 consecutive bullish or bearish candles
2. the middle candle true body (body excluding shadows) has a part that is not covered by previous and next candle shadows (gap)
This pattern helps traders to detect candles where price has moved in a direction and gap has formed (price is not covered by previous or next candles shadows), this is a signal showing price momentum where one side (bulls/bears) is so powerful at moving the price that the other side (bears/bulls) can't get price back to cover the gap.
This indicator has "repainting" by 1 candle which means, it uses the data from future to work, however this future data does not go further than 1 candle.
3 Way ValuationThe 3 Way Valuation (3WV) is a composite oscillator that evaluates market conditions by combining a diverse range of metrics into a single smoothed value between 0 and 1. It draws from multiple domains, including momentum, trend strength, volatility, risk-adjusted return ratios, and volume-based analytics to offer a well-rounded view of an asset’s relative positioning.
At its core, 3WV integrates three statistical approaches: Percentile Ranking to assess how current values compare to historical distributions, Z-Score Normalization to measure deviation from the average, and Empirical CDF (ECDF) to estimate the probability of observing a value based on past behavior. These methods are applied across all selected metrics, then normalized and averaged for a comprehensive market sentiment score.
Users can tailor the smoothing level and choose whether to include volume-based components for enhanced filtering. The indicator highlights potential overbought and oversold conditions with customizable thresholds, making it a versatile tool for timing entries, exits, or confirming broader strategies.
Leavitt Convolution ProbabilityTechnical Analysis of Markets with Leavitt Market Projections and Associated Convolution Probability
The aim of this study is to present an innovative approach to market analysis based on the research "Leavitt Market Projections." This technical tool combines one indicator and a probability function to enhance the accuracy and speed of market forecasts.
Key Features
Advanced Indicators : the script includes the Convolution line and a probability oscillator, designed to anticipate market changes. These indicators provide timely signals and offer a clear view of price dynamics.
Convolution Probability Function : The Convolution Probability (CP) is a key element of the script. A significant increase in this probability often precedes a market decline, while a decrease in probability can signal a bullish move. The Convolution Probability Function:
At each bar, i, the linear regression routine finds the two parameters for the straight line: y=mix+bi.
Standard deviations can be calculated from the sequence of slopes, {mi}, and intercepts, {bi}.
Each standard deviation has a corresponding probability.
Their adjusted product is the Convolution Probability, CP. The construction of the Convolution Probability is straightforward. The adjusted product is the probability of one times 1− the probability of the other.
Customizable Settings : Users can define oversold and overbought levels, as well as set an offset for the linear regression calculation. These options allow for tailoring the script to individual trading strategies and market conditions.
Statistical Analysis : Each analyzed bar generates regression parameters that allow for the calculation of standard deviations and associated probabilities, providing an in-depth view of market dynamics.
The results from applying this technical tool show increased accuracy and speed in market forecasts. The combination of Convolution indicator and the probability function enables the identification of turning points and the anticipation of market changes.
Additional information:
Leavitt, in his study, considers the SPY chart.
When the Convolution Probability (CP) is high, it indicates that the probability P1 (related to the slope) is high, and conversely, when CP is low, P1 is low and P2 is high.
For the calculation of probability, an approximate formula of the Cumulative Distribution Function (CDF) has been used, which is given by: CDF(x)=21(1+erf(σ2x−μ)) where μ is the mean and σ is the standard deviation.
For the calculation of probability, the formula used in this script is: 0.5 * (1 + (math.sign(zSlope) * math.sqrt(1 - math.exp(-0.5 * zSlope * zSlope))))
Conclusions
This study presents the approach to market analysis based on the research "Leavitt Market Projections." The script combines Convolution indicator and a Probability function to provide more precise trading signals. The results demonstrate greater accuracy and speed in market forecasts, making this technical tool a valuable asset for market participants.
Drawdown Visualizer v1.0Drawdown Visualizer
The Drawdown Visualizer tracks the percentage decline from all-time highs, providing valuable insights into market corrections and potential buying opportunities.
Key Features:
1) Real-Time Drawdown Tracking: The indicator continuously calculates and displays the current percentage drawdown from the all-time high price, color-coded from green (minimal drawdown) to red (severe drawdown) for instant visual feedback.
2) Maximum Drawdown Detection: Permanently tracks and displays the maximum historical drawdown encountered during the analyzed period, helping traders understand worst-case scenarios.
3) Statistical Analysis: Calculates and displays three important statistical measures:
* Average Drawdown: The mean value of all drawdowns recorded
* Median Drawdown: The middle value in the sorted list of all drawdowns, providing insight
into typical decline patterns
* Normal Drawdown Range: Visualizes the expected range of typical drawdowns based on
statistical standard deviation
Practical Applications:
1) Risk Management: Understand typical and extreme drawdowns to set appropriate stop-loss levels
2) Market Context: Gain perspective on whether current corrections are normal or exceptional
3) Entry Point Analysis: Identify potential buying opportunities when drawdowns reach statistical extremes
Daily LevelsOverview:
The Daily Levels indicator plots key price levels from the previous trading day, including the high, low, median (pivot), and projected extensions. These levels help traders identify potential support/resistance zones and anticipate breakout or reversal opportunities.
Key Features:
✅ Previous Day High & Low – Visualizes the prior day’s high and low as dynamic support/resistance levels.
✅ Median (Pivot) Line – Calculates the midpoint between the previous day’s high and low, acting as a key intraday reference.
✅ Projected Levels – Extends the high/low range symmetrically above and below the median, highlighting potential breakout zones.
✅ Customizable Display – Toggle visibility, adjust colors, and modify line styles (solid, dotted, dashed).
✅ Price Labels – Clear on-chart labels showing exact price values for quick reference.
✅ Built-in Alerts – Get notified when price crosses any of the key levels.
How to Use:
Trend Identification: If price holds above the median, the bias is bullish; below suggests bearish momentum.
Breakout Trading: Watch for moves beyond the projected levels for potential continuation.
Mean Reversion: Fade moves toward the previous day’s high/low if the median holds as support/resistance.
Ideal For:
Day Traders – Intraday support/resistance levels.
Swing Traders – Context for multi-day trends.
Breakout/Reversal Strategies – Clear levels for trade triggers.
Settings Recommendations:
High/Low Lines: Use semi-transparent colors (e.g., green/red) for clarity.
Projections: Helpful for anticipating extended moves (e.g., teal for upper, orange for lower).
Alerts: Enable notifications for key crosses (e.g., median or high/low breaks).
TS- Multitimeframe📊 The Trend Synchronizer – Multitimeframe Scalper 🔁
Indicator added at the of the chart. - Just in case anyone is confused, and one on chart as overlay is our own Delta zones indicator - as usual available to use for everyone.
🚀 Precision Aligned, Momentum Enhanced
Welcome to the Trend Synchronizer (TS) – a custom-built, multitimeframe momentum indicator developed for active traders looking to scalp lower timeframes (1–5 min) while staying in sync with broader market direction.
🔍 What Is It?
The Trend Synchronizer is an advanced momentum oscillator designed to identify entry opportunities only when multiple timeframes align.
It overlays real-time momentum signals from higher aggregations to ensure your trade is moving with the market, not against it.
✅ When short-term momentum aligns with higher timeframe direction, opportunities are clearer, stronger, and more reliable.
🧠 How to Use It (No Settings Needed)
This tool is ready to go out of the box.
It uses three internal timeframes (default: 1m, 5m, 30m) and processes their behavior to create momentum signals. Here's how to trade it:
📈 Entries
Buy Bias: When histogram bars turn bullish colors across layers and align positively.
Sell Bias: When histogram bars shift to bearish tones, confirming momentum is to the downside.
Avoid Signals when higher timeframe momentum and lower timeframe are diverging – that's when chop often occurs.
⏳ Timeframes
Default is tuned for scalping (1–5m charts), but can be adjusted.
You can change TF1, TF2, and TF3 to experiment with your preferred layers (e.g., 5m/15m/1H for intraday swing entries).
🟢 Color Cues
The color scheme helps you spot bullish and bearish dominance quickly.
Histograms are visually synced: above 0 = strength, below 0 = weakness.
⚙️ Settings
You don’t need to tweak anything unless you want to. The inputs are exposed only for fine-tuners.
TS1, TS2, TS3: Toggle momentum layers on/off.
Custom colors available for personalization.
Clean histogram-style display for clear, fast decision-making.
📌 Best Practices
Combine with price action and volume for higher conviction.
Always look for trend confirmation on your chart before executing.
It’s ideal for:
Momentum scalpers
Order flow traders
High-frequency setups
Trend pullbacks & breakouts
⚠️ Disclaimer
This indicator is for educational purposes only. It is not financial advice and does not guarantee profitability. Always do your own research and use proper risk management. You are solely responsible for your trading decisions.
✨ Final Word
The Trend Synchronizer is a tool designed to help you align with the flow of the market – not fight it. It simplifies the complexity of multiple timeframes into a visual format any trader can interpret.
If you find it useful, don’t forget to ⭐ it and drop a comment with your feedback!
Happy trading and stay in sync!
Day’s Open ForecastOverview
This Pine Script indicator combines two primary components:
1. Day’s Open Forecast:
o Tracks historical daily moves (up and down) from the day’s open.
o Calculates average up and down moves over a user-defined lookback period.
o Optionally includes standard deviation adjustments to forecast potential intraday levels.
o Plots lines on the chart for the forecasted up and down moves from the current day's open.
2. Session VWAP:
o Allows you to specify a custom trading session (by time range and UTC offset).
o Calculates and plots a Volume-Weighted Average Price (VWAP) during that session.
By combining these two features, you can gauge potential intraday moves relative to historical behavior from the open, while also tracking a session-specific VWAP that can act as a dynamic support/resistance reference.
How the Code Works
1. Collect Daily Moves
o The script detects when a new day starts using time("D").
o Once a new day is detected, it stores the previous day’s up-move (dayHigh - dayOpen) and down-move (dayOpen - dayLow) into arrays.
o These arrays keep track of the last N days (default: 126) of up/down move data.
2. Compute Statistics
o The script computes the average (f_average()) of up-moves and down-moves over the stored period.
o It also computes the standard deviation (f_stddev()) of up/down moves for optional “forecast bands.”
3. Forecast Lines
o Plots the current day’s open.
o Plots the average forecast lines above and below the open (Avg Up Move Level and Avg Down Move Level).
o If standard deviation is enabled, plots additional lines (Avg+StdDev Up and Avg+StdDev Down).
4. Session VWAP
o The script detects the start of a user-defined session (via input.session) and resets accumulation of volume and the numerator for VWAP.
o As each bar in the session updates, it accumulates volume (vwapCumulativeVolume) and a price-volume product (vwapCumulativeNumerator).
o The session VWAP is then calculated as (vwapCumulativeNumerator / vwapCumulativeVolume) and plotted.
5. Visualization Options
o Users can toggle standard deviation usage, historical up/down moves plotting, and whether to show the forecast “bands.”
o The vwapSession and vwapUtc inputs let you adjust which session (and time zone offset) the VWAP is calculated for.
________________________________________
How to Use This Indicator on TradingView
1. Create a New Script
o Open TradingView, then navigate to Pine Editor (usually found at the bottom of the chart).
o Copy and paste the entire code into the editor.
2. Save and Add to Chart
o Click Save (give it a relevant title if you wish), then click Add to chart.
o The indicator will appear on your chart with the forecast lines and VWAP.
o By default, it is overlayed on the price chart (because of overlay=true).
3. Customize Inputs
o In the indicator’s settings, you can:
Change lookback days (default: 126).
Enable or disable standard deviation (Include Standard Deviation in Forecast?).
Adjust the standard deviation multiplier.
Choose whether to plot bands (Plot Bands with Averages/StdDev?).
Plot historical moves if desired (Plot Historical Up/Down Moves for Reference?).
Set your custom session and UTC offset for the VWAP calculation.
4. Interpretation
o “Current Day Open” is simply today’s open price on your chart.
o Up/Down Move Lines: Indicate a potential forecast based on historical averages.
If standard deviation is enabled, the second set of lines acts as an extended range.
o VWAP: Helpful for determining intraday price equilibrium over the specified session.
Important Notes / Best Practices
• The script only updates the historical up/down move data once per day (when a new day starts).
• The VWAP portion resets at the start of the specified session each day.
• Standard deviation multiplies the average up/down range, giving you a sense of “volatility range” around the day’s open.
• Adjust the lookback length (dayCount) to balance how many days of data you want to average. More days = smoother but possibly slower to adapt; fewer days = more reactive but potentially less reliable historically.
Educational & Liability Disclaimers
1. Educational Disclaimer
o The information provided by this indicator is for educational and informational purposes only. It is a technical analysis tool intended to demonstrate how to use historical data and basic statistics in Pine Script.
2. No Financial Advice
o This script does not constitute financial or investment advice. All examples and explanations are solely illustrative. You should always do your own analysis before making any investment decisions.
3. No Liability
o The author of this script is not liable for any losses or damages—monetary or otherwise—that may occur from the application of this script.
o Past performance does not guarantee future results, and you should never invest money you cannot afford to lose.
By adding this indicator to your TradingView chart, you acknowledge and accept that you alone are responsible for your own trading decisions.
Enjoy using the “Day’s Open Forecast” and Session VWAP for better market insights!
Trend Targets [AlgoAlpha]OVERVIEW
This script combines a smoothed trend-following model with dynamic price rejection logic and ATR-based target projection to give traders a complete visual framework for trading trend continuations. It overlays on price and automatically detects potential trend shifts, confirms rejections near dynamic support/resistance, and displays calculated stop-loss and take-profit levels to support structured risk-reward management. Unlike traditional indicators that only show trend direction or signal entries, this tool brings together a unique mix of signal validation, volatility-aware positioning, and layered profit-taking to guide decision-making with more context.
CONCEPTS
The core trend logic is built on a custom Supertrend that uses an ATR-based band structure with long smoothing chains—first through a WMA, then an EMA—allowing the trend line to respond to major shifts while ignoring noise. A key addition is the use of rejection logic: the script looks for consolidation candles that "hug" the smoothed trend line and counts how many consecutive bars reject from it. This behavior often precedes significant moves. A user-defined threshold filters out weak tests and highlights only meaningful rejections.
FEATURES
Trend Detection : Automatically identifies trend direction using a smoothed Supertrend (WMA + EMA), with shape markers on trend shifts and color-coded bars for clarity.
Rejection Signals : Detects price rejections at the trend line after a user-defined number of consolidation bars; plots ▲/▼ icons to highlight strong continuation setups.
Target Projection : On trend confirmation, plots entry, stop-loss (ATR-based), and three dynamic take-profit levels based on customizable multiples.
Dynamic Updates : All levels (entry, SL, TP1–TP3) auto-adjust based on volatility and are labeled in real time on the chart.
Customization : Users can tweak trend parameters, rejection confirmation count, SL/TP ratios, smoothing lengths, and appearance settings.
Alerts : Built-in alerts for trend changes, rejection events, and when TP1, TP2, or TP3 are reached.
Chart Overlay : Plots directly on price chart with minimal clutter and clearly labeled levels for easy trading.
USAGE
Start by tuning the Supertrend factor and ATR period to fit your asset and timeframe—higher values will catch bigger swings, lower values catch faster moves. The confirmation count should match how tightly you want to filter rejection behavior—higher values make signals rarer but stronger. When the trend shifts, the indicator colors the bars and line accordingly, and if enabled, plots the full entry-TP-SL structure. Rejection markers appear only after enough qualifying bars confirm price pressure at the trend line. This is especially useful for continuation plays where price retests the trend but fails to break it. All calculations are based on volatility (ATR), so targets naturally adjust with market conditions. Add alerts to get notified of important signals even when away from the chart.
NR_VersatilitiesLibrary "NR_Versatilities"
Versatilities (aka, Versatile Utilities) includes:
- Seventeen Price Variants returned as a tuple,
- Eight Smoothing functions rolled into one,
- Pick any Past Value from any series with offset,
- Or just the previous value from any series.
pastVal(src, len)
Fetches past value from src that came len distance ago
Parameters:
src (float) : source series
len (int) : lookback distance - (optional) default is 1
Returns: latest src if len <= 0, else src
previous(src)
Fetches past value from src that came len distance ago
Parameters:
src (float) : source series
Returns: previous value in the series if found, else current value
price_variants()
Computes Several different averages using current and previous OHLC values
Returns: Seventeen Uncommon Average Price Combinations
dynamic_MA(matyp, masrc, malen, lsmaoff, almasgm, almaoff, almaflr)
Dynamically computes Eight different MAs on-demand individually, or an average of all taken together
Parameters:
matyp (string) : pick one of these MAs - ALMA, EMA, HMA, LSMA, RMA, SMA, SWMA, WMA, ALL
masrc (float) : source series to compute MA
malen (simple int) : lookback distance for MA
lsmaoff (simple int) : optional LSMA offset - default is 0
almasgm (simple float) : optional ALMA sigma - default is 5
almaoff (simple float) : optional ALMA offset - default is 0.5
almaflr (simple bool) : optional ALMA floor flag - default is false
Returns: MA series for chosen type or, an average of all of them, if chosen so
Multi-Timeframe Anchored VWAP Valuation# Multi-Timeframe Anchored VWAP Valuation
## Overview
This indicator provides a unique perspective on potential price valuation by comparing the current price to the Volume Weighted Average Price (VWAP) anchored to the start of multiple timeframes: Weekly, Monthly, Quarterly, and Yearly. It synthesizes these comparisons into a single oscillator value, helping traders gauge if the current price is potentially extended relative to significant volume-weighted levels.
## Core Concept & Calculation
1. **Anchored VWAP:** The script calculates the VWAP separately for the current Week, Month, Quarter (3 Months), and Year (12 Months), starting the calculation from the first bar of each period.
2. **Price Deviation:** It measures how far the current `close` price is from each of these anchored VWAPs. This distance is measured in terms of standard deviations calculated *within* that specific anchor period (e.g., how many weekly standard deviations the price is away from the weekly VWAP).
3. **Deviation Score (Multiplier):** Based on this standard deviation distance, a score is assigned. The further the price is from the VWAP (in terms of standard deviations), the higher the absolute score. The indicator uses linear interpolation to determine scores between the standard deviation levels (defaulted at 1, 2, and 3 standard deviations corresponding to scores of +/-2, +/-3, +/-4, with a score of 1 at the VWAP).
4. **Timeframe Weighting:** Longer timeframes are considered more significant. The deviation scores are multiplied by fixed scalars: Weekly (x1), Monthly (x2), Quarterly (x3), Yearly (x4).
5. **Final Valuation Metric:** The weighted scores from all four timeframes are summed up to produce the final oscillator value plotted in the indicator pane.
## How to Interpret and Use
* **Histogram (Indicator Pane):**
* The main output is the histogram representing the `Final Valuation Metric`.
* **Positive Values:** Suggest the price is generally trading above its volume-weighted averages across the timeframes, potentially indicating strength or relative "overvaluation."
* **Negative Values:** Suggest the price is generally trading below its volume-weighted averages, potentially indicating weakness or relative "undervaluation."
* **Values Near Zero:** Indicate the price is relatively close to its volume-weighted averages.
* **Histogram Color:**
* The color of the histogram bars provides context based on the metric's *own recent history*.
* **Green (Positive Color):** The metric is currently *above* its recent average plus a standard deviation band (dynamic upper threshold). This highlights potentially significant "overvalued" readings relative to its normal range.
* **Red (Negative Color):** The metric is currently *below* its recent average minus a standard deviation band (dynamic lower threshold). This highlights potentially significant "undervalued" readings relative to its normal range.
* **Gray (Neutral Color):** The metric is within its typical recent range (between the dynamic upper and lower thresholds).
* **Orange Line:** Plots the moving average of the `Final Valuation Metric` itself (based on the "Threshold Lookback Period"), serving as the centerline for the dynamic thresholds.
* **On-Chart Table:**
* Provides a detailed breakdown for transparency.
* Shows the calculated VWAP, the raw deviation multiplier score, and the final weighted (adjusted) metric for each individual timeframe (W, M, Q, Y).
* Displays the current price, the final combined metric value, and a textual interpretation ("Overvalued", "Undervalued", "Neutral") based on the dynamic thresholds.
## Potential Use Cases
* Identifying potential exhaustion points when the indicator reaches statistically high (green) or low (red) levels relative to its recent history.
* Assessing whether price trends are supported by underlying volume-weighted average prices across multiple timeframes.
* Can be used alongside other technical analysis tools for confirmation.
## Settings
* **Calculation Settings:**
* `STDEV Level 1`: Adjusts the 1st standard deviation level (default 1.0).
* `STDEV Level 2`: Adjusts the 2nd standard deviation level (default 2.0).
* `STDEV Level 3`: Adjusts the 3rd standard deviation level (default 3.0).
* **Interpretation Settings:**
* `Threshold Lookback Period`: Defines the number of bars used to calculate the average and standard deviation of the final metric for dynamic thresholds (default 200).
* `Threshold StDev Multiplier`: Controls how many standard deviations above/below the metric's average are used to set the "Overvalued"/"Undervalued" thresholds (default 1.0).
* **Table Settings:** Customize the position and colors of the data table displayed on the chart.
## Important Considerations
* This indicator measures price deviation relative to *anchored* VWAPs and its *own historical range*. It is not a standalone trading system.
* The interpretation of "Overvalued" and "Undervalued" is relative to the indicator's logic and calculations; it does not guarantee future price movement.
* Like all indicators, past performance is not indicative of future results. Use this tool as part of a comprehensive analysis and risk management strategy.
* The anchored VWAP and Standard Deviation values reset at the beginning of each respective period (Week, Month, Quarter, Year).
HarmonicMapLibLibrary "HarmonicMapLib"
Harmonic Pattern Library implementation utilising maps
method tostring(this)
convert Range value to string
Namespace types: Range
Parameters:
this (Range) : Range value
Returns: converted string representation
method tostring(this)
convert array of Range value to string
Namespace types: array
Parameters:
this (array) : array object
Returns: converted string representation
method tostring(this)
convert map of string to Range value to string
Namespace types: map
Parameters:
this (map) : map object
Returns: converted string representation
method tostring(this)
convert RatioMap to string
Namespace types: RatioMap
Parameters:
this (RatioMap) : RatioMap object
Returns: converted string representation
method tostring(this)
convert array of RatioMap to string
Namespace types: array
Parameters:
this (array) : array object
Returns: converted string representation
method tostring(this)
convert map of string to RatioMap to string
Namespace types: map
Parameters:
this (map) : map object
Returns: converted string representation
method tostring(this)
convert map of string to bool to string
Namespace types: map
Parameters:
this (map) : map object
Returns: converted string representation
method tostring(this)
convert PrzRange to string
Namespace types: PrzRange
Parameters:
this (PrzRange) : PrzRange object
Returns: converted string representation
method tostring(this)
convert array of PrzRange to string
Namespace types: array
Parameters:
this (array) : array object
Returns: converted string representation
getHarmonicMap()
Creates the RatioMap for harmonic patterns
Returns: map haronic ratio rules for all patterns
method evaluate(patternsMap, pattern, ratioRange, properties, ratioValue)
evaluates harmonic ratio range
Namespace types: map
Parameters:
patternsMap (map) : parameter containing valid pattern names
pattern (string) : Pattern type to be evaluated
ratioRange (Range) : ratio range to be checked
properties (ScanProperties) : Scan Properties
ratioValue (float)
Returns: void
method evaluate(przRange, pattern, ratioRange, priceRange, properties)
Evaluate PRZ ranges
Namespace types: map
Parameters:
przRange (map)
pattern (string) : Pattern name
ratioRange (Range) : Range of ratio for the pattern
priceRange (Range) : Price range based on ratio
properties (ScanProperties) : ScanProperties object
Returns: void
method scanRatio(currentPatterns, rules, properties, ratioName, ratioValue)
Scan for particular named ratio of harmonic pattern to filter valid patterns
Namespace types: map
Parameters:
currentPatterns (map) : Current valid patterns map
rules (map) : map Harmonic ratio rules
properties (ScanProperties) : ScanProperties object
ratioName (string) : Specific ratio name
ratioValue (float) : ratio value to be checked
Returns: updated currentPatterns object
method scanPatterns(patterns, x, a, b, c, d, properties)
Scan for patterns based on X, A, B, C, D values
Namespace types: map
Parameters:
patterns (map) : List of allowed patterns
x (float) : X coordinate
a (float) : A coordinate
b (float) : B coordinate
c (float) : C coordinate
d (float) : D coordinate
properties (ScanProperties) : ScanProperties object. If na, default values are initialised
Returns: updated valid patterns map
method scanProjections(patterns, x, a, b, c, properties)
Scan for projections based on X, A, B, C values
Namespace types: map
Parameters:
patterns (map) : List of allowed patterns
x (float) : X coordinate
a (float) : A coordinate
b (float) : B coordinate
c (float) : C coordinate
properties (ScanProperties) : ScanProperties object. If na, default values are initialised
Returns: updated valid projections map
method merge(this, other)
merge two ranges into one
Namespace types: Range
Parameters:
this (Range) : first range
other (Range) : second range
Returns: combined range
method union(this, other)
union of two ranges into one
Namespace types: Range
Parameters:
this (Range) : first range
other (Range) : second range
Returns: union range
method overlaps(this, other)
checks if two ranges intersect
Namespace types: Range
Parameters:
this (Range) : first range
other (Range) : second range
Returns: true if intersects, false otherwise
method consolidate(this)
Consolidate ranges into PRZ
Namespace types: map
Parameters:
this (map) : map of Ranges
Returns: consolidated PRZ
method consolidateMany(this)
Consolidate ranges into multiple PRZ ranges
Namespace types: map
Parameters:
this (map) : map of Ranges
Returns: consolidated array of PRZ ranges
method getRange(currentPatterns, x, a, b, c, properties)
Get D range based on X, A, B, C coordinates for the current patterns
Namespace types: map
Parameters:
currentPatterns (map) : List of valid patterns
x (float) : X coordinate
a (float) : A coordinate
b (float) : B coordinate
c (float) : C coordinate
properties (ScanProperties) : ScanProperties object. If na, default values are initialised
Returns: map of D ranges
method getPrzRange(currentPatterns, x, a, b, c, properties)
Get PRZ range based on X, A, B, C coordinates for the current patterns
Namespace types: map
Parameters:
currentPatterns (map) : List of valid patterns
x (float) : X coordinate
a (float) : A coordinate
b (float) : B coordinate
c (float) : C coordinate
properties (ScanProperties) : ScanProperties object. If na, default values are initialised
Returns: PRZRange for the pattern
method getProjectionRanges(currentPatterns, x, a, b, c, properties)
Get projection range based on X, A, B, C coordinates for the current patterns
Namespace types: map
Parameters:
currentPatterns (map) : List of valid patterns
x (float) : X coordinate
a (float) : A coordinate
b (float) : B coordinate
c (float) : C coordinate
properties (ScanProperties) : ScanProperties object. If na, default values are initialised
Returns: array of projection ranges
Range
Collection of range values
Fields:
values (array) : array of float values
RatioMap
ratio map for pattern
Fields:
ratioMap (map) : map of string to Range (array of float)
ScanProperties
Pattern Scanning properties
Fields:
strictMode (series bool) : strict scanning mode will check for overflows
logScale (series bool) : scan ratios in log scale
errorMin (series float) : min error threshold
errorMax (series float)
mintick (series float) : minimum tick value of price
PrzRange
Potential reversal zone range
Fields:
patterns (array) : array of pattern names for the given XABCD combination
prz (Range) : PRZ range
Chau RSI+MA for DHChau RSI+MA for DH – Indicator Description & Usage
Overview:
The Chau RSI+MA for DH indicator is a custom RSI-based analysis tool designed to provide a deeper and more dynamic view of market momentum. It plots three configurable RSI lines along with three moving averages (MA) of the main RSI, helping traders identify overbought/oversold zones, trend strength, and potential reversal points.
🔧 Inputs & Configuration:
Three RSI Lines:
RSI 1 (default: 7)
RSI 2 (default: 14) → used as the base for MA calculations
RSI 3 (default: 21)
These allow multi-timeframe or multi-speed momentum analysis in a single panel.
Three MAs of RSI 2:
MA 1, MA 2, MA 3 – customizable lengths, defaulting to 5, 10, and 20
These help smooth out RSI 2 to detect trend direction or divergence.
Overbought/Oversold Levels:
Customizable dual thresholds (Level 1 & Level 2), offering flexible signal filtering.
🎯 Core Features & Strengths:
Multi-RSI Display:
Combines short, mid, and long RSI to give a layered view of market strength and potential turning points.
RSI MA Tracking:
Smoothing RSI 2 with three MAs helps visualize momentum trends and potential trend-following signals.
Dynamic Signal Zones:
Overbought and Oversold regions are highlighted with background colors.
Dual level alert system (e.g., 70/80 and 30/20) increases precision and adaptability for different strategies.
Highly Customizable Visualization:
Fully adjustable color schemes for all RSI and MA lines.
Easily identify confluences or divergences at a glance.
✅ Best Use Cases:
Trend Confirmation:
Use RSI 2 crossing above/below its MAs as a momentum confirmation signal.
Reversal Detection:
Identify overbought or oversold conditions combined with RSI-MA divergence.
Filtering Entries/Exits:
Combine with price action or other indicators to filter out low-probability trades.
Scalping & Swing Trading:
Adaptable to multiple timeframes and styles due to customizable RSI/MA settings.
Delta Zones🔶 Delta Zones — A Precision Tool for Time-Price Mapping 🔶
The Delta Zones indicator is a refined structure-mapping tool that dynamically tracks zones of dominant trading activity across recent sessions.
These zones are projected forward in time, offering traders a reliable visual guide to where significant interactions between buyers and sellers are likely to take place.
This tool was designed for intraday use, but its adaptability makes it powerful even on higher timeframes, giving traders insights into market behavior without the noise. You need to change session setting from indicator to higher TF that the chart. For intra, its by default on daily.
🔧 What This Indicator Does
Detects and displays the key activity zone for the current session (today).
Recalls the most active zone from the previous session, allowing you to track momentum or reversal bias.
Color codes each zone based on where price currently trades relative to it:
Neutral gradient (orange/white) for today’s zone, showing where price is consolidating or reacting.
Bullish green fade if price is trading above yesterday’s zone.
Bearish red fade if price is trading below yesterday’s zone.
Extends each zone forward (default 200 bars) so you can observe price behavior as it revisits these areas over time.
📈 How to Use Delta Zones
Trend Continuation:
If price pushes beyond today's zone and maintains momentum, it may suggest strength in that direction. Watch how price reacts on retests of this zone.
Fade or Mean Reversion:
When price strays far from a Delta Zone and struggles to gain ground, it often rotates back into that region. These situations can offer attractive risk-reward setups.
Zone Polarity from Prior Sessions:
Yesterday’s zone serves as a directional cue — if price opens and stays above it (green-filled), sentiment favors strength. If it stays below (red-filled), weakness may persist.
Support/Resistance Anchors:
Use zones as dynamic S/R levels — watch for wick tests, engulfing candles, or volume surges at zone edges for potential trade entries or exits.
🎛️ Inputs You Can Control
Session Length (Default: Daily): Defines how often a new zone is calculated.
💡 Pro Tip
These zones act like magnetic fields around price — not only can they contain price, but they also attract it. The key is to recognize when price is respecting, rejecting, or absorbing at the edges of the zone.
Pair Delta Zones with your favorite price action, momentum, or volume tools for sharper decision-making. For example, "Accumulation/Distribution Money Flow" script which I published few days ago.
⚠️ Note
This is a conceptually adaptive framework designed to simplify the visual structure of the market. While no model guarantees predictive accuracy, Delta Zones are especially useful for contextualizing price behavior and anticipating where meaningful reactions may occur.
This is an educational idea, use it at your own risk.
Past performance does not guarantee future success.
Intrinsic Event (Multi DC OS)Overview
This indicator implements an event-based approach to analyze price movements in the foreign exchange market, inspired by the intrinsic time framework introduced in Fractals and Intrinsic Time - A Challenge to Econometricians by U. A. Müller et al. (1995). It identifies significant price events using an intrinsic time perspective and supports multi-agent analysis to reflect the heterogeneous nature of financial markets. The script plots these events as lines and labels on the chart, offering a visual tool for traders to understand market dynamics at different scales.
Key Features
Intrinsic Events : The indicator detects directional change (DC) and overshoot (OS) events based on user-defined thresholds (delta), aligning with the paper’s concept of intrinsic time (Section 6). Intrinsic time redefines time based on market activity, expanding during volatile periods and contracting during inactive ones, rather than relying on a physical clock.
Multi-Agent Analysis : Supports up to five agents, each with its own threshold and color settings, reflecting the heterogeneous market hypothesis (Section 5). This allows the indicator to capture the perspectives of market participants with different time horizons, such as short-term FX dealers and long-term central banks.
How It Works
Intrinsic Events Detection : The script identifies two types of events using intrinsic time principles:
Directional Change (DC) : Triggered when the price reverses by the threshold (delta) against the current trend (e.g., a drop by delta in an uptrend signals a "Down DC").
Overshoot (OS) : Occurs when the price continues in the trend direction by the threshold (e.g., a rise by delta in an uptrend signals an "Up OS").
DC events are plotted as solid lines, and OS events as dashed lines, with labels like "Up DC" or "OS Down" for clarity. The label style adjusts based on the trend to ensure visibility.
Multi-Agent Setup : Each agent operates independently with its own threshold, mimicking market participants with varying time horizons (Section 5). Smaller thresholds detect frequent, short-term events, while larger thresholds capture broader, long-term movements.
Settings
Each agent can be configured with:
Enable Agent : Toggle the agent on or off.
Threshold (%) : The percentage threshold (delta) for detecting DC and OS events (default values: 0.1%, 0.2%, 0.5%, 1%, 2% for agents 1–5).
Up Mode Color : Color for lines and labels in up mode (DC events).
Down Mode Color : Color for lines and labels in down mode (OS events).
Usage Notes
This indicator is designed for the foreign exchange market, leveraging its high liquidity, as noted in the paper (Section 1). Adjust the threshold values based on the instrument’s volatility—higher volatility leads to more intrinsic events (Section 4). It can be adapted to other markets where event-based analysis applies.
Reference
The methodology is based on:
Fractals and Intrinsic Time - A Challenge to Econometricians by U. A. Müller, M. M. Dacorogna, R. D. Davé, O. V. Pictet, R. B. Olsen, and J. R. Ward (June 28, 1995). Olsen & Associates Preprint.