Market Heat Z-ScoreThe "Market Heat Z-Score" indicator calculates the Z-score of a chosen price source over a specified lookback period, indicating how far the current price is from the mean in terms of standard deviations. It visually represents overbought and oversold conditions with a color gradient and customizable glow effect, with background shading indicating extreme Z-scores.
Educational
Daily Coin Purchase StrategyThis indicator helps investors track the profitability of their Dollar-Cost Averaging (DCA) strategy when buying crypto assets periodically over time. Users can customize the start date, purchase amount per cycle, and the frequency of purchases based on different timeframes (e.g., 15m, 1H, 4H, 1D).
Features:
✅ Flexible Configuration: Allows users to set the start date, purchase amount per cycle, and select the desired timeframe (15m, 1H, 4H, 1D, etc.).
✅ Automated Profit Calculation: Displays total investment, total coins accumulated, average cost per coin, and profit based on the current market price.
✅ Supports Multiple Timeframes: Users can choose to buy at intervals based on 15m, 1H, 4H, or 1D candlesticks.
✅ Helps Plan Investment Capital: Calculates the total capital needed to follow a DCA strategy over a given period, allowing for better financial planning.
✅ Visualizes Investment Profitability: Provides clear insights into the accumulation process and the overall performance of the strategy.
✅ Intuitive Charts: Displays the accumulation process and investment performance over time.
How to Use:
Set the start date for purchases.
Enter the desired amount to invest per cycle.
Select the timeframe for purchases (15m, 1H, 4H, 1D, etc.).
The indicator will automatically calculate the number of coins accumulated, the average cost per coin, and the overall profit.
🔹 Use Cases:
Monitor the effectiveness of the DCA strategy over time.
Compare profitability across different purchase intervals.
Optimize long-term asset accumulation strategies.
Plan financial resources effectively for long-term investment strategies.
This version keeps all the key details while ensuring clarity and accuracy. Let me know if you need any modifications! 🚀
VSA Vol Key VSA Signals
(1) No Demand – Bearish Signal
Low volume, narrow spread.
Price rises, but volume does not increase → Weak market, lack of buyers.
If this appears in an uptrend, it may indicate a potential reversal.
(2) No Supply – Bullish Signal
Low volume, narrow spread.
Price declines, but volume does not increase → Weak selling pressure.
If this appears in an uptrend, it may confirm the continuation of the uptrend.
(3) Stopping Volume – Bullish Reversal Signal
Strong price decline, but unusually high volume.
Candle shows a long lower wick, closing near the top.
Indicates Smart Money absorbing supply, signaling a potential reversal upwards.
(4) Climactic Volume – Possible Trend Reversal
Extremely high volume with a sharp price increase or decrease.
If this occurs after a long trend, it may indicate a trend reversal.
Smart Money may be taking profits after a prolonged price movement.
(5) Effort vs. Result
If volume is high but price movement is weak → Inefficient buying/selling, possible reversal.
If volume is high and price moves strongly in the same direction → Trend is likely to continue.
Money Flow Divergence IndicatorOverview
The Money Flow Divergence Indicator is designed to help traders and investors identify key macroeconomic turning points by analyzing the relationship between U.S. M2 money supply growth and the S&P 500 Index (SPX). By comparing these two crucial economic indicators, the script highlights periods where market liquidity is outpacing or lagging behind stock market growth, offering potential buy and sell signals based on macroeconomic trends.
How It Works
1. Data Sources
S&P 500 Index (SPX500USD): Tracks the stock market performance.
U.S. M2 Money Supply (M2SL - Federal Reserve Economic Data): Represents available liquidity in the economy.
2. Growth Rate Calculation
SPX Growth: Percentage change in the S&P 500 index over time.
M2 Growth: Percentage change in M2 money supply over time.
Growth Gap (Delta): The difference between M2 growth and SPX growth, showing whether liquidity is fueling or lagging behind market performance.
3. Visualization
A histogram displays the growth gap over time:
Green Bars: M2 growth exceeds SPX growth (potential bullish signal).
Red Bars: SPX growth exceeds M2 growth (potential bearish signal).
A zero line helps distinguish between positive and negative growth gaps.
How to Use It
✅ Bullish Signal: When green bars appear consistently, indicating that liquidity is outpacing stock market growth. This suggests a favorable environment for buying or holding positions.
❌ Bearish Signal: When red bars appear consistently, meaning stock market growth outpaces liquidity expansion, signaling potential overvaluation or a market correction.
Best Timeframes for Analysis
This indicator works best on monthly timeframes (M) since it is designed for long-term investors and macro traders who focus on broad economic cycles.
Who Should Use This Indicator?
📈 Long-term investors looking for macroeconomic trends.
📊 Swing traders who incorporate liquidity analysis in their strategies.
💰 Portfolio managers assessing market liquidity conditions.
🚀 Use this indicator to stay ahead of market trends and make informed investment decisions based on macroeconomic liquidity shifts! 🚀
ICT Breakers (BOS / MSS - Market Structure) [ICTProTools]The Breakers (Market Structure) indicator is designed to help traders identify true breaker structures , a key concept in Inner Circle Trader (ICT) methodology. In market structure, Breakers represent powerful shifts where a key high or low is broken, leading to a reversal in market direction. Most tools misinterpret structure shifts, using internal structure , leading to fake breakouts. This tool solves that problem by filtering out false signals , providing clear & structured insights , all with multi-timeframe compatibility.
💎 Key Features
⚡️ Breakers in action
The indicator shows the structure following ICT instructions. A breaker is defined by two lines:
The first line confirms the previous trend (it could be interpreted as a BOS).
The second line highlights the moment price breaks structure (with candle body or wick based on your chosen settings), signaling a shift in trend direction (like an MSS).
Furthermore, it’s important to note that a breaker not only shows the structure, but also defines a potential Point of Interest (POI), an area where price may retrace before continuing its trend.
Here, we can observe two clear structure shifts.
On the far left, the market was in a bearish trend, illustrated by the first visible (dotted and red) line. Shortly after, the second (solid and green) line appears, showing a break that initiates a new bullish trend.
This upward movement continues, with the last confirmation marked by a top structure line. And finally, the structure is broken once again indicating a transition back into a bearish trend.
💪 Real Structure with True Highs / Lows
Unlike many indicators that detect internal breakouts , this tool follows ICT’s true market structure rules .
In a bearish trend , a bullish breaker is only confirmed when the high that created the low is broken , and conversely for a bullish scenario.
Fake breakouts are ignored, preventing misleading signals.
In the image above, the white breakout is correctly ignored by the indicator, as it doesn't align with ICT’s structural rules. That white high is simply part of the internal structure, not the true swing point. Instead, the green line highlights the key level that truly matters, the one whose rupture would have confirmed a real change in market structure.
🔔 Smart Alerts for Structure Updates
Stay one step ahead with customizable alerts designed to notify you instantly when market structure changes occur.
Get notified for BOS (Continuation) and / or MSS (Breaker) events.
Set alerts for bullish , bearish , or both directions.
Choose between once or repeated alerts , based on your strategy.
This feature allows traders to remain focused and reactive , even when monitoring multiple markets.
In the alert settings, select which structure shifts you want to be notified of. Whether you're a scalper or a swing trader, the alerts keep you connected to key moments without needing to constantly monitor the chart.
⏳ Multi-Timeframe Structure
All features of the indicator are fully compatible with higher timeframes .
Get a broader view of market structure without switching timeframes.
Monitor higher timeframe structures and receive alerts, all without leaving your analysis chart .
In this example, the market structure of the 30m timeframe is displayed while on a 5m chart, providing a clearer perspective.
✨ Customization & User Control
Make it yours! The indicator allows full customization:
Swing bars (to confirm high / low)
Select your mode for Breakers (MSS) , using the candle body only or body / wick
Line style (type, width, color)
Choice of displayed timeframe
Activate any alert , with the frequency you want
🎯 Conclusion
✅ Avoid false signals by focusing on true ICT Breakers
✅ Smart alerts to never miss a structural shift
✅ Multi-timeframe support for enhanced analysis
✅ Clean & professional design for an optimal trading experience
IU Bigger than range strategyDESCRIPTION
IU Bigger Than Range Strategy is designed to capture breakout opportunities by identifying candles that are significantly larger than the previous range. It dynamically calculates the high and low of the last N candles and enters trades when the current candle's range exceeds the previous range. The strategy includes multiple stop-loss methods (Previous High/Low, ATR, Swing High/Low) and automatically manages take-profit and stop-loss levels based on user-defined risk-to-reward ratios. This versatile strategy is optimized for higher timeframes and assets like BTC but can be fine-tuned for different instruments and intervals.
USER INPUTS:
Look back Length: Number of candles to calculate the high-low range. Default is 22.
Risk to Reward: Sets the target reward relative to the stop-loss distance. Default is 3.
Stop Loss Method: Choose between:(Default is "Previous High/Low")
- Previous High/Low
- ATR (Average True Range)
- Swing High/Low
ATR Length: Defines the length for ATR calculation (only applicable when ATR is selected as the stop-loss method) (Default is 14).
ATR Factor: Multiplier applied to the ATR to determine stop-loss distance(Default is 2).
Swing High/Low Length: Specifies the length for identifying swing points (only applicable when Swing High/Low is selected as the stop-loss method).(Default is 2)
LONG CONDITION:
The current candle’s range (absolute difference between open and close) is greater than the previous range.
The closing price is higher than the opening price (bullish candle).
SHORT CONDITIONS:
The current candle’s range exceeds the previous range.
The closing price is lower than the opening price (bearish candle).
LONG EXIT:
Stop-loss:
- Previous Low
- ATR-based trailing stop
- Recent Swing Low
Take-profit:
- Defined by the Risk-to-Reward ratio (default 3x the stop-loss distance).
SHORT EXIT:
Stop-loss:
- Previous High
- ATR-based trailing stop
- Recent Swing High
Take-profit:
- Defined by the Risk-to-Reward ratio (default 3x the stop-loss distance).
ALERTS:
Long Entry Triggered
Short Entry Triggered
WHY IT IS UNIQUE:
This strategy dynamically adapts to different market conditions by identifying candles that exceed the previous range, ensuring that it only enters trades during strong breakout scenarios.
Multiple stop-loss methods provide flexibility for different trading styles and risk profiles.
The visual representation of stop-loss and take-profit levels with color-coded plots improves trade monitoring and decision-making.
HOW USERS CAN BENEFIT FROM IT:
Ideal for breakout traders looking to capitalize on momentum-driven price moves.
Provides flexibility to customize stop-loss methods and fine-tune risk management parameters.
Helps minimize drawdowns with a strong risk-to-reward framework while maximizing profit potential.
Trendline Breaks with Multi Fibonacci Supertrend StrategyTMFS Strategy: Advanced Trendline Breakouts with Multi-Fibonacci Supertrend
Elevate your algorithmic trading with institutional-grade signal confluence
Strategy Genesis & Evolution
This advanced trading system represents the culmination of a personal research journey, evolving from my custom " Multi Fibonacci Supertrend with Signals " indicator into a comprehensive trading strategy. Built upon the exceptional trendline detection methodology pioneered by LuxAlgo in their " Trendlines with Breaks " indicator, I've engineered a systematic framework that integrates multiple technical factors into a cohesive trading system.
Core Fibonacci Principles
At the heart of this strategy lies the Fibonacci sequence application to volatility measurement:
// Fibonacci-based factors for multiple Supertrend calculations
factor1 = input.float(0.618, 'Factor 1 (Weak/Fibonacci)', minval = 0.01, step = 0.01)
factor2 = input.float(1.618, 'Factor 2 (Medium/Golden Ratio)', minval = 0.01, step = 0.01)
factor3 = input.float(2.618, 'Factor 3 (Strong/Extended Fib)', minval = 0.01, step = 0.01)
These precise Fibonacci ratios create a dynamic volatility envelope that adapts to changing market conditions while maintaining mathematical harmony with natural price movements.
Dynamic Trendline Detection
The strategy incorporates LuxAlgo's pioneering approach to trendline detection:
// Pivotal swing detection (inspired by LuxAlgo)
pivot_high = ta.pivothigh(swing_length, swing_length)
pivot_low = ta.pivotlow(swing_length, swing_length)
// Dynamic slope calculation using ATR
slope = atr_value / swing_length * atr_multiplier
// Update trendlines based on pivot detection
if bool(pivot_high)
upper_slope := slope
upper_trendline := pivot_high
else
upper_trendline := nz(upper_trendline) - nz(upper_slope)
This adaptive trendline approach automatically identifies key structural market boundaries, adjusting in real-time to evolving chart patterns.
Breakout State Management
The strategy implements sophisticated state tracking for breakout detection:
// Track breakouts with state variables
var int upper_breakout_state = 0
var int lower_breakout_state = 0
// Update breakout state when price crosses trendlines
upper_breakout_state := bool(pivot_high) ? 0 : close > upper_trendline ? 1 : upper_breakout_state
lower_breakout_state := bool(pivot_low) ? 0 : close < lower_trendline ? 1 : lower_breakout_state
// Detect new breakouts (state transitions)
bool new_upper_breakout = upper_breakout_state > upper_breakout_state
bool new_lower_breakout = lower_breakout_state > lower_breakout_state
This state-based approach enables precise identification of the exact moment when price breaks through a significant trendline.
Multi-Factor Signal Confluence
Entry signals require confirmation from multiple technical factors:
// Define entry conditions with multi-factor confluence
long_entry_condition = enable_long_positions and
upper_breakout_state > upper_breakout_state and // New trendline breakout
di_plus > di_minus and // Bullish DMI confirmation
close > smoothed_trend // Price above Supertrend envelope
// Execute trades only with full confirmation
if long_entry_condition
strategy.entry('L', strategy.long, comment = "LONG")
This strict requirement for confluence significantly reduces false signals and improves the quality of trade entries.
Advanced Risk Management
The strategy includes sophisticated risk controls with multiple methodologies:
// Calculate stop loss based on selected method
get_long_stop_loss_price(base_price) =>
switch stop_loss_method
'PERC' => base_price * (1 - long_stop_loss_percent)
'ATR' => base_price - long_stop_loss_atr_multiplier * entry_atr
'RR' => base_price - (get_long_take_profit_price() - base_price) / long_risk_reward_ratio
=> na
// Implement trailing functionality
strategy.exit(
id = 'Long Take Profit / Stop Loss',
from_entry = 'L',
qty_percent = take_profit_quantity_percent,
limit = trailing_take_profit_enabled ? na : long_take_profit_price,
stop = long_stop_loss_price,
trail_price = trailing_take_profit_enabled ? long_take_profit_price : na,
trail_offset = trailing_take_profit_enabled ? long_trailing_tp_step_ticks : na,
comment = "TP/SL Triggered"
)
This flexible approach adapts to varying market conditions while providing comprehensive downside protection.
Performance Characteristics
Rigorous backtesting demonstrates exceptional capital appreciation potential with impressive risk-adjusted metrics:
Remarkable total return profile (1,517%+)
Strong Sortino ratio (3.691) indicating superior downside risk control
Profit factor of 1.924 across all trades (2.153 for long positions)
Win rate exceeding 35% with balanced distribution across varied market conditions
Institutional Considerations
The strategy architecture addresses execution complexities faced by institutional participants with temporal filtering and date-range capabilities:
// Time Filter settings with flexible timezone support
import jason5480/time_filters/5 as time_filter
src_timezone = input.string(defval = 'Exchange', title = 'Source Timezone')
dst_timezone = input.string(defval = 'Exchange', title = 'Destination Timezone')
// Date range filtering for precise execution windows
use_from_date = input.bool(defval = true, title = 'Enable Start Date')
from_date = input.time(defval = timestamp('01 Jan 2022 00:00'), title = 'Start Date')
// Validate trading permission based on temporal constraints
date_filter_approved = time_filter.is_in_date_range(
use_from_date, from_date, use_to_date, to_date, src_timezone, dst_timezone
)
These capabilities enable precise execution timing and market session optimization critical for larger market participants.
Acknowledgments
Special thanks to LuxAlgo for the pioneering work on trendline detection and breakout identification that inspired elements of this strategy. Their innovative approach to technical analysis provided a valuable foundation upon which I could build my Fibonacci-based methodology.
This strategy is shared under the same Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license as LuxAlgo's original work.
Past performance is not indicative of future results. Conduct thorough analysis before implementing any algorithmic strategy.
Quantum Motion Oscillator-QMO (TechnoBlooms)Quantum Motion Oscillator (QMO) is a momentum indicator designed for traders who demand precision. Combining multi-timeframe weighted linear regression with EMA crossovers, QMO offers a dynamic view of market momentum, helping traders anticipate trend shifts with greater accuracy.
This oscillator is inspired by quantum mechanics and wave theory, where market movement is seen as a series of probabilistic waves rather than rigid structures.
The histogram is plotted in proportion to the price movement of the candlesticks.
KEY FEATURES
1. Multi-Timeframe Histogram - Integrates 1 to 5 weighted linear regression averages, reducing lag while maintaining accuracy.
2. EMA Crossover Signal - Uses a Short and Long EMA to confirm trend shifts with minimal noise.
3. Adaptive Trend Analysis - Self-adjusting mechanics make QMO effective in both ranging and trending markets.
4. Scalable for Different Trading Styles - Works seamlessly for scalping, intraday, swing and position trading.
ADVANCED PROFESSIONAL INSIGHTS
1. Wave Dynamics and Market Flow - Inspired by wave mechanics, QMO reflects the energy accumulation and dissipation in price movements.
Expanding histogram waves = Strong momentum surge
Contracting waves = Momentum weakening, potential reversal zone.
2. Liquidity and Order Flow Applications - QMO works well alongside liquidity concepts and smart money techniques:
Combine with Fair Value Gaps & Order Blocks -> Enter when QMO signals align with liquidity zones.
Avoid False Moves - If price sweeps liquidity, but QMO momentum diverges, it is a sign of potential smart money manipulation.
HALO Oracle - CoffeeKillerHALO Oracle - CoffeeKiller Indicator Guide
Hello traders! Today I'm going to walk you through how to use the HALO Oracle indicator, which is a powerful tool for identifying market trends and potential reversal points.
Basic Overview
The HALO Oracle is a trend-following indicator that combines Heiken Ashi candles with golden ratio calculations to help you identify market direction and key price levels.
Main Features
1. Time Settings
- You have two modes for time analysis:
- Normal Mode: The indicator analyzes each individual candle on your chart
- Custom Resolution Mode: You can use a different timeframe for calculations than what's shown on your chart
* For example, you could view a 5-minute chart but have the indicator calculate based on 1-hour data
* Available timeframes include Monthly (M), Weekly (W), Daily (D), 4 Hours (240), 1 Hour (60), etc.
2. Visual Components
Bands and Fill
- Two main bands: green and red
- The space between these bands is filled with colors:
- Green fill indicates a bullish trend
- Red fill indicates a bearish trend
- You can adjust the thickness of the bands and the transparency of the fill colors
Marker Lines
- High Marker Line (magenta): Tracks the highest opening price during bullish trends
- Low Marker Line (cyan): Tracks the lowest opening price during bearish trends
- These lines create a "zone" that helps identify potential support and resistance levels
- Diamond markers appear when the trend resets
Background Fill
- Optional full-chart background coloring
- Green background for bullish trends
- Red background for bearish trends
How to Read the Indicator
1. **Trend Identification**
- Green fill/background indicates a bullish trend
- Red fill/background indicates a bearish trend
- Watch for color changes as they signal potential trend changes
2. **Support and Resistance Levels**
- The bands create dynamic support and resistance zones
- Price tends to respect these levels during strong trends
- Watch for price reactions when it touches either band
3. **Marker Lines**
- These act as historical support/resistance levels
- The space between marker lines creates a "zone" where price might find support or resistance
- Diamond shapes appear when these levels reset, indicating potential trend changes
Trading Tips
1. **Trend Trading**
- Trade in the direction of the background color
- Look for pullbacks to the support/resistance bands in the trend direction
- Use marker lines as potential entry/exit points
2. **Reversal Signals**
- Watch for diamond markers as they indicate trend resets
- Confirm reversals with price action and other indicators
- Pay attention to how price reacts around marker lines
3. **Timeframe Analysis**
- Use custom resolution for a broader market perspective
- Higher timeframes for overall trend
- Lower timeframes for entry/exit timing
Customization Options
1. **Display Settings**
- Toggle bands and fill visibility
- Adjust line thickness
- Customize colors for all components
2. **Background Options**
- Toggle full-chart background
- Adjust background transparency
3. **Marker Line Settings**
- Toggle visibility of marker lines
- Toggle reset diamonds
- Customize marker line colors
Best Practices
1. Start with the default settings to understand how the indicator behaves
2. Gradually customize colors and settings to match your trading style
3. Use multiple timeframes to confirm trends
4. Don't trade solely based on the indicator - combine it with price action and other tools
5. Pay special attention to areas where marker lines and bands converge
6. Watch for diamond markers as they often precede significant moves
Remember, this indicator works best when used as part of a complete trading strategy, not in isolation.
The information and signals provided by this indicator are intended solely for educational and informational purposes. They do not constitute financial, legal, or any other professional advice. Past performance is not indicative of future results. Trading and investing involve significant risk, and it is strongly recommended that you use this indicator in conjunction with other analysis tools and indicators. Always consult with a qualified financial advisor or professional before making any investment decisions. The creators and distributors of this indicator expressly disclaim any liability for any losses incurred through the use of the indicator or reliance on the information provided. Use at your own risk.
All Forex Sessions (SAST Accurate) + LabelsFor traders in South Africa
Uses timestamp("Africa/Johannesburg", ...) — this locks the session window to true SAST time
The session now perfectly aligns from 14:00 to 18:00 local time no matter what time zone your TradingView chart is in
Also shows start and end vertical lines only when the session opens and closes
StatPivot- Dynamic Range Analyzer - indicator [PresentTrading]Hello everyone! In the following few open scripts, I would like to share various statistical tools that benefit trading. For this time, it is a powerful indicator called StatPivot- Dynamic Range Analyzer that brings a whole new dimension to your technical analysis toolkit.
This tool goes beyond traditional pivot point analysis by providing comprehensive statistical insights about price movements, helping you identify high-probability trading opportunities based on historical data patterns rather than subjective interpretations. Whether you're a day trader, swing trader, or position trader, StatPivot's real-time percentile rankings give you a statistical edge in understanding exactly where current price action stands within historical contexts.
Welcome to share your opinions! Looking forward to sharing the next tool soon!
█ Introduction and How it is Different
StatPivot is an advanced technical analysis tool that revolutionizes retracement analysis. Unlike traditional pivot indicators that only show static support/resistance levels, StatPivot delivers dynamic statistical insights based on historical pivot patterns.
Its key innovation is real-time percentile calculation - while conventional tools require new pivot formations before updating (often too late for trading decisions), StatPivot continuously analyzes where current price stands within historical retracement distributions.
Furthermore, StatPivot provides comprehensive statistical metrics including mean, median, standard deviation, and percentile distributions of price movements, giving traders a probabilistic edge by revealing which price levels represent statistically significant zones for potential reversals or continuations. By transforming raw price data into statistical insights, StatPivot helps traders move beyond subjective price analysis to evidence-based decision making.
█ Strategy, How it Works: Detailed Explanation
🔶 Pivot Point Detection and Analysis
The core of StatPivot's functionality begins with identifying significant pivot points in the price structure. Using the parameters left and right, the indicator locates pivot highs and lows by examining a specified number of bars to the left and right of each potential pivot point:
Copyp_low = ta.pivotlow(low, left, right)
p_high = ta.pivothigh(high, left, right)
For a point to qualify as a pivot low, it must have left higher lows to its left and right higher lows to its right. Similarly, a pivot high must have left lower highs to its left and right lower highs to its right. This approach ensures that only significant turning points are recognized.
🔶 Percentage Change Calculation
Once pivot points are identified, StatPivot calculates the percentage changes between consecutive pivot points:
For drops (when a pivot low is lower than the previous pivot low):
CopydropPercent = (previous_pivot_low - current_pivot_low) / previous_pivot_low * 100
For rises (when a pivot high is higher than the previous pivot high):
CopyrisePercent = (current_pivot_high - previous_pivot_high) / previous_pivot_high * 100
These calculations quantify the magnitude of each market swing, allowing for statistical analysis of historical price movements.
🔶 Statistical Distribution Analysis
StatPivot computes comprehensive statistics on the historical distribution of drops and rises:
Average (Mean): The arithmetic mean of all recorded percentage changes
CopyavgDrop = array.avg(dropValues)
Median: The middle value when all percentage changes are arranged in order
CopymedianDrop = array.median(dropValues)
Standard Deviation: Measures the dispersion of percentage changes from the average
CopystdDevDrop = array.stdev(dropValues)
Percentiles (25th, 75th): Values below which 25% and 75% of observations fall
Copyq1 = array.get(sorted, math.floor(cnt * 0.25))
q3 = array.get(sorted, math.floor(cnt * 0.75))
VaR95: The maximum expected percentage drop with 95% confidence
Copyvar95D = array.get(sortedD, math.floor(nD * 0.95))
Coefficient of Variation (CV): Measures relative variability
CopycvD = stdDevDrop / avgDrop
These statistics provide a comprehensive view of market behavior, enabling traders to understand the typical ranges and extreme moves.
🔶 Real-time Percentile Ranking
StatPivot's most innovative feature is its real-time percentile calculation. For each current price, it calculates:
The percentage drop from the latest pivot high:
CopycurrentDropPct = (latestPivotHigh - close) / latestPivotHigh * 100
The percentage rise from the latest pivot low:
CopycurrentRisePct = (close - latestPivotLow) / latestPivotLow * 100
The percentile ranks of these values within the historical distribution:
CopyrealtimeDropRank = (count of historical drops <= currentDropPct) / total drops * 100
This calculation reveals exactly where the current price movement stands in relation to all historical movements, providing crucial context for decision-making.
🔶 Cluster Analysis
To identify the most common retracement zones, StatPivot performs a cluster analysis by dividing the range of historical drops into five equal intervals:
CopyrangeSize = maxVal - minVal
For each interval boundary:
Copyboundaries = minVal + rangeSize * i / 5
By counting the number of observations in each interval, the indicator identifies the most frequently occurring retracement zones, which often serve as significant support or resistance areas.
🔶 Expected Price Targets
Using the statistical data, StatPivot calculates expected price targets:
CopytargetBuyPrice = close * (1 - avgDrop / 100)
targetSellPrice = close * (1 + avgRise / 100)
These targets represent statistically probable price levels for potential entries and exits based on the average historical behavior of the market.
█ Trade Direction
StatPivot functions as an analytical tool rather than a direct trading signal generator, providing statistical insights that can be applied to various trading strategies. However, the data it generates can be interpreted for different trade directions:
For Long Trades:
Entry considerations: Look for price drops that reach the 70-80th percentile range in the historical distribution, suggesting a statistically significant retracement
Target setting: Use the Expected Sell price or consider the average rise percentage as a reasonable target
Risk management: Set stop losses below recent pivot lows or at a distance related to the statistical volatility (standard deviation)
For Short Trades:
Entry considerations: Look for price rises that reach the 70-80th percentile range, indicating an unusual extension
Target setting: Use the Expected Buy price or average drop percentage as a target
Risk management: Set stop losses above recent pivot highs or based on statistical measures of volatility
For Range Trading:
Use the most common drop and rise clusters to identify probable reversal zones
Trade bounces between these statistically significant levels
For Trend Following:
Confirm trend strength by analyzing consecutive higher pivot lows (uptrend) or lower pivot highs (downtrend)
Use lower percentile retracements (20-30th percentile) as entry opportunities in established trends
█ Usage
StatPivot offers multiple ways to integrate its statistical insights into your trading workflow:
Statistical Table Analysis: Review the comprehensive statistics displayed in the data table to understand the market's behavior. Pay particular attention to:
Average drop and rise percentages to set reasonable expectations
Standard deviation to gauge volatility
VaR95 for risk assessment
Real-time Percentile Monitoring: Watch the real-time percentile display to see where the current price movement stands within the historical distribution. This can help identify:
Extreme movements (90th+ percentile) that might indicate reversal opportunities
Typical retracements (40-60th percentile) that might continue further
Shallow pullbacks (10-30th percentile) that might represent continuation opportunities in trends
Support and Resistance Identification: Utilize the plotted pivot points as key support and resistance levels, especially when they align with statistically significant percentile ranges.
Target Price Setting: Use the expected buy and sell prices calculated from historical averages as initial targets for your trades.
Risk Management: Apply the statistical measurements like standard deviation and VaR95 to set appropriate stop loss levels that account for the market's historical volatility.
Pattern Recognition: Over time, learn to recognize when certain percentile levels consistently lead to reversals or continuations in your specific market, and develop personalized strategies based on these observations.
█ Default Settings
The default settings of StatPivot have been carefully calibrated to provide reliable statistical analysis across a variety of markets and timeframes, but understanding their effects allows for optimal customization:
Left Bars (30) and Right Bars (30): These parameters determine how pivot points are identified. With both set to 30 by default:
A pivot low must be the lowest point among 30 bars to its left and 30 bars to its right
A pivot high must be the highest point among 30 bars to its left and 30 bars to its right
Effect on performance: Larger values create fewer but more significant pivot points, reducing noise but potentially missing important market structures. Smaller values generate more pivot points, capturing more nuanced movements but potentially including noise.
Table Position (Top Right): Determines where the statistical data table appears on the chart.
Effect on performance: No impact on analytical performance, purely a visual preference.
Show Distribution Histogram (False): Controls whether the distribution histogram of drop percentages is displayed.
Effect on performance: Enabling this provides visual insight into the distribution of retracements but can clutter the chart.
Show Real-time Percentile (True): Toggles the display of real-time percentile rankings.
Effect on performance: A critical setting that enables the dynamic analysis of current price movements. Disabling this removes one of the key advantages of the indicator.
Real-time Percentile Display Mode (Label): Chooses between label display or indicator line for percentile rankings.
Effect on performance: Labels provide precise information at the current price point, while indicator lines show the evolution of percentile rankings over time.
Advanced Considerations for Settings Optimization:
Timeframe Adjustment: Higher timeframes generally benefit from larger Left/Right values to identify truly significant pivots, while lower timeframes may require smaller values to capture shorter-term swings.
Volatility-Based Tuning: In highly volatile markets, consider increasing the Left/Right values to filter out noise. In less volatile conditions, lower values can help identify more potential entry and exit points.
Market-Specific Optimization: Different markets (forex, stocks, commodities) display different retracement patterns. Monitor the statistics table to see if your market typically shows larger or smaller retracements than the current settings are optimized for.
Trading Style Alignment: Adjust the settings to match your trading timeframe. Day traders might prefer settings that identify shorter-term pivots (smaller Left/Right values), while swing traders benefit from more significant pivots (larger Left/Right values).
By understanding how these settings affect the analysis and customizing them to your specific market and trading style, you can maximize the effectiveness of StatPivot as a powerful statistical tool for identifying high-probability trading opportunities.
US Presidents (Alternating Fills by Order)📜 Indicator Description: US Presidents Background Fill
This indicator highlights the terms of U.S. Presidents on your chart with alternating red and blue background fills based on their political party:
• 🟥 Republicans = Red
• 🟦 Democrats = Blue
• 🎨 Dark/Light shading alternates with each new president to clearly distinguish consecutive terms, even within the same party.
The fill starts from President Ulysses S. Grant (18th President, 1873) through to the 47th president in 2025. It is designed to work with any asset and automatically adapts to the visible date range on your chart.
Ideal for visualizing macro trends, historical context, and how markets may have reacted under different political administrations.
Mark Hours/Minutes (Formula + Minutes)This Pine Script code is a TradingView indicator that analyzes the hour and minutes of each candle in a 1-minute timeframe and plots a red triangle above the candle if one of the following conditions is met:
Sum/Difference Condition: The sum or the absolute difference of the hours and minutes is equal to 29, 35, or 71, with a tolerance of +/- 1.
Minutes Condition: The minutes are equal to 00, 29, or 35.
This indicator is based on the Goldbach theory and the "algo path" concept popularized by Hopiplaka, which posits that algorithmic trading paths often initiate from minute values of 00, 29, and 35. Use this indicator according to your trading strategy.
Coinbase PremiumCoinbase Premium Indicator
This Pine Script indicator displays the premium on Coinbase relative to the current ticker, if the ticker is available on Coinbase. It calculates the premium as the percentage difference between the price of the current ticker and the price on Coinbase.
Features:
Fetches the current ticker price.
Checks if the current ticker is available on Coinbase.
Calculates the premium only if the ticker is available on Coinbase.
Plots the premium on the chart.
Displays a message if the current ticker is not available on Coinbase.
Use this indicator to monitor the price premium of assets on Coinbase compared to other exchanges.
Triple Witching HourThe "Triple Witching Hour" indicator highlights the days when the quarterly expiration of stock index futures, options on futures, and options on stocks occurs simultaneously. These events, known as "Triple Witching Days," typically happen on the third Friday of March, June, September, and December. The indicator marks these days on the chart with a red triangle below the price bars and displays a label with the text "Triple Witching Hour." Traders can use this tool to identify periods of potential market volatility and adjust their strategies accordingly.
Fair Value Gap (FVG) Detector Fair Value Gap (FVG) is an imbalance in price action that occurs when there is a strong displacement (big movement) in the market, leaving a gap between wicks. This gap represents an area where price moved too quickly, and liquidity was not fully filled.
Traders use FVGs as potential areas where price might retrace and react before continuing in the original direction.
Pixel Art CloudPixel Art Cloud ☁️ (Super Mario Bros. 2 NES Style)
This Pine Script (v6) script generates a Pixel Art Cloud, inspired by the classic clouds from Super Mario Bros. 2 (NES).
📌 Features:
Displays a pixelated cloud in 8-bit retro style.
Overlays the chart at user-defined intervals.
Uses a color combination to simulate the classic cloud:
⚫ Black for the outline (classic pixelated border).
🔵 Light blue (#3CBCFC) for internal details, matching the clouds in the game.
Automatic repetition on the chart based on the separation parameter.
Does not affect market data, purely a visual decorative element.
🎨 Main Use:
This script is perfect for adding a nostalgic and creative touch to TradingView charts, bringing back the Super Mario Bros. 2 (NES) vibe.
🔧 Optional:
You can modify the cloud's appearance frequency by adjusting the separation parameter.
💡 Note:
This script is not a technical indicator and does not influence market analysis.
🚀 Add a retro touch to your charts with this pixelated cloud! ☁️🎮
Pixel Art ChickenPixel Art Chicken 🐔
This Pine Script (v6) script generates a Pixel Art of a Chicken on the TradingView chart.
📌 Features:
Draws a pixelated chicken using vibrant colors:
🔴 Red (comb)
🟡 Yellow (beak and legs)
⚪ Light gray (body)
⚫ Black (eyes and outline)
Overlays the chart at user-defined intervals.
Functions as a visual design without affecting market data.
Customizable in terms of location and spacing between images.
🎨 Main Use:
This script is perfect for adding a fun and creative touch to your TradingView charts.
🔧 Optional:
If you want to modify the repetition frequency of the pixel art, adjust the separation parameter.
💡 Note:
This script is not a technical indicator and does not influence market analysis.
🚀 Enjoy this Pixel Art on your charts! 🎮🐔🔥
Prev Day, Premarket, 5m OpenDescription of the Script
This script is a Pine Script (version 5) indicator designed for use in TradingView. It overlays customizable price range lines and backgrounds on a chart to highlight key trading ranges based on different time periods and sessions. The indicator focuses on the following ranges:
Daily Range: Displays the high and low prices from the previous trading day (9:30 AM to 4:00 PM ET).
Premarket Range: Shows the high and low prices during the premarket session (4:00 AM to 9:29 AM ET) of the current day.
5-Minute Opening Range: Captures the high and low prices during the first 5 minutes of the regular trading session (9:30 AM to 9:35 AM ET).
GC Sessions (Gold Commodity): Optionally displays the high and low of the previous day's GC session (9:00 AM to 2:30 PM ET) and London Fix windows (5:00–6:00 AM and 9:30–10:30 AM ET on the current day).
CL Sessions (Crude Oil): Optionally displays the high and low of the previous day's CL session (9:00 AM to 2:30 PM ET) and the EIA window (10:00–11:00 AM ET on Wednesdays).
Each range is represented by horizontal lines (top and bottom) with customizable colors, styles (solid, dashed, dotted), and widths. Background shading between the high and low lines can also be enabled with adjustable colors and transparency. Labels are added to identify each range (e.g., "PDH" for Previous Day High, "PMH" for Premarket High, etc.). The script adjusts for time zones via a user-defined offset and allows manual override of the previous trading day.
Instructions for Setting the Inputs
The script provides a variety of customizable inputs grouped by range type. Below are instructions for setting each input category:
General Settings
Timezone Offset (hours): Adjusts the script's time calculations to your local timezone relative to UTC. Enter the number of hours to subtract from UTC (e.g., -4 for Eastern Time during Daylight Saving Time, -5 during Standard Time). Range: -12 to +12.
Previous Day Settings
Previous Trading Day Override (YYYY-MM-DD): Allows manual specification of the previous trading day in "YYYY-MM-DD" format (e.g., "2025-03-19"). Leave blank for automatic detection (defaults to the prior day). This override expires at midnight ET the next day.
Daily Range Customization
Daily Top Line Color: Choose the color for the previous day's high line (default: green).
Daily Top Line Style: Select the line style (solid, dashed, dotted; default: solid).
Daily Top Line Width: Set the line thickness (1 to 5; default: 2).
Daily Bottom Line Color: Choose the color for the previous day's low line (default: red).
Daily Bottom Line Style: Select the line style (solid, dashed, dotted; default: solid).
Daily Bottom Line Width: Set the line thickness (1 to 5; default: 2).
Daily Show Background?: Enable/disable background shading between the high and low (default: true).
Daily Background Color: Choose the background color (default: orange).
Daily Background Transparency: Set transparency level (0 = opaque, 100 = fully transparent; default: 92).
Premarket Range Customization
Premarket Top Line Color: Choose the color for the premarket high line (default: green).
Premarket Top Line Style: Select the line style (solid, dashed, dotted; default: solid).
Premarket Top Line Width: Set the line thickness (1 to 5; default: 2).
Premarket Bottom Line Color: Choose the color for the premarket low line (default: red).
Premarket Bottom Line Style: Select the line style (solid, dashed, dotted; default: solid).
Premarket Bottom Line Width: Set the line thickness (1 to 5; default: 2).
Premarket Show Background?: Enable/disable background shading (default: true).
Premarket Background Color: Choose the background color (default: blue).
Premarket Background Transparency: Set transparency level (0 to 100; default: 92).
5-Minute Opening Range Customization
5min Opening Top Line Color: Choose the color for the opening range high line (default: black).
5min Opening Top Line Style: Select the line style (solid, dashed, dotted; default: solid).
5min Opening Top Line Width: Set the line thickness (1 to 5; default: 2).
5min Opening Bottom Line Color: Choose the color for the opening range low line (default: black).
5min Opening Bottom Line Style: Select the line style (solid, dashed, dotted; default: solid).
5min Opening Bottom Line Width: Set the line thickness (1 to 5; default: 2).
GC Special Sessions
Show GC Session Range (9:00 AM - 2:30 PM ET)?: Enable/disable the GC session range from the previous day (default: false).
GC Session Top Color: Choose the color for the GC session high line (default: green).
GC Session Bottom Color: Choose the color for the GC session low line (default: red).
Show London Fix Windows (5-6 AM, 9:30-10:30 AM ET)?: Enable/disable the London Fix windows for the current day (default: false).
London Fix Top Color: Choose the color for the London Fix high line (default: green).
London Fix Bottom Color: Choose the color for the London Fix low line (default: red).
CL Special Sessions
Show CL Session Range (9:00 AM - 2:30 PM ET)?: Enable/disable the CL session range from the previous day (default: false).
CL Session Top Color: Choose the color for the CL session high line (default: green).
CL Session Bottom Color: Choose the color for the CL session low line (default: red).
Show EIA Window (Wed, 10-11 AM ET)?: Enable/disable the EIA window for Wednesdays (default: false).
EIA Window Top Color: Choose the color for the EIA high line (default: green).
EIA Window Bottom Color: Choose the color for the EIA low line (default: red).
How to Use
Add to Chart: Copy the script into TradingView's Pine Editor, then add it to your chart.
Adjust Inputs: Open the indicator settings by double-clicking it on the chart. Modify the inputs as described above to suit your preferences.
Verify Timezone: Ensure the "Timezone Offset" matches your desired timezone for accurate range calculations.
Optional Overrides: Use the "Previous Trading Day Override" if you need to analyze a specific past day, ensuring the format is correct (e.g., "2025-03-19").
This indicator is particularly useful for traders who rely on key price levels from previous sessions, premarket activity, or specific commodity-related time windows (GC and CL).
Session Start & Day BackgroundThis indicator visually enhances your TradingView charts by highlighting the start of each new trading day and coloring the background based on the day of the week.
The first candle of each new trading day is marked in gray for better session separation.
The background color changes based on the current day of the week, making it easier to recognize market patterns and trends at a glance.
Works across all markets including Forex, Stocks, and Crypto.
Designed to improve chart readability and market structure visualization.
Ideal for traders who want a clearer overview of daily sessions and better differentiation between trading days! 🚀
DT_GannDT_Gann - Combined Indicator Description
This TradingView indicator implements W.D. Gann's Square 9 concept with several visual enhancements to help traders identify key support and resistance levels. The indicator automatically adapts to different market types (forex or stocks) and includes the following features:
KEY FEATURES:
Support and resistance levels:
Automatically calculates and displays multiple support and resistance levels based on the Gann square theory of 9, with customizable colors (default green for support, red for resistance).
Day Opening Line:
Shows the day's opening price as a reference point, which serves as the base for all Gann calculations.
Previous 4H Range Box:
Displays a rectangular box showing the high-llow range of the previous day's last 4-hour candle, helping traders identify important price zones.
Vertical Time Lines:
Additional temporary vertical lines marking 4-hour intervals to help visualize potential reversal points.
Reject Mode:
Allows you to fine-tune support and resistance levels using percentage deviations.
CUSTOMIZATION OPTIONS:
Line Styles:
Select a solid, dashed, or dotted line.
Colors:
Adjust colors for support, resistance, daily open line, 4H rectangle and time lines.
Line Width:
Customize the thickness of all lines (1-5 pixels)
Opacity settings:
Control the transparency of various elements
Deviation settings:
Apply percentage adjustments to support and resistance levels
TECHNICAL IMPLEMENTATION:
Indicator:
- Automatically determines the appropriate point values depending on the instrument.
- Calculates Gann levels using the mathematical principle of Square 9.
- Finds the nearest support and resistance levels relative to the current price.
- Creates visualizations based on both charts and lines.
- Dynamically updates as price moves.
USAGE:
This indicator is especially useful for swing traders and day traders who follow Gann methods. The combination of price levels (support/resistance) and time markers (vertical lines) helps identify potential reversal zones where price and time align according to Gann principles.
The previous day's 4-hour rectangular frame often serves as an important reference zone that price can return to or respect.
The indicator works on all timeframes, but is most effective on charts from 15-minute to 4-hour charts, where time-based components provide the most value.
Premarket High/Low Breakout AlertsPremarket High/Low Breakout Alerts
Description: This custom TradingView indicator helps you track premarket breakouts and breakdowns for a list of selected stocks. The indicator monitors the premarket session and sends an alert every time the stock's price breaks above the premarket high or below the premarket low.
Key Features:
Track Multiple Stocks: Easily monitor multiple stocks (e.g., AAPL, TSLA, NVDA, etc.) and get alerts when they break premarket levels.
Premarket Session Monitoring: The indicator checks for price movements during the premarket session (4:00 AM to 9:30 AM EST).
Customizable Ticker List: Modify the list of tickers directly from the TradingView settings to suit your daily trading needs.
Breakout and Breakdown Alerts: Receive instant alerts for both breakout (above premarket high) and breakdown (below premarket low) conditions.
Plot Premarket Levels: The premarket high and low levels are plotted on the chart for easy reference.
How to Use:
Add this indicator to your chart.
Go to the indicator settings and input your desired stock tickers (e.g., AAPL, TSLA, MSFT).
The indicator will automatically track the premarket levels and send alerts when those levels are broken.
Customize the tickers daily if needed.
Ideal For:
Day Traders who want to track premarket movements.
Swing Traders looking for strong breakouts from premarket levels.
Scalpers who need quick alerts to catch price action early.
Big Candles FilterHow It Works
A candle is considered "big" only if its body (distance from open to close) exceeds the barHeight value.
** NOT calculated by Range !!!
Features :
Bullish candles (close > open) are marked with a green "Buy" triangle if the body is large enough.
Bearish candles (close < open) are marked with a red "Sell" triangle if the body is large enough.
The bars are colored for big candles, and optional labels show the open and close prices.
Backtesting Stats (Altrady)Track and analyze your backtesting results directly on your chart.
This indicator simplifies manual backtesting by summarizing your trades in a clear, structured table. Enter your R-values (one per line) in the text area, and instantly see:
✅ Trade list – All entries displayed with color-coded wins/losses.
✅ Key stats – Total trades, win rate, and RR sum in the top row.
✅ Quick insights – Spot trends, refine your strategy, and track performance without spreadsheets.
How to Use
1️⃣ Open settings and enter R-values, one per line (e.g., 2.5, -1, 3.2) along with short comments (bad entry, counter trend, etc)
2️⃣ View the table in the top-right corner of your chart.
3️⃣ Analyze your results, adjust your strategy, and improve consistency.
Perfect for manual backtesters who want a fast, no-spreadsheet solution. 🚀