Market Strength Buy Sell Indicator [TradeDots]A specialized tool designed to assist traders in evaluating market conditions through a multifaceted analysis of relative performance, beta-adjusted returns, momentum, and volume—allowing you to identify optimal points for long or short trades. By integrating multiple benchmarks (default S&P 500) and percentile-based thresholds, the script provides clear, actionable insights suitable for both day trading and higher-level timeframe assessments.
📝 HOW IT WORKS
1. Multi-Factor Composite Score
Relative Performance (RS Ratio): Compares your asset’s performance to a chosen benchmark (default: SPY). Values above 1.0 indicate outperformance, while below 1.0 suggest underperformance.
Beta-Adjusted Returns: Checks the ticker’s excess movement relative to expected market-related moves. This helps distinguish pure “alpha” from broad market effects.
Volume & Correlation: Volume spikes often confirm the momentum behind a move, while correlation measures how closely the asset tracks or diverges from its benchmark.
These components merge into a 0–100 composite score. Scores above 50 frequently imply bullish strength; drops below 50 often point to underperformance—potentially flagging short opportunities.
2. Intraday & Day Trading Focus
Monitoring Below 50: During the trading day, the script calculates live data against the benchmark, offering an intraday-sensitive composite score. A dip under 50 may indicate a short bias for that session, especially when accompanied by high volume or momentum shifts.
3. Higher Timeframe Monitoring
Daily Strategies: On daily or weekly charts, the script reveals overall relative strength or weakness compared to the S&P 500. This higher-level perspective helps form broader trading biases—crucial for swing or position trades spanning multiple days.
Long/Short Thresholds: Persistent readings above 50 on a daily chart typically reinforce a long bias, while consistent dips below 50 can sustain a short or cautious outlook.
4. Pair Trading Applications
Custom Benchmark Selection: By setting a specific ticker pair as your benchmark instead of the default S&P 500, you can identify spread trading opportunities between two correlated assets. This allows you to go long the outperforming asset while shorting the underperforming one when the spread reaches extreme levels.
4. Color-Coded Signals & Alerts
Visual Zones (25–75): Color-coded bands highlight strong outperformance (above 75) or pronounced underperformance (below 25).
Alerts on Strong Shifts: Automatic alerts can notify you of sudden entries or exits from bullish or bearish zones, so you can potentially act on new market information without delay.
⚙️ HOW TO USE
1. Select Your Timeframe: For scalping or day trading, lower intervals (e.g., 5-minute) offer immediate data resets at the session’s start. For multi-day insight, daily or weekly charts reveal broader performance trends.
2. Watch Key Levels Around 50: Intraday dips under 50 may be a cue to consider short trades, while bounces above 50 can confirm renewed strength.
3. Assess Benchmark Relationships: Compare your asset’s score and signals to the broader market. A stock falling below its pair’s relative strength line might lag overall market momentum.
4. Combine Tools & Validate: This script excels when integrated with other technical analysis methods (e.g., support/resistance, chart patterns) and fundamental factors for a holistic market view.
❗ LIMITATIONS
No Direction Guarantee: The indicator identifies relative strength but does not guarantee directional price moves.
Delayed Updates: Since calculations update after each bar close, sudden intrabar changes may not immediately reflect.
Market-Specific Behaviors: Some assets or unusual market conditions may deviate from typical benchmarks, weakening signal reliability.
Past ≠ Future: High or low relative strength in the past may not predict continued performance.
RISK DISCLAIMER
All forms of trading and investing involve risk, including the possible loss of principal. This indicator analyzes relative performance but cannot assure profits or eliminate losses. Past performance of any strategy does not guarantee future results. Always combine analysis with proper risk management and your broader trading plan. Consult a licensed financial advisor if you are unsure of your individual risk tolerance or investment objectives.
Statistics
Multi Asset Comparative📊 Multi Asset Comparative – Compare Baskets of Cryptos Visually
This indicator allows you to compare the performance of two groups of cryptocurrencies (or any assets) over time, using a clean and intuitive chart.
Instead of looking at each asset separately, this tool gives you a global view by showing how one group performs relative to another — all displayed in the form of candlesticks.
🧠 What This Tool Is For
Markets constantly shift, and capital rotates between sectors or tokens. This script helps you visually track those shifts by answering a key question:
"Is this group of assets getting stronger or weaker compared to another group?"
For example:
Compare altcoins vs Bitcoin
Track the DeFi sector vs Ethereum
Analyze your custom portfolio vs the market
Spot moments when money flows from majors to smaller caps, or vice versa
🧩 How It Works (Simplified)
You select two groups of assets:
Group 1 (up to 20 assets) — the one you want to analyze
Group 2 (up to 5 assets) — your comparison baseline
The indicator then creates a single line of candles that represents the performance of Group 1 compared to Group 2. If the candles go up, it means Group 1 is gaining strength over Group 2. If the candles go down, it's losing ground.
This lets you see market dynamics in one glance, instead of switching charts or running calculations manually.
🚀 Why It's Unique
Unlike many indicators that just show data from one asset, this one provides a bird's-eye view of multiple assets at once — condensed into a simple visual ratio.
It’s:
Customizable (you choose the assets)
Visual and intuitive (no need to interpret tables or formulas)
Actionable (helps with trend confirmation, macro views, and market rotation)
Whether you're a swing trader, a macro analyst, or building your own strategy, this tool can help you spot opportunities hidden in plain sight.
✅ How to Use It
Choose your two groups of assets (e.g., altcoins vs BTC/ETH)
Watch the direction of the candles:
Uptrend = Group 1 gaining strength over Group 2
Downtrend = Group 1 weakening
Use it to confirm market shifts, anticipate rotations, or analyze sector strength
Approximate Entropy Zones [PhenLabs]Version: PineScript™ v6
Description
This indicator identifies periods of market complexity and randomness by calculating the Approximate Entropy (ApEn) of price action. As the movement of the market becomes complex, it means the current trend is losing steam and a reversal or consolidation is likely near. The indicator plots high-entropy periods as zones on your chart, providing a graphical suggestion to anticipate a potential market direction change. This indicator is designed to help traders identify favorable times to get in or out of a trade by highlighting when the market is in a state of disarray.
Points of Innovation
Advanced Complexity Analysis: Instead of relying on traditional momentum or trend indicators, this tool uses Approximate Entropy to quantify the unpredictability of price movements.
Dynamic Zone Creation: It automatically plots zones on the chart during periods of high entropy, providing a clear and intuitive visual guide.
Customizable Sensitivity: Users can fine-tune the ‘Entropy Threshold’ to adjust how frequently zones appear, allowing for calibration to different assets and timeframes.
Time-Based Zone Expiration: Zones can be set to expire after a specific time, keeping the chart clean and relevant.
Built-in Zone Size Filter: Excludes zones that form on excessively large candles, filtering out noise from extreme volatility events.
On-Chart Calibration Guide: A persistent note on the chart provides simple instructions for adjusting the entropy threshold, making it easy for users to optimize the indicator’s performance.
Core Components
Approximate Entropy (ApEn) Calculation: The core of the indicator, which measures the complexity or randomness of the price data.
Zone Plotting: Creates visual boxes on the chart when the calculated ApEn value exceeds a user-defined threshold.
Dynamic Zone Management: Manages the lifecycle of the zones, from creation to expiration, ensuring the chart remains uncluttered.
Customizable Settings: A comprehensive set of inputs that allow users to control the indicator’s sensitivity, appearance, and time-based behavior.
Key Features
Identifies Potential Reversals: The high-entropy zones can signal that a trend is nearing its end, giving traders an early warning.
Works on Any Timeframe: The indicator can be applied to any chart timeframe, from minutes to days.
Customizable Appearance: Users can change the color and transparency of the zones to match their chart’s theme.
Informative Labels: Each zone can display the calculated entropy value and the direction of the candle on which it formed.
Visualization
Entropy Zones: Shaded boxes that appear on the chart, highlighting candles with high complexity.
Zone Labels: Text within each zone that displays the ApEn value and a directional arrow (e.g., “0.525 ↑”).
Calibration Note: A small table in the top-right corner of the chart with instructions for adjusting the indicator’s sensitivity.
Usage Guidelines
Entropy Analysis
Source: The price data used for the ApEn calculation. (Default: close)
Lookback Length: The number of bars used in the ApEn calculation. (Default: 20, Range: 10-50)
Embedding Dimension (m): The length of patterns to be compared; a standard value for financial data. (Default: 2)
Tolerance Multiplier (r): Adjusts the tolerance for pattern matching; a larger value makes matching more lenient. (Default: 0.2)
Entropy Threshold: The ApEn value that must be exceeded to plot a zone. Increase this if too many zones appear; decrease it if too few appear. (Default: 0.525)
Time Settings
Analysis Timeframe: How long a zone remains on the chart after it forms. (Default: 1D)
Custom Period (Bars): The zone’s lifespan in bars if “Analysis Timeframe” is set to “Custom”. (Default: 1000)
Zone Settings
Zone Fill Color: The color of the entropy zones. (Default: #21f38a with 80% transparency)
Maximum Zone Size %: Filters out zones on candles that are larger than this percentage of their low price. (Default: 0.5)
Display Options
Show Entropy Label: Toggles the visibility of the text label inside each zone. (Default: true)
Label Text Position: The horizontal alignment of the text label. (Default: Right)
Show Calibration Note: Toggles the visibility of the calibration note in the corner of the chart. (Default: true)
Best Use Cases
Trend Reversal Trading: Identifying when a strong trend is likely to reverse or pause.
Breakout Confirmation: Using the absence of high entropy to confirm the strength of a breakout.
Ranging Market Identification: Periods of high entropy can indicate that a market is transitioning into a sideways or choppy phase.
Limitations
Not a Standalone Signal: This indicator should be used in conjunction with other forms of analysis to confirm trading signals.
Lagging Nature: Like all indicators based on historical data, ApEn is a lagging measure and does not predict future price movements with certainty.
Calibration Required: The effectiveness of the indicator is highly dependent on the “Entropy Threshold” setting, which needs to be adjusted for different assets and timeframes.
What Makes This Unique
Quantifies Complexity: It provides a numerical measure of market complexity, offering a different perspective than traditional indicators.
Clear Visual Cues: The zones make it easy to see when the market is in a state of high unpredictability.
User-Friendly Design: With features like the on-chart calibration note, the indicator is designed to be easy to use and optimize.
How It Works
Calculate Standard Deviation: The indicator first calculates the standard deviation of the source price data over a specified lookback period.
Calculate Phi: It then calculates a value called “phi” for two different pattern lengths (embedding dimensions ‘m’ and ‘m+1’). This involves comparing sequences of data points to see how many are “similar” within a certain tolerance (determined by the standard deviation and the ‘r’ multiplier).
Calculate ApEn: The Approximate Entropy is the difference between the two phi values. A higher ApEn value indicates greater irregularity and unpredictability in the data.
Plot Zones: If the calculated ApEn exceeds the user-defined ‘Entropy Threshold’, a zone is plotted on the chart.
Note: The “Entropy Threshold” is the most important setting to adjust. If you see too many zones, increase the threshold. If you see too few, decrease it.
SmartPhase Analyzer📝 SmartPhase Analyzer – Composite Market Regime Classifier
SmartPhase Analyzer is an adaptive regime classification tool that scores market conditions using a customizable set of statistical indicators. It blends multiple normalized metrics into a composite score, which is dynamically evaluated against rolling statistical thresholds to determine the current market regime.
✅ Features:
Composite score calculated from 13+ toggleable statistical indicators:
Sharpe, Sortino, Omega, Alpha, Beta, CV, R², Entropy, Drawdown, Z-Score, PLF, SRI, and Momentum Rank
Uses dynamic thresholds (mean ± std deviation) to classify regime states:
🟢 BULL – Strongly bullish
🟩 ACCUM – Mildly bullish
⚪ NEUTRAL – Sideways
🟧 DISTRIB – Mildly bearish
🔴 BEAR – Strongly bearish
Color-coded histogram for composite score clarity
Real-time regime label plotted on chart
Benchmark-aware metrics (Alpha, Beta, etc.)
Modular design using the StatMetrics library by RWCS_LTD
🧠 How to Use:
Enable/disable metrics in the settings panel to customize your composite model
Use the composite histogram and regime background for discretionary or systematic analysis
⚠️ Disclaimer:
This indicator is for educational and informational purposes only. It does not constitute financial advice or a trading recommendation. Always consult your financial advisor before making investment decisions.
Customizable Time DisplayA simple indicator that display the current time on the chart, I find this to be very useful in playback, I know the time is just below but this one give you a quick look on the exact minutes to 30s so you don't have to mouse over the chart to find out the exact time... so this can be very helpful in replay when you want to rewind a few minutes.
It is also very customizable, you can select if you want to display the year, date or minutes or not.. you can also customze colors and location of this display anywhere on the chart.
Time Specific Standard Deviation Zones(10 am - 4hr candle)This indicator is designed for intraday traders who want to visualize volatility-based zones around the 10:00 AM New York session open, plotted precisely from 10:00 AM to 2:00 PM EST.
✅ Key Features:
📦 Automatically draws mirrored Standard Deviation (SD) zones:
0.5 SD, 1 SD, 1.5 SD above and below the 10AM open
Open Line reference for mean reversion tracking
📐 Internal Fibonacci Levels within each zone:
0.236, 0.382, 0.5, 0.618, 0.786
⏱️ Works across any timeframe
📊 Ideal for:
Breakout traders
Volatility compression strategies
Statistical mean reversion models
🔧 Built using precise New York session timestamps, ensuring accuracy across time zones and resolutions.
Uptrick: Mean ReversionOverview
Uptrick: Mean Reversion is a technical indicator designed to identify statistically significant reversal opportunities by monitoring market extremes. It presents a unified view of multiple analytical layers—momentum shifts, extreme zones, divergence patterns, and a multi-factor bias dashboard—within a single pane. By translating price momentum into a normalized framework, it highlights areas where prices are likely to revert to their average range.
Introduction
Uptrick: Mean Reversion relies on several core concepts:
Volatility normalization
The indicator rescales recent market momentum into a common scale so that extreme readings can be interpreted consistently across different assets and timeframes.
Mean reversion principle
Markets often oscillate around an average level. When values stray too far beyond typical ranges, a return toward the mean is likely. Uptrick: Mean Reversion detects when these extremes occur.
Momentum inflection
Sharp changes in momentum direction frequently presage turning points. The indicator watches for shifts from upward momentum to downward momentum (and vice versa) to help time entries and exits.
Divergence
When price trends and internal momentum readings move in opposite directions, it can signal weakening momentum and an impending reversal. Uptrick: Mean Reversion flags such divergence conditions directly on the indicator pane.
Multi-factor sentiment
No single metric tells the entire story. By combining several independent sentiment measures—price structure, momentum, oscillators, and external market context—Uptrick: Mean Reversion offers a more balanced view of overall market bias.
Purpose
Uptrick: Mean Reversion was created for traders who focus on countertrend opportunities rather than simply following established trends. Its main objectives are:
Spot extreme conditions
By normalizing momentum into a standardized scale, the indicator clearly marks when the market is in overbought or oversold territory. These conditions often align with points where a snapback toward average is more probable.
Provide reversal signals
Built-in logic detects when momentum shifts direction within extreme zones and displays clear buy or sell markers to guide countertrend entries and exits.
Highlight hidden divergences
Divergence between price and internal momentum can suggest underlying weakness or strength ahead of actual price moves. Uptrick: Mean Reversion plots these divergences directly, allowing traders to anticipate reversals earlier.
Offer contextual bias
A dynamic dashboard aggregates multiple independent indicators—based on recent price action, momentum readings, common oscillators, and broader market context—to produce a single sentiment label. This helps traders determine whether mean reversion signals align with or contradict overall market conditions.
Cater to lower timeframes
Mean reversion tends to occur more frequently and reliably on shorter timeframes (for example, 5-minute, 15-minute, or 1-hour charts). Uptrick: Mean Reversion is optimized for these nimble environments, where rapid reversals can be captured before a larger trend takes hold.
Originality and Uniqueness
Uptrick: Mean Reversion stands out for several reasons:
Proprietary normalization framework
Instead of relying on raw oscillator values, it transforms momentum into a standardized scale. This ensures that extreme readings carry consistent meaning across different assets and volatility regimes.
Inflection-based signals
The indicator waits for a clear shift in momentum direction within extreme zones before plotting reversal markers. This approach reduces false signals compared to methods that rely solely on fixed threshold crossings.
Embedded divergence logic
Divergence detection is handled entirely within the same pane. Rather than requiring a separate indicator window, Uptrick: Mean Reversion identifies instances where price and internal momentum readings do not align and signals those setups directly on the chart.
Adjustable sensitivity profiles
Traders can choose from predefined risk profiles—ranging from very conservative to very aggressive—to automatically adjust how extreme a reading must be before triggering a signal. This customization helps balance between capturing only the most significant reversals or generating more frequent, smaller opportunities.
Multi-factor bias dashboard
While many indicators focus on a single metric, Uptrick: Mean Reversion aggregates five distinct sentiment measures. By balancing price-based bias, momentum conditions, and broader market context, it offers a more nuanced view of when to take—or avoid—countertrend trades.
Why Indicators Were Merged
Proprietary momentum oscillator
A custom-built oscillator rescales recent price movement into a normalized range. This core component underpins all signal logic and divergence checks, allowing extreme readings to be identified consistently.
Inflection detection
By comparing recent momentum values over a configurable lookback interval, the indicator identifies clear shifts from rising to falling momentum (and vice versa). These inflection points serve as a prerequisite for reversal signals when combined with extreme conditions.
Divergence framework
Local peaks and troughs are identified within the normalized oscillator and compared to corresponding price highs and lows. When momentum peaks fail to follow price to new extremes (or vice versa), a divergence alert appears, suggesting weakening momentum ahead of a price turn.
Classic price bias
Recent bar structures are examined to infer whether the immediate past price action was predominantly bullish, bearish, or neutral. This provides one piece of the overall sentiment picture.
Smoothed oscillator bias
A secondary oscillator reading is smoothed and compared to a central midpoint to generate a simple bullish or bearish reading.
Range-based oscillator bias
A familiar range-bound oscillator is used to detect oversold or overbought readings, contributing to the sentiment score.
Classic momentum crossover bias
A traditional momentum check confirms whether momentum currently leans bullish or bearish.
External market trend bias
The indicator monitors a major currency’s short-term trend to gauge broader market risk appetite. A falling currency—often associated with higher risk tolerance—contributes a bullish bias point, while a rising currency adds a bearish point.
All these elements run concurrently. Each piece provides a “vote” toward an overall sentiment reading. At the same time, the proprietary momentum oscillator drives both extreme-zone detection and divergence identification. By merging these inputs, the final result is a single pane showing both precise reversal signals and a unified market bias.
How It Works
At runtime, the indicator proceeds through the following conceptual steps:
Read user inputs (risk profile, lookback index, visual mode, color scheme, background highlighting, bias table display, divergence toggles).
Fetch the latest price data.
Process recent price movement through a proprietary normalization engine to produce a single, standardized momentum reading for each bar.
Track momentum over a configurable lookback interval to detect shifts in direction.
Compare the current momentum reading to dynamically determined extreme thresholds (based on the chosen risk profile).
If momentum has flipped from down to up within an oversold area, display a discrete buy marker. If momentum flips from up to down within an overbought area, display a sell marker.
Identify local peaks and troughs in the proprietary momentum series and compare to price highs and lows over a configurable range. When divergence criteria are met, display bullish or bearish divergence labels
Evaluate five independent sentiment measures—price bar bias, smoothed oscillator bias, range oscillator bias, traditional momentum crossover bias, and an external market trend bias—and assign each a +1 (bullish), –1 (bearish), or 0 (neutral) vote.
Average the five votes to produce an overall sentiment score. If the average exceeds a positive threshold, label the bias as bullish; if it falls below a negative threshold, label it as bearish; otherwise label it neutral.
Update the on-screen bias table at regular intervals, showing each individual metric’s value and vote, as well as the combined sentiment label.
Apply color fills to highlight extreme zones in the background and draw horizontal guideline bands around those extremes.
In complex visual mode, draw a cloud-like band that instantly changes color when momentum shifts. In simple mode, plot only a clean line of the normalized reading in a contrasting color.
Expose alert triggers whenever a buy/sell signal, divergence confirmation, or bias flip occurs, for use in automated notifications.
Inputs
Here is how each input affects the indicator:
Trading Style (very conservative / conservative / neutral / aggressive / very aggressive)
Determines how sensitive the indicator is to extreme readings. Conservative settings require more pronounced market deviations before signaling a reversal; aggressive settings signal more frequently at smaller deviations.
Slope Detection Index (integer)
Controls how many bars back the indicator looks to compare momentum for inflection detection. Lower numbers respond more quickly but can be noisy; higher numbers smooth out short-term fluctuations.
Visual Mode (simple / complex)
Simple mode plots only the normalized momentum line, colored according to the chosen palette. Complex mode draws a candle-style block for each bar—showing the range of momentum movement within that bar—with colored fills that switch instantly when momentum direction changes.
Color Scheme (multiple themes)
Select from preset color palettes to style bullish vs. bearish elements (fills, lines, labels). Options include bright neon tones, classic contrasting pairs, dark-mode palettes, and more, ensuring signals stand out against any chart background.
Enable Background Highlighting (true / false)
When true, extreme overbought or oversold zones are shaded in a semi-transparent color behind the main pane. This helps traders “see” when the market is in a normalized extreme state without relying solely on lines or markers.
Show Helper Scale Lines (true / false)
When true, hidden horizontal lines force the vertical scale to include a fixed range of extreme values—even if the indicator rarely reaches them—so traders always know where the most extreme limits lie.
Enable Divergence Detection (true / false)
Toggles whether the script looks for divergences between price and the proprietary momentum reading. When enabled, bullish/bearish divergence markers appear automatically whenever defined conditions are met.
Pivot Lookback Left & Pivot Lookback Right (integers)
Define how many bars to the left and right the indicator examines when identifying a local peak or trough in the momentum reading. Adjust these to capture divergences on different swing lengths.
Minimum and Maximum Bars Between Pivots (integers)
Set the minimum and maximum number of bars allowed between two identified peaks or troughs for a valid divergence. This helps filter out insignificant or overly extended divergence patterns.
Show Bias Table (true / false)
When enabled, displays a small table in the upper-right corner summarizing five independent sentiment votes and the combined bias label. Disable to keep the pane focused on only the momentum series and signals.
Features
1. Extreme-zone highlighting
Overbought and oversold areas appear as colored backgrounds when the proprietary momentum reading crosses dynamically determined thresholds. This gives an immediate visual cue whenever the market moves into a highly extreme condition.
2. Discrete reversal markers
Whenever momentum shifts direction within an extreme zone, the indicator plots a concise “Buy” or “Sell” label directly on the normalized series. These signals combine both extreme-zone detection and inflection confirmation, reducing false triggers.
3. Dynamic divergence flags
Local peaks and troughs of the proprietary momentum reading are continuously compared to corresponding price points. Bullish divergence (momentum trough rising while price trough falls) and bearish divergence (momentum peak falling while price peak rises) are flagged with small labels and lines. These alerts help traders anticipate reversals before price charts show clear signals.
4. Multi-factor sentiment dashboard
Five independent “votes” are tallied each bar:
• Price bar bias (based on recent bar structure)
• Smoothed oscillator bias (based on a popular momentum oscillator)
• Range oscillator bias (based on an overbought/oversold oscillator)
• Traditional momentum crossover bias (whether momentum is above or below its own smoothing)
• External market trend bias (derived from a major currency index’s short-term trend)
Each vote is +1 (bullish), –1 (bearish), or 0 (neutral). The average of these votes produces an overall sentiment label (Bullish, Bearish, or Neutral). The table updates periodically, showing each metric’s value, its vote, and the combined bias.
5. Versatile visual modes
Simple mode: Plots a single normalized momentum line in a chosen color. Ideal for clean charts.
Complex mode: Renders each bar’s momentum range as a candle-like block, with filled bodies that immediately change color when momentum direction flips. Edge lines emphasize the high/low range of momentum for that bar. This mode makes subtle momentum shifts visually striking.
6. Configurable sensitivity profiles
Five risk profiles (very conservative → very aggressive) automatically adjust how extreme the momentum reading must be before signaling. Conservative traders can wait for only the most dramatic reversals, while aggressive traders can capture more frequent, smaller mean-reversion moves.
7. Customizable color palettes
Twenty distinct color themes let users match the indicator to any chart background. Each theme defines separate colors for bullish fills, bearish fills, the momentum series, and divergence labels. Options range from classic contrasting pairs to neon-style palettes to dark-mode complements.
8. Unified plotting interface
Instead of scattering multiple indicators in separate panes, Uptrick: Mean Reversion consolidates everything—normalized momentum, background shading, threshold bands, reversal labels, divergence flags, and bias table—into a single indicator pane. This reduces screen clutter and places all relevant information in one view.
9. Built-in alert triggers
Six alert conditions are exposed:
Mean reversion buy signal (momentum flips in oversold zone)
Mean reversion sell signal (momentum flips in overbought zone)
Bullish divergence confirmation
Bearish divergence confirmation
Bias flip to bullish (when combined sentiment shifts from non-bullish to bullish)
Bias flip to bearish (when combined sentiment shifts from non-bearish to bearish)
Traders can attach alerts to any of these conditions to receive real-time notifications.
10. Scale anchoring
By forcing invisible horizontal lines at fixed extreme levels, the indicator ensures that the vertical axis always includes those extremes—even if the normalized reading rarely reaches them. This constant frame of reference helps traders judge how significant current readings are.
Line features:
Conclusion
Uptrick: Mean Reversion offers a layered, all-in-one approach to spotting countertrend opportunities. By converting price movement into a proprietary normalized momentum scale, it highlights extreme overbought and oversold zones. Inflection detection within those extremes produces clear reversal markers. Embedded divergence logic calls out hidden momentum weaknesses. A five-factor sentiment dashboard helps gauge whether a reversal signal aligns with broader market context. Users can tailor sensitivity, visual presentation, and color schemes, making it equally suitable for minimalist or richly detailed chart layouts. Optimized for lower timeframes, Uptrick: Mean Reversion helps traders anticipate statistically significant mean reversion moves.
Disclaimer
This indicator is provided for informational purposes only. It does not guarantee any trading outcome. Trading carries inherent risks, including the potential loss of invested capital. Users should perform their own due diligence, apply proper risk management, and consult a financial professional if needed. Past performance does not ensure future results.
TitanGrid L/S SuperEngineTitanGrid L/S SuperEngine
Experimental Trend-Aligned Grid Signal Engine for Long & Short Execution
🔹 Overview
TitanGrid is an advanced, real-time signal engine built around a tactical grid structure.
It manages Long and Short trades using trend-aligned entries, layered scaling, and partial exits.
Unlike traditional strategy() -based scripts, TitanGrid runs as an indicator() , but includes its own full internal simulation engine.
This allows it to track capital, equity, PnL, risk exposure, and trade performance bar-by-bar — effectively simulating a custom backtest, while remaining compatible with real-time alert-based execution systems.
The concept was born from the fusion of two prior systems:
Assassin’s Grid (grid-based execution and structure) + Super 8 (trend-filtering, smart capital logic), both developed under the AssassinsGrid framework.
🔹 Disclaimer
This is an experimental tool intended for research, testing, and educational use.
It does not provide guaranteed outcomes and should not be interpreted as financial advice.
Use with demo or simulated accounts before considering live deployment.
🔹 Execution Logic
Trend direction is filtered through a custom SuperTrend engine. Once confirmed:
• Long entries trigger on pullbacks, exiting progressively as price moves up
• Short entries trigger on rallies, exiting as price declines
Grid levels are spaced by configurable percentage width, and entries scale dynamically.
🔹 Stop Loss Mechanism
TitanGrid uses a dual-layer stop system:
• A static stop per entry, placed at a fixed percentage distance matching the grid width
• A trend reversal exit that closes the entire position if price crosses the SuperTrend in the opposite direction
Stops are triggered once per cycle, ensuring predictable and capital-aware behavior.
🔹 Key Features
• Dual-side grid logic (Long-only, Short-only, or Both)
• SuperTrend filtering to enforce directional bias
• Adjustable grid spacing, scaling, and sizing
• Static and dynamic stop-loss logic
• Partial exits and reset conditions
• Webhook-ready alerts (browser-based automation compatible)
• Internal simulation of equity, PnL, fees, and liquidation levels
• Real-time dashboard for full transparency
🔹 Best Use Cases
TitanGrid performs best in structured or mean-reverting environments.
It is especially well-suited to assets with the behavioral profile of ETH — reactive, trend-intraday, and prone to clean pullback formations.
While adaptable to multiple timeframes, it shows strongest performance on the 15-minute chart , offering a balance of signal frequency and directional clarity.
🔹 License
Published under the Mozilla Public License 2.0 .
You are free to study, adapt, and extend this script.
🔹 Panel Reference
The real-time dashboard displays performance metrics, capital state, and position behavior:
• Asset Type – Automatically detects the instrument class (e.g., Crypto, Stock, Forex) from symbol metadata
• Equity – Total simulated capital: realized PnL + floating PnL + remaining cash
• Available Cash – Capital not currently allocated to any position
• Used Margin – Capital locked in open trades, based on position size and leverage
• Net Profit – Realized gain/loss after commissions and fees
• Raw Net Profit – Gross result before trading costs
• Floating PnL – Unrealized profit or loss from active positions
• ROI – Return on initial capital, including realized and floating PnL. Leverage directly impacts this metric, amplifying both gains and losses relative to account size.
• Long/Short Size & Avg Price – Open position sizes and volume-weighted average entry prices
• Leverage & Liquidation – Simulated effective leverage and projected liquidation level
• Hold – Best-performing hold side (Long or Short) over the session
• Hold Efficiency – Performance efficiency during holding phases, relative to capital used
• Profit Factor – Ratio of gross profits to gross losses (realized)
• Payoff Ratio – Average profit per win / average loss per loss
• Win Rate – Percent of profitable closes (including partial exits)
• Expectancy – Net average result per closed trade
• Max Drawdown – Largest recorded drop in equity during the session
• Commission Paid – Simulated trading costs: maker, taker, funding
• Long / Short Trades – Count of entry signals per side
• Time Trading – Number of bars spent in active positions
• Volume / Month – Extrapolated 30-day trading volume estimate
• Min Capital – Lowest equity level recorded during the session
🔹 Reference Ranges by Strategy Type
Use the following metrics as reference depending on the trading style:
Grid / Mean Reversion
• Profit Factor: 1.2 – 2.0
• Payoff Ratio: 0.5 – 1.2
• Win Rate: 50% – 70% (based on partial exits)
• Expectancy: 0.05% – 0.25%
• Drawdown: Moderate to high
• Commission Impact: High
Trend-Following
• Profit Factor: 1.5 – 3.0
• Payoff Ratio: 1.5 – 3.5
• Win Rate: 30% – 50%
• Expectancy: 0.3% – 1.0%
• Drawdown: Low to moderate
Scalping / High-Frequency
• Profit Factor: 1.1 – 1.6
• Payoff Ratio: 0.3 – 0.8
• Win Rate: 80% – 95%
• Expectancy: 0.01% – 0.05%
• Volume / Month: Very high
Breakout Strategies
• Profit Factor: 1.4 – 2.2
• Payoff Ratio: 1.2 – 2.0
• Win Rate: 35% – 60%
• Expectancy: 0.2% – 0.6%
• Drawdown: Can be sharp after failed breakouts
🔹 Note on Performance Simulation
TitanGrid includes internal accounting of fees, slippage, and funding costs.
While its logic is designed for precision and capital efficiency, performance is naturally affected by exchange commissions.
In frictionless environments (e.g., zero-fee simulation), its high-frequency logic could — in theory — extract substantial micro-edges from the market.
However, real-world conditions introduce limits, and all results should be interpreted accordingly.
EMA50 Z-Score IndicatorEMA50 Z-Score Indicator
The EMA50 Z-Score Indicator is a quantitative tool that standardizes the behavior of the 50-period Exponential Moving Average (EMA) using statistical normalization. It measures how far the current EMA50 deviates from its recent historical average in terms of standard deviations, offering a probabilistic lens into trend extension and potential reversion zones.
Purpose
Traditional moving averages provide directional trend data but lack statistical context. This indicator addresses that by applying a Z-Score transformation to the EMA50, which allows traders to assess whether the trend is overextended—either to the upside or downside—relative to its own recent history.
Methodology
The indicator calculates the Z-Score using the following formula:
Z = (EMA50 - SMA of EMA50) / Standard Deviation of EMA50
The Z-Score is computed over a user-defined lookback period (default: 100 periods), allowing it to adapt to various market conditions while preserving statistical validity.
Interpretation
Overbought Conditions: When the Z-Score exceeds a predefined positive threshold (e.g., +1.25 or +2.0), the EMA50 is statistically extended to the upside. This may indicate elevated trend momentum or exhaustion, depending on context.
Oversold Conditions: When the Z-Score falls below a predefined negative threshold (e.g., −1.25 or −2.0), the EMA50 is compressed relative to its norm, potentially signaling undervaluation or capitulation.
Neutral Conditions: A Z-Score near zero indicates that the EMA50 is near its historical average, suggesting the trend is behaving within expected bounds.
Dip Hunter | QuantumResearch🎯 Dip Hunter | QuantumResearch
Precision Buy-the-Dip Detector
A percentile-powered anomaly detector engineered to catch deep retracements in uptrends.
🔍 What Is It?
Dip Hunter is a minimalist yet sharp signal engine designed to identify statistically rare dips within longer-term uptrends. Rather than relying on subjective oversold conditions, this tool leverages percentile analysis and volatility-adjusted filters to highlight moments of strong downside deviation.
Built for swing traders and accumulators, it’s ideal for timing entries during retracements — especially in strong trending environments.
⚙️ How It Works
📊 Dual Criteria for Dip Signals:
Percentile Threshold – The current low must fall below the percentile of the past selected bars.
Volatility Deviation Filter – The close must fall beneath a dynamic lower boundary.
When both conditions align, a signal is printed — capturing only statistically significant drops.
🧪 Key Components
Percentile Analysis
Volatility Band Calculation
Dynamic Baseline
🔷 You can adjust the lookback windows and data sources for both the percentile and deviation filter for optimal tuning per asset.
Visual Features
Custom Color Modes: Choose from 8 unique color palettes
Triangle Signal Markers: Dip signals printed under price bars
Overlay-Ready: Clean plot design that won’t clutter your chart
💼 Ideal Use Cases
Accumulating into long-term uptrends
Detecting reversion zones in parabolic moves
Enhancing DCA entries during temporary panic dips
Confluence with moving average or trend filters
🔔 Alerts Built-In
✅ “Buy the Dip” alert fires as soon as a qualifying dip is detected — perfect for automation or mobile notifications.
📌 Notes
Best used on daily or 4H charts.
Dip ≠ guaranteed reversal — use confluence (trend filters, volume, macro view).
Customize the length to balance between sensitivity and selectivity.
⚠️ Disclaimer
Disclaimer: The content on this script is for informational and educational purposes only. Nothing contained within should be considered financial, investment, legal, or other professional advice. Past performance does not guarantee future results. Trading cryptocurrencies involves substantial risk of loss and is not suitable for every investor.
Stocks ATR V2 📘 Description — Stocks AT SL V2
“Stocks AT SL V2” is a risk management indicator designed to help traders define dynamic stop-loss levels based on actual market volatility and advanced statistical analysis of price movements.
⸻
🎯 Purpose
This tool provides a rational and adaptive framework for stop-loss placement, taking into account:
Market volatility, measured by the Average True Range (ATR),
And a statistical safety buffer, based on the 95th percentile of historical price retracements.
⸻
⚙️ Methodology
ATR Calculation:
The indicator uses a 14-period ATR to measure recent average volatility.
Safety Factor (k) Estimation:
The script computes a set of ratios between the candle’s minimal retracement (relative to the previous close) and the current ATR.
The 95th percentile of these ratios is extracted to define a multiplicative factor k, representing common price extremes.
Final Stop-Loss:
The stop-loss is set at a distance of k × ATR below (or above) the entry price.
This helps reduce false stop-outs while allowing room for natural market movement—even in volatile conditions.
⸻
✅ Benefits
Automatically adapts to volatility.
Reflects real candlestick structure (not just arbitrary distances).
Standardizes risk across different stocks or currency pairs.
Liquidation Heatmap ║ BullVision 🧠Overview
The Liquidation Heatmap ║ BullVision 💥 is a high-precision visualization tool engineered to highlight probable liquidation levels in crypto markets. It leverages multi-exchange Open Interest data, real-time volume dynamics, and structure-aware volatility signals to reveal where leveraged traders are most at risk of forced position closures.
📖 What Are Liquidations?
In leveraged derivatives markets, a liquidation occurs when a trader’s margin becomes insufficient to maintain their position, triggering an automatic force-close by the exchange. These events are typically clustered around price levels where large volumes of overleveraged positions accumulate. When breached, they often result in sharp, aggressive price movements — also known as liquidation cascades.
This indicator is designed to detect and project such high-risk zones before they trigger, giving traders an edge in visualizing hidden pressure points in the market.
🧠 How It Works
The core engine aggregates real-time ∆OI (Open Interest delta) data from multiple major exchanges and applies a layered filtering system that considers:
Relative Open Interest shifts, normalized against an adaptive moving average baseline
Volume acceleration patterns, compared to a rolling historical benchmark
Market structure context, identifying meaningful directional breaks and failed retests
Leverage-tier modeling, using probabilistic distance rules to simulate where liquidations from 5x to 100x positions would be triggered
Each qualifying liquidation level is rendered using dynamic gradient lines and optional glow-enhanced zone visuals. The display adapts in real time to structural confirmation, volatility regime, and liquidity depth.
Exemple of Liquidation cascades
Exemple of Liquidation rejection
🔍 Key Features
🔗 Multi-Exchange OI Aggregation: Binance, OKX, BitMEX, Kraken (toggleable)
📊 Leverage-Tier Mapping: 5x, 10x, 25x, 50x, 100x projections
🎨 Gradient Zones: Custom color ramps reflect level significance
🧱 Structure-Sensitive Filtering: Noise reduction via multi-condition confirmation logic
🧠 Contextual Directional Bias: Zones filtered based on recent bullish/bearish transitions
⚙️ Fully Customizable: User-defined intensity thresholds, color palette, and range filtering
🧩 Why It’s Worth Paying For
This is not a mashup of public indicators. The script introduces an original, multi-layered architecture combining real-time Open Interest dynamics, structural analysis, and custom liquidation modeling.
Unlike speculative support/resistance plots or volume-only heatmaps, this tool is built to:
Detect liquidation zones before they cascade
React dynamically to market shifts
Filter noise through structural confirmation
Retain historical zones for visual learning and backtesting
✅ Compliance & Originality
This script was developed entirely in-house with original detection logic. No reused open-source components are included. Data requests are made through TradingView’s native .P_OI feeds, and all calculations, signal conditions, and visual logic were coded from scratch for this script.
⚠️ Risk Disclaimer & Access Policy
This script is a visual risk-awareness tool, not a signal generator or financial advice mechanism. No guarantee is made regarding future price action, liquidation triggers, or trading performance.
Use at your own discretion, with proper position sizing, risk management, and awareness of the market's inherent uncertainty.
🔒 Why This Script Is Invite-Only and Closed-Source
To protect its proprietary detection engine, this script is both closed-source and invite-only. The algorithm uses original methods to:
Aggregate real-time Open Interest delta across exchanges
Simulate leverage-based liquidation zones
Dynamically filter zones using structure and volatility layers
Opening the source would expose core detection logic to copycats or misuse. Likewise, access is limited to ensure the tool is used responsibly by serious traders and not distributed or repackaged unethically.
This model preserves the script’s quality, originality, and intended value.
Candle Range % vs 8-Candle AvgCandle % Indicator – Measure Candle Strength by Range %
**Overview:**
The *Candle % Indicator* helps traders visually and analytically gauge the strength or significance of a price candle relative to its recent historical context. This is particularly useful for detecting breakout moves, volatility shifts, or overextended candles that may signal exhaustion.
**What It Does:**
* Calculates the **percentage range** of the current candle compared to the **average range of the past N candles**.
* Highlights candles that exceed a user-defined threshold (e.g., 150% of the average range).
* Useful for **filtering out extreme candles** that might represent anomalies or unsustainable moves.
* Can be combined with other strategies (like EMA crossovers, support/resistance breaks, etc.) to improve signal quality.
**Use Case Examples:**
***Filter out fakeouts** in breakout strategies by ignoring candles that are overly large and may revert.
***Volatility control**: Avoid entries when market conditions are erratic.
**Confluence**: Combine with EMA or RSI signals for refined entries.
**How to Read:**
* If a candle is larger than the average range by more than the set percentage (default 150%), it's flagged (e.g., no entry signal or optional visual marker).
* Ideal for intraday, swing, or algorithmic trading setups.
**Customizable Inputs:**
**Lookback Period**: Number of previous candles to calculate the average range.
**% Threshold**: Maximum percentage a candle can exceed the average before being filtered or marked.
ALEX - ATR Extensions + ADR + TableALEX - ATR Extensions + ADR + Table
Overview
The ALEX ATR Extensions indicator is a comprehensive volatility and momentum analysis tool that combines Average True Range (ATR), Average Daily Range (ADR), and moving average distance calculations in a single, customizable display. This indicator helps traders assess current price action relative to historical volatility and key moving averages, providing crucial context for risk management and trade planning.
Key Features
Multi-Metric Analysis
- ATR Percentage: Current ATR as a percentage of price for volatility assessment
- ADR Percentage: Average Daily Range as a percentage for typical daily movement
- Low of Day Distance: Distance from current price to daily low
- Moving Average Distance: ATR-normalized distance from 21 and 50 period moving averages
Flexible Moving Average Options
- Configurable MA Types: Choose between EMA or SMA for both 21 and 50 period averages
- Customizable Periods: Adjust moving average lengths to suit your trading style
- Daily Timeframe Data: Uses daily moving averages regardless of chart timeframe
ATR Extension Levels
- Dynamic Price Targets: Calculate extension levels based on ATR multiples from moving averages
- Visual Reference Lines: Optional overlay lines showing ATR extension targets
- Customizable Multipliers: Adjust ATR multipliers for different risk/reward scenarios
Smart Visual Alerts
- Color-Coded Distance Metrics: Automatic color changes based on distance thresholds
- Symbol Plotting: Customizable chart symbols when distance thresholds are exceeded
- Threshold-Based Alerts: Visual cues when price reaches significant ATR distances
Comprehensive Data Table
- Real-Time Metrics: Live updating table with all key measurements
- Customizable Display: Toggle individual metrics on/off based on preference
- Professional Styling: Adjustable colors, fonts, and transparency
How to Use
Volatility Assessment
- High ATR%: Indicates elevated volatility, larger position sizing considerations
- Low ATR%: Suggests compressed volatility, potential for expansion
- ADR% Comparison: Compare current day's range to historical average
Moving Average Analysis
- ATR Distance 21/50: Normalized distance showing how extended price is from key levels
- Positive Values: Price above moving average (bullish positioning)
- Negative Values: Price below moving average (bearish positioning)
- Color Changes: Automatic alerts when reaching threshold levels
Extension Target Planning
- ATR Extension Lines: Visual price targets based on volatility-adjusted projections
- Risk/Reward Planning: Use extension levels for profit target placement
- Breakout Confirmation: Extension levels can confirm breakout validity
Symbol Alert System
- Chart Symbols: Automatic plotting when distance thresholds are breached
- Customizable Triggers: Set your own threshold levels for alerts
- Visual Scanning: Quick identification of extended conditions across multiple charts
Settings
Display Controls
- Show ADR%: Toggle average daily range percentage display
- Show ATR%: Toggle average true range percentage display
- Show LoD Distance: Toggle low of day distance calculation
- Show LoD Price: Toggle actual low of day price display
- Show ATR Distance from 21/50 DMA: Toggle moving average distance metrics
- Show 21/50 DMA Price: Toggle actual moving average price display
- Show ATR Extension Levels: Toggle extension target display in table
Moving Average Configuration
- 21/50 DMA Type: Choose between EMA or SMA calculation methods
- 21/50 DMA Period: Customize moving average lengths
- ADR/ATR Length: Adjust calculation periods for range measurements
Color Thresholds
- Threshold Levels: Set distance levels for color changes (default 2.0 and 5.0)
- Custom Colors: Choose colors for different threshold breaches
- Separate 21/50 Settings: Independent color schemes for each moving average
Symbol Settings
- Show Char Symbol: Toggle symbol plotting for each moving average
- Custom Symbols: Choose any character for chart plotting
- Symbol Colors: Customize colors for visual distinction
- Threshold Levels: Set trigger points for symbol appearance
ATR Extension Lines
- Show Extension Lines: Toggle visual extension level lines
- ATR Multipliers: Customize extension distance (default 2.0x)
- Line Colors: Choose colors for extension level visualization
Table Customization
- Background Color: Adjust table transparency and color
- Text Color: Customize default text appearance
- Font Size: Choose from tiny to huge font options
Advanced Applications
Trend Strength Analysis
- Large ATR distances suggest strong trending moves
- Small ATR distances indicate potential consolidation or reversal zones
- Compare current readings to recent historical ranges
Risk Management
- Use ATR% for position sizing calculations
- Extension levels provide natural profit target zones
- Distance metrics help identify overextended conditions
Multi-Timeframe Context
- Apply to different timeframes for comprehensive analysis
- Daily data provides consistency across all chart intervals
- Combine with weekly/monthly analysis for broader context
Market Regime Identification
- High volatility periods: Increased ATR% readings
- Low volatility periods: Compressed ATR% readings
- Trending markets: Sustained high distance readings
- Consolidating markets: Low distance readings with frequent color changes
Best Practices
Volatility-Adjusted Trading
- Increase position sizes during low volatility periods
- Reduce position sizes during high volatility periods
- Use ATR% for stop-loss placement relative to normal market movement
Extension Level Usage
- Primary targets: 1.5-2.0x ATR extensions
- Secondary targets: 2.5-3.0x ATR extensions
- Avoid chasing prices beyond 3x ATR extensions
Threshold Optimization
- Backtest different threshold levels for your trading style
- Consider market conditions when setting alert levels
- Adjust thresholds based on instrument volatility characteristics
Integration Strategies
- Combine with momentum indicators for confirmation
- Use alongside support/resistance levels
- Incorporate into systematic trading approaches
Technical Specifications
- Compatible with Pine Script v6
- Uses daily timeframe data for consistency
- Optimized for real-time performance
- Works on all chart types and timeframes
- Supports all tradeable instruments
Ideal For
- Swing traders using daily charts
- Position traders seeking volatility context
- Day traders needing intraday reference levels
- Risk managers requiring volatility metrics
- Systematic traders building rule-based strategies
Disclaimer
This indicator is for educational and informational purposes only. It should not be used as the sole basis for trading decisions. Always combine with other forms of analysis, proper risk management techniques, and consider your individual trading plan and risk tolerance. Past performance does not guarantee future results.
Compatible with Pine Script v6 | Optimized for daily timeframe analysis | Works across all markets and instruments
21DMA Structure Counter (EMA/SMA Option)21DMA Structure Counter (EMA/SMA Option)
Overview
The 21DMA Structure Counter is an advanced technical indicator that tracks consecutive periods where price action remains above a 21-period moving average structure. This indicator helps traders identify momentum phases and potential trend exhaustion points using statistical analysis.
Key Features
Moving Average Structure
- Configurable MA Type: Choose between EMA (Exponential Moving Average) or SMA (Simple Moving Average)
- 21-Period Default: Optimized for the widely-watched 21-period moving average
- Triple MA Structure: Tracks high, close, and low moving averages for comprehensive analysis
Statistical Analysis
- Cycle Counting: Automatically counts consecutive periods above the MA structure
- Historical Data: Maintains up to 2,500 historical cycles (approximately 10 years of daily data)
- Z-Score Calculation: Provides statistical context using mean and standard deviation
- Multiple Standard Deviation Levels: Displays +1, +2, and +3 standard deviation thresholds
Visual Indicators
Color-Coded Bars:
- Gray: Below 10-year average
- Yellow: Between average and +1 standard deviation
- Orange: Between +1 and +2 standard deviations
- Red: Between +2 and +3 standard deviations
- Fuchsia: Above +3 standard deviations (extreme readings)
Breadth Integration
- Multiple Breadth Options: NDFI, NDTH, NDTW (NASDAQ breadth indicators), or VIX
- Background Shading: Visual alerts when breadth reaches extreme levels
- High/Low Thresholds: Customizable levels for breadth analysis
- Real-time Display: Current breadth value shown in data table
Smart Reset Logic
- High Below Structure Reset: Automatically resets count when daily high falls below the lowest MA
- Flexible Hold Period: Continues counting during temporary weakness as long as structure isn't violated
- Precise Entry/Exit: Strict criteria for starting cycles, flexible for maintaining them
How to Use
Trend Identification
- Rising Counts: Indicate sustained momentum above key moving average structure
- Extreme Readings: Z-scores above +2 or +3 suggest potential trend exhaustion
- Historical Context: Compare current cycles to 10-year statistical averages
Risk Management
- Breadth Confirmation: Use breadth shading to confirm market-wide strength/weakness
- Statistical Extremes: Exercise caution when readings reach +3 standard deviations
- Reset Signals: Pay attention to structure violations for potential trend changes
Multi-Timeframe Application
- Daily Charts: Primary timeframe for swing trading and position management
- Weekly/Monthly: Longer-term trend analysis
- Intraday: Shorter-term momentum assessment (adjust MA period accordingly)
Settings
Moving Average Options
- Type: EMA or SMA selection
- Period: Default 21 (customizable)
- Reset Days: Days below structure required for reset
Visual Customization
- Standard Deviation Lines: Toggle and customize colors for +1, +2, +3 SD
- Breadth Selection: Choose from NDFI, NDTH, NDTW, or VIX
- Threshold Levels: Set custom high/low breadth thresholds
- Table Styling: Customize text colors, background, and font size
Technical Notes
- Data Retention: Maintains 2,500 historical cycles for robust statistical analysis
- Real-time Updates: Calculations update with each new bar
- Breadth Integration: Uses security() function to pull external breadth data
- Performance Optimized: Efficient array management prevents memory issues
Best Practices
1. Combine with Price Action: Use alongside support/resistance and chart patterns
2. Monitor Breadth Divergences: Watch for breadth weakness during strong readings
3. Respect Statistical Extremes: Exercise caution at +2/+3 standard deviation levels
4. Context Matters: Consider overall market environment and sector rotation
5. Risk Management: Use appropriate position sizing, especially at extreme readings
Disclaimer
This indicator is for educational and informational purposes only. It should not be used as the sole basis for trading decisions. Always combine with other forms of analysis and proper risk management techniques.
Compatible with Pine Script v6 | Optimized for daily timeframes | Best used on major indices and liquid stocks
Pair TradingPAIR TRADING
Description:
This indicator is a simple and intuitive tool for rotating between two assets based on their relative price ratio. By comparing the prices of Asset A and Asset B, it plots a “ratio line” (gray) with dynamic upper and lower boundaries (red and blue).
When the ratio reaches the red line, Asset A is expensive → rotate out of A and into B.
When the ratio touches the blue line, Asset A is cheap → rotate back into A.
The chart also shows:
🔹 Background highlights for visual cues
🔹 “Rotate to A” or “Rotate to B” markers for easy decisions
🔹 A live summary table with mean ratio, upper/lower boundaries, and current ratio
How to Use:
Select Asset A and Asset B in the settings.
Adjust the Lookback Period and Threshold if needed.
Watch the gray ratio line as it moves:
Above red line? → Consider rotating into B
Below blue line? → Consider rotating into A
Use the background color changes and rotation labels to spot clear rotation opportunities!
Why Pair Trading?
Pair trading is a powerful way to manage a portfolio because it neutralizes market direction risk and focuses on relative value.
By rotating between correlated assets, you can:
Smooth out returns
Avoid holding a weak asset too long
Capture reversion when assets diverge too far
This approach can enhance risk-adjusted returns and help keep your portfolio balanced and nimble!
How to Pick Pairs:
Choose assets with strong correlation or similar drivers.
Look for common trends (sector, macro).
Start with assets you know best (high-conviction ideas).
Make sure both have good liquidity for reliable trading!
TO HELP FIND CORRELATED ASSETS:
Use the Correlation Coefficient indicator in TradingView:
Click Indicators
Search for “Correlation Coefficient”
Add it to your chart
Input the symbol of the second asset (e.g., if you’re on MSTR, input TSLA).
This plots the rolling correlation coefficient — super helpful!
Pair trading can turn big swings into steady rotations and help you stay active even when the market is choppy. It’s a simple, practical approach to keep your portfolio balanced.
Linear Regression Channel Pro# Linear Regression Channel Pro - Script Description
## English Description
### What it does
The **Linear Regression Channel Pro** is a technical analysis indicator that creates a statistical channel around price movements using linear regression mathematics. The script calculates the best-fit line through a specified number of price bars and then adds parallel boundaries based on standard deviation calculations.
### Key Features
- **Main Regression Line**: Shows the statistical trend direction of the price over the selected period
- **Channel Boundaries**: Upper and lower bands that contain most price movements (typically 95% when using 2.0 multiplier)
- **Inner Boundaries**: Additional reference lines for more precise analysis
- **Future Projection**: Extends all lines into the future to show potential price paths
- **Customizable Parameters**: Adjustable period length, deviation multipliers, and projection distance
### How it works
1. **Data Collection**: Gathers price data over the specified regression length (default 400 bars)
2. **Linear Regression**: Calculates the mathematical best-fit line through the price data
3. **Standard Deviation**: Measures how much prices deviate from the regression line
4. **Channel Creation**: Creates parallel lines above and below the regression line
5. **Future Projection**: Extends the channel into the future using the same slope
### Statistical Foundation and Band Settings
**The 68-95-99.7 Rule**
The indicator is based on the statistical principle that in a normal distribution:
- **1 Standard Deviation (σ)**: Contains approximately **68%** of price movements
- **2 Standard Deviations (σ)**: Contains approximately **95%** of price movements
- **3 Standard Deviations (σ)**: Contains approximately **99.7%** of price movements
**Outer Bands (Default 2.0 Multiplier)**
- **Coverage**: Approximately **95%** of price movements
- **Meaning**: Only 5% of price action should exceed these bands
- **Usage**: Identification of extreme overbought/oversold conditions
- **Signal**: Touching outer bands often indicates potential reversal points
**Inner Bands (Default 1.0 Multiplier)**
- **Coverage**: Approximately **68%** of price movements
- **Meaning**: 32% of movements can normally exceed these bands
- **Usage**: Identification of significant but not extreme price moves
- **Signal**: Breaking inner bands suggests meaningful directional movement
### Recommended Settings by Market Type
**Standard Configuration**
```
- Outer Bands: 2.0 (95% coverage)
- Inner Bands: 1.0 (68% coverage)
```
**High Volatility Markets (Crypto, Emerging Markets)**
```
- Outer Bands: 2.5-3.0 (99%+ coverage)
- Inner Bands: 1.5 (85% coverage)
```
**Low Volatility Markets (Major Forex, Blue Chip Stocks)**
```
- Outer Bands: 1.5 (86% coverage)
- Inner Bands: 0.5 (38% coverage)
```
### Trading Applications
**Trend Analysis**
- The slope of the regression line indicates the overall trend direction
- Steep slopes suggest strong trends, flat slopes suggest consolidation
- Price above center line = bullish bias, below = bearish bias
**Support and Resistance Levels**
- **Inner bands**: Act as first level support/resistance (68% probability)
- **Outer bands**: Act as strong support/resistance (95% probability)
- **Dynamic levels**: Bands adjust automatically to market conditions
**Entry and Exit Strategies**
*Using Inner Bands (1.0σ):*
- **Breakout signals**: Price breaking through inner bands with volume confirms direction
- **Pullback entries**: Price returning to inner band after breakout offers entry opportunity
- **Range trading**: Price oscillating between inner bands suggests consolidation
*Using Outer Bands (2.0σ):*
- **Reversal signals**: Price touching outer bands often indicates exhaustion
- **Extreme conditions**: Only 5% of movements reach these levels
- **Profit taking**: Consider closing positions when price reaches outer bands
**Risk Management Applications**
- **Stop Loss Placement**: Use opposite band as stop level (high probability of not being hit randomly)
- **Position Sizing**: Wider channels = higher volatility = smaller position sizes
- **Risk/Reward**: Measure potential moves using band distances
**Future Planning with Projections**
- **Target Setting**: Orange projection lines show potential future support/resistance
- **Trade Duration**: Plan holding periods based on projected channel direction
- **Market Timing**: Anticipate when price might reach significant levels
### Practical Trading Examples
**Bullish Trend Scenario**
1. Price consistently above center line (trend confirmed)
2. Bounces from inner lower band = re-entry opportunity
3. Reaching outer upper band = consider profit taking
4. Break above outer upper band = potential trend acceleration
**Range-Bound Market**
1. Price oscillates between inner bands = range trading mode
2. Sell near inner upper band, buy near inner lower band
3. Breakout from outer bands = range breakout signal
**Bearish Trend Scenario**
1. Price consistently below center line (downtrend confirmed)
2. Bounces from inner upper band = short entry opportunity
3. Reaching outer lower band = potential oversold bounce
4. Break below outer lower band = trend continuation likely
### Best Practices and Tips
- **Timeframe Selection**: Use higher timeframes (4H, Daily) for more reliable statistical significance
- **Confirmation**: Combine with volume analysis and other indicators
- **Market Adaptation**: Adjust multipliers based on asset volatility characteristics
- **Regression Length**: Shorter periods (100-200) for reactive signals, longer (400-800) for stable trends
- **False Breakouts**: Wait for close beyond bands rather than just touching
- **Volume Confirmation**: Higher volume on band breakouts increases signal reliability
---
## Descrizione Italiana
### Cosa fa
Il **Linear Regression Channel Pro** è un indicatore di analisi tecnica che crea un canale statistico intorno ai movimenti di prezzo utilizzando la matematica della regressione lineare. Lo script calcola la linea di miglior adattamento attraverso un numero specificato di barre di prezzo e aggiunge quindi confini paralleli basati sui calcoli della deviazione standard.
### Caratteristiche Principali
- **Linea di Regressione Principale**: Mostra la direzione statistica del trend del prezzo nel periodo selezionato
- **Confini del Canale**: Bande superiori e inferiori che contengono la maggior parte dei movimenti di prezzo (tipicamente il 95% usando il moltiplicatore 2.0)
- **Confini Interni**: Linee di riferimento aggiuntive per un'analisi più precisa
- **Proiezione Futura**: Estende tutte le linee nel futuro per mostrare potenziali percorsi di prezzo
- **Parametri Personalizzabili**: Lunghezza del periodo, moltiplicatori di deviazione e distanza di proiezione regolabili
### Come Funziona
1. **Raccolta Dati**: Raccoglie i dati di prezzo per la lunghezza di regressione specificata (default 400 barre)
2. **Regressione Lineare**: Calcola matematicamente la linea di miglior adattamento attraverso i dati di prezzo
3. **Deviazione Standard**: Misura quanto i prezzi si discostano dalla linea di regressione
4. **Creazione del Canale**: Crea linee parallele sopra e sotto la linea di regressione
5. **Proiezione Futura**: Estende il canale nel futuro usando la stessa pendenza
### Fondamenti Statistici e Impostazione delle Bande
**La Regola 68-95-99.7**
L'indicatore si basa sul principio statistico che in una distribuzione normale:
- **1 Deviazione Standard (σ)**: Contiene circa il **68%** dei movimenti di prezzo
- **2 Deviazioni Standard (σ)**: Contiene circa il **95%** dei movimenti di prezzo
- **3 Deviazioni Standard (σ)**: Contiene circa il **99.7%** dei movimenti di prezzo
**Bande Esterne (Moltiplicatore Default 2.0)**
- **Copertura**: Circa il **95%** dei movimenti di prezzo
- **Significato**: Solo il 5% dell'azione di prezzo dovrebbe superare queste bande
- **Utilizzo**: Identificazione di condizioni estreme di ipercomprato/ipervenduto
- **Segnale**: Il tocco delle bande esterne spesso indica potenziali punti di inversione
**Bande Interne (Moltiplicatore Default 1.0)**
- **Copertura**: Circa il **68%** dei movimenti di prezzo
- **Significato**: Il 32% dei movimenti può normalmente superare queste bande
- **Utilizzo**: Identificazione di movimenti di prezzo significativi ma non estremi
- **Segnale**: La rottura delle bande interne suggerisce un movimento direzionale significativo
### Impostazioni Raccomandate per Tipo di Mercato
**Configurazione Standard**
```
- Bande Esterne: 2.0 (copertura 95%)
- Bande Interne: 1.0 (copertura 68%)
```
**Mercati ad Alta Volatilità (Crypto, Mercati Emergenti)**
```
- Bande Esterne: 2.5-3.0 (copertura 99%+)
- Bande Interne: 1.5 (copertura 85%)
```
**Mercati a Bassa Volatilità (Forex Maggiori, Azioni Blue Chip)**
```
- Bande Esterne: 1.5 (copertura 86%)
- Bande Interne: 0.5 (copertura 38%)
```
### Applicazioni nel Trading
**Analisi del Trend**
- La pendenza della linea di regressione indica la direzione generale del trend
- Pendenze ripide suggeriscono trend forti, pendenze piatte suggeriscono consolidamento
- Prezzo sopra la linea centrale = bias rialzista, sotto = bias ribassista
**Livelli di Supporto e Resistenza**
- **Bande interne**: Agiscono come supporto/resistenza di primo livello (probabilità 68%)
- **Bande esterne**: Agiscono come supporto/resistenza forte (probabilità 95%)
- **Livelli dinamici**: Le bande si adattano automaticamente alle condizioni di mercato
**Strategie di Entrata e Uscita**
*Usando le Bande Interne (1.0σ):*
- **Segnali di breakout**: Il prezzo che rompe le bande interne con volume conferma la direzione
- **Entrate su pullback**: Il prezzo che ritorna alla banda interna dopo un breakout offre opportunità di entrata
- **Range trading**: Il prezzo che oscilla tra bande interne suggerisce consolidamento
*Usando le Bande Esterne (2.0σ):*
- **Segnali di inversione**: Il prezzo che tocca le bande esterne spesso indica esaurimento
- **Condizioni estreme**: Solo il 5% dei movimenti raggiunge questi livelli
- **Presa di profitto**: Considera di chiudere posizioni quando il prezzo raggiunge le bande esterne
**Applicazioni di Gestione del Rischio**
- **Posizionamento Stop Loss**: Usa la banda opposta come livello di stop (alta probabilità di non essere colpito casualmente)
- **Dimensionamento Posizioni**: Canali più larghi = volatilità maggiore = posizioni più piccole
- **Rischio/Rendimento**: Misura i movimenti potenziali usando le distanze delle bande
**Pianificazione Futura con Proiezioni**
- **Impostazione Target**: Le linee di proiezione arancioni mostrano potenziali supporti/resistenze futuri
- **Durata del Trade**: Pianifica i periodi di detenzione basandoti sulla direzione del canale proiettato
- **Timing di Mercato**: Anticipa quando il prezzo potrebbe raggiungere livelli significativi
### Esempi Pratici di Trading
**Scenario Trend Rialzista**
1. Prezzo costantemente sopra la linea centrale (trend confermato)
2. Rimbalzi dalla banda interna inferiore = opportunità di re-entrata
3. Raggiungimento banda esterna superiore = considera presa di profitto
4. Rottura sopra banda esterna superiore = potenziale accelerazione del trend
**Mercato in Range**
1. Prezzo oscilla tra bande interne = modalità range trading
2. Vendi vicino alla banda interna superiore, compra vicino a quella inferiore
3. Breakout dalle bande esterne = segnale di rottura del range
**Scenario Trend Ribassista**
1. Prezzo costantemente sotto la linea centrale (downtrend confermato)
2. Rimbalzi dalla banda interna superiore = opportunità di short
3. Raggiungimento banda esterna inferiore = potenziale rimbalzo da ipervenduto
4. Rottura sotto banda esterna inferiore = probabile continuazione del trend
### Migliori Pratiche e Consigli
- **Selezione Timeframe**: Usa timeframe più alti (4H, Giornaliero) per maggiore significatività statistica
- **Conferma**: Combina con analisi del volume e altri indicatori
- **Adattamento al Mercato**: Regola i moltiplicatori in base alle caratteristiche di volatilità dell'asset
- **Lunghezza Regressione**: Periodi più corti (100-200) per segnali reattivi, più lunghi (400-800) per trend stabili
- **Falsi Breakout**: Aspetta la chiusura oltre le bande piuttosto che solo il tocco
- **Conferma del Volume**: Volume più alto sui breakout delle bande aumenta l'affidabilità del segnale
Stop Hunt Indicator ║ BullVision 🧠 Overview
The Stop Hunt Indicator (SmartTrap Radar) is an original tool designed to identify potential liquidity traps caused by institutional stop hunts. It visually maps out historically significant levels where price has repeatedly reversed or rejected — and dynamically detects real-time sweep patterns based on volume, structure, and candle rejection behavior.
This script does not repurpose existing public indicators, nor does it use default TradingView built-ins such as RSI, MACD, or MAs. Its core logic is fully proprietary and was developed from scratch to support discretionary and data-driven traders in visualizing volatility risks and manipulation zones.
🔍 What the Indicator Does
This indicator identifies and visualizes potential stop hunt zones using:
Historical structure analysis: Swing highs/lows are identified via a configurable lookback period.
Liquidity level tracking: Once detected, levels are monitored for touches, age, and volume strength.
Proprietary scoring model: Each level receives a real-time significance score based on:
Age (how long the level has held)
Number of rejections (touches)
Relative volume strength
Proximity to current price
The glow intensity of plotted levels is dynamically mapped based on this score. Bright glow = higher institutional interest probability.
⚙️ Stop Hunt Detection Logic
A stop hunt is flagged when all of the following are met:
Price sweeps through a high/low beyond a user-defined penetration threshold
Wick rejection occurs (i.e., candle closes back inside the level)
Volume spikes above the average in a recent window
The script automatically:
Detects bullish stop hunts (below support) and bearish ones (above resistance)
Marks detected sweeps on-chart with optional 🔰/🚨 signals
Adjusts glow visuals based on score even after the sweep occurs
These sweeps often precede local reversals or high-volatility zones — this is not predictive, but rather a reactive mapping of market manipulation behavior.
📌 Why This Is Not Just Another Liquidity Tool
Unlike typical liquidity heatmaps or S/R indicators, this script includes:
A proprietary significance score instead of fixed rules
Multi-layer glow rendering to reflect level importance visually
Real-time scoring updates as new volume and touches occur
Combined volume × rejection × structure logic to validate stop hunts
Fully customizable detection logic (lookback, wick %, volume filters, max bars, etc.)
This indicator provides a specialized view focused solely on visualizing trap setups — not generic trend signals.
🧪 Usage Recommendations
To get started:
Add the indicator to your chart (volume-enabled instruments only)
Customize detection:
Lookback Period for structure
Penetration % for how far price must sweep
Volume Spike Multiplier
Wick rejection strength
Enable/disable features:
Glow effects
Hunt markers
Score labels
Volume highlights
Watch for:
🔰 Bullish Sweeps (below support)
🚨 Bearish Sweeps (above resistance)
Bright glowing zones = high-liquidity targets
This tool can be used for both confluence and risk assessment, especially around high-impact sessions, liquidation events, or range extremes.
📊 Volume Dependency Notice
⚠️ This indicator requires real volume data to function correctly. On instruments without volume (e.g., synthetic pairs), certain features like spike detection and scoring will be disabled or inaccurate.
🔐 Closed-Source Disclosure
This script is published as invite-only to protect its proprietary scoring, glow mapping, and detection logic. While the full implementation remains confidential, this description outlines all key mechanics and configurable logic for user transparency.
P&L Entry Zone Marker (clean)This indicator is a simple visual calculator for futures traders.
It helps you track your long and short entry zones based on position size and average price.
🔹 Green line – recalculated long entry after averaging down.
🔹 Red line – short entry point.
You can manually input your initial entry, volume, averaging volume, and averaging price.
The script calculates your new average entry for long positions and plots both lines as full horizontal levels across the chart.
✳️ Useful for:
Visualizing break-even zones
Planning P&L zones for hedged positions
Quickly aligning your trades with market structure
✅ Clean version — no labels, just lines.
📉 Works on all symbols and timeframes.
Yearly Performance Table with CAGROverview
This Pine Script indicator provides a clear table displaying the annual performance of an asset, along with two different average metrics: the arithmetic mean and the geometric mean (CAGR).
Core Features
Annual Performance Calculation:
Automatically detects the first trading day of each calendar year.
Calculates the percentage return for each full calendar year.
Based on closing prices from the first to the last trading day of the respective year.
Flexible Display:
Adjustable Period: Displays data for 1-50 years (default: 10 years).
Daily Timeframe Only: Functions exclusively on daily charts.
Automatic Update: Always shows the latest available years.
Two Average Metrics:
AVG (Arithmetic Mean)
A simple average of all annual returns. (Formula: (R₁ + R₂ + ... + Rₙ) ÷ n)
Important: Can be misleading in the presence of volatile returns.
GEO (Geometric Mean / CAGR)
Compound Annual Growth Rate. (Formula: ^(1/n) - 1)
Represents the true average annual growth rate.
Fully accounts for the compounding effect.
Limitations
Daily Charts Only: Does not work on intraday or weekly/monthly timeframes.
Calendar Year Basis: Calculations are based on calendar years, not rolling 12-month periods.
Historical Data: Dependent on the availability of historical data from the broker/data provider.
Interpretation of Results
CAGR as Benchmark: The geometric mean is more suitable for performance comparisons.
Annual Patterns: Individual year figures can reveal seasonal or cyclical trends.
Simple Position CalculatorThis indicator provides a real-time position sizing calculator designed for fast momentum trading. It instantly calculates optimal trade size based on your risk parameters, entry/exit prices, and exchange conditions (fees/slippage). Perfect for high-speed entries during candle closes and breakouts.
Bilateral Filter For Loop [BackQuant]Bilateral Filter For Loop
The Bilateral Filter For Loop is an advanced technical indicator designed to filter out market noise and smooth out price data, thus improving the identification of underlying market trends. It employs a bilateral filter, which is a sophisticated non-linear filter commonly used in image processing and price time series analysis. By considering both spatial and range differences between price points, this filter is highly effective at preserving significant trends while reducing random fluctuations, ultimately making it suitable for dynamic trend-following strategies.
Please take the time to read the following:
Key Features
1. Bilateral Filter Calculation:
The bilateral filter is the core of this indicator and works by applying a weight to each data point based on two factors: spatial distance and price range difference. This dual weighting process allows the filter to preserve important price movements while reducing the impact of less relevant fluctuations. The filter uses two primary parameters:
Spatial Sigma (σ_d): This parameter adjusts the weight applied based on the distance of each price point from the current price. A larger spatial sigma means more smoothing, as further away values will contribute more heavily to the result.
Range Sigma (σ_r): This parameter controls how much weight is applied based on the difference in price values. Larger price differences result in smaller weights, while similar price values result in larger weights, thereby preserving the trend while filtering out noise.
The output of this filter is a smoothed version of the original price series, which eliminates short-term fluctuations, helping traders focus on longer-term trends. The bilateral filter is applied over a rolling window, adjusting the level of smoothing dynamically based on both the distance between values and their relative price movements.
2. For Loop Calculation for Trend Scoring:
A for-loop is used to calculate the trend score based on the filtered price data. The loop compares the current value to previous values within the specified window, scoring the trend as follows:
+1 for upward movement (when the filtered value is greater than the previous value).
-1 for downward movement (when the filtered value is less than the previous value).
The cumulative result of this loop gives a continuous trend score, which serves as a directional indicator for the market's momentum. By summing the scores over the window period, the loop provides an aggregate value that reflects the overall trend strength. This score helps determine whether the market is experiencing a strong uptrend, downtrend, or sideways movement.
3. Long and Short Conditions:
Once the trend score has been calculated, it is compared against predefined threshold levels:
A long signal is generated when the trend score exceeds the upper threshold, indicating that the market is in a strong uptrend.
A short signal is generated when the trend score crosses below the lower threshold, signaling a potential downtrend or trend reversal.
These conditions provide clear signals for potential entry points, and the color-coding helps traders quickly identify market direction:
Long signals are displayed in green.
Short signals are displayed in red.
These signals are designed to provide high-confidence entries for trend-following strategies, helping traders capture profitable movements in the market.
4. Trend Background and Bar Coloring:
The script offers customizable visual settings to enhance the clarity of the trend signals. Traders can choose to:
Color the bars based on the trend direction: Bars are colored green for long signals and red for short signals.
Change the background color to provide additional context: The background will be shaded green for a bullish trend and red for a bearish trend. This visual feedback helps traders to stay aligned with the prevailing market sentiment.
These features offer a quick visual reference for understanding the market's direction, making it easier for traders to identify when to enter or exit positions.
5. Threshold Lines for Visual Feedback:
Threshold lines are plotted on the chart to represent the predefined long and short levels. These lines act as clear markers for when the market reaches a critical threshold, triggering a potential buy (long) or sell (short) signal. By showing these threshold lines on the chart, traders can quickly gauge the strength of the market and assess whether the trend is strong enough to warrant action.
These thresholds can be adjusted based on the trader's preferences, allowing them to fine-tune the indicator for different market conditions or asset behaviors.
6. Customizable Parameters for Flexibility:
The indicator offers several parameters that can be adjusted to suit individual trading preferences:
Window Period (Bilateral Filter): The window size determines how many past price values are used to calculate the bilateral filter. A larger window increases smoothing, while a smaller window results in more responsive, but noisier, data.
Spatial Sigma (σ_d) and Range Sigma (σ_r): These values control how sensitive the filter is to price changes and the distance between data points. Fine-tuning these parameters allows traders to adjust the degree of noise reduction applied to the price series.
Threshold Levels: The upper and lower thresholds determine when the trend score crosses into long or short territory. These levels can be customized to better match the trader's risk tolerance or asset characteristics.
Visual Settings: Traders can customize the appearance of the chart, including the line width of trend signals, bar colors, and background shading, to make the indicator more readable and aligned with their charting style.
7. Alerts for Trend Reversals:
The indicator includes alert conditions for real-time notifications when the market crosses the defined thresholds. Traders can set alerts to be notified when:
The trend score crosses the long threshold, signaling an uptrend.
The trend score crosses the short threshold, signaling a downtrend.
These alerts provide timely information, allowing traders to take immediate action when the market shows a significant change in direction.
Final Thoughts
The Bilateral Filter For Loop indicator is a robust tool for trend-following traders who wish to reduce market noise and focus on the underlying trend. By applying the bilateral filter and calculating trend scores, this indicator helps traders identify strong uptrends and downtrends, providing reliable entry signals with minimal market noise. The customizable parameters, visual feedback, and alerting system make it a versatile tool for traders seeking to improve their timing and capture profitable market movements.
Thus following all of the key points here are some sample backtests on the 1D Chart
Disclaimer: Backtests are based off past results, and are not indicative of the future.
INDEX:BTCUSD
INDEX:ETHUSD
CRYPTO:SOLUSD
Portfolio Dashboard by DTRThe Portfolio Dashboard by DTR is a sophisticated yet user-friendly Pine Script indicator for TradingView, designed to empower traders with a comprehensive tool for managing and monitoring investment portfolios. Supporting up to 10 stocks, it delivers real-time performance metrics, risk analysis, and market insights in an intuitive, customizable dashboard—perfect for traders of all experience levels.
Key Features
Real-Time Portfolio Metrics: Tracks Return on Investment (ROI), Day's Profit and Loss (PNL), Risk of Profit (ROP), and Average Daily Range (ADR) with color-coded indicators for quick insights.
Individual Stock Insights: Displays detailed data for each stock, including ticker, trading setup, Last Traded Price (LTP) or Stop Loss (SL) status, position size, risk, portfolio risk, Risk-Reward (RR) or Gain%, daily change%, portfolio impact, and optional ADR.
Market Condition Analysis: Evaluates broader market trends using NSE:CNXSMALLCAP data, categorizing conditions as CHOPPY, BULL MARKET, BEAR MARKET, SHAKEOUT, or BEAR RALLY with visual color cues.
Customization Options:
Input total capital (scalable in Thousands, Lacs, or Crores) and maximum risk percentage.
Choose from B&W, Blue, Green, Red, Purple, or Transparent themes, with Dark Mode support.
Adjust dashboard and gauge positions (top/middle/bottom, left/center/right) and text sizes (tiny to huge).
Toggle display options like LTP, % change color, total row, ADR column, RR/Gain%, and empty rows.
Risk Management Tools: Calculates position sizes, individual and portfolio-level risks, and offers visual gauges for total allocation (% invested) and open risk (% of max risk). Supports setting Stop Loss to Break-Even (SL=BE).
Chart Enhancements: Optionally displays entry and stop loss lines on the chart with customizable styles (Dashed, Dotted, Normal) and dynamic labels for precise trade management.
How It Works
Setup: Users input portfolio details—ticker symbols, quantities, entry prices, stop losses, exits, and setups—for up to 10 stocks, along with capital and risk settings.
Data Processing: The indicator fetches daily high, low, close, and previous close data to compute metrics like ADR, percentage change, and Day's PNL for each stock.
Visualization: On the last bar, it generates a detailed table summarizing portfolio and stock-level data, alongside two gauges for allocation and risk, positioned per user preferences.
Chart Integration: When enabled, entry and SL lines with labels appear on the chart for the current ticker, updating dynamically based on price action.
How to Use
Add to Chart: Apply the indicator to your TradingView chart.
Configure Settings: In the settings panel, enter your total capital, stock details, and customize themes, positions, and display preferences.
Monitor Portfolio: Use the dashboard to assess portfolio health, risk exposure, and market conditions in real time.
Manage Trades: Leverage chart lines and labels to execute and adjust trades with precision.
Benefits
Centralized Oversight: Consolidates all essential portfolio data into one view.
Enhanced Risk Control: Provides real-time risk metrics and visual tools for proactive management.
Flexible Design: Adapts to various trading strategies and aesthetic preferences.
Intuitive Interface: Combines detailed analytics with clear, visually appealing presentation.
Important Notes
Accuracy: Ensure correct ticker symbols (e.g., NSE:RELIANCE) and price inputs for reliable results.
Timeframes: Optimized for daily or intraday charts; updates occur on the last bar.
Dependencies: Market condition and ADR calculations rely on NSE:CNXSMALLCAP data availability.
Elevate your trading with the Portfolio Dashboard by DTR—a powerful, all-in-one solution for portfolio management on TradingView. Take control of your investments today!