Mum Formasyonları TespitiIt is used to detect candles.
It is designed to analyze all the candles that form.
The most frequently formed candles are displayed on the price chart.
Forecasting
Sector Analysis [SS]Introducing the most powerful sector analysis tool/indicator available, to date, in Pine!
This is a whopper indicator, so be sure to read carefully to ensure you understand its applications and uses!
First of all, because this is a whopper, let's go over the key functional points of the indicator.
The indicator compares the 11 main sector ETFs against whichever ticker you are looking at.
The functions include the following:
Ability to pull technicals from the sectors, such as RSI, Stochastic and Z-Score;
Ability to look at the correlation of the sector ETF to the current ticker you are looking at.
Ability to calculate the R2 value between the ticker you are looking at and each sector.
The ability to run a Two Tailed T-Test against the log returns of the Ticker of interest and the Sector (to analyze statistically significant returns between sectors/tickers).
The ability to analyze the distribution of returns across all sector ETFs.
The ability to pull buying and selling volume across all sector ETFs.
The ability to create an integrated moving average using a sector ETF to predict the expected close range of a ticker of interest.
These are the highlight functions. Below, I will go more into them, what they mean and how to use them.
Pulling Technicals
This is pretty straight forward. You can pull technicals, such as RSI, Stochastic and Z-Score from all the sector ETFs and view them in a table.
See below for the example:
Pulling Correlation
In order to see which sector your ticker of interest follows more closely, we need to look first at correlation and then at R2.
The correlation will look at the immediate relationship over a specified time. A highly positive value, indicates a strong, symbiotic relationship, which the sector and the ticker follow each other. This would be represented by a correlation of 0.8 or higher.
A strong negative correlation, such as -0.8 or lower, indicates that the sector and the ticker are completely opposite. When one goes up, the other goes down and vice versa.
You can adjust your correlation assessment length directly in the settings menu:
If you want to use a sector ETF to find the expected range for a ticker of interest, it is important to locate the highest, POSITIVE, correlation value. Here are the results for MSFT at a correlation lookback of 200:
In this example, we can see the best relationship is with the ETF XLK.
Analysis of R2
R2 is an important metric. It essentially measures how much of the variance between 2 tickers are explained by a simple, linear relationship.
A high R2 means that a huge degree of variance can be explained between the 2 tickers. A low R2 means that it cannot and that the 2 tickers are likely not integrated or closely related.
In general, if you want to use the sector ETF to find the mean and trading range and identify over-valuation/over-extension and under-extension statistically, you need to see both a high correlation and a high R-Squared. These 2 metrics should be analyzed together.
Let's take a look at MSFT:
Here, despite the correlation implying that XLK was the ticker we should use to analyze, when we look at the R Squared, we see actually, we should be using XLI.
XLI has a strong positive relationship with MSFT, albeit a bit less than XLK, but the R2 is solid, > 0.9, indicating the XLI explains much of MSFT's variance.
Two Tailed T-Test
A two tailed T-test analyzes whether there is a statistically significant difference between 2 different groups, or in our case, tickers.
The T-Test is conducted on the log returns of the ticker of interest and the sector. You then can see the P value results, whether it is significant or not. Let's look at MSFT again:
Looking at this, we can see there is no statistically significant difference in returns between MSFT and any of the sectors.
We can also see the SMA of the log returns for more detailed comparison.
If we were to observe a significant finding on the T-Test metrics, this would indicate that one sector either outperforms or underperforms your ticker to a statistically significant degree! If you stumble upon this, you would check the average log returns to compare against the average returns of your ticker of interest, to see whether there is better performance or worse performance from the sector ETF vs. your ticker of interest.
Analyzing the Distribution
The indicator will also analyze the distribution of returns.
This is an interesting option as it can help you ascertain risk. Normally distributed returns imply mean reverting behavviour. Deviations from that imply trending behaviour with higher risk expectancy. If we look at the distribution statistics currently over the last 200 trading days, here are the results:
Here, we can see all show signs of trending, as none of the returns are normally distributed. The highest risk sectors are XLK and XLY.
Why are they the highest risk?
Because the indicator has found a heavy right tailed distribution, indicated sudden and erratic mean reversion/losses are possible.
Creating an MA
Now for the big bonus of the indicator!
The indicator can actually create a regression based range from closely correlated sectors, so you can see, in sectors that are strongly correlated to your ticker, whether your ticker is over-bought, oversold or has mean reverted.
Let's look at MSFT using XLI, our previously identified sector with a high correlation and high R2 value:
The results are pretty impressive.
You can see that MSFT has rode the mean of the sector on the daily timeframe for quite some time. Each time it over extended itself above the sector implied range, it mean reverted.
Currently, if you were to trade based on Pairs or statistics, MSFT is no trade as it is currently trading at its sector mean.
If you are a visual person, you can have the indicator plot the mean reversion points directly:
Green represents a bullish mean reversion and red a bearish mean reversion.
Concluding Remarks
If you like pair trading, following the link between sectors and tickers or want a more objective way to determine whether a ticker is over-bought or oversold, this indicator can help you.
In addition to doing this, the indicator can provide risk insights into different sectors by looking at the distribution, as well as identify under-performing sectors or tickers.
It can also shed light on sectors that may be technically over-bought or oversold by looking at Z-Score, stochastics and RSI.
Its a whopper and I really hope you find it helpful and useful!
Thanks everyone for reading and checking this out!
Safe trades!
Gann Astronomical Turning PointsThis is a comprehensive Pine Script that implements W.D. Gann's astronomical theories to identify potential market turning points. Here's a detailed breakdown of the script:
Overview
The script identifies and displays astronomical events (sun angles, moon phases, and Mercury retrogrades) that Gann theorists believe correlate with market turning points. It also analyzes historical price performance following these events to provide statistical significance.
Key Components
1. Input Parameters
Date Range: Users can set the analysis period (start and end dates)
Display Options: Toggle visibility of different astronomical events and tables
Analysis Settings: Configure the lookback period for price change analysis (1-20 days)
2. Astronomical Calculations
The script includes several functions to calculate celestial positions:
getDaysSinceEpoch(t): Calculates days since January 1, 2000 (reference point)
getSunLongitude(t): Computes the Sun's position in the ecliptic (0-360°)
getMoonPhase(t): Determines the Moon's phase angle relative to the Sun
getMercuryLongitude(t): Calculates Mercury's position in the ecliptic
3. Gann Critical Angles (Sun Events)
The script identifies when the Sun reaches four critical angles that Gann considered significant:
0° Aries (Spring Equinox)
90° Cancer (Summer Solstice)
180° Libra (Fall Equinox)
270° Capricorn (Winter Solstice)
These are detected by tracking when the Sun's longitude crosses these specific angles.
4. Moon Phases
Four key moon phases are identified:
New Moon: Moon passes between Earth and Sun
First Quarter: Moon is 90° east of Sun
Full Moon: Moon is opposite the Sun
Last Quarter: Moon is 270° east of Sun
5. Mercury Retrograde Periods
The script detects when Mercury appears to move backward in its orbit:
Identifies start and end dates of retrograde motion
Displays these periods as highlighted zones on the chart
6. Price Change Analysis
For each astronomical event, the script:
Calculates the percentage price change over a user-defined lookback period
Categorizes changes as positive or negative
Stores this data for statistical analysis
7. Statistical Significance
The script calculates several metrics for each event type:
Average Price Change: Mean percentage change following events
Up/Down Ratio: Number of positive vs. negative changes
Accuracy Percentage: How often the dominant direction occurred
8. Visual Elements
The script includes multiple display components:
Event Labels
Sun Angles: Orange sun symbols displayed above price bars
Moon Phases: Moon phase emojis displayed below price bars
Mercury Retrograde: Red boxes highlighting the retrograde periods
Information Tables
Events Table: Shows upcoming and recent astronomical events
Significance Analysis Table: Displays statistical performance of each event type
Forecast Section: Identifies the next upcoming event and predicted direction
9. Forecasting Functionality
The script predicts market direction for the next astronomical event based on:
Historical average price change for that event type
Statistical accuracy of previous similar events
Color-coded forecast (green for bullish, red for bearish)
This script offers an interesting implementation of Gann's astronomical theories, but should be used as part of a broader analysis rather than as a standalone trading system.
Disclaimer: This indicator is for educational purposes only. Past performance does not guarantee future results. Always conduct your own research and risk assessment before trading.
Volumatic VIDYA – Pro+1. Professional & Clear (recommended for TradingView)
Volumatic VIDYA Pro+ combines a dynamic VIDYA trend filter, Delta Volume pressure, and automatic pattern recognition (Double/Triple Tops & Bottoms, Head & Shoulders).
A complete technical tool for detecting momentum shifts, trend reversals, and trade entries across multiple timeframes.
2. Short & Catchy
Adaptive VIDYA trendline + Delta Volume + Pattern detection in one tool.
Instantly visualize market bias, structure, and momentum strength.
3. Educational / Analytical
Analyze market dynamics with VIDYA-based trend filtering, volume delta analysis, and automated pattern recognition.
Ideal for traders who combine price action with quantitative confirmation.
Buy&Hold Profitcalculator in EuroTitle: Buy & Hold Strategy in Euro
Description:
This Pine Script implements a simple yet flexible Buy & Hold strategy denominated in Euros, suitable for a wide range of assets including cryptocurrencies, forex pairs, and stocks.
Key Features:
Custom Investment Amount: Define your invested capital in Euros.
Flexible Start & End Dates: Specify exact entry and exit dates for the strategy.
Automatic Currency Conversion: Supports assets priced in USD or USDT, converting the invested capital to chart currency using the EUR/USD exchange rate.
Single Entry and Exit: Executes a one-time Buy & Hold position based on the defined timeframe.
Profit and Performance Tracking: Calculates total profit/loss in Euros and percentage returns.
Smart Exit Label: Displays a dynamic label at the exit showing final position value, net profit/loss, and return percentage. The label automatically adjusts its position above or below the price bar for optimal visibility.
Visual Enhancements:
Position value and profit/loss plotted on the chart.
Background color highlights the active investment period.
Buy and Sell markers clearly indicate entry and exit points.
This strategy is ideal for traders and investors looking to simulate long-term positions and evaluate performance in Euro terms, even when trading USD-denominated assets.
Usage Notes:
Best used on daily charts for medium- to long-term analysis.
Adjust start and end dates, as well as invested capital, to simulate different scenarios.
Works with any asset, but currency conversion is optimized for USD or USDT-pegged instruments.
3D Institutional Battlefield [SurgeGuru]Professional Presentation: 3D Institutional Flow Terrain Indicator
Overview
The 3D Institutional Flow Terrain is an advanced trading visualization tool that transforms complex market structure into an intuitive 3D landscape. This indicator synthesizes multiple institutional data points—volume profiles, order blocks, liquidity zones, and voids—into a single comprehensive view, helping you identify high-probability trading opportunities.
Key Features
🎥 Camera & Projection Controls
Yaw & Pitch: Adjust viewing angles (0-90°) for optimal perspective
Scale Controls: Fine-tune X (width), Y (depth), and Z (height) dimensions
Pro Tip: Increase Z-scale to amplify terrain features for better visibility
🌐 Grid & Surface Configuration
Resolution: Adjust X (16-64) and Y (12-48) grid density
Visual Elements: Toggle surface fill, wireframe, and node markers
Optimization: Higher resolution provides more detail but requires more processing power
📊 Data Integration
Lookback Period: 50-500 bars of historical analysis
Multi-Source Data: Combine volume profile, order blocks, liquidity zones, and voids
Weighted Analysis: Each data source contributes proportionally to the terrain height
How to Use the Frontend
💛 Price Line Tracking (Your Primary Focus)
The yellow price line is your most important guide:
Monitor Price Movement: Track how the yellow line interacts with the 3D terrain
Identify Key Levels: Watch for these critical interactions:
Order Blocks (Green/Red Zones):
When yellow price line enters green zones = Bullish order block
When yellow price line enters red zones = Bearish order block
These represent institutional accumulation/distribution areas
Liquidity Voids (Yellow Zones):
When yellow price line enters yellow void areas = Potential acceleration zones
Voids indicate price gaps where minimal trading occurred
Price often moves rapidly through voids toward next liquidity pool
Terrain Reading:
High Terrain Peaks: High volume/interest areas (support/resistance)
Low Terrain Valleys: Low volume areas (potential breakout zones)
Color Coding:
Green terrain = Bullish volume dominance
Red terrain = Bearish volume dominance
Purple = Neutral/transition areas
📈 Volume Profile Integration
POC (Point of Control): Automatically marks highest volume level
Volume Bins: Adjust granularity (10-50 bins)
Height Weight: Control how much volume affects terrain elevation
🏛️ Order Block Detection
Detection Length: 5-50 bar lookback for block identification
Strength Weighting: Recent blocks have greater impact on terrain
Candle Body Option: Use full candles or body-only for block definition
💧 Liquidity Zone Tracking
Multiple Levels: Track 3-10 key liquidity zones
Buy/Sell Side: Different colors for bid/ask liquidity
Strength Decay: Older zones have diminishing terrain impact
🌊 Liquidity Void Identification
Threshold Multiplier: Adjust sensitivity (0.5-2.0)
Height Amplification: Voids create significant terrain depressions
Acceleration Zones: Price typically moves quickly through void areas
Practical Trading Application
Bullish Scenario:
Yellow price line approaches green order block terrain
Price finds support in elevated bullish volume areas
Terrain shows consistent elevation through key levels
Bearish Scenario:
Yellow price line struggles at red order block resistance
Price falls through liquidity voids toward lower terrain
Bearish volume peaks dominate the landscape
Breakout Setup:
Yellow price line consolidates in flat terrain
Minimal resistance (low terrain) in projected direction
Clear path toward distant liquidity zones
Pro Tips
Start Simple: Begin with default settings, then gradually customize
Focus on Yellow Line: Your primary indicator of current price position
Combine Timeframes: Use the same terrain across multiple timeframes for confluence
Volume Confirmation: Ensure terrain peaks align with actual volume spikes
Void Anticipation: When price enters voids, prepare for potential rapid movement
Order Blocks & Voids Architecture
Order Blocks Calculation
Trigger: Price breaks fractal swing points
Bullish OB: When close > swing high → find lowest low in lookback period
Bearish OB: When close < swing low → find highest high in lookback period
Strength: Based on price distance from block extremes
Storage: Global array maintains last 50 blocks with FIFO management
Liquidity Voids Detection
Trigger: Price gaps exceeding ATR threshold
Bull Void: Low - high > (ATR200 × multiplier)
Bear Void: Low - high > (ATR200 × multiplier)
Validation: Close confirms gap direction
Storage: Global array maintains last 30 voids
Key Design Features
Real-time Updates: Calculated every bar, not just on last bar
Global Persistence: Arrays maintain state across executions
FIFO Management: Automatic cleanup of oldest entries
Configurable Sensitivity: Adjustable lookback periods and thresholds
Scientific Testing Framework
Hypothesis Testing
Primary Hypothesis: 3D terrain visualization improves detection of institutional order flow vs traditional 2D charts
Testable Metrics:
Prediction Accuracy: Does terrain structure predict future support/resistance?
Reaction Time: Faster identification of key levels vs conventional methods
False Positive Reduction: Lower rate of failed breakouts/breakdowns
Control Variables
Market Regime: Trending vs ranging conditions
Asset Classes: Forex, equities, cryptocurrencies
Timeframes: M5 to H4 for intraday, D1 for swing
Volume Conditions: High vs low volume environments
Data Collection Protocol
Terrain Features to Quantify:
Slope gradient changes at price inflection points
Volume peak clustering density
Order block terrain elevation vs subsequent price action
Void depth correlation with momentum acceleration
Control Group: Traditional support/resistance + volume profile
Experimental Group: 3D Institutional Flow Terrain
Statistical Measures
Signal-to-Noise Ratio: Terrain features vs random price movements
Lead Time: Terrain formation ahead of price confirmation
Effect Size: Performance difference between groups (Cohen's d)
Statistical Power: Sample size requirements for significance
Validation Methodology
Blind Testing:
Remove price labels from terrain screenshots
Have traders identify key levels from terrain alone
Measure accuracy vs actual price action
Backtesting Framework:
Automated terrain feature extraction
Correlation with future price reversals/breakouts
Monte Carlo simulation for significance testing
Expected Outcomes
If hypothesis valid:
Significant improvement in level prediction accuracy (p < 0.05)
Reduced latency in institutional level identification
Higher risk-reward ratios on terrain-confirmed trades
Research Questions:
Does terrain elevation reliably indicate institutional interest zones?
Are liquidity voids statistically significant momentum predictors?
Does multi-timeframe terrain analysis improve signal quality?
How does terrain persistence correlate with level strength?
LuxAlgo BigBeluga hapharmonic
VIX/VVIX Spike RiskVIX/VVIX Spike Risk Analyzer
The VIX/VVIX Spike Risk Analyzer analyzes historical VIX behavior under similar market conditions to forecast future VIX spike risk.
By combining current VIX and VVIX levels as dual filters, it identifies historical precedents and calculates the probability and magnitude of VIX spikes over the next 1, 5, and 10 trading days.
IMPORTANT: This indicator must be applied to the VIX chart (CBOE:VIX) to function correctly.
Methodology
1. Dual-Filter Pattern Matching
The indicator uses both VIX and VVIX as simultaneous filters to identify historically analogous market conditions:
By requiring BOTH metrics to match historical levels, the indicator creates more precise market condition filters than using VIX alone. This dual-filter approach significantly improves predictive accuracy because:
VIX alone might be at 15, but VVIX can tell us if that 15 is stable (low VVIX) or explosive (high VVIX)
High VVIX + Low VIX often precedes major spikes
Low VVIX + Low VIX suggests sustained calm
2. Tolerance Settings
VIX Matching (Default: ±10% Relative)
Uses relative percentage matching for consistency across different VIX regimes
Example: VIX at 15 matches 13.5-16.5 (±10%)
Can switch to absolute tolerance (±5 points) if preferred
VVIX Matching (Default: ±10 Points Absolute)
Uses absolute point matching as VVIX scales differently
Example: VVIX at 100 matches 90-110
Can switch to relative percentage if preferred
3. Historical Analysis Window
The indicator scans up to 500 bars backward (limited by VVIX data availability) to find all historical periods where both VIX and VVIX were at similar levels. Each match becomes a "sample" for statistical analysis.
4. Forward-Looking Spike Analysis
For each historical match, the indicator measures VIX behavior over the next 1, 5, and 10 days
Display Metrics Explained
Average Highest Spike
Shows the average of the maximum VIX spikes observed.
Highest Single Spike
Shows the single largest spike ever recorded
Probability No 10% Spike
Shows what percentage of historical cases stayed BELOW a 10% spike:
Probability No 20% Spike
Shows what percentage of historical cases stayed BELOW a 20% spike:
Note : You'll see many more shaded bars than the sample count because each match creates up to 5 consecutive shaded bars (bars 1-5 after the match all "look back" and see it).
Short Volatility Strategies:
Enter when there's a LOW probability of big vol spikes based on today's metrics
Long Volatility Strategies
Enter when there's a HIGH probability of big vol spikes based on today's metrics
VIX Regime AnalyzerVIX Regime Analyzer
The VIX Regime Analyzer is an analytical tool that examines historical VIX patterns to provide insights into how your asset typically performs under similar volatility conditions.
Key Features:
Historical Pattern Matching: Automatically scans up to 1,000 bars of history to find all periods when VIX was at levels similar to today, using customizable tolerance ranges (absolute or percentage-based).
Forward-Looking Statistics: For each VIX regime match, calculates what actually happened to your asset over the next 1, 5, 10, and 20 trading days, providing both average returns and probability of positive outcomes.
Regime Classification System: Intelligently categorizes the current market environment as bullish or bearish: Visual Historical Context:
Background shading throughout your chart highlights every historical period when VIX matched current levels, color-coded by subsequent performance (green for gains, red for losses).
User Inputs:
VIX Level Tolerance (+/-): How closely VIX must match (default: ±5 points)
Use Relative Tolerance (%): Switch to percentage-based matching for consistency across different VIX levels
Lookback Period: How many bars to analyze
Highlight Historical VIX Matches: Toggle background highlighting of past matching periods
The Data Table
The statistics box appears in the right handside of your chart and contains three main sections:
Section 1: VIX REGIME
Current VIX: The live VIX closing price
Range: The tolerance band being searched (e.g., if VIX is 18 with ±5 tolerance, range is 13-23)
Historical Samples: Number of matching periods found in the lookback window (minimum 10 required for statistical validity)
Section 2: FORWARD RETURN
Shows the average percentage change in your asset over different timeframes following similar VIX levels:
Avg Next Day: What typically happened by the next trading session
Avg Next 5 Days: Average 5-day forward performance
Avg Next 10 Days: Average 10-day forward performance
Avg Next 20 Days: Average 20-day forward performance (approximately 1 month)
Section 3: PROBABILITY UP
Shows the win rate - the percentage of times your asset closed higher after VIX matched current levels:
Next Day: Probability of being up the next session
Next 5 Days: Probability of being up after 5 days
Next 10 Days: Probability of being up after 10 days
Next 20 Days: Probability of being up after 20 days
Colors:
🟢 Green: Bullish regimes (various strengths)
🔴 Red: Bearish regimes (various strengths)
🟡 Yellow: Choppy/uncertain regime
When "Highlight Historical VIX Matches" is enabled:
Scroll back through your chart and you'll see colored backgrounds highlighting every period when VIX matched today's level. The color tells you whether that match led to gains (green) or losses (red). This provides instant visual pattern recognition - you can quickly see if similar VIX levels historically led to bullish or bearish outcomes.
Practical Example:
If you see that most historical periods with similar VIX levels are highlighted in green, it suggests the current VIX level has historically been a bullish signal for your asset.
How The Indicator Makes Decisions
The regime classification uses both magnitude AND probability to avoid false signals:
Example of Strong Classification:
Average 5-day return: +1.5%
Win rate: 65%
Result: STRONG BULLISH (both high return and high probability)
Example of Weak Signal:
Average 5-day return: +2.0%
Win rate: 35%
Result: CHOPPY (high average but low consistency = unreliable)
This dual-factor approach ensures the indicator doesn't mislead you with regimes that had a few huge winners but mostly losers, or vice versa.
Best Practices
Combine with your existing strategy: Use this as a regime filter rather than standalone signals
Check sample size: More historical matches = more reliable statistics
Consider multiple timeframes: If 5-day and 20-day metrics disagree, proceed with caution
Asset-specific tuning: Different assets may require different tolerance settings
VIX spikes: The indicator is particularly useful during VIX spikes to understand if panic is justified
What Makes This Different
Unlike simple VIX indicators that just plot the fear index, this tool:
Quantifies the actual impact of VIX levels on YOUR specific asset
Provides probability-based forecasts rather than subjective interpretation
Shows historical context visually so you can see patterns at a glance
Uses rigorous statistical criteria to avoid false regime classifications
High and low statisticsHigh/Low Pattern Analyzer (All Timeframes)
Ever wonder if there's a hidden pattern in the market?
Does the high of the week usually happen on a Tuesday?
Does the low of the month always form in the first week?
Which 15-minute candle really sets the high for the entire day?
This indicator is a powerful statistical tool designed to answer these questions by analyzing historical price action to find patterns in when the high and low of a period are formed.
The Core Idea: Daily High & Low of the Week
The simplest and most popular feature of this indicator is the "Daily high and low of the week" analysis.
What it does:
It looks back over your chosen number of weeks (e.g., the last 100) and finds out which day of the week (Monday, Tuesday, Wednesday, etc.) made the final high and which day made the final low for each of those weeks.
How to use it:
Go to the script settings.
Enable the "Daily High/Low of the Week" module.
Set your chart to the 1D (Daily) timeframe.
A table will appear on your chart (bottom-right by default) showing the exact count and percentage for each day. This lets you see at a glance if there's a strong tendency for the market you're watching.
Advanced Analysis: Other Timeframes
This script goes far beyond just the daily chart. It includes four other independent analysis modules:
1. 4-Hour High/Low of the Week
What it does: For intraday and swing traders. This module finds which 4-hour candle session (e.g., the 08:00 candle, the 16:00 candle) tends to form the high or low of the entire week.
Key Feature (DST Aware): This table is "season-aware." It knows that the 08:00 "summertime" (DST) candle is the same trading session as the 07:00 "wintertime" (STD) candle. It groups them together so your data is never split or messy.
2. Weekly High/Low of the Month
What it does: For a monthly perspective. This module finds which week of the month (Week 1, 2, 3, 4, or 5) is most likely to form the monthly high or low.
How to use: Enable it and set your chart to the 1W (Weekly) timeframe.
3. Monthly High/Low of the Year
What it does: The ultimate "big picture" view. This module finds which month (Jan, Feb, Mar, etc.) most frequently forms the high or low for the entire year.
How to use: Enable it and set your chart to the 1M (Monthly) timeframe.
The Power User Module: Custom Timeframe Analysis
This is the most powerful feature. It lets you analyze any timeframe combination you want.
What it does: It finds out which "Lower Timeframe" (LTF) candle made the high or low of any "Higher Timeframe" (HTF) you choose.
Example: Do you want to know which 15-minute candle makes the Daily high?
Set your chart to the 15M timeframe.
Go to the "Custom Timeframe Analysis" settings.
Set the "Higher Timeframe" to "1D".
The script will draw a "season-aware" table (just like the 4H module) showing you the exact 15-minute candles (09:15, 09:30, etc.) that are statistically most likely to form the day's high or low.
Other Features
Show Labels: Each module has an option to "Show labels," which will draw a label (e.g., "Daily High of the Week") directly on the chart at the exact bar that made the high or low.
Custom Dividers: Each module has its own optional, color-customizable divider (e.g., weekly, monthly) that you can toggle on to see the periods more clearly.
Clean Settings: All modules are disabled by default (except for "Daily") to keep your chart clean. You only need to enable the specific analysis you want to see.
This tool was built to turn your curiosity about market patterns into actionable, statistical data. Enjoy!
Trailing 12M % Gain/Lossthis script shows profit or loss for training 12 months, works only on daily time frame
[KF] Multi-Duration Rate Expectations IndicatorAfter last fed cut in Oct then following jump in rates, I was frustrated at not having access to good rate expectations vs actual because the market usually prices in prior to fed action. This indicator was developed to make futures market rate expectations accessible and interpretable without requiring professional bond analytics systems.
Summary
This Pine Script indicator reveals what the futures market expects for interest rates across three key durations: Fed Funds (overnight), 2-Year, and 10-Year Treasury yields. By comparing futures-implied rates against current spot yields, it provides a clear visual signal of whether the market expects rates to rise, fall, or remain steady.
Understanding Rate Futures
Fed Funds futures (ZQ1!) use a simple design where the expected rate equals 100 minus the futures price. If ZQ1! trades at 96.12, the market expects a 3.88% Fed Funds rate. Treasury futures work differently - they trade as bond prices (typically 102-115) that move inversely to yields. Converting Treasury futures to implied yields requires complex bond mathematics involving duration and conversion factors.
This indicator solves the Treasury futures complexity by implementing a self-calibrating sensitivity model. It observes the historical relationship between futures prices and yields, then uses this to project rate expectations. The model also compares front-month to next-month contracts to detect expected rate direction, automatically adapting as market conditions change.
How to Use
Add the indicator to any chart and select your desired duration in the settings. The display shows the futures-implied rate, current yield, and the difference between them. Green indicates the market expects higher rates, red means lower expectations, and gray shows expectations in line with current rates.
The indicator excels at identifying divergences between market expectations and current rates, which often precede rate movements or futures repricing. Comparing expectations across different durations reveals insights about yield curve positioning and Fed policy anticipation.
Technical Note
While Fed Funds futures provide exact rate expectations, Treasury futures conversions are sophisticated approximations that provide reliable directional signals and reasonable magnitude estimates sufficient for most trading applications.
Deep Analyst - HorizontalDeep Analyst – Multi-Layer Market Intelligence Dashboard - Horizontal
Description:
The Deep Analyst indicator is an advanced multi-factor technical dashboard that consolidates key market signals into a single, intuitive on-chart table. It provides real-time insights across trend, momentum, volatility, sentiment, and volume dynamics — helping traders quickly assess overall market conditions and directional strength.
Features:
Trend Analysis: Detects short- and long-term direction using moving averages and custom trend-strength logic.
Moving Averages Setup: Evaluates MA alignment and crossover conditions (Golden/Death Cross).
Dual SuperTrend System: Combines fast and slow ATR-based SuperTrends to identify strong or weak bullish/bearish phases.
DMI + ADX: Measures directional strength and momentum intensity with visual feedback on rising or falling ADX.
RSI & Stochastic: Captures overbought/oversold conditions and short-term oscillations with sentiment coloring.
MACD: Tracks momentum transitions and crossovers for early signal confirmation.
Sentiment Gauge: Aggregates RSI, MACD, and price-action bias to form a clear BULL/BEAR/NEUTRAL sentiment reading.
Choppiness Index: Distinguishes between trending and ranging markets with dynamic status updates.
ATR Monitor: Evaluates volatility levels (HIGH/LOW/NORMAL) and direction of volatility change.
Volume Delta Analysis: Measures buy/sell pressure balance and strength of participation (BUY/SELL/STRONG signals).
Customizable Table Layout: Adjustable position, colors, and background for seamless chart integration.
Usage:
Ideal for traders who want a holistic, real-time technical overview without switching between multiple indicators. The Deep Analyst condenses core market analytics into a compact visual panel — making it easy to interpret trend alignment, momentum shifts, and sentiment transitions at a glance.
Adaptive Cortex Strategy (ACS)Strategy Title: Adaptive Cortex Strategy (ACS)
This script is invite-only.
Part 1: Philosophy and the Fundamental Problem It Solves
Adaptive Cortex Strategy (ACS) is an advanced decision support system designed to dynamically adapt to the ever-changing characteristics of the market. A major weakness of traditional approaches is that while successful in a specific market condition (e.g., a strong trend), they become ineffective when the market changes course (e.g., enters a sideways range). ACS solves this problem by continuously analyzing the market's current "regime" and instantly adapting its decision-making logic accordingly.
Its primary goal is to enable the strategy itself to "think" and evolve with the market, without requiring the trader to change their strategy.
Part 2: Original Methodology and Proprietary Logic
A Note on the Original Methodology and Intellectual Property
This algorithm is not based on or copied from any open-source strategy code. The system utilizes the mathematical principles of widely accepted indicators such as ADX, RSI, and Ichimoku as data sources for its analyses.
However, the intellectual property and unique value of the algorithm lies in its unique and closed-source architecture that processes, prioritizes, and synthesizes data from these standard tools. The methods used in core components, particularly the adaptive 'Cortex' memory system and statistical 'Forecast' engine, represent a unique set of logic developed from scratch for this script. The parameters, order of operations, and conditional logic are entirely custom-designed. Therefore, the system's performance is a result of its unique design, not a repetition of publicly available code.
ACS's power lies not in the individual indicators it uses, but in the unique and proprietary logic layers that process the information from these indicators.
1. Multi-Factor Scoring and Adaptive Weighting:
The heart of the methodology is a scoring system that analyzes the market in four main categories: Trend, Support/Resistance, Momentum, and Volume. However, what makes ACS unique is that it dynamically changes the importance it assigns to these categories based on the market regime.
Unique Application: Using ADX, DMI, and ATR indicators, the system detects whether the market is in different regimes, such as "Strong Trend" or "High Volatility Squeeze." When it detects a strong trend, it automatically increases the weight of the Trend scores from the Ichimoku and proprietary AMF Trend Engine. When it detects sideways or tightness, it shifts its focus to Support/Resistance zones determined by Dynamic Channels and the author's "Cortex" Memory System. A different approach was added here, inspired by the classic Fibonacci estimation. This "adaptive weighting" ensures that the strategy always focuses its attention on the most appropriate area.
2. Statistical Forecast Engine:
ACS goes beyond standard indicators and includes a proprietary forecasting algorithm that measures the probability of a potential price movement's success.
Unique Implementation: The system stores the results of past tests (successful bounces/breakouts) at key price levels in a "brain" (memory). At the time of a new test, it compares the current RSI momentum, volume anomalies, and market regime with similar past situations. Based on this comparison, it calculates the probability of the current test being successful as a statistical percentage and adds this percentage to the final score as a "bonus" or "penalty."
3. Walk-Forward Architecture:
Markets constantly evolve. ACS continues to learn from the latest market dynamics by resetting its memory at regular intervals (e.g., monthly) through its "Re-Learn Mode," rather than being trapped by old data. This is an advanced approach aimed at ensuring the strategy remains current and effective over the long term.
Part 3: Practical Features and User Benefits
HOW DOES IT HELP INVESTORS?
Customizable Trading Profiles: ACS does not come with a single set of settings. Users can instantly adapt all the algorithm's key periods and decision thresholds to their trading style by selecting one of the pre-configured trading profiles, such as "SCALPING," "INTRADAY TREND," or "SWING TRADE." Additionally, they can further fine-tune the selected profile with "Speed Adjustment."
Full Automation Compatibility (JSON): The strategy is equipped with fully configurable JSON-formatted alert messages for buy, sell, and position closing transactions. This makes it possible to establish a fully automated trading system by connecting ACS signals to automation platforms such as 3Commas and PineConnector. Dynamic values such as position size ({{strategy.order.contracts}}) are automatically added to alerts.
Advanced and Adaptive Risk Management: Protecting capital is as important as making a profit. ACS offers a multi-layered risk management framework for this purpose:
Flexible Position Size: Allows you to set the risk for each trade as a percentage of capital or a fixed dollar amount.
Adaptive ATR Stop: The stop-loss level is dynamically expanded or contracted based on current market volatility (the ratio of short-term ATR to long-term ATR).
Contingency Mechanisms: Includes safety nets such as "Maximum Drawdown Protection" and the "Praetorian Guard" engine, which detects sudden market shocks.
Clear and Comprehensible Dashboard: Transforms dozens of complex data points into an intuitive dashboard that provides critical information such as market trends, major trends, support/resistance zones, and final signals at a glance.
Section 4: Disclaimers and Rules
Transparency Note: This algorithm uses the mathematical foundations of publicly available indicators such as ADX, ATR, RSI, and Ichimoku. However, ACS's intellectual property and unique value lies in its unique architecture, which combines data from these standard tools, prioritizes it by market trend, and synthesizes it with its proprietary "Cortex" and "Statistical Forecast" engines.
Educational Use:
IMPORTANT WARNING: The Adaptive Cortex Strategy is a professional decision support and analysis tool. It is NOT a system that promises "guaranteed profits." All trading activities involve the risk of capital loss. Past performance is no guarantee of future results. All signals and analysis generated by this script are for educational purposes only and should not be construed as investment advice. Users are solely responsible for applying their own risk management rules and making their final trading decisions.
Strategy Backtest Information
Please remember that past performance is not indicative of future results. The published chart and performance report were generated on the 4-hour timeframe of the BTC/USD pair with the following settings:
Test Period: January 1, 2016 - November 2, 2025
Default Position Size: 15% of Capital
Pyramiding: Closed
Commission: 0.0008
Slippage: 2 ticks (Please enter the slippage you used in your own tests)
Testing Approach: The published test includes 123 trades and is statistically significant. It is strongly recommended that you test on different assets and timeframes for your own analysis. The default settings are a template and should be adjusted by the user for their own analysis.
True Range + Average True Range (Status Line Only)This simple yet powerful indicator displays True Range (TR) and Average True Range (ATR) values directly in your TradingView status line, without cluttering your chart.
It’s designed for traders who want to quickly monitor volatility and price range expansion in real time.
⚙️ Features:
Real-time updating TR & ATR values
Clean and minimal — no chart clutter
Customizable ATR length and smoothing method (RMA, SMA, EMA, WMA)
Works on all timeframes and symbols
📈 Use Cases:
Monitor volatility changes during trading sessions
Confirm breakout strength or volatility contraction
Combine with price action or volume-based setups
Doctor Scalp (BUY/SELL) [by Adi]A script for fast scalping using. Works best with a 5-minute-to-1-hour interval.
Ultimate Parabolic SAR with Advanced Signal 1.0# 📊 Ultimate Parabolic SAR with Advanced Signal
## Overview
The **Ultimate Parabolic SAR** is a comprehensive trading indicator that enhances the classic Parabolic SAR with advanced multi-indicator filtering, customizable signal generation, and multi-timeframe analysis. Perfect for traders of all styles - from scalping to swing trading.
## 🎯 Key Features
### 1. **Smart Trading Modes**
Pre-configured PSAR settings optimized for different trading styles:
- **Futures 1m** (0.04/0.03/0.4) - Ultra-fast scalping
- **Scalping/Futures 15m** (0.03/0.02/0.25) - Quick intraday trades
- **Day Trade 1h-4h** (0.02/0.02/0.2) - Standard intraday trading
- **Swing Trade 1D** (0.01/0.01/0.15) - Position trading
- **Custom** - Full manual control
### 2. **Advanced Signal Filtering System**
Combine up to 6 technical indicators to filter entry signals:
- ✅ **RSI Filter** - Avoid overbought/oversold zones
- ✅ **MACD Filter** - Confirm momentum direction
- ✅ **Stochastic RSI** - Additional momentum validation
- ✅ **MA Filter** - 20/50 Moving Average trend confirmation
- ✅ **EMA Filter** - 20/50 Exponential Moving Average trend
- ✅ **SMA Filter** - 200 Simple Moving Average long-term trend
*Enable filters individually or combine them for higher-quality signals*
### 3. **Multi-Timeframe (MTF) Dashboard**
Real-time percentage change analysis across 6 timeframes:
- 5m, 15m, 1h, 4h, 1D, 1W
- Color-coded arrows (▲ Green = Up, ▼ Red = Down)
- Fully customizable: toggle timeframes, adjust size & position
- Instant market sentiment overview
### 4. **Highly Customizable Visuals**
- **Buy/Sell Signals**: Adjustable size (Tiny/Small/Normal/Large)
- **Signal Offset**: Fine-tune label positioning
- **Color Customization**: Separate colors for Buy/Sell labels
- **Start Points**: Optional small dots at PSAR reversals
- **State Highlighting**: Visual background fill for trend direction
### 5. **Multiple Moving Averages Display**
Independent visualization of trend indicators:
- MA 20 & MA 50 (Simple Moving Averages)
- EMA 20 & EMA 50 (Exponential Moving Averages)
- SMA 200 (Long-term trend)
- Custom colors for each line
- Show/hide independently from filter usage
## 📈 How to Use
### Basic Setup
1. Add indicator to chart
2. Choose a **Trading Mode** that matches your timeframe
3. Optionally enable **Signal Filters** for cleaner entries
4. Watch for **Buy/Sell** labels on PSAR reversals
### Conservative Approach
Enable multiple filters for higher-quality signals:
```
✅ RSI Filter
✅ MACD Filter
✅ EMA Trend Filter
✅ SMA Filter
```
*Result: Fewer but more reliable signals*
### Aggressive Approach
Use PSAR alone or with minimal filtering:
```
❌ All filters OFF
```
*Result: More frequent trading opportunities*
### Multi-Timeframe Confirmation
1. Enable MTF Table (top-right by default)
2. Check if multiple timeframes align
3. Enter trades when 3+ timeframes show same direction
4. Example: 15m ▲, 1h ▲, 4h ▲ = Strong uptrend
## 🎨 Customization Options
### Entry Signal Settings
- Show/Hide Buy/Sell signals
- Adjust label size for visibility
- Offset labels to avoid chart clutter
- Custom colors for Buy (default: green) and Sell (default: orange)
### MTF Table Settings
- Position: Top/Bottom, Left/Right corners
- Text size: Tiny to Large
- Toggle individual timeframes (5m to 1W)
- Custom background and text colors
### Visual Elements
- PSAR point width adjustment
- Highlight PSAR reversal points
- Trend state background highlighting
- Independent MA/EMA/SMA line display
## 💡 Trading Strategies
### Strategy 1: Trend Following
```
Mode: Day Trade 1h-4h
Filters: EMA + SMA enabled
MTF: Check 4h and 1D alignment
Entry: Buy when all confirm uptrend
```
### Strategy 2: Momentum Scalping
```
Mode: Scalping/Futures 15m
Filters: RSI + MACD enabled
MTF: Focus on 5m and 15m
Entry: Quick in/out on momentum shifts
```
### Strategy 3: Swing Trading
```
Mode: Swing Trade 1D
Filters: All enabled for quality
MTF: Check 1D and 1W trends
Entry: Patient entries at major reversals
```
## ⚠️ Important Notes
- **Not Financial Advice**: This indicator is for educational purposes only
- **Backtest First**: Test settings on your preferred assets before live trading
- **Combine with Risk Management**: Always use stop-losses and position sizing
- **Market Conditions**: Indicator performs best in trending markets
- **False Signals**: All indicators can produce false signals - no system is perfect
## 🔧 Technical Details
- **Pine Script Version**: v6
- **Overlay**: Yes (plots on main chart)
- **Repainting**: No - signals appear in real-time and don't repaint
- **Calculations**: Uses request.security for MTF data
- **Performance**: Optimized for fast loading and minimal lag
## 📊 Best Practices
1. **Start Simple**: Use one trading mode without filters initially
2. **Add Filters Gradually**: Enable one filter at a time to understand impact
3. **Match Timeframes**: Use timeframe-appropriate trading mode
4. **Monitor MTF Dashboard**: Confirm trade direction across timeframes
5. **Adjust to Market**: Change modes for ranging vs. trending markets
## 🎓 Educational Value
Perfect for traders learning:
- Parabolic SAR indicator mechanics
- Multi-indicator confirmation strategies
- Timeframe analysis techniques
- Risk management through filtered signals
- Visual chart analysis and pattern recognition
## 📝 Version History
**Current Version**: 1.0
- Initial release with full feature set
- 5 trading modes
- 6 indicator filters
- MTF dashboard with 6 timeframes
- Comprehensive customization options
---
## 🙏 Credits
Parabolic SAR original concept by J. Welles Wilder Jr.
## 📧 Support
For questions, suggestions, or bug reports, please comment below or message directly.
---
**Happy Trading! 🚀**
*Remember: The best indicator is the one you understand and use consistently.*
Ultimate Parabolic SAR with Advanced Signal# 📊 Ultimate Parabolic SAR with Advanced Signal
## Overview
The **Ultimate Parabolic SAR** is a comprehensive trading indicator that enhances the classic Parabolic SAR with advanced multi-indicator filtering, customizable signal generation, and multi-timeframe analysis. Perfect for traders of all styles - from scalping to swing trading.
## 🎯 Key Features
### 1. **Smart Trading Modes**
Pre-configured PSAR settings optimized for different trading styles:
- **Futures 1m** (0.04/0.03/0.4) - Ultra-fast scalping
- **Scalping/Futures 15m** (0.03/0.02/0.25) - Quick intraday trades
- **Day Trade 1h-4h** (0.02/0.02/0.2) - Standard intraday trading
- **Swing Trade 1D** (0.01/0.01/0.15) - Position trading
- **Custom** - Full manual control
### 2. **Advanced Signal Filtering System**
Combine up to 6 technical indicators to filter entry signals:
- ✅ **RSI Filter** - Avoid overbought/oversold zones
- ✅ **MACD Filter** - Confirm momentum direction
- ✅ **Stochastic RSI** - Additional momentum validation
- ✅ **MA Filter** - 20/50 Moving Average trend confirmation
- ✅ **EMA Filter** - 20/50 Exponential Moving Average trend
- ✅ **SMA Filter** - 200 Simple Moving Average long-term trend
*Enable filters individually or combine them for higher-quality signals*
### 3. **Multi-Timeframe (MTF) Dashboard**
Real-time percentage change analysis across 6 timeframes:
- 5m, 15m, 1h, 4h, 1D, 1W
- Color-coded arrows (▲ Green = Up, ▼ Red = Down)
- Fully customizable: toggle timeframes, adjust size & position
- Instant market sentiment overview
### 4. **Highly Customizable Visuals**
- **Buy/Sell Signals**: Adjustable size (Tiny/Small/Normal/Large)
- **Signal Offset**: Fine-tune label positioning
- **Color Customization**: Separate colors for Buy/Sell labels
- **Start Points**: Optional small dots at PSAR reversals
- **State Highlighting**: Visual background fill for trend direction
### 5. **Multiple Moving Averages Display**
Independent visualization of trend indicators:
- MA 20 & MA 50 (Simple Moving Averages)
- EMA 20 & EMA 50 (Exponential Moving Averages)
- SMA 200 (Long-term trend)
- Custom colors for each line
- Show/hide independently from filter usage
## 📈 How to Use
### Basic Setup
1. Add indicator to chart
2. Choose a **Trading Mode** that matches your timeframe
3. Optionally enable **Signal Filters** for cleaner entries
4. Watch for **Buy/Sell** labels on PSAR reversals
### Conservative Approach
Enable multiple filters for higher-quality signals:
```
✅ RSI Filter
✅ MACD Filter
✅ EMA Trend Filter
✅ SMA Filter
```
*Result: Fewer but more reliable signals*
### Aggressive Approach
Use PSAR alone or with minimal filtering:
```
❌ All filters OFF
```
*Result: More frequent trading opportunities*
### Multi-Timeframe Confirmation
1. Enable MTF Table (top-right by default)
2. Check if multiple timeframes align
3. Enter trades when 3+ timeframes show same direction
4. Example: 15m ▲, 1h ▲, 4h ▲ = Strong uptrend
## 🎨 Customization Options
### Entry Signal Settings
- Show/Hide Buy/Sell signals
- Adjust label size for visibility
- Offset labels to avoid chart clutter
- Custom colors for Buy (default: green) and Sell (default: orange)
### MTF Table Settings
- Position: Top/Bottom, Left/Right corners
- Text size: Tiny to Large
- Toggle individual timeframes (5m to 1W)
- Custom background and text colors
### Visual Elements
- PSAR point width adjustment
- Highlight PSAR reversal points
- Trend state background highlighting
- Independent MA/EMA/SMA line display
## 💡 Trading Strategies
### Strategy 1: Trend Following
```
Mode: Day Trade 1h-4h
Filters: EMA + SMA enabled
MTF: Check 4h and 1D alignment
Entry: Buy when all confirm uptrend
```
### Strategy 2: Momentum Scalping
```
Mode: Scalping/Futures 15m
Filters: RSI + MACD enabled
MTF: Focus on 5m and 15m
Entry: Quick in/out on momentum shifts
```
### Strategy 3: Swing Trading
```
Mode: Swing Trade 1D
Filters: All enabled for quality
MTF: Check 1D and 1W trends
Entry: Patient entries at major reversals
```
## ⚠️ Important Notes
- **Not Financial Advice**: This indicator is for educational purposes only
- **Backtest First**: Test settings on your preferred assets before live trading
- **Combine with Risk Management**: Always use stop-losses and position sizing
- **Market Conditions**: Indicator performs best in trending markets
- **False Signals**: All indicators can produce false signals - no system is perfect
## 🔧 Technical Details
- **Pine Script Version**: v6
- **Overlay**: Yes (plots on main chart)
- **Repainting**: No - signals appear in real-time and don't repaint
- **Calculations**: Uses request.security for MTF data
- **Performance**: Optimized for fast loading and minimal lag
## 📊 Best Practices
1. **Start Simple**: Use one trading mode without filters initially
2. **Add Filters Gradually**: Enable one filter at a time to understand impact
3. **Match Timeframes**: Use timeframe-appropriate trading mode
4. **Monitor MTF Dashboard**: Confirm trade direction across timeframes
5. **Adjust to Market**: Change modes for ranging vs. trending markets
## 🎓 Educational Value
Perfect for traders learning:
- Parabolic SAR indicator mechanics
- Multi-indicator confirmation strategies
- Timeframe analysis techniques
- Risk management through filtered signals
- Visual chart analysis and pattern recognition
## 📝 Version History
**Current Version**: 1.0
- Initial release with full feature set
- 5 trading modes
- 6 indicator filters
- MTF dashboard with 6 timeframes
- Comprehensive customization options
---
## 🙏 Credits
Parabolic SAR original concept by J. Welles Wilder Jr.
## 📧 Support
For questions, suggestions, or bug reports, please comment below or message directly.
---
**Happy Trading! 🚀** Tony Pham 2025
*Remember: The best indicator is the one you understand and use consistently.*
QV ATR Active Range ValuesQuantVault
### Description for Presentation
The "QV ATR Active Range Values" indicator is a forward-looking tool designed for traders to estimate potential price ranges over 1, 2, or 3 months based on historical volatility and momentum. It leverages the Average True Range (ATR) to measure volatility and incorporates a "win rate" derived from recent candle colors to bias projections toward upside or downside potential. This creates asymmetric range forecasts that reflect market directionality, helping users anticipate breakout levels, set targets, or manage risk. The indicator overlays projected high/low lines on the chart and displays a compact table summarizing days to key percentage targets (e.g., +30% or -20%) alongside projected prices and percentage changes. Ideal for swing traders or investors seeking data-driven price projections without relying on complex models.
### Detailed Explanation of How It Works
This indicator uses Pine Script v5 on TradingView to compute and visualize price projections. Below, I'll break it down step by step, including the key calculations, logic, and outputs. Note that it assumes a trading month has 21 days (a common approximation for business days), and all projections are based on daily timeframes derived from weekly data.
#### 1. **User Inputs**
- **ATR Length (Lookback)**: Default 25. This is the period used to calculate the ATR and count candle colors.
- **Show Projections**: Boolean toggles to display 1-month (yellow), 2-month (orange), or 3-month (green/red) lines. By default, only 1-month is shown.
#### 2. **Period Definitions**
- Months are converted to days assuming 21 trading days per month:
- 1 month: 21 days
- 2 months: 42 days
- 3 months: 63 days
- These periods represent the forward-looking horizons for projections.
#### 3. **Volatility Calculation (ATR)**
- **Weekly ATR**: Fetched using `request.security` on the weekly timeframe with the specified ATR length (e.g., average true range over the last 25 weeks).
- **Daily ATR**: Derived by dividing the weekly ATR by 5 (approximating 5 trading days per week). This scales volatility to a daily basis.
- **Base Projections**: For each period, multiply daily ATR by the number of days in that period. This estimates the total expected range if volatility persists:
- 3 months: `daily_atr * 63`
- 2 months: `daily_atr * 42`
- 1 month: `daily_atr * 21`
#### 4. **Momentum Bias (Win Rate)**
- Counts the number of "green" (close > open, bullish) and "red" (close < open, bearish) candles over the ATR lookback period.
- **Win Rate**: Fraction of green candles out of total colored candles (green + red). Defaults to 0.5 (50%) if no colored candles exist.
- This win rate introduces asymmetry: In bullish periods (high win rate), upside projections are larger; in bearish periods (low win rate), downside projections dominate.
#### 5. **Adjusted Projections**
- **Upside Projection**: Base projection multiplied by win rate (e.g., for 3 months: `base_projection_3 * win_rate`).
- **Downside Projection**: Base projection multiplied by (1 - win rate).
- **Projected Prices**:
- High: Current close + upside projection
- Low: Current close - downside projection
- This creates realistic, direction-biased ranges rather than symmetric ones.
#### 6. **Chart Overlays (Plots)**
- Lines are plotted only if the corresponding toggle is enabled, with 50% transparency for a dimmed effect:
- 3-month high: Solid green line
- 3-month low: Solid red line
- 2-month high/low: Dashed orange lines
- 1-month high/low: Dashed yellow lines (#f6e122)
- These lines extend horizontally from the current bar, visualizing potential future highs/lows.
#### 7. **Daily Rates and Days to Targets**
- **Up Rate**: `daily_atr * win_rate` (expected daily upward movement).
- **Down Rate**: `daily_atr * (1 - win_rate)` (expected daily downward movement).
- **Days to Targets**: Calculates approximate trading days to reach fixed percentage moves from the current close, using the rates:
- +30%: `(close * 0.30) / up_rate` (rounded)
- +20%: `(close * 0.20) / up_rate`
- +10%: `(close * 0.10) / up_rate`
- -10%: `(close * 0.10) / down_rate`
- -20%: `(close * 0.20) / down_rate`
- -30%: `(close * 0.30) / down_rate`
- If a rate is zero, days are set to `na` (not applicable).
#### 8. **Table Display**
- A single combined table is created at the top-center of the chart with a semi-transparent black background (80% opacity) and white borders.
- **Structure** (6 columns x 7 rows):
- **Left Section (Days to Targets, Columns 0-1)**:
- Lists percentage targets (+30% to -30%) with corresponding days, colored green for upside and red for downside.
- **Separation (Column 2)**: Empty for visual spacing.
- **Right Section (Projections, Columns 3-5)**:
- Shows 1M/2M/3M highs and lows with:
- Projected price (formatted to 2 decimals).
- Percentage change from close (e.g., `((projected_high - close) / close) * 100`).
- Colors match the plot lines: Yellow for 1M, orange for 2M, green for 3M high, red for 3M low.
- The table updates dynamically with each bar, providing at-a-glance insights.
#### Key Assumptions and Limitations
- **Volatility Persistence**: Assumes future ATR matches historical levels; actual volatility can fluctuate.
- **Linear Projection**: Treats price movement as additive daily increments, ignoring compounding or non-linear effects.
- **Candle Count**: Only considers colored candles (ignores doji where open = close), and uses a simple win rate without weighting by size.
- **Timeframe**: Best on daily charts; weekly ATR scaling assumes consistent weekly-to-daily ratios.
- **No Backtesting**: This is a visualization tool, not a strategy with entry/exit signals. Test projections against historical data for accuracy.
This indicator combines volatility forecasting with basic sentiment analysis for practical, visual projections. If you're presenting it, emphasize how the win rate adds a directional edge over plain ATR-based ranges, making it more adaptive to trending markets. If you need modifications or examples on specific tickers, let me know!
AI MEDEA FORECASTAI MEDEA searches for similar historical patterns and uses them to generate predictions. The longer it runs, the more data it gathers and the better the predictions become.
Important:
The indicator must remain enabled to:
- Collect predictions and check their accuracy
- Have as much data as possible for comparison
- Provide more accurate results
Recommendation:
Let the indicator run for several days on different timeframes (15m, 30m, 1H, 4H). The accuracy table will show the actual accuracy only after gathering enough predictions.
ANN TREND SPX500 1m-1HHappy Trading! This indicator is the successor to my previous ANN Trend Prediction, now featuring improved feature vectors, refined backpropagation, and a stronger focus on asset- and timeframe-specific patterns for more precise predictions.
Internally is a collection of nine artificial neural networks (ANNs) trained on the S&P 500 to forecast uptrends, downtrends, or ranging markets. Each ANN is trained on one of the following timeframes: 1m, 2m, 3m, 5m, 10m, 15m, 30m, 45m, and 60m, and the appropriate model is selected automatically.
1. Settings
In the settings menu shown in the image below, you’ll find six options:
Indicator Timeframe – Choose between 1m and 1H.
Intrabar – Choose between Alerts been send intrabar or only at bar closing.
Lookback – Define how many previous bars the ANN should use in its calculations.
Smoothing – To reduce short-term switching of the prediction you can activate Smoothing. Here-by the input datas get filtered by a mean function.
Range Filter – Enable a third class, Ranging, in addition to Uptrend and Downtrend. This enables you to avoid choppy markets.
Class Colors – Here you can change each Class (Up, Down Trend etc) color.
2. Comparison with EMA crossover
The Prediction of the ANN Trend SPX500 1m-1H is more reliable as the prediction of the EMA crossover, shown in the Image below.
Both indicators use the same period of 65 bars and source their input data from the same chart.
While the EMA crosses over multiple times (shown as red vertical lines in the image), the ANN Trend maintains its prediction signal as Uptrend.
This advantage of the ANN comes from its learned knowledge. During training, it was exposed to a vast number of price charts, enabling it to distinguish between a trend setback and a true trend reversal.
3. Alerts
The indicator generates two types of alert signals:
Trade Signal:
1 = Uptrend
0 = Ranging
-1 = Downtrend
-2 = no prediction
Signal Age: Counts the number of bars since the last signal change. With the Signal Age you have access to the entry-price of the actual Trend. If you use You just call close to get the last entry-price.
4. Declaration for TradingView House Rules on Script Publishing
The unique feature of ANN Trend SPX500 1m-1H is it's real-time range detection capability and it's capability to distinguishes between a Trend set back and a Trend reversal which results in longer lasting trend predictions in comparison to any Moving Average Crossover Indicators.
This script is closed-source and invite-only, to support and compensate for months of development work.
5. Disclaimer
Trading involves risk, and losses can and do occur. This script is intended for informational and educational purposes only. All examples are hypothetical and not financial advice.
Decisions to buy, sell, hold, or trade securities, commodities, or other assets should be based on the advice of qualified financial professionals. Past performance does not guarantee future results.
Use this script at your own risk. It may contain bugs, and I cannot be held responsible for any financial losses resulting from its use.
Cheers!






















