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
Statistics
1.85I copied this indicator from 4c program so all credit to him/her. I just changed it from 2 SD to 1.85
Anti-SMT + FVG StrategieMade by Laila
4h gives 57% winrate!
Instead of trading based on an expected SMT divergence, you assume that the divergence will not continue. You combine this with a Fair Value Gap (FVG) that is touched by price as additional confirmation.
Anti-SMT Logic (False Divergence)
Short:
EURUSD makes a new high (candle 1)
DXY does not make a new low
Long:
EURUSD makes a new low (candle 1)
DXY does not make a new high
This looks like SMT divergence, but your expectation is: "There will be no SMT."
Fair Value Gap (FVG) Detection
Detects an unfilled gap between candle 1 and 3.
You only trade if the FVG is touched during:
🔹 Candle 1 (the false SMT candle) or
🔹 Candle 2 (the entry candle)
Extra Filters
Only go long if price is above the 50 EMA
Only go short if price is below the 50 EMA
Only trade between 08:00 and 18:00 UTC
Wait 10 candles cooldown between trades
Result:
You only trade when:
There is a possible SMT illusion
An FVG is touched
The setup aligns with trend, session, and timing
This gives you a rational, rare, but strong edge.
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.
LyroMAsLibrary "LyroMAs"
Custom Dynamic MA's that allow a dynamic calculation beginning from the first bar\ use getDynamicLength(maxLength) =>\\tmath.min(maxLength, bar_index + 1) \as length
SMA(sourceData, maxLength)
Dynamic SMA
Parameters:
sourceData (float)
maxLength (int)
EMA(src, length)
Dynamic EMA
Parameters:
src (float)
length (int)
DEMA(src, length)
Dynamic DEMA
Parameters:
src (float)
length (int)
TEMA(src, length)
Dynamic TEMA
Parameters:
src (float)
length (int)
WMA(src, length)
Dynamic WMA
Parameters:
src (float)
length (int)
HMA(src, length)
Dynamic HMA
Parameters:
src (float)
length (int)
VWMA(src, volsrc, length)
Dynamic VWMA
Parameters:
src (float)
volsrc (float)
length (int)
SMMA(src, length)
Dynamic SMMA
Parameters:
src (float)
length (int)
LSMA(src, length, offset)
Dynamic LSMA
Parameters:
src (float)
length (int)
offset (int)
RMA(src, length)
Dynamic RMA
Parameters:
src (float)
length (int)
ALMA(src, length, offset_sigma, sigma)
Dynamic ALMA
Parameters:
src (float)
length (int)
offset_sigma (float)
sigma (float)
ZLSMA(src, length)
Dynamic Zlsma
Parameters:
src (float)
length (int)
Thank you to @QuantraSystems for the dynamic codes.
Previous Day High/Low (8AM–4PM)A simple indicator for NQ and ES futures that marks the previous day high and low on the current trading day excluding premarket.
Smart Money Concepts Mastering Smart Money Concepts: An Exhaustive Guide to the Indicator
As a trader who lives and breathes the markets, I know that understanding the true dynamics behind price movements is what gives us an edge. This indicator isn't just a set of lines and shapes on your chart; it's your window into the operations of major participants, the "smart money" that truly moves the market. I've designed this tool to act as your visual mentor, breaking down the most crucial Smart Money Concepts (SMC) in a clear and actionable way. Get ready to view the market with a fresh perspective.
Market Structure: Your Operational Roadmap
Market structure is the DNA of price, and this indicator presents it unambiguously. Forget the confusion; here you'll see how the price narrative unfolds, identifying the points where large operators are leaving their mark:
Break of Structure (BOS): These are your confirmations. When the price breaks a previous high or low in the direction of the trend, the indicator flags it as a BOS. It's your validation that the current trend has the strength to continue.
Internal BOS: Think of these as the small "steps" within a larger move. They are vital for trading on lower timeframes, allowing you to pinpoint high-precision entries during a retracement or a minor continuation of the main trend.
SWING BOS: These are the "big jumps" that define the market's main direction. They show you the underlying trend, helping you align your trades with the dominant institutional flow.
Change of Character (CHoCH): This is where the price story begins to shift. A CHoCH occurs when the price breaks a high or low that, until that moment, was maintaining the trend. It's the first sign that the market might be about to reverse its direction. Detecting these points gives you an early advantage, allowing you to adapt before the crowd and potentially prepare for a trend reversal.
With clear and distinct labels for each BOS and CHoCH, the indicator allows you to instantly understand your position within the market structure, regardless of the timeframe you're trading.
Order Blocks (OBs): The Core of Institutional Activity with Volume X-Rays
Order Blocks (OBs) are, in my experience, where true institutional action is forged. These are the candles or groups of candles where large banks and funds have placed their massive orders, causing significant price movement. This indicator not only identifies them but also offers you a complete "X-ray" of their internal composition:
Precise OB Identification: The indicator scans the price to find these pivot points where large orders entered the market. You'll see both Internal Order Blocks (for micro-trades) and Swing Order Blocks (for longer-term directional trades), all visually marked for your convenience.
In-Depth Volume Analysis (Your Secret Edge): This is where this indicator truly sets itself apart. You don't just see an OB; you understand its anatomy:
· Total Volume: How much activity occurred within that OB.
·Buy Volume: How much buying pressure existed.
·Sell Volume: How much selling pressure was exerted.
·Delta: The crucial difference between buy and sell volume. A strong positive Delta in a bullish OB tells you there was aggressive buying intent, while a negative Delta in a bearish OB reveals dominant selling pressure. This information allows you to judge the quality and intent behind the OB
Point of Control (POC) of the OB: Within each Order Block, the indicator shows you the Point of Control (POC). This is the exact price level where the highest volume was traded within that OB. Consider the POC as the OB's "center of gravity"; it's the level that institutions defended most actively and to which price often returns for a second interaction.
Maximum Penetration Percentage: This metric is fundamental for assessing an OB's "freshness." It shows you the maximum percentage that price has managed to "penetrate" or mitigate that Order Block since its formation. An OB with low maximum penetration suggests that there are still many pending orders in that zone, increasing its potential for a reaction. An OB with high penetration might be "exhausted" and less effective in the future.
Market Imbalances: Fair Value Gaps (FVG) and Imbalances – The Footprints of Aggression
Fair Value Gaps (FVG), or inefficiencies, are areas where price moved rapidly, leaving a "void" or an inefficient gap in the order book. These are zones that Smart Money often seeks to fill. This indicator presents them to you with unprecedented detail:
Automatic Detection and Extension: The indicator automatically detects and draws these FVGs, extending them in time so you can see their potential future impact.
Intelligent Classification (FVG vs. Imbalance): Not all imbalances are created equal. The indicator classifies them as an FVG (a standard inefficiency) or an Imbalance (a larger magnitude inefficiency, often indicative of a very strong move). This distinction helps you prioritize which ones are most relevant to your trading.
Detailed Volume and POC of the FVG: Yes, you also get a volume breakdown (total, buy, sell, Delta) and the Point of Control (POC) within each FVG. This is crucial because it reveals whether the aggression that created the FVG was supported by significant volume or if it was a more "empty" move. The POC gives you a precise level within the FVG where there was greater interaction, making it a more attractive zone for mitigation.
Maximum Penetration Percentage of the FVG: Similar to OBs, this metric shows you the maximum percentage that the FVG has been "filled" by price, providing a clear idea of how "rebalanced" or "tested" the imbalance has been.
Strategic Levels and High-Probability Zones
Trading isn't just about what happened on one candle; it's about context. This indicator provides you with that broader perspective:
Higher Timeframe Key Levels: Major players operate on larger timeframes. The indicator marks the past daily, weekly, and monthly highs and lows. These are massive liquidity magnets and crucial reference points where price tends to reverse or seek out liquidity sweeps before continuing. Having them on your chart is like having a map of liquidity pools.
Premium and Discount Zones: Trading "cheap" on a buy and "expensive" on a sell is a pillar of profitability. The indicator divides the current market range into three zones:
·Premium Zone: The upper part of the range, ideal for looking for selling opportunities.
·Equilibrium Zone: The midpoint, where the market often consolidates.
·Discount Zone: The lower part of the range, perfect for looking for buying opportunities.
Footprint Candles: Intrabar Volume Breakdown for Paid TradingView Plans
This advanced feature allows you to see volume and delta at a microscopic level, revealing the true buying and selling pressure within each individual candle.
Important: The visualization of Footprint Candles requires a paid TradingView plan (Pro, Pro+, Premium) to access the necessary lower timeframe data. If you don't have a paid plan, this functionality will not be displayed.
Fill (Delta Body) : The color of the Footprint candle's body doesn't just indicate if it was bullish or bearish; its shade and intensity reflect the strength and direction of the volume imbalance between buyers and sellers. This is calculated from lower timeframe data analysis, giving you an instant visual of who was in control.
Lines/Wicks: These represent the high and low prices reached by the main candle, just as you'd expect.
Horizontal Line/Dots (LTF POC): Within each candle, you'll see a horizontal line or dot marking the Price Level with the Highest Traded Volume (POC - Point of Control), but this POC is derived from the lower timeframe (LTF) analysis. This tells you where the greatest activity and price acceptance occurred within that main candle, providing a key to understanding internal volume distribution.
Complementary Tools for a Superior Analytical Edge
To round out your analysis, I've included some additional tools that perfectly complement SMC:
OTC (Over-The-Counter) Liquidity / Liquidity Sweep: This is your "trap" alert. OTC liquidity refers to transactions that don't pass through major exchanges but still influence price. The indicator searches for traces of this hidden liquidity, which often manifests as a "liquidity sweep." This occurs when price briefly pushes past an obvious high or low (where many stops or superficial liquidity reside) only to sharply reverse. It's a signal that large operators have "hunted" that liquidity and are about to move price in the opposite direction. Identifying these sweeps is key to avoiding becoming "fuel" for institutional moves.
Dynamic Fibonacci: A Fibonacci that doesn't stay static. It automatically adjusts to the market's pivots, providing real-time retracement and extension levels. This visual tool helps you quickly identify potential "pullback" points where price might react or extension targets for a move.
Trendline Breakout Detector: For those who value classical analysis, this function intelligently detects and visualizes trendlines (both bullish and bearish) and their breakouts. It offers an additional layer of technical analysis and structural confirmation, integrating elements of traditional technical analysis with the SMC perspective.
A Final Thought (From Trader to Trader):
Remember, no tool is a crystal ball. This indicator is designed to be your co-pilot in the complex world of markets, giving you critical information that others overlook. It provides you with the "where" and "why" of price movements from an institutional perspective. However, success will always depend on how you integrate this information into your trading strategy, your risk management plan, and, of course, your own informed judgment. Use it wisely, learn to read the market through its eyes, and you'll be on the right path to trading with greater confidence and precision.
Alpha Trader University - Average Session VolatilityCalculate the Average session Volatility through this
Session EdgeSession Edge Indicator
Overview
Session Edge is a comprehensive technical analysis tool designed to visualize critical price levels and statistical patterns for specific trading sessions.
Regular Trading Hours (RTH) session analysis only with current version
This indicator helps traders identify potential support, resistance, and key reaction zones by analyzing historical RTH session behavior and projecting statistically significant levels onto the current trading session.
The indicator combines traditional session-based analysis with advanced statistical calculations to provide traders with high-probability zones for market reactions. Unlike standard session indicators, Session Edge incorporates proprietary algorithms that calculate mean expansion levels and manipulation/distribution zones based on historical RTH data patterns.
Key Features
RTH Session Analysis : Automatically detects and analyzes Regular Trading Hours (9:30 AM - 4:00 PM EST) sessions
Previous Session Levels : Displays previous RTH high, low, and equilibrium levels with customizable styling
Opening Price Projection : Shows current session opening price extended through the trading day
Mean Expansion Levels (MuEH/L) : Calculates statistical average expansion levels based on historical session data
Manipulation Levels : Identifies potential manipulation zones using statistical analysis
Distribution Levels : Projects distribution zones based on historical price behavior patterns
Anchor Line Visualization : Provides reference lines for session start times
Fully Customizable Interface : Complete control over colors, line styles, and visibility settings
Real-time Updates : Continuously updates levels as new session data becomes available
Settings
Level Customization : Individual control over each level type (Anchor, Open, Previous HL, Previous EQ, MuEHL, Distribution, Manipulation)
Visual Styling : Customize colors and line styles (Solid, Dotted, Dashed) for all elements
Lookback Period : Configurable historical data analysis period (10-500 sessions)
Selective Display : Toggle individual level types on/off based on trading strategy requirements
Color Coordination : Unified color scheme options for clean chart presentation
Use Cases
Session-Based Trading : Identify key levels for intraday trading strategies focused on RTH sessions
Support/Resistance Analysis : Use previous session highs/lows and EQ as potential targets and/or reversal zones
Statistical Price Targeting : Utilize mean expansion levels for profit target or potential reversals
Market Structure Analysis : Plots manipulation and distribution levels
Opening Range Strategies : Incorporate session opening levels into your existing breakout/breakdown strategies
How to Use It
Initial Setup
Apply Session Edge to your chart and configure the desired lookback period setting.
The indicator automatically detects RTH sessions (9:30 AM - 4:00 PM EST) and begins calculating levels.
Level Identification
Previous High/Low (P. High/P. Low) : Previous RTH session extremes serving as potential targets and/or support/resistance
Previous Equilibrium (P. EQ) : Midpoint between previous session high and low
Opening Price (O) : Current session opening level extended through the trading session
Mean Expansion High/Low (MuEH/MuEL) : Statistically calculated average expansion zones
Manipulation Levels (-M/+M) : Zones where price manipulation typically occurs
Distribution Levels (-D/+D) : Areas where institutional distribution commonly takes place
Trading Applications
Monitor price reaction at previous session EQ targeting previous session high/low and/or MuEH / MuEL
Monitor price reactions at previous session high/low levels for potential reversals
Use mean expansion levels as statistical price targets or exhaustion Price Action
Watch for manipulation and distribution level interactions for entry/exit signals
Combine level confluence with your current trading strategy for higher-probability trade setups
Visual Optimization
Adjust line colors and styles to create clear visual hierarchy on your charts
Toggle specific level types based on your trading focus and strategy requirements
Coordinate indicator colors with your overall chart color scheme for optimal readability
Important Notes
This indicator uses statistical analysis of RTH session data; past performance does not guarantee future results
For best results, use on liquid markets during their primary RTH trading sessions
Level calculations require sufficient historical data for accurate statistical projections
While the indicator provides statistical projections, always combine these signals with your own analysis and risk management strategy
The code containing the proprietary algorithms is maintained as closed source to preserve calculation integrity
Limitations
Requires adequate historical RTH session data for accurate level calculations
Works with chart Timeframe <= 30 min
Performance may vary depending on market volatility and RTH session trading conditions
Statistical projections work best on standard chart types and timeframes
Level accuracy depends on consistent RTH session patterns and market conditions
Should be used as part of a comprehensive trading strategy rather than standalone signals
Technical Requirements
Compatible with all major chart timeframes
Optimized for RTH session analysis (9:30 AM - 4:00 PM EST)
Supports up to 500 historical bars for statistical calculations
Real-time updates throughout the trading session
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.
ATS Net volume EXPERT V5.0ATS NET VOLUME EXPERT V5.0
Smart Money Flow Analysis System (Professional Edition)
▍System Overview
ATS NET VOLUME EXPERT V5.0 is an advanced volume-based indicator optimized for institutional capital flow analysis. Featuring new multi-timeframe synergy and enhanced volume bar algorithms, it delivers superior signal accuracy. The system tracks net buying/selling pressure to identify smart money movements while cross-verifying across timeframes to minimize false signals.
▍Key Upgrades
1. Multi-Timeframe Synergy (New Feature)
🔹 Synchronized Timeframe Analysis
Displays higher/lower timeframe trends (e.g., 15min + 4H) on your active chart (e.g., 1H)
Prevents single-tf misjudgment:
*Daily net inflow + 1H net outflow → Likely short-term pullback*
Weekly outflow + Daily inflow → Watch for bull traps
🔹 Intelligent Timeframe Matching
Auto-links optimal analysis periods (e.g., 5min ↔ 30min)
Manual timeframe switching for customized strategies
2. Volume Bar Algorithm Fixes
🔹 Critical Bug Fixes
Eliminated extreme market price-volume distortion
Enhanced block order detection (no more misclassified retail orders as institutional)
🔹 Dynamic Smoothing
Auto-adjusts sensitivity for low-liquidity markets (e.g., crypto) to reduce noise
▍Core Features (Enhanced)
✅ Net Volume Dynamics
Real-time buy/sell volume differential (units: millions/billions)
NEW: Optional secondary timeframe display below price chart
✅ Smart Money Detection (Upgraded)
Adaptive thresholds for different assets (stocks/futures/crypto)
✅ Signal Classification (Refined)
Net Volume Range Market Implication Timeframe Confirmation
> +50M Strong inflow (Bullish) Require higher tf confirmation
+10M to +50M Moderate accumulation Monitor continuation
-10M to +10M Neutral zone Price structure decisive
-10M to -50M Distribution phase Watch lower tf acceleration
< -50M Panic selling (Bearish) Weekly confluence confirms trend
▍Practical Applications
🛡️ Case Study: False Signal Elimination
Legacy Issue: 1H showed net buys while 15M was a bull trap
V5.0 Solution: 4H net sell warning prevents reversal misreads
⚡ Flash Crash Resilience
Accurately flags institutional dumping during volatility spikes
▍Competitive Edge
🚀 Timeframe Harmony: 67% fewer false signals vs. single-tf analysis
🎯 Institutional-Grade Precision: 30% better block order detection
📉 Noise Immunity: 22% lower drawdown in backtesting
Pro Tip: Always combine with price action (S/R, trendlines) and require ≥2 timeframe confirmations for high-probability trades.
(Optimized for: Stocks/Futures/Crypto/FX – Institutional Liquidity Markets)
Position Size CalculatorIt is a position size calculation with 0.05% buffer to take swift entry on either sides with 0.5% risk on your overall capital
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!
SY_Quant_AI_YJ📢 SY_Quant_AI_Alert Strategy Overview
Name: SY_Quant_AI_Alert
Purpose: Designed for real-time alerting when Long, Short, or Take-Profit signals are triggered. Alerts are structured in JSON format, ideal for integration with DingTalk, Telegram, or other bots.
✅ Key Features:
Trend Detection using Supertrend, EMA/MA filters, and candle color analysis.
Momentum Filtering with MACD crossover signals.
Entry Alerts when a strong signal appears (Long/Short), showing ideal entry zone.
Take-Profit Alerts when floating profit is valid and MACD reverses in favor.
Full JSON Alerts for easy automation and third-party integrations.
Cross-Sectional Altcoin Portfolio [BackQuant]Cross-Sectional Altcoin Portfolio
Introducing BackQuant's Cross-Sectional Altcoin Portfolio, a sophisticated trading system designed to dynamically rotate among a selection of major altcoins. This portfolio strategy compares multiple assets based on real-time performance metrics, such as momentum and trend strength, to select the strongest-performing coins. It uses a combination of adaptive scoring and regime filters to ensure the portfolio is aligned with favorable market conditions, minimizing exposure during unfavorable trends.
This system offers a comprehensive solution for crypto traders who want to optimize portfolio allocation based on cross-asset performance, while also accounting for market regimes. It allows traders to compare multiple altcoins dynamically and allocate capital to the top performers, ensuring the portfolio is always positioned in the most promising assets.
Key Features
1. Dynamic Asset Rotation:
The portfolio constantly evaluates the relative strength of 10 major altcoins: SOLUSD, RUNEUSD, ORDIUSD, DOGEUSDT, ETHUSD, ENAUSDT, RAYUSDT, PENDLEUSD, UNIUSD, and KASUSDT.
Using a ratio matrix, the system selects the strongest asset based on momentum and trend performance, dynamically adjusting the allocation as market conditions change.
2. Long-Only Portfolio with Cash Reserve:
The portfolio only takes long positions or remains in cash. The system does not enter short positions, reducing the risk of exposure during market downturns.
A powerful regime filter ensures the system is inactive during periods of market weakness, defined by the Universal Trend Performance Indicator (TPI) and other market data.
3. Equity Tracking:
The script provides real-time visualizations of portfolio equity compared to buy-and-hold strategies.
Users can compare the performance of the portfolio against holding individual assets (e.g., BTC, ETH) and see the benefits of the dynamic allocation.
4. Performance Metrics:
The system provides key performance metrics such as:
Sharpe Ratio: Measures risk-adjusted returns.
Sortino Ratio: Focuses on downside risk.
Omega Ratio: Evaluates returns relative to risk.
Maximum Drawdown: The maximum observed loss from a peak to a trough.
These metrics allow traders to assess the effectiveness of the strategy versus simply holding the assets.
5. Regime Filter:
The system incorporates a regime filter that evaluates the overall market trend using the TPI and other indicators. If the market is in a downtrend, the system exits positions and moves to cash, avoiding exposure to negative market conditions.
Users can customize the thresholds for the long and short trends to fit their risk tolerance.
6. Customizable Parameters:
Traders can adjust key parameters, such as the backtest start date, starting capital, leverage multiplier, and visualization options, including equity plot colors and line widths.
The system supports different levels of customizations for traders to optimize their strategies.
7. Equity and Buy-and-Hold Comparisons:
This script enables traders to see the side-by-side comparison of the portfolio’s equity curve and the equity curve of a buy-and-hold strategy for each asset.
The comparison allows users to evaluate the performance of the dynamic strategy versus holding the altcoins in isolation.
8. Forward Test (Out-of-Sample Testing):
The system includes a note that the portfolio provides out-of-sample forward tests, ensuring the robustness of the strategy. This is crucial for assessing the portfolio's performance beyond historical backtesting and validating its ability to adapt to future market conditions.
9. Visual Feedback:
The system offers detailed visual feedback on the current asset allocation and performance. Candles are painted according to the trend of the selected assets, and key metrics are displayed in real-time, including the momentum scores for each asset.
10. Alerts and Notifications:
Real-time alerts notify traders when the system changes asset allocations or moves to cash, ensuring they stay informed about portfolio adjustments.
Visual labels on the chart provide instant feedback on which asset is currently leading the portfolio allocation.
How the Rotation Works
The portfolio evaluates 10 different assets and calculates a momentum score for each based on their price action. This score is processed through a ratio matrix, which compares the relative performance of each asset.
Based on the rankings, the portfolio allocates capital to the top performers, ensuring it rotates between the strongest assets while minimizing exposure to underperforming assets.
If no asset shows strong performance, the system defaults to cash to preserve capital.
Final Thoughts
BackQuant’s Cross-Sectional Altcoin Portfolio provides a dynamic and systematic approach to altcoin portfolio management. By employing real-time performance metrics, adaptive scoring, and regime filters, this strategy aims to optimize returns while minimizing exposure to market downturns. The inclusion of out-of-sample forward tests ensures that the system remains robust in live market conditions, making it an ideal tool for crypto traders seeking to enhance their portfolio's performance with a data-driven, momentum-based approach.
NIFTY Option Buy Strategy MASTER v1This script is a complete option buying strategy framework for NIFTY, designed for both intraday and positional swing trades.
🔹 Built using multi-timeframe analysis (EMAs, MACD, RSI)
🔹 Combines key macro filters: India VIX, PCR, FII/DII net cash flows
🔹 Supports both Call (CE) and Put (PE) entries
🔹 Includes manual input dashboard for real-time market context
🔹 Trade logic includes:
Bollinger Band breakouts
Volume confirmation
VWAP filtering
EMA crossover + MACD alignment
Resistance/support proximity from option chain (manual)
📈 Smart Trade Management:
Multi-target system (e.g., exit 50% at RR=1, 50% at RR=2)
Trailing stop-loss after target 1 hits
Automatic exit on SL/TP or reverse signals
Visual markers for all entries, exits, and stops
📊 Built-in Dashboard:
Displays India VIX, PCR, FII/DII flows, and S/R levels
Strike price selection (ATM + offset logic)
🧪 Ideal for backtesting, alerts, and real-time execution.
Can be used with alerts + webhook for automated trading or signal generation.
⚠️ Note: This script is for educational purposes only. Always test on paper trading before going live.
Candle Body TableCandle Body Table is a lightweight, easy-to-use indicator that displays a live summary of candle “body strength” across multiple timeframes, along with how much time is left on each candle. Simply choose up to five timeframes (1, 5, 15, 30, and 60 minutes by default), adjust the table’s corner and font size, and you’ll always have a quick, at-a-glance view of:
OC (Body %): The percentage of the candle that’s composed of its body (|open – close| divided by high–low).
Strength: A label (Weak, Balanced, or Strong) based on the body percentage.
Time Left: How many minutes and seconds remain before the current candle closes.
The table updates in real time (using lookahead), coloring each row background green if that timeframe’s current candle is bullish, or red if it’s bearish. That way, you can instantly see which timeframes have strong momentum, which are balanced or weak, and exactly when each candle will finish.
Use Cases
Multi-Timeframe Momentum Check:
If you want to confirm that both your 1m and 5m candles have “Strong” bodies before entering a trade, Candle Body Table shows you that instantly. No more switching back and forth between charts—just glance at the table.
Time-Sensitive Entries/Exits:
Suppose you trade breakouts only at the close of a 5-minute candle. The “Time Left” column counts down so you know exactly when that candle is about to close—down to the second—letting you prepare your order.
Quick Visual Scan:
When markets are choppy, you may want to see which timeframes are weak or balanced rather than diving into each timeframe separately. If the 15m row says “Weak” (small body %), you might avoid taking a trend-following position at that moment.
Session Overlaps & Volatility Windows:
During London/N.Y. overlap or U.S. cash close, traders often check for stronger bodies on higher timeframes (e.g., 30m or 60m). The table immediately highlights if that timeframe’s candle body heats up, indicating increased volatility.
Swing-to-Scalp Transition:
If you typically scalp on 1m but only when the 15m candle is “Strong,” this table gives a green/red cue and a strength label. That makes it easier to wait patiently until multiple timeframes align.
FAQ
Q1. What does “OC” mean, and why is it shown as a percentage?
A1. “OC” stands for Open/Close difference. So it reflects how much of the candle’s total range (high–low) is taken up by its body(open-close). A high OC% means the candle body is large relative to its wick. In other words a strong Bullish/Bearish candle.
Q2. How is “Strength” determined?
A2. The script uses three buckets:
Weak if OC% ≤ 30%
Balanced if 30% < OC% ≤ 55%
Strong if OC% > 55%
This gives you a quick label instead of having to interpret raw percentages every time.
Q3. Why do some rows have a green background and others red?
A3. If close > open (bullish candle), that entire row’s background is shaded green(70%). If close < open (bearish candle), it’s shaded red(70%). If open = close (doji), there’s no background shade. This lets you instantly spot bullish vs. bearish candles across your chosen timeframes.
Q4. Will this repaint?
A4. No. Because each OHLC value is requested with lookahead_on, you see the live developing OHLC. However, once a candle closes, those values are final. The “Time Left” column dynamically changes throughout the bar but does not redraw past values.
DCA Investment Tracker Pro [tradeviZion]DCA Investment Tracker Pro: Educational DCA Analysis Tool
An educational indicator that helps analyze Dollar-Cost Averaging strategies by comparing actual performance with historical data calculations.
---
💡 Why I Created This Indicator
As someone who practices Dollar-Cost Averaging, I was frustrated with constantly switching between spreadsheets, calculators, and charts just to understand how my investments were really performing. I wanted to see everything in one place - my actual performance, what I should expect based on historical data, and most importantly, visualize where my strategy could take me over the long term .
What really motivated me was watching friends and family underestimate the incredible power of consistent investing. When Napoleon Bonaparte first learned about compound interest, he reportedly exclaimed "I wonder it has not swallowed the world" - and he was right! Yet most people can't visualize how their $500 monthly contributions today could become substantial wealth decades later.
Traditional DCA tracking tools exist, but they share similar limitations:
Require manual data entry and complex spreadsheets
Use fixed assumptions that don't reflect real market behavior
Can't show future projections overlaid on actual price charts
Lose the visual context of what's happening in the market
Make compound growth feel abstract rather than tangible
I wanted to create something different - a tool that automatically analyzes real market history, detects volatility periods, and shows you both current performance AND educational projections based on historical patterns right on your TradingView charts. As Warren Buffett said: "Someone's sitting in the shade today because someone planted a tree a long time ago." This tool helps you visualize your financial tree growing over time.
This isn't just another calculator - it's a visualization tool that makes the magic of compound growth impossible to ignore.
---
🎯 What This Indicator Does
This educational indicator provides DCA analysis tools. Users can input investment scenarios to study:
Theoretical Performance: Educational calculations based on historical return data
Comparative Analysis: Study differences between actual and theoretical scenarios
Historical Projections: Theoretical projections for educational analysis (not predictions)
Performance Metrics: CAGR, ROI, and other analytical metrics for study
Historical Analysis: Calculates historical return data for reference purposes
---
🚀 Key Features
Volatility-Adjusted Historical Return Calculation
Analyzes 3-20 years of actual price data for any symbol
Automatically detects high-volatility stocks (meme stocks, growth stocks)
Uses median returns for volatile stocks, standard CAGR for stable stocks
Provides conservative estimates when extreme outlier years are detected
Smart fallback to manual percentages when data insufficient
Customizable Performance Dashboard
Educational DCA performance analysis with compound growth calculations
Customizable table sizing (Tiny to Huge text options)
9 positioning options (Top/Middle/Bottom + Left/Center/Right)
Theme-adaptive colors (automatically adjusts to dark/light mode)
Multiple display layout options
Future Projection System
Visual future growth projections
Timeframe-aware calculations (Daily/Weekly/Monthly charts)
1-30 year projection options
Shows projected portfolio value and total investment amounts
Investment Insights
Performance vs benchmark comparison
ROI from initial investment tracking
Monthly average return analysis
Investment milestone alerts (25%, 50%, 100% gains)
Contribution tracking and next milestone indicators
---
📊 Step-by-Step Setup Guide
1. Investment Settings 💰
Initial Investment: Enter your starting lump sum (e.g., $60,000)
Monthly Contribution: Set your regular DCA amount (e.g., $500/month)
Return Calculation: Choose "Auto (Stock History)" for real data or "Manual" for fixed %
Historical Period: Select 3-20 years for auto calculations (default: 10 years)
Start Year: When you began investing (e.g., 2020)
Current Portfolio Value: Your actual portfolio worth today (e.g., $150,000)
2. Display Settings 📊
Table Sizes: Choose from Tiny, Small, Normal, Large, or Huge
Table Positions: 9 options - Top/Middle/Bottom + Left/Center/Right
Visibility Toggles: Show/hide Main Table and Stats Table independently
3. Future Projection 🔮
Enable Projections: Toggle on to see future growth visualization
Projection Years: Set 1-30 years ahead for analysis
Live Example - NASDAQ:META Analysis:
Settings shown: $60K initial + $500/month + Auto calculation + 10-year history + 2020 start + $150K current value
---
🔬 Pine Script Code Examples
Core DCA Calculations:
// Calculate total invested over time
months_elapsed = (year - start_year) * 12 + month - 1
total_invested = initial_investment + (monthly_contribution * months_elapsed)
// Compound growth formula for initial investment
theoretical_initial_growth = initial_investment * math.pow(1 + annual_return, years_elapsed)
// Future Value of Annuity for monthly contributions
monthly_rate = annual_return / 12
fv_contributions = monthly_contribution * ((math.pow(1 + monthly_rate, months_elapsed) - 1) / monthly_rate)
// Total expected value
theoretical_total = theoretical_initial_growth + fv_contributions
Volatility Detection Logic:
// Detect extreme years for volatility adjustment
extreme_years = 0
for i = 1 to historical_years
yearly_return = ((price_current / price_i_years_ago) - 1) * 100
if yearly_return > 100 or yearly_return < -50
extreme_years += 1
// Use median approach for high volatility stocks
high_volatility = (extreme_years / historical_years) > 0.2
calculated_return = high_volatility ? median_of_returns : standard_cagr
Performance Metrics:
// Calculate key performance indicators
absolute_gain = actual_value - total_invested
total_return_pct = (absolute_gain / total_invested) * 100
roi_initial = ((actual_value - initial_investment) / initial_investment) * 100
cagr = (math.pow(actual_value / initial_investment, 1 / years_elapsed) - 1) * 100
---
📊 Real-World Examples
See the indicator in action across different investment types:
Stable Index Investments:
AMEX:SPY (SPDR S&P 500) - Shows steady compound growth with standard CAGR calculations
Classic DCA success story: $60K initial + $500/month starting 2020. The indicator shows SPY's historical 10%+ returns, demonstrating how consistent broad market investing builds wealth over time. Notice the smooth theoretical growth line vs actual performance tracking.
MIL:VUAA (Vanguard S&P 500 UCITS) - Shows both data limitation and solution approaches
Data limitation example: VUAA shows "Manual (Auto Failed)" and "No Data" when default 10-year historical setting exceeds available data. The indicator gracefully falls back to manual percentage input while maintaining all DCA calculations and projections.
MIL:VUAA (Vanguard S&P 500 UCITS) - European ETF with successful 5-year auto calculation
Solution demonstration: By adjusting historical period to 5 years (matching available data), VUAA auto calculation works perfectly. Shows how users can optimize settings for newer assets. European market exposure with EUR denomination, demonstrating DCA effectiveness across different markets and currencies.
NYSE:BRK.B (Berkshire Hathaway) - Quality value investment with Warren Buffett's proven track record
Value investing approach: Berkshire Hathaway's legendary performance through DCA lens. The indicator demonstrates how quality companies compound wealth over decades. Lower volatility than tech stocks = standard CAGR calculations used.
High-Volatility Growth Stocks:
NASDAQ:NVDA (NVIDIA Corporation) - Demonstrates volatility-adjusted calculations for extreme price swings
High-volatility example: NVIDIA's explosive AI boom creates extreme years that trigger volatility detection. The indicator automatically switches to "Median (High Vol): 50%" calculations for conservative projections, protecting against unrealistic future estimates based on outlier performance periods.
NASDAQ:TSLA (Tesla) - Shows how 10-year analysis can stabilize volatile tech stocks
Stable long-term growth: Despite Tesla's reputation for volatility, the 10-year historical analysis (34.8% CAGR) shows consistent enough performance that volatility detection doesn't trigger. Demonstrates how longer timeframes can smooth out extreme periods for more reliable projections.
NASDAQ:META (Meta Platforms) - Shows stable tech stock analysis using standard CAGR calculations
Tech stock with stable growth: Despite being a tech stock and experiencing the 2022 crash, META's 10-year history shows consistent enough performance (23.98% CAGR) that volatility detection doesn't trigger. The indicator uses standard CAGR calculations, demonstrating how not all tech stocks require conservative median adjustments.
Notice how the indicator automatically detects high-volatility periods and switches to median-based calculations for more conservative projections, while stable investments use standard CAGR methods.
---
📈 Performance Metrics Explained
Current Portfolio Value: Your actual investment worth today
Expected Value: What you should have based on historical returns (Auto) or your target return (Manual)
Total Invested: Your actual money invested (initial + all monthly contributions)
Total Gains/Loss: Absolute dollar difference between current value and total invested
Total Return %: Percentage gain/loss on your total invested amount
ROI from Initial Investment: How your starting lump sum has performed
CAGR: Compound Annual Growth Rate of your initial investment (Note: This shows initial investment performance, not full DCA strategy)
vs Benchmark: How you're performing compared to the expected returns
---
⚠️ Important Notes & Limitations
Data Requirements: Auto mode requires sufficient historical data (minimum 3 years recommended)
CAGR Limitation: CAGR calculation is based on initial investment growth only, not the complete DCA strategy
Projection Accuracy: Future projections are theoretical and based on historical returns - actual results may vary
Timeframe Support: Works ONLY on Daily (1D), Weekly (1W), and Monthly (1M) charts - no other timeframes supported
Update Frequency: Update "Current Portfolio Value" regularly for accurate tracking
---
📚 Educational Use & Disclaimer
This analysis tool can be applied to various stock and ETF charts for educational study of DCA mathematical concepts and historical performance patterns.
Study Examples: Can be used with symbols like AMEX:SPY , NASDAQ:QQQ , AMEX:VTI , NASDAQ:AAPL , NASDAQ:MSFT , NASDAQ:GOOGL , NASDAQ:AMZN , NASDAQ:TSLA , NASDAQ:NVDA for learning purposes.
EDUCATIONAL DISCLAIMER: This indicator is a study tool for analyzing Dollar-Cost Averaging strategies. It does not provide investment advice, trading signals, or guarantees. All calculations are theoretical examples for educational purposes only. Past performance does not predict future results. Users should conduct their own research and consult qualified financial professionals before making any investment decisions.
---
© 2025 TradeVizion. All rights reserved.
eriktrades1995-ORB-opening range breakoutThis TradingView Pine Script indicator is designed to identify and display Opening Range Breakout (ORB) levels and signal potential breakout opportunities. It helps traders visualize the high and low of an initial trading period and then highlights the first instance the price breaks out of this range.
How it Works:
- Defines the Opening Range:
You can choose an ORB period of either 15 minutes or 30 minutes from the script's settings.
The script then monitors the price action during this initial period (e.g., 09:30 - 09:45 ET for a 15-minute ORB, or 09:30 - 10:00 ET for a 30-minute ORB, based on the New York timezone).
Identifies ORB High and Low:
- During the selected ORB period, the script records the highest high and lowest low reached.
Plots ORB Levels:
Once the ORB period is complete, two horizontal black lines are drawn on your chart:
One representing the ORB High.
One representing the ORB Low.
These lines extend for the remainder of the trading day.
- Signals Breakouts:
The script watches for the price to close outside of this established ORB range.
Break Above ORB High: If the price closes above the ORB High for the first time that day (after the ORB period), a small green upward-pointing triangle is plotted below the breakout bar.
Break Below ORB Low: If the price closes below the ORB Low for the first time that day (after the ORB period), a small red downward-pointing triangle is plotted below the breakout bar.
Only the first breakout in each direction is marked for the day.
- Daily Reset:
The ORB levels and breakout signals are automatically reset at the beginning of each new trading day.
Key Features:
Customizable ORB Duration: Choose between 15-minute or 30-minute opening ranges.
Clear Visuals: Easily identifiable ORB high/low lines and distinct breakout signals.
First Breakout Focus: Designed to capture the initial breakout momentum.
Intraday Strategy: Best suited for use on intraday charts (e.g., 1-minute, 5-minute, 15-minute).
New York Timezone Based: The ORB session is calculated based on 'America/New_York' time.
How to Use:
Traders typically use ORB strategies to identify potential continuations or reversals early in the trading session. A break above the ORB high might suggest bullish momentum, while a break below the ORB low might indicate bearish momentum. Always use in conjunction with other analysis and risk management techniques.
Market Maker Zones [VWAP + Liquidity + Stop Hunts]This is a Pine Script indicator for TradingView that identifies market maker zones through VWAP, liquidity zones, and stop hunt levels. Here's what each component does:
VWAP Component:
Calculates Volume Weighted Average Price from a specified anchor time
Uses cumulative volume and price-volume to track institutional interest
Plotted as an orange line that market makers often use as a reference
Liquidity Zones:
Identifies bars with volume exceeding 1.5x the average (configurable)
Highlights these high-volume areas with blue background
These represent zones where large orders were executed
Stop Hunt Zones:
Tracks recent highs and lows over a 20-bar window
Plots horizontal lines at these levels with labels
These are areas where stop losses typically cluster
Key Market Maker Concepts:
The indicator assumes market makers hunt stops at obvious levels (recent highs/lows), accumulate positions in high-volume zones, and use VWAP as a fair value reference. When price approaches these zones, it often indicates potential reversal or continuation points.
Usage Tips:
Watch for price reactions near VWAP line
High-volume zones often act as support/resistance
Stop hunt levels frequently get tested before significant moves
Combine all three elements to identify high-probability trade setups
The script is well-structured with clear input parameters and visual elements that make it easy to spot these institutional footprints on your charts.
Kappa Weighted IndexI have created an indicator with options to select if you invested in separate stocks to get one price index I hope you will find helpful.
Any questions on that please give me a shout
Enhanced Seasonality Trade BacktestEnhanced Seasonality Trade Backtest
Overview
A comprehensive Pine Script indicator that backtests seasonal trading strategies by analyzing historical price performance during specific date ranges. The tool provides detailed statistics, visual markers, and election cycle filtering to identify profitable seasonal patterns.
Key Features
📊 Backtesting Engine
Tests up to 50 years of historical data
Configurable entry/exit dates (day/month)
Automatic holiday/weekend date adjustment
Separate analysis for long and short positions
🗳️ Election Cycle Filter
All Years: Test every year in the lookback period
Election Years: US presidential election years only (2024, 2020, 2016...)
Pre-Election Years: Years before elections (2023, 2019, 2015...)
Post-Election Years: Years after elections (2021, 2017, 2013...)
📈 Comprehensive Statistics
Win rate percentage
Total and average returns
Best/worst performing years
Detailed trade-by-trade breakdown
Years tested vs. years filtered
🎯 Visual Indicators
Entry/exit lines for all historical trades
Future trade date projections
Background highlighting during trade periods
Color-coded performance labels
⚙️ Customization Options
Toggle between long/short analysis
Show/hide price and date details
Adjustable table position
Future trade date visualization
Use Cases
Seasonal Trading: Identify recurring profitable periods (e.g., "Sell in May")
Election Cycle Analysis: Test how political cycles affect market performance
Strategy Validation: Backtest specific date-range strategies
Risk Assessment: Analyze worst-case scenarios and drawdowns
Perfect For
Swing traders looking for seasonal edges
Portfolio managers timing market entries/exits
Researchers studying market cyclicality
Anyone wanting to quantify seasonal market behavior
ONLY WORKS IN 1D TIME FRAME